Skip to content

Commit eb639ec

Browse files
authored
Merge pull request #96623 from software-mansion-labs/feature/home/time-sensitive-card
Add a `Time sensitive` to-do for employees with missing deposit accounts
2 parents 5e534fa + 62b6b11 commit eb639ec

31 files changed

Lines changed: 753 additions & 210 deletions

File tree

docs/articles/new-expensify/getting-started/Expensify-Home-Overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ The **Time-sensitive alerts** section appears only when there is something that
5050
These alerts appear when:
5151
- A workflow is blocked, such as a broken bank or accounting connection due to expired or invalid credentials
5252
- A bank account is locked, such as a business or personal bank account that has been locked due to a failed debit or bank-side restriction
53+
- A reimbursement is waiting for the payee to add a personal deposit account
5354
- There is potential risk, such as suspected Expensify Card fraud on an active card
5455
- An action must be taken within a short window, such as a limited-time offer or early adoption discount
5556

src/CONST/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3872,6 +3872,12 @@ const CONST = {
38723872
BANK_ACCOUNT: 'bankAccountID',
38733873
},
38743874

3875+
/** The payment method a payee still has to set up before a queued payment can settle */
3876+
MISSING_PAYMENT_METHODS: {
3877+
BANK_ACCOUNT: 'bankAccount',
3878+
WALLET: 'wallet',
3879+
},
3880+
38753881
IOU: {
38763882
MAX_RECENT_REPORTS_TO_SHOW: 5,
38773883
MAX_RECENT_ATTENDEES: 40,

src/ROUTES.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,17 @@ const DYNAMIC_ROUTES = {
134134
path: 'add-bank-account/verify-account',
135135
entryScreens: [
136136
SCREENS.SETTINGS.WALLET.ROOT,
137+
SCREENS.HOME,
137138
SCREENS.RIGHT_MODAL.SEARCH_REPORT,
138139
SCREENS.RIGHT_MODAL.EXPENSE_REPORT,
139140
SCREENS.REPORT,
140141
SCREENS.RIGHT_MODAL.SEARCH_MONEY_REQUEST_REPORT,
141142
SCREENS.SEARCH.ROOT,
142143
],
144+
// Entry points that already know the user is adding a personal deposit account (e.g. a queued reimbursement) pass true so the
145+
// bank account purpose screen isn't shown after validation.
146+
getRoute: (shouldSkipPurposeSelection?: boolean) => `add-bank-account/verify-account${shouldSkipPurposeSelection ? '?shouldSkipPurposeSelection=true' : ''}` as const,
147+
queryParams: ['shouldSkipPurposeSelection'],
143148
},
144149
BANK_ACCOUNT_VERIFY_ACCOUNT: {
145150
path: 'verify-bank-account',

src/components/SettlementButton/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ function SettlementButton({
447447
navigateToBankAccountRoute({policyID: getPolicyID()});
448448
} else {
449449
clearPersonalBankAccount();
450-
Navigation.navigate(ROUTES.SETTINGS_ADD_BANK_ACCOUNT.route);
450+
Navigation.navigate(ROUTES.SETTINGS_ADD_BANK_ACCOUNT.getRoute());
451451
}
452452
},
453453
value: CONST.IOU.PAYMENT_TYPE.ELSEWHERE,

src/languages/de.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,7 @@ const translations: TranslationDeepObject<typeof en> = {
935935
title: 'Zeitkritisch',
936936
addShippingAddress: {title: 'Wir benötigen deine Versandadresse', subtitle: 'Geben Sie eine Adresse an, um Ihre Expensify Karte zu erhalten.', cta: 'Adresse hinzufügen'},
937937
addPaymentCard: {title: 'Fügen Sie eine Zahlungskarte hinzu, um Expensify weiter zu nutzen', subtitle: 'Konto > Abonnement', cta: 'Hinzufügen'},
938+
addBankAccount: {title: 'Fügen Sie ein Bankkonto hinzu, um eine Erstattung zu erhalten'},
938939
activateCard: {title: 'Aktivieren Sie Ihre Expensify Karte', subtitle: 'Validieren Sie Ihre Karte und beginnen Sie mit dem Ausgeben.', cta: 'Aktivieren'},
939940
reviewCardFraud: {
940941
title: 'Möglichen Betrug mit Ihrer Expensify Karte überprüfen',

src/languages/el.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,9 @@ const translations: TranslationDeepObject<typeof en> = {
982982
subtitle: 'Λογαριασμός > Συνδρομή',
983983
cta: 'Προσθήκη',
984984
},
985+
addBankAccount: {
986+
title: 'Προσθέστε έναν τραπεζικό λογαριασμό για να λάβετε αποζημίωση',
987+
},
985988
activateCard: {
986989
title: 'Ενεργοποιήστε την Κάρτα Expensify',
987990
subtitle: 'Επικυρώστε την κάρτα σας και ξεκινήστε να ξοδεύετε.',

src/languages/en.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,10 @@ const translations = {
10041004
subtitle: 'Account > Subscription',
10051005
cta: 'Add',
10061006
},
1007+
addBankAccount: {
1008+
// @context Home reminder shown to a payment recipient when a reimbursement is waiting for them to add a personal deposit account.
1009+
title: 'Add a bank account to get reimbursed',
1010+
},
10071011
activateCard: {
10081012
title: 'Activate your Expensify Card',
10091013
subtitle: 'Validate your card and start spending.',

src/languages/es.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,7 @@ const translations: TranslationDeepObject<typeof en> = {
936936
subtitle: 'Cuenta > Suscripción',
937937
cta: 'Añadir',
938938
},
939+
addBankAccount: {title: 'Añade una cuenta bancaria para recibir el reembolso'},
939940
activateCard: {
940941
title: 'Activa tu Tarjeta Expensify',
941942
subtitle: 'Valida tu tarjeta y empieza a gastar.',

src/languages/fr.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,7 @@ const translations: TranslationDeepObject<typeof en> = {
938938
title: 'Urgent',
939939
addShippingAddress: {title: 'Nous avons besoin de votre adresse de livraison', subtitle: 'Indiquez une adresse pour recevoir votre Carte Expensify.', cta: 'Ajouter une adresse'},
940940
addPaymentCard: {title: 'Ajoutez une carte de paiement pour continuer à utiliser Expensify', subtitle: 'Compte > Abonnement', cta: 'Ajouter'},
941+
addBankAccount: {title: 'Ajoutez un compte bancaire pour être remboursé'},
941942
activateCard: {title: 'Activer votre Carte Expensify', subtitle: 'Validez votre carte et commencez à dépenser.', cta: 'Activer'},
942943
reviewCardFraud: {
943944
title: 'Examiner une éventuelle fraude sur votre Carte Expensify',

src/languages/it.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,7 @@ const translations: TranslationDeepObject<typeof en> = {
936936
title: 'Sensibile al tempo',
937937
addShippingAddress: {title: 'Ci serve il tuo indirizzo di spedizione', subtitle: 'Fornisci un indirizzo per ricevere la tua Carta Expensify.', cta: 'Aggiungi indirizzo'},
938938
addPaymentCard: {title: 'Aggiungi una carta di pagamento per continuare a usare Expensify', subtitle: 'Account > Abbonamento', cta: 'Aggiungi'},
939+
addBankAccount: {title: 'Aggiungi un conto bancario per ricevere il rimborso'},
939940
activateCard: {title: 'Attiva la tua Carta Expensify', subtitle: 'Convalida la tua carta e inizia a spendere.', cta: 'Attiva'},
940941
reviewCardFraud: {
941942
title: 'Esamina una possibile frode sulla tua Carta Expensify',

0 commit comments

Comments
 (0)