mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
Compare commits
4 Commits
api-rate-e
...
v0.9.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
278c8a01c5 | ||
|
|
f22dc9a18b | ||
|
|
b224a2c313 | ||
|
|
d4a933ef18 |
@@ -21,19 +21,21 @@ export function BalanceSheetAlerts() {
|
|||||||
refetchBalanceSheet();
|
refetchBalanceSheet();
|
||||||
};
|
};
|
||||||
// Can't display any error if the report is loading.
|
// Can't display any error if the report is loading.
|
||||||
if (isLoading) return null;
|
if (isLoading) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// Can't continue if the cost compute job is not running.
|
||||||
|
if (!balanceSheet.meta.is_cost_compute_running) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<If condition={balanceSheet.meta.is_cost_compute_running}>
|
<FinancialComputeAlert>
|
||||||
<FinancialComputeAlert>
|
<Icon icon="info-block" iconSize={12} />{' '}
|
||||||
<Icon icon="info-block" iconSize={12} />{' '}
|
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
|
||||||
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
|
<Button onClick={handleRecalcReport} minimal={true} small={true}>
|
||||||
|
<T id={'report.compute_running.refresh'} />
|
||||||
<Button onClick={handleRecalcReport} minimal={true} small={true}>
|
</Button>
|
||||||
<T id={'report.compute_running.refresh'} />
|
</FinancialComputeAlert>
|
||||||
</Button>
|
|
||||||
</FinancialComputeAlert>
|
|
||||||
</If>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import FinancialLoadingBar from '../FinancialLoadingBar';
|
|||||||
|
|
||||||
import { dynamicColumns } from './dynamicColumns';
|
import { dynamicColumns } from './dynamicColumns';
|
||||||
import { useCashFlowStatementContext } from './CashFlowStatementProvider';
|
import { useCashFlowStatementContext } from './CashFlowStatementProvider';
|
||||||
|
import { FinancialComputeAlert } from '../FinancialReportPage';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve cash flow statement columns.
|
* Retrieve cash flow statement columns.
|
||||||
@@ -27,6 +28,7 @@ export const useCashFlowStatementColumns = () => {
|
|||||||
*/
|
*/
|
||||||
export function CashFlowStatementLoadingBar() {
|
export function CashFlowStatementLoadingBar() {
|
||||||
const { isCashFlowFetching } = useCashFlowStatementContext();
|
const { isCashFlowFetching } = useCashFlowStatementContext();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<If condition={isCashFlowFetching}>
|
<If condition={isCashFlowFetching}>
|
||||||
<FinancialLoadingBar />
|
<FinancialLoadingBar />
|
||||||
@@ -45,20 +47,21 @@ export function CashFlowStatementAlerts() {
|
|||||||
const handleRecalcReport = () => {
|
const handleRecalcReport = () => {
|
||||||
refetchCashFlow();
|
refetchCashFlow();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Can't display any error if the report is loading
|
// Can't display any error if the report is loading
|
||||||
if (isCashFlowLoading) {
|
if (isCashFlowLoading) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
// Can't continue if the cost compute is not running.
|
||||||
|
if (!cashFlowStatement.meta.is_cost_compute_running) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<If condition={cashFlowStatement.meta.is_cost_compute_running}>
|
<FinancialComputeAlert>
|
||||||
<div className="alert-compute-running">
|
<Icon icon="info-block" iconSize={12} />
|
||||||
<Icon icon="info-block" iconSize={12} />
|
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
|
||||||
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
|
<Button onClick={handleRecalcReport} minimal={true} small={true}>
|
||||||
<Button onClick={handleRecalcReport} minimal={true} small={true}>
|
<T id={'refresh'} />
|
||||||
<T id={'refresh'} />
|
</Button>
|
||||||
</Button>
|
</FinancialComputeAlert>
|
||||||
</div>
|
|
||||||
</If>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { getColumnWidth } from '@/utils';
|
|||||||
import { useGeneralLedgerContext } from './GeneralLedgerProvider';
|
import { useGeneralLedgerContext } from './GeneralLedgerProvider';
|
||||||
import FinancialLoadingBar from '../FinancialLoadingBar';
|
import FinancialLoadingBar from '../FinancialLoadingBar';
|
||||||
|
|
||||||
|
import { FinancialComputeAlert } from '../FinancialReportPage';
|
||||||
import { Align } from '@/constants';
|
import { Align } from '@/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -116,17 +117,18 @@ export function GeneralLedgerSheetAlerts() {
|
|||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
// Can't continue if the cost compute job is not running.
|
||||||
|
if (!generalLedger.meta.is_cost_compute_running) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<If condition={generalLedger.meta.is_cost_compute_running}>
|
<FinancialComputeAlert>
|
||||||
<div class="alert-compute-running">
|
<Icon icon="info-block" iconSize={12} />
|
||||||
<Icon icon="info-block" iconSize={12} />
|
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
|
||||||
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
|
<Button onClick={handleRecalcReport} minimal={true} small={true}>
|
||||||
<Button onClick={handleRecalcReport} minimal={true} small={true}>
|
<T id={'refresh'} />
|
||||||
<T id={'refresh'} />
|
</Button>
|
||||||
</Button>
|
</FinancialComputeAlert>
|
||||||
</div>
|
|
||||||
</If>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { Icon, If, FormattedMessage as T } from '@/components';
|
|||||||
import { dynamicColumns } from './utils';
|
import { dynamicColumns } from './utils';
|
||||||
import FinancialLoadingBar from '../FinancialLoadingBar';
|
import FinancialLoadingBar from '../FinancialLoadingBar';
|
||||||
import { useInventoryItemDetailsContext } from './InventoryItemDetailsProvider';
|
import { useInventoryItemDetailsContext } from './InventoryItemDetailsProvider';
|
||||||
|
import { FinancialComputeAlert } from '../FinancialReportPage';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve inventory item details columns.
|
* Retrieve inventory item details columns.
|
||||||
@@ -53,17 +54,19 @@ export function InventoryItemDetailsAlerts() {
|
|||||||
if (isInventoryItemDetailsLoading) {
|
if (isInventoryItemDetailsLoading) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
// Can't continue if the cost compute job is running.
|
||||||
|
if (!inventoryItemDetails.meta.is_cost_compute_running) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<If condition={inventoryItemDetails.meta.is_cost_compute_running}>
|
<FinancialComputeAlert>
|
||||||
<div className="alert-compute-running">
|
<Icon icon="info-block" iconSize={12} />
|
||||||
<Icon icon="info-block" iconSize={12} />
|
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
|
||||||
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
|
|
||||||
|
|
||||||
<Button onClick={handleRecalcReport} minimal={true} small={true}>
|
<Button onClick={handleRecalcReport} minimal={true} small={true}>
|
||||||
<T id={'refresh'} />
|
<T id={'refresh'} />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</FinancialComputeAlert>
|
||||||
</If>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { Button } from '@blueprintjs/core';
|
|||||||
import { Icon, If, FormattedMessage as T } from '@/components';
|
import { Icon, If, FormattedMessage as T } from '@/components';
|
||||||
import { useJournalSheetContext } from './JournalProvider';
|
import { useJournalSheetContext } from './JournalProvider';
|
||||||
import FinancialLoadingBar from '../FinancialLoadingBar';
|
import FinancialLoadingBar from '../FinancialLoadingBar';
|
||||||
|
import { FinancialComputeAlert } from '../FinancialReportPage';
|
||||||
|
|
||||||
import { Align } from '@/constants';
|
import { Align } from '@/constants';
|
||||||
|
|
||||||
@@ -99,17 +100,18 @@ export function JournalSheetAlerts() {
|
|||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
// Can't continue if the cost compute job is running.
|
||||||
|
if (!journalSheet.meta.is_cost_compute_running) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<If condition={journalSheet.meta.is_cost_compute_running}>
|
<FinancialComputeAlert>
|
||||||
<div class="alert-compute-running">
|
<Icon icon="info-block" iconSize={12} />
|
||||||
<Icon icon="info-block" iconSize={12} />
|
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
|
||||||
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
|
|
||||||
|
|
||||||
<Button onClick={handleRecalcReport} minimal={true} small={true}>
|
<Button onClick={handleRecalcReport} minimal={true} small={true}>
|
||||||
<T id={'refresh'} />
|
<T id={'refresh'} />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</FinancialComputeAlert>
|
||||||
</If>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import withProfitLossActions from './withProfitLossActions';
|
|||||||
|
|
||||||
import { useProfitLossSheetQuery } from './utils';
|
import { useProfitLossSheetQuery } from './utils';
|
||||||
import { ProfitLossSheetProvider } from './ProfitLossProvider';
|
import { ProfitLossSheetProvider } from './ProfitLossProvider';
|
||||||
import { ProfitLossSheetLoadingBar } from './components';
|
import { ProfitLossSheetAlerts, ProfitLossSheetLoadingBar } from './components';
|
||||||
import { ProfitLossBody } from './ProfitLossBody';
|
import { ProfitLossBody } from './ProfitLossBody';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -58,7 +58,7 @@ function ProfitLossSheet({
|
|||||||
onNumberFormatSubmit={handleNumberFormatSubmit}
|
onNumberFormatSubmit={handleNumberFormatSubmit}
|
||||||
/>
|
/>
|
||||||
<ProfitLossSheetLoadingBar />
|
<ProfitLossSheetLoadingBar />
|
||||||
{/* <ProfitLossSheetAlerts /> */}
|
<ProfitLossSheetAlerts />
|
||||||
|
|
||||||
<DashboardPageContent>
|
<DashboardPageContent>
|
||||||
<ProfitLossSheetHeader
|
<ProfitLossSheetHeader
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { Button } from '@blueprintjs/core';
|
|||||||
import { Icon, If, FormattedMessage as T } from '@/components';
|
import { Icon, If, FormattedMessage as T } from '@/components';
|
||||||
|
|
||||||
import { useProfitLossSheetContext } from './ProfitLossProvider';
|
import { useProfitLossSheetContext } from './ProfitLossProvider';
|
||||||
|
import { FinancialComputeAlert } from '../FinancialReportPage';
|
||||||
import FinancialLoadingBar from '../FinancialLoadingBar';
|
import FinancialLoadingBar from '../FinancialLoadingBar';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -34,17 +35,18 @@ export function ProfitLossSheetAlerts() {
|
|||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
// Can't continue if the cost compute job is not running.
|
||||||
|
if (!profitLossSheet.meta.is_cost_compute_running) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<If condition={profitLossSheet.meta.is_cost_compute_running}>
|
<FinancialComputeAlert>
|
||||||
<div class="alert-compute-running">
|
<Icon icon="info-block" iconSize={12} />
|
||||||
<Icon icon="info-block" iconSize={12} />
|
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
|
||||||
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
|
|
||||||
|
|
||||||
<Button onClick={handleRecalcReport} minimal={true} small={true}>
|
<Button onClick={handleRecalcReport} minimal={true} small={true}>
|
||||||
<T id={'refresh'} />
|
<T id={'refresh'} />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</FinancialComputeAlert>
|
||||||
</If>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import { getColumnWidth } from '@/utils';
|
|||||||
import { CellTextSpan } from '@/components/Datatable/Cells';
|
import { CellTextSpan } from '@/components/Datatable/Cells';
|
||||||
import { If, Icon, FormattedMessage as T } from '@/components';
|
import { If, Icon, FormattedMessage as T } from '@/components';
|
||||||
import { useTrialBalanceSheetContext } from './TrialBalanceProvider';
|
import { useTrialBalanceSheetContext } from './TrialBalanceProvider';
|
||||||
|
import { FinancialComputeAlert } from '../FinancialReportPage';
|
||||||
import FinancialLoadingBar from '../FinancialLoadingBar';
|
import FinancialLoadingBar from '../FinancialLoadingBar';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the credit column.
|
* Retrieves the credit column.
|
||||||
*/
|
*/
|
||||||
@@ -114,17 +114,19 @@ export function TrialBalanceSheetAlerts() {
|
|||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
// Can't continue if the cost compute job is not running.
|
||||||
|
if (!meta.is_cost_compute_running) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<If condition={meta.is_cost_compute_running}>
|
<FinancialComputeAlert>
|
||||||
<div class="alert-compute-running">
|
<Icon icon="info-block" iconSize={12} />
|
||||||
<Icon icon="info-block" iconSize={12} />
|
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
|
||||||
<T id={'just_a_moment_we_re_calculating_your_cost_transactions'} />
|
|
||||||
|
|
||||||
<Button onClick={handleRecalcReport} minimal={true} small={true}>
|
<Button onClick={handleRecalcReport} minimal={true} small={true}>
|
||||||
<T id={'refresh'} />
|
<T id={'refresh'} />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</FinancialComputeAlert>
|
||||||
</If>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ function BillFormVendorField() {
|
|||||||
name={'vendor_id'}
|
name={'vendor_id'}
|
||||||
items={vendors}
|
items={vendors}
|
||||||
placeholder={<T id={'select_vender_account'} />}
|
placeholder={<T id={'select_vender_account'} />}
|
||||||
onItemChange={(contact) => {
|
onItemSelect={(contact) => {
|
||||||
setFieldValue('vendor_id', contact.id);
|
setFieldValue('vendor_id', contact.id);
|
||||||
setFieldValue('currency_code', contact?.currency_code);
|
setFieldValue('currency_code', contact?.currency_code);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ function VendorCreditNoteFormHeaderFields({
|
|||||||
name={'exchange_rate'}
|
name={'exchange_rate'}
|
||||||
formGroupProps={{ label: ' ', inline: true }}
|
formGroupProps={{ label: ' ', inline: true }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* ------- Vendor Credit date ------- */}
|
{/* ------- Vendor Credit date ------- */}
|
||||||
<FastField name={'vendor_credit_date'}>
|
<FastField name={'vendor_credit_date'}>
|
||||||
{({ form, field: { value }, meta: { error, touched } }) => (
|
{({ form, field: { value }, meta: { error, touched } }) => (
|
||||||
@@ -194,7 +193,7 @@ function VendorCreditFormVendorSelect() {
|
|||||||
name={'vendor_id'}
|
name={'vendor_id'}
|
||||||
items={vendors}
|
items={vendors}
|
||||||
placeholder={<T id={'select_vender_account'} />}
|
placeholder={<T id={'select_vender_account'} />}
|
||||||
onItemChange={(contact) => {
|
onItemSelect={(contact) => {
|
||||||
setFieldValue('vendor_id', contact.id);
|
setFieldValue('vendor_id', contact.id);
|
||||||
setFieldValue('currency_code', contact?.currency_code);
|
setFieldValue('currency_code', contact?.currency_code);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ function PaymentFormVendorSelect() {
|
|||||||
name={'vendor_id'}
|
name={'vendor_id'}
|
||||||
items={vendors}
|
items={vendors}
|
||||||
placeholder={<T id={'select_vender_account'} />}
|
placeholder={<T id={'select_vender_account'} />}
|
||||||
onItemChange={(contact) => {
|
onItemSelect={(contact) => {
|
||||||
setFieldValue('vendor_id', contact.id);
|
setFieldValue('vendor_id', contact.id);
|
||||||
setFieldValue('currency_code', contact?.currency_code);
|
setFieldValue('currency_code', contact?.currency_code);
|
||||||
setPaymentVendorId(contact.id);
|
setPaymentVendorId(contact.id);
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ function CreditNoteCustomersSelect() {
|
|||||||
name={'customer_id'}
|
name={'customer_id'}
|
||||||
items={customers}
|
items={customers}
|
||||||
placeholder={<T id={'select_customer_account'} />}
|
placeholder={<T id={'select_customer_account'} />}
|
||||||
onItemChange={(customer) => {
|
onItemSelect={(customer) => {
|
||||||
setFieldValue('customer_id', customer.id);
|
setFieldValue('customer_id', customer.id);
|
||||||
setFieldValue('currency_code', customer?.currency_code);
|
setFieldValue('currency_code', customer?.currency_code);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ function EstimateFormCustomerSelect() {
|
|||||||
name={'customer_id'}
|
name={'customer_id'}
|
||||||
items={customers}
|
items={customers}
|
||||||
placeholder={<T id={'select_customer_account'} />}
|
placeholder={<T id={'select_customer_account'} />}
|
||||||
onItemChange={(customer) => {
|
onItemSelect={(customer) => {
|
||||||
setFieldValue('customer_id', customer.id);
|
setFieldValue('customer_id', customer.id);
|
||||||
setFieldValue('currency_code', customer?.currency_code);
|
setFieldValue('currency_code', customer?.currency_code);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ function InvoiceFormCustomerSelect() {
|
|||||||
name={'customer_id'}
|
name={'customer_id'}
|
||||||
items={customers}
|
items={customers}
|
||||||
placeholder={<T id={'select_customer_account'} />}
|
placeholder={<T id={'select_customer_account'} />}
|
||||||
onItemChange={(customer) => {
|
onItemSelect={(customer) => {
|
||||||
setFieldValue('customer_id', customer.id);
|
setFieldValue('customer_id', customer.id);
|
||||||
setFieldValue('currency_code', customer?.currency_code);
|
setFieldValue('currency_code', customer?.currency_code);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ function PaymentReceiveCustomerSelect() {
|
|||||||
name={'customer_id'}
|
name={'customer_id'}
|
||||||
items={customers}
|
items={customers}
|
||||||
placeholder={<T id={'select_customer_account'} />}
|
placeholder={<T id={'select_customer_account'} />}
|
||||||
onItemChange={(customer) => {
|
onItemSelect={(customer) => {
|
||||||
setFieldValue('customer_id', customer.id);
|
setFieldValue('customer_id', customer.id);
|
||||||
setFieldValue('full_amount', '');
|
setFieldValue('full_amount', '');
|
||||||
setFieldValue('currency_code', customer?.currency_code);
|
setFieldValue('currency_code', customer?.currency_code);
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ function ReceiptFormCustomerSelect() {
|
|||||||
name={'customer_id'}
|
name={'customer_id'}
|
||||||
items={customers}
|
items={customers}
|
||||||
placeholder={<T id={'select_customer_account'} />}
|
placeholder={<T id={'select_customer_account'} />}
|
||||||
onItemChange={(customer) => {
|
onItemSelect={(customer) => {
|
||||||
setFieldValue('customer_id', customer.id);
|
setFieldValue('customer_id', customer.id);
|
||||||
setFieldValue('currency_code', customer?.currency_code);
|
setFieldValue('currency_code', customer?.currency_code);
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user