From 39ea094b0ae364ea1c5bff986934e1ade6a3cb67 Mon Sep 17 00:00:00 2001
From: ShridharGoel <35566748+ShridharGoel@users.noreply.github.com>
Date: Wed, 8 Jul 2026 20:17:52 +0530
Subject: [PATCH 1/4] Show modal for bank account currency permissions
---
src/languages/de.ts | 3 +++
src/languages/en.ts | 3 +++
src/languages/es.ts | 3 +++
src/languages/fr.ts | 3 +++
src/languages/it.ts | 3 +++
src/languages/ja.ts | 3 +++
src/languages/nl.ts | 3 +++
src/languages/pl.ts | 3 +++
src/languages/pt-BR.ts | 3 +++
src/languages/zh-hans.ts | 2 ++
.../workspace/workflows/WorkspaceWorkflowsPage.tsx | 12 +++++++++++-
11 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/src/languages/de.ts b/src/languages/de.ts
index 0801a375c4d4..260fb65721de 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -6952,6 +6952,9 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
updateToUSD: 'Auf USD aktualisieren',
updateWorkspaceCurrency: 'Arbeitsbereichswährung aktualisieren',
workspaceCurrencyNotSupported: 'Workspace-Währung wird nicht unterstützt',
+ notAllowedToAddBankAccountTitle: 'Nicht so schnell',
+ notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
+ `Es können nur ${currencyCode}-Bankkonten hinzugefügt werden. Bitte kontaktiere einen Workspace-Administrator, um deine Berechtigungen anzupassen.`,
yourWorkspace: `Dein Arbeitsbereich ist auf eine nicht unterstützte Währung eingestellt. Sieh dir die Liste der unterstützten Währungen an.`,
chooseAnExisting: 'Wähle ein bestehendes Bankkonto zum Bezahlen von Ausgaben oder füge ein neues hinzu.',
},
diff --git a/src/languages/en.ts b/src/languages/en.ts
index 1b28370d797b..c4a6e64978ed 100644
--- a/src/languages/en.ts
+++ b/src/languages/en.ts
@@ -7108,6 +7108,9 @@ const translations = {
updateToUSD: 'Update to USD',
updateWorkspaceCurrency: 'Update workspace currency',
workspaceCurrencyNotSupported: 'Workspace currency not supported',
+ notAllowedToAddBankAccountTitle: 'Not so fast',
+ notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
+ `Only ${currencyCode} bank accounts can be added. Please contact a workspace admin to adjust your permissions.`,
yourWorkspace: `Your workspace is set to an unsupported currency. View the list of supported currencies.`,
chooseAnExisting: 'Choose an existing bank account to pay expenses or add a new one.',
},
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 81fdd22434cf..48aa0ff2c1c6 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -6864,6 +6864,9 @@ ${amount} para ${merchant} - ${date}`,
updateToUSD: 'Actualizar a USD',
updateWorkspaceCurrency: 'Actualizar la moneda del espacio de trabajo',
workspaceCurrencyNotSupported: 'Moneda del espacio de trabajo no soportada',
+ notAllowedToAddBankAccountTitle: 'No tan rápido',
+ notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
+ `Solo se pueden agregar cuentas bancarias en ${currencyCode}. Ponte en contacto con un administrador del espacio de trabajo para ajustar tus permisos.`,
yourWorkspace: `Tu espacio de trabajo está configurado en una moneda no soportada. Consulta la lista de monedas soportadas.`,
chooseAnExisting: 'Elige una cuenta bancaria existente para pagar gastos o añade una nueva.',
},
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 67068b332ace..025b5b500cca 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -6978,6 +6978,9 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
updateToUSD: 'Mettre à jour en USD',
updateWorkspaceCurrency: 'Mettre à jour la devise de l’espace de travail',
workspaceCurrencyNotSupported: "Devise de l'espace de travail non prise en charge",
+ notAllowedToAddBankAccountTitle: 'Pas si vite',
+ notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
+ `Seuls les comptes bancaires en ${currencyCode} peuvent être ajoutés. Veuillez contacter un administrateur de l’espace de travail pour ajuster vos autorisations.`,
yourWorkspace: `Votre espace de travail est défini sur une devise non prise en charge. Consultez la liste des devises prises en charge.`,
chooseAnExisting: 'Choisissez un compte bancaire existant pour payer les dépenses ou ajoutez-en un nouveau.',
},
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 8e358f3486c4..413692312004 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -6935,6 +6935,9 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
updateToUSD: 'Aggiorna a USD',
updateWorkspaceCurrency: 'Aggiorna la valuta dello spazio di lavoro',
workspaceCurrencyNotSupported: 'Valuta dello spazio di lavoro non supportata',
+ notAllowedToAddBankAccountTitle: 'Non così in fretta',
+ notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
+ `È possibile aggiungere solo conti bancari in ${currencyCode}. Contatta un amministratore dell’area di lavoro per modificare le tue autorizzazioni.`,
yourWorkspace: `La tua area di lavoro è impostata su una valuta non supportata. Visualizza l’elenco delle valute supportate.`,
chooseAnExisting: 'Scegli un conto bancario esistente per pagare le spese oppure aggiungine uno nuovo.',
},
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index ad8efa0f6fa3..2c85f587dff6 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -6854,6 +6854,9 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
updateToUSD: 'USD に更新',
updateWorkspaceCurrency: 'ワークスペースの通貨を更新',
workspaceCurrencyNotSupported: 'ワークスペースの通貨はサポートされていません',
+ notAllowedToAddBankAccountTitle: 'ちょっと待ってください',
+ notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
+ `追加できるのは${currencyCode}の銀行口座のみです。権限を調整するには、ワークスペース管理者にお問い合わせください。`,
yourWorkspace: `ご利用のワークスペースはサポートされていない通貨に設定されています。サポートされている通貨の一覧を表示します。`,
chooseAnExisting: '既存の銀行口座を選択して経費を支払うか、新しい口座を追加してください。',
},
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 5092a8db326c..1311ee2c3725 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -6918,6 +6918,9 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
updateToUSD: 'Bijwerken naar USD',
updateWorkspaceCurrency: 'Werkruimtevaluta bijwerken',
workspaceCurrencyNotSupported: 'Werkruimtevaluta wordt niet ondersteund',
+ notAllowedToAddBankAccountTitle: 'Niet zo snel',
+ notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
+ `Alleen ${currencyCode}-bankrekeningen kunnen worden toegevoegd. Neem contact op met een werkruimtebeheerder om je rechten aan te passen.`,
yourWorkspace: `Je werkruimte is ingesteld op een niet-ondersteunde valuta. Bekijk de lijst met ondersteunde valuta's.`,
chooseAnExisting: 'Kies een bestaande bankrekening om onkosten te betalen of voeg een nieuwe toe.',
},
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 37c699c5446b..b350d2f3db31 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -6901,6 +6901,9 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
updateToUSD: 'Zaktualizuj na USD',
updateWorkspaceCurrency: 'Zaktualizuj walutę przestrzeni roboczej',
workspaceCurrencyNotSupported: 'Waluta przestrzeni roboczej nie jest obsługiwana',
+ notAllowedToAddBankAccountTitle: 'Nie tak szybko',
+ notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
+ `Można dodać tylko konta bankowe w walucie ${currencyCode}. Skontaktuj się z administratorem obszaru roboczego, aby dostosować swoje uprawnienia.`,
yourWorkspace: `Twoje miejsce pracy jest ustawione na nieobsługiwaną walutę. Zobacz listę obsługiwanych walut.`,
chooseAnExisting: 'Wybierz istniejące konto bankowe do opłacania wydatków lub dodaj nowe.',
},
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 66f8e382e38e..aac253496332 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -6910,6 +6910,9 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
updateToUSD: 'Atualizar para USD',
updateWorkspaceCurrency: 'Atualizar moeda do espaço de trabalho',
workspaceCurrencyNotSupported: 'Moeda do workspace não suportada',
+ notAllowedToAddBankAccountTitle: 'Não tão rápido',
+ notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
+ `Somente contas bancárias em ${currencyCode} podem ser adicionadas. Entre em contato com um administrador do workspace para ajustar suas permissões.`,
yourWorkspace: `Seu workspace está configurado para uma moeda não compatível. Veja a lista de moedas compatíveis.`,
chooseAnExisting: 'Escolha uma conta bancária existente para pagar despesas ou adicione uma nova.',
},
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 735772161929..c4d7b07d771d 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -6721,6 +6721,8 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
updateToUSD: '更新为 USD',
updateWorkspaceCurrency: '更新工作区货币',
workspaceCurrencyNotSupported: '不支持工作区货币',
+ notAllowedToAddBankAccountTitle: '先别急',
+ notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) => `只能添加 ${currencyCode} 银行账户。请联系工作区管理员来调整你的权限。`,
yourWorkspace: `您的工作区当前使用不受支持的货币。请查看支持的货币列表。`,
chooseAnExisting: '选择现有银行账户来支付报销,或添加新账户。',
},
diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
index 228a527ea6e0..d940aa1bb499 100644
--- a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
+++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
@@ -56,6 +56,7 @@ import {
hasDynamicExternalWorkflow,
isControlPolicy,
isGroupPolicy as isGroupPolicyUtil,
+ isPolicyAdmin,
} from '@libs/PolicyUtils';
import {hasInProgressVBBA} from '@libs/ReimbursementAccountUtils';
import tokenizedSearch from '@libs/tokenizedSearch';
@@ -226,8 +227,17 @@ function WorkspaceWorkflowsPage({policy, route}: WorkspaceWorkflowsPageProps) {
if (!policy) {
return;
}
+ if (!isPolicyAdmin(policy, currentUserLogin)) {
+ showConfirmModal({
+ title: translate('workspace.bankAccount.notAllowedToAddBankAccountTitle'),
+ prompt: translate('workspace.bankAccount.notAllowedToAddBankAccount', {currencyCode: policy.outputCurrency}),
+ confirmText: translate('common.ok'),
+ shouldShowCancelButton: false,
+ });
+ return;
+ }
Navigation.navigate(ROUTES.WORKSPACE_OVERVIEW_CURRENCY.getRoute(policy.id, true));
- }, [policy]);
+ }, [currentUserLogin, policy, showConfirmModal, translate]);
const {isOffline} = useNetwork({onReconnect: fetchData});
const canReadWorkflows = canMemberRead(policy, currentUserLogin, CONST.POLICY.POLICY_FEATURE.WORKFLOWS);
From c9b7ee3ef2e2d10c636f1661dbe5deee9f16f351 Mon Sep 17 00:00:00 2001
From: ShridharGoel <35566748+ShridharGoel@users.noreply.github.com>
Date: Wed, 8 Jul 2026 20:39:11 +0530
Subject: [PATCH 2/4] Move bank account permission modal to add action
---
src/languages/de.ts | 1 -
src/languages/en.ts | 1 -
src/languages/es.ts | 1 -
src/languages/fr.ts | 1 -
src/languages/it.ts | 1 -
src/languages/ja.ts | 1 -
src/languages/nl.ts | 1 -
src/languages/pl.ts | 1 -
src/languages/pt-BR.ts | 1 -
src/languages/zh-hans.ts | 1 -
.../workflows/WorkspaceWorkflowsPage.tsx | 26 ++++++++++++-------
11 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/src/languages/de.ts b/src/languages/de.ts
index 260fb65721de..797b98f8d91a 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -6952,7 +6952,6 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
updateToUSD: 'Auf USD aktualisieren',
updateWorkspaceCurrency: 'Arbeitsbereichswährung aktualisieren',
workspaceCurrencyNotSupported: 'Workspace-Währung wird nicht unterstützt',
- notAllowedToAddBankAccountTitle: 'Nicht so schnell',
notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
`Es können nur ${currencyCode}-Bankkonten hinzugefügt werden. Bitte kontaktiere einen Workspace-Administrator, um deine Berechtigungen anzupassen.`,
yourWorkspace: `Dein Arbeitsbereich ist auf eine nicht unterstützte Währung eingestellt. Sieh dir die Liste der unterstützten Währungen an.`,
diff --git a/src/languages/en.ts b/src/languages/en.ts
index c4a6e64978ed..62aa6eb4aca6 100644
--- a/src/languages/en.ts
+++ b/src/languages/en.ts
@@ -7108,7 +7108,6 @@ const translations = {
updateToUSD: 'Update to USD',
updateWorkspaceCurrency: 'Update workspace currency',
workspaceCurrencyNotSupported: 'Workspace currency not supported',
- notAllowedToAddBankAccountTitle: 'Not so fast',
notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
`Only ${currencyCode} bank accounts can be added. Please contact a workspace admin to adjust your permissions.`,
yourWorkspace: `Your workspace is set to an unsupported currency. View the list of supported currencies.`,
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 48aa0ff2c1c6..5b3b1234e386 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -6864,7 +6864,6 @@ ${amount} para ${merchant} - ${date}`,
updateToUSD: 'Actualizar a USD',
updateWorkspaceCurrency: 'Actualizar la moneda del espacio de trabajo',
workspaceCurrencyNotSupported: 'Moneda del espacio de trabajo no soportada',
- notAllowedToAddBankAccountTitle: 'No tan rápido',
notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
`Solo se pueden agregar cuentas bancarias en ${currencyCode}. Ponte en contacto con un administrador del espacio de trabajo para ajustar tus permisos.`,
yourWorkspace: `Tu espacio de trabajo está configurado en una moneda no soportada. Consulta la lista de monedas soportadas.`,
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 025b5b500cca..fb9006d9145b 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -6978,7 +6978,6 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
updateToUSD: 'Mettre à jour en USD',
updateWorkspaceCurrency: 'Mettre à jour la devise de l’espace de travail',
workspaceCurrencyNotSupported: "Devise de l'espace de travail non prise en charge",
- notAllowedToAddBankAccountTitle: 'Pas si vite',
notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
`Seuls les comptes bancaires en ${currencyCode} peuvent être ajoutés. Veuillez contacter un administrateur de l’espace de travail pour ajuster vos autorisations.`,
yourWorkspace: `Votre espace de travail est défini sur une devise non prise en charge. Consultez la liste des devises prises en charge.`,
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 413692312004..24f79b7e50bd 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -6935,7 +6935,6 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
updateToUSD: 'Aggiorna a USD',
updateWorkspaceCurrency: 'Aggiorna la valuta dello spazio di lavoro',
workspaceCurrencyNotSupported: 'Valuta dello spazio di lavoro non supportata',
- notAllowedToAddBankAccountTitle: 'Non così in fretta',
notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
`È possibile aggiungere solo conti bancari in ${currencyCode}. Contatta un amministratore dell’area di lavoro per modificare le tue autorizzazioni.`,
yourWorkspace: `La tua area di lavoro è impostata su una valuta non supportata. Visualizza l’elenco delle valute supportate.`,
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 2c85f587dff6..fb0ab8205b66 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -6854,7 +6854,6 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
updateToUSD: 'USD に更新',
updateWorkspaceCurrency: 'ワークスペースの通貨を更新',
workspaceCurrencyNotSupported: 'ワークスペースの通貨はサポートされていません',
- notAllowedToAddBankAccountTitle: 'ちょっと待ってください',
notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
`追加できるのは${currencyCode}の銀行口座のみです。権限を調整するには、ワークスペース管理者にお問い合わせください。`,
yourWorkspace: `ご利用のワークスペースはサポートされていない通貨に設定されています。サポートされている通貨の一覧を表示します。`,
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 1311ee2c3725..9b7b6bcc1260 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -6918,7 +6918,6 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
updateToUSD: 'Bijwerken naar USD',
updateWorkspaceCurrency: 'Werkruimtevaluta bijwerken',
workspaceCurrencyNotSupported: 'Werkruimtevaluta wordt niet ondersteund',
- notAllowedToAddBankAccountTitle: 'Niet zo snel',
notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
`Alleen ${currencyCode}-bankrekeningen kunnen worden toegevoegd. Neem contact op met een werkruimtebeheerder om je rechten aan te passen.`,
yourWorkspace: `Je werkruimte is ingesteld op een niet-ondersteunde valuta. Bekijk de lijst met ondersteunde valuta's.`,
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index b350d2f3db31..19e8d2599328 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -6901,7 +6901,6 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
updateToUSD: 'Zaktualizuj na USD',
updateWorkspaceCurrency: 'Zaktualizuj walutę przestrzeni roboczej',
workspaceCurrencyNotSupported: 'Waluta przestrzeni roboczej nie jest obsługiwana',
- notAllowedToAddBankAccountTitle: 'Nie tak szybko',
notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
`Można dodać tylko konta bankowe w walucie ${currencyCode}. Skontaktuj się z administratorem obszaru roboczego, aby dostosować swoje uprawnienia.`,
yourWorkspace: `Twoje miejsce pracy jest ustawione na nieobsługiwaną walutę. Zobacz listę obsługiwanych walut.`,
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index aac253496332..63381267b334 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -6910,7 +6910,6 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
updateToUSD: 'Atualizar para USD',
updateWorkspaceCurrency: 'Atualizar moeda do espaço de trabalho',
workspaceCurrencyNotSupported: 'Moeda do workspace não suportada',
- notAllowedToAddBankAccountTitle: 'Não tão rápido',
notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
`Somente contas bancárias em ${currencyCode} podem ser adicionadas. Entre em contato com um administrador do workspace para ajustar suas permissões.`,
yourWorkspace: `Seu workspace está configurado para uma moeda não compatível. Veja a lista de moedas compatíveis.`,
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index c4d7b07d771d..201f8534513b 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -6721,7 +6721,6 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
updateToUSD: '更新为 USD',
updateWorkspaceCurrency: '更新工作区货币',
workspaceCurrencyNotSupported: '不支持工作区货币',
- notAllowedToAddBankAccountTitle: '先别急',
notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) => `只能添加 ${currencyCode} 银行账户。请联系工作区管理员来调整你的权限。`,
yourWorkspace: `您的工作区当前使用不受支持的货币。请查看支持的货币列表。`,
chooseAnExisting: '选择现有银行账户来支付报销,或添加新账户。',
diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
index d940aa1bb499..f965fb00dbc1 100644
--- a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
+++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
@@ -223,21 +223,25 @@ function WorkspaceWorkflowsPage({policy, route}: WorkspaceWorkflowsPageProps) {
getPaymentMethods();
}, [route.params.policyID]);
- const confirmCurrencyChangeAndHideModal = useCallback(() => {
+ const showNotAllowedToAddBankAccountModal = useCallback(() => {
if (!policy) {
return;
}
- if (!isPolicyAdmin(policy, currentUserLogin)) {
- showConfirmModal({
- title: translate('workspace.bankAccount.notAllowedToAddBankAccountTitle'),
- prompt: translate('workspace.bankAccount.notAllowedToAddBankAccount', {currencyCode: policy.outputCurrency}),
- confirmText: translate('common.ok'),
- shouldShowCancelButton: false,
- });
+
+ showConfirmModal({
+ title: translate('supportalNoAccess.title'),
+ prompt: translate('workspace.bankAccount.notAllowedToAddBankAccount', {currencyCode: policy.outputCurrency}),
+ confirmText: translate('common.ok'),
+ shouldShowCancelButton: false,
+ });
+ }, [policy, showConfirmModal, translate]);
+
+ const confirmCurrencyChangeAndHideModal = useCallback(() => {
+ if (!policy) {
return;
}
Navigation.navigate(ROUTES.WORKSPACE_OVERVIEW_CURRENCY.getRoute(policy.id, true));
- }, [currentUserLogin, policy, showConfirmModal, translate]);
+ }, [policy]);
const {isOffline} = useNetwork({onReconnect: fetchData});
const canReadWorkflows = canMemberRead(policy, currentUserLogin, CONST.POLICY.POLICY_FEATURE.WORKFLOWS);
@@ -762,6 +766,10 @@ function WorkspaceWorkflowsPage({policy, route}: WorkspaceWorkflowsPageProps) {
return;
}
if (!isCurrencySupportedForGlobalReimbursement((policy?.outputCurrency ?? '') as CurrencyType)) {
+ if (!isPolicyAdmin(policy, currentUserLogin)) {
+ showNotAllowedToAddBankAccountModal();
+ return;
+ }
showConfirmModal({
title: translate('workspace.bankAccount.workspaceCurrencyNotSupported'),
prompt: updateWorkspaceCurrencyPrompt,
From ef640518e9fac3ffde771ab10cd5e6fc2f4ca571 Mon Sep 17 00:00:00 2001
From: ShridharGoel <35566748+ShridharGoel@users.noreply.github.com>
Date: Sun, 12 Jul 2026 14:41:48 +0530
Subject: [PATCH 3/4] Fix workflow bank account modal lint issues
---
src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
index f965fb00dbc1..6dbc20c3de1a 100644
--- a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
+++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
@@ -139,7 +139,7 @@ function WorkflowsLoadMoreCard({count, onPress}: {count: number; onPress: () =>
{label}
@@ -223,7 +223,7 @@ function WorkspaceWorkflowsPage({policy, route}: WorkspaceWorkflowsPageProps) {
getPaymentMethods();
}, [route.params.policyID]);
- const showNotAllowedToAddBankAccountModal = useCallback(() => {
+ const showAddBankAccountPermissionModal = useCallback(() => {
if (!policy) {
return;
}
@@ -767,7 +767,7 @@ function WorkspaceWorkflowsPage({policy, route}: WorkspaceWorkflowsPageProps) {
}
if (!isCurrencySupportedForGlobalReimbursement((policy?.outputCurrency ?? '') as CurrencyType)) {
if (!isPolicyAdmin(policy, currentUserLogin)) {
- showNotAllowedToAddBankAccountModal();
+ showAddBankAccountPermissionModal();
return;
}
showConfirmModal({
@@ -896,6 +896,7 @@ function WorkspaceWorkflowsPage({policy, route}: WorkspaceWorkflowsPageProps) {
isSelfTourViewed,
hasValidExistingAccounts,
shouldShowContinueModal,
+ showAddBankAccountPermissionModal,
confirmCurrencyChangeAndHideModal,
delegateAccountID,
canAccessSubmit2026Features,
From 2d0295a0dd689564a7977989d85ba0eadc9938ac Mon Sep 17 00:00:00 2001
From: ShridharGoel <35566748+ShridharGoel@users.noreply.github.com>
Date: Fri, 17 Jul 2026 11:26:50 +0530
Subject: [PATCH 4/4] Update unsupported workspace currency copy
---
src/languages/de.ts | 4 ++--
src/languages/en.ts | 3 +--
src/languages/es.ts | 4 ++--
src/languages/fr.ts | 3 +--
src/languages/it.ts | 3 +--
src/languages/ja.ts | 3 +--
src/languages/nl.ts | 3 +--
src/languages/pl.ts | 4 ++--
src/languages/pt-BR.ts | 3 +--
src/languages/zh-hans.ts | 2 +-
.../workspace/workflows/WorkspaceWorkflowsPage.tsx | 12 ++++--------
11 files changed, 17 insertions(+), 27 deletions(-)
diff --git a/src/languages/de.ts b/src/languages/de.ts
index 797b98f8d91a..3138d85ebda7 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -6952,8 +6952,8 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
updateToUSD: 'Auf USD aktualisieren',
updateWorkspaceCurrency: 'Arbeitsbereichswährung aktualisieren',
workspaceCurrencyNotSupported: 'Workspace-Währung wird nicht unterstützt',
- notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
- `Es können nur ${currencyCode}-Bankkonten hinzugefügt werden. Bitte kontaktiere einen Workspace-Administrator, um deine Berechtigungen anzupassen.`,
+ notAllowedToAddBankAccount:
+ 'Dein Arbeitsbereich ist auf eine nicht unterstützte Währung eingestellt. Wende dich an einen Arbeitsbereichsadministrator, der berechtigt ist, sie zu ändern.',
yourWorkspace: `Dein Arbeitsbereich ist auf eine nicht unterstützte Währung eingestellt. Sieh dir die Liste der unterstützten Währungen an.`,
chooseAnExisting: 'Wähle ein bestehendes Bankkonto zum Bezahlen von Ausgaben oder füge ein neues hinzu.',
},
diff --git a/src/languages/en.ts b/src/languages/en.ts
index 62aa6eb4aca6..120ab1509bd2 100644
--- a/src/languages/en.ts
+++ b/src/languages/en.ts
@@ -7108,8 +7108,7 @@ const translations = {
updateToUSD: 'Update to USD',
updateWorkspaceCurrency: 'Update workspace currency',
workspaceCurrencyNotSupported: 'Workspace currency not supported',
- notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
- `Only ${currencyCode} bank accounts can be added. Please contact a workspace admin to adjust your permissions.`,
+ notAllowedToAddBankAccount: 'Your workspace is set to an unsupported currency. Contact a workspace admin with permission to change it.',
yourWorkspace: `Your workspace is set to an unsupported currency. View the list of supported currencies.`,
chooseAnExisting: 'Choose an existing bank account to pay expenses or add a new one.',
},
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 5b3b1234e386..0f533b3bb31e 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -6864,8 +6864,8 @@ ${amount} para ${merchant} - ${date}`,
updateToUSD: 'Actualizar a USD',
updateWorkspaceCurrency: 'Actualizar la moneda del espacio de trabajo',
workspaceCurrencyNotSupported: 'Moneda del espacio de trabajo no soportada',
- notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
- `Solo se pueden agregar cuentas bancarias en ${currencyCode}. Ponte en contacto con un administrador del espacio de trabajo para ajustar tus permisos.`,
+ notAllowedToAddBankAccount:
+ 'Tu espacio de trabajo está configurado en una moneda no compatible. Ponte en contacto con un administrador del espacio de trabajo que tenga permiso para cambiarla.',
yourWorkspace: `Tu espacio de trabajo está configurado en una moneda no soportada. Consulta la lista de monedas soportadas.`,
chooseAnExisting: 'Elige una cuenta bancaria existente para pagar gastos o añade una nueva.',
},
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index fb9006d9145b..2a67ff3f9923 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -6978,8 +6978,7 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
updateToUSD: 'Mettre à jour en USD',
updateWorkspaceCurrency: 'Mettre à jour la devise de l’espace de travail',
workspaceCurrencyNotSupported: "Devise de l'espace de travail non prise en charge",
- notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
- `Seuls les comptes bancaires en ${currencyCode} peuvent être ajoutés. Veuillez contacter un administrateur de l’espace de travail pour ajuster vos autorisations.`,
+ notAllowedToAddBankAccount: 'Votre espace de travail est défini sur une devise non prise en charge. Contactez un administrateur de l’espace de travail autorisé à la modifier.',
yourWorkspace: `Votre espace de travail est défini sur une devise non prise en charge. Consultez la liste des devises prises en charge.`,
chooseAnExisting: 'Choisissez un compte bancaire existant pour payer les dépenses ou ajoutez-en un nouveau.',
},
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 24f79b7e50bd..0ca2aae06f44 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -6935,8 +6935,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
updateToUSD: 'Aggiorna a USD',
updateWorkspaceCurrency: 'Aggiorna la valuta dello spazio di lavoro',
workspaceCurrencyNotSupported: 'Valuta dello spazio di lavoro non supportata',
- notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
- `È possibile aggiungere solo conti bancari in ${currencyCode}. Contatta un amministratore dell’area di lavoro per modificare le tue autorizzazioni.`,
+ notAllowedToAddBankAccount: 'Il tuo spazio di lavoro è impostato su una valuta non supportata. Contatta un amministratore dello spazio di lavoro autorizzato a modificarla.',
yourWorkspace: `La tua area di lavoro è impostata su una valuta non supportata. Visualizza l’elenco delle valute supportate.`,
chooseAnExisting: 'Scegli un conto bancario esistente per pagare le spese oppure aggiungine uno nuovo.',
},
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index fb0ab8205b66..293b28d219e8 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -6854,8 +6854,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
updateToUSD: 'USD に更新',
updateWorkspaceCurrency: 'ワークスペースの通貨を更新',
workspaceCurrencyNotSupported: 'ワークスペースの通貨はサポートされていません',
- notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
- `追加できるのは${currencyCode}の銀行口座のみです。権限を調整するには、ワークスペース管理者にお問い合わせください。`,
+ notAllowedToAddBankAccount: 'ワークスペースはサポートされていない通貨に設定されています。通貨を変更する権限を持つワークスペース管理者にお問い合わせください。',
yourWorkspace: `ご利用のワークスペースはサポートされていない通貨に設定されています。サポートされている通貨の一覧を表示します。`,
chooseAnExisting: '既存の銀行口座を選択して経費を支払うか、新しい口座を追加してください。',
},
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 9b7b6bcc1260..ae40685dbb3f 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -6918,8 +6918,7 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
updateToUSD: 'Bijwerken naar USD',
updateWorkspaceCurrency: 'Werkruimtevaluta bijwerken',
workspaceCurrencyNotSupported: 'Werkruimtevaluta wordt niet ondersteund',
- notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
- `Alleen ${currencyCode}-bankrekeningen kunnen worden toegevoegd. Neem contact op met een werkruimtebeheerder om je rechten aan te passen.`,
+ notAllowedToAddBankAccount: 'Je werkruimte is ingesteld op een niet-ondersteunde valuta. Neem contact op met een werkruimtebeheerder die toestemming heeft om deze te wijzigen.',
yourWorkspace: `Je werkruimte is ingesteld op een niet-ondersteunde valuta. Bekijk de lijst met ondersteunde valuta's.`,
chooseAnExisting: 'Kies een bestaande bankrekening om onkosten te betalen of voeg een nieuwe toe.',
},
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 19e8d2599328..80b82846441d 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -6901,8 +6901,8 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
updateToUSD: 'Zaktualizuj na USD',
updateWorkspaceCurrency: 'Zaktualizuj walutę przestrzeni roboczej',
workspaceCurrencyNotSupported: 'Waluta przestrzeni roboczej nie jest obsługiwana',
- notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
- `Można dodać tylko konta bankowe w walucie ${currencyCode}. Skontaktuj się z administratorem obszaru roboczego, aby dostosować swoje uprawnienia.`,
+ notAllowedToAddBankAccount:
+ 'Twoja przestrzeń robocza ma ustawioną nieobsługiwaną walutę. Skontaktuj się z administratorem przestrzeni roboczej, który ma uprawnienia do jej zmiany.',
yourWorkspace: `Twoje miejsce pracy jest ustawione na nieobsługiwaną walutę. Zobacz listę obsługiwanych walut.`,
chooseAnExisting: 'Wybierz istniejące konto bankowe do opłacania wydatków lub dodaj nowe.',
},
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 63381267b334..6477d121f864 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -6910,8 +6910,7 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
updateToUSD: 'Atualizar para USD',
updateWorkspaceCurrency: 'Atualizar moeda do espaço de trabalho',
workspaceCurrencyNotSupported: 'Moeda do workspace não suportada',
- notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) =>
- `Somente contas bancárias em ${currencyCode} podem ser adicionadas. Entre em contato com um administrador do workspace para ajustar suas permissões.`,
+ notAllowedToAddBankAccount: 'Seu workspace está configurado com uma moeda não compatível. Entre em contato com um administrador do workspace que tenha permissão para alterá-la.',
yourWorkspace: `Seu workspace está configurado para uma moeda não compatível. Veja a lista de moedas compatíveis.`,
chooseAnExisting: 'Escolha uma conta bancária existente para pagar despesas ou adicione uma nova.',
},
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 201f8534513b..7ce1d2c2a275 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -6721,7 +6721,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
updateToUSD: '更新为 USD',
updateWorkspaceCurrency: '更新工作区货币',
workspaceCurrencyNotSupported: '不支持工作区货币',
- notAllowedToAddBankAccount: ({currencyCode}: {currencyCode: string}) => `只能添加 ${currencyCode} 银行账户。请联系工作区管理员来调整你的权限。`,
+ notAllowedToAddBankAccount: '您的工作区设置了不受支持的货币。请联系有权更改该货币的工作区管理员。',
yourWorkspace: `您的工作区当前使用不受支持的货币。请查看支持的货币列表。`,
chooseAnExisting: '选择现有银行账户来支付报销,或添加新账户。',
},
diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
index 6dbc20c3de1a..e8007bb9c4a3 100644
--- a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
+++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
@@ -224,17 +224,13 @@ function WorkspaceWorkflowsPage({policy, route}: WorkspaceWorkflowsPageProps) {
}, [route.params.policyID]);
const showAddBankAccountPermissionModal = useCallback(() => {
- if (!policy) {
- return;
- }
-
showConfirmModal({
- title: translate('supportalNoAccess.title'),
- prompt: translate('workspace.bankAccount.notAllowedToAddBankAccount', {currencyCode: policy.outputCurrency}),
- confirmText: translate('common.ok'),
+ title: translate('workspace.bankAccount.workspaceCurrencyNotSupported'),
+ prompt: translate('workspace.bankAccount.notAllowedToAddBankAccount'),
+ confirmText: translate('common.buttonConfirm'),
shouldShowCancelButton: false,
});
- }, [policy, showConfirmModal, translate]);
+ }, [showConfirmModal, translate]);
const confirmCurrencyChangeAndHideModal = useCallback(() => {
if (!policy) {