File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,6 +172,7 @@ function MoneyReportHeader({
172172 const [ download ] = useOnyx ( `${ ONYXKEYS . COLLECTION . DOWNLOAD } ${ reportPDFFilename } ` , { canBeMissing : true } ) ;
173173 const isDownloadingPDF = download ?. isDownloading ?? false ;
174174 const [ session ] = useOnyx ( ONYXKEYS . SESSION , { canBeMissing : false } ) ;
175+ const [ integrationsExportTemplates ] = useOnyx ( ONYXKEYS . NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES , { canBeMissing : true } ) ;
175176 const requestParentReportAction = useMemo ( ( ) => {
176177 if ( ! reportActions || ! transactionThreadReport ?. parentReportActionID ) {
177178 return null ;
@@ -549,7 +550,6 @@ function MoneyReportHeader({
549550
550551 const [ offlineModalVisible , setOfflineModalVisible ] = useState ( false ) ;
551552
552- const [ integrationsExportTemplates ] = useOnyx ( ONYXKEYS . NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES , { canBeMissing : false } ) ;
553553 const exportSubmenuOptions : Record < string , DropdownOption < string > > = useMemo ( ( ) => {
554554 const options : Record < string , DropdownOption < string > > = {
555555 [ CONST . REPORT . EXPORT_OPTIONS . DOWNLOAD_CSV ] : {
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ function useSelectedTransactionsActions({
4949} ) {
5050 const { selectedTransactionIDs, clearSelectedTransactions} = useSearchContext ( ) ;
5151 const [ allTransactions ] = useOnyx ( ONYXKEYS . COLLECTION . TRANSACTION , { canBeMissing : false } ) ;
52+ const [ integrationsExportTemplates ] = useOnyx ( ONYXKEYS . NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES , { canBeMissing : true } ) ;
5253 const { duplicateTransactions, duplicateTransactionViolations} = useDuplicateTransactionsAndViolations ( selectedTransactionIDs ) ;
5354 const isReportArchived = useReportIsArchived ( report ?. reportID ) ;
5455 const selectedTransactions = useMemo (
@@ -171,7 +172,6 @@ function useSelectedTransactionsActions({
171172 }
172173
173174 // Gets the list of options for the export sub-menu
174- const [ integrationsExportTemplates ] = useOnyx ( ONYXKEYS . NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES , { canBeMissing : false } ) ;
175175 const getExportOptions = ( ) : PopoverMenuItem [ ] => {
176176 // We provide the basic and expense level export options by default
177177 const exportOptions : PopoverMenuItem [ ] = [
Original file line number Diff line number Diff line change @@ -79,8 +79,7 @@ function SearchPage({route}: SearchPageProps) {
7979 const [ newParentReport ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT } ${ newReport ?. parentReportID } ` , { canBeMissing : true } ) ;
8080 const [ activePolicyID ] = useOnyx ( ONYXKEYS . NVP_ACTIVE_POLICY_ID , { canBeMissing : false } ) ;
8181 const [ activePolicy ] = useOnyx ( `${ ONYXKEYS . COLLECTION . POLICY } ${ activePolicyID } ` , { canBeMissing : true } ) ;
82- const [ integrationsExportTemplates ] = useOnyx ( ONYXKEYS . NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES , { canBeMissing : false } ) ;
83-
82+ const [ integrationsExportTemplates ] = useOnyx ( ONYXKEYS . NVP_INTEGRATION_SERVER_EXPORT_TEMPLATES , { canBeMissing : true } ) ;
8483 const [ isOfflineModalVisible , setIsOfflineModalVisible ] = useState ( false ) ;
8584 const [ isDownloadErrorModalVisible , setIsDownloadErrorModalVisible ] = useState ( false ) ;
8685 const [ isDeleteExpensesConfirmModalVisible , setIsDeleteExpensesConfirmModalVisible ] = useState ( false ) ;
You can’t perform that action at this time.
0 commit comments