diff --git a/apps/edr-freight-web/backoffice/src/pages/customers/CustomerDetailPage.tsx b/apps/edr-freight-web/backoffice/src/pages/customers/CustomerDetailPage.tsx index 35488b94f..aa4042bbd 100644 --- a/apps/edr-freight-web/backoffice/src/pages/customers/CustomerDetailPage.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/customers/CustomerDetailPage.tsx @@ -607,8 +607,19 @@ export default function CustomerDetailPage() { { label: "PoA address", value: company?.poaAddress }, ]; const hasPoaDetails = poaFields.some((f) => f.value?.trim()); + // Fayda verification is written into the company attributes by the portal's + // verification flow. + const attrs = (company?.attributes ?? {}) as Record; + const faydaVerified = (prefix: "owner" | "poa") => ({ + verified: Boolean(attrs[`${prefix}FaydaSub`]), + at: (attrs[`${prefix}FaydaVerifiedAt`] as string | undefined) ?? null, + }); + const ownerIdentity = faydaVerified("owner"); + const ownerPassportNumber = + (attrs.ownerPassportNumber as string | undefined) ?? null; + const poaIdentity = faydaVerified("poa"); // A freight forwarder acts on other companies' behalf, so its PoA — details - // and delegation letter both — is mandatory rather than optional. + // and DARS delegation paper both — is mandatory rather than optional. const poaMandatory = (company?.companyProfiles ?? []).some( (p) => p.type === "freight_forwarder", ); @@ -752,6 +763,16 @@ export default function CustomerDetailPage() { + @@ -798,11 +819,11 @@ export default function CustomerDetailPage() { {delegationMissing ? ( - Delegation letter missing + DARS delegation paper missing ) : poaLive.length > 0 ? ( - Delegation letter on file + DARS delegation paper on file ) : ( @@ -820,6 +841,12 @@ export default function CustomerDetailPage() { value={f.value} /> ))} + ) : ( @@ -838,7 +865,7 @@ export default function CustomerDetailPage() { tt="uppercase" style={{ letterSpacing: "0.04em" }} > - Delegation letter + DARS delegation paper {documentsQuery.isLoading ? ( @@ -864,7 +891,7 @@ export default function CustomerDetailPage() { ) : poaDocuments.length === 0 ? ( - No delegation letter uploaded. + No DARS delegation paper uploaded. ) : ( poaDocuments.map((doc) => (