Add DualEntry integration export pages (review fixes applied) - #98394
Add DualEntry integration export pages (review fixes applied)#98394MelvinBot wants to merge 14 commits into
Conversation
- Add EXPENSIFY_CARD_ACCOUNT_ID to DUALENTRY_CONFIG - Add expensifyCardAccountID field to DualEntryExport type - Rename copy-pasted UpdateDualEntryCreditCardAccountParams -> UpdateDualEntryExpensifyCardAccountParams - Fix component and displayName DualEntryCompanyCardAccountPage -> DualEntryExpensifyCardAccountPage Co-authored-by: s77rt <16493223+s77rt@users.noreply.github.com> Co-authored-by: Shridhar Goel <ShridharGoel@users.noreply.github.com>
🦜 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 74c0c706..83fa63b5 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -5755,6 +5755,24 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
enableNewAccountsDescription: 'Neue DualEntry-Konten werden als Kategorien verfügbar sein.',
classificationsImport: 'Alle DualEntry-Klassifizierungen werden als Tags importiert',
importDescription: 'Wählen Sie aus, welche Buchungskonfigurationen aus DualEntry importiert werden sollen.',
+ noVendorsFound: 'Keine Anbieter gefunden',
+ noVendorsFoundDescription: 'Bitte fügen Sie Lieferanten in DualEntry hinzu und synchronisieren Sie die Verbindung erneut',
+ noAccountsFound: 'Keine Konten gefunden',
+ noAccountsFoundDescription: 'Bitte fügen Sie Konten in DualEntry hinzu und synchronisieren Sie die Verbindung erneut',
+ exportDescription: 'Konfigurieren Sie, wie Expensify-Daten nach DualEntry exportiert werden.',
+ exportReimbursable: {label: 'Erstattungsfähige Ausgaben exportieren als', values: {label: 'Lieferantenrechnungen'}},
+ exportDate: {
+ label: 'Rechnungsdatum des Lieferanten',
+ description: 'Verwenden Sie dieses Datum beim Exportieren von Berichten nach DualEntry.',
+ values: {label: 'Eingereichtes Datum', description: 'Datum, an dem der Bericht zur Genehmigung eingereicht wurde.'},
+ },
+ exportNonReimbursable: {label: 'Exportieren Sie Firmenkartenausgaben als', values: {label: 'Direkte Ausgaben'}},
+ defaultCompanyCardVendor: {
+ label: 'Standardlieferant für alle Firmenkarten',
+ description: 'Wählen Sie einen Standard-DualEntry-Anbieter für Ausgaben, die nicht automatisch übereinstimmen.',
+ },
+ companyCardAccount: {label: 'Firmenkartenkonto', description: 'Wählen Sie aus, wohin Unternehmenstransaktionen exportiert werden sollen.'},
+ expensifyCardAccount: {label: 'Expensify Karte-Konto', description: 'Wählen Sie aus, wohin Expensify Kartenumsätze exportiert werden sollen.'},
},
type: {
free: 'Kostenlos',
diff --git a/src/languages/el.ts b/src/languages/el.ts
index 5acfee20..40481958 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -5873,6 +5873,24 @@ _Για πιο αναλυτικές οδηγίες, [επισκεφθείτε τ
enableNewAccountsDescription: 'Οι νέοι λογαριασμοί DualEntry θα είναι διαθέσιμοι ως κατηγορίες.',
classificationsImport: 'Όλες οι κατηγοριοποιήσεις DualEntry εισάγονται ως ετικέτες',
importDescription: 'Επιλέξτε ποιες ρυθμίσεις κωδικοποίησης θέλετε να εισαγάγετε από το DualEntry.',
+ noVendorsFound: 'Δεν βρέθηκαν προμηθευτές',
+ noVendorsFoundDescription: 'Παρακαλούμε προσθέστε προμηθευτές στο DualEntry και συγχρονίστε ξανά τη σύνδεση',
+ noAccountsFound: 'Δεν βρέθηκαν λογαριασμοί',
+ noAccountsFoundDescription: 'Παρακαλούμε προσθέστε λογαριασμούς στο DualEntry και συγχρονίστε ξανά τη σύνδεση',
+ exportDescription: 'Ρυθμίστε πώς τα δεδομένα του Expensify εξάγονται στο DualEntry.',
+ exportReimbursable: {label: 'Εξαγωγή αποζημιώσιμων εξόδων ως', values: {label: 'Τιμολόγια προμηθευτών'}},
+ exportDate: {
+ label: 'Ημερομηνία τιμολογίου προμηθευτή',
+ description: 'Χρησιμοποιήστε αυτή την ημερομηνία κατά την εξαγωγή αναφορών στο DualEntry.',
+ values: {label: 'Ημερομηνία υποβολής', description: 'Ημερομηνία υποβολής της αναφοράς για έγκριση.'},
+ },
+ exportNonReimbursable: {label: 'Εξαγωγή εταιρικών εξόδων κάρτας ως', values: {label: 'Άμεσες δαπάνες'}},
+ defaultCompanyCardVendor: {
+ label: 'Προεπιλεγμένος προμηθευτής για όλες τις εταιρικές κάρτες',
+ description: 'Επιλέξτε έναν προεπιλεγμένο προμηθευτή DualEntry για δαπάνες που δεν αντιστοιχίζονται αυτόματα.',
+ },
+ companyCardAccount: {label: 'Λογαριασμός εταιρικής κάρτας', description: 'Επιλέξτε πού θα εξαχθούν οι συναλλαγές εταιρικής κάρτας.'},
+ expensifyCardAccount: {label: 'λογαριασμός κάρτας Expensify', description: 'Επιλέξτε πού θα εξαχθούν οι συναλλαγές της Κάρτας Expensify.'},
},
type: {
free: 'Δωρεάν',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 89b8f84d..499647d7 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -5644,6 +5644,24 @@ ${amount} para ${merchant} - ${date}`,
enableNewAccountsDescription: 'Las nuevas cuentas DualEntry estarán disponibles como categorías.',
classificationsImport: 'Todas las clasificaciones de DualEntry se importan como etiquetas',
importDescription: 'Elige qué configuraciones de codificación importar desde DualEntry.',
+ noVendorsFound: 'No se encontraron proveedores',
+ noVendorsFoundDescription: 'Por favor, añade proveedores en DualEntry y sincroniza la conexión de nuevo',
+ noAccountsFound: 'No se encontraron cuentas',
+ noAccountsFoundDescription: 'Añade cuentas en DualEntry y sincroniza la conexión de nuevo',
+ exportDescription: 'Configura cómo se exportan los datos de Expensify a DualEntry.',
+ exportReimbursable: {label: 'Exportar gastos reembolsables como', values: {label: 'Facturas de proveedor'}},
+ exportDate: {
+ label: 'Fecha de factura del proveedor',
+ description: 'Usa esta fecha al exportar informes a DualEntry.',
+ values: {label: 'Fecha de envío', description: 'Fecha en que se envió el informe para aprobación.'},
+ },
+ exportNonReimbursable: {label: 'Exportar gastos de tarjetas de empresa como', values: {label: 'Gastos directos'}},
+ defaultCompanyCardVendor: {
+ label: 'Proveedor predeterminado para todas las tarjetas de la empresa',
+ description: 'Elige un proveedor DualEntry predeterminado para los gastos que no se asignen automáticamente.',
+ },
+ companyCardAccount: {label: 'Cuenta de tarjeta de empresa', description: 'Elige dónde exportar las transacciones de las tarjetas de la empresa.'},
+ expensifyCardAccount: {label: 'Cuenta de la Tarjeta Expensify', description: 'Elige dónde exportar las transacciones de la Tarjeta Expensify.'},
},
type: {
free: 'Gratis',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 1b3923a1..46169163 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -5769,6 +5769,24 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
enableNewAccountsDescription: 'Les nouveaux comptes DualEntry seront disponibles en tant que catégories.',
classificationsImport: 'Toutes les classifications DualEntry sont importées en tant que tags',
importDescription: 'Choisissez les configurations de codage à importer depuis DualEntry.',
+ noVendorsFound: 'Aucun fournisseur trouvé',
+ noVendorsFoundDescription: 'Veuillez ajouter des fournisseurs dans DualEntry et synchroniser de nouveau la connexion',
+ noAccountsFound: 'Aucun compte trouvé',
+ noAccountsFoundDescription: 'Veuillez ajouter des comptes dans DualEntry et synchroniser la connexion à nouveau',
+ exportDescription: 'Configurez la façon dont les données Expensify sont exportées vers DualEntry.',
+ exportReimbursable: {label: 'Exporter les dépenses remboursables en', values: {label: 'Factures fournisseurs'}},
+ exportDate: {
+ label: 'Date de facture fournisseur',
+ description: 'Utiliser cette date lors de l’exportation des notes de frais vers DualEntry.',
+ values: {label: 'Date de soumission', description: 'Date à laquelle la note de frais a été soumise pour approbation.'},
+ },
+ exportNonReimbursable: {label: 'Exporter les dépenses de carte d’entreprise en tant que', values: {label: 'Dépenses directes'}},
+ defaultCompanyCardVendor: {
+ label: 'Fournisseur par défaut pour toutes les cartes de l’entreprise',
+ description: 'Choisissez un fournisseur DualEntry par défaut pour les dépenses qui ne correspondent pas automatiquement.',
+ },
+ companyCardAccount: {label: 'Compte de carte d’entreprise', description: 'Choisissez où exporter les transactions de carte d’entreprise.'},
+ expensifyCardAccount: {label: 'Compte Carte Expensify', description: 'Choisissez où exporter les transactions de la Carte Expensify.'},
},
type: {
free: 'Gratuit',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index ff0a26d5..d30c9205 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -5725,6 +5725,24 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
enableNewAccountsDescription: 'I nuovi conti DualEntry saranno disponibili come categorie.',
classificationsImport: 'Tutte le classificazioni DualEntry vengono importate come tag',
importDescription: 'Scegli quali configurazioni di codifica importare da DualEntry.',
+ noVendorsFound: 'Nessun fornitore trovato',
+ noVendorsFoundDescription: 'Aggiungi i fornitori in DualEntry e sincronizza di nuovo la connessione',
+ noAccountsFound: 'Nessun account trovato',
+ noAccountsFoundDescription: 'Aggiungi degli account in DualEntry e sincronizza di nuovo la connessione',
+ exportDescription: 'Configura come i dati di Expensify vengono esportati in DualEntry.',
+ exportReimbursable: {label: 'Esporta le spese rimborsabili come', values: {label: 'Fatture fornitori'}},
+ exportDate: {
+ label: 'Data fattura fornitore',
+ description: 'Usa questa data quando esporti i report in DualEntry.',
+ values: {label: 'Data di invio', description: "Data in cui il report è stato inviato per l'approvazione."},
+ },
+ exportNonReimbursable: {label: 'Esporta le spese della carta aziendale come', values: {label: 'Spese dirette'}},
+ defaultCompanyCardVendor: {
+ label: 'Fornitore predefinito per tutte le carte aziendali',
+ description: 'Scegli un fornitore DualEntry predefinito per le spese che non vengono abbinate automaticamente.',
+ },
+ companyCardAccount: {label: 'Conto carta aziendale', description: 'Scegli dove esportare le transazioni della carta aziendale.'},
+ expensifyCardAccount: {label: 'Account Carta Expensify', description: 'Scegli dove esportare le transazioni della Carta Expensify.'},
},
type: {
free: 'Gratis',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index e8f52def..a529ddbc 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -5666,6 +5666,21 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
enableNewAccountsDescription: '新しい DualEntry アカウントは、カテゴリとして利用できるようになります。',
classificationsImport: 'すべての DualEntry 分類はタグとしてインポートされます',
importDescription: 'DualEntry からインポートするコーディング設定を選択してください。',
+ noVendorsFound: '取引先が見つかりません',
+ noVendorsFoundDescription: 'DualEntry で仕入先を追加して、もう一度同期してください',
+ noAccountsFound: 'アカウントが見つかりません',
+ noAccountsFoundDescription: 'DualEntry に勘定科目を追加して、もう一度同期してください',
+ exportDescription: 'Expensify のデータを DualEntry へエクスポートする方法を設定します。',
+ exportReimbursable: {label: '立替経費のエクスポート形式', values: {label: '仕入先の請求書'}},
+ exportDate: {
+ label: '仕入先請求書の日付',
+ description: 'DualEntry へレポートをエクスポートするときに、この日付を使用します。',
+ values: {label: '提出日', description: 'レポートが承認のために提出された日付です。'},
+ },
+ exportNonReimbursable: {label: '法人カード経費のエクスポート形式', values: {label: '直接経費'}},
+ defaultCompanyCardVendor: {label: 'すべての会社カードのデフォルト仕入先', description: '自動で一致しない経費用に、デフォルトの DualEntry 仕入先を選択します。'},
+ companyCardAccount: {label: '会社カード口座', description: '会社カードの取引をエクスポートする先を選択してください。'},
+ expensifyCardAccount: {label: 'Expensify カード口座', description: 'Expensify カードの取引をどこにエクスポートするか選択してください。'},
},
type: {
free: '無料',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 9bdb2bd6..28b5d637 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -5720,6 +5720,24 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
enableNewAccountsDescription: 'Nieuwe DualEntry-accounts zullen beschikbaar zijn als categorieën.',
classificationsImport: 'Alle DualEntry-classificaties worden geïmporteerd als tags',
importDescription: 'Kies welke coderingsconfiguraties je uit DualEntry wilt importeren.',
+ noVendorsFound: 'Geen leveranciers gevonden',
+ noVendorsFoundDescription: 'Voeg leveranciers toe in DualEntry en synchroniseer de verbinding opnieuw',
+ noAccountsFound: 'Geen accounts gevonden',
+ noAccountsFoundDescription: 'Voeg accounts toe in DualEntry en synchroniseer de verbinding opnieuw',
+ exportDescription: 'Configureer hoe Expensify-gegevens naar DualEntry worden geëxporteerd.',
+ exportReimbursable: {label: 'Vergoedbare uitgaven exporteren als', values: {label: 'Leveranciersrekeningen'}},
+ exportDate: {
+ label: 'Factuurdatum leverancier',
+ description: 'Gebruik deze datum bij het exporteren van rapporten naar DualEntry.',
+ values: {label: 'Ingediend op datum', description: 'Datum waarop het rapport ter goedkeuring is ingediend.'},
+ },
+ exportNonReimbursable: {label: 'Exporteer zakelijke kaartuitgaven als', values: {label: 'Directe uitgaven'}},
+ defaultCompanyCardVendor: {
+ label: 'Standaardleverancier voor alle bedrijfskaarten',
+ description: 'Kies een standaard DualEntry-leverancier voor uitgaven die niet automatisch worden gekoppeld.',
+ },
+ companyCardAccount: {label: 'Bedrijfskaartrekening', description: 'Kies waar je transacties met bedrijfskaarten wilt exporteren.'},
+ expensifyCardAccount: {label: 'Expensify Kaart-rekening', description: 'Kies waar je Expensify Kaart-transacties wilt exporteren.'},
},
type: {
free: 'Gratis',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 5c0f5025..595228f9 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -5701,6 +5701,24 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
enableNewAccountsDescription: 'Nowe konta DualEntry będą dostępne jako kategorie.',
classificationsImport: 'Wszystkie klasyfikacje DualEntry są importowane jako tagi',
importDescription: 'Wybierz, które konfiguracje kodowania zaimportować z DualEntry.',
+ noVendorsFound: 'Nie znaleziono żadnych dostawców',
+ noVendorsFoundDescription: 'Dodaj proszę dostawców w DualEntry i zsynchronizuj połączenie ponownie',
+ noAccountsFound: 'Nie znaleziono kont',
+ noAccountsFoundDescription: 'Dodaj proszę konta w DualEntry i zsynchronizuj połączenie ponownie',
+ exportDescription: 'Skonfiguruj, jak dane Expensify są eksportowane do DualEntry.',
+ exportReimbursable: {label: 'Eksportuj wydatki podlegające zwrotowi jako', values: {label: 'Faktury od dostawców'}},
+ exportDate: {
+ label: 'Data faktury od dostawcy',
+ description: 'Użyj tej daty podczas eksportowania raportów do DualEntry.',
+ values: {label: 'Data przesłania', description: 'Data wysłania raportu do zatwierdzenia.'},
+ },
+ exportNonReimbursable: {label: 'Eksportuj wydatki z firmowej karty jako', values: {label: 'Koszty bezpośrednie'}},
+ defaultCompanyCardVendor: {
+ label: 'Domyślny dostawca dla wszystkich firmowych kart',
+ description: 'Wybierz domyślnego sprzedawcę DualEntry dla wydatków, które nie dopasują się automatycznie.',
+ },
+ companyCardAccount: {label: 'Konto karty firmowej', description: 'Wybierz, dokąd eksportować transakcje z kart firmowych.'},
+ expensifyCardAccount: {label: 'Konto Karty Expensify', description: 'Wybierz, dokąd eksportować transakcje z Karty Expensify.'},
},
type: {
free: 'Darmowy',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index a6f37501..b6b10301 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -5718,6 +5718,24 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
enableNewAccountsDescription: 'Novas contas DualEntry estarão disponíveis como categorias.',
classificationsImport: 'Todas as classificações DualEntry são importadas como etiquetas',
importDescription: 'Escolha quais configurações de codificação importar do DualEntry.',
+ noVendorsFound: 'Nenhum fornecedor encontrado',
+ noVendorsFoundDescription: 'Adicione fornecedores no DualEntry e sincronize a conexão novamente',
+ noAccountsFound: 'Nenhuma conta encontrada',
+ noAccountsFoundDescription: 'Adicione contas no DualEntry e sincronize a conexão novamente',
+ exportDescription: 'Configurar como os dados do Expensify são exportados para o DualEntry.',
+ exportReimbursable: {label: 'Exportar despesas reembolsáveis como', values: {label: 'Contas de fornecedores'}},
+ exportDate: {
+ label: 'Data da fatura do fornecedor',
+ description: 'Use esta data ao exportar relatórios para o DualEntry.',
+ values: {label: 'Data de envio', description: 'Data em que o relatório foi enviado para aprovação.'},
+ },
+ exportNonReimbursable: {label: 'Exportar despesas de cartão corporativo como', values: {label: 'Despesas diretas'}},
+ defaultCompanyCardVendor: {
+ label: 'Fornecedor padrão para todos os cartões da empresa',
+ description: 'Escolha um fornecedor padrão do DualEntry para despesas que não sejam correspondidas automaticamente.',
+ },
+ companyCardAccount: {label: 'Conta de cartão corporativo', description: 'Escolha para onde exportar as transações do cartão corporativo.'},
+ expensifyCardAccount: {label: 'Conta do Cartão Expensify', description: 'Escolha para onde exportar as transações do Cartão Expensify.'},
},
type: {
free: 'Grátis',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index d8933b99..439ed8f4 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -5536,6 +5536,17 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
enableNewAccountsDescription: '新的 DualEntry 账户将作为类别提供。',
classificationsImport: '所有 DualEntry 分类都会作为标签导入',
importDescription: '选择要从 DualEntry 导入的编码配置。',
+ noVendorsFound: '未找到供应商',
+ noVendorsFoundDescription: '请在 DualEntry 中添加供应商,然后再次同步连接',
+ noAccountsFound: '未找到账户',
+ noAccountsFoundDescription: '请在 DualEntry 中添加科目,然后再次同步连接',
+ exportDescription: '配置 Expensify 数据导出到 DualEntry 的方式。',
+ exportReimbursable: {label: '可报销费用导出为', values: {label: '供应商账单'}},
+ exportDate: {label: '供应商账单日期', description: '将报告导出到 DualEntry 时使用此日期。', values: {label: '提交日期', description: '报表提交审批的日期。'}},
+ exportNonReimbursable: {label: '导出公司卡费用为', values: {label: '直接费用'}},
+ defaultCompanyCardVendor: {label: '所有公司卡的默认供应商', description: '为未自动匹配的报销选择默认的双重记账供应商。'},
+ companyCardAccount: {label: '公司卡账户', description: '选择导出公司卡交易记录的位置。'},
+ expensifyCardAccount: {label: 'Expensify 卡账户', description: '选择 Expensify 卡交易的导出位置。'},
},
type: {
free: '免费',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
|
@MelvinBot Fix the tests and TS failures and apply the translation diff |
…slation key casing and add missing DualEntry export translations to all locales Co-authored-by: Shridhar Goel <ShridharGoel@users.noreply.github.com>
|
Pushed a fix for the failing checks. Root cause was two related issues in the DualEntry export code, both now resolved (verified locally with 1. Wrong casing on the The new export pages, the action, and
2. Missing DualEntry export translations in every non-English locale (broke
Note on the remaining red check: |
|
🤖 Fixed the failing Two root causes:
Verified locally: Still red — but unrelated: |
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.
|
|
The substantive check failures were already fixed by my earlier commit (
The only checks still red are No further code changes are needed for the CI failures. If |
|
The code checks are green now — the fix I pushed earlier (commit The only remaining red checks are:
|
|
@MelvinBot Fill out the author checklist and mark as ready for review |
|
🤖 I'm not able to fill out the author checklist or flip this to "ready for review" on your behalf — those are human attestations, and checking them would be a false claim. The PR Author Checklist asks the author to confirm things only a person can truthfully attest to, e.g.:
The PR body also still has explicit gates carried over from #97513:
So this needs you (or the co-author) to actually run the manual test steps, add the platform screenshots/videos, tick the boxes, and then mark it ready. What I can do: the CI failures I was asked about earlier (typecheck, ESLint, |
|
@MelvinBot Mark this as ready for review |
|
🤖 Marked this PR as ready for review. All code checks are green (ESLint, typecheck,
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5bd248892a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const selectExpensifyCardAccount = (item: AccountListItem) => { | ||
| if (item.value !== expensifyCardAccountID && policyID) { | ||
| // Choosing the default account clears the custom account | ||
| const value = item.value === companyCardAccountID ? '' : item.value; |
There was a problem hiding this comment.
Treat cleared Expensify Card accounts as default
When a user selects the company-card account to clear a custom Expensify Card override, this writes an empty string through updateDualEntryExpensifyCardAccount, but both this selector and the export summary compute the displayed account with expensifyCardAccountID ?? companyCardAccountID. Since '' is not nullish, the optimistic Onyx update leaves no row selected and the export page shows a blank Expensify Card account instead of falling back to the company-card account; store a nullish value locally or treat an empty string as the default account.
Useful? React with 👍 / 👎.
|
All the PR-related checks are now green after the previous fix — The one remaining non-ignored red check, This is a GitHub Packages authentication/infrastructure failure in the build environment (this PR only touches TypeScript translation files and DualEntry connection-key casing — nothing that affects native dependency resolution). It has reproduced identically across build runs. It should clear once the Packages auth issue is resolved or the build is re-run with valid credentials; no action is needed on the branch itself. The remaining |
|
The code-related failures are already fixed — The only remaining red check,
Recommendation: re-run the |
|
@ShridharGoel The call to
|
| ], | ||
| onExportPagePress: () => null, | ||
| onExportPagePress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_DUALENTRY_EXPORT.getRoute(policyID)), | ||
| subscribedExportSettings: [ |
There was a problem hiding this comment.
Missing EXPENSIFY_CARD_ACCOUNT_ID in subscribedExportSettings
CREDIT_CARD_ACCOUNT_ID is included in the subscribedExportSettings array but EXPENSIFY_CARD_ACCOUNT_ID isn't — so the export section's error/pending indicator on the main accounting page won't reflect issues with the Expensify Card account setting. Could we add CONST.DUALENTRY_CONFIG.EXPENSIFY_CARD_ACCOUNT_ID to this list?
| const selectExpensifyCardAccount = (item: AccountListItem) => { | ||
| if (item.value !== expensifyCardAccountID && policyID) { | ||
| // Choosing the default account clears the custom account | ||
| const value = item.value === companyCardAccountID ? '' : item.value; |
There was a problem hiding this comment.
When the user picks the same account as the company card, value is set to ''. On the export page, expensifyCardAccountID ?? companyCardAccountID won't fall back because '' isn't nullish — so the Expensify Card Account row briefly shows no value during the optimistic update. Would using || companyCardAccountID (or sending undefined/null instead of '') give a smoother fallback?
|
@ShridharGoel I left a few comments |
|
The code-related failures are already resolved by my earlier push ( The only remaining red check is This is the iOS The other two red checks — |
|
All code-related checks now pass on the latest commit (
The only remaining non-ignore-list failure, Why it's unrelated: it fails during CocoaPods install while This is a GitHub Packages auth/registry-access issue on the build runner (the same 401 hit the prior run too). This PR touches only JS/TS source ( The two |
Explanation of Change
This PR mirrors #97513 (authored by
s77rt, which adds the DualEntry integration export pages) and applies the review fixes that were requested there. The original PR is from a fork branch that MelvinBot's token can't push to, so this branch was created inExpensify/Appwith all ofs77rt's commits preserved and the review fixes added on top.Review fixes applied on top of the original work:
EXPENSIFY_CARD_ACCOUNT_ID: 'expensifyCardAccountID'toDUALENTRY_CONFIGinCONST— it was referenced by the export pages and the action but didn't exist.expensifyCardAccountIDfield to theDualEntryExporttype inPolicy.ts— it was read/written viaDualEntryExport['expensifyCardAccountID']but wasn't declared.UpdateDualEntryCreditCardAccountParamstype toUpdateDualEntryExpensifyCardAccountParamsto match its file and re-export.DualEntryExpensifyCardAccountPagecomponent and itsdisplayName(they were stillDualEntryCompanyCardAccountPage, a copy-paste leftover).Full credit for the DualEntry export feature belongs to
s77rt; the commits from #97513 are preserved here.Fixed Issues
$ #97238
PROPOSAL:
Tests
// TODO: The human co-author must confirm these tests before marking this PR "ready for review". Test steps carried over from #97513:
Test 1
Test 2
Offline tests
Same as Tests.
QA Steps
// TODO: The human co-author must confirm QA steps before marking this PR "ready for review".
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screenshots/Videosundefined