diff --git a/src/hooks/useCanEnrollNewExpensifyCardProgram.ts b/src/hooks/useCanEnrollNewExpensifyCardProgram.ts
new file mode 100644
index 000000000000..a6852b408728
--- /dev/null
+++ b/src/hooks/useCanEnrollNewExpensifyCardProgram.ts
@@ -0,0 +1,21 @@
+import CONST from '@src/CONST';
+
+import useExpensifyCardUkEuSupported from './useExpensifyCardUkEuSupported';
+import usePolicy from './usePolicy';
+
+/**
+ * Whether the workspace currency allows enrollment in a new Expensify Card program.
+ * Linking an existing card feed is not restricted by currency.
+ *
+ * Also returns `isUkEuCurrencySupported` so that callers which need both values do not have to call
+ * `useExpensifyCardUkEuSupported` a second time.
+ */
+export default function useCanEnrollNewExpensifyCardProgram(policyID?: string) {
+ const policy = usePolicy(policyID);
+ const isUkEuCurrencySupported = useExpensifyCardUkEuSupported(policyID);
+
+ return {
+ canEnrollNewCardProgram: policy?.outputCurrency === CONST.CURRENCY.USD || isUkEuCurrencySupported,
+ isUkEuCurrencySupported,
+ };
+}
diff --git a/src/languages/de.ts b/src/languages/de.ts
index b2801a90500b..577eecb676d7 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -7234,6 +7234,10 @@ Der Control-Tarif beginnt bei 9 $ pro aktivem Mitglied und Monat.`,
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.',
changeBankAccount: 'Bankkonto ändern',
+ updateCurrencyForExpensifyCard: 'Die Expensify Karte kann in USD ausgegeben werden. Bitte aktualisieren Sie diesen Workspace auf USD oder verwenden Sie einen anderen Workspace.',
+ updateCurrencyForExpensifyCardTitle: 'Expensify Karte bestellen',
+ euUkUpdateCurrencyForExpensifyCard:
+ 'Die Expensify Karte kann in USD, GBP und EUR ausgestellt werden. Bitte aktualisieren Sie diesen Workspace auf eine unterstützte Währung oder verwenden Sie einen anderen Workspace.',
},
changeOwner: {
changeOwnerPageTitle: 'Besitz übertragen',
diff --git a/src/languages/el.ts b/src/languages/el.ts
index 9155388c6cac..46715d6c3d35 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -7493,6 +7493,10 @@ _Για πιο αναλυτικές οδηγίες, [επισκεφθείτε τ
notAllowedToAddBankAccount:
'Ο χώρος εργασίας σας είναι ρυθμισμένος σε μη υποστηριζόμενο νόμισμα. Επικοινωνήστε με έναν διαχειριστή χώρου εργασίας που έχει δικαίωμα να το αλλάξει.',
changeBankAccount: 'Αλλαγή τραπεζικού λογαριασμού',
+ updateCurrencyForExpensifyCard: 'Η Κάρτα Expensify είναι διαθέσιμη για έκδοση σε USD. Ενημερώστε αυτόν τον χώρο εργασίας σε USD ή χρησιμοποιήστε έναν διαφορετικό χώρο εργασίας.',
+ updateCurrencyForExpensifyCardTitle: 'Αποκτήστε την Κάρτα Expensify',
+ euUkUpdateCurrencyForExpensifyCard:
+ 'Η Κάρτα Expensify είναι διαθέσιμη για έκδοση σε USD, GBP και EUR. Ενημερώστε αυτόν τον χώρο εργασίας σε ένα υποστηριζόμενο νόμισμα ή χρησιμοποιήστε έναν διαφορετικό χώρο εργασίας.',
},
changeOwner: {
changeOwnerPageTitle: 'Μεταφορά ιδιοκτήτη',
diff --git a/src/languages/en.ts b/src/languages/en.ts
index c5a3c3256942..74a13f95bc45 100644
--- a/src/languages/en.ts
+++ b/src/languages/en.ts
@@ -7421,6 +7421,10 @@ const translations = {
areYouSure: 'Are you sure?',
workspaceCurrency: 'Workspace currency',
updateCurrencyPrompt: 'It looks like your workspace is currently set to a different currency than USD. Please click the button below to update your currency to USD now.',
+ updateCurrencyForExpensifyCard: 'The Expensify Card is available to issue in USD. Please update this workspace to USD or use a different workspace.',
+ euUkUpdateCurrencyForExpensifyCard:
+ 'The Expensify Card is available to issue in USD, GBP, and EUR. Please update this workspace to a supported currency or use a different workspace.',
+ updateCurrencyForExpensifyCardTitle: 'Get the Expensify Card',
updateToUSD: 'Update to USD',
updateWorkspaceCurrency: 'Update workspace currency',
workspaceCurrencyNotSupported: 'Workspace currency not supported',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index fa2723156b67..53562e35b6f8 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -7199,6 +7199,11 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`,
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.',
changeBankAccount: 'Cambiar cuenta bancaria',
+ updateCurrencyForExpensifyCard:
+ 'La Tarjeta Expensify está disponible para emitirse en USD. Por favor, actualiza este espacio de trabajo a USD o usa un espacio de trabajo diferente.',
+ updateCurrencyForExpensifyCardTitle: 'Consigue la Tarjeta Expensify',
+ euUkUpdateCurrencyForExpensifyCard:
+ 'La Tarjeta Expensify está disponible para emitirse en USD, GBP y EUR. Actualiza este espacio de trabajo a una moneda compatible o utiliza un espacio de trabajo diferente.',
},
changeOwner: {
changeOwnerPageTitle: 'Transferir la propiedad',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 65756cc5b1f9..23138fb6e55c 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -7257,6 +7257,11 @@ Le forfait Control commence à 9 $ par Membre actif et par mois.`,
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.',
changeBankAccount: 'Changer de compte bancaire',
+ updateCurrencyForExpensifyCard:
+ "La Carte Expensify est disponible à l'émission en USD. Veuillez mettre à jour cet espace de travail en USD ou utiliser un autre espace de travail.",
+ updateCurrencyForExpensifyCardTitle: 'Obtenir la Carte Expensify',
+ euUkUpdateCurrencyForExpensifyCard:
+ 'La Carte Expensify peut être émise en USD, GBP et EUR. Veuillez mettre à jour cet espace de travail vers une devise prise en charge ou utiliser un autre espace de travail.',
},
changeOwner: {
changeOwnerPageTitle: 'Transférer le responsable',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 399a66ba5506..c88846881819 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -7202,6 +7202,9 @@ Il piano Control parte da 9 $ al mese per ogni membro attivo.`,
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.',
changeBankAccount: 'Cambia conto bancario',
+ updateCurrencyForExpensifyCard: 'La Carta Expensify è disponibile per l’emissione in USD. Aggiorna questo workspace in USD oppure usa un altro workspace.',
+ updateCurrencyForExpensifyCardTitle: 'Ottieni la Carta Expensify',
+ euUkUpdateCurrencyForExpensifyCard: 'La Carta Expensify è disponibile in USD, GBP ed EUR. Aggiorna questo workspace a una valuta supportata oppure usa un altro workspace.',
},
changeOwner: {
changeOwnerPageTitle: 'Trasferisci proprietario',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index e96d0cfe01a0..aec7a870c1cd 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -7116,6 +7116,9 @@ Control プランは、アクティブメンバー1人あたり月額 $9 から
yourWorkspace: `ご利用のワークスペースはサポートされていない通貨に設定されています。サポートされている通貨の一覧を表示します。`,
chooseAnExisting: '既存の銀行口座を選択して経費を支払うか、新しい口座を追加してください。',
changeBankAccount: '銀行口座を変更',
+ updateCurrencyForExpensifyCard: 'Expensify カードは USD でのみ発行できます。このワークスペースを USD に更新するか、別のワークスペースをご利用ください。',
+ updateCurrencyForExpensifyCardTitle: 'Expensify カードを申し込む',
+ euUkUpdateCurrencyForExpensifyCard: 'Expensify カードは USD、GBP、EUR で発行できます。このワークスペースを対応している通貨に更新するか、別のワークスペースを使用してください。',
},
changeOwner: {
changeOwnerPageTitle: '所有者を変更',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 9e7b2b26cdcd..f3e6b0523236 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -7186,6 +7186,10 @@ Het Control-abonnement begint bij $9 per actieve deelnemer per maand.`,
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.',
changeBankAccount: 'Bankrekening wijzigen',
+ updateCurrencyForExpensifyCard: 'De Expensify Kaart kan alleen in USD worden uitgegeven. Werk deze workspace bij naar USD of gebruik een andere workspace.',
+ updateCurrencyForExpensifyCardTitle: 'Vraag de Expensify Kaart aan',
+ euUkUpdateCurrencyForExpensifyCard:
+ 'De Expensify Kaart kan worden uitgegeven in USD, GBP en EUR. Werk deze werkruimte bij naar een ondersteunde valuta of gebruik een andere werkruimte.',
},
changeOwner: {
changeOwnerPageTitle: 'Eigenaar overdragen',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index beadc95e20b3..be534d5ca7cb 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -7167,6 +7167,9 @@ Plan Control zaczyna się od 9 USD za aktywnego członka miesięcznie.`,
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.',
changeBankAccount: 'Zmień konto bankowe',
+ updateCurrencyForExpensifyCard: 'Karta Expensify jest dostępna do wydania w USD. Zmień tę przestrzeń roboczą na USD lub użyj innej przestrzeni roboczej.',
+ updateCurrencyForExpensifyCardTitle: 'Zdobądź Kartę Expensify',
+ euUkUpdateCurrencyForExpensifyCard: 'Karta Expensify jest dostępna do wydania w USD, GBP i EUR. Zmień walutę tego workspace’a na obsługiwaną albo użyj innego workspace’a.',
},
changeOwner: {
changeOwnerPageTitle: 'Przenieś właściciela',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 4a1175240cb1..06b34ee645de 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -7188,6 +7188,10 @@ O plano Control começa em US$ 9 por membro ativo por mês.`,
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.',
changeBankAccount: 'Alterar conta bancária',
+ updateCurrencyForExpensifyCard: 'O Cartão Expensify está disponível para emissão em USD. Atualize este workspace para USD ou use um workspace diferente.',
+ updateCurrencyForExpensifyCardTitle: 'Obter o Cartão Expensify',
+ euUkUpdateCurrencyForExpensifyCard:
+ 'O Cartão Expensify está disponível para emissão em USD, GBP e EUR. Atualize este espaço de trabalho para uma moeda compatível ou use um espaço de trabalho diferente.',
},
changeOwner: {
changeOwnerPageTitle: 'Transferir proprietário',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index b3426abc81d7..2c6a2a508f6b 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -6944,6 +6944,9 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
yourWorkspace: `您的工作区当前使用不受支持的货币。请查看支持的货币列表。`,
chooseAnExisting: '选择现有银行账户来支付报销,或添加新账户。',
changeBankAccount: '更改银行账户',
+ updateCurrencyForExpensifyCard: 'Expensify 卡目前仅支持以美元(USD)发行。请将此工作区的货币更新为美元(USD),或使用其他工作区。',
+ updateCurrencyForExpensifyCardTitle: '获取 Expensify 卡',
+ euUkUpdateCurrencyForExpensifyCard: 'Expensify 卡目前可发行的货币包括 USD、GBP 和 EUR。请将此工作区更新为受支持的货币或使用其他工作区。',
},
changeOwner: {
changeOwnerPageTitle: '转移所有者',
diff --git a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardFeedSelectorPage.tsx b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardFeedSelectorPage.tsx
index b44d0583279d..9d89009a800d 100644
--- a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardFeedSelectorPage.tsx
+++ b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardFeedSelectorPage.tsx
@@ -10,6 +10,7 @@ import SingleSelectListItem from '@components/SelectionList/ListItem/SingleSelec
import type {ListItem} from '@components/SelectionList/types';
import Text from '@components/Text';
+import useCanEnrollNewExpensifyCardProgram from '@hooks/useCanEnrollNewExpensifyCardProgram';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import useDefaultFundID from '@hooks/useDefaultFundID';
import useExpensifyCardFeedsForFeedSelector from '@hooks/useExpensifyCardFeedsForFeedSelector';
@@ -29,7 +30,7 @@ import {isEmailPublicDomain} from '@libs/LoginUtils';
import createDynamicRoute from '@libs/Navigation/helpers/dynamicRoutesUtils/createDynamicRoute';
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
import type {SettingsNavigatorParamList} from '@libs/Navigation/types';
-import {canMemberWrite} from '@libs/PolicyUtils';
+import {canEditWorkspaceSettings, canMemberWrite} from '@libs/PolicyUtils';
import {expensifyLoginsSelector} from '@libs/UserUtils';
import Navigation from '@navigation/Navigation';
@@ -83,6 +84,8 @@ function WorkspaceExpensifyCardFeedSelectorPage({route}: WorkspaceExpensifyCardF
const [cardList] = useOnyx(ONYXKEYS.CARD_LIST);
const policy = usePolicy(policyID);
const canWriteExpensifyCard = canMemberWrite(policy, currentUserLogin, CONST.POLICY.POLICY_FEATURE.EXPENSIFY_CARD);
+ const {canEnrollNewCardProgram} = useCanEnrollNewExpensifyCardProgram(policyID);
+ const canStartBankAccountSetup = canEditWorkspaceSettings(policy, currentUserLogin);
const getIssueCardFundID = () => {
if (primaryFeeds.length === 0) {
@@ -99,6 +102,7 @@ function WorkspaceExpensifyCardFeedSelectorPage({route}: WorkspaceExpensifyCardF
};
const issueCardFundID = getIssueCardFundID();
+ const hasIssueCardFundID = issueCardFundID !== undefined;
const handleAddCardPress = () => {
if (issueCardFundID === undefined) {
@@ -200,14 +204,20 @@ function WorkspaceExpensifyCardFeedSelectorPage({route}: WorkspaceExpensifyCardF
const primaryListData = primaryFeeds.map((entry) => toListItem(entry, false));
+ // Suppress the new-program branch on workspaces with unsupported currencies, and for members who cannot
+ // reach the bank account setup page. These workspaces may only issue cards on existing feeds
+ const shouldShowIssueCardButton = hasIssueCardFundID || (canEnrollNewCardProgram && canStartBankAccountSetup);
+
const issueNewCardAndOtherFeedsFooter = canWriteExpensifyCard ? (
-
+ {shouldShowIssueCardButton && (
+
+ )}
{otherFeeds.length > 0 && (
<>
{translate('workspace.companyCards.fromOtherWorkspaces')}
diff --git a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardPageEmptyState.tsx b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardPageEmptyState.tsx
index af3941e4dae7..89d5004577e1 100644
--- a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardPageEmptyState.tsx
+++ b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardPageEmptyState.tsx
@@ -5,15 +5,17 @@ import {useLockedAccountActions, useLockedAccountState} from '@components/Locked
import {ModalActions} from '@components/Modal/Global/ModalContext';
import Text from '@components/Text';
+import useCanEnrollNewExpensifyCardProgram from '@hooks/useCanEnrollNewExpensifyCardProgram';
import useConfirmModal from '@hooks/useConfirmModal';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import useExpensifyCardFeedsForFeedSelector from '@hooks/useExpensifyCardFeedsForFeedSelector';
-import useExpensifyCardUkEuSupported from '@hooks/useExpensifyCardUkEuSupported';
import {useMemoizedLazyIllustrations} from '@hooks/useLazyAsset';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
+import usePermissions from '@hooks/usePermissions';
import usePolicyFeatureWriteAccess from '@hooks/usePolicyFeatureWriteAccess';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
+import useShouldBlockCurrencyChange from '@hooks/useShouldBlockCurrencyChange';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
@@ -34,8 +36,6 @@ import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSection
import variables from '@styles/variables';
-import {updateGeneralSettings as updatePolicyGeneralSettings} from '@userActions/Policy/Policy';
-
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES, {DYNAMIC_ROUTES} from '@src/ROUTES';
@@ -66,18 +66,21 @@ function WorkspaceExpensifyCardPageEmptyState({route, policy}: WorkspaceExpensif
const {canWrite: canWriteExpensifyCard, showReadOnlyModal} = usePolicyFeatureWriteAccess(policy, CONST.POLICY.POLICY_FEATURE.EXPENSIFY_CARD);
const {login: currentUserLogin = ''} = useCurrentUserPersonalDetails();
- // Dismiss the "Update to USD" modal if the currency changes to USD externally (e.g. from another device)
+ const isSetupUnfinished = hasInProgressUSDVBBA(reimbursementAccount?.achData);
+ const {canEnrollNewCardProgram, isUkEuCurrencySupported} = useCanEnrollNewExpensifyCardProgram(policy?.id);
+ const {isBetaEnabled} = usePermissions();
+ const shouldBlockCurrencyChange = useShouldBlockCurrencyChange(policy?.id);
+
+ // Dismiss the currency modal if the workspace currency becomes a supported one externally (e.g. from another device)
const isCurrencyModalOpen = useRef(false);
useEffect(() => {
- if (policy?.outputCurrency !== CONST.CURRENCY.USD || !isCurrencyModalOpen.current) {
+ if (!canEnrollNewCardProgram || !isCurrencyModalOpen.current) {
return;
}
closeModal();
isCurrencyModalOpen.current = false;
- }, [policy?.outputCurrency, closeModal]);
+ }, [canEnrollNewCardProgram, closeModal]);
- const isSetupUnfinished = hasInProgressUSDVBBA(reimbursementAccount?.achData);
- const isUkEuCurrencySupported = useExpensifyCardUkEuSupported(policy?.id);
const {allFeeds} = useExpensifyCardFeedsForFeedSelector(policy?.id);
const hasAccessibleFeeds = allFeeds.length > 0;
@@ -85,8 +88,10 @@ function WorkspaceExpensifyCardPageEmptyState({route, policy}: WorkspaceExpensif
? getEligibleBankAccountsForUkEuCard(bankAccountList, supportedCountriesByCurrency, policy?.outputCurrency)
: getEligibleBankAccountsForCard(bankAccountList);
const shouldStartBankAccountSetup = !eligibleBankAccounts.length || isSetupUnfinished;
- const canStartBankAccountSetup = canEditWorkspaceSettings(policy, currentUserLogin);
- const shouldDisableCTA = !canWriteExpensifyCard || (!hasAccessibleFeeds && shouldStartBankAccountSetup && !canStartBankAccountSetup);
+ const canEditSettings = canEditWorkspaceSettings(policy, currentUserLogin);
+ // Without an existing feed the only path forward is enrolling a new card program, and both the
+ // bank account setup page and the currency page are admin only
+ const shouldDisableCTA = !canWriteExpensifyCard || (!hasAccessibleFeeds && !canEditSettings);
const startFlow = () => {
if (hasAccessibleFeeds && policy?.id) {
@@ -124,21 +129,23 @@ function WorkspaceExpensifyCardPageEmptyState({route, policy}: WorkspaceExpensif
},
];
- const promptCurrencyChangeAndStartFlow = async () => {
+ const promptCurrencyChange = async () => {
isCurrencyModalOpen.current = true;
+ // An open or partially set up bank account blocks the currency page, so only offer the change when it can be completed
const result = await showConfirmModal({
- title: translate('workspace.common.expensifyCard'),
- prompt: translate('workspace.bankAccount.updateCurrencyPrompt'),
- confirmText: translate('workspace.bankAccount.updateToUSD'),
- cancelText: translate('common.cancel'),
- danger: true,
+ title: translate('workspace.bankAccount.updateCurrencyForExpensifyCardTitle'),
+ prompt: translate(
+ isBetaEnabled(CONST.BETAS.EXPENSIFY_CARD_EU_UK) ? 'workspace.bankAccount.euUkUpdateCurrencyForExpensifyCard' : 'workspace.bankAccount.updateCurrencyForExpensifyCard',
+ ),
+ confirmText: translate(shouldBlockCurrencyChange ? 'common.buttonConfirm' : 'workspace.bankAccount.updateWorkspaceCurrency'),
+ cancelText: shouldBlockCurrencyChange ? undefined : translate('common.cancel'),
+ shouldShowCancelButton: !shouldBlockCurrencyChange,
});
isCurrencyModalOpen.current = false;
- if (result.action !== ModalActions.CONFIRM || !policy) {
+ if (shouldBlockCurrencyChange || result.action !== ModalActions.CONFIRM || !policy) {
return;
}
- updatePolicyGeneralSettings(policy, policy.name, CONST.CURRENCY.USD);
- startFlow();
+ Navigation.navigate(ROUTES.WORKSPACE_OVERVIEW_CURRENCY.getRoute(policy.id));
};
return (
@@ -159,11 +166,7 @@ function WorkspaceExpensifyCardPageEmptyState({route, policy}: WorkspaceExpensif
ctaText={translate(isSetupUnfinished && !hasAccessibleFeeds ? 'workspace.expensifyCard.finishSetup' : 'workspace.expensifyCard.issueNewCard')}
ctaAccessibilityLabel={translate('workspace.moreFeatures.expensifyCard.feed.ctaTitle')}
onCtaPress={() => {
- if (!canWriteExpensifyCard) {
- showReadOnlyModal();
- return;
- }
- if (!hasAccessibleFeeds && shouldStartBankAccountSetup && !canStartBankAccountSetup) {
+ if (shouldDisableCTA) {
showReadOnlyModal();
return;
}
@@ -175,8 +178,10 @@ function WorkspaceExpensifyCardPageEmptyState({route, policy}: WorkspaceExpensif
showLockedAccountModal();
return;
}
- if (!(policy?.outputCurrency === CONST.CURRENCY.USD || isUkEuCurrencySupported)) {
- promptCurrencyChangeAndStartFlow();
+ // The supported currency restriction only applies to enrolling a brand-new card program.
+ // If hasAccessibleFeeds is true, allow the flow to start in order to link an existing feed
+ if (!hasAccessibleFeeds && !canEnrollNewCardProgram) {
+ promptCurrencyChange();
return;
}
startFlow();