mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +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';
|
||||
|
||||
/**
|
||||
* Estimate read-only details actions bar of the drawer.
|
||||
@@ -48,7 +49,7 @@ function EstimateDetailActionsBar({
|
||||
// Handle edit sale estimate.
|
||||
const handleEditEstimate = () => {
|
||||
history.push(`/estimates/${estimateId}/edit`);
|
||||
closeDrawer('estimate-detail-drawer');
|
||||
closeDrawer(DRAWERS.ESTIMATE_DETAILS);
|
||||
};
|
||||
|
||||
// Handle delete sale estimate.
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Features } from '@/constants';
|
||||
import { useEstimate } from '@/hooks/query';
|
||||
import { useFeatureCan } from '@/hooks/state';
|
||||
import { DrawerHeaderContent, DrawerLoading } from '@/components';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
const EstimateDetailDrawerContext = React.createContext();
|
||||
|
||||
@@ -29,7 +30,7 @@ function EstimateDetailDrawerProvider({ estimateId, ...props }) {
|
||||
return (
|
||||
<DrawerLoading loading={isEstimateLoading}>
|
||||
<DrawerHeaderContent
|
||||
name="estimate-detail-drawer"
|
||||
name={DRAWERS.ESTIMATE_DETAILS}
|
||||
title={intl.get('estimate.drawer.title', {
|
||||
number: estimate.estimate_number,
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user