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,20 +1,17 @@
import React, { useCallback } from 'react';
import React from 'react';
import {
FormattedMessage as T,
FormattedHTMLMessage,
useIntl,
} from 'react-intl';
import { Intent, Alert } from '@blueprintjs/core';
import { queryCache } from 'react-query';
import { AppToaster } from 'components';
import { useDeleteInvoice } from 'hooks/query';
import { handleDeleteErrors } from 'containers/Sales/Invoice/components';
import { handleDeleteErrors } from 'containers/Sales/Invoices/InvoicesLanding/components';
import withAlertStoreConnect from 'containers/Alert/withAlertStoreConnect';
import withAlertActions from 'containers/Alert/withAlertActions';
import withInvoiceActions from 'containers/Sales/Invoice/withInvoiceActions';
import { compose } from 'utils';
@@ -32,12 +29,9 @@ function InvoiceDeleteAlert({
closeAlert,
}) {
const { formatMessage } = useIntl();
const {
mutateAsync: deleteInvoiceMutate,
isLoading
} = useDeleteInvoice();
const { mutateAsync: deleteInvoiceMutate, isLoading } = useDeleteInvoice();
// handle cancel delete invoice alert.
// handle cancel delete invoice alert.
const handleCancelDeleteAlert = () => {
closeAlert(name);
};
@@ -84,5 +78,4 @@ function InvoiceDeleteAlert({
export default compose(
withAlertStoreConnect(),
withAlertActions,
withInvoiceActions,
)(InvoiceDeleteAlert);

View File

@@ -7,7 +7,6 @@ import { AppToaster } from 'components';
import withAlertStoreConnect from 'containers/Alert/withAlertStoreConnect';
import withAlertActions from 'containers/Alert/withAlertActions';
import withInvoiceActions from 'containers/Sales/Invoice/withInvoiceActions';
import { compose } from 'utils';
@@ -72,5 +71,4 @@ function InvoiceDeliverAlert({
export default compose(
withAlertStoreConnect(),
withAlertActions,
withInvoiceActions,
)(InvoiceDeliverAlert);