diff --git a/src/ROUTES.ts b/src/ROUTES.ts index f4701d09c231..2f2366e7f95f 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -168,6 +168,26 @@ const DYNAMIC_ROUTES = { path: 'sage-intacct/prerequisites', entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.ROOT, SCREENS.WORKSPACE.ACCOUNTING.EXISTING_SAGE_INTACCT_CONNECTIONS], }, + POLICY_ACCOUNTING_CERTINIA_EXPORT: { + path: 'certinia/export', + entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.ROOT], + }, + POLICY_ACCOUNTING_CERTINIA_PREFERRED_EXPORTER: { + path: 'certinia-preferred-exporter/select', + entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXPORT], + }, + POLICY_ACCOUNTING_CERTINIA_EXPORT_STATUS: { + path: 'certinia-status-select', + entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXPORT], + }, + POLICY_ACCOUNTING_CERTINIA_EXPORT_DATE: { + path: 'certinia-date-select', + entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXPORT], + }, + POLICY_ACCOUNTING_CERTINIA_DEFAULT_VENDOR: { + path: 'certinia-default-vendor/select', + entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXPORT], + }, POLICY_ACCOUNTING_NETSUITE_EXPORT_EXPENSES_VENDOR_SELECT: { path: 'vendor/select', entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.DYNAMIC_NETSUITE_EXPORT_EXPENSES], diff --git a/src/languages/de.ts b/src/languages/de.ts index 2a95c5f8b073..2632dbafb45e 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -4837,6 +4837,31 @@ ${amount} für ${merchant} – ${date}`, }, certinia: { title: 'Certinia', + exportDescription: 'Konfigurieren Sie, wie Expensify-Daten nach Certinia exportiert werden.', + payableInvoices: 'Fällige Rechnungen', + exportStatus: { + label: 'Status der zu zahlenden Rechnung', + values: { + [CONST.CERTINIA_EXPORT_STATUS.APPROVED]: 'Abschließen', + [CONST.CERTINIA_EXPORT_STATUS.IN_PROGRESS]: 'In Bearbeitung', + [CONST.CERTINIA_EXPORT_STATUS.SUBMITTED]: 'Übermittelt', + }, + }, + exportDate: { + label: 'Fälligkeitstag der Rechnung', + values: { + [CONST.CERTINIA_EXPORT_DATE.LAST_EXPENSE]: 'Datum der letzten Ausgabe', + [CONST.CERTINIA_EXPORT_DATE.REPORT_SUBMITTED]: 'Datum der Berichtseinreichung', + [CONST.CERTINIA_EXPORT_DATE.REPORT_EXPORTED]: 'Exportdatum', + }, + }, + exportReimbursable: { + label: 'Erstattungsfähige Ausgaben exportieren als', + helperText: 'Als erstattungsfähig markierte Ausgaben werden als Verbindlichkeitsrechnungen auf den*die Mitarbeitende*n exportiert.', + }, + exportNonReimbursable: {label: 'Nicht erstattungsfähige Ausgaben exportieren als'}, + noVendorsFound: 'Keine Anbieter gefunden', + noVendorsFoundDescription: 'Bitte synchronisieren Sie die Verbindung erneut, nachdem Lieferanten in Certinia hinzugefügt wurden.', prerequisites: { title: 'Bevor Sie die Verbindung herstellen', installBundle: 'Für FFA-Verbindungen', diff --git a/src/languages/en.ts b/src/languages/en.ts index d59ef0ca257d..101240a3c72f 100644 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -4914,6 +4914,33 @@ const translations = { }, certinia: { title: 'Certinia', + exportDescription: 'Configure how Expensify data exports to Certinia.', + payableInvoices: 'Payable Invoices', + exportStatus: { + label: 'Payable invoice status', + values: { + [CONST.CERTINIA_EXPORT_STATUS.APPROVED]: 'Complete', + [CONST.CERTINIA_EXPORT_STATUS.IN_PROGRESS]: 'In Progress', + [CONST.CERTINIA_EXPORT_STATUS.SUBMITTED]: 'Submitted', + }, + }, + exportDate: { + label: 'Payable invoice date', + values: { + [CONST.CERTINIA_EXPORT_DATE.LAST_EXPENSE]: 'Date of last expense', + [CONST.CERTINIA_EXPORT_DATE.REPORT_SUBMITTED]: 'Report submitted date', + [CONST.CERTINIA_EXPORT_DATE.REPORT_EXPORTED]: 'Export date', + }, + }, + exportReimbursable: { + label: 'Export reimbursable expenses as', + helperText: 'Expenses marked as reimbursable will be exported as Payable Invoices made out to the employee.', + }, + exportNonReimbursable: { + label: 'Export non-reimbursable expenses as', + }, + noVendorsFound: 'No vendors found', + noVendorsFoundDescription: 'Please sync the connection again after vendors are added in Certinia.', prerequisites: { title: 'Before you connect', installBundle: 'For FFA Connections', diff --git a/src/languages/es.ts b/src/languages/es.ts index daff12dad83f..a5799048995b 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -4721,6 +4721,31 @@ ${amount} para ${merchant} - ${date}`, }, certinia: { title: 'Certinia', + exportDescription: 'Configura cómo se exportan los datos de Expensify a Certinia.', + payableInvoices: 'Facturas por pagar', + exportStatus: { + label: 'Estado de factura por pagar', + values: { + [CONST.CERTINIA_EXPORT_STATUS.APPROVED]: 'Completar', + [CONST.CERTINIA_EXPORT_STATUS.IN_PROGRESS]: 'En curso', + [CONST.CERTINIA_EXPORT_STATUS.SUBMITTED]: 'Enviado', + }, + }, + exportDate: { + label: 'Fecha de factura pagadera', + values: { + [CONST.CERTINIA_EXPORT_DATE.LAST_EXPENSE]: 'Fecha del último gasto', + [CONST.CERTINIA_EXPORT_DATE.REPORT_SUBMITTED]: 'Fecha de envío del informe', + [CONST.CERTINIA_EXPORT_DATE.REPORT_EXPORTED]: 'Fecha de exportación', + }, + }, + exportReimbursable: { + label: 'Exportar gastos reembolsables como', + helperText: 'Los gastos marcados como reembolsables se exportarán como facturas por pagar a nombre de la persona empleada.', + }, + exportNonReimbursable: {label: 'Exportar gastos no reembolsables como'}, + noVendorsFound: 'No se encontraron proveedores', + noVendorsFoundDescription: 'Vuelve a sincronizar la conexión después de añadir los proveedores en Certinia.', prerequisites: { title: 'Antes de conectarte', installBundle: 'Para conexiones FFA', diff --git a/src/languages/fr.ts b/src/languages/fr.ts index d5225d75b1aa..49b46d6004e5 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -4847,6 +4847,31 @@ ${amount} pour ${merchant} - ${date}`, }, certinia: { title: 'Certinia', + exportDescription: 'Configurez comment les données Expensify sont exportées vers Certinia.', + payableInvoices: 'Factures à payer', + exportStatus: { + label: 'Statut de facture à payer', + values: { + [CONST.CERTINIA_EXPORT_STATUS.APPROVED]: 'Terminé', + [CONST.CERTINIA_EXPORT_STATUS.IN_PROGRESS]: 'En cours', + [CONST.CERTINIA_EXPORT_STATUS.SUBMITTED]: 'Soumis', + }, + }, + exportDate: { + label: 'Date d’échéance de la facture', + values: { + [CONST.CERTINIA_EXPORT_DATE.LAST_EXPENSE]: 'Date de la dernière dépense', + [CONST.CERTINIA_EXPORT_DATE.REPORT_SUBMITTED]: 'Date de soumission de la note de frais', + [CONST.CERTINIA_EXPORT_DATE.REPORT_EXPORTED]: 'Date d’exportation', + }, + }, + exportReimbursable: { + label: 'Exporter les dépenses remboursables en tant que', + helperText: 'Les dépenses marquées comme remboursables seront exportées en tant que factures à payer établies au nom de l’employé.', + }, + exportNonReimbursable: {label: 'Exporter les dépenses non remboursables en tant que'}, + noVendorsFound: 'Aucun fournisseur trouvé', + noVendorsFoundDescription: 'Veuillez synchroniser à nouveau la connexion après l’ajout des fournisseurs dans Certinia.', prerequisites: { title: 'Avant de vous connecter', installBundle: 'Pour les connexions FFA', diff --git a/src/languages/it.ts b/src/languages/it.ts index 91b9cf2c79c6..363a259a215d 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -4822,6 +4822,31 @@ ${amount} per ${merchant} - ${date}`, }, certinia: { title: 'Certinia', + exportDescription: 'Configura come i dati di Expensify vengono esportati in Certinia.', + payableInvoices: 'Fatture da pagare', + exportStatus: { + label: 'Stato fattura da pagare', + values: { + [CONST.CERTINIA_EXPORT_STATUS.APPROVED]: 'Completa', + [CONST.CERTINIA_EXPORT_STATUS.IN_PROGRESS]: 'In corso', + [CONST.CERTINIA_EXPORT_STATUS.SUBMITTED]: 'Inviato', + }, + }, + exportDate: { + label: 'Data fattura da pagare', + values: { + [CONST.CERTINIA_EXPORT_DATE.LAST_EXPENSE]: "Data dell'ultima spesa", + [CONST.CERTINIA_EXPORT_DATE.REPORT_SUBMITTED]: 'Data di invio del report', + [CONST.CERTINIA_EXPORT_DATE.REPORT_EXPORTED]: 'Data di esportazione', + }, + }, + exportReimbursable: { + label: 'Esporta le spese rimborsabili come', + helperText: 'Le spese contrassegnate come rimborsabili verranno esportate come fatture passive intestate al dipendente.', + }, + exportNonReimbursable: {label: 'Esporta le spese non rimborsabili come'}, + noVendorsFound: 'Nessun fornitore trovato', + noVendorsFoundDescription: 'Sincronizza di nuovo la connessione dopo che i fornitori sono stati aggiunti in Certinia.', prerequisites: { title: 'Prima di connetterti', installBundle: 'Per connessioni FFA', diff --git a/src/languages/ja.ts b/src/languages/ja.ts index 442779bfc4be..9533b6b065ab 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -4779,6 +4779,28 @@ ${integrationName === CONST.ONBOARDING_ACCOUNTING_MAPPING.other ? 'あなたの' }, certinia: { title: 'Certinia', + exportDescription: 'Expensify のデータを Certinia へエクスポートする方法を設定します。', + payableInvoices: '支払対象の請求書', + exportStatus: { + label: '買掛請求書のステータス', + values: { + [CONST.CERTINIA_EXPORT_STATUS.APPROVED]: '完了', + [CONST.CERTINIA_EXPORT_STATUS.IN_PROGRESS]: '進行中', + [CONST.CERTINIA_EXPORT_STATUS.SUBMITTED]: '送信済み', + }, + }, + exportDate: { + label: '支払予定請求書日', + values: { + [CONST.CERTINIA_EXPORT_DATE.LAST_EXPENSE]: '最終経費日', + [CONST.CERTINIA_EXPORT_DATE.REPORT_SUBMITTED]: 'レポート提出日', + [CONST.CERTINIA_EXPORT_DATE.REPORT_EXPORTED]: 'エクスポート日', + }, + }, + exportReimbursable: {label: '精算対象経費の書き出し形式', helperText: '払い戻し対象としてマークされた経費は、従業員宛ての未払請求書としてエクスポートされます。'}, + exportNonReimbursable: {label: '未払い精算の対象外経費を次の形式でエクスポートする'}, + noVendorsFound: 'ベンダーが見つかりませんでした', + noVendorsFoundDescription: 'Certinia にベンダーを追加した後に、もう一度接続の同期を行ってください。', prerequisites: { title: '接続する前に', installBundle: 'FFA 接続用', diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 080443bae21e..adf68b573ae2 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -4813,6 +4813,31 @@ ${amount} voor ${merchant} - ${date}`, }, certinia: { title: 'Certinia', + exportDescription: 'Stel in hoe Expensify-gegevens worden geëxporteerd naar Certinia.', + payableInvoices: 'Te betalen facturen', + exportStatus: { + label: 'Status te betalen factuur', + values: { + [CONST.CERTINIA_EXPORT_STATUS.APPROVED]: 'Voltooien', + [CONST.CERTINIA_EXPORT_STATUS.IN_PROGRESS]: 'Bezig', + [CONST.CERTINIA_EXPORT_STATUS.SUBMITTED]: 'Ingediend', + }, + }, + exportDate: { + label: 'Vervaldatum factuur', + values: { + [CONST.CERTINIA_EXPORT_DATE.LAST_EXPENSE]: 'Datum van laatste uitgave', + [CONST.CERTINIA_EXPORT_DATE.REPORT_SUBMITTED]: 'Indiendatum rapport', + [CONST.CERTINIA_EXPORT_DATE.REPORT_EXPORTED]: 'Exportdatum', + }, + }, + exportReimbursable: { + label: 'Terugbetaalbare declaraties exporteren als', + helperText: 'Declarabele uitgaven worden geëxporteerd als te betalen facturen op naam van de werknemer.', + }, + exportNonReimbursable: {label: 'Niet-declarabele uitgaven exporteren als'}, + noVendorsFound: 'Geen leveranciers gevonden', + noVendorsFoundDescription: 'Synchroniseer de verbinding opnieuw nadat leveranciers zijn toegevoegd in Certinia.', prerequisites: { title: 'Voordat je verbinding maakt', installBundle: 'Voor FFA-verbindingen', diff --git a/src/languages/pl.ts b/src/languages/pl.ts index d3ec89a682fe..234a83540378 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -4805,6 +4805,31 @@ ${amount} dla ${merchant} - ${date}`, }, certinia: { title: 'Certinia', + exportDescription: 'Skonfiguruj sposób eksportu danych z Expensify do Certinia.', + payableInvoices: 'Należne faktury', + exportStatus: { + label: 'Status faktury do zapłaty', + values: { + [CONST.CERTINIA_EXPORT_STATUS.APPROVED]: 'Zakończ', + [CONST.CERTINIA_EXPORT_STATUS.IN_PROGRESS]: 'W toku', + [CONST.CERTINIA_EXPORT_STATUS.SUBMITTED]: 'Wysłano', + }, + }, + exportDate: { + label: 'Data płatności faktury', + values: { + [CONST.CERTINIA_EXPORT_DATE.LAST_EXPENSE]: 'Data ostatniego wydatku', + [CONST.CERTINIA_EXPORT_DATE.REPORT_SUBMITTED]: 'Data wysłania raportu', + [CONST.CERTINIA_EXPORT_DATE.REPORT_EXPORTED]: 'Data eksportu', + }, + }, + exportReimbursable: { + label: 'Eksportuj zwracane wydatki jako', + helperText: 'Wydatki oznaczone jako podlegające zwrotowi zostaną wyeksportowane jako faktury do zapłaty wystawione na pracownika.', + }, + exportNonReimbursable: {label: 'Eksportuj niewliczane do zwrotu wydatki jako'}, + noVendorsFound: 'Nie znaleziono dostawców', + noVendorsFoundDescription: 'Po dodaniu dostawców w Certinia zsynchronizuj ponownie to połączenie.', prerequisites: { title: 'Zanim się połączysz', installBundle: 'Dla połączeń FFA', diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index cf12b8c202da..47547b1c0955 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -4808,6 +4808,31 @@ ${amount} para ${merchant} - ${date}`, }, certinia: { title: 'Certinia', + exportDescription: 'Configure como os dados do Expensify são exportados para o Certinia.', + payableInvoices: 'Faturas a Pagar', + exportStatus: { + label: 'Status da fatura a pagar', + values: { + [CONST.CERTINIA_EXPORT_STATUS.APPROVED]: 'Concluir', + [CONST.CERTINIA_EXPORT_STATUS.IN_PROGRESS]: 'Em andamento', + [CONST.CERTINIA_EXPORT_STATUS.SUBMITTED]: 'Enviado', + }, + }, + exportDate: { + label: 'Data de vencimento da fatura', + values: { + [CONST.CERTINIA_EXPORT_DATE.LAST_EXPENSE]: 'Data da última despesa', + [CONST.CERTINIA_EXPORT_DATE.REPORT_SUBMITTED]: 'Data de envio do relatório', + [CONST.CERTINIA_EXPORT_DATE.REPORT_EXPORTED]: 'Data de exportação', + }, + }, + exportReimbursable: { + label: 'Exportar despesas reembolsáveis como', + helperText: 'Despesas marcadas como reembolsáveis serão exportadas como faturas a pagar emitidas em nome do funcionário.', + }, + exportNonReimbursable: {label: 'Exportar despesas não reembolsáveis como'}, + noVendorsFound: 'Nenhum fornecedor encontrado', + noVendorsFoundDescription: 'Sincronize a conexão novamente depois que os fornecedores forem adicionados no Certinia.', prerequisites: { title: 'Antes de conectar', installBundle: 'Para conexões FFA', diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index aebc0b851e8e..bee02c3deb3d 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -4691,6 +4691,28 @@ ${amount},商户:${merchant} - 日期:${date}`, }, certinia: { title: 'Certinia', + exportDescription: '配置 Expensify 数据导出到 Certinia 的方式。', + payableInvoices: '应付发票', + exportStatus: { + label: '应付发票状态', + values: { + [CONST.CERTINIA_EXPORT_STATUS.APPROVED]: '完成', + [CONST.CERTINIA_EXPORT_STATUS.IN_PROGRESS]: '进行中', + [CONST.CERTINIA_EXPORT_STATUS.SUBMITTED]: '已提交', + }, + }, + exportDate: { + label: '应付发票日期', + values: { + [CONST.CERTINIA_EXPORT_DATE.LAST_EXPENSE]: '上次报销日期', + [CONST.CERTINIA_EXPORT_DATE.REPORT_SUBMITTED]: '报表提交日期', + [CONST.CERTINIA_EXPORT_DATE.REPORT_EXPORTED]: '导出日期', + }, + }, + exportReimbursable: {label: '导出可报销费用为', helperText: '标记为可报销的费用将作为应付账单导出,并开具给员工。'}, + exportNonReimbursable: {label: '将不可报销的报销单导出为'}, + noVendorsFound: '未找到供应商', + noVendorsFoundDescription: '在 Certinia 中添加供应商后,请再次同步连接。', prerequisites: { title: '在你连接之前', installBundle: '用于 FFA 连接', diff --git a/src/libs/API/types.ts b/src/libs/API/types.ts index 5129b71e80f2..d7405d78c8ef 100644 --- a/src/libs/API/types.ts +++ b/src/libs/API/types.ts @@ -1071,9 +1071,9 @@ type WriteCommandParameters = { // Certinia (FinancialForce) parameters [WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_EXPORTER]: Parameters.UpdateFinancialForceGenericTypeParams<'email', string>; - [WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_EXPORT_STATUS]: Parameters.UpdateFinancialForceGenericTypeParams<'value', string>; - [WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_EXPORT_DATE]: Parameters.UpdateFinancialForceGenericTypeParams<'value', string>; - [WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_DEFAULT_VENDOR]: Parameters.UpdateFinancialForceGenericTypeParams<'vendorID', string>; + [WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_EXPORT_STATUS]: Parameters.UpdateFinancialForceGenericTypeParams<'exportStatus', ValueOf>; + [WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_EXPORT_DATE]: Parameters.UpdateFinancialForceGenericTypeParams<'exportDate', ValueOf>; + [WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_DEFAULT_VENDOR]: Parameters.UpdateFinancialForceGenericTypeParams<'vendorAccount', string>; [WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_DIMENSION1_MAPPING]: Parameters.UpdateFinancialForceGenericTypeParams<'value', string>; [WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_DIMENSION2_MAPPING]: Parameters.UpdateFinancialForceGenericTypeParams<'value', string>; [WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_DIMENSION3_MAPPING]: Parameters.UpdateFinancialForceGenericTypeParams<'value', string>; diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx index 804b6c97024a..101f9997c607 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx @@ -906,6 +906,12 @@ const SettingsModalStackNavigator = createModalStackNavigator require('../../../../pages/workspace/accounting/certinia/CertiniaPrerequisitesPage').default, [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXISTING_CONNECTIONS]: () => require('../../../../pages/workspace/accounting/certinia/CertiniaExistingConnectionsPage').default, + [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXPORT]: () => require('../../../../pages/workspace/accounting/certinia/export/CertiniaExportPage').default, + [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_PREFERRED_EXPORTER]: () => + require('../../../../pages/workspace/accounting/certinia/export/CertiniaPreferredExporterPage').default, + [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXPORT_STATUS]: () => require('../../../../pages/workspace/accounting/certinia/export/CertiniaExportStatusPage').default, + [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXPORT_DATE]: () => require('../../../../pages/workspace/accounting/certinia/export/CertiniaExportDatePage').default, + [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_DEFAULT_VENDOR]: () => require('../../../../pages/workspace/accounting/certinia/export/CertiniaDefaultVendorPage').default, [SCREENS.WORKSPACE.ACCOUNTING.CARD_RECONCILIATION]: () => require('../../../../pages/workspace/accounting/reconciliation/CardReconciliationPage').default, [SCREENS.WORKSPACE.ACCOUNTING.CARD_RECONCILIATION_QUICKBOOKS_DESKTOP_AUTO_SYNC]: () => require('../../../../pages/workspace/accounting/reconciliation/CardReconciliationQuickbooksDesktopAutoSyncPage').default, diff --git a/src/libs/Navigation/linkingConfig/RELATIONS/WORKSPACE_TO_RHP.ts b/src/libs/Navigation/linkingConfig/RELATIONS/WORKSPACE_TO_RHP.ts index dc272cf1f4c9..ce7527d075c3 100755 --- a/src/libs/Navigation/linkingConfig/RELATIONS/WORKSPACE_TO_RHP.ts +++ b/src/libs/Navigation/linkingConfig/RELATIONS/WORKSPACE_TO_RHP.ts @@ -172,6 +172,11 @@ const WORKSPACE_TO_RHP: Partial['config'] = { [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXISTING_CONNECTIONS]: {path: ROUTES.POLICY_ACCOUNTING_CERTINIA_EXISTING_CONNECTIONS.route}, [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_IMPORT]: {path: ROUTES.POLICY_ACCOUNTING_CERTINIA_IMPORT.route}, [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_DIMENSION_MAPPING]: {path: ROUTES.POLICY_ACCOUNTING_CERTINIA_DIMENSION_MAPPING.route}, - [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXPORT]: {path: ROUTES.POLICY_ACCOUNTING_CERTINIA_EXPORT.route}, - [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_PREFERRED_EXPORTER]: {path: ROUTES.POLICY_ACCOUNTING_CERTINIA_PREFERRED_EXPORTER.route}, - [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXPORT_STATUS]: {path: ROUTES.POLICY_ACCOUNTING_CERTINIA_EXPORT_STATUS.route}, - [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXPORT_DATE]: {path: ROUTES.POLICY_ACCOUNTING_CERTINIA_EXPORT_DATE.route}, - [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_DEFAULT_VENDOR]: {path: ROUTES.POLICY_ACCOUNTING_CERTINIA_DEFAULT_VENDOR.route}, + [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXPORT]: DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_EXPORT.path, + [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_PREFERRED_EXPORTER]: DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_PREFERRED_EXPORTER.path, + [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXPORT_STATUS]: DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_EXPORT_STATUS.path, + [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXPORT_DATE]: DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_EXPORT_DATE.path, + [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_DEFAULT_VENDOR]: DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_DEFAULT_VENDOR.path, [SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_ADVANCED]: {path: ROUTES.POLICY_ACCOUNTING_CERTINIA_ADVANCED.route}, [SCREENS.WORKSPACE.ACCOUNTING.CARD_RECONCILIATION]: {path: ROUTES.WORKSPACE_ACCOUNTING_CARD_RECONCILIATION.route}, [SCREENS.WORKSPACE.ACCOUNTING.CARD_RECONCILIATION_QUICKBOOKS_DESKTOP_AUTO_SYNC]: { diff --git a/src/libs/actions/connections/FinancialForce.ts b/src/libs/actions/connections/FinancialForce.ts index 064fbebfb2cf..bd25fe5ce3f0 100644 --- a/src/libs/actions/connections/FinancialForce.ts +++ b/src/libs/actions/connections/FinancialForce.ts @@ -224,12 +224,12 @@ function updateFinancialForceExporter(policyID: string, exporter: string, previo function updateFinancialForceExportStatus(policyID: string, status: ValueOf, previousStatus: ValueOf | null) { const {optimisticData, failureData, successData} = prepareOnyxDataForFinancialForceExportUpdate(policyID, CONST.CERTINIA_CONFIG.EXPORT_STATUS, status, previousStatus ?? undefined); - write(WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_EXPORT_STATUS, {policyID, value: status}, {optimisticData, failureData, successData}); + write(WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_EXPORT_STATUS, {policyID, exportStatus: status}, {optimisticData, failureData, successData}); } function updateFinancialForceExportDate(policyID: string, date: ValueOf, previousDate: ValueOf | null) { const {optimisticData, failureData, successData} = prepareOnyxDataForFinancialForceExportUpdate(policyID, CONST.CERTINIA_CONFIG.EXPORT_DATE, date, previousDate ?? undefined); - write(WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_EXPORT_DATE, {policyID, value: date}, {optimisticData, failureData, successData}); + write(WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_EXPORT_DATE, {policyID, exportDate: date}, {optimisticData, failureData, successData}); } function updateFinancialForceDefaultVendor(policyID: string, vendorAccountID: string, previousVendorAccountID: string | null) { @@ -239,7 +239,7 @@ function updateFinancialForceDefaultVendor(policyID: string, vendorAccountID: st vendorAccountID, previousVendorAccountID ?? undefined, ); - write(WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_DEFAULT_VENDOR, {policyID, vendorID: vendorAccountID}, {optimisticData, failureData, successData}); + write(WRITE_COMMANDS.UPDATE_FINANCIAL_FORCE_DEFAULT_VENDOR, {policyID, vendorAccount: vendorAccountID}, {optimisticData, failureData, successData}); } function updateFinancialForceAutoSync(policyID: string, enabled: boolean, previousValue?: boolean) { diff --git a/src/pages/workspace/accounting/PolicyAccountingPage.tsx b/src/pages/workspace/accounting/PolicyAccountingPage.tsx index 635cff79699d..5b7cf31cf611 100644 --- a/src/pages/workspace/accounting/PolicyAccountingPage.tsx +++ b/src/pages/workspace/accounting/PolicyAccountingPage.tsx @@ -472,7 +472,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { ), }, ...(isEmptyObject(integrationSpecificMenuItems) || shouldShowSynchronizationError || !hasAccountingConnection ? [] : [integrationSpecificMenuItems]), - ...(!hasAccountingConnection || !isConnectionVerified || connectedIntegration === CONST.POLICY.CONNECTIONS.NAME.CERTINIA ? [] : configurationOptions), + ...(!hasAccountingConnection || !isConnectionVerified ? [] : configurationOptions), ]; }, [ policy, diff --git a/src/pages/workspace/accounting/certinia/export/CertiniaDefaultVendorPage.tsx b/src/pages/workspace/accounting/certinia/export/CertiniaDefaultVendorPage.tsx new file mode 100644 index 000000000000..2806ce94f038 --- /dev/null +++ b/src/pages/workspace/accounting/certinia/export/CertiniaDefaultVendorPage.tsx @@ -0,0 +1,84 @@ +import React, {useCallback, useMemo} from 'react'; +import {View} from 'react-native'; +import type {ListItem} from '@components/SelectionList/types'; +import SelectionScreen from '@components/SelectionScreen'; +import Text from '@components/Text'; +import useDynamicBackPath from '@hooks/useDynamicBackPath'; +import useLocalize from '@hooks/useLocalize'; +import useThemeStyles from '@hooks/useThemeStyles'; +import {clearFinancialForceErrorField, updateFinancialForceDefaultVendor} from '@libs/actions/connections/FinancialForce'; +import {getLatestErrorField} from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import {settingsPendingAction} from '@libs/PolicyUtils'; +import type {WithPolicyConnectionsProps} from '@pages/workspace/withPolicyConnections'; +import withPolicyConnections from '@pages/workspace/withPolicyConnections'; +import CONST from '@src/CONST'; +import {DYNAMIC_ROUTES} from '@src/ROUTES'; + +type VendorListItem = ListItem & { + value: string; +}; + +function CertiniaDefaultVendorPage({policy}: WithPolicyConnectionsProps) { + const {translate} = useLocalize(); + const styles = useThemeStyles(); + const policyID = policy?.id; + const {config, data} = policy?.connections?.financialforce ?? {}; + const exportConfig = config?.export; + const vendors = data?.vendors ?? []; + const backPath = useDynamicBackPath(DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_DEFAULT_VENDOR.path); + + const dataOptions: VendorListItem[] = useMemo( + () => + vendors.map((vendor) => ({ + value: vendor.id, + text: vendor.name, + keyForList: vendor.id, + isSelected: exportConfig?.vendorAccount === vendor.id, + })), + [exportConfig?.vendorAccount, vendors], + ); + const listEmptyContent = ( + + {translate('workspace.certinia.noVendorsFound')} + {translate('workspace.certinia.noVendorsFoundDescription')} + + ); + + const goBack = useCallback(() => { + Navigation.goBack(backPath); + }, [backPath]); + + const selectVendor = useCallback( + (row: VendorListItem) => { + if (row.value !== exportConfig?.vendorAccount && policyID) { + updateFinancialForceDefaultVendor(policyID, row.value, exportConfig?.vendorAccount ?? null); + } + goBack(); + }, + [exportConfig?.vendorAccount, goBack, policyID], + ); + + return ( + clearFinancialForceErrorField(policyID, CONST.CERTINIA_CONFIG.VENDOR_ACCOUNT)} + /> + ); +} + +export default withPolicyConnections(CertiniaDefaultVendorPage); diff --git a/src/pages/workspace/accounting/certinia/export/CertiniaExportDatePage.tsx b/src/pages/workspace/accounting/certinia/export/CertiniaExportDatePage.tsx new file mode 100644 index 000000000000..4a451d8821b9 --- /dev/null +++ b/src/pages/workspace/accounting/certinia/export/CertiniaExportDatePage.tsx @@ -0,0 +1,76 @@ +import React, {useCallback, useMemo} from 'react'; +import type {ValueOf} from 'type-fest'; +import type {ListItem} from '@components/SelectionList/types'; +import SelectionScreen from '@components/SelectionScreen'; +import useDynamicBackPath from '@hooks/useDynamicBackPath'; +import useLocalize from '@hooks/useLocalize'; +import useThemeStyles from '@hooks/useThemeStyles'; +import {clearFinancialForceErrorField, updateFinancialForceExportDate} from '@libs/actions/connections/FinancialForce'; +import {getLatestErrorField} from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import {settingsPendingAction} from '@libs/PolicyUtils'; +import type {WithPolicyConnectionsProps} from '@pages/workspace/withPolicyConnections'; +import withPolicyConnections from '@pages/workspace/withPolicyConnections'; +import CONST from '@src/CONST'; +import {DYNAMIC_ROUTES} from '@src/ROUTES'; + +type ExportDateListItem = ListItem & { + value: ValueOf; +}; + +function CertiniaExportDatePage({policy}: WithPolicyConnectionsProps) { + const {translate} = useLocalize(); + const styles = useThemeStyles(); + const policyID = policy?.id; + const {config} = policy?.connections?.financialforce ?? {}; + const exportConfig = config?.export; + const selectedExportDate = exportConfig?.exportDate; + const backPath = useDynamicBackPath(DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_EXPORT_DATE.path); + + const data: ExportDateListItem[] = useMemo( + () => + Object.values(CONST.CERTINIA_EXPORT_DATE).map((date) => ({ + value: date, + text: translate(`workspace.certinia.exportDate.values.${date}`), + keyForList: date, + isSelected: selectedExportDate === date, + })), + [selectedExportDate, translate], + ); + + const goBack = useCallback(() => { + Navigation.goBack(backPath); + }, [backPath]); + + const selectExportDate = useCallback( + (row: ExportDateListItem) => { + if (row.value !== selectedExportDate && policyID) { + updateFinancialForceExportDate(policyID, row.value, exportConfig?.exportDate ?? null); + } + goBack(); + }, + [exportConfig?.exportDate, goBack, policyID, selectedExportDate], + ); + + return ( + clearFinancialForceErrorField(policyID, CONST.CERTINIA_CONFIG.EXPORT_DATE)} + /> + ); +} + +export default withPolicyConnections(CertiniaExportDatePage); diff --git a/src/pages/workspace/accounting/certinia/export/CertiniaExportPage.tsx b/src/pages/workspace/accounting/certinia/export/CertiniaExportPage.tsx new file mode 100644 index 000000000000..08a4546293d6 --- /dev/null +++ b/src/pages/workspace/accounting/certinia/export/CertiniaExportPage.tsx @@ -0,0 +1,113 @@ +import React from 'react'; +import ConnectionLayout from '@components/ConnectionLayout'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import useLocalize from '@hooks/useLocalize'; +import useThemeStyles from '@hooks/useThemeStyles'; +import createDynamicRoute from '@libs/Navigation/helpers/dynamicRoutesUtils/createDynamicRoute'; +import Navigation from '@libs/Navigation/Navigation'; +import {areSettingsInErrorFields, settingsPendingAction} from '@libs/PolicyUtils'; +import type {WithPolicyConnectionsProps} from '@pages/workspace/withPolicyConnections'; +import withPolicyConnections from '@pages/workspace/withPolicyConnections'; +import CONST from '@src/CONST'; +import ROUTES, {DYNAMIC_ROUTES} from '@src/ROUTES'; + +type ExportRow = { + description: string; + title?: string; + helperText?: string; + onPress?: () => void; + interactive?: boolean; + subscribedSettings: string[]; +}; + +function CertiniaExportPage({policy}: WithPolicyConnectionsProps) { + const {translate} = useLocalize(); + const styles = useThemeStyles(); + const policyID = policy?.id; + const policyOwner = policy?.owner ?? ''; + const {config, data} = policy?.connections?.financialforce ?? {}; + const exportConfig = config?.export; + const exportPath = policyID ? `${ROUTES.POLICY_ACCOUNTING.getRoute(policyID)}/${DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_EXPORT.path}` : undefined; + const selectedVendor = data?.vendors?.find((vendor) => vendor.id === exportConfig?.vendorAccount); + const exportStatus = exportConfig?.exportStatus; + const exportDate = exportConfig?.exportDate; + + const rows: ExportRow[] = [ + { + description: translate('workspace.accounting.preferredExporter'), + title: exportConfig?.exporter ?? policyOwner, + onPress: !exportPath ? undefined : () => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_PREFERRED_EXPORTER.path, exportPath)), + subscribedSettings: [CONST.CERTINIA_CONFIG.EXPORTER], + }, + { + description: translate('workspace.certinia.exportStatus.label'), + title: exportStatus ? translate(`workspace.certinia.exportStatus.values.${exportStatus}`) : exportConfig?.exportStatus, + onPress: !exportPath ? undefined : () => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_EXPORT_STATUS.path, exportPath)), + subscribedSettings: [CONST.CERTINIA_CONFIG.EXPORT_STATUS], + }, + { + description: translate('workspace.certinia.exportDate.label'), + title: exportDate ? translate(`workspace.certinia.exportDate.values.${exportDate}`) : exportConfig?.exportDate, + onPress: !exportPath ? undefined : () => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_EXPORT_DATE.path, exportPath)), + subscribedSettings: [CONST.CERTINIA_CONFIG.EXPORT_DATE], + }, + { + description: translate('workspace.certinia.exportReimbursable.label'), + title: translate('workspace.certinia.payableInvoices'), + helperText: translate('workspace.certinia.exportReimbursable.helperText'), + interactive: false, + subscribedSettings: [CONST.CERTINIA_CONFIG.REIMBURSABLE], + }, + { + description: translate('workspace.certinia.exportNonReimbursable.label'), + title: translate('workspace.certinia.payableInvoices'), + interactive: false, + subscribedSettings: [CONST.CERTINIA_CONFIG.NON_REIMBURSABLE], + }, + { + description: translate('workspace.accounting.defaultVendor'), + title: selectedVendor?.name, + onPress: !exportPath ? undefined : () => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_DEFAULT_VENDOR.path, exportPath)), + subscribedSettings: [CONST.CERTINIA_CONFIG.VENDOR_ACCOUNT], + }, + ]; + + return ( + Navigation.goBack(policyID ? ROUTES.POLICY_ACCOUNTING.getRoute(policyID) : undefined)} + featureName={CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED} + contentContainerStyle={styles.pb2} + titleStyle={styles.ph5} + connectionName={CONST.POLICY.CONNECTIONS.NAME.CERTINIA} + > + {rows.map((row) => { + const pendingAction = settingsPendingAction(row.subscribedSettings, config?.pendingFields); + const brickRoadIndicator = areSettingsInErrorFields(row.subscribedSettings, config?.errorFields) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined; + return ( + + + + ); + })} + + ); +} + +export default withPolicyConnections(CertiniaExportPage); diff --git a/src/pages/workspace/accounting/certinia/export/CertiniaExportStatusPage.tsx b/src/pages/workspace/accounting/certinia/export/CertiniaExportStatusPage.tsx new file mode 100644 index 000000000000..c99c32725002 --- /dev/null +++ b/src/pages/workspace/accounting/certinia/export/CertiniaExportStatusPage.tsx @@ -0,0 +1,78 @@ +import React, {useCallback, useMemo} from 'react'; +import type {ValueOf} from 'type-fest'; +import type {ListItem} from '@components/SelectionList/types'; +import SelectionScreen from '@components/SelectionScreen'; +import useDynamicBackPath from '@hooks/useDynamicBackPath'; +import useLocalize from '@hooks/useLocalize'; +import useThemeStyles from '@hooks/useThemeStyles'; +import {clearFinancialForceErrorField, updateFinancialForceExportStatus} from '@libs/actions/connections/FinancialForce'; +import {getLatestErrorField} from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import {settingsPendingAction} from '@libs/PolicyUtils'; +import type {WithPolicyConnectionsProps} from '@pages/workspace/withPolicyConnections'; +import withPolicyConnections from '@pages/workspace/withPolicyConnections'; +import CONST from '@src/CONST'; +import {DYNAMIC_ROUTES} from '@src/ROUTES'; + +type ExportStatusListItem = ListItem & { + value: ValueOf; +}; + +const FFA_EXPORT_STATUSES: Array> = [CONST.CERTINIA_EXPORT_STATUS.APPROVED, CONST.CERTINIA_EXPORT_STATUS.IN_PROGRESS]; + +function CertiniaExportStatusPage({policy}: WithPolicyConnectionsProps) { + const {translate} = useLocalize(); + const styles = useThemeStyles(); + const policyID = policy?.id; + const {config} = policy?.connections?.financialforce ?? {}; + const exportConfig = config?.export; + const selectedExportStatus = exportConfig?.exportStatus; + const backPath = useDynamicBackPath(DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_EXPORT_STATUS.path); + + const data: ExportStatusListItem[] = useMemo( + () => + FFA_EXPORT_STATUSES.map((status) => ({ + value: status, + text: translate(`workspace.certinia.exportStatus.values.${status}`), + keyForList: status, + isSelected: selectedExportStatus === status, + })), + [selectedExportStatus, translate], + ); + + const goBack = useCallback(() => { + Navigation.goBack(backPath); + }, [backPath]); + + const selectExportStatus = useCallback( + (row: ExportStatusListItem) => { + if (row.value !== selectedExportStatus && policyID) { + updateFinancialForceExportStatus(policyID, row.value, exportConfig?.exportStatus ?? null); + } + goBack(); + }, + [exportConfig?.exportStatus, goBack, policyID, selectedExportStatus], + ); + + return ( + clearFinancialForceErrorField(policyID, CONST.CERTINIA_CONFIG.EXPORT_STATUS)} + /> + ); +} + +export default withPolicyConnections(CertiniaExportStatusPage); diff --git a/src/pages/workspace/accounting/certinia/export/CertiniaPreferredExporterPage.tsx b/src/pages/workspace/accounting/certinia/export/CertiniaPreferredExporterPage.tsx new file mode 100644 index 000000000000..99ab7396bde8 --- /dev/null +++ b/src/pages/workspace/accounting/certinia/export/CertiniaPreferredExporterPage.tsx @@ -0,0 +1,113 @@ +import isEmpty from 'lodash/isEmpty'; +import React, {useCallback, useMemo} from 'react'; +import {View} from 'react-native'; +import type {ListItem} from '@components/SelectionList/types'; +import SelectionScreen from '@components/SelectionScreen'; +import Text from '@components/Text'; +import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; +import useDynamicBackPath from '@hooks/useDynamicBackPath'; +import useLocalize from '@hooks/useLocalize'; +import useThemeStyles from '@hooks/useThemeStyles'; +import {clearFinancialForceErrorField, updateFinancialForceExporter} from '@libs/actions/connections/FinancialForce'; +import {getLatestErrorField} from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import {getAdminEmployees, isExpensifyTeam, settingsPendingAction} from '@libs/PolicyUtils'; +import type {WithPolicyConnectionsProps} from '@pages/workspace/withPolicyConnections'; +import withPolicyConnections from '@pages/workspace/withPolicyConnections'; +import CONST from '@src/CONST'; +import {DYNAMIC_ROUTES} from '@src/ROUTES'; + +type ExporterListItem = ListItem & { + value: string; +}; + +function CertiniaPreferredExporterPage({policy}: WithPolicyConnectionsProps) { + const {translate} = useLocalize(); + const styles = useThemeStyles(); + const policyOwner = policy?.owner ?? ''; + const policyID = policy?.id; + const {config} = policy?.connections?.financialforce ?? {}; + const exportConfig = config?.export; + const exporters = getAdminEmployees(policy); + const {login: currentUserLogin} = useCurrentUserPersonalDetails(); + const backPath = useDynamicBackPath(DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_PREFERRED_EXPORTER.path); + + const data: ExporterListItem[] = useMemo(() => { + if (!isEmpty(policyOwner) && isEmpty(exporters)) { + return [ + { + value: policyOwner, + text: policyOwner, + keyForList: policyOwner, + isSelected: exportConfig?.exporter === policyOwner, + }, + ]; + } + + return exporters?.reduce((options, exporter) => { + if (!exporter.email) { + return options; + } + + // Don't show guides if the current user is not a guide themselves or an Expensify employee + if (isExpensifyTeam(exporter.email) && !isExpensifyTeam(policyOwner) && !isExpensifyTeam(currentUserLogin)) { + return options; + } + + options.push({ + value: exporter.email, + text: exporter.email, + keyForList: exporter.email, + isSelected: (exportConfig?.exporter ?? policyOwner) === exporter.email, + }); + return options; + }, []); + }, [currentUserLogin, exportConfig?.exporter, exporters, policyOwner]); + + const goBack = useCallback(() => { + Navigation.goBack(backPath); + }, [backPath]); + + const selectExporter = useCallback( + (row: ExporterListItem) => { + if (row.value !== exportConfig?.exporter && policyID) { + updateFinancialForceExporter(policyID, row.value, exportConfig?.exporter ?? ''); + } + goBack(); + }, + [exportConfig?.exporter, goBack, policyID], + ); + + const headerContent = useMemo( + () => ( + + {translate('workspace.accounting.exportPreferredExporterNote')} + {translate('workspace.accounting.exportPreferredExporterSubNote')} + + ), + [translate, styles.pb2, styles.ph5, styles.pb5, styles.textNormal], + ); + + return ( + clearFinancialForceErrorField(policyID, CONST.CERTINIA_CONFIG.EXPORTER)} + /> + ); +} + +export default withPolicyConnections(CertiniaPreferredExporterPage); diff --git a/src/pages/workspace/accounting/utils.tsx b/src/pages/workspace/accounting/utils.tsx index 545a96c0d8ca..f455157922de 100644 --- a/src/pages/workspace/accounting/utils.tsx +++ b/src/pages/workspace/accounting/utils.tsx @@ -336,6 +336,19 @@ function getAccountingIntegrationData( key={key} /> ), + onImportPagePress: () => {}, + onExportPagePress: () => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_EXPORT.path, ROUTES.POLICY_ACCOUNTING.getRoute(policyID))), + onAdvancedPagePress: () => {}, + subscribedExportSettings: [ + CONST.CERTINIA_CONFIG.EXPORTER, + CONST.CERTINIA_CONFIG.EXPORT_STATUS, + CONST.CERTINIA_CONFIG.EXPORT_DATE, + CONST.CERTINIA_CONFIG.VENDOR_ACCOUNT, + CONST.CERTINIA_CONFIG.REIMBURSABLE, + CONST.CERTINIA_CONFIG.NON_REIMBURSABLE, + ], + pendingFields: policy?.connections?.financialforce?.config?.pendingFields, + errorFields: policy?.connections?.financialforce?.config?.errorFields, workspaceUpgradeNavigationDetails: { integrationAlias: CONST.UPGRADE_FEATURE_INTRO_MAPPING[CONST.POLICY.CONNECTIONS.NAME.CERTINIA].alias, backToAfterWorkspaceUpgradeRoute: getBackToAfterWorkspaceUpgradeRouteForCertinia(),