mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
refactoring: sales tables.
refacoring: purchases tables.
This commit is contained in:
@@ -6,7 +6,6 @@ import ReferenceNumberForm from 'containers/JournalNumber/ReferenceNumberForm';
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
import withSettings from 'containers/Settings/withSettings';
|
||||
import withSettingsActions from 'containers/Settings/withSettingsActions';
|
||||
import withEstimateActions from 'containers/Sales/Estimate/withEstimateActions';
|
||||
|
||||
import { compose, optionsMapToArray } from 'utils';
|
||||
|
||||
@@ -18,15 +17,13 @@ function EstimateNumberDialogContent({
|
||||
// #withSettings
|
||||
nextNumber,
|
||||
numberPrefix,
|
||||
|
||||
// #withSettingsActions
|
||||
requestFetchOptions,
|
||||
requestSubmitOptions,
|
||||
|
||||
// #withDialogActions
|
||||
closeDialog,
|
||||
|
||||
// #withEstimateActions
|
||||
setEstimateNumberChanged,
|
||||
}) {
|
||||
const fetchSettings = useQuery(['settings'], () => requestFetchOptions({}));
|
||||
|
||||
@@ -41,7 +38,7 @@ function EstimateNumberDialogContent({
|
||||
|
||||
setTimeout(() => {
|
||||
queryCache.invalidateQueries('settings');
|
||||
setEstimateNumberChanged(true);
|
||||
// setEstimateNumberChanged(true);
|
||||
}, 250);
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -72,5 +69,4 @@ export default compose(
|
||||
nextNumber: estimatesSettings?.nextNumber,
|
||||
numberPrefix: estimatesSettings?.numberPrefix,
|
||||
})),
|
||||
withEstimateActions,
|
||||
)(EstimateNumberDialogContent);
|
||||
|
||||
@@ -7,7 +7,7 @@ import ReferenceNumberForm from 'containers/JournalNumber/ReferenceNumberForm';
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
import withSettings from 'containers/Settings/withSettings';
|
||||
import withSettingsActions from 'containers/Settings/withSettingsActions';
|
||||
import withInvoicesActions from 'containers/Sales/Invoice/withInvoiceActions';
|
||||
// import withInvoicesActions from 'containers/Sales/Invoice/withInvoiceActions';
|
||||
|
||||
import { compose, optionsMapToArray } from 'utils';
|
||||
|
||||
@@ -28,7 +28,7 @@ function InvoiceNumberDialogContent({
|
||||
closeDialog,
|
||||
|
||||
// #withInvoicesActions
|
||||
setInvoiceNumberChanged,
|
||||
// setInvoiceNumberChanged,
|
||||
}) {
|
||||
const fetchSettings = useQuery(['settings'], () => requestFetchOptions({}));
|
||||
|
||||
@@ -44,7 +44,7 @@ function InvoiceNumberDialogContent({
|
||||
|
||||
setTimeout(() => {
|
||||
queryCache.invalidateQueries('settings');
|
||||
setInvoiceNumberChanged(true);
|
||||
// setInvoiceNumberChanged(true);
|
||||
}, 250);
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -75,5 +75,5 @@ export default compose(
|
||||
nextNumber: invoiceSettings?.nextNumber,
|
||||
numberPrefix: invoiceSettings?.numberPrefix,
|
||||
})),
|
||||
withInvoicesActions,
|
||||
// withInvoicesActions,
|
||||
)(InvoiceNumberDialogContent);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import React, { useCallback } from 'react';
|
||||
import { DialogContent } from 'components';
|
||||
import { useQuery, queryCache } from 'react-query';
|
||||
import { useQuery } from 'react-query';
|
||||
|
||||
import ReferenceNumberForm from 'containers/JournalNumber/ReferenceNumberForm';
|
||||
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
import withSettingsActions from 'containers/Settings/withSettingsActions';
|
||||
import withSettings from 'containers/Settings/withSettings';
|
||||
import withPaymentReceivesActions from 'containers/Sales/PaymentReceive/withPaymentReceivesActions';
|
||||
// import withPaymentReceivesActions from 'containers/Sales/PaymentReceive/withPaymentReceivesActions';
|
||||
|
||||
import { compose, optionsMapToArray } from 'utils';
|
||||
|
||||
@@ -28,7 +28,7 @@ function PaymentNumberDialogContent({
|
||||
closeDialog,
|
||||
|
||||
// #withPaymentReceivesActions
|
||||
setPaymentReceiveNumberChanged,
|
||||
// setPaymentReceiveNumberChanged,
|
||||
}) {
|
||||
const fetchSettings = useQuery(['settings'], () => requestFetchOptions({}));
|
||||
|
||||
@@ -43,8 +43,7 @@ function PaymentNumberDialogContent({
|
||||
closeDialog('payment-receive-number-form');
|
||||
|
||||
setTimeout(() => {
|
||||
queryCache.invalidateQueries('settings');
|
||||
setPaymentReceiveNumberChanged(true);
|
||||
// setPaymentReceiveNumberChanged(true);
|
||||
}, 250);
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -76,5 +75,5 @@ export default compose(
|
||||
nextNumber: paymentReceiveSettings?.nextNumber,
|
||||
numberPrefix: paymentReceiveSettings?.numberPrefix,
|
||||
})),
|
||||
withPaymentReceivesActions,
|
||||
// withPaymentReceivesActions,
|
||||
)(PaymentNumberDialogContent);
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import React, { useCallback } from 'react';
|
||||
import { DialogContent } from 'components';
|
||||
import { useQuery, queryCache } from 'react-query';
|
||||
import { useQuery } from 'react-query';
|
||||
|
||||
import ReferenceNumberForm from 'containers/JournalNumber/ReferenceNumberForm';
|
||||
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
import withSettings from 'containers/Settings/withSettings';
|
||||
import withSettingsActions from 'containers/Settings/withSettingsActions';
|
||||
import withReceiptActions from 'containers/Sales/Receipt/withReceiptActions';
|
||||
|
||||
import { compose, optionsMapToArray } from 'utils';
|
||||
|
||||
@@ -43,7 +42,6 @@ function ReceiptNumberDialogContent({
|
||||
closeDialog('receipt-number-form');
|
||||
|
||||
setTimeout(() => {
|
||||
queryCache.invalidateQueries('settings');
|
||||
setReceiptNumberChanged(true);
|
||||
}, 250);
|
||||
})
|
||||
@@ -75,5 +73,4 @@ export default compose(
|
||||
nextNumber: receiptSettings?.nextNumber,
|
||||
numberPrefix: receiptSettings?.numberPrefix,
|
||||
})),
|
||||
withReceiptActions,
|
||||
)(ReceiptNumberDialogContent);
|
||||
|
||||
Reference in New Issue
Block a user