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