Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
| * is the key the screen prefills it from. Pages are added one at a time with their Auth step. | ||
| */ | ||
| const US: DynamicFormSchema = { | ||
| pages: [ |
There was a problem hiding this comment.
Note this is just an example, we will add the actual pages in individual PRs
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index 9443b7ef..4df9e53c 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -12052,5 +12052,18 @@ Hier ist ein *Testbeleg*, um dir zu zeigen, wie es funktioniert:`,
mobileRenewPrompt: 'Besuchen Sie Expensify in Ihrem Webbrowser, um vorzeitig zu verlängern.',
mobileClaimPrompt: 'Besuchen Sie Expensify in Ihrem Webbrowser, um Ihren Verlängerungsrabatt zu erhalten.',
},
+ wiseOnboarding: {
+ business: {
+ title: 'Geben Sie Ihre Unternehmensinformationen ein',
+ legalName: 'Rechtlicher Unternehmensname',
+ companyRole: 'Ihre Rolle im Unternehmen',
+ companyRoleOwner: 'Inhaber',
+ companyRoleDirector: 'Direktor',
+ companyRoleOther: 'Sonstiges',
+ industryCategories: 'Branche',
+ businessDescription: 'Unternehmensbeschreibung',
+ businessDescriptionHint: 'Beschreiben Sie kurz, was Ihr Unternehmen macht.',
+ },
+ },
};
export default translations;
diff --git a/src/languages/el.ts b/src/languages/el.ts
index 45c848e2..29045be7 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -12289,5 +12289,18 @@ ${reportName}`,
mobileRenewPrompt: 'Επισκεφθείτε το Expensify στον περιηγητή ιστού σας για να ανανεώσετε νωρίτερα.',
mobileClaimPrompt: 'Επισκεφθείτε το Expensify στον φυλλομετρητή σας για να διεκδικήσετε την έκπτωση ανανέωσης.',
},
+ wiseOnboarding: {
+ business: {
+ title: 'Εισαγάγετε τα στοιχεία της επιχείρησής σας',
+ legalName: 'Νόμιμη επωνυμία επιχείρησης',
+ companyRole: 'Ο ρόλος σας στην εταιρεία',
+ companyRoleOwner: 'Ιδιοκτήτης',
+ companyRoleDirector: 'Διευθυντής',
+ companyRoleOther: 'Άλλο',
+ industryCategories: 'Κλάδος',
+ businessDescription: 'Περιγραφή επιχείρησης',
+ businessDescriptionHint: 'Περιγράψτε σύντομα με τι ασχολείται η εταιρεία σας.',
+ },
+ },
};
export default translations;
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 6a5faeed..8b568575 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -769,9 +769,9 @@ const translations: TranslationDeepObject<typeof en> = {
},
wiseOnboarding: {
business: {
- title: 'Introduce los datos de tu empresa',
+ title: 'Introduce la información de tu empresa',
legalName: 'Nombre legal de la empresa',
- companyRole: 'Tu cargo en la empresa',
+ companyRole: 'Tu puesto en la empresa',
companyRoleOwner: 'Propietario',
companyRoleDirector: 'Director',
companyRoleOther: 'Otro',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 1397788a..fda29965 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -12080,5 +12080,18 @@ Voici un *reçu test* pour vous montrer comment ça fonctionne :`,
mobileRenewPrompt: 'Visitez Expensify dans votre navigateur web pour renouveler en avance.',
mobileClaimPrompt: 'Visitez Expensify dans votre navigateur web pour bénéficier de votre réduction de renouvellement.',
},
+ wiseOnboarding: {
+ business: {
+ title: 'Saisissez les informations de votre entreprise',
+ legalName: 'Raison sociale officielle',
+ companyRole: 'Votre rôle dans l’entreprise',
+ companyRoleOwner: 'Responsable',
+ companyRoleDirector: 'Directeur',
+ companyRoleOther: 'Autre',
+ industryCategories: 'Secteur d’activité',
+ businessDescription: 'Description de l’activité',
+ businessDescriptionHint: 'Décrivez brièvement ce que fait votre entreprise.',
+ },
+ },
};
export default translations;
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 9b5a9461..361e1283 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -12004,5 +12004,18 @@ Ecco una *ricevuta di prova* per mostrarti come funziona:`,
mobileRenewPrompt: 'Visita Expensify nel browser web per rinnovare in anticipo.',
mobileClaimPrompt: 'Visita Expensify nel tuo browser web per richiedere lo sconto di rinnovo.',
},
+ wiseOnboarding: {
+ business: {
+ title: 'Inserisci i dati della tua azienda',
+ legalName: 'Ragione sociale',
+ companyRole: 'Il tuo ruolo in azienda',
+ companyRoleOwner: 'Proprietario',
+ companyRoleDirector: 'Direttore',
+ companyRoleOther: 'Altro',
+ industryCategories: 'Settore',
+ businessDescription: 'Descrizione dell’attività',
+ businessDescriptionHint: 'Descrivi brevemente cosa fa la tua azienda.',
+ },
+ },
};
export default translations;
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index d4b6395a..a6fd2cef 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -11830,5 +11830,18 @@ ${reportName}`,
mobileRenewPrompt: '早期に更新するには、ウェブブラウザで Expensify にアクセスしてください。',
mobileClaimPrompt: '更新割引を受け取るには、Web ブラウザで Expensify にアクセスしてください。',
},
+ wiseOnboarding: {
+ business: {
+ title: 'ビジネス情報を入力してください',
+ legalName: '法人名',
+ companyRole: '会社でのあなたの役割',
+ companyRoleOwner: 'オーナー',
+ companyRoleDirector: 'ディレクター',
+ companyRoleOther: 'その他',
+ industryCategories: '業種',
+ businessDescription: '事業内容',
+ businessDescriptionHint: '御社の事業内容を簡潔に説明してください。',
+ },
+ },
};
export default translations;
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 4fd00237..6ae9cc30 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -11964,5 +11964,18 @@ Hier is een *proefbon* om je te laten zien hoe het werkt:`,
mobileRenewPrompt: 'Bezoek Expensify in je webbrowser om vroegtijdig te verlengen.',
mobileClaimPrompt: 'Bezoek Expensify in je webbrowser om je verlengingskorting te claimen.',
},
+ wiseOnboarding: {
+ business: {
+ title: 'Voer je bedrijfsgegevens in',
+ legalName: 'Juridische bedrijfsnaam',
+ companyRole: 'Je rol binnen het bedrijf',
+ companyRoleOwner: 'Eigenaar',
+ companyRoleDirector: 'Directeur',
+ companyRoleOther: 'Overig',
+ industryCategories: 'Branche',
+ businessDescription: 'Bedrijfsomschrijving',
+ businessDescriptionHint: 'Beschrijf kort wat je bedrijf doet.',
+ },
+ },
};
export default translations;
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 829cfa26..26ffdfff 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -11983,5 +11983,18 @@ Oto *paragon testowy*, żeby pokazać Ci, jak to działa:`,
mobileRenewPrompt: 'Odwiedź Expensify w przeglądarce internetowej, żeby odnowić wcześniej.',
mobileClaimPrompt: 'Odwiedź Expensify w swojej przeglądarce internetowej, aby odebrać zniżkę na odnowienie.',
},
+ wiseOnboarding: {
+ business: {
+ title: 'Wpisz dane swojej firmy',
+ legalName: 'Prawna nazwa firmy',
+ companyRole: 'Twoja rola w firmie',
+ companyRoleOwner: 'Właściciel',
+ companyRoleDirector: 'Dyrektor',
+ companyRoleOther: 'Inne',
+ industryCategories: 'Branża',
+ businessDescription: 'Opis działalności',
+ businessDescriptionHint: 'Krótko opisz, czym zajmuje się twoja firma.',
+ },
+ },
};
export default translations;
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index c48f53b8..2b2c2976 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -11956,5 +11956,18 @@ Aqui está um *comprovante de teste* para mostrar como funciona:`,
mobileRenewPrompt: 'Visite o Expensify no seu navegador para renovar antecipadamente.',
mobileClaimPrompt: 'Visite o Expensify no seu navegador para resgatar seu desconto de renovação.',
},
+ wiseOnboarding: {
+ business: {
+ title: 'Insira as informações da sua empresa',
+ legalName: 'Nome comercial registrado',
+ companyRole: 'Seu cargo na empresa',
+ companyRoleOwner: 'Proprietário',
+ companyRoleDirector: 'Diretor',
+ companyRoleOther: 'Outro',
+ industryCategories: 'Setor',
+ businessDescription: 'Descrição da empresa',
+ businessDescriptionHint: 'Descreva brevemente o que a sua empresa faz.',
+ },
+ },
};
export default translations;
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 80c14fa5..c0445dab 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -11520,5 +11520,18 @@ ${reportName}`,
mobileRenewPrompt: '请在网页浏览器中访问 Expensify 以提前续订。',
mobileClaimPrompt: '请在网页浏览器中访问 Expensify 以领取您的续订折扣。',
},
+ wiseOnboarding: {
+ business: {
+ title: '输入您的企业信息',
+ legalName: '法定企业名称',
+ companyRole: '您在公司的职位',
+ companyRoleOwner: '所有者',
+ companyRoleDirector: '主管',
+ companyRoleOther: '其他',
+ industryCategories: '行业',
+ businessDescription: '业务描述',
+ businessDescriptionHint: '请简要描述贵公司的业务。',
+ },
+ },
};
export default translations;
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
The full SSN stays on the server, encrypted and stripped like Corpay's owner SSNs. The client receives the last four for the confirmation page and the no-SSN choice that routes the representative to Wise's hosted ID check.
requirements and documents hold what Submit forwards from the EDD and representative pages. The embedded link carries isLoading and errors so the page can show a request in flight and a failed one.
Wise takes files as an unnamed array, so our record is the only thing that says which upload answers which field. Keying documents by requirement and then by field lets a second device show the right row as uploaded, a resubmit replace one side, and Auth order the parts in schema order. requirements takes the same generic shape.
The member shows the shape to add when a native page starts collecting a requirement; the index signature keeps the rest open.
sourceOfWealthList takes Wise's six values, kept in CONST.WISE like companyRole, so the EDD page's options and the stored answers share one source.
…the server The EDD pages are authored by Auth and arrive as wiseKYCRequirements after the business page save, so the trigger list and the document mapping never reach the App. The form file keeps profile pages only, and the source-of-wealth enum goes with the page that would have used it.
Auth saves a requirement page's answers keyed by the page's field names and shapes them into Wise's payload at Submit, so the stored object is what the page prefills from.
…buckets The embedded link's URL fragment carries a token, so its Onyx key joins ramOnlyKeys under the RAM_ONLY name the Plaid and Merge link tokens use, and the state export drops it. The requirements key is masked like the Corpay fields.
The Auth proof page asks the source again so its document picker can depend on it within one form, so the requirement carries sourceOfWealthType. The onboarding form map imports Country from CONST instead of redeclaring it.
…from a registry The server lists the requirement types the intake should collect before Submit, so Wise does not have to ask for them after, and the same list carries Wise's live review once it opens; requestedBy says which. The App holds one layout per requirement type and composes the intake from its profile pages plus the pre-collected ones, so the trigger never leaves Auth. The two source-of-wealth pages are keyed by Wise's requirement type with Wise's field names, so their answers save under requirements and Submit forwards them.
Release 2's form comes from Wise's recipient API as fields, so the server translates them and the App paginates them. Typing the key now settles the third of the three form kinds alongside the App-owned profile pages and the KYC layout registry.
| /** The flat field list, in Wise's order; the App groups it into pages */ | ||
| fields: DynamicFormField[]; |
There was a problem hiding this comment.
Pass through example:
Wise sends
{"key": "sortCode", "name": "Sort code", "type": "text", "required": true, "minLength": 6, "maxLength": 6, "validationRegexp": "^\d{6}$", "refreshRequirementsOnChange": false}
and Auth writes it to wiseBankAccountFields as this:
{"key": "sortCode", "label": "Sort code", "type": "text", "required": true, "minLength": 6, "maxLength": 6, "regex": "^\d{6}$", "refreshOnChange": false}
|
Closing as this was a test |
This PR is a worked example, not a feature. It adds the Onyx types for Wise onboarding and then uses them once, end to end, so you can see how the pieces fit: a business page we wrote ourselves, two source-of-wealth pages we collect up front so Wise does not have to ask for them after we submit, a small registry that says "for this Wise requirement type, show this page", and the function that puts the pages in order. Nothing is wired to a screen. The point is to agree on the shapes before anyone builds the real pages on top of them.
Explanation of Change
The Onyx types and form definitions for Wise onboarding, settling how every Wise form is defined, rendered and stored before the screens are built. No screen uses them yet.
One renderer,
DynamicFormFlow, draws every form from aDynamicFormSchema: either{pages}or a flat{fields}list it paginates. What differs is where the schema comes from, and that follows one rule: the schema lives with whoever defines the fields.Wise/forms/US.ts, one file per countryachData.wiseWise/kycRequirementLayouts.ts, one layout per keywiseKYCRequirements; answers underachData.wise.requirements.<key>, files under.documents.<key>.<field>DynamicFormField[]wiseBankAccountFields, never storedwiseKYCRequirementsis one list with two sources. Each entry is{key, state, hostedOnly, requestedBy, attributes?}. Before Submit the server lists the requirements the intake should collect so Wise does not have to ask for them afterwards (requestedBy: EXPENSIFY); the business page save returns the list in the same response, so the two source-of-wealth pages appear from one click. After Submit the list is Wise's live review (requestedBy: WISE) and drives the "more info" tasks. A key with no layout, or markedhostedOnly, opens Wise's embedded page.attributespasses through Wise's own data for a requirement, such asrequiredUbos; nothing reads it yet.A page that collects a requirement is keyed by it. Its field keys are Wise's field names, so saving under
requirements.<key>is mechanical and Submit shapes the stored answers into Wise's payload. The proof page asks the source again so it stands alone when Wise raises it after Submit.What the App never holds. The enhanced due diligence trigger, which lives in Auth and arrives only as the list above. The full SSN, which is encrypted server-side; the client gets
ssnLast4andnoSSN. Which documents Wise accepts for which source: the proof page lists Wise's document types unnarrowed until Wise confirms the mapping can ship.WiseBusinessOnboardingonachData.wise: status, currency, step, business, representative, requirements, documentsbankAccountListitems getwise.statusandglobalReimbursementProviderRAM_ONLY_WISE_KYC_REVIEW_EMBEDDED_LINKfor the embedded link, whose fragment carries a tokenCONST.WISE: requirement types, sources, document types, roles, categories, statusesFixed Issues
For https://github.com/Expensify/Expensify/issues/692493
Tests
npm run test -- tests/unit/pages/settings/Wallet/EnableGlobalReimbursements/WiseOnboardingFormTest.ts.npm run typecheck.Offline tests
None. No screen uses the form yet.
QA Steps
None. No user-facing change.
PR Author Checklist
Expand
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Screenshots/Videos
Android: Native
N/A, no user-facing change
Android: mWeb Chrome
N/A, no user-facing change
iOS: Native
N/A, no user-facing change
iOS: mWeb Safari
N/A, no user-facing change
MacOS: Chrome / Safari
N/A, no user-facing change
MacOS: Desktop
N/A, no user-facing change