refactoring: sales tables.

refacoring: purchases tables.
This commit is contained in:
a.bouhuolia
2021-02-11 20:45:06 +02:00
parent 3901c336df
commit d48532a7e6
210 changed files with 2799 additions and 5392 deletions

View File

@@ -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);