mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
19 lines
788 B
TypeScript
19 lines
788 B
TypeScript
/**
|
|
* The company document set a company resolves to — one of three, never a
|
|
* combination: a co-operative union or farm uploads its own papers INSTEAD of
|
|
* its nationality's (it holds no business licence), and is always Ethiopian.
|
|
*
|
|
* Mirrors `CompaniesService.documentSettingCodeFor` on the API; prefer the
|
|
* server-resolved `documentSettingCode` from onboarding requirements where one
|
|
* is available, and use this where only the company is at hand.
|
|
*/
|
|
export function documentSettingCode(
|
|
nationality: string | null | undefined,
|
|
cooperative?: boolean | null,
|
|
): string {
|
|
if (cooperative) return "company_onboarding_documents_cooperative";
|
|
return nationality === "foreign"
|
|
? "company_onboarding_documents_foreign"
|
|
: "company_onboarding_documents_ethiopian";
|
|
}
|