From d691632dccb0ea46f3affee52b8715644dbb3ddb Mon Sep 17 00:00:00 2001 From: Georgia Monahan Date: Thu, 1 Aug 2024 18:42:58 +0100 Subject: [PATCH 1/4] update report preview with transactions --- src/components/ReportActionItem/ReportPreview.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/ReportPreview.tsx b/src/components/ReportActionItem/ReportPreview.tsx index b06ce0c33f2b..62baf396559c 100644 --- a/src/components/ReportActionItem/ReportPreview.tsx +++ b/src/components/ReportActionItem/ReportPreview.tsx @@ -122,7 +122,8 @@ function ReportPreview({ const {translate} = useLocalize(); const {canUseViolations} = usePermissions(); const {isOffline} = useNetwork(); - const allTransactions = useMemo(() => TransactionUtils.getAllReportTransactions(iouReportID), [iouReportID]); + // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps + const allTransactions = useMemo(() => TransactionUtils.getAllReportTransactions(iouReportID), [iouReportID, transactions]); const {hasMissingSmartscanFields, areAllRequestsBeingSmartScanned, hasOnlyTransactionsWithPendingRoutes, hasNonReimbursableTransactions} = useMemo( () => ({ From 6536aaf63b7e3abbe49859505a1e7b310ba618d0 Mon Sep 17 00:00:00 2001 From: Georgia Monahan <38015950+grgia@users.noreply.github.com> Date: Thu, 1 Aug 2024 18:59:56 +0100 Subject: [PATCH 2/4] Update src/components/ReportActionItem/ReportPreview.tsx Co-authored-by: Ishpaul Singh <104348397+ishpaul777@users.noreply.github.com> --- src/components/ReportActionItem/ReportPreview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/ReportPreview.tsx b/src/components/ReportActionItem/ReportPreview.tsx index 62baf396559c..b914bda501cd 100644 --- a/src/components/ReportActionItem/ReportPreview.tsx +++ b/src/components/ReportActionItem/ReportPreview.tsx @@ -123,7 +123,7 @@ function ReportPreview({ const {canUseViolations} = usePermissions(); const {isOffline} = useNetwork(); // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps - const allTransactions = useMemo(() => TransactionUtils.getAllReportTransactions(iouReportID), [iouReportID, transactions]); +const allTransactions = useMemo(() => TransactionUtils.getAllReportTransactions(iouReportID, transactions), [iouReportID, transactions]); const {hasMissingSmartscanFields, areAllRequestsBeingSmartScanned, hasOnlyTransactionsWithPendingRoutes, hasNonReimbursableTransactions} = useMemo( () => ({ From c7cb1199219ded7c82ee1cce6627818602cdec2b Mon Sep 17 00:00:00 2001 From: Georgia Monahan <38015950+grgia@users.noreply.github.com> Date: Thu, 1 Aug 2024 19:02:54 +0100 Subject: [PATCH 3/4] Update src/components/ReportActionItem/ReportPreview.tsx Co-authored-by: Ishpaul Singh <104348397+ishpaul777@users.noreply.github.com> --- src/components/ReportActionItem/ReportPreview.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/ReportActionItem/ReportPreview.tsx b/src/components/ReportActionItem/ReportPreview.tsx index b914bda501cd..6c21248f2a68 100644 --- a/src/components/ReportActionItem/ReportPreview.tsx +++ b/src/components/ReportActionItem/ReportPreview.tsx @@ -122,7 +122,6 @@ function ReportPreview({ const {translate} = useLocalize(); const {canUseViolations} = usePermissions(); const {isOffline} = useNetwork(); - // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps const allTransactions = useMemo(() => TransactionUtils.getAllReportTransactions(iouReportID, transactions), [iouReportID, transactions]); const {hasMissingSmartscanFields, areAllRequestsBeingSmartScanned, hasOnlyTransactionsWithPendingRoutes, hasNonReimbursableTransactions} = useMemo( From c2db124ed91fdd3aab6f6d4c9e6c2800d9e42834 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 1 Aug 2024 11:25:43 -0700 Subject: [PATCH 4/4] Fix lint --- src/components/ReportActionItem/ReportPreview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/ReportPreview.tsx b/src/components/ReportActionItem/ReportPreview.tsx index 6c21248f2a68..44ef758c2d78 100644 --- a/src/components/ReportActionItem/ReportPreview.tsx +++ b/src/components/ReportActionItem/ReportPreview.tsx @@ -122,7 +122,7 @@ function ReportPreview({ const {translate} = useLocalize(); const {canUseViolations} = usePermissions(); const {isOffline} = useNetwork(); -const allTransactions = useMemo(() => TransactionUtils.getAllReportTransactions(iouReportID, transactions), [iouReportID, transactions]); + const allTransactions = useMemo(() => TransactionUtils.getAllReportTransactions(iouReportID, transactions), [iouReportID, transactions]); const {hasMissingSmartscanFields, areAllRequestsBeingSmartScanned, hasOnlyTransactionsWithPendingRoutes, hasNonReimbursableTransactions} = useMemo( () => ({