mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
fix: add sidebar shrink.
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user