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:
@@ -7,6 +7,7 @@ import {
|
||||
} from '@/components';
|
||||
|
||||
import QuickCustomerFormDrawer from './QuickCustomerFormDrawer';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Quick create/edit customer drawer.
|
||||
@@ -15,7 +16,7 @@ export default function QuickCreateCustomerDrawerContent({ displayName }) {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<DrawerHeaderContent
|
||||
name="quick-create-customer"
|
||||
name={DRAWERS.QUICK_CREATE_CUSTOMER}
|
||||
title={<T id={'create_a_new_customer'} />}
|
||||
/>
|
||||
<DrawerBody>
|
||||
|
||||
@@ -13,6 +13,7 @@ import CustomerFormFormik, {
|
||||
} from '@/containers/Customers/CustomerForm/CustomerFormFormik';
|
||||
|
||||
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Drawer customer form loading wrapper.
|
||||
@@ -30,11 +31,11 @@ function DrawerCustomerFormLoading({ children }) {
|
||||
function QuickCustomerFormDrawer({ displayName, closeDrawer, customerId }) {
|
||||
// Handle the form submit request success.
|
||||
const handleSubmitSuccess = () => {
|
||||
closeDrawer('quick-create-customer');
|
||||
closeDrawer(DRAWERS.QUICK_CREATE_CUSTOMER);
|
||||
};
|
||||
// Handle the form cancel action.
|
||||
const handleCancelForm = () => {
|
||||
closeDrawer('quick-create-customer');
|
||||
closeDrawer(DRAWERS.QUICK_CREATE_CUSTOMER);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user