mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 07:10:33 +00:00
fix(webapp): use all drawers name from common enum object
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user