mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 14:08:11 +00:00
feat: add poa and poa delegation file to onboarding
This commit is contained in:
@@ -18,6 +18,28 @@ interface OnboardingField {
|
||||
|
||||
const DOC_EXTENSIONS = ["pdf", "jpg", "jpeg", "png"];
|
||||
|
||||
/** fileKey of the delegation letter attached to the Power of Attorney step. */
|
||||
export const POA_DELEGATION_FILE_KEY = "poa_delegation_letter";
|
||||
|
||||
/**
|
||||
* Seeded as optional: the delegation letter is only mandatory once a PoA has
|
||||
* been entered, or when the company operates as a freight forwarder. That rule
|
||||
* spans form fields as well as files, so it lives in the onboarding gate
|
||||
* (companies.service.getOnboardingRequirements) rather than in `isRequired`.
|
||||
*/
|
||||
const poaDelegationField = (displayOrder: number): OnboardingField => ({
|
||||
fileKey: POA_DELEGATION_FILE_KEY,
|
||||
fileLabel: "PoA Delegation Letter",
|
||||
helpText:
|
||||
"Signed letter in which the General Manager delegates the representative named above.",
|
||||
isRequired: false,
|
||||
isMultiple: false,
|
||||
maxFiles: 1,
|
||||
allowedExtensions: DOC_EXTENSIONS,
|
||||
maxSizeMb: 10,
|
||||
displayOrder,
|
||||
});
|
||||
|
||||
/** Documents required from an Ethiopian company at onboarding. */
|
||||
const ETHIOPIAN_ONBOARDING_FIELDS: OnboardingField[] = [
|
||||
{
|
||||
@@ -54,6 +76,7 @@ const ETHIOPIAN_ONBOARDING_FIELDS: OnboardingField[] = [
|
||||
maxSizeMb: 10,
|
||||
displayOrder: 3,
|
||||
},
|
||||
poaDelegationField(4),
|
||||
];
|
||||
|
||||
/** Documents required from a Foreign company at onboarding. */
|
||||
@@ -102,6 +125,7 @@ const FOREIGN_ONBOARDING_FIELDS: OnboardingField[] = [
|
||||
maxSizeMb: 10,
|
||||
displayOrder: 4,
|
||||
},
|
||||
poaDelegationField(5),
|
||||
];
|
||||
|
||||
/** Legacy combined set, kept for the older per-company-type codes. */
|
||||
|
||||
Reference in New Issue
Block a user