fix(webapp): use all drawers name from common enum object

This commit is contained in:
Ahmed Bouhuolia
2023-06-14 19:51:14 +02:00
parent 01c27b56ef
commit d1a09e3b15
99 changed files with 286 additions and 186 deletions

View File

@@ -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.

View File

@@ -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,
})}