mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
fix(webapp): use all drawers name from common enum object
This commit is contained in:
@@ -16,6 +16,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 vendor form loading wrapper.
|
||||
@@ -41,7 +42,7 @@ function QuickVendorFormDrawer({
|
||||
// Handle the form submit request success.
|
||||
const handleSubmitSuccess = (values, form, submitPayload, response) => {
|
||||
if (!submitPayload.noRedirect) {
|
||||
closeDrawer('quick-write-vendor');
|
||||
closeDrawer(DRAWERS.QUICK_WRITE_VENDOR);
|
||||
}
|
||||
if (payload.quickActionEvent) {
|
||||
addQuickActionEvent(payload.quickActionEvent, {
|
||||
@@ -51,7 +52,7 @@ function QuickVendorFormDrawer({
|
||||
};
|
||||
// Handle the form cancel action.
|
||||
const handleCancelForm = () => {
|
||||
closeDrawer('quick-write-vendor');
|
||||
closeDrawer(DRAWERS.QUICK_WRITE_VENDOR);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
} from '@/components';
|
||||
|
||||
import QuickVendorFormDrawer from './QuickVendorFormDrawer';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Quick create/edit vendor drawer.
|
||||
@@ -15,7 +16,7 @@ export default function QuickWriteVendorDrawerContent({ displayName }) {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<DrawerHeaderContent
|
||||
name="quick-create-customer"
|
||||
name={DRAWERS.QUICK_CREATE_CUSTOMER}
|
||||
title={<T id={'create_a_new_vendor'} />}
|
||||
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user