Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5291,7 +5291,7 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
chooseTheCardholder: 'Wähle den Karteninhaber',
chooseCard: 'Wähle eine Karte',
chooseCardFor: (assignee: string) => `Wähle eine Karte für <strong>${assignee}</strong>. Du findest die gesuchte Karte nicht? <concierge-link>Gib uns Bescheid.</concierge-link>`,
noActiveCards: 'Keine aktiven Karten in diesem Feed',
noAvailableCards: 'Alle Karten haben bereits eine Regel',
somethingMightBeBroken:
'<muted-text><centered-text>Oder es ist etwas kaputt. Wie auch immer, wenn du Fragen hast, <concierge-link>wende dich einfach an Concierge</concierge-link>.</centered-text></muted-text>',
chooseTransactionStartDate: 'Wähle ein Startdatum für Transaktionen',
Expand Down Expand Up @@ -5327,6 +5327,7 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
},
deletedCard: 'Gelöschte Karte',
assignNewCards: {title: 'Neue Karten zuweisen', description: 'Holen Sie die neuesten Karten zum Zuweisen von Ihrer Bank'},
noAvailableCardsSubtitle: 'Bearbeiten Sie eine bestehende Kartenregel, um Änderungen vorzunehmen',
},
expensifyCard: {
issueAndManageCards: 'Geben Sie Expensify Karten aus und verwalten Sie sie',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5295,7 +5295,8 @@ const translations = {
chooseTheCardholder: 'Choose the cardholder',
chooseCard: 'Choose a card',
chooseCardFor: (assignee: string) => `Choose a card for <strong>${assignee}</strong>. Can't find the card you're looking for? <concierge-link>Let us know.</concierge-link>`,
noActiveCards: 'No active cards on this feed',
noAvailableCards: 'All cards already have a rule',
noAvailableCardsSubtitle: 'Edit an existing card rule to make changes',
somethingMightBeBroken:
'<muted-text><centered-text>Or something might be broken. Either way, if you have any questions, just <concierge-link>contact Concierge</concierge-link>.</centered-text></muted-text>',
chooseTransactionStartDate: 'Choose a transaction start date',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5135,7 +5135,8 @@ ${amount} para ${merchant} - ${date}`,
chooseTheCardholder: 'Elige el titular de la tarjeta',
chooseCard: 'Elige una tarjeta',
chooseCardFor: (assignee) => `Elige una tarjeta para <strong>${assignee}</strong>. ¿No encuentras la tarjeta que buscas? <concierge-link>Avísanos.</concierge-link>`,
noActiveCards: 'No hay tarjetas activas en este feed',
noAvailableCards: 'No hay tarjetas activas en este feed',
noAvailableCardsSubtitle: 'Edita una regla de tarjeta existente para hacer cambios',
somethingMightBeBroken:
'<muted-text><centered-text>O algo podría estar roto. De cualquier manera, si tienes alguna pregunta, <concierge-link>contacta a Concierge</concierge-link>.</centered-text></muted-text>',
chooseTransactionStartDate: 'Elige una fecha de inicio de transacciones',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5300,7 +5300,7 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
chooseCard: 'Choisir une carte',
chooseCardFor: (assignee: string) =>
`Choisissez une carte pour <strong>${assignee}</strong>. Vous ne trouvez pas la carte que vous cherchez ? <concierge-link>Dites-le-nous.</concierge-link>`,
noActiveCards: 'Aucune carte active dans ce flux',
noAvailableCards: 'Toutes les cartes ont déjà une règle',
somethingMightBeBroken:
'<muted-text><centered-text>Ou quelque chose est peut-être cassé. Dans tous les cas, si vous avez des questions, il vous suffit de <concierge-link>contacter Concierge</concierge-link>.</centered-text></muted-text>',
chooseTransactionStartDate: 'Choisissez une date de début de transaction',
Expand Down Expand Up @@ -5336,6 +5336,7 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
},
deletedCard: 'Carte supprimée',
assignNewCards: {title: 'Assigner de nouvelles cartes', description: 'Obtenez les dernières cartes à assigner depuis votre banque'},
noAvailableCardsSubtitle: 'Modifier une règle de carte existante pour effectuer des changements',
},
expensifyCard: {
issueAndManageCards: 'Émettre et gérer vos Cartes Expensify',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5273,7 +5273,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
chooseCard: 'Scegli una carta',
chooseCardFor: (assignee: string) =>
`Scegli una carta per <strong>${assignee}</strong>. Non riesci a trovare la carta che stai cercando? <concierge-link>Facci sapere.</concierge-link>`,
noActiveCards: 'Nessuna carta attiva in questo feed',
noAvailableCards: 'Tutte le carte hanno già una regola',
somethingMightBeBroken:
'<muted-text><centered-text>Oppure potrebbe esserci un problema. In ogni caso, se hai domande, <concierge-link>contatta Concierge</concierge-link>.</centered-text></muted-text>',
chooseTransactionStartDate: 'Scegli una data di inizio transazione',
Expand Down Expand Up @@ -5307,6 +5307,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
},
deletedCard: 'Carta eliminata',
assignNewCards: {title: 'Assegna nuove carte', description: 'Ottieni le ultime carte da assegnare dalla tua banca'},
noAvailableCardsSubtitle: 'Modifica una regola della carta esistente per apportare modifiche',
},
expensifyCard: {
issueAndManageCards: 'Emetti e gestisci le tue Carte Expensify',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5224,7 +5224,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
chooseCard: 'カードを選択',
chooseCardFor: (assignee: string) =>
`<strong>${assignee}</strong> に割り当てるカードを選択してください。お探しのカードが見つかりませんか?<concierge-link>お知らせください。</concierge-link>`,
noActiveCards: 'このフィードには有効なカードがありません',
noAvailableCards: 'すべてのカードにはすでにルールがあります',
somethingMightBeBroken:
'<muted-text><centered-text>もしくは不具合が発生している可能性があります。いずれにせよ、ご不明な点があれば、<concierge-link>Concierge にお問い合わせください</concierge-link>。</centered-text></muted-text>',
chooseTransactionStartDate: '取引の開始日を選択',
Expand Down Expand Up @@ -5258,6 +5258,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
},
deletedCard: '削除されたカード',
assignNewCards: {title: '新しいカードを割り当てる', description: '銀行から割り当て可能な最新のカードを取得します'},
noAvailableCardsSubtitle: '既存のカードルールを編集して変更します',
},
expensifyCard: {
issueAndManageCards: 'Expensify カードを発行して管理する',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5265,7 +5265,7 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
chooseCard: 'Kies een kaart',
chooseCardFor: (assignee: string) =>
`Kies een kaart voor <strong>${assignee}</strong>. Kun je de kaart die je zoekt niet vinden? <concierge-link>Laat het ons weten.</concierge-link>`,
noActiveCards: 'Geen actieve kaarten in deze feed',
noAvailableCards: 'Alle kaarten hebben al een regel',
somethingMightBeBroken:
'<muted-text><centered-text>Of er er is iets kapot. Hoe dan ook, als je vragen hebt, <concierge-link>neem dan contact op met Concierge</concierge-link>.</centered-text></muted-text>',
chooseTransactionStartDate: 'Kies een startdatum voor transacties',
Expand Down Expand Up @@ -5300,6 +5300,7 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
},
deletedCard: 'Verwijderde kaart',
assignNewCards: {title: 'Nieuwe kaarten toewijzen', description: 'Haal de nieuwste kaarten op om toe te wijzen vanuit je bank'},
noAvailableCardsSubtitle: 'Bewerk een bestaande kaartregel om wijzigingen aan te brengen',
},
expensifyCard: {
issueAndManageCards: 'Geef Expensify Kaarten uit en beheer ze',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5254,7 +5254,7 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
chooseTheCardholder: 'Wybierz posiadacza karty',
chooseCard: 'Wybierz kartę',
chooseCardFor: (assignee: string) => `Wybierz kartę dla <strong>${assignee}</strong>. Nie możesz znaleźć karty, której szukasz? <concierge-link>Daj nam znać.</concierge-link>`,
noActiveCards: 'Brak aktywnych kart w tym kanale',
noAvailableCards: 'Wszystkie karty mają już regułę',
somethingMightBeBroken:
'<muted-text><centered-text>Albo coś może być zepsute. Tak czy inaczej, jeśli masz jakieś pytania, po prostu <concierge-link>skontaktuj się z Concierge</concierge-link>.</centered-text></muted-text>',
chooseTransactionStartDate: 'Wybierz datę początkową transakcji',
Expand Down Expand Up @@ -5288,6 +5288,7 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
},
deletedCard: 'Usunięta karta',
assignNewCards: {title: 'Przydziel nowe karty', description: 'Pobierz z banku najnowsze karty do przypisania'},
noAvailableCardsSubtitle: 'Edytuj istniejącą regułę karty, aby wprowadzić zmiany',
},
expensifyCard: {
issueAndManageCards: 'Wydawaj i zarządzaj Kartami Expensify',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5257,7 +5257,7 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
chooseCard: 'Escolha um cartão',
chooseCardFor: (assignee: string) =>
`Escolha um cartão para <strong>${assignee}</strong>. Não encontra o cartão que está procurando? <concierge-link>Conte para a gente.</concierge-link>`,
noActiveCards: 'Nenhum cartão ativo neste feed',
noAvailableCards: 'Todos os cartões já têm uma regra',
somethingMightBeBroken:
'<muted-text><centered-text>Ou talvez algo esteja com problema. De qualquer forma, se tiver alguma dúvida, é só <concierge-link>entrar em contato com a Concierge</concierge-link>.</centered-text></muted-text>',
chooseTransactionStartDate: 'Escolha uma data de início da transação',
Expand Down Expand Up @@ -5291,6 +5291,7 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
},
deletedCard: 'Cartão excluído',
assignNewCards: {title: 'Atribuir novos cartões', description: 'Obtenha do seu banco os cartões mais recentes para atribuir'},
noAvailableCardsSubtitle: 'Edite uma regra de cartão existente para fazer alterações',
},
expensifyCard: {
issueAndManageCards: 'Emita e gerencie seus Cartões Expensify',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5131,7 +5131,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
chooseTheCardholder: '选择持卡人',
chooseCard: '选择一张卡片',
chooseCardFor: (assignee: string) => `为 <strong>${assignee}</strong> 选择一张卡片。找不到需要的卡片?<concierge-link>告诉我们。</concierge-link>`,
noActiveCards: '此订阅源中没有可用的卡片',
noAvailableCards: '所有卡片都已有规则',
somethingMightBeBroken:
'<muted-text><centered-text>或者可能出了点问题。不管怎样,如果你有任何疑问,请<concierge-link>联系 Concierge</concierge-link>。</centered-text></muted-text>',
chooseTransactionStartDate: '选择交易开始日期',
Expand Down Expand Up @@ -5165,6 +5165,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
},
deletedCard: '已删除的卡片',
assignNewCards: {title: '分配新卡', description: '从您的银行获取可分配的最新银行卡'},
noAvailableCardsSubtitle: '编辑现有卡规则以进行更改',
},
expensifyCard: {
issueAndManageCards: '发放并管理您的 Expensify 卡',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function CardSelectionStep({route}: CardSelectionStepProps) {
width={116}
height={168}
/>
<Text style={[styles.textHeadlineLineHeightXXL, styles.mt3]}>{translate('workspace.companyCards.noActiveCards')}</Text>
<Text style={[styles.textHeadlineLineHeightXXL, styles.mt3]}>{translate('workspace.companyCards.noAvailableCards')}</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore assign-card empty-state copy

This empty state is rendered in the card assignment flow (headerTitle is workspace.companyCards.assignCard), but it now uses workspace.companyCards.noAvailableCards (“All cards already have a rule”). In this context, cards can be missing because there are no active/unassigned cards in the feed, not because spend rules exist, so users are shown incorrect guidance whenever the assign-card list is empty.

Useful? React with 👍 / 👎.

<View style={[styles.renderHTML, styles.flexRow, styles.ph5, styles.mv3]}>
<RenderHTML html={translate('workspace.companyCards.somethingMightBeBroken')} />
</View>
Expand Down
13 changes: 8 additions & 5 deletions src/pages/workspace/rules/SpendRules/SpendRuleCardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function SpendRuleCardPage({route}: SpendRuleCardPageProps) {
const [cardsList] = useOnyx(`${ONYXKEYS.COLLECTION.WORKSPACE_CARDS_LIST}${defaultFundID}_${CONST.EXPENSIFY_CARD.BANK}`, {selector: filterInactiveCards});
const [expensifyCardSettings] = useOnyx(`${ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS}${defaultFundID}`);
const [spendRuleForm] = useOnyx(ONYXKEYS.FORMS.SPEND_RULE_FORM);
const illustrations = useMemoizedLazyIllustrations(['Telescope']);
const illustrations = useMemoizedLazyIllustrations(['HandCard']);
const themeIllustrations = useThemeIllustrations();
const companyCardFeedIcons = useCompanyCardFeedIcons();

Expand Down Expand Up @@ -235,10 +235,13 @@ function SpendRuleCardPage({route}: SpendRuleCardPageProps) {
shouldPreventDefaultFocusOnSelectRow={!canUseTouchScreen()}
listEmptyContent={
<BlockingView
icon={illustrations.Telescope}
iconWidth={variables.emptyListIconWidth}
iconHeight={variables.emptyListIconHeight}
title={inputValue.trim() ? translate('common.noResultsFound') : translate('workspace.companyCards.noActiveCards')}
icon={illustrations.HandCard}
iconWidth={variables.iconSection}
iconHeight={variables.iconSection}
title={inputValue.trim() ? translate('common.noResultsFound') : translate('workspace.companyCards.noAvailableCards')}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will always display "All cards already have a rule" — even when no cards exist in the workspace. We have a fix in this PR #88256

More details: #87800 (comment)

titleStyles={styles.mb2}
subtitle={translate('workspace.companyCards.noAvailableCardsSubtitle')}
Comment on lines +241 to +243

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make spend-rule subtitle conditional on no-card state

The empty-state title already distinguishes search misses (common.noResultsFound) from the no-available-cards case, but the new subtitle is always shown. When a user types a query that matches nothing, they now see “No results found” together with “Edit an existing card rule to make changes,” which is misleading because cards may still exist. This subtitle should only appear in the true no-available-cards branch.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It displays like that. @shawnborton Do you think if we need to change?

Screenshot 2026-04-14 at 01 50 50

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we wouldn't show any empty state in this case, much like we do elsewhere when your search returns no results:

CleanShot 2026-04-13 at 21 17 12@2x

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the current requirements, I think the existing display is fine

subtitleStyle={styles.textSupporting}
/>
}
footerContent={
Expand Down
Loading