feat(webapp): send mail notification dialogs

This commit is contained in:
Ahmed Bouhuolia
2023-12-26 15:52:38 +02:00
parent 3c8c3d8253
commit de1b7f132c
33 changed files with 737 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ import {
import { compose } from '@/utils';
import { DRAWERS } from '@/constants/drawers';
import { DialogsName } from '@/constants/dialogs';
/**
* Estimate read-only details actions bar of the drawer.
@@ -65,6 +66,10 @@ function EstimateDetailActionsBar({
const handleNotifyViaSMS = () => {
openDialog('notify-estimate-via-sms', { estimateId });
};
// Handles the estimate mail dialog.
const handleMailEstimate = () => {
openDialog(DialogsName.EstimateMail, { estimateId });
};
return (
<DrawerActionsBar>
@@ -86,6 +91,15 @@ function EstimateDetailActionsBar({
onClick={handlePrintEstimate}
/>
</Can>
<Can I={SaleEstimateAction.View} a={AbilitySubject.Estimate}>
<Button
className={Classes.MINIMAL}
text={'Mail'}
onClick={handleMailEstimate}
/>
<NavbarDivider />
</Can>
<Can I={SaleEstimateAction.Delete} a={AbilitySubject.Estimate}>
<Button
className={Classes.MINIMAL}