mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
fix(webapp): use all drawers name from common enum object
This commit is contained in:
@@ -15,6 +15,7 @@ import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
import withDashboardActions from '@/containers/Dashboard/withDashboardActions';
|
||||
|
||||
import { useDrawerContext } from '@/components/Drawer/DrawerProvider';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Drawer item form loading.
|
||||
@@ -43,7 +44,7 @@ function QuickCreateItemDrawerForm({
|
||||
// Handle the form submit request success.
|
||||
const handleSubmitSuccess = (values, form, submitPayload, response) => {
|
||||
if (submitPayload.redirect) {
|
||||
closeDrawer('quick-create-item');
|
||||
closeDrawer(DRAWERS.QUICK_CREATE_ITEM);
|
||||
}
|
||||
if (payload.quickActionEvent) {
|
||||
addQuickActionEvent(payload.quickActionEvent, {
|
||||
@@ -53,7 +54,7 @@ function QuickCreateItemDrawerForm({
|
||||
};
|
||||
// Handle the form cancel.
|
||||
const handleFormCancel = () => {
|
||||
closeDrawer('quick-create-item');
|
||||
closeDrawer(DRAWERS.QUICK_CREATE_ITEM);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user