feat: wip send mail preview

This commit is contained in:
Ahmed Bouhuolia
2024-11-23 10:19:26 +02:00
parent b6f3c0145f
commit d5b0546301
6 changed files with 20 additions and 8 deletions

View File

@@ -30,7 +30,6 @@ import {
import { compose } from '@/utils';
import { DRAWERS } from '@/constants/drawers';
import { DialogsName } from '@/constants/dialogs';
/**
* Estimate read-only details actions bar of the drawer.
@@ -44,6 +43,7 @@ function EstimateDetailActionsBar({
// #withDrawerActions
closeDrawer,
openDrawer
}) {
// Estimate details drawer context.
const { estimateId, estimate } = useEstimateDetailDrawerContext();
@@ -80,7 +80,7 @@ function EstimateDetailActionsBar({
};
// Handles the estimate mail dialog.
const handleMailEstimate = () => {
openDialog(DialogsName.EstimateMail, { estimateId });
openDrawer(DRAWERS.ESTIMATE_SEND_MAIL, { estimateId });
};
return (

View File

@@ -28,7 +28,6 @@ import {
import { compose } from '@/utils';
import { DRAWERS } from '@/constants/drawers';
import { DialogsName } from '@/constants/dialogs';
/**
* Payment receive actions bar.
@@ -39,6 +38,7 @@ function PaymentsReceivedActionsBar({
// #withDrawerActions
closeDrawer,
openDrawer,
// #withDialogActions
openDialog,
@@ -69,8 +69,11 @@ function PaymentsReceivedActionsBar({
openDialog('payment-pdf-preview', { paymentReceiveId });
};
// Handle mail action.
const handleMailPaymentReceive = () => {
openDialog(DialogsName.PaymentMail, { paymentReceiveId });
openDrawer(DRAWERS.PAYMENT_RECEIVED_SEND_MAIL, {
paymentReceivedId: paymentReceiveId,
});
};
return (

View File

@@ -24,7 +24,6 @@ import { useReceiptDetailDrawerContext } from './ReceiptDetailDrawerProvider';
import { SaleReceiptAction, AbilitySubject } from '@/constants/abilityOption';
import { safeCallback, compose } from '@/utils';
import { DRAWERS } from '@/constants/drawers';
import { DialogsName } from '@/constants/dialogs';
/**
* Receipt details actions bar.
@@ -39,6 +38,7 @@ function ReceiptDetailActionBar({
// #withDrawerActions
closeDrawer,
openDrawer
}) {
const history = useHistory();
const { receiptId } = useReceiptDetailDrawerContext();
@@ -61,8 +61,9 @@ function ReceiptDetailActionBar({
const handleNotifyViaSMS = () => {
openDialog('notify-receipt-via-sms', { receiptId });
};
// Handle receipt mail action.
const handleReceiptMail = () => {
openDialog(DialogsName.ReceiptMail, { receiptId });
openDrawer(DRAWERS.RECEIPT_SEND_MAIL, { receiptId });
};
return (