mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
fix: ability option key.
This commit is contained in:
@@ -46,7 +46,7 @@ export const SaleInvoiceAction = {
|
||||
Create: 'Create',
|
||||
Edit: 'Edit',
|
||||
Delete: 'Delete',
|
||||
Writeoff: 'Writeoff',
|
||||
Writeoff: 'bad-debt',
|
||||
NotifyBySms: 'NotifyBySms',
|
||||
};
|
||||
|
||||
|
||||
@@ -90,11 +90,13 @@ function EstimateDetailActionsBar({
|
||||
/>
|
||||
<NavbarDivider />
|
||||
</Can>
|
||||
<MoreMenuItems
|
||||
payload={{
|
||||
onNotifyViaSMS: handleNotifyViaSMS,
|
||||
}}
|
||||
/>
|
||||
<Can I={SaleEstimateAction.NotifyBySms} a={AbilitySubject.Estimate}>
|
||||
<MoreMenuItems
|
||||
payload={{
|
||||
onNotifyViaSMS: handleNotifyViaSMS,
|
||||
}}
|
||||
/>
|
||||
</Can>
|
||||
</NavbarGroup>
|
||||
</DashboardActionsBar>
|
||||
);
|
||||
|
||||
@@ -120,9 +120,9 @@ function InvoiceDetailActionsBar({
|
||||
intent={Intent.DANGER}
|
||||
onClick={handleDeleteInvoice}
|
||||
/>
|
||||
<NavbarDivider />
|
||||
</Can>
|
||||
<Can I={SaleInvoiceAction.Writeoff} a={AbilitySubject.Invoice}>
|
||||
<NavbarDivider />
|
||||
<BadDebtMenuItem
|
||||
payload={{
|
||||
onBadDebt: handleBadDebtInvoice,
|
||||
|
||||
@@ -8,7 +8,11 @@ import {
|
||||
MenuItem,
|
||||
Menu,
|
||||
} from '@blueprintjs/core';
|
||||
import { Icon, FormattedMessage as T, Choose } from 'components';
|
||||
import { Icon, FormattedMessage as T, Choose, Can } from 'components';
|
||||
import {
|
||||
SaleInvoiceAction,
|
||||
AbilitySubject,
|
||||
} from '../../../common/abilityOption';
|
||||
import { FormatNumberCell } from '../../../components';
|
||||
import { useInvoiceDetailDrawerContext } from './InvoiceDetailDrawerProvider';
|
||||
|
||||
@@ -88,10 +92,12 @@ export const BadDebtMenuItem = ({
|
||||
/>
|
||||
</Choose.When>
|
||||
</Choose>
|
||||
<MenuItem
|
||||
onClick={onNotifyViaSMS}
|
||||
text={<T id={'notify_via_sms.dialog.notify_via_sms'} />}
|
||||
/>
|
||||
<Can I={SaleInvoiceAction.NotifyBySms} a={AbilitySubject.Invoice}>
|
||||
<MenuItem
|
||||
onClick={onNotifyViaSMS}
|
||||
text={<T id={'notify_via_sms.dialog.notify_via_sms'} />}
|
||||
/>
|
||||
</Can>
|
||||
</Menu>
|
||||
}
|
||||
>
|
||||
|
||||
@@ -80,11 +80,13 @@ function PaymentReceiveActionsBar({
|
||||
/>
|
||||
<NavbarDivider />
|
||||
</Can>
|
||||
<MoreMenuItems
|
||||
payload={{
|
||||
onNotifyViaSMS: handleNotifyViaSMS,
|
||||
}}
|
||||
/>
|
||||
<Can I={PaymentReceiveAction.NotifyBySms} a={AbilitySubject.PaymentReceive}>
|
||||
<MoreMenuItems
|
||||
payload={{
|
||||
onNotifyViaSMS: handleNotifyViaSMS,
|
||||
}}
|
||||
/>
|
||||
</Can>
|
||||
</NavbarGroup>
|
||||
</DashboardActionsBar>
|
||||
);
|
||||
|
||||
@@ -85,11 +85,13 @@ function ReceiptDetailActionBar({
|
||||
/>
|
||||
<NavbarDivider />
|
||||
</Can>
|
||||
<MoreMenuItems
|
||||
payload={{
|
||||
onNotifyViaSMS: handleNotifyViaSMS,
|
||||
}}
|
||||
/>
|
||||
<Can I={SaleReceiptAction.NotifyBySms} a={AbilitySubject.Receipt}>
|
||||
<MoreMenuItems
|
||||
payload={{
|
||||
onNotifyViaSMS: handleNotifyViaSMS,
|
||||
}}
|
||||
/>
|
||||
</Can>
|
||||
</NavbarGroup>
|
||||
</DashboardActionsBar>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user