diff --git a/client/src/containers/FinancialStatements/ARAgingSummary/ARAgingSummary.js b/client/src/containers/FinancialStatements/ARAgingSummary/ARAgingSummary.js index 54faeefe9..7fae6f73b 100644 --- a/client/src/containers/FinancialStatements/ARAgingSummary/ARAgingSummary.js +++ b/client/src/containers/FinancialStatements/ARAgingSummary/ARAgingSummary.js @@ -31,6 +31,7 @@ function ReceivableAgingSummarySheet({ // #withDashboardActions changePageTitle, setDashboardBackLink, + setSidebarShrink, // #withARAgingSummaryActions requestReceivableAgingSummary, @@ -59,6 +60,7 @@ function ReceivableAgingSummarySheet({ }, [ARAgingSummaryRefresh, refreshARAgingSummary]); useEffect(() => { + setSidebarShrink() // Show the back link on dashboard topbar. setDashboardBackLink(true); @@ -66,7 +68,7 @@ function ReceivableAgingSummarySheet({ // Hide the back link on dashboard topbar. setDashboardBackLink(false); }; - }, [setDashboardBackLink]); + }, [setDashboardBackLink,setSidebarShrink]); // Handle fetching receivable aging summary report. const fetchARAgingSummarySheet = useQuery( diff --git a/client/src/containers/FinancialStatements/BalanceSheet/BalanceSheet.js b/client/src/containers/FinancialStatements/BalanceSheet/BalanceSheet.js index f9f5f15b1..b874435fe 100644 --- a/client/src/containers/FinancialStatements/BalanceSheet/BalanceSheet.js +++ b/client/src/containers/FinancialStatements/BalanceSheet/BalanceSheet.js @@ -30,6 +30,7 @@ function BalanceSheet({ // #withDashboardActions changePageTitle, setDashboardBackLink, + setSidebarShrink, // #withBalanceSheetActions fetchBalanceSheet, @@ -58,8 +59,9 @@ function BalanceSheet({ ); useEffect(() => { + setSidebarShrink(); changePageTitle(formatMessage({ id: 'balance_sheet' })); - }, [changePageTitle, formatMessage]); + }, [changePageTitle, formatMessage, setSidebarShrink]); // Observes the balance sheet refresh to invalid the query to refresh it. useEffect(() => { diff --git a/client/src/containers/FinancialStatements/Journal/Journal.js b/client/src/containers/FinancialStatements/Journal/Journal.js index ea694d6ab..9a2595036 100644 --- a/client/src/containers/FinancialStatements/Journal/Journal.js +++ b/client/src/containers/FinancialStatements/Journal/Journal.js @@ -32,6 +32,7 @@ function Journal({ // #withDashboardActions changePageTitle, setDashboardBackLink, + setSidebarShrink, // #withPreferences organizationName, @@ -54,6 +55,7 @@ function Journal({ }, [changePageTitle, formatMessage]); useEffect(() => { + setSidebarShrink(); // Show the back link on dashboard topbar. setDashboardBackLink(true); @@ -61,7 +63,7 @@ function Journal({ // Hide the back link on dashboard topbar. setDashboardBackLink(false); }; - }); + }, [setDashboardBackLink, setSidebarShrink]); useEffect(() => { if (journalSheetRefresh) { diff --git a/client/src/containers/FinancialStatements/ProfitLossSheet/ProfitLossSheet.js b/client/src/containers/FinancialStatements/ProfitLossSheet/ProfitLossSheet.js index f62a76936..d473392bc 100644 --- a/client/src/containers/FinancialStatements/ProfitLossSheet/ProfitLossSheet.js +++ b/client/src/containers/FinancialStatements/ProfitLossSheet/ProfitLossSheet.js @@ -28,7 +28,8 @@ function ProfitLossSheet({ // #withDashboardActions changePageTitle, setDashboardBackLink, - + setSidebarShrink, + // #withProfitLoss profitLossSheetRefresh, @@ -62,6 +63,7 @@ function ProfitLossSheet({ }, [profitLossSheetRefresh, refreshProfitLossSheet]); useEffect(() => { + setSidebarShrink() // Show the back link on dashboard topbar. setDashboardBackLink(true); @@ -69,7 +71,7 @@ function ProfitLossSheet({ // Hide the back link on dashboard topbar. setDashboardBackLink(false); }; - }); + },[setDashboardBackLink,setSidebarShrink]); // Fetches profit/loss sheet. const fetchSheetHook = useQuery(['profit-loss-sheet', filter], diff --git a/client/src/containers/FinancialStatements/TrialBalanceSheet/TrialBalanceSheet.js b/client/src/containers/FinancialStatements/TrialBalanceSheet/TrialBalanceSheet.js index 518b8fe2c..574b466eb 100644 --- a/client/src/containers/FinancialStatements/TrialBalanceSheet/TrialBalanceSheet.js +++ b/client/src/containers/FinancialStatements/TrialBalanceSheet/TrialBalanceSheet.js @@ -27,6 +27,7 @@ function TrialBalanceSheet({ // #withDashboardActions changePageTitle, setDashboardBackLink, + setSidebarShrink, // #withTrialBalance trialBalanceSheetRefresh, @@ -62,6 +63,7 @@ function TrialBalanceSheet({ }, [changePageTitle, formatMessage]); useEffect(() => { + setSidebarShrink(); // Show the back link on dashboard topbar. setDashboardBackLink(true); @@ -69,7 +71,7 @@ function TrialBalanceSheet({ // Hide the back link on dashboard topbar. setDashboardBackLink(false); }; - }); + }, [setDashboardBackLink, setSidebarShrink]); const handleFilterSubmit = useCallback( (filter) => {