fix(webapp): use all drawers name from common enum object

This commit is contained in:
Ahmed Bouhuolia
2023-06-14 19:51:14 +02:00
parent 01c27b56ef
commit d1a09e3b15
99 changed files with 286 additions and 186 deletions

View File

@@ -25,6 +25,7 @@ import {
} from '@/components';
import { compose } from '@/utils';
import { DRAWERS } from '@/constants/drawers';
/**
* Vendor credit detail actions bar.
@@ -39,14 +40,13 @@ function VendorCreditDetailActionsBar({
// #withDrawerActions
closeDrawer,
}) {
const { vendorCreditId, vendorCredit } = useVendorCreditDetailDrawerContext();
const history = useHistory();
const { vendorCreditId, vendorCredit } = useVendorCreditDetailDrawerContext();
// Handle edit credit note.
const handleEditVendorCredit = () => {
history.push(`/vendor-credits/${vendorCreditId}/edit`);
closeDrawer('vendor-credit-detail-drawer');
closeDrawer(DRAWERS.VENDOR_CREDIT_DETAILS);
};
// Handle delete credit note.