mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat: add payment receive ability.
This commit is contained in:
@@ -19,7 +19,7 @@ import withDrawerActions from 'containers/Drawer/withDrawerActions';
|
||||
import { If, Can, Icon, FormattedMessage as T } from 'components';
|
||||
import {
|
||||
Invoice_Abilities,
|
||||
PaymentReceive,
|
||||
Payment_Receive_Abilities,
|
||||
AbilitySubject,
|
||||
} from '../../../common/abilityOption';
|
||||
|
||||
@@ -93,7 +93,7 @@ function InvoiceDetailActionsBar({
|
||||
|
||||
<NavbarDivider />
|
||||
</Can>
|
||||
<Can I={PaymentReceive.Create} a={AbilitySubject.PaymentReceive}>
|
||||
<Can I={Payment_Receive_Abilities.Create} a={AbilitySubject.PaymentReceive}>
|
||||
<If condition={invoice.is_delivered && !invoice.is_fully_paid}>
|
||||
<Button
|
||||
className={Classes.MINIMAL}
|
||||
|
||||
@@ -16,7 +16,8 @@ import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
import withAlertsActions from 'containers/Alert/withAlertActions';
|
||||
import withDrawerActions from 'containers/Drawer/withDrawerActions';
|
||||
|
||||
import { Icon, FormattedMessage as T, MoreMenuItems } from 'components';
|
||||
import { Can, Icon, FormattedMessage as T, MoreMenuItems } from 'components';
|
||||
import { Payment_Receive_Abilities, AbilitySubject } from '../../../common/abilityOption';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
@@ -57,21 +58,25 @@ function PaymentReceiveActionsBar({
|
||||
return (
|
||||
<DashboardActionsBar>
|
||||
<NavbarGroup>
|
||||
<Button
|
||||
className={Classes.MINIMAL}
|
||||
icon={<Icon icon="pen-18" />}
|
||||
text={<T id={'edit_payment_receive'} />}
|
||||
onClick={handleEditPaymentReceive}
|
||||
/>
|
||||
<NavbarDivider />
|
||||
<Button
|
||||
className={Classes.MINIMAL}
|
||||
icon={<Icon icon={'trash-16'} iconSize={16} />}
|
||||
text={<T id={'delete'} />}
|
||||
intent={Intent.DANGER}
|
||||
onClick={handleDeletePaymentReceive}
|
||||
/>
|
||||
<NavbarDivider />
|
||||
<Can I={Payment_Receive_Abilities.Edit} a={AbilitySubject.PaymentReceive}>
|
||||
<Button
|
||||
className={Classes.MINIMAL}
|
||||
icon={<Icon icon="pen-18" />}
|
||||
text={<T id={'edit_payment_receive'} />}
|
||||
onClick={handleEditPaymentReceive}
|
||||
/>
|
||||
<NavbarDivider />
|
||||
</Can>
|
||||
<Can I={Payment_Receive_Abilities.Delete} a={AbilitySubject.PaymentReceive}>
|
||||
<Button
|
||||
className={Classes.MINIMAL}
|
||||
icon={<Icon icon={'trash-16'} iconSize={16} />}
|
||||
text={<T id={'delete'} />}
|
||||
intent={Intent.DANGER}
|
||||
onClick={handleDeletePaymentReceive}
|
||||
/>
|
||||
<NavbarDivider />
|
||||
</Can>
|
||||
<MoreMenuItems
|
||||
payload={{
|
||||
onNotifyViaSMS: handleNotifyViaSMS,
|
||||
|
||||
Reference in New Issue
Block a user