Merge branch 'develop' into fix-spelling-a-char

This commit is contained in:
Ahmed Bouhuolia
2023-08-22 22:49:39 +02:00
301 changed files with 9345 additions and 7022 deletions

View File

@@ -13,7 +13,7 @@ import withProfitLossActions from './withProfitLossActions';
import { useProfitLossSheetQuery } from './utils';
import { ProfitLossSheetProvider } from './ProfitLossProvider';
import { ProfitLossSheetLoadingBar } from './components';
import { ProfitLossSheetAlerts, ProfitLossSheetLoadingBar } from './components';
import { ProfitLossBody } from './ProfitLossBody';
/**
@@ -58,7 +58,7 @@ function ProfitLossSheet({
onNumberFormatSubmit={handleNumberFormatSubmit}
/>
<ProfitLossSheetLoadingBar />
{/* <ProfitLossSheetAlerts /> */}
<ProfitLossSheetAlerts />
<DashboardPageContent>
<ProfitLossSheetHeader

View File

@@ -4,6 +4,7 @@ import { Button } from '@blueprintjs/core';
import { Icon, If, FormattedMessage as T } from '@/components';
import { useProfitLossSheetContext } from './ProfitLossProvider';
import { FinancialComputeAlert } from '../FinancialReportPage';
import FinancialLoadingBar from '../FinancialLoadingBar';
/**
@@ -34,17 +35,18 @@ export function ProfitLossSheetAlerts() {
if (isLoading) {
return null;
}
// Can't continue if the cost compute job is not running.
if (!profitLossSheet.meta.is_cost_compute_running) {
return null;
}
return (
<If condition={profitLossSheet.meta.is_cost_compute_running}>
<div class="alert-compute-running">
<Icon icon="info-block" iconSize={12} />
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
<FinancialComputeAlert>
<Icon icon="info-block" iconSize={12} />
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
<Button onClick={handleRecalcReport} minimal={true} small={true}>
<T id={'refresh'} />
</Button>
</div>
</If>
<Button onClick={handleRecalcReport} minimal={true} small={true}>
<T id={'refresh'} />
</Button>
</FinancialComputeAlert>
);
}