Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5a6f2a0
Add new API parameter types and update WRITE_COMMANDS
blimpich Feb 25, 2026
fbe3873
Add configureTravelInvoicingForPolicy and deactivateTravelInvoicing a…
blimpich Feb 25, 2026
b355be5
Update Travel Invoicing UI to use new 1:1:1 compliant actions
blimpich Feb 25, 2026
088d582
Update unit tests for new Travel Invoicing commands
blimpich Feb 25, 2026
04121c9
Fix prettier formatting in WorkspaceTravelInvoicingSection
blimpich Feb 25, 2026
3e08b59
remove comments
blimpich Feb 25, 2026
620c0ec
add verifying state to the travel invoicing flow
blimpich Feb 25, 2026
cd27a9c
create new shared component
blimpich Feb 25, 2026
95b2a57
dry up frontend code
blimpich Feb 25, 2026
9a0aa11
checkpoint
blimpich Feb 26, 2026
ba01c82
get verification screen showing
blimpich Feb 26, 2026
6de109c
change copy
blimpich Feb 26, 2026
2d9b85a
translations
blimpich Mar 2, 2026
5d9d5bc
Merge branch 'main' into blimpich-fix111issueWithTravelInvoicing
blimpich Mar 2, 2026
20d9624
Fix smart quotes in fr.ts causing TS syntax errors
blimpich Mar 2, 2026
b0d75bf
Revert getTravelSettings to require TRAVEL_US key
blimpich Mar 2, 2026
676ad4c
Add missing translation keys to es.ts
blimpich Mar 2, 2026
92fd024
Revert "Add missing translation keys to es.ts"
blimpich Mar 2, 2026
2fd03c1
Add Spanish translation keys to es.ts
blimpich Mar 2, 2026
fecd7ca
remove useless comments
blimpich Mar 3, 2026
7ce290b
make params readonly
blimpich Mar 3, 2026
a2797a9
Use isLoading instead of pendingFields for verification loading gate
blimpich Mar 3, 2026
9529878
Merge branch 'main' into blimpich-fix111issueWithTravelInvoicing
blimpich Mar 3, 2026
0cc5ef0
Merge branch 'main' into blimpich-fix111issueWithTravelInvoicing
blimpich Mar 4, 2026
3cf1a08
fix import issues
blimpich Mar 4, 2026
4f37245
address PR review feedback: add error handling, tighten types, fix guard
blimpich Mar 4, 2026
08c123f
use getCardSettings and get rid of fallbacks for settlement account
blimpich Mar 4, 2026
af41f91
only use travel settings not root level settings
blimpich Mar 5, 2026
d65e6fe
Merge branch 'main' into blimpich-fix111issueWithTravelInvoicing
blimpich Mar 5, 2026
4e0389b
get rid of getTravelSettings
blimpich Mar 5, 2026
857615f
Resolve merge conflicts with main in TravelInvoicingUtilsTest
blimpich Mar 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions src/components/BankAccountVerificationView.tsx
Comment thread
blimpich marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import React from 'react';
import type {ValueOf} from 'type-fest';
import useBottomSafeSafeAreaPaddingStyle from '@hooks/useBottomSafeSafeAreaPaddingStyle';
import {useMemoizedLazyIllustrations} from '@hooks/useLazyAsset';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import Navigation from '@navigation/Navigation';
import variables from '@styles/variables';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';
import BlockingView from './BlockingViews/BlockingView';
import Button from './Button';
import LottieAnimations from './LottieAnimations';

type BankAccountVerificationViewProps = {
verificationState: ValueOf<typeof CONST.EXPENSIFY_CARD.VERIFICATION_STATE> | '';
children: React.ReactNode;
onVerifiedButtonPress?: () => void;
verifiedButtonText?: string;
verifiedTitle?: string;
verifiedSubtitle?: string;
};

function BankAccountVerificationView({verificationState, children, onVerifiedButtonPress, verifiedButtonText, verifiedTitle, verifiedSubtitle}: BankAccountVerificationViewProps) {
const {translate} = useLocalize();
const styles = useThemeStyles();
const illustrations = useMemoizedLazyIllustrations(['Puzzle']);
const bottomSafeAreaPaddingStyle = useBottomSafeSafeAreaPaddingStyle({addBottomSafeAreaPadding: true});

if (!verificationState) {
return children;
}

switch (verificationState) {
case CONST.EXPENSIFY_CARD.VERIFICATION_STATE.LOADING:
return (
<BlockingView
title={translate('workspace.expensifyCard.verifyingBankAccount')}
subtitle={translate('workspace.expensifyCard.verifyingBankAccountDescription')}
animation={LottieAnimations.ReviewingBankInfo}
animationStyles={styles.loadingVBAAnimation}
animationWebStyle={styles.loadingVBAAnimationWeb}
subtitleStyle={styles.textLabelSupporting}
containerStyle={styles.pb20}
addBottomSafeAreaPadding
/>
);
case CONST.EXPENSIFY_CARD.VERIFICATION_STATE.ON_WAITLIST:
return (
<>
<BlockingView
title={translate('workspace.expensifyCard.oneMoreStep')}
subtitle={translate('workspace.expensifyCard.oneMoreStepDescription')}
icon={illustrations.Puzzle}
subtitleStyle={styles.textLabelSupporting}
iconHeight={variables.cardPreviewHeight}
iconWidth={variables.cardPreviewHeight}
/>
<Button
success
large
text={translate('workspace.expensifyCard.goToConcierge')}
style={[styles.m5, bottomSafeAreaPaddingStyle]}
pressOnEnter
onPress={() => Navigation.navigate(ROUTES.CONCIERGE)}
/>
</>
);
case CONST.EXPENSIFY_CARD.VERIFICATION_STATE.VERIFIED:
return (
<>
<BlockingView
title={verifiedTitle ?? translate('workspace.expensifyCard.bankAccountVerified')}
subtitle={verifiedSubtitle ?? translate('workspace.expensifyCard.bankAccountVerifiedDescription')}
animation={LottieAnimations.Fireworks}
animationStyles={styles.loadingVBAAnimation}
animationWebStyle={styles.loadingVBAAnimationWeb}
subtitleStyle={styles.textLabelSupporting}
/>
<Button
success
large
text={verifiedButtonText ?? translate('workspace.expensifyCard.gotIt')}
style={[styles.m5, bottomSafeAreaPaddingStyle]}
pressOnEnter
onPress={onVerifiedButtonPress}
/>
</>
);
default:
return children;
}
}

BankAccountVerificationView.displayName = 'BankAccountVerificationView';

export default BankAccountVerificationView;
2 changes: 2 additions & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5296,6 +5296,8 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
body: 'Sie haben noch einen offenen Reisensaldo. Bitte begleichen Sie zuerst Ihren Saldo.',
confirm: 'Verstanden',
},
enabled: 'Zentrale Rechnungsstellung aktiviert!',
enabledDescription: 'Alle Reisekosten in diesem Workspace werden nun in einer monatlichen Rechnung zentralisiert.',
},
personalDetailsDescription: 'Um eine Reise zu buchen, gib bitte deinen amtlichen Namen genau so ein, wie er auf deinem amtlichen Ausweis steht.',
},
Expand Down
2 changes: 2 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5271,6 +5271,8 @@ const translations = {
body: 'You still have an outstanding travel balance. Please pay your balance first.',
confirm: 'Got it',
},
enabled: 'Central Invoicing enabled!',
enabledDescription: 'All travel spend on this workspace will now be centralized in a monthly invoice.',
},
personalDetailsDescription: 'In order to book travel, please enter your legal name as it appears on your government-issued ID.',
},
Expand Down
2 changes: 2 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5124,6 +5124,8 @@ ${amount} para ${merchant} - ${date}`,
body: 'Aún tienes un saldo pendiente de viajes. Por favor, paga tu saldo primero.',
confirm: 'Entendido',
},
enabled: '¡Facturación centralizada habilitada!',
enabledDescription: 'Todos los gastos de viaje en este espacio de trabajo ahora se centralizarán en una factura mensual.',
},
personalDetailsDescription: 'Para poder reservar el viaje, por favor ingrese su nombre legal tal como aparece en su identificación oficial emitida por el gobierno.',
},
Expand Down
2 changes: 2 additions & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5314,6 +5314,8 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
body: 'Vous avez encore un solde de voyage impayé. Veuillez d’abord régler ce solde.',
confirm: 'Compris',
},
enabled: 'Facturation centralisée activée !',
enabledDescription: 'Toutes les dépenses de voyage sur cet espace de travail seront désormais centralisées dans une facture mensuelle.',
},
personalDetailsDescription: 'Pour pouvoir réserver un voyage, veuillez saisir votre nom légal tel qu’il apparaît sur votre pièce d’identité délivrée par le gouvernement.',
},
Expand Down
2 changes: 2 additions & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5285,6 +5285,8 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
body: 'Hai ancora un saldo di viaggio in sospeso. Paga prima il tuo saldo.',
confirm: 'Capito',
},
enabled: 'Fatturazione centralizzata abilitata!',
enabledDescription: 'Tutte le spese di viaggio in questo spazio di lavoro saranno ora centralizzate in una fattura mensile.',
},
personalDetailsDescription: 'Per prenotare il viaggio, inserisci il tuo nome legale così come appare sul tuo documento d’identità rilasciato dal governo.',
},
Expand Down
2 changes: 2 additions & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5228,6 +5228,8 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
confirm: 'オフにする',
},
outstandingBalanceModal: {title: 'トラベル請求書作成をオフにできません', body: '未清算の出張残高があります。先に残高を精算してください。', confirm: '了解しました'},
enabled: '集中請求が有効になりました!',
enabledDescription: 'このワークスペースのすべての出張費は、今後、月次請求書で一元管理されます。',
},
personalDetailsDescription: '旅行を予約するために、政府発行の身分証明書に記載されているとおりの正式な氏名を入力してください。',
},
Expand Down
2 changes: 2 additions & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5267,6 +5267,8 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
confirm: 'Uitschakelen',
},
outstandingBalanceModal: {title: 'Kan Reiskostenfacturatie niet uitschakelen', body: 'Je hebt nog een openstaand reissaldo. Betaal eerst je saldo.', confirm: 'Begrepen'},
enabled: 'Centraal factureren ingeschakeld!',
enabledDescription: 'Alle reiskosten in deze workspace worden nu gebundeld op één maandelijkse factuur.',
},
personalDetailsDescription: 'Om een reis te boeken, voer je wettelijke naam in zoals deze op je door de overheid uitgegeven identiteitsbewijs staat.',
},
Expand Down
2 changes: 2 additions & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5262,6 +5262,8 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
body: 'Masz nadal zaległe saldo za podróż. Najpierw ureguluj swoje saldo.',
confirm: 'Rozumiem',
},
enabled: 'Centralne fakturowanie włączone!',
enabledDescription: 'Wszystkie wydatki podróżne w tym obszarze roboczym będą teraz rozliczane na scentralizowanej, miesięcznej fakturze.',
},
personalDetailsDescription: 'Aby zarezerwować podróż, wpisz swoje imię i nazwisko dokładnie tak, jak widnieje w Twoim dokumencie tożsamości wydanym przez organ państwowy.',
},
Expand Down
2 changes: 2 additions & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5267,6 +5267,8 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
body: 'Você ainda tem um saldo de viagem pendente. Pague esse saldo primeiro.',
confirm: 'Entendi',
},
enabled: 'Faturamento centralizado ativado!',
enabledDescription: 'Todos os gastos de viagem neste workspace agora serão centralizados em uma fatura mensal.',
},
personalDetailsDescription: 'Para reservar viagens, insira seu nome legal exatamente como consta no documento de identificação emitido pelo governo.',
},
Expand Down
2 changes: 2 additions & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5147,6 +5147,8 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
},
disableModal: {title: '关闭差旅开票?', body: '即将到来的酒店和汽车租赁预订可能需要使用不同的付款方式重新预订,以避免被取消。', confirm: '关闭'},
outstandingBalanceModal: {title: '无法关闭差旅开票', body: '你仍有未结清的差旅余额。请先支付该余额。', confirm: '明白了'},
enabled: '中央开票已启用!',
enabledDescription: '此工作区的所有差旅支出现在将集中在一张月度发票中。',
},
personalDetailsDescription: '为预订行程,请输入您在政府签发的身份证件上显示的法定姓名。',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type ConfigureTravelInvoicingForPolicyParams = {
readonly policyID: string;
readonly settlementBankAccountID: number;
};

export default ConfigureTravelInvoicingForPolicyParams;
5 changes: 5 additions & 0 deletions src/libs/API/parameters/DeactivateTravelInvoicingParams.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type DeactivateTravelInvoicingParams = {
readonly policyID: string;
};

export default DeactivateTravelInvoicingParams;
6 changes: 0 additions & 6 deletions src/libs/API/parameters/ToggleTravelInvoicingParams.ts

This file was deleted.

3 changes: 2 additions & 1 deletion src/libs/API/parameters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,8 @@ export type {default as ExportTagsSpreadsheetParams} from './ExportTagsSpreadshe
export type {default as UpdateXeroGenericTypeParams} from './UpdateXeroGenericTypeParams';
export type {default as UpdateCardSettlementFrequencyParams} from './UpdateCardSettlementFrequencyParams';
export type {default as UpdateCardSettlementAccountParams} from './UpdateCardSettlementAccountParams';
export type {default as ToggleTravelInvoicingParams} from './ToggleTravelInvoicingParams';
export type {default as ConfigureTravelInvoicingForPolicyParams} from './ConfigureTravelInvoicingForPolicyParams';
export type {default as DeactivateTravelInvoicingParams} from './DeactivateTravelInvoicingParams';
export type {default as SetTravelInvoicingSettlementAccountParams} from './SetTravelInvoicingSettlementAccountParams';
export type {default as SetCompanyCardFeedName} from './SetCompanyCardFeedName';
export type {default as DeleteCompanyCardFeed} from './DeleteCompanyCardFeed';
Expand Down
6 changes: 4 additions & 2 deletions src/libs/API/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,8 @@ const WRITE_COMMANDS = {
DELETE_SAVED_SEARCH: 'DeleteSavedSearch',
UPDATE_CARD_SETTLEMENT_FREQUENCY: 'UpdateCardSettlementFrequency',
UPDATE_CARD_SETTLEMENT_ACCOUNT: 'UpdateCardSettlementAccount',
TOGGLE_TRAVEL_INVOICING: 'ToggleTravelInvoicing',
CONFIGURE_TRAVEL_INVOICING_FOR_POLICY: 'ConfigureTravelInvoicingForPolicy',
DEACTIVATE_TRAVEL_INVOICING: 'DeactivateTravelInvoicing',
SET_TRAVEL_INVOICING_SETTLEMENT_ACCOUNT: 'SetTravelInvoicingSettlementAccount',
UPDATE_TRAVEL_INVOICE_SETTLEMENT_FREQUENCY: 'UpdateTravelInvoiceSettlementFrequency',
UPDATE_XERO_IMPORT_TRACKING_CATEGORIES: 'UpdateXeroImportTrackingCategories',
Expand Down Expand Up @@ -1073,7 +1074,8 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.DELETE_SAVED_SEARCH]: Parameters.DeleteSavedSearchParams;
[WRITE_COMMANDS.UPDATE_CARD_SETTLEMENT_FREQUENCY]: Parameters.UpdateCardSettlementFrequencyParams;
[WRITE_COMMANDS.UPDATE_CARD_SETTLEMENT_ACCOUNT]: Parameters.UpdateCardSettlementAccountParams;
[WRITE_COMMANDS.TOGGLE_TRAVEL_INVOICING]: Parameters.ToggleTravelInvoicingParams;
[WRITE_COMMANDS.CONFIGURE_TRAVEL_INVOICING_FOR_POLICY]: Parameters.ConfigureTravelInvoicingForPolicyParams;
[WRITE_COMMANDS.DEACTIVATE_TRAVEL_INVOICING]: Parameters.DeactivateTravelInvoicingParams;
[WRITE_COMMANDS.SET_TRAVEL_INVOICING_SETTLEMENT_ACCOUNT]: Parameters.SetTravelInvoicingSettlementAccountParams;
[WRITE_COMMANDS.UPDATE_TRAVEL_INVOICE_SETTLEMENT_FREQUENCY]: Parameters.UpdateTravelInvoicingSettlementFrequencyParams;
[WRITE_COMMANDS.SET_PERSONAL_DETAILS_AND_SHIP_EXPENSIFY_CARDS]: Parameters.SetPersonalDetailsAndShipExpensifyCardsParams;
Expand Down
Loading
Loading