diff --git a/apps/backoffice/src/app/features/vessel-registration/pages/VesselRegistrationReviewPage.tsx b/apps/backoffice/src/app/features/vessel-registration/pages/VesselRegistrationReviewPage.tsx index 1fceae104..c317bd2be 100644 --- a/apps/backoffice/src/app/features/vessel-registration/pages/VesselRegistrationReviewPage.tsx +++ b/apps/backoffice/src/app/features/vessel-registration/pages/VesselRegistrationReviewPage.tsx @@ -8,7 +8,6 @@ import { Button, Card, Divider, - Grid, Group, Modal, MultiSelect, @@ -125,6 +124,8 @@ export function VesselRegistrationReviewPage() { } const isTerminal = status === 'Approved' || status === 'Rejected'; + const hasRemarks = Boolean(record.remarks || (record.correctionFields && record.correctionFields.length > 0)); + const hasCertificates = Boolean(record.certificates && record.certificates.length > 0); const decide = (newStatus: RegistrationStatus, label: string) => { applyDecision(record, newStatus, remarks, newStatus === 'Correction Required' ? correctionFields : undefined); @@ -245,120 +246,116 @@ export function VesselRegistrationReviewPage() { - {/* Two-column body */} - - {/* Left column */} - - - - }>Information - }>Documents - + {/* Tabs */} + + + }>Information + }>Documents + {hasRemarks && }>Officer Remarks} + {hasCertificates && }>Certificates} + - - - - Vessel Information - - - - - - - - - - - - - Technical Specifications - - - - - - - - - - - - - Ownership Information - - - - - - - - - - - - - - Documents - - {record.documents.map((doc) => )} - - - - - - - {/* Right column */} - + - {(record.remarks || (record.correctionFields && record.correctionFields.length > 0)) && ( - - Officer Remarks - {record.remarks && {record.remarks}} - {record.correctionFields && record.correctionFields.length > 0 && ( - - {record.correctionFields.map((f) => {f})} - - )} - - )} + + Vessel Information + + + + + + + + + + - {status === 'Approved' && record.certificates && ( - - Certificates - - {record.certificates.map((cert) => ( - - - - {cert.name} - No. {cert.number} — Issued {cert.issueDate} - - } - component="a" - href={DEMO_PDF} - download={`${cert.name.replace(/\s+/g, '-')}-${cert.number}.pdf`} - > - Download - - - - - ))} - - - )} + + Technical Specifications + + + + + + + + + + + + + Ownership Information + + + + + + + + - - + + + + + Documents + + {record.documents.map((doc) => )} + + + + + {hasRemarks && ( + + + Officer Remarks + {record.remarks && {record.remarks}} + {record.correctionFields && record.correctionFields.length > 0 && ( + + {record.correctionFields.map((f) => {f})} + + )} + + + )} + + {hasCertificates && ( + + + Certificates + + {record.certificates!.map((cert) => ( + + + + {cert.name} + No. {cert.number} — Issued {cert.issueDate} + + } + component="a" + href={DEMO_PDF} + download={`${cert.name.replace(/\s+/g, '-')}-${cert.number}.pdf`} + > + Download + + + + + ))} + + + + )} + ); }