mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat: notify by SMS.
This commit is contained in:
@@ -6,28 +6,17 @@ import {
|
||||
NavbarGroup,
|
||||
Classes,
|
||||
NavbarDivider,
|
||||
Popover,
|
||||
PopoverInteractionKind,
|
||||
Position,
|
||||
Intent,
|
||||
MenuItem,
|
||||
Menu,
|
||||
} from '@blueprintjs/core';
|
||||
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
|
||||
|
||||
import { useInvoiceDetailDrawerContext } from './InvoiceDetailDrawerProvider';
|
||||
import { moreVertOptions } from '../../../common/moreVertOptions';
|
||||
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
import withAlertsActions from 'containers/Alert/withAlertActions';
|
||||
import withDrawerActions from 'containers/Drawer/withDrawerActions';
|
||||
|
||||
import {
|
||||
If,
|
||||
Icon,
|
||||
FormattedMessage as T,
|
||||
// MoreVertMenutItems,
|
||||
} from 'components';
|
||||
import { If, Icon, FormattedMessage as T } from 'components';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
@@ -78,7 +67,7 @@ function InvoiceDetailActionsBar({
|
||||
};
|
||||
// Handle notify via SMS.
|
||||
const handleNotifyViaSMS = () => {
|
||||
openDialog('notify-via-sms', {});
|
||||
openDialog('notify-via-sms', { invoiceId });
|
||||
};
|
||||
|
||||
// Handle cancele write-off invoice.
|
||||
@@ -120,7 +109,6 @@ function InvoiceDetailActionsBar({
|
||||
/>
|
||||
<NavbarDivider />
|
||||
<BadDebtMenuItem
|
||||
invoice={invoice}
|
||||
payload={{
|
||||
onBadDebt: handleBadDebtInvoice,
|
||||
onCancelBadDebt: handleCancelBadDebtInvoice,
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
} from '@blueprintjs/core';
|
||||
import { Icon, FormattedMessage as T, Choose } from 'components';
|
||||
import { FormatNumberCell } from '../../../components';
|
||||
import { useInvoiceDetailDrawerContext } from './InvoiceDetailDrawerProvider';
|
||||
|
||||
/**
|
||||
* Retrieve invoice readonly details table columns.
|
||||
@@ -59,9 +60,10 @@ export const useInvoiceReadonlyEntriesColumns = () =>
|
||||
);
|
||||
|
||||
export const BadDebtMenuItem = ({
|
||||
invoice,
|
||||
payload: { onCancelBadDebt, onBadDebt, onNotifyViaSMS },
|
||||
}) => {
|
||||
const { invoice } = useInvoiceDetailDrawerContext();
|
||||
|
||||
return (
|
||||
<Popover
|
||||
minimal={true}
|
||||
|
||||
Reference in New Issue
Block a user