From 3a8e1f523851ec3ec38582b54ef259dbee7e0705 Mon Sep 17 00:00:00 2001
From: elforjani13 <39470382+elforjani13@users.noreply.github.com>
Date: Tue, 23 Nov 2021 20:15:29 +0200
Subject: [PATCH] feat: add payment receive ability.
---
.../InvoiceDetailActionsBar.js | 4 +-
.../PaymentReceiveActionsBar.js | 37 +++++++++++--------
.../Invoices/InvoicesLanding/components.js | 4 +-
.../PaymentReceiveActionsBar.js | 21 +++++++----
.../PaymentsLanding/components.js | 35 +++++++++++-------
5 files changed, 59 insertions(+), 42 deletions(-)
diff --git a/src/containers/Drawers/InvoiceDetailDrawer/InvoiceDetailActionsBar.js b/src/containers/Drawers/InvoiceDetailDrawer/InvoiceDetailActionsBar.js
index 24052211c..1218a1cbb 100644
--- a/src/containers/Drawers/InvoiceDetailDrawer/InvoiceDetailActionsBar.js
+++ b/src/containers/Drawers/InvoiceDetailDrawer/InvoiceDetailActionsBar.js
@@ -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({
-
+
-
+
}
diff --git a/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceiveActionsBar.js b/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceiveActionsBar.js
index bb67f91a3..13b31fa98 100644
--- a/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceiveActionsBar.js
+++ b/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceiveActionsBar.js
@@ -19,14 +19,17 @@ import {
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
-import { If, DashboardActionViewsList } from 'components';
+import { Can, If, DashboardActionViewsList } from 'components';
import withPaymentReceivesActions from './withPaymentReceivesActions';
import withPaymentReceives from './withPaymentReceives';
import withSettingsActions from 'containers/Settings/withSettingsActions';
import withSettings from 'containers/Settings/withSettings';
-
+import {
+ Payment_Receive_Abilities,
+ AbilitySubject,
+} from '../../../../common/abilityOption';
import { compose } from 'utils';
import { usePaymentReceivesListContext } from './PaymentReceiptsListProvider';
import { useRefreshPaymentReceive } from 'hooks/query/paymentReceives';
@@ -85,12 +88,14 @@ function PaymentReceiveActionsBar({
onChange={handleTabChange}
/>
- }
- text={}
- onClick={handleClickNewPaymentReceive}
- />
+
+ }
+ text={}
+ onClick={handleClickNewPaymentReceive}
+ />
+
-
- }
- text={intl.get('edit_payment_receive')}
- onClick={safeCallback(onEdit, paymentReceive)}
- />
- }
- />
+
+
+ }
+ text={intl.get('edit_payment_receive')}
+ onClick={safeCallback(onEdit, paymentReceive)}
+ />
+
+
+ }
+ />
+
);
}