mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
feat: wip send mail preview
This commit is contained in:
@@ -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 (
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user