diff --git a/assets/images/simple-illustrations/simple-illustration__pillow.svg b/assets/images/simple-illustrations/simple-illustration__pillow.svg
new file mode 100644
index 000000000000..97a0811266ae
--- /dev/null
+++ b/assets/images/simple-illustrations/simple-illustration__pillow.svg
@@ -0,0 +1,28 @@
+
diff --git a/src/CONST.ts b/src/CONST.ts
index 7c8a6791d65b..c32248e6dcf3 100755
--- a/src/CONST.ts
+++ b/src/CONST.ts
@@ -621,6 +621,14 @@ const CONST = {
},
STEP_NAMES: ['1', '2', '3', '4', '5', '6'],
STEP_HEADER_HEIGHT: 40,
+ SIGNER_INFO_STEP: {
+ SUBSTEP: {
+ IS_DIRECTOR: 1,
+ ENTER_EMAIL: 2,
+ SIGNER_DETAILS_FORM: 3,
+ HANG_TIGHT: 4,
+ },
+ },
},
INCORPORATION_TYPES: {
LLC: 'LLC',
diff --git a/src/components/Icon/Illustrations.ts b/src/components/Icon/Illustrations.ts
index 6b625f312709..0068fd30ed60 100644
--- a/src/components/Icon/Illustrations.ts
+++ b/src/components/Icon/Illustrations.ts
@@ -114,6 +114,7 @@ import PalmTree from '@assets/images/simple-illustrations/simple-illustration__p
import Pencil from '@assets/images/simple-illustrations/simple-illustration__pencil.svg';
import PerDiem from '@assets/images/simple-illustrations/simple-illustration__perdiem.svg';
import PiggyBank from '@assets/images/simple-illustrations/simple-illustration__piggybank.svg';
+import Pillow from '@assets/images/simple-illustrations/simple-illustration__pillow.svg';
import Profile from '@assets/images/simple-illustrations/simple-illustration__profile.svg';
import QRCode from '@assets/images/simple-illustrations/simple-illustration__qr-code.svg';
import ReceiptEnvelope from '@assets/images/simple-illustrations/simple-illustration__receipt-envelope.svg';
@@ -234,6 +235,7 @@ export {
ExpensifyCardIllustration,
SplitBill,
PiggyBank,
+ Pillow,
Accounting,
Car,
Coins,
diff --git a/src/components/RadioButton.tsx b/src/components/RadioButton.tsx
index 0bf7e370e480..1ee885681700 100644
--- a/src/components/RadioButton.tsx
+++ b/src/components/RadioButton.tsx
@@ -41,8 +41,8 @@ function RadioButton({isChecked, onPress, accessibilityLabel, hasError = false,
)}
diff --git a/src/components/SubStepForms/DateOfBirthStep.tsx b/src/components/SubStepForms/DateOfBirthStep.tsx
index 42077cef2ba1..934a50581f30 100644
--- a/src/components/SubStepForms/DateOfBirthStep.tsx
+++ b/src/components/SubStepForms/DateOfBirthStep.tsx
@@ -9,7 +9,6 @@ import useLocalize from '@hooks/useLocalize';
import type {SubStepProps} from '@hooks/useSubStep/types';
import useThemeStyles from '@hooks/useThemeStyles';
import * as ValidationUtils from '@libs/ValidationUtils';
-import HelpLinks from '@pages/ReimbursementAccount/PersonalInfo/HelpLinks';
import CONST from '@src/CONST';
import type {OnyxFormValuesMapping} from '@src/ONYXKEYS';
@@ -35,8 +34,8 @@ type DateOfBirthStepProps = SubStep
/** The default value for the date of birth input */
dobDefaultValue: string;
- /** Whether the component should show help links */
- shouldShowHelpLinks?: boolean;
+ /** Optional footer component */
+ footerComponent?: React.ReactNode;
};
function DateOfBirthStep({
@@ -48,7 +47,7 @@ function DateOfBirthStep({
dobInputID,
dobDefaultValue,
isEditing,
- shouldShowHelpLinks = true,
+ footerComponent,
}: DateOfBirthStepProps) {
const {translate} = useLocalize();
const styles = useThemeStyles();
@@ -96,7 +95,7 @@ function DateOfBirthStep({
maxDate={maxDate}
shouldSaveDraft={!isEditing}
/>
- {shouldShowHelpLinks && }
+ {footerComponent}
);
}
diff --git a/src/components/SubStepForms/SingleFieldStep.tsx b/src/components/SubStepForms/SingleFieldStep.tsx
index 7ab709e3d5c1..be9b3c033f96 100644
--- a/src/components/SubStepForms/SingleFieldStep.tsx
+++ b/src/components/SubStepForms/SingleFieldStep.tsx
@@ -75,7 +75,7 @@ function SingleFieldStep({
submitButtonStyles={[styles.mb0]}
>
- {formTitle}
+ {formTitle}
{!!formDisclaimer && {formDisclaimer}}
({
defaultValue={defaultValue}
maxLength={maxLength}
shouldSaveDraft={!isEditing}
+ autoFocus
/>
{shouldShowHelpLinks && }
diff --git a/src/components/SubStepForms/YesNoStep.tsx b/src/components/SubStepForms/YesNoStep.tsx
new file mode 100644
index 000000000000..8e1f26e30011
--- /dev/null
+++ b/src/components/SubStepForms/YesNoStep.tsx
@@ -0,0 +1,73 @@
+import React, {useMemo, useState} from 'react';
+import type {StyleProp, ViewStyle} from 'react-native';
+import FormProvider from '@components/Form/FormProvider';
+import type {Choice} from '@components/RadioButtons';
+import RadioButtons from '@components/RadioButtons';
+import Text from '@components/Text';
+import useLocalize from '@hooks/useLocalize';
+import useThemeStyles from '@hooks/useThemeStyles';
+import ONYXKEYS from '@src/ONYXKEYS';
+
+type YesNoStepProps = {
+ /** The title of the question */
+ title: string;
+
+ /** The description of the question */
+ description: string;
+
+ /** The default value of the radio button */
+ defaultValue: boolean;
+
+ /** Callback when the value is selected */
+ onSelectedValue: (value: boolean) => void;
+
+ /** The style of the submit button */
+ submitButtonStyles?: StyleProp;
+};
+
+function YesNoStep({title, description, defaultValue, onSelectedValue, submitButtonStyles}: YesNoStepProps) {
+ const {translate} = useLocalize();
+ const styles = useThemeStyles();
+ const [value, setValue] = useState(defaultValue);
+
+ const handleSubmit = () => {
+ onSelectedValue(value);
+ };
+ const handleSelectValue = (newValue: string) => setValue(newValue === 'true');
+ const options = useMemo(
+ () => [
+ {
+ label: translate('common.yes'),
+ value: 'true',
+ },
+ {
+ label: translate('common.no'),
+ value: 'false',
+ },
+ ],
+ [translate],
+ );
+
+ return (
+
+ {title}
+ {description}
+
+
+ );
+}
+
+YesNoStep.displayName = 'YesNoStep';
+
+export default YesNoStep;
diff --git a/src/languages/en.ts b/src/languages/en.ts
index 910d4397d0a0..1a703f1bea1b 100755
--- a/src/languages/en.ts
+++ b/src/languages/en.ts
@@ -41,6 +41,7 @@ import type {
CharacterLimitParams,
CompanyCardBankName,
CompanyCardFeedNameParams,
+ CompanyNameParams,
ConfirmThatParams,
ConnectionNameParams,
ConnectionParams,
@@ -1929,6 +1930,7 @@ const translations = {
website: 'Please enter a valid website.',
zipCode: `Please enter a valid ZIP code using the format: ${CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}.`,
phoneNumber: 'Please enter a valid phone number.',
+ email: 'Please enter a valid email address.',
companyName: 'Please enter a valid business name.',
addressCity: 'Please enter a valid city.',
addressStreet: 'Please enter a valid street address.',
@@ -1950,6 +1952,7 @@ const translations = {
lastName: 'Please enter a valid last name.',
noDefaultDepositAccountOrDebitCardAvailable: 'Please add a default deposit account or debit card.',
validationAmounts: 'The validation amounts you entered are incorrect. Please double check your bank statement and try again.',
+ fullName: 'Please enter a valid full name.',
},
},
addPersonalBankAccountPage: {
@@ -2303,6 +2306,26 @@ const translations = {
},
signerInfoStep: {
signerInfo: 'Signer info',
+ areYouDirector: ({companyName}: CompanyNameParams) => `Are you a director or senior officer at ${companyName}?`,
+ regulationRequiresUs: 'Regulation requires us to verify if the signer has the authority to take this action on behalf of the business.',
+ whatsYourName: "What's your legal name",
+ fullName: 'Legal full name',
+ whatsYourJobTitle: "What's your job title?",
+ jobTitle: 'Job title',
+ whatsYourDOB: "What's your date of birth?",
+ uploadID: 'Upload ID and proof of address',
+ id: "ID (driver's license or passport)",
+ personalAddress: 'Proof of personal address (e.g. utility bill)',
+ letsDoubleCheck: 'Let’s double check that everything looks right.',
+ legalName: 'Legal name',
+ proofOf: 'Proof of personal address',
+ enterOneEmail: 'Enter the email of director or senior officer at',
+ regulationRequiresOneMoreDirector: 'Regulation requires one more director or senior officer as a signer.',
+ hangTight: 'Hang tight...',
+ enterTwoEmails: 'Enter the emails of two directors or senior officers at',
+ sendReminder: 'Send a reminder',
+ chooseFile: 'Choose file',
+ weAreWaiting: "We're waiting for others to verify their identities as directors or senior officers of the business.",
},
agreementsStep: {
agreements: 'Agreements',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 0944c3c638a1..2bb66cec6548 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -40,6 +40,7 @@ import type {
CharacterLimitParams,
CompanyCardBankName,
CompanyCardFeedNameParams,
+ CompanyNameParams,
ConfirmThatParams,
ConnectionNameParams,
ConnectionParams,
@@ -1950,6 +1951,7 @@ const translations = {
website: 'Por favor, introduce un sitio web válido.',
zipCode: `Formato de código postal incorrecto. Formato aceptable: ${CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}.`,
phoneNumber: 'Por favor, introduce un teléfono válido.',
+ email: 'Por favor, introduce una dirección de correo electrónico válida.',
companyName: 'Por favor, introduce un nombre comercial legal válido.',
addressCity: 'Por favor, introduce una ciudad válida.',
addressStreet: 'Por favor, introduce una dirección válida que no sea un apartado postal.',
@@ -1972,6 +1974,7 @@ const translations = {
lastName: 'Por favor, introduce los apellidos.',
noDefaultDepositAccountOrDebitCardAvailable: 'Por favor, añade una cuenta bancaria para depósitos o una tarjeta de débito.',
validationAmounts: 'Los importes de validación que introduciste son incorrectos. Por favor, comprueba tu cuenta bancaria e inténtalo de nuevo.',
+ fullName: 'Please enter a valid full name.',
},
},
addPersonalBankAccountPage: {
@@ -2328,6 +2331,26 @@ const translations = {
},
signerInfoStep: {
signerInfo: 'Información del firmante',
+ areYouDirector: ({companyName}: CompanyNameParams) => `¿Es usted director o alto funcionario de ${companyName}?`,
+ regulationRequiresUs: 'La regulación requiere que verifiquemos si el firmante tiene la autoridad para realizar esta acción en nombre de la empresa.',
+ whatsYourName: '¿Cuál es tu nombre legal?',
+ fullName: 'Nombre legal completo',
+ whatsYourJobTitle: '¿Cuál es tu puesto de trabajo?',
+ jobTitle: 'Título profesional',
+ whatsYourDOB: '¿Cual es tu fecha de nacimiento?',
+ uploadID: 'Subir documento de identidad y prueba de domicilio',
+ id: 'Identificación (licencia de conducir o pasaporte)',
+ personalAddress: 'Prueba de domicilio personal (por ejemplo, factura de servicios públicos)',
+ letsDoubleCheck: 'Vamos a comprobar que todo está bien.',
+ legalName: 'Nombre legal',
+ proofOf: 'Comprobante de domicilio personal',
+ enterOneEmail: 'Introduce el correo electrónico del director o alto funcionario en',
+ regulationRequiresOneMoreDirector: 'El reglamento exige que haya otro director o funcionario superior como firmante.',
+ hangTight: 'Espera un momento...',
+ enterTwoEmails: 'Introduce los correos electrónicos de dos directores o altos funcionarios en',
+ sendReminder: 'Enviar un recordatorio',
+ chooseFile: 'Seleccionar archivo',
+ weAreWaiting: 'Estamos esperando que otros verifiquen sus identidades como directores o altos funcionarios de la empresa.',
},
agreementsStep: {
agreements: 'Acuerdos',
diff --git a/src/languages/params.ts b/src/languages/params.ts
index 7574fe96bd60..87a322775cca 100644
--- a/src/languages/params.ts
+++ b/src/languages/params.ts
@@ -555,6 +555,10 @@ type CurrencyCodeParams = {
currencyCode: string;
};
+type CompanyNameParams = {
+ companyName: string;
+};
+
export type {
AuthenticationErrorParams,
ImportMembersSuccessfullDescriptionParams,
@@ -756,4 +760,5 @@ export type {
AssignCardParams,
ImportedTypesParams,
CurrencyCodeParams,
+ CompanyNameParams,
};
diff --git a/src/pages/MissingPersonalDetails/substeps/DateOfBirth.tsx b/src/pages/MissingPersonalDetails/substeps/DateOfBirth.tsx
index f00fb912cce5..84788d0458d0 100644
--- a/src/pages/MissingPersonalDetails/substeps/DateOfBirth.tsx
+++ b/src/pages/MissingPersonalDetails/substeps/DateOfBirth.tsx
@@ -28,7 +28,6 @@ function DateOfBirth({isEditing, onNext, onMove, personalDetailsValues}: CustomS
stepFields={STEP_FIELDS}
dobInputID={INPUT_IDS.DATE_OF_BIRTH}
dobDefaultValue={personalDetailsValues[INPUT_IDS.DATE_OF_BIRTH]}
- shouldShowHelpLinks={false}
/>
);
}
diff --git a/src/pages/ReimbursementAccount/BeneficialOwnerInfo/substeps/BeneficialOwnerCheckUBO.tsx b/src/pages/ReimbursementAccount/BeneficialOwnerInfo/substeps/BeneficialOwnerCheckUBO.tsx
index 438551cf4044..478642416e30 100644
--- a/src/pages/ReimbursementAccount/BeneficialOwnerInfo/substeps/BeneficialOwnerCheckUBO.tsx
+++ b/src/pages/ReimbursementAccount/BeneficialOwnerInfo/substeps/BeneficialOwnerCheckUBO.tsx
@@ -1,11 +1,7 @@
-import React, {useMemo, useState} from 'react';
-import FormProvider from '@components/Form/FormProvider';
-import type {Choice} from '@components/RadioButtons';
-import RadioButtons from '@components/RadioButtons';
-import Text from '@components/Text';
+import React from 'react';
+import YesNoStep from '@components/SubStepForms/YesNoStep';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
-import ONYXKEYS from '@src/ONYXKEYS';
type BeneficialOwnerCheckUBOProps = {
/** The title of the question */
@@ -21,43 +17,15 @@ type BeneficialOwnerCheckUBOProps = {
function BeneficialOwnerCheckUBO({title, onSelectedValue, defaultValue}: BeneficialOwnerCheckUBOProps) {
const {translate} = useLocalize();
const styles = useThemeStyles();
- const [value, setValue] = useState(defaultValue);
-
- const handleSubmit = () => {
- onSelectedValue(value);
- };
- const handleSelectUBOValue = (newValue: string) => setValue(newValue === 'true');
- const options = useMemo(
- () => [
- {
- label: translate('common.yes'),
- value: 'true',
- },
- {
- label: translate('common.no'),
- value: 'false',
- },
- ],
- [translate],
- );
return (
-
- {title}
- {translate('beneficialOwnerInfoStep.regulationRequiresUsToVerifyTheIdentity')}
-
-
+ />
);
}
diff --git a/src/pages/ReimbursementAccount/BeneficialOwnerInfo/substeps/BeneficialOwnerDetailsFormSubsteps/DateOfBirthUBO.tsx b/src/pages/ReimbursementAccount/BeneficialOwnerInfo/substeps/BeneficialOwnerDetailsFormSubsteps/DateOfBirthUBO.tsx
index c2cd95784596..8cd94653909a 100644
--- a/src/pages/ReimbursementAccount/BeneficialOwnerInfo/substeps/BeneficialOwnerDetailsFormSubsteps/DateOfBirthUBO.tsx
+++ b/src/pages/ReimbursementAccount/BeneficialOwnerInfo/substeps/BeneficialOwnerDetailsFormSubsteps/DateOfBirthUBO.tsx
@@ -37,7 +37,6 @@ function DateOfBirthUBO({onNext, onMove, isEditing, beneficialOwnerBeingModified
stepFields={[dobInputID]}
dobInputID={dobInputID}
dobDefaultValue={dobDefaultValue}
- shouldShowHelpLinks={false}
/>
);
}
diff --git a/src/pages/ReimbursementAccount/NonUSD/SignerInfo/DirectorCheck.tsx b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/DirectorCheck.tsx
new file mode 100644
index 000000000000..7535f72a3970
--- /dev/null
+++ b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/DirectorCheck.tsx
@@ -0,0 +1,31 @@
+import React from 'react';
+import YesNoStep from '@components/SubStepForms/YesNoStep';
+import useLocalize from '@hooks/useLocalize';
+
+type DirectorCheckProps = {
+ /** The title of the question */
+ title: string;
+
+ /** The default value of the radio button */
+ defaultValue: boolean;
+
+ /** Callback when the value is selected */
+ onSelectedValue: (value: boolean) => void;
+};
+
+function DirectorCheck({title, onSelectedValue, defaultValue}: DirectorCheckProps) {
+ const {translate} = useLocalize();
+
+ return (
+
+ );
+}
+
+DirectorCheck.displayName = 'DirectorCheck';
+
+export default DirectorCheck;
diff --git a/src/pages/ReimbursementAccount/NonUSD/SignerInfo/EnterEmail.tsx b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/EnterEmail.tsx
new file mode 100644
index 000000000000..5d0de4eb7fd9
--- /dev/null
+++ b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/EnterEmail.tsx
@@ -0,0 +1,85 @@
+import {Str} from 'expensify-common';
+import React, {useCallback} from 'react';
+import {useOnyx} from 'react-native-onyx';
+import FormProvider from '@components/Form/FormProvider';
+import InputWrapper from '@components/Form/InputWrapper';
+import type {FormInputErrors, FormOnyxValues} from '@components/Form/types';
+import Text from '@components/Text';
+import TextInput from '@components/TextInput';
+import useLocalize from '@hooks/useLocalize';
+import useThemeStyles from '@hooks/useThemeStyles';
+import * as ValidationUtils from '@libs/ValidationUtils';
+import CONST from '@src/CONST';
+import ONYXKEYS from '@src/ONYXKEYS';
+import INPUT_IDS from '@src/types/form/ReimbursementAccountForm';
+
+type EnterEmailProps = {
+ /** Callback when the form is submitted */
+ onSubmit: () => void;
+
+ /** Whether the user is a director */
+ isUserDirector: boolean;
+};
+
+const {SIGNER_EMAIL, SECOND_SIGNER_EMAIL} = INPUT_IDS.ADDITIONAL_DATA.CORPAY;
+
+function EnterEmail({onSubmit, isUserDirector}: EnterEmailProps) {
+ const {translate} = useLocalize();
+ const styles = useThemeStyles();
+
+ const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);
+ const policyID = reimbursementAccount?.achData?.policyID ?? '-1';
+ const [policy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`);
+ const currency = policy?.outputCurrency ?? '';
+ const shouldGatherBothEmails = currency === CONST.CURRENCY.AUD && !isUserDirector;
+
+ const validate = useCallback(
+ (values: FormOnyxValues): FormInputErrors => {
+ const errors = ValidationUtils.getFieldRequiredErrors(values, shouldGatherBothEmails ? [SIGNER_EMAIL, SECOND_SIGNER_EMAIL] : [SIGNER_EMAIL]);
+ if (values[SIGNER_EMAIL] && !Str.isValidEmail(values[SIGNER_EMAIL])) {
+ errors[SIGNER_EMAIL] = translate('bankAccount.error.email');
+ }
+
+ if (shouldGatherBothEmails && values[SECOND_SIGNER_EMAIL] && !Str.isValidEmail(values[SECOND_SIGNER_EMAIL])) {
+ errors[SECOND_SIGNER_EMAIL] = translate('bankAccount.error.email');
+ }
+
+ return errors;
+ },
+ [shouldGatherBothEmails, translate],
+ );
+
+ return (
+
+ {translate(shouldGatherBothEmails ? 'signerInfoStep.enterTwoEmails' : 'signerInfoStep.enterOneEmail')}
+
+ {shouldGatherBothEmails && (
+
+ )}
+
+ );
+}
+
+EnterEmail.displayName = 'EnterEmail';
+
+export default EnterEmail;
diff --git a/src/pages/ReimbursementAccount/NonUSD/SignerInfo/HangTight.tsx b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/HangTight.tsx
new file mode 100644
index 000000000000..15fea5e46691
--- /dev/null
+++ b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/HangTight.tsx
@@ -0,0 +1,58 @@
+import React from 'react';
+import {View} from 'react-native';
+import Button from '@components/Button';
+import Icon from '@components/Icon';
+import * as Expensicons from '@components/Icon/Expensicons';
+import * as Illustrations from '@components/Icon/Illustrations';
+import SafeAreaConsumer from '@components/SafeAreaConsumer';
+import ScrollView from '@components/ScrollView';
+import Text from '@components/Text';
+import useLocalize from '@hooks/useLocalize';
+import useThemeStyles from '@hooks/useThemeStyles';
+
+function HangTight({tempSubmit}: {tempSubmit: () => void}) {
+ const {translate} = useLocalize();
+ const styles = useThemeStyles();
+
+ const handleSendReminder = () => {
+ // TODO remove that
+ tempSubmit();
+ };
+
+ return (
+
+ {({safeAreaPaddingBottomStyle}) => (
+
+
+
+
+
+ {translate('signerInfoStep.hangTight')}
+ {translate('signerInfoStep.weAreWaiting')}
+
+
+
+
+
+ )}
+
+ );
+}
+
+HangTight.displayName = 'HangTight';
+
+export default HangTight;
diff --git a/src/pages/ReimbursementAccount/NonUSD/SignerInfo/SignerInfo.tsx b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/SignerInfo.tsx
deleted file mode 100644
index 8e794f1f2f38..000000000000
--- a/src/pages/ReimbursementAccount/NonUSD/SignerInfo/SignerInfo.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-import React from 'react';
-import {View} from 'react-native';
-import Button from '@components/Button';
-import InteractiveStepWrapper from '@components/InteractiveStepWrapper';
-import useLocalize from '@hooks/useLocalize';
-import useThemeStyles from '@hooks/useThemeStyles';
-import CONST from '@src/CONST';
-
-type SignerInfoProps = {
- /** Handles back button press */
- onBackButtonPress: () => void;
-
- /** Handles submit button press */
- onSubmit: () => void;
-};
-
-function SignerInfo({onBackButtonPress, onSubmit}: SignerInfoProps) {
- const {translate} = useLocalize();
- const styles = useThemeStyles();
-
- return (
-
-
-
-
-
- );
-}
-
-SignerInfo.displayName = 'SignerInfo';
-
-export default SignerInfo;
diff --git a/src/pages/ReimbursementAccount/NonUSD/SignerInfo/index.tsx b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/index.tsx
new file mode 100644
index 000000000000..363e444c5641
--- /dev/null
+++ b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/index.tsx
@@ -0,0 +1,152 @@
+import type {ComponentType} from 'react';
+import React, {useState} from 'react';
+import {useOnyx} from 'react-native-onyx';
+import InteractiveStepWrapper from '@components/InteractiveStepWrapper';
+import useLocalize from '@hooks/useLocalize';
+import useSubStep from '@hooks/useSubStep';
+import type {SubStepProps} from '@hooks/useSubStep/types';
+import Navigation from '@navigation/Navigation';
+import CONST from '@src/CONST';
+import ONYXKEYS from '@src/ONYXKEYS';
+import INPUT_IDS from '@src/types/form/ReimbursementAccountForm';
+import DirectorCheck from './DirectorCheck';
+import EnterEmail from './EnterEmail';
+import HangTight from './HangTight';
+import Confirmation from './substeps/Confirmation';
+import DateOfBirth from './substeps/DateOfBirth';
+import JobTitle from './substeps/JobTitle';
+import Name from './substeps/Name';
+import UploadDocuments from './substeps/UploadDocuments';
+
+type SignerInfoProps = {
+ /** Handles back button press */
+ onBackButtonPress: () => void;
+
+ /** Handles submit button press */
+ onSubmit: () => void;
+};
+
+type SignerDetailsFormProps = SubStepProps & {isSecondSigner: boolean};
+
+// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
+const SUBSTEP: Record = CONST.NON_USD_BANK_ACCOUNT.SIGNER_INFO_STEP.SUBSTEP;
+const {OWNS_MORE_THAN_25_PERCENT, COMPANY_NAME} = INPUT_IDS.ADDITIONAL_DATA.CORPAY;
+
+const bodyContent: Array> = [Name, JobTitle, DateOfBirth, UploadDocuments, Confirmation];
+const userIsOwnerBodyContent: Array> = [JobTitle, UploadDocuments, Confirmation];
+
+function SignerInfo({onBackButtonPress, onSubmit}: SignerInfoProps) {
+ const {translate} = useLocalize();
+
+ const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);
+ const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT);
+ const policyID = reimbursementAccount?.achData?.policyID ?? '-1';
+ const [policy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`);
+ const currency = policy?.outputCurrency ?? '';
+ // TODO set this based on param from redirect or BE response
+ const isSecondSigner = false;
+ const isUserOwner = reimbursementAccount?.achData?.additionalData?.corpay?.[OWNS_MORE_THAN_25_PERCENT] ?? reimbursementAccountDraft?.[OWNS_MORE_THAN_25_PERCENT] ?? false;
+ const companyName = reimbursementAccount?.achData?.additionalData?.corpay?.[COMPANY_NAME] ?? reimbursementAccountDraft?.[COMPANY_NAME] ?? '';
+
+ const [currentSubStep, setCurrentSubStep] = useState(SUBSTEP.IS_DIRECTOR);
+ const [isUserDirector, setIsUserDirector] = useState(false);
+
+ const submit = () => {
+ if (currency === CONST.CURRENCY.AUD) {
+ setCurrentSubStep(SUBSTEP.ENTER_EMAIL);
+ } else {
+ onSubmit();
+ }
+ };
+
+ const handleNextSubStep = (value: boolean) => {
+ if (currentSubStep !== SUBSTEP.IS_DIRECTOR) {
+ return;
+ }
+
+ // user is director
+ if (value) {
+ setIsUserDirector(value);
+ setCurrentSubStep(SUBSTEP.SIGNER_DETAILS_FORM);
+ return;
+ }
+
+ setIsUserDirector(value);
+ setCurrentSubStep(SUBSTEP.ENTER_EMAIL);
+ };
+
+ const {
+ componentToRender: SignerDetailsForm,
+ isEditing,
+ screenIndex,
+ nextScreen,
+ prevScreen,
+ moveTo,
+ goToTheLastStep,
+ } = useSubStep({bodyContent: isUserOwner ? userIsOwnerBodyContent : bodyContent, startFrom: 0, onFinished: submit});
+
+ const handleBackButtonPress = () => {
+ if (isEditing) {
+ goToTheLastStep();
+ return;
+ }
+
+ if (currentSubStep === SUBSTEP.IS_DIRECTOR) {
+ onBackButtonPress();
+ } else if (currentSubStep === SUBSTEP.ENTER_EMAIL && isUserDirector) {
+ setCurrentSubStep(SUBSTEP.SIGNER_DETAILS_FORM);
+ } else if (currentSubStep === SUBSTEP.SIGNER_DETAILS_FORM && screenIndex > 0) {
+ prevScreen();
+ } else if (currentSubStep === SUBSTEP.SIGNER_DETAILS_FORM && screenIndex === 0) {
+ setCurrentSubStep(SUBSTEP.IS_DIRECTOR);
+ } else if (currentSubStep === SUBSTEP.HANG_TIGHT) {
+ Navigation.goBack();
+ } else {
+ setCurrentSubStep((subStep) => subStep - 1);
+ }
+ };
+
+ const handleEmailSubmit = () => {
+ setCurrentSubStep(SUBSTEP.HANG_TIGHT);
+ };
+
+ return (
+
+ {currentSubStep === SUBSTEP.IS_DIRECTOR && (
+
+ )}
+
+ {currentSubStep === SUBSTEP.SIGNER_DETAILS_FORM && (
+
+ )}
+
+ {currentSubStep === SUBSTEP.ENTER_EMAIL && (
+
+ )}
+
+ {currentSubStep === SUBSTEP.HANG_TIGHT && }
+
+ );
+}
+
+SignerInfo.displayName = 'SignerInfo';
+
+export default SignerInfo;
diff --git a/src/pages/ReimbursementAccount/NonUSD/SignerInfo/substeps/Confirmation.tsx b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/substeps/Confirmation.tsx
new file mode 100644
index 000000000000..56966bc45887
--- /dev/null
+++ b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/substeps/Confirmation.tsx
@@ -0,0 +1,99 @@
+import React, {useMemo} from 'react';
+import {useOnyx} from 'react-native-onyx';
+import ConfirmationStep from '@components/SubStepForms/ConfirmationStep';
+import useLocalize from '@hooks/useLocalize';
+import type {SubStepProps} from '@hooks/useSubStep/types';
+import getSubstepValues from '@pages/ReimbursementAccount/utils/getSubstepValues';
+import ONYXKEYS from '@src/ONYXKEYS';
+import INPUT_IDS from '@src/types/form/ReimbursementAccountForm';
+
+type ConfirmationProps = SubStepProps & {isSecondSigner: boolean};
+
+const SINGER_INFO_STEP_KEYS = INPUT_IDS.ADDITIONAL_DATA.CORPAY;
+const {
+ SIGNER_FULL_NAME,
+ SECOND_SIGNER_FULL_NAME,
+ SIGNER_JOB_TITLE,
+ SECOND_SIGNER_JOB_TITLE,
+ SIGNER_DATE_OF_BIRTH,
+ SECOND_SIGNER_DATE_OF_BIRTH,
+ SIGNER_COPY_OF_ID,
+ SECOND_SIGNER_COPY_OF_ID,
+ SIGNER_ADDRESS_PROOF,
+ SECOND_SIGNER_ADDRESS_PROOF,
+ OWNS_MORE_THAN_25_PERCENT,
+} = INPUT_IDS.ADDITIONAL_DATA.CORPAY;
+
+function Confirmation({onNext, onMove, isEditing, isSecondSigner}: ConfirmationProps) {
+ const {translate} = useLocalize();
+
+ const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);
+ const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT);
+ const isUserOwner = reimbursementAccount?.achData?.additionalData?.corpay?.[OWNS_MORE_THAN_25_PERCENT] ?? reimbursementAccountDraft?.[OWNS_MORE_THAN_25_PERCENT] ?? false;
+ const values = useMemo(() => getSubstepValues(SINGER_INFO_STEP_KEYS, reimbursementAccountDraft, reimbursementAccount), [reimbursementAccount, reimbursementAccountDraft]);
+
+ const IDs = values[isSecondSigner ? SECOND_SIGNER_COPY_OF_ID : SIGNER_COPY_OF_ID];
+ const proofs = values[isSecondSigner ? SECOND_SIGNER_ADDRESS_PROOF : SIGNER_ADDRESS_PROOF];
+
+ const summaryItems = [
+ {
+ title: values[isSecondSigner ? SECOND_SIGNER_JOB_TITLE : SIGNER_JOB_TITLE],
+ description: translate('signerInfoStep.jobTitle'),
+ shouldShowRightIcon: true,
+ onPress: () => {
+ onMove(1);
+ },
+ },
+ {
+ title: IDs ? IDs.map((id) => id.name).join(', ') : '',
+ description: translate('signerInfoStep.id'),
+ shouldShowRightIcon: true,
+ onPress: () => {
+ onMove(3);
+ },
+ },
+ {
+ title: proofs ? proofs.map((proof) => proof.name).join(', ') : '',
+ description: translate('signerInfoStep.proofOf'),
+ shouldShowRightIcon: true,
+ onPress: () => {
+ onMove(3);
+ },
+ },
+ ];
+
+ if (!isUserOwner) {
+ summaryItems.unshift({
+ title: `${values[isSecondSigner ? SECOND_SIGNER_FULL_NAME : SIGNER_FULL_NAME]}`,
+ description: translate('signerInfoStep.legalName'),
+ shouldShowRightIcon: true,
+ onPress: () => {
+ onMove(0);
+ },
+ });
+
+ summaryItems.splice(2, 0, {
+ title: values[isSecondSigner ? SECOND_SIGNER_DATE_OF_BIRTH : SIGNER_DATE_OF_BIRTH],
+ description: translate('common.dob'),
+ shouldShowRightIcon: true,
+ onPress: () => {
+ onMove(2);
+ },
+ });
+ }
+
+ return (
+
+ );
+}
+
+Confirmation.displayName = 'Confirmation';
+
+export default Confirmation;
diff --git a/src/pages/ReimbursementAccount/NonUSD/SignerInfo/substeps/DateOfBirth.tsx b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/substeps/DateOfBirth.tsx
new file mode 100644
index 000000000000..ba83edd08d97
--- /dev/null
+++ b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/substeps/DateOfBirth.tsx
@@ -0,0 +1,49 @@
+import React from 'react';
+import {useOnyx} from 'react-native-onyx';
+import DateOfBirthStep from '@components/SubStepForms/DateOfBirthStep';
+import useLocalize from '@hooks/useLocalize';
+import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit';
+import type {SubStepProps} from '@hooks/useSubStep/types';
+import useThemeStyles from '@hooks/useThemeStyles';
+import WhyLink from '@pages/ReimbursementAccount/NonUSD/WhyLink';
+import ONYXKEYS from '@src/ONYXKEYS';
+import INPUT_IDS from '@src/types/form/ReimbursementAccountForm';
+
+type DateOfBirthProps = SubStepProps & {isSecondSigner: boolean};
+
+const {SIGNER_DATE_OF_BIRTH, SECOND_SIGNER_DATE_OF_BIRTH} = INPUT_IDS.ADDITIONAL_DATA.CORPAY;
+
+function DateOfBirth({onNext, onMove, isEditing, isSecondSigner}: DateOfBirthProps) {
+ const {translate} = useLocalize();
+ const styles = useThemeStyles();
+
+ const inputID = isSecondSigner ? SECOND_SIGNER_DATE_OF_BIRTH : SIGNER_DATE_OF_BIRTH;
+ const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);
+ const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT);
+ const defaultValue = reimbursementAccount?.achData?.additionalData?.corpay?.[inputID] ?? reimbursementAccountDraft?.[inputID] ?? '';
+
+ const handleSubmit = useReimbursementAccountStepFormSubmit({
+ fieldIds: [inputID],
+ onNext,
+ shouldSaveDraft: isEditing,
+ });
+
+ return (
+
+ isEditing={isEditing}
+ onNext={onNext}
+ onMove={onMove}
+ formID={ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM}
+ formTitle={translate('signerInfoStep.whatsYourDOB')}
+ onSubmit={handleSubmit}
+ stepFields={[inputID]}
+ dobInputID={inputID}
+ dobDefaultValue={defaultValue}
+ footerComponent={}
+ />
+ );
+}
+
+DateOfBirth.displayName = 'DateOfBirth';
+
+export default DateOfBirth;
diff --git a/src/pages/ReimbursementAccount/NonUSD/SignerInfo/substeps/JobTitle.tsx b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/substeps/JobTitle.tsx
new file mode 100644
index 000000000000..30da9f4f54ec
--- /dev/null
+++ b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/substeps/JobTitle.tsx
@@ -0,0 +1,58 @@
+import React, {useCallback} from 'react';
+import {useOnyx} from 'react-native-onyx';
+import type {FormInputErrors, FormOnyxValues} from '@components/Form/types';
+import SingleFieldStep from '@components/SubStepForms/SingleFieldStep';
+import useLocalize from '@hooks/useLocalize';
+import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit';
+import type {SubStepProps} from '@hooks/useSubStep/types';
+import * as ValidationUtils from '@libs/ValidationUtils';
+import CONST from '@src/CONST';
+import ONYXKEYS from '@src/ONYXKEYS';
+import INPUT_IDS from '@src/types/form/ReimbursementAccountForm';
+
+type JobTitleProps = SubStepProps & {isSecondSigner: boolean};
+
+const {SIGNER_JOB_TITLE, SECOND_SIGNER_JOB_TITLE} = INPUT_IDS.ADDITIONAL_DATA.CORPAY;
+
+function JobTitle({onNext, onMove, isEditing, isSecondSigner}: JobTitleProps) {
+ const {translate} = useLocalize();
+
+ const inputID = isSecondSigner ? SECOND_SIGNER_JOB_TITLE : SIGNER_JOB_TITLE;
+ const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);
+ const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT);
+ const defaultValue = reimbursementAccount?.achData?.additionalData?.corpay?.[inputID] ?? reimbursementAccountDraft?.[inputID] ?? '';
+
+ const validate = useCallback(
+ (values: FormOnyxValues): FormInputErrors => {
+ return ValidationUtils.getFieldRequiredErrors(values, [inputID]);
+ },
+ [inputID],
+ );
+
+ const handleSubmit = useReimbursementAccountStepFormSubmit({
+ fieldIds: [inputID],
+ onNext,
+ shouldSaveDraft: isEditing,
+ });
+
+ return (
+
+ isEditing={isEditing}
+ onNext={onNext}
+ onMove={onMove}
+ formID={ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM}
+ formTitle={translate('signerInfoStep.whatsYourJobTitle')}
+ validate={validate}
+ onSubmit={handleSubmit}
+ inputId={inputID}
+ inputLabel={translate('signerInfoStep.jobTitle')}
+ inputMode={CONST.INPUT_MODE.TEXT}
+ defaultValue={defaultValue}
+ shouldShowHelpLinks={false}
+ />
+ );
+}
+
+JobTitle.displayName = 'JobTitle';
+
+export default JobTitle;
diff --git a/src/pages/ReimbursementAccount/NonUSD/SignerInfo/substeps/Name.tsx b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/substeps/Name.tsx
new file mode 100644
index 000000000000..97d3c1f8b27f
--- /dev/null
+++ b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/substeps/Name.tsx
@@ -0,0 +1,64 @@
+import React, {useCallback} from 'react';
+import {useOnyx} from 'react-native-onyx';
+import type {FormInputErrors, FormOnyxValues} from '@components/Form/types';
+import SingleFieldStep from '@components/SubStepForms/SingleFieldStep';
+import useLocalize from '@hooks/useLocalize';
+import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit';
+import type {SubStepProps} from '@hooks/useSubStep/types';
+import * as ValidationUtils from '@libs/ValidationUtils';
+import CONST from '@src/CONST';
+import ONYXKEYS from '@src/ONYXKEYS';
+import INPUT_IDS from '@src/types/form/ReimbursementAccountForm';
+
+type NameProps = SubStepProps & {isSecondSigner: boolean};
+
+const {SIGNER_FULL_NAME, SECOND_SIGNER_FULL_NAME} = INPUT_IDS.ADDITIONAL_DATA.CORPAY;
+
+function Name({onNext, onMove, isEditing, isSecondSigner}: NameProps) {
+ const {translate} = useLocalize();
+ const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);
+ const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT);
+
+ const inputID = isSecondSigner ? SECOND_SIGNER_FULL_NAME : SIGNER_FULL_NAME;
+ const defaultValue = reimbursementAccount?.achData?.additionalData?.corpay?.[inputID] ?? reimbursementAccountDraft?.[inputID] ?? '';
+
+ const validate = useCallback(
+ (values: FormOnyxValues): FormInputErrors => {
+ const errors = ValidationUtils.getFieldRequiredErrors(values, [inputID]);
+
+ if (values[inputID] && !ValidationUtils.isValidLegalName(values[inputID])) {
+ errors[inputID] = translate('bankAccount.error.fullName');
+ }
+
+ return errors;
+ },
+ [inputID, translate],
+ );
+
+ const handleSubmit = useReimbursementAccountStepFormSubmit({
+ fieldIds: [inputID],
+ onNext,
+ shouldSaveDraft: isEditing,
+ });
+
+ return (
+
+ isEditing={isEditing}
+ onNext={onNext}
+ onMove={onMove}
+ formID={ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM}
+ formTitle={translate('signerInfoStep.whatsYourName')}
+ validate={validate}
+ onSubmit={handleSubmit}
+ inputId={inputID}
+ inputLabel={translate('signerInfoStep.fullName')}
+ inputMode={CONST.INPUT_MODE.TEXT}
+ defaultValue={defaultValue}
+ shouldShowHelpLinks={false}
+ />
+ );
+}
+
+Name.displayName = 'Name';
+
+export default Name;
diff --git a/src/pages/ReimbursementAccount/NonUSD/SignerInfo/substeps/UploadDocuments.tsx b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/substeps/UploadDocuments.tsx
new file mode 100644
index 000000000000..ed47b4bf235e
--- /dev/null
+++ b/src/pages/ReimbursementAccount/NonUSD/SignerInfo/substeps/UploadDocuments.tsx
@@ -0,0 +1,121 @@
+import React, {useCallback, useState} from 'react';
+import {View} from 'react-native';
+import {useOnyx} from 'react-native-onyx';
+import type {FileObject} from '@components/AttachmentModal';
+import FormProvider from '@components/Form/FormProvider';
+import InputWrapper from '@components/Form/InputWrapper';
+import type {FormInputErrors, FormOnyxValues} from '@components/Form/types';
+import Text from '@components/Text';
+import UploadFile from '@components/UploadFile';
+import useLocalize from '@hooks/useLocalize';
+import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit';
+import type {SubStepProps} from '@hooks/useSubStep/types';
+import useThemeStyles from '@hooks/useThemeStyles';
+import * as ValidationUtils from '@libs/ValidationUtils';
+import WhyLink from '@pages/ReimbursementAccount/NonUSD/WhyLink';
+import * as FormActions from '@userActions/FormActions';
+import CONST from '@src/CONST';
+import ONYXKEYS from '@src/ONYXKEYS';
+import INPUT_IDS from '@src/types/form/ReimbursementAccountForm';
+
+type UploadDocumentsProps = SubStepProps;
+
+const {SIGNER_ADDRESS_PROOF, SIGNER_COPY_OF_ID} = INPUT_IDS.ADDITIONAL_DATA.CORPAY;
+const STEP_FIELDS = [SIGNER_COPY_OF_ID, SIGNER_ADDRESS_PROOF];
+
+function UploadDocuments({onNext, isEditing}: UploadDocumentsProps) {
+ const {translate} = useLocalize();
+ const styles = useThemeStyles();
+
+ const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);
+ const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT);
+
+ const defaultValues = {
+ [SIGNER_COPY_OF_ID]: reimbursementAccount?.achData?.additionalData?.corpay?.[SIGNER_COPY_OF_ID] ?? reimbursementAccountDraft?.[SIGNER_COPY_OF_ID] ?? [],
+ [SIGNER_ADDRESS_PROOF]: reimbursementAccount?.achData?.additionalData?.corpay?.[SIGNER_ADDRESS_PROOF] ?? reimbursementAccountDraft?.[SIGNER_ADDRESS_PROOF] ?? [],
+ };
+
+ const [uploadedIDs, setUploadedID] = useState(defaultValues[SIGNER_ADDRESS_PROOF]);
+ const [uploadedProofsOfAddress, setUploadedProofOfAddress] = useState(defaultValues[SIGNER_ADDRESS_PROOF]);
+
+ const validate = useCallback((values: FormOnyxValues): FormInputErrors => {
+ return ValidationUtils.getFieldRequiredErrors(values, STEP_FIELDS);
+ }, []);
+
+ const handleSubmit = useReimbursementAccountStepFormSubmit({
+ fieldIds: STEP_FIELDS,
+ onNext,
+ shouldSaveDraft: isEditing,
+ });
+
+ const handleSelectIDFile = (files: FileObject[]) => {
+ FormActions.setDraftValues(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM, {[SIGNER_COPY_OF_ID]: [...uploadedIDs, ...files]});
+ setUploadedID((prev) => [...prev, ...files]);
+ };
+
+ const handleRemoveIDFile = (fileUri: string) => {
+ const newUploadedIDs = uploadedIDs.filter((file) => file.uri !== fileUri);
+ FormActions.setDraftValues(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM, {[SIGNER_COPY_OF_ID]: newUploadedIDs});
+ setUploadedID(newUploadedIDs);
+ };
+
+ const handleSelectProofOfAddressFile = (files: FileObject[]) => {
+ FormActions.setDraftValues(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM, {[SIGNER_ADDRESS_PROOF]: [...uploadedProofsOfAddress, ...files]});
+ setUploadedProofOfAddress((prev) => [...prev, ...files]);
+ };
+
+ const handleRemoveProofOfAddressFile = (fileUri: string) => {
+ const newUploadedProofsOfAddress = uploadedProofsOfAddress.filter((file) => file.uri !== fileUri);
+ FormActions.setDraftValues(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM, {[SIGNER_ADDRESS_PROOF]: newUploadedProofsOfAddress});
+ setUploadedProofOfAddress(newUploadedProofsOfAddress);
+ };
+
+ // TODO: check if this is necessary
+ const setError = (error: string) => {
+ // eslint-disable-next-line
+ console.info(error);
+ };
+
+ return (
+
+
+ {translate('signerInfoStep.uploadID')}
+ {translate('signerInfoStep.id')}
+
+ {translate('signerInfoStep.proofOf')}
+
+
+
+
+ );
+}
+
+UploadDocuments.displayName = 'UploadDocuments';
+
+export default UploadDocuments;
diff --git a/src/pages/ReimbursementAccount/PersonalInfo/substeps/DateOfBirth.tsx b/src/pages/ReimbursementAccount/PersonalInfo/substeps/DateOfBirth.tsx
index 526181a6cb84..f6e7b084e0eb 100644
--- a/src/pages/ReimbursementAccount/PersonalInfo/substeps/DateOfBirth.tsx
+++ b/src/pages/ReimbursementAccount/PersonalInfo/substeps/DateOfBirth.tsx
@@ -4,6 +4,8 @@ import DateOfBirthStep from '@components/SubStepForms/DateOfBirthStep';
import useLocalize from '@hooks/useLocalize';
import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit';
import type {SubStepProps} from '@hooks/useSubStep/types';
+import useThemeStyles from '@hooks/useThemeStyles';
+import HelpLinks from '@pages/ReimbursementAccount/PersonalInfo/HelpLinks';
import ONYXKEYS from '@src/ONYXKEYS';
import INPUT_IDS from '@src/types/form/ReimbursementAccountForm';
@@ -12,6 +14,7 @@ const STEP_FIELDS = [PERSONAL_INFO_DOB_KEY];
function DateOfBirth({onNext, onMove, isEditing}: SubStepProps) {
const {translate} = useLocalize();
+ const styles = useThemeStyles();
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);
const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT);
@@ -35,6 +38,7 @@ function DateOfBirth({onNext, onMove, isEditing}: SubStepProps) {
stepFields={STEP_FIELDS}
dobInputID={PERSONAL_INFO_DOB_KEY}
dobDefaultValue={dobDefaultValue}
+ footerComponent={}
/>
);
}
diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx b/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx
index 29173817f5ac..6c3b289e59df 100644
--- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx
+++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx
@@ -46,7 +46,7 @@ import BeneficialOwnerInfo from './NonUSD/BeneficialOwnerInfo/BeneficialOwnerInf
import BusinessInfo from './NonUSD/BusinessInfo/BusinessInfo';
import Country from './NonUSD/Country/Country';
import Finish from './NonUSD/Finish/Finish';
-import SignerInfo from './NonUSD/SignerInfo/SignerInfo';
+import SignerInfo from './NonUSD/SignerInfo';
import RequestorStep from './RequestorStep';
type ReimbursementAccountPageProps = WithPolicyOnyxProps & StackScreenProps;
diff --git a/src/styles/index.ts b/src/styles/index.ts
index ade24ef9d5be..8ebfc5582b02 100644
--- a/src/styles/index.ts
+++ b/src/styles/index.ts
@@ -3125,9 +3125,9 @@ const styles = (theme: ThemeColors) =>
radioButtonContainer: {
backgroundColor: theme.componentBG,
- borderRadius: 10,
- height: 20,
- width: 20,
+ borderRadius: 14,
+ height: 28,
+ width: 28,
borderColor: theme.border,
borderWidth: 1,
justifyContent: 'center',
diff --git a/src/styles/utils/sizing.ts b/src/styles/utils/sizing.ts
index 0cf3efd54d61..c43ed2cfe655 100644
--- a/src/styles/utils/sizing.ts
+++ b/src/styles/utils/sizing.ts
@@ -96,6 +96,10 @@ export default {
width: '80%',
},
+ w90: {
+ width: '90%',
+ },
+
w100: {
width: '100%',
},
diff --git a/src/types/form/ReimbursementAccountForm.ts b/src/types/form/ReimbursementAccountForm.ts
index e76158244199..c3a5f34215ef 100644
--- a/src/types/form/ReimbursementAccountForm.ts
+++ b/src/types/form/ReimbursementAccountForm.ts
@@ -53,9 +53,19 @@ const INPUT_IDS = {
AMOUNT2: 'amount2',
AMOUNT3: 'amount3',
ADDITIONAL_DATA: {
+ ACCOUNT_HOLDER_NAME: 'accountHolderName',
+ ADDRESS_STREET: 'addressStreet',
+ ADDRESS_CITY: 'addressCity',
+ ADDRESS_STATE: 'addressState',
+ ADDRESS_ZIP_CODE: 'addressZipCode',
+ ACCOUNT_HOLDER_COUNTRY: 'accountHolderCountry',
COUNTRY: 'country',
CORPAY: {
ACCOUNT_HOLDER_COUNTRY: 'accountHolderCountry',
+ SWIFT_CODE: 'swiftCode',
+ BANK_NAME: 'bankName',
+ BANK_CITY: 'bankCity',
+ BANK_ADDRESS_LINE_1: 'bankAddress',
BANK_STATEMENT: 'bankStatement',
COMPANY_NAME: 'companyName',
COMPANY_STREET: 'companyStreet',
@@ -65,12 +75,50 @@ const INPUT_IDS = {
COMPANY_COUNTRY: 'companyCountry',
BUSINESS_CONTACT_NUMBER: 'businessContactNumber',
BUSINESS_CONFIRMATION_EMAIL: 'businessConfirmationEmail',
- BUSINESS_REGISTRATION_INCORPORATION_NUMBER: 'businessRegistrationIncorporationNumber',
- FORMATION_INCORPORATION_STATE: 'formationIncorporationState',
FORMATION_INCORPORATION_COUNTRY_CODE: 'formationIncorporationCountryCode',
+ FORMATION_INCORPORATION_STATE: 'formationIncorporationState',
+ BUSINESS_REGISTRATION_INCORPORATION_NUMBER: 'businessRegistrationIncorporationNumber',
+ COUNTRY_CODE: 'countryCode',
+ TAX_ID_EIN_NUMBER: 'taxIDEINNumber',
BUSINESS_CATEGORY: 'natureOfBusiness',
APPLICANT_TYPE_ID: 'applicantTypeID',
+ PURPOSE_OF_TRANSACTION_ID: 'purposeOfTransactionID',
+ CURRENCY_NEEDED: 'currencyNeeded',
+ TRADE_VOLUME: 'tradeVolume',
ANNUAL_VOLUME: 'annualVolume',
+ FUND_DESTINATION_COUNTRIES: 'fundDestinationCountries',
+ FUND_SOURCE_COUNTRIES: 'fundSourceCountries',
+ COMPANY_DIRECTORS_FULL_NAME: 'companyDirectorsFullName',
+ COMPANY_DIRECTORS_JOB_TITLE: 'companyDirectorsJobTitle',
+ COMPANY_DIRECTORS_OCCUPATION: 'companyDirectorsOccupation',
+ OWNS_MORE_THAN_25_PERCENT: 'ownsMoreThan25Percent',
+ ANY_INDIVIDUAL_OWN_25_PERCENT_OR_MORE: 'anyIndividualOwn25PercentOrMore',
+ BENEFICIAL_OWNERS: 'beneficialOwners',
+ ENTITY_CHART: 'entityChart',
+ SIGNER_FULL_NAME: 'signerFullName',
+ SIGNER_DATE_OF_BIRTH: 'signerDateOfBirth',
+ SIGNER_JOB_TITLE: 'signerJobTitle',
+ SIGNER_EMAIL: 'signerEmail',
+ SIGNER_COMPLETE_RESIDENTIAL_ADDRESS: 'signerCompleteResidentialAddress',
+ SECOND_SIGNER_FULL_NAME: 'secondSignerFullName',
+ SECOND_SIGNER_DATE_OF_BIRTH: 'secondSignerDateOfBirth',
+ SECOND_SIGNER_JOB_TITLE: 'secondSignerJobTitle',
+ SECOND_SIGNER_EMAIL: 'secondSignerEmail',
+ SECOND_SIGNER_COMPLETE_RESIDENTIAL_ADDRESS: 'secondSignerCompleteResidentialAddress',
+ SIGNER_PROOF_OF_DIRECTOR: 'signerProofOfDirector',
+ SIGNER_COPY_OF_ID: 'signerCopyOfID',
+ SIGNER_ADDRESS_PROOF: 'signerAddressProof',
+ SIGNER_TAX_ID: 'signerTaxID',
+ SIGNER_PDS_AND_FSG: 'signerPDSAndFSG',
+ SECOND_SIGNER_PROOF_OF_DIRECTOR: 'secondSignerProofOfDirector',
+ SECOND_SIGNER_COPY_OF_ID: 'secondSignerCopyOfID',
+ SECOND_SIGNER_ADDRESS_PROOF: 'secondSignerAddressProof',
+ SECOND_SIGNER_TAX_ID: 'secondSignerTaxID',
+ SECOND_SIGNER_PDS_AND_FSG: 'secondSignerPDSAndFSG',
+ PROVIDE_TRUTHFUL_INFORMATION: 'provideTruthfulInformation',
+ AGREE_TO_TERMS_AND_CONDITIONS: 'agreeToTermsAndConditions',
+ CONSENT_TO_PRIVACY_NOTICE: 'consentToPrivacyNotice',
+ AUTHORIZED_TO_BIND_CLIENT_TO_AGREEMENT: 'authorizedToBindClientToAgreement',
},
},
} as const;
@@ -151,6 +199,18 @@ type NonUSDReimbursementAccountAdditionalProps = {
/** Country of the account holder */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.ACCOUNT_HOLDER_COUNTRY]: Country | '';
+ /** SWIFT code */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SWIFT_CODE]: string;
+
+ /** Bank name */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.BANK_NAME]: string;
+
+ /** Bank city */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.BANK_CITY]: string;
+
+ /** Bank address line 1 */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.BANK_ADDRESS_LINE_1]: string;
+
/** Bank statement file */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.BANK_STATEMENT]: FileObject[];
@@ -172,34 +232,146 @@ type NonUSDReimbursementAccountAdditionalProps = {
/** Company country */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.COMPANY_COUNTRY]: Country | '';
- /** Company contact number */
+ /** Business contact number */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.BUSINESS_CONTACT_NUMBER]: string;
- /** Company email */
+ /** Business confirmation email */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.BUSINESS_CONFIRMATION_EMAIL]: string;
- /** Company registration number */
- [INPUT_IDS.ADDITIONAL_DATA.CORPAY.BUSINESS_REGISTRATION_INCORPORATION_NUMBER]: string;
-
- /** Company incorporation country */
+ /** Formation incorporation country code */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.FORMATION_INCORPORATION_COUNTRY_CODE]: string;
- /** Company incorporation state */
+ /** Formation incorporation state */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.FORMATION_INCORPORATION_STATE]: string;
- /** Company business category */
+ /** Business registration incorporation number */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.BUSINESS_REGISTRATION_INCORPORATION_NUMBER]: string;
+
+ /** Country code */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.COUNTRY_CODE]: string;
+
+ /** Tax ID EIN number */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.TAX_ID_EIN_NUMBER]: string;
+
+ /** Business category */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.BUSINESS_CATEGORY]: string;
- /** Company applicant type ID */
+ /** Applicant type ID */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.APPLICANT_TYPE_ID]: string;
- /** Company annual volume */
+ /** Purpose of transaction ID */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.PURPOSE_OF_TRANSACTION_ID]: string;
+
+ /** Currency needed */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.CURRENCY_NEEDED]: string;
+
+ /** Trade volume */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.TRADE_VOLUME]: string;
+
+ /** Annual volume */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.ANNUAL_VOLUME]: string;
+
+ /** Fund destination countries */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.FUND_DESTINATION_COUNTRIES]: string;
+
+ /** Fund source countries */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.FUND_SOURCE_COUNTRIES]: string;
+
+ /** Company directors full name */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.COMPANY_DIRECTORS_FULL_NAME]: string;
+
+ /** Company directors job title */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.COMPANY_DIRECTORS_JOB_TITLE]: string;
+
+ /** Company directors occupation */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.COMPANY_DIRECTORS_OCCUPATION]: string;
+
+ /** Owns more than 25 percent */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.ANY_INDIVIDUAL_OWN_25_PERCENT_OR_MORE]: boolean;
+
+ /** Beneficial owners */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.BENEFICIAL_OWNERS]: string;
+
+ /** Entity chart */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.ENTITY_CHART]: FileObject[];
+
+ /** Signer full name */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_FULL_NAME]: string;
+
+ /** Signer date of birth */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_DATE_OF_BIRTH]: string;
+
+ /** Signer job title */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_JOB_TITLE]: string;
+
+ /** Signer email */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_EMAIL]: string;
+
+ /** Signer complete residential address */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_COMPLETE_RESIDENTIAL_ADDRESS]: string;
+
+ /** Second signer full name */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_FULL_NAME]: string;
+
+ /** Second signer date of birth */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_DATE_OF_BIRTH]: string;
+
+ /** Second signer job title */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_JOB_TITLE]: string;
+
+ /** Second signer email */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_EMAIL]: string;
+
+ /** Second signer complete residential address */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_COMPLETE_RESIDENTIAL_ADDRESS]: string;
+
+ /** Signer proof of director */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_PROOF_OF_DIRECTOR]: FileObject[];
+
+ /** Signer copy of ID */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_COPY_OF_ID]: FileObject[];
+
+ /** Signer address proof */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_ADDRESS_PROOF]: FileObject[];
+
+ /** Signer tax ID */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_TAX_ID]: string;
+
+ /** Signer PDS and FSG */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_PDS_AND_FSG]: string;
+
+ /** Second signer proof of director */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_PROOF_OF_DIRECTOR]: FileObject[];
+
+ /** Second signer copy of ID */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_COPY_OF_ID]: FileObject[];
+
+ /** Second signer address proof */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_ADDRESS_PROOF]: FileObject[];
+
+ /** Second signer tax ID */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_TAX_ID]: string;
+
+ /** Second signer PDS and FSG */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_PDS_AND_FSG]: string;
+
+ /** Provide truthful information */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.PROVIDE_TRUTHFUL_INFORMATION]: boolean;
+
+ /** Agree to terms and conditions */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.AGREE_TO_TERMS_AND_CONDITIONS]: boolean;
+
+ /** Consent to privacy notice */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.CONSENT_TO_PRIVACY_NOTICE]: boolean;
+
+ /** Authorized to bind client to agreement */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.AUTHORIZED_TO_BIND_CLIENT_TO_AGREEMENT]: boolean;
};
type ReimbursementAccountForm = ReimbursementAccountFormExtraProps &
Form<
InputID,
+ // @ts-expect-error TODO: fix it - I have no idea why it is complaining here
BeneficialOwnersStepBaseProps &
BankAccountStepProps &
CompanyStepProps &
diff --git a/src/types/onyx/ReimbursementAccount.ts b/src/types/onyx/ReimbursementAccount.ts
index 17cbe4ac408b..877f9aea65d3 100644
--- a/src/types/onyx/ReimbursementAccount.ts
+++ b/src/types/onyx/ReimbursementAccount.ts
@@ -13,60 +13,141 @@ type BankAccountStep = ValueOf;
/** Substeps to setup a reimbursement bank account */
type BankAccountSubStep = ValueOf;
-/** Modal of Corpay data */
+/** Model of Corpay data */
type Corpay = {
+ /** Swift code */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SWIFT_CODE]?: string;
+ /** Bank name */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.BANK_NAME]: string;
+ /** Bank address - city */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.BANK_CITY]: string;
+ /** Bank address - street and zip code */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.BANK_ADDRESS_LINE_1]: string;
/** Company name */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.COMPANY_NAME]: string;
-
- /** Company street */
+ /** Company address - street */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.COMPANY_STREET]: string;
-
- /** Company city */
- [INPUT_IDS.ADDITIONAL_DATA.CORPAY.COMPANY_CITY]: string;
-
- /** Company state */
+ /** Company address - city */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.COMPANY_CITY]?: string;
+ /** Company address - state (US and CA only) */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.COMPANY_STATE]: string;
-
- /** Company zip code */
+ /** Company address - zip code */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.COMPANY_ZIP_CODE]: string;
-
- /** Company country */
+ /** Company address - zip code */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.COMPANY_COUNTRY]: Country | '';
-
- /** Company contact number */
+ /** Company phone number */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.BUSINESS_CONTACT_NUMBER]: string;
-
- /** Company email */
+ /** Company email address */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.BUSINESS_CONFIRMATION_EMAIL]: string;
-
- /** Company registration number */
- [INPUT_IDS.ADDITIONAL_DATA.CORPAY.BUSINESS_REGISTRATION_INCORPORATION_NUMBER]: string;
-
- /** Company incorporation country */
+ /** Company country */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.FORMATION_INCORPORATION_COUNTRY_CODE]: string;
-
- /** Company incorporation state */
+ /** Company state (US and CA only) */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.FORMATION_INCORPORATION_STATE]: string;
-
- /** Company business category */
- [INPUT_IDS.ADDITIONAL_DATA.CORPAY.BUSINESS_CATEGORY]: string;
-
- /** Company applicant type ID */
+ /** Company registration number */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.BUSINESS_REGISTRATION_INCORPORATION_NUMBER]: string;
+ /** Company country code */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.COUNTRY_CODE]: string;
+ /** Company tax ID number */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.TAX_ID_EIN_NUMBER]: string;
+ /** Incorporation type */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.APPLICANT_TYPE_ID]: string;
-
- /** Company annual volume */
+ /** Nature of business */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.BUSINESS_CATEGORY]: string;
+ /** */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.PURPOSE_OF_TRANSACTION_ID]: string;
+ /** Currency */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.CURRENCY_NEEDED]: string;
+ /** */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.TRADE_VOLUME]: string;
+ /** Annual volume */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.ANNUAL_VOLUME]: string;
-
+ /** */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.FUND_DESTINATION_COUNTRIES]: string;
+ /** */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.FUND_SOURCE_COUNTRIES]: string;
+ /** Director full name */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.COMPANY_DIRECTORS_FULL_NAME]: string;
+ /** Director job title */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.COMPANY_DIRECTORS_JOB_TITLE]: string;
+ /** Director occupation */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.COMPANY_DIRECTORS_OCCUPATION]: string;
+ /** Is user also an owner */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.OWNS_MORE_THAN_25_PERCENT]: boolean;
+ /** Are the more owners */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.ANY_INDIVIDUAL_OWN_25_PERCENT_OR_MORE]: boolean;
+ /** Stringified array of owners data */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.BENEFICIAL_OWNERS]?: string;
+ /** Entity chart files */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.ENTITY_CHART]?: FileObject[];
+ /** Signer full name */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_FULL_NAME]: string;
+ /** Signer DOB */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_DATE_OF_BIRTH]: string;
+ /** Signer job title */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_JOB_TITLE]: string;
+ /** Signer email address */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_EMAIL]: string;
+ /** Signer full address */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_COMPLETE_RESIDENTIAL_ADDRESS]: string;
+ /** Second signer full name */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_FULL_NAME]?: string;
+ /** Second signer DOB */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_DATE_OF_BIRTH]?: string;
+ /** Second signer job title */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_JOB_TITLE]?: string;
+ /** Second signer email address */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_EMAIL]?: string;
+ /** Second signer full address */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_COMPLETE_RESIDENTIAL_ADDRESS]: string;
+ /** URL to uploaded proof of signer being a director */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_PROOF_OF_DIRECTOR]: FileObject[];
+ /** URL to uploaded copy of signer ID */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_COPY_OF_ID]: FileObject[];
+ /** URL to uploaded proof of signer address */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_ADDRESS_PROOF]: FileObject[];
+ /** Signer tax ID */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_TAX_ID]: string;
+ /** Signer PDS and FSG */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SIGNER_PDS_AND_FSG]: string;
+ /** URL to uploaded proof of second signer being a director */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_PROOF_OF_DIRECTOR]?: FileObject[];
+ /** URL to uploaded copy of second signer ID */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_COPY_OF_ID]?: FileObject[];
+ /** URL to uploaded proof of second signer address */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_ADDRESS_PROOF]?: FileObject[];
+ /** Second signer tax ID */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_TAX_ID]?: string;
+ /** Second signer PDS and FSG */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.SECOND_SIGNER_PDS_AND_FSG]?: string;
+ /** Checkbox - provided truthful information */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.PROVIDE_TRUTHFUL_INFORMATION]: boolean;
+ /** Checkbox - agrees to terms and conditions */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.AGREE_TO_TERMS_AND_CONDITIONS]: boolean;
+ /** Checkbox - consents to privacy notice */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.CONSENT_TO_PRIVACY_NOTICE]: boolean;
+ /** Checkbox - authorized to bind to client to agreement */
+ [INPUT_IDS.ADDITIONAL_DATA.CORPAY.AUTHORIZED_TO_BIND_CLIENT_TO_AGREEMENT]: boolean;
/** Bank statement */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.BANK_STATEMENT]: FileObject[];
};
-/** Additional data where details of the non-USD reimbursements account are stored */
+/** Model of Additional data */
type AdditionalData = {
- /** Country of the reimbursement account */
+ /** Account holder name */
+ [INPUT_IDS.ADDITIONAL_DATA.ACCOUNT_HOLDER_NAME]: string;
+ /** Account holder address - street */
+ [INPUT_IDS.ADDITIONAL_DATA.ADDRESS_STREET]: string;
+ /** Account holder address - city */
+ [INPUT_IDS.ADDITIONAL_DATA.ADDRESS_CITY]: string;
+ /** Account holder address - state (US and CA only) */
+ [INPUT_IDS.ADDITIONAL_DATA.ADDRESS_STATE]?: string;
+ /** Account holder address - zip code */
+ [INPUT_IDS.ADDITIONAL_DATA.ADDRESS_ZIP_CODE]: string;
+ /** Account holder address - country */
+ [INPUT_IDS.ADDITIONAL_DATA.ACCOUNT_HOLDER_COUNTRY]: string;
+ /** Country user selects in first step */
[INPUT_IDS.ADDITIONAL_DATA.COUNTRY]: Country | '';
-
- /** Details required by Corpay */
+ /** Corpay fields */
corpay: Corpay;
};