fix: an issue

This commit is contained in:
Nathnael
2026-08-12 07:11:27 +00:00
parent a603807e8e
commit d4767e0d06
16 changed files with 206 additions and 177 deletions

View File

@@ -0,0 +1,18 @@
/**
* 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";
}