Repository navigation
[NO QA] Add preview expenses to merchant rules - #80758
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index 18c6efc2..5ccc7fc0 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -6397,6 +6397,9 @@ Fordere Spesendetails wie Belege und Beschreibungen an, lege Limits und Standard
editRuleTitle: 'Regel bearbeiten',
deleteRule: 'Regel löschen',
deleteRuleConfirmation: 'Sind Sie sicher, dass Sie diese Regel löschen möchten?',
+ previewMatches: 'Übereinstimmungen anzeigen',
+ previewMatchesEmptyStateTitle: 'Nichts anzuzeigen',
+ previewMatchesEmptyStateSubtitle: 'Keine nicht eingereichten Ausgaben entsprechen dieser Regel.',
},
},
planTypePage: {
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 2ed56754..e3dbe352 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -6408,6 +6408,9 @@ Exigez des informations de dépense comme les reçus et les descriptions, défin
editRuleTitle: 'Modifier la règle',
deleteRule: 'Supprimer la règle',
deleteRuleConfirmation: 'Voulez-vous vraiment supprimer cette règle ?',
+ previewMatches: 'Aperçu des correspondances',
+ previewMatchesEmptyStateTitle: 'Rien à afficher',
+ previewMatchesEmptyStateSubtitle: 'Aucune dépense non soumise ne correspond à cette règle.',
},
},
planTypePage: {
diff --git a/src/languages/it.ts b/src/languages/it.ts
index d4b2b09b..57408f38 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -6379,6 +6379,9 @@ Richiedi dettagli di spesa come ricevute e descrizioni, imposta limiti e valori
editRuleTitle: 'Modifica regola',
deleteRule: 'Elimina regola',
deleteRuleConfirmation: 'Sei sicuro di voler eliminare questa regola?',
+ previewMatches: 'Anteprima corrispondenze',
+ previewMatchesEmptyStateTitle: 'Niente da mostrare',
+ previewMatchesEmptyStateSubtitle: 'Nessuna spesa non inviata corrisponde a questa regola.',
},
},
planTypePage: {
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index c34e8eb5..db53807d 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -6335,6 +6335,9 @@ ${reportName}
editRuleTitle: 'ルールを編集',
deleteRule: 'ルールを削除',
deleteRuleConfirmation: 'このルールを削除してもよろしいですか?',
+ previewMatches: '一致結果をプレビュー',
+ previewMatchesEmptyStateTitle: '表示するものがありません',
+ previewMatchesEmptyStateSubtitle: 'このルールに一致する未提出の経費はありません。',
},
},
planTypePage: {
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index bed7e806..24315ae9 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -6367,6 +6367,9 @@ Vraag verplichte uitgavedetails zoals bonnetjes en beschrijvingen, stel limieten
editRuleTitle: 'Regel bewerken',
deleteRule: 'Regel verwijderen',
deleteRuleConfirmation: 'Weet je zeker dat je deze regel wilt verwijderen?',
+ previewMatches: 'Voorvertoning komt overeen',
+ previewMatchesEmptyStateTitle: 'Niets om weer te geven',
+ previewMatchesEmptyStateSubtitle: 'Geen niet-ingediende uitgaven komen overeen met deze regel.',
},
},
planTypePage: {
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 11285d3e..16c92769 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -6360,6 +6360,9 @@ Wymagaj szczegółów wydatków, takich jak paragony i opisy, ustawiaj limity i
editRuleTitle: 'Edytuj regułę',
deleteRule: 'Usuń regułę',
deleteRuleConfirmation: 'Czy na pewno chcesz usunąć tę regułę?',
+ previewMatches: 'Podgląd dopasowań',
+ previewMatchesEmptyStateTitle: 'Nie ma nic do wyświetlenia',
+ previewMatchesEmptyStateSubtitle: 'Żadne niewysłane wydatki nie pasują do tej reguły.',
},
},
planTypePage: {
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index b4b4a727..024d6974 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -6360,6 +6360,9 @@ Exija detalhes de despesas como recibos e descrições, defina limites e padrõe
editRuleTitle: 'Editar regra',
deleteRule: 'Excluir regra',
deleteRuleConfirmation: 'Tem certeza de que deseja excluir esta regra?',
+ previewMatches: 'Visualizar correspondências',
+ previewMatchesEmptyStateTitle: 'Nada para mostrar',
+ previewMatchesEmptyStateSubtitle: 'Nenhuma despesa não enviada corresponde a esta regra.',
},
},
planTypePage: {
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index d1c30a46..dadfac15 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -6225,6 +6225,9 @@ ${reportName}
editRuleTitle: '编辑规则',
deleteRule: '删除规则',
deleteRuleConfirmation: '您确定要删除此规则吗?',
+ previewMatches: '预览匹配结果',
+ previewMatchesEmptyStateTitle: '无内容可显示',
+ previewMatchesEmptyStateSubtitle: '没有未提交的报销符合此规则。',
},
},
planTypePage: {
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
|
Code looks good. Trying to test with Jack's ngrok |
|
I have expense with merchant = Screen.Recording.2026-01-30.at.1.00.56.AM.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.3.11-16 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.3.12-1 🚀
|
Explanation of Change
Adds support for previewing expenses via merchant rules
Fixed Issues
$ #80524
Tests
Create three expenses
Set two of their merchants to "Merchant"
Set one merchant to "Irrelevant"
Submit one of the "Merchant" expenses
Create a new workspace merchant rule with the merchant as "mer"
Click 'Preview Matches'
Ensure that only the 1 matching expense is returned
Offline tests
This should show an offline message when the user is offline
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps./** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)Screenshots/Videos
Screen.Recording.2026-01-28.at.1.22.06.PM.mov