From 473797c9bf5e6c26d49270caa0936d7f5791c6a1 Mon Sep 17 00:00:00 2001 From: NikkiWines Date: Fri, 27 Jun 2025 16:56:46 -0700 Subject: [PATCH 1/8] add expensify_integrationServerExportTemplates NVP --- src/ONYXKEYS.ts | 4 ++++ src/types/onyx/IntegrationServerExportTemplate.ts | 10 ++++++++++ src/types/onyx/index.ts | 2 ++ 3 files changed, 16 insertions(+) create mode 100644 src/types/onyx/IntegrationServerExportTemplate.ts diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts index 1a6520254aba..ded62376bfed 100755 --- a/src/ONYXKEYS.ts +++ b/src/ONYXKEYS.ts @@ -249,6 +249,9 @@ const ONYXKEYS = { /** Details on whether an account is locked or not */ NVP_PRIVATE_LOCK_ACCOUNT_DETAILS: 'nvp_private_lockAccountDetails', + /** The NVP containing the user's custom IS templates */ + NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES: 'nvp_expensify_integrationServerExportTemplates', + /** Plaid data (access tokens, bank accounts ...) */ PLAID_DATA: 'plaidData', @@ -1203,6 +1206,7 @@ type OnyxValuesMapping = { [ONYXKEYS.NVP_LAST_IPHONE_LOGIN]: string; [ONYXKEYS.NVP_LAST_ANDROID_LOGIN]: string; [ONYXKEYS.TRANSACTION_THREAD_NAVIGATION_REPORT_IDS]: string[]; + [ONYXKEYS.NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES]: OnyxTypes.IntegrationServerExportTemplate[]; }; type OnyxDerivedValuesMapping = { diff --git a/src/types/onyx/IntegrationServerExportTemplate.ts b/src/types/onyx/IntegrationServerExportTemplate.ts new file mode 100644 index 000000000000..bdb5f0e544f6 --- /dev/null +++ b/src/types/onyx/IntegrationServerExportTemplate.ts @@ -0,0 +1,10 @@ +import type * as OnyxCommon from './OnyxCommon'; + +/** Information about integration server export templates */ +type IntegrationServerExportTemplate = OnyxCommon.OnyxValueWithOfflineFeedback<{ + /** Name of the template */ + name: string; + +}>; + +export default IntegrationServerExportTemplate; \ No newline at end of file diff --git a/src/types/onyx/index.ts b/src/types/onyx/index.ts index 09ed6afdae47..0b78936724d2 100644 --- a/src/types/onyx/index.ts +++ b/src/types/onyx/index.ts @@ -120,6 +120,7 @@ import type WalletOnfido from './WalletOnfido'; import type WalletStatement from './WalletStatement'; import type WalletTerms from './WalletTerms'; import type WalletTransfer from './WalletTransfer'; +import type IntegrationServerExportTemplate from './IntegrationServerExportTemplate'; export type { TryNewDot, @@ -266,4 +267,5 @@ export type { ValidateUserAndGetAccessiblePolicies, BillingReceiptDetails, VacationDelegate, + IntegrationServerExportTemplate, }; From 832f3bb2b4ced31c2b0dda99798abe207547c956 Mon Sep 17 00:00:00 2001 From: NikkiWines Date: Sat, 28 Jun 2025 20:12:21 -0700 Subject: [PATCH 2/8] add custom IS templates to new expensify --- src/components/MoneyReportHeader.tsx | 28 +++++++++++++++++++------- src/libs/ReportSecondaryActionUtils.ts | 14 +++++++++---- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/components/MoneyReportHeader.tsx b/src/components/MoneyReportHeader.tsx index 1eb7510d439e..b48220b3620b 100644 --- a/src/components/MoneyReportHeader.tsx +++ b/src/components/MoneyReportHeader.tsx @@ -526,8 +526,9 @@ function MoneyReportHeader({ const [offlineModalVisible, setOfflineModalVisible] = useState(false); - const exportSubmenuOptions: Record, DropdownOption>> = useMemo( - () => ({ + const [integrationsExportTemplates] = useOnyx(ONYXKEYS.NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES, {initialValue: [], canBeMissing: false}); + const exportSubmenuOptions = useMemo(() => { + const options: Record> = { [CONST.REPORT.EXPORT_OPTIONS.DOWNLOAD_CSV]: { text: translate('export.basicExport'), icon: Expensicons.Table, @@ -588,9 +589,22 @@ function MoneyReportHeader({ markAsManuallyExported(moneyRequestReport?.reportID, connectedIntegration); }, }, - }), - [translate, connectedIntegrationFallback, connectedIntegration, moneyRequestReport, isOffline, transactionIDs, isExported, beginExportWithTemplate], - ); + }; + + // If the user has any custom integration export templates, add them as export options + if (integrationsExportTemplates && integrationsExportTemplates.length > 0) { + for (const template of integrationsExportTemplates) { + options[template.name] = { + text: template.name, + icon: Expensicons.Table, + value: template.name, + onSelected: () => beginExportWithTemplate(template.name, CONST.EXPORT_TEMPLATE_TYPES.INTEGRATIONS, transactionIDs), + }; + } + } + + return options; + }, [translate, connectedIntegrationFallback, connectedIntegration, moneyRequestReport, isOffline, transactionIDs, isExported, beginExportWithTemplate, integrationsExportTemplates]); const primaryActionsImplementation = { [CONST.REPORT.PRIMARY_ACTIONS.SUBMIT]: ( @@ -732,8 +746,8 @@ function MoneyReportHeader({ if (!moneyRequestReport) { return []; } - return getSecondaryExportReportActions(moneyRequestReport, policy, reportActions); - }, [moneyRequestReport, policy, reportActions]); + return getSecondaryExportReportActions(moneyRequestReport, policy, reportActions, integrationsExportTemplates); + }, [moneyRequestReport, policy, reportActions, integrationsExportTemplates]); const secondaryActionsImplementation: Record< ValueOf, diff --git a/src/libs/ReportSecondaryActionUtils.ts b/src/libs/ReportSecondaryActionUtils.ts index 21e83ec850c5..9ca13ede0425 100644 --- a/src/libs/ReportSecondaryActionUtils.ts +++ b/src/libs/ReportSecondaryActionUtils.ts @@ -2,7 +2,7 @@ import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; import type {ValueOf} from 'type-fest'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; -import type {Policy, Report, ReportAction, ReportNameValuePairs, Transaction, TransactionViolation} from '@src/types/onyx'; +import type {IntegrationServerExportTemplate, Policy, Report, ReportAction, ReportNameValuePairs, Transaction, TransactionViolation} from '@src/types/onyx'; import {isApprover as isApproverUtils} from './actions/Policy/Member'; import {getCurrentUserAccountID} from './actions/Report'; import { @@ -563,9 +563,8 @@ function getSecondaryReportActions({ return options; } -function getSecondaryExportReportActions(report: Report, policy?: Policy, reportActions?: ReportAction[]): Array> { - const options: Array> = []; - +function getSecondaryExportReportActions(report: Report, policy?: Policy, reportActions?: ReportAction[], integrationsExportTemplates?: IntegrationServerExportTemplate[]): Array | string> { + const options: Array | string> = []; if (isExportAction(report, policy, reportActions)) { options.push(CONST.REPORT.EXPORT_OPTIONS.EXPORT_TO_INTEGRATION); } @@ -576,6 +575,13 @@ function getSecondaryExportReportActions(report: Report, policy?: Policy, report options.push(CONST.REPORT.EXPORT_OPTIONS.DOWNLOAD_CSV, CONST.REPORT.EXPORT_OPTIONS.EXPENSE_LEVEL_EXPORT, CONST.REPORT.EXPORT_OPTIONS.REPORT_LEVEL_EXPORT); + if (integrationsExportTemplates && integrationsExportTemplates.length > 0) { + for (const template of integrationsExportTemplates) { + options.push(template.name); + } + } + + return options; } From 28d8024d5a8a0bf3f5e9331bd03ebc6804b85ad7 Mon Sep 17 00:00:00 2001 From: NikkiWines Date: Sat, 28 Jun 2025 20:27:41 -0700 Subject: [PATCH 3/8] style/lint --- src/components/MoneyReportHeader.tsx | 2 +- src/libs/ReportSecondaryActionUtils.ts | 8 ++++++-- src/types/onyx/IntegrationServerExportTemplate.ts | 3 +-- src/types/onyx/index.ts | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/MoneyReportHeader.tsx b/src/components/MoneyReportHeader.tsx index b48220b3620b..5c3208d9df23 100644 --- a/src/components/MoneyReportHeader.tsx +++ b/src/components/MoneyReportHeader.tsx @@ -528,7 +528,7 @@ function MoneyReportHeader({ const [integrationsExportTemplates] = useOnyx(ONYXKEYS.NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES, {initialValue: [], canBeMissing: false}); const exportSubmenuOptions = useMemo(() => { - const options: Record> = { + const options: Record> = { [CONST.REPORT.EXPORT_OPTIONS.DOWNLOAD_CSV]: { text: translate('export.basicExport'), icon: Expensicons.Table, diff --git a/src/libs/ReportSecondaryActionUtils.ts b/src/libs/ReportSecondaryActionUtils.ts index 9ca13ede0425..c3813cfe9677 100644 --- a/src/libs/ReportSecondaryActionUtils.ts +++ b/src/libs/ReportSecondaryActionUtils.ts @@ -563,7 +563,12 @@ function getSecondaryReportActions({ return options; } -function getSecondaryExportReportActions(report: Report, policy?: Policy, reportActions?: ReportAction[], integrationsExportTemplates?: IntegrationServerExportTemplate[]): Array | string> { +function getSecondaryExportReportActions( + report: Report, + policy?: Policy, + reportActions?: ReportAction[], + integrationsExportTemplates?: IntegrationServerExportTemplate[], +): Array | string> { const options: Array | string> = []; if (isExportAction(report, policy, reportActions)) { options.push(CONST.REPORT.EXPORT_OPTIONS.EXPORT_TO_INTEGRATION); @@ -581,7 +586,6 @@ function getSecondaryExportReportActions(report: Report, policy?: Policy, report } } - return options; } diff --git a/src/types/onyx/IntegrationServerExportTemplate.ts b/src/types/onyx/IntegrationServerExportTemplate.ts index bdb5f0e544f6..4c354e1c0c17 100644 --- a/src/types/onyx/IntegrationServerExportTemplate.ts +++ b/src/types/onyx/IntegrationServerExportTemplate.ts @@ -4,7 +4,6 @@ import type * as OnyxCommon from './OnyxCommon'; type IntegrationServerExportTemplate = OnyxCommon.OnyxValueWithOfflineFeedback<{ /** Name of the template */ name: string; - }>; -export default IntegrationServerExportTemplate; \ No newline at end of file +export default IntegrationServerExportTemplate; diff --git a/src/types/onyx/index.ts b/src/types/onyx/index.ts index 0b78936724d2..1210c9739af9 100644 --- a/src/types/onyx/index.ts +++ b/src/types/onyx/index.ts @@ -33,6 +33,7 @@ import type FrequentlyUsedEmoji from './FrequentlyUsedEmoji'; import type {FundList} from './Fund'; import type Fund from './Fund'; import type ImportedSpreadsheet from './ImportedSpreadsheet'; +import type IntegrationServerExportTemplate from './IntegrationServerExportTemplate'; import type IntroSelected from './IntroSelected'; import type InvitedEmailsToAccountIDs from './InvitedEmailsToAccountIDs'; import type JoinablePolicies from './JoinablePolicies'; @@ -120,7 +121,6 @@ import type WalletOnfido from './WalletOnfido'; import type WalletStatement from './WalletStatement'; import type WalletTerms from './WalletTerms'; import type WalletTransfer from './WalletTransfer'; -import type IntegrationServerExportTemplate from './IntegrationServerExportTemplate'; export type { TryNewDot, From 9c275480995ec130dac92e5e7e38a0c046be011b Mon Sep 17 00:00:00 2001 From: NikkiWines Date: Sat, 28 Jun 2025 20:30:39 -0700 Subject: [PATCH 4/8] lint --- src/libs/ReportSecondaryActionUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/ReportSecondaryActionUtils.ts b/src/libs/ReportSecondaryActionUtils.ts index c3813cfe9677..00fd51699101 100644 --- a/src/libs/ReportSecondaryActionUtils.ts +++ b/src/libs/ReportSecondaryActionUtils.ts @@ -568,8 +568,8 @@ function getSecondaryExportReportActions( policy?: Policy, reportActions?: ReportAction[], integrationsExportTemplates?: IntegrationServerExportTemplate[], -): Array | string> { - const options: Array | string> = []; +): Array> { + const options: Array> = []; if (isExportAction(report, policy, reportActions)) { options.push(CONST.REPORT.EXPORT_OPTIONS.EXPORT_TO_INTEGRATION); } From 6e46d5ff315bca8e2db2c7308096837ea5d3536d Mon Sep 17 00:00:00 2001 From: NikkiWines Date: Thu, 24 Jul 2025 16:04:26 +0100 Subject: [PATCH 5/8] typo/linter errors --- src/components/MoneyReportHeader.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MoneyReportHeader.tsx b/src/components/MoneyReportHeader.tsx index 1d37b53deab7..ce9c48b935c0 100644 --- a/src/components/MoneyReportHeader.tsx +++ b/src/components/MoneyReportHeader.tsx @@ -554,7 +554,7 @@ function MoneyReportHeader({ const [offlineModalVisible, setOfflineModalVisible] = useState(false); const [integrationsExportTemplates] = useOnyx(ONYXKEYS.NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES, {initialValue: [], canBeMissing: false}); - const exportSubmenuOptions = useMemo(() => { + const exportSubmenuOptions: Record> = useMemo(() => { const options: Record> = { [CONST.REPORT.EXPORT_OPTIONS.DOWNLOAD_CSV]: { text: translate('export.basicExport'), @@ -791,7 +791,7 @@ function MoneyReportHeader({ text: translate('common.export'), backButtonText: translate('common.export'), icon: Expensicons.Export, - subMenuItems: secondaryExportActions.map((action) => exportSubMenuOptions[action]), + subMenuItems: secondaryExportActions.map((action) => exportSubmenuOptions[action as string]), }, [CONST.REPORT.SECONDARY_ACTIONS.DOWNLOAD_PDF]: { value: CONST.REPORT.SECONDARY_ACTIONS.DOWNLOAD_PDF, From 545fb78ee246fc1c76b4c8091639d231bcb8758d Mon Sep 17 00:00:00 2001 From: NikkiWines Date: Tue, 5 Aug 2025 20:31:01 +0100 Subject: [PATCH 6/8] fix typescript error --- src/components/MoneyReportHeader.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MoneyReportHeader.tsx b/src/components/MoneyReportHeader.tsx index 3c880c58b7ca..6d380127ddb1 100644 --- a/src/components/MoneyReportHeader.tsx +++ b/src/components/MoneyReportHeader.tsx @@ -549,7 +549,7 @@ function MoneyReportHeader({ const [offlineModalVisible, setOfflineModalVisible] = useState(false); - const [integrationsExportTemplates] = useOnyx(ONYXKEYS.NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES, {initialValue: [], canBeMissing: false}); + const [integrationsExportTemplates] = useOnyx(ONYXKEYS.NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES, {canBeMissing: false}); const exportSubmenuOptions: Record> = useMemo(() => { const options: Record> = { [CONST.REPORT.EXPORT_OPTIONS.DOWNLOAD_CSV]: { @@ -773,7 +773,7 @@ function MoneyReportHeader({ if (!moneyRequestReport) { return []; } - return getSecondaryExportReportActions(moneyRequestReport, policy, reportActions, integrationsExportTemplates); + return getSecondaryExportReportActions(moneyRequestReport, policy, reportActions, integrationsExportTemplates ?? []); }, [moneyRequestReport, policy, reportActions, integrationsExportTemplates]); const secondaryActionsImplementation: Record< From 11005ebaeb90b39c1cf7afc86ebd95222503c1b0 Mon Sep 17 00:00:00 2001 From: NikkiWines Date: Tue, 5 Aug 2025 20:44:03 +0100 Subject: [PATCH 7/8] add customIS templates to other report export views --- src/hooks/useSelectedTransactionsActions.ts | 13 +++++++++++++ src/pages/Search/SearchPage.tsx | 16 ++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/src/hooks/useSelectedTransactionsActions.ts b/src/hooks/useSelectedTransactionsActions.ts index ef7840cfe847..4c7ac281a62f 100644 --- a/src/hooks/useSelectedTransactionsActions.ts +++ b/src/hooks/useSelectedTransactionsActions.ts @@ -171,6 +171,7 @@ function useSelectedTransactionsActions({ } // Gets the list of options for the export sub-menu + const [integrationsExportTemplates] = useOnyx(ONYXKEYS.NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES, {canBeMissing: false}); const getExportOptions = (): PopoverMenuItem[] => { // We provide the basic and expense level export options by default const exportOptions: PopoverMenuItem[] = [ @@ -210,6 +211,17 @@ function useSelectedTransactionsActions({ }); } + // If the user has any custom integration export templates, add them as export options + if (integrationsExportTemplates && integrationsExportTemplates.length > 0) { + for (const template of integrationsExportTemplates) { + exportOptions.push({ + text: template.name, + icon: Expensicons.Table, + onSelected: () => beginExportWithTemplate(template.name, CONST.EXPORT_TEMPLATE_TYPES.INTEGRATIONS, selectedTransactionIDs), + }); + } + } + return exportOptions; }; @@ -279,6 +291,7 @@ function useSelectedTransactionsActions({ session?.accountID, showDeleteModal, beginExportWithTemplate, + integrationsExportTemplates, ]); return { diff --git a/src/pages/Search/SearchPage.tsx b/src/pages/Search/SearchPage.tsx index b01e304b3c0f..3f6b860e1d06 100644 --- a/src/pages/Search/SearchPage.tsx +++ b/src/pages/Search/SearchPage.tsx @@ -79,6 +79,7 @@ function SearchPage({route}: SearchPageProps) { const [newParentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${newReport?.parentReportID}`, {canBeMissing: true}); const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID, {canBeMissing: false}); const [activePolicy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${activePolicyID}`, {canBeMissing: true}); + const [integrationsExportTemplates] = useOnyx(ONYXKEYS.NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES, {canBeMissing: false}); const [isOfflineModalVisible, setIsOfflineModalVisible] = useState(false); const [isDownloadErrorModalVisible, setIsDownloadErrorModalVisible] = useState(false); @@ -198,6 +199,20 @@ function SearchPage({route}: SearchPageProps) { }); } + // If the user has any custom integration export templates, add them as export options + if (integrationsExportTemplates && integrationsExportTemplates.length > 0) { + for (const template of integrationsExportTemplates) { + exportOptions.push({ + text: template.name, + icon: Expensicons.Table, + onSelected: () => { + // Custom IS templates are not policy specific, so we don't need to pass a policyID + beginExportWithTemplate(template.name, CONST.EXPORT_TEMPLATE_TYPES.INTEGRATIONS, undefined); + }, + }); + } + } + return exportOptions; }; @@ -433,6 +448,7 @@ function SearchPage({route}: SearchPageProps) { styles.fontWeightNormal, styles.textWrap, beginExportWithTemplate, + integrationsExportTemplates, ]); const handleDeleteExpenses = () => { From ebce92b2e6ebe9127aa338d2d1ce000317a358c8 Mon Sep 17 00:00:00 2001 From: NikkiWines Date: Tue, 5 Aug 2025 20:55:23 +0100 Subject: [PATCH 8/8] fix integrations export template nvp --- src/components/MoneyReportHeader.tsx | 2 +- src/hooks/useSelectedTransactionsActions.ts | 2 +- src/pages/Search/SearchPage.tsx | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/MoneyReportHeader.tsx b/src/components/MoneyReportHeader.tsx index 6d380127ddb1..ca7d2813624d 100644 --- a/src/components/MoneyReportHeader.tsx +++ b/src/components/MoneyReportHeader.tsx @@ -172,6 +172,7 @@ function MoneyReportHeader({ const [download] = useOnyx(`${ONYXKEYS.COLLECTION.DOWNLOAD}${reportPDFFilename}`, {canBeMissing: true}); const isDownloadingPDF = download?.isDownloading ?? false; const [session] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: false}); + const [integrationsExportTemplates] = useOnyx(ONYXKEYS.NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES, {canBeMissing: true}); const requestParentReportAction = useMemo(() => { if (!reportActions || !transactionThreadReport?.parentReportActionID) { return null; @@ -549,7 +550,6 @@ function MoneyReportHeader({ const [offlineModalVisible, setOfflineModalVisible] = useState(false); - const [integrationsExportTemplates] = useOnyx(ONYXKEYS.NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES, {canBeMissing: false}); const exportSubmenuOptions: Record> = useMemo(() => { const options: Record> = { [CONST.REPORT.EXPORT_OPTIONS.DOWNLOAD_CSV]: { diff --git a/src/hooks/useSelectedTransactionsActions.ts b/src/hooks/useSelectedTransactionsActions.ts index 4c7ac281a62f..f5b13602836c 100644 --- a/src/hooks/useSelectedTransactionsActions.ts +++ b/src/hooks/useSelectedTransactionsActions.ts @@ -49,6 +49,7 @@ function useSelectedTransactionsActions({ }) { const {selectedTransactionIDs, clearSelectedTransactions} = useSearchContext(); const [allTransactions] = useOnyx(ONYXKEYS.COLLECTION.TRANSACTION, {canBeMissing: false}); + const [integrationsExportTemplates] = useOnyx(ONYXKEYS.NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES, {canBeMissing: true}); const {duplicateTransactions, duplicateTransactionViolations} = useDuplicateTransactionsAndViolations(selectedTransactionIDs); const isReportArchived = useReportIsArchived(report?.reportID); const selectedTransactions = useMemo( @@ -171,7 +172,6 @@ function useSelectedTransactionsActions({ } // Gets the list of options for the export sub-menu - const [integrationsExportTemplates] = useOnyx(ONYXKEYS.NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES, {canBeMissing: false}); const getExportOptions = (): PopoverMenuItem[] => { // We provide the basic and expense level export options by default const exportOptions: PopoverMenuItem[] = [ diff --git a/src/pages/Search/SearchPage.tsx b/src/pages/Search/SearchPage.tsx index 3f6b860e1d06..e1e2ec24381c 100644 --- a/src/pages/Search/SearchPage.tsx +++ b/src/pages/Search/SearchPage.tsx @@ -79,8 +79,7 @@ function SearchPage({route}: SearchPageProps) { const [newParentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${newReport?.parentReportID}`, {canBeMissing: true}); const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID, {canBeMissing: false}); const [activePolicy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${activePolicyID}`, {canBeMissing: true}); - const [integrationsExportTemplates] = useOnyx(ONYXKEYS.NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES, {canBeMissing: false}); - + const [integrationsExportTemplates] = useOnyx(ONYXKEYS.NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES, {canBeMissing: true}); const [isOfflineModalVisible, setIsOfflineModalVisible] = useState(false); const [isDownloadErrorModalVisible, setIsDownloadErrorModalVisible] = useState(false); const [isDeleteExpensesConfirmModalVisible, setIsDeleteExpensesConfirmModalVisible] = useState(false);