@bigbinary/neeto-payments-frontend 6.1.12 → 6.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccountsDashboard.js +308 -333
- package/dist/AccountsDashboard.js.map +1 -1
- package/dist/AdminCancelRecurringPaymentButton.js +43 -54
- package/dist/AdminCancelRecurringPaymentButton.js.map +1 -1
- package/dist/CashPaymentButton.js +32 -34
- package/dist/CashPaymentButton.js.map +1 -1
- package/dist/ConfirmCashPaymentButton.js +77 -71
- package/dist/ConfirmCashPaymentButton.js.map +1 -1
- package/dist/{CopyButtonWrapper-rv-OaINx.js → CopyButtonWrapper-Bp5IVO76.js} +16 -14
- package/dist/CopyButtonWrapper-Bp5IVO76.js.map +1 -0
- package/dist/CustomerCancelRecurringPaymentForm.js +76 -75
- package/dist/CustomerCancelRecurringPaymentForm.js.map +1 -1
- package/dist/ExportModal-DyRGg_4o.js +120 -0
- package/dist/ExportModal-DyRGg_4o.js.map +1 -0
- package/dist/ManualUpiConnect.js +159 -178
- package/dist/ManualUpiConnect.js.map +1 -1
- package/dist/ManualUpiPayment.js +85 -89
- package/dist/ManualUpiPayment.js.map +1 -1
- package/dist/ManualUpiPaymentConfirmButton.js +119 -115
- package/dist/ManualUpiPaymentConfirmButton.js.map +1 -1
- package/dist/ManualUpiPaymentRejectButton.js +98 -92
- package/dist/ManualUpiPaymentRejectButton.js.map +1 -1
- package/dist/PaymentKindRestrictionAlert.js +14 -19
- package/dist/PaymentKindRestrictionAlert.js.map +1 -1
- package/dist/PaymentsDashboard.js +318 -349
- package/dist/PaymentsDashboard.js.map +1 -1
- package/dist/PayoutsDashboard.js +327 -350
- package/dist/PayoutsDashboard.js.map +1 -1
- package/dist/PayoutsPage.js +114 -92
- package/dist/PayoutsPage.js.map +1 -1
- package/dist/RazorpayConnect.js +71 -62
- package/dist/RazorpayConnect.js.map +1 -1
- package/dist/RazorpayLinkedAccountForm.js +145 -156
- package/dist/RazorpayLinkedAccountForm.js.map +1 -1
- package/dist/RazorpayPaymentButton.js +72 -100
- package/dist/RazorpayPaymentButton.js.map +1 -1
- package/dist/RecurringPaymentSettings.js +85 -85
- package/dist/RecurringPaymentSettings.js.map +1 -1
- package/dist/RefundsDashboard.js +363 -386
- package/dist/RefundsDashboard.js.map +1 -1
- package/dist/SplitTransfersDashboard.js +868 -829
- package/dist/SplitTransfersDashboard.js.map +1 -1
- package/dist/StripeCheckoutSetting.js +63 -75
- package/dist/StripeCheckoutSetting.js.map +1 -1
- package/dist/StripeConnect.js +257 -259
- package/dist/StripeConnect.js.map +1 -1
- package/dist/StripeManage.js +28 -25
- package/dist/StripeManage.js.map +1 -1
- package/dist/TaxesDashboard.js +284 -292
- package/dist/TaxesDashboard.js.map +1 -1
- package/dist/buildStripeTransactionLink.js +1 -1
- package/dist/cjs/AccountsDashboard.js +308 -333
- package/dist/cjs/AccountsDashboard.js.map +1 -1
- package/dist/cjs/AdminCancelRecurringPaymentButton.js +43 -54
- package/dist/cjs/AdminCancelRecurringPaymentButton.js.map +1 -1
- package/dist/cjs/CashPaymentButton.js +32 -34
- package/dist/cjs/CashPaymentButton.js.map +1 -1
- package/dist/cjs/ConfirmCashPaymentButton.js +77 -71
- package/dist/cjs/ConfirmCashPaymentButton.js.map +1 -1
- package/dist/cjs/{CopyButtonWrapper-BkpN0Wmd.js → CopyButtonWrapper-I-kdKiiB.js} +16 -14
- package/dist/cjs/CopyButtonWrapper-I-kdKiiB.js.map +1 -0
- package/dist/cjs/CustomerCancelRecurringPaymentForm.js +76 -75
- package/dist/cjs/CustomerCancelRecurringPaymentForm.js.map +1 -1
- package/dist/cjs/ExportModal-DE-VcN1X.js +122 -0
- package/dist/cjs/ExportModal-DE-VcN1X.js.map +1 -0
- package/dist/cjs/ManualUpiConnect.js +159 -178
- package/dist/cjs/ManualUpiConnect.js.map +1 -1
- package/dist/cjs/ManualUpiPayment.js +85 -89
- package/dist/cjs/ManualUpiPayment.js.map +1 -1
- package/dist/cjs/ManualUpiPaymentConfirmButton.js +118 -114
- package/dist/cjs/ManualUpiPaymentConfirmButton.js.map +1 -1
- package/dist/cjs/ManualUpiPaymentRejectButton.js +98 -92
- package/dist/cjs/ManualUpiPaymentRejectButton.js.map +1 -1
- package/dist/cjs/PaymentKindRestrictionAlert.js +14 -19
- package/dist/cjs/PaymentKindRestrictionAlert.js.map +1 -1
- package/dist/cjs/PaymentsDashboard.js +318 -349
- package/dist/cjs/PaymentsDashboard.js.map +1 -1
- package/dist/cjs/PayoutsDashboard.js +327 -350
- package/dist/cjs/PayoutsDashboard.js.map +1 -1
- package/dist/cjs/PayoutsPage.js +114 -92
- package/dist/cjs/PayoutsPage.js.map +1 -1
- package/dist/cjs/RazorpayConnect.js +71 -62
- package/dist/cjs/RazorpayConnect.js.map +1 -1
- package/dist/cjs/RazorpayLinkedAccountForm.js +145 -156
- package/dist/cjs/RazorpayLinkedAccountForm.js.map +1 -1
- package/dist/cjs/RazorpayPaymentButton.js +72 -100
- package/dist/cjs/RazorpayPaymentButton.js.map +1 -1
- package/dist/cjs/RecurringPaymentSettings.js +85 -85
- package/dist/cjs/RecurringPaymentSettings.js.map +1 -1
- package/dist/cjs/RefundsDashboard.js +363 -386
- package/dist/cjs/RefundsDashboard.js.map +1 -1
- package/dist/cjs/SplitTransfersDashboard.js +867 -828
- package/dist/cjs/SplitTransfersDashboard.js.map +1 -1
- package/dist/cjs/StripeCheckoutSetting.js +63 -75
- package/dist/cjs/StripeCheckoutSetting.js.map +1 -1
- package/dist/cjs/StripeConnect.js +257 -259
- package/dist/cjs/StripeConnect.js.map +1 -1
- package/dist/cjs/StripeManage.js +28 -25
- package/dist/cjs/StripeManage.js.map +1 -1
- package/dist/cjs/TaxesDashboard.js +284 -292
- package/dist/cjs/TaxesDashboard.js.map +1 -1
- package/dist/cjs/buildStripeTransactionLink.js +1 -1
- package/dist/cjs/constants.js +1 -1
- package/dist/cjs/dashboard-BiCB2A6S.js +96 -0
- package/dist/cjs/dashboard-BiCB2A6S.js.map +1 -0
- package/dist/cjs/{exportChannel-D1Wls92m.js → exportChannel-BL2RGGhP.js} +16 -18
- package/dist/cjs/{exportChannel-D1Wls92m.js.map → exportChannel-BL2RGGhP.js.map} +1 -1
- package/dist/cjs/getAddressElementOptions.js +1 -1
- package/dist/cjs/getAmountInLargestCurrencyUnit.js +1 -1
- package/dist/cjs/getAmountInSmallestCurrencyUnit.js +1 -1
- package/dist/cjs/getAmountWithAppliedTax.js +1 -1
- package/dist/cjs/getFormattedAmount.js +1 -1
- package/dist/cjs/getFormattedDiscountedAmount.js +1 -1
- package/dist/cjs/getFormattedDiscountedPercentage.js +1 -1
- package/dist/cjs/getFormattedTaxAmount.js +1 -1
- package/dist/cjs/getFormattedTipAmount.js +1 -1
- package/dist/cjs/getQrCodeValue.js +1 -1
- package/dist/cjs/getTaxAmount.js +1 -1
- package/dist/cjs/getTipAmount.js +1 -1
- package/dist/cjs/hasAmountToPay.js +1 -1
- package/dist/cjs/index-D6V3Vofs.js +855 -0
- package/dist/cjs/{index-CZ_VFGNj.js.map → index-D6V3Vofs.js.map} +1 -1
- package/dist/cjs/index.js +14 -20
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/{queryConstants-Cka1X6GX.js → queryConstants-Dc6wh21D.js} +2 -2
- package/dist/cjs/{queryConstants-Cka1X6GX.js.map → queryConstants-Dc6wh21D.js.map} +1 -1
- package/dist/cjs/renderFunctions-DhCwlBWw.js +48 -0
- package/dist/cjs/renderFunctions-DhCwlBWw.js.map +1 -0
- package/dist/cjs/useAccountsApi-B2MZWHMY.js +42 -0
- package/dist/cjs/useAccountsApi-B2MZWHMY.js.map +1 -0
- package/dist/cjs/useIntegrationsApi-CVlTmLKc.js +20 -0
- package/dist/cjs/{useIntegrationsApi-BO9PhVVO.js.map → useIntegrationsApi-CVlTmLKc.js.map} +1 -1
- package/dist/cjs/usePaymentApi-BCE_Ql18.js +29 -0
- package/dist/cjs/usePaymentApi-BCE_Ql18.js.map +1 -0
- package/dist/cjs/usePaymentApi-Bl8jWvnG.js +44 -0
- package/dist/cjs/usePaymentApi-Bl8jWvnG.js.map +1 -0
- package/dist/cjs/usePaymentApi-CiwXBe90.js +29 -0
- package/dist/cjs/{usePaymentApi-BE8xfY-U.js.map → usePaymentApi-CiwXBe90.js.map} +1 -1
- package/dist/cjs/usePlatformApi-CcGVG4Qi.js +55 -0
- package/dist/cjs/{usePlatformApi-C7lXP6ev.js.map → usePlatformApi-CcGVG4Qi.js.map} +1 -1
- package/dist/cjs/useRazorpayPayment.js +48 -73
- package/dist/cjs/useRazorpayPayment.js.map +1 -1
- package/dist/cjs/useStripePromise.js +22 -48
- package/dist/cjs/useStripePromise.js.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/dashboard-CwvqEeOl.js +90 -0
- package/dist/dashboard-CwvqEeOl.js.map +1 -0
- package/dist/{exportChannel-DAxJ44QB.js → exportChannel-Db0U5gc1.js} +16 -18
- package/dist/{exportChannel-DAxJ44QB.js.map → exportChannel-Db0U5gc1.js.map} +1 -1
- package/dist/getAddressElementOptions.js +1 -1
- package/dist/getAmountInLargestCurrencyUnit.js +1 -1
- package/dist/getAmountInSmallestCurrencyUnit.js +1 -1
- package/dist/getAmountWithAppliedTax.js +1 -1
- package/dist/getFormattedAmount.js +1 -1
- package/dist/getFormattedDiscountedAmount.js +1 -1
- package/dist/getFormattedDiscountedPercentage.js +1 -1
- package/dist/getFormattedTaxAmount.js +1 -1
- package/dist/getFormattedTipAmount.js +1 -1
- package/dist/getQrCodeValue.js +1 -1
- package/dist/getTaxAmount.js +1 -1
- package/dist/getTipAmount.js +1 -1
- package/dist/hasAmountToPay.js +1 -1
- package/dist/index-CNouM9_z.js +804 -0
- package/dist/{index-C7irWceQ.js.map → index-CNouM9_z.js.map} +1 -1
- package/dist/index.js +14 -20
- package/dist/index.js.map +1 -1
- package/dist/{queryConstants-DFKKEEo0.js → queryConstants-C7AqdemO.js} +2 -2
- package/dist/{queryConstants-DFKKEEo0.js.map → queryConstants-C7AqdemO.js.map} +1 -1
- package/dist/renderFunctions-Bx5nzyE_.js +44 -0
- package/dist/renderFunctions-Bx5nzyE_.js.map +1 -0
- package/dist/useAccountsApi-C9_eNmEZ.js +38 -0
- package/dist/useAccountsApi-C9_eNmEZ.js.map +1 -0
- package/dist/useIntegrationsApi-D9eA_FrB.js +18 -0
- package/dist/{useIntegrationsApi-D1bkKtoy.js.map → useIntegrationsApi-D9eA_FrB.js.map} +1 -1
- package/dist/usePaymentApi-B98qoM7U.js +26 -0
- package/dist/usePaymentApi-B98qoM7U.js.map +1 -0
- package/dist/usePaymentApi-DMHHdCK1.js +41 -0
- package/dist/usePaymentApi-DMHHdCK1.js.map +1 -0
- package/dist/usePaymentApi-DSlW_EBq.js +27 -0
- package/dist/{usePaymentApi-DcMNbOMk.js.map → usePaymentApi-DSlW_EBq.js.map} +1 -1
- package/dist/usePlatformApi-sJUY6wju.js +50 -0
- package/dist/{usePlatformApi-Di7Dg-Gn.js.map → usePlatformApi-sJUY6wju.js.map} +1 -1
- package/dist/useRazorpayPayment.js +48 -73
- package/dist/useRazorpayPayment.js.map +1 -1
- package/dist/useStripePromise.js +22 -48
- package/dist/useStripePromise.js.map +1 -1
- package/package.json +1 -1
- package/dist/CopyButtonWrapper-rv-OaINx.js.map +0 -1
- package/dist/ExportModal-CxKyrlwf.js +0 -120
- package/dist/ExportModal-CxKyrlwf.js.map +0 -1
- package/dist/cjs/CopyButtonWrapper-BkpN0Wmd.js.map +0 -1
- package/dist/cjs/ExportModal-DxCzPCh0.js +0 -122
- package/dist/cjs/ExportModal-DxCzPCh0.js.map +0 -1
- package/dist/cjs/dashboard-DKHencVn.js +0 -110
- package/dist/cjs/dashboard-DKHencVn.js.map +0 -1
- package/dist/cjs/index-CZ_VFGNj.js +0 -899
- package/dist/cjs/renderFunctions-CX_K4qf8.js +0 -51
- package/dist/cjs/renderFunctions-CX_K4qf8.js.map +0 -1
- package/dist/cjs/useAccountsApi-DC617yB4.js +0 -62
- package/dist/cjs/useAccountsApi-DC617yB4.js.map +0 -1
- package/dist/cjs/useIntegrationsApi-BO9PhVVO.js +0 -26
- package/dist/cjs/usePaymentApi-BE8xfY-U.js +0 -39
- package/dist/cjs/usePaymentApi-C9aQhuda.js +0 -56
- package/dist/cjs/usePaymentApi-C9aQhuda.js.map +0 -1
- package/dist/cjs/usePaymentApi-CrKom4eT.js +0 -41
- package/dist/cjs/usePaymentApi-CrKom4eT.js.map +0 -1
- package/dist/cjs/usePlatformApi-C7lXP6ev.js +0 -84
- package/dist/dashboard-ClEN2ygs.js +0 -104
- package/dist/dashboard-ClEN2ygs.js.map +0 -1
- package/dist/index-C7irWceQ.js +0 -848
- package/dist/renderFunctions-D9sAy3V_.js +0 -47
- package/dist/renderFunctions-D9sAy3V_.js.map +0 -1
- package/dist/useAccountsApi-DPem_UA-.js +0 -58
- package/dist/useAccountsApi-DPem_UA-.js.map +0 -1
- package/dist/useIntegrationsApi-D1bkKtoy.js +0 -24
- package/dist/usePaymentApi-BV0jXF-6.js +0 -38
- package/dist/usePaymentApi-BV0jXF-6.js.map +0 -1
- package/dist/usePaymentApi-DHARy-kC.js +0 -53
- package/dist/usePaymentApi-DHARy-kC.js.map +0 -1
- package/dist/usePaymentApi-DcMNbOMk.js +0 -37
- package/dist/usePlatformApi-Di7Dg-Gn.js +0 -79
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
-
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
5
|
-
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
6
3
|
var react = require('react');
|
|
7
4
|
var constants$1 = require('neetocommons/constants');
|
|
8
5
|
var utils = require('neetocommons/utils');
|
|
@@ -10,23 +7,24 @@ var neetoFiltersFrontend = require('@bigbinary/neeto-filters-frontend');
|
|
|
10
7
|
var neetoui = require('@bigbinary/neetoui');
|
|
11
8
|
var ramda = require('ramda');
|
|
12
9
|
var reactRouterDom = require('react-router-dom');
|
|
13
|
-
var ExportModal = require('./ExportModal-
|
|
10
|
+
var ExportModal = require('./ExportModal-DE-VcN1X.js');
|
|
14
11
|
var reactQuery = require('@tanstack/react-query');
|
|
15
12
|
var reactUtils = require('neetocommons/react-utils');
|
|
16
13
|
var axios = require('axios');
|
|
17
|
-
var constants = require('./index-
|
|
18
|
-
var queryConstants = require('./queryConstants-
|
|
14
|
+
var constants = require('./index-D6V3Vofs.js');
|
|
15
|
+
var queryConstants = require('./queryConstants-Dc6wh21D.js');
|
|
19
16
|
var formik = require('@bigbinary/neetoui/formik');
|
|
20
17
|
var reactI18next = require('react-i18next');
|
|
21
18
|
var i18next = require('i18next');
|
|
22
19
|
var yup = require('yup');
|
|
20
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
23
21
|
var neetocist = require('neetocist');
|
|
24
22
|
var Columns = require('@bigbinary/neeto-molecules/Columns');
|
|
25
23
|
var TableWrapper = require('@bigbinary/neeto-molecules/TableWrapper');
|
|
26
|
-
var exportChannel = require('./exportChannel-
|
|
24
|
+
var exportChannel = require('./exportChannel-BL2RGGhP.js');
|
|
27
25
|
var HelpPopover = require('@bigbinary/neeto-molecules/HelpPopover');
|
|
28
26
|
var DateFormat = require('@bigbinary/neeto-molecules/DateFormat');
|
|
29
|
-
var CopyButtonWrapper = require('./CopyButtonWrapper-
|
|
27
|
+
var CopyButtonWrapper = require('./CopyButtonWrapper-I-kdKiiB.js');
|
|
30
28
|
var Header = require('@bigbinary/neeto-molecules/Header');
|
|
31
29
|
var SubHeader = require('@bigbinary/neeto-molecules/SubHeader');
|
|
32
30
|
require('@bigbinary/neeto-icons');
|
|
@@ -52,63 +50,46 @@ function _interopNamespaceDefault(e) {
|
|
|
52
50
|
|
|
53
51
|
var yup__namespace = /*#__PURE__*/_interopNamespaceDefault(yup);
|
|
54
52
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
var splitTransfersApi = {
|
|
69
|
-
list: list,
|
|
70
|
-
show: show,
|
|
71
|
-
bulkUpdate: bulkUpdate
|
|
53
|
+
const list = payload => axios.get(`${constants.BASE_URL}/api/v1/split_transfers`, {
|
|
54
|
+
params: payload
|
|
55
|
+
});
|
|
56
|
+
const show = id => axios.get(`${constants.BASE_URL}/api/v1/split_transfers/${id}`);
|
|
57
|
+
const bulkUpdate = payload => axios.post(`${constants.BASE_URL}/api/v1/split_transfers/bulk_update`, {
|
|
58
|
+
splitTransfer: payload
|
|
59
|
+
});
|
|
60
|
+
const splitTransfersApi = {
|
|
61
|
+
list,
|
|
62
|
+
show,
|
|
63
|
+
bulkUpdate
|
|
72
64
|
};
|
|
73
65
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
queryKey: [queryConstants.QUERY_KEYS.SPLIT_TRANSFERS_DETAILS, id],
|
|
89
|
-
queryFn: function queryFn() {
|
|
90
|
-
return splitTransfersApi.show(id);
|
|
91
|
-
}
|
|
92
|
-
}, options));
|
|
93
|
-
};
|
|
94
|
-
var useBulkUpdateSplitTransfers = function useBulkUpdateSplitTransfers(options) {
|
|
95
|
-
return reactUtils.useMutationWithInvalidation(splitTransfersApi.bulkUpdate, _objectSpread$2({
|
|
96
|
-
keysToInvalidate: [queryConstants.QUERY_KEYS.SPLIT_TRANSFERS_LISTw]
|
|
97
|
-
}, options));
|
|
98
|
-
};
|
|
66
|
+
const useFetchSplitTransfers = (payload = {}, options = {}) => reactQuery.useQuery({
|
|
67
|
+
queryKey: [queryConstants.QUERY_KEYS.SPLIT_TRANSFERS_LIST, payload],
|
|
68
|
+
queryFn: () => splitTransfersApi.list(payload),
|
|
69
|
+
...options
|
|
70
|
+
});
|
|
71
|
+
const useShowSplitTransfers = (id, options) => reactQuery.useQuery({
|
|
72
|
+
queryKey: [queryConstants.QUERY_KEYS.SPLIT_TRANSFERS_DETAILS, id],
|
|
73
|
+
queryFn: () => splitTransfersApi.show(id),
|
|
74
|
+
...options
|
|
75
|
+
});
|
|
76
|
+
const useBulkUpdateSplitTransfers = options => reactUtils.useMutationWithInvalidation(splitTransfersApi.bulkUpdate, {
|
|
77
|
+
keysToInvalidate: [queryConstants.QUERY_KEYS.SPLIT_TRANSFERS_LISTw],
|
|
78
|
+
...options
|
|
79
|
+
});
|
|
99
80
|
|
|
100
|
-
|
|
81
|
+
const SPLIT_TRANSFERS_DASHBOARD_TAB = {
|
|
101
82
|
all: "all",
|
|
102
83
|
successful: "successful",
|
|
103
84
|
cancelled: "cancelled",
|
|
104
85
|
pending: "pending"
|
|
105
86
|
};
|
|
106
|
-
|
|
87
|
+
const SEARCH_PROPS = {
|
|
107
88
|
node: "identifier,",
|
|
108
89
|
key: "search_term",
|
|
109
90
|
model: "NeetoPaymentsEngine::Payments::Split,"
|
|
110
91
|
};
|
|
111
|
-
|
|
92
|
+
const FILTER_COLUMNS = [{
|
|
112
93
|
key: "amount",
|
|
113
94
|
label: i18next.t("neetoPayments.common.amount"),
|
|
114
95
|
node: "amount",
|
|
@@ -119,905 +100,963 @@ var FILTER_COLUMNS = [{
|
|
|
119
100
|
node: "payment_at",
|
|
120
101
|
type: "date"
|
|
121
102
|
}];
|
|
122
|
-
|
|
103
|
+
const INITIAL_TRANSFER_DETAILS = {
|
|
123
104
|
id: null,
|
|
124
105
|
isPaneOpen: false
|
|
125
106
|
};
|
|
126
|
-
|
|
107
|
+
const VALIDATION_SCHEMA = yup__namespace.object().shape({
|
|
127
108
|
reason: yup__namespace.string().required(i18next.t("neetoPayments.cancelSplitTransfers.reasonRequired"))
|
|
128
109
|
});
|
|
129
110
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
111
|
+
const CancelModal = ({
|
|
112
|
+
isOpen,
|
|
113
|
+
onClose,
|
|
114
|
+
handleSplitTransfersUpdate
|
|
115
|
+
}) => {
|
|
116
|
+
const {
|
|
117
|
+
t
|
|
118
|
+
} = reactI18next.useTranslation();
|
|
119
|
+
const handleSubmit = ({
|
|
120
|
+
reason
|
|
121
|
+
}) => {
|
|
138
122
|
handleSplitTransfersUpdate("cancelled", reason);
|
|
139
123
|
};
|
|
140
|
-
return /*#__PURE__*/
|
|
141
|
-
isOpen
|
|
142
|
-
onClose
|
|
143
|
-
size: "large"
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
124
|
+
return /*#__PURE__*/jsxRuntime.jsxs(neetoui.Modal, {
|
|
125
|
+
isOpen,
|
|
126
|
+
onClose,
|
|
127
|
+
size: "large",
|
|
128
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoui.Modal.Header, {
|
|
129
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
130
|
+
style: "h2",
|
|
131
|
+
weight: "medium",
|
|
132
|
+
children: t("neetoPayments.cancelSplitTransfers.modal.title")
|
|
133
|
+
})
|
|
134
|
+
}), /*#__PURE__*/jsxRuntime.jsx(formik.Form, {
|
|
135
|
+
formikProps: {
|
|
136
|
+
initialValues: {
|
|
137
|
+
reason: ""
|
|
138
|
+
},
|
|
139
|
+
validationSchema: VALIDATION_SCHEMA,
|
|
140
|
+
onSubmit: handleSubmit
|
|
151
141
|
},
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
142
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
143
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoui.Modal.Body, {
|
|
144
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
145
|
+
className: "flex flex-col space-y-4",
|
|
146
|
+
children: /*#__PURE__*/jsxRuntime.jsx(formik.Textarea, {
|
|
147
|
+
required: true,
|
|
148
|
+
label: t("neetoPayments.cancelSplitTransfers.modal.reason"),
|
|
149
|
+
name: "reason"
|
|
150
|
+
})
|
|
151
|
+
})
|
|
152
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Modal.Footer, {
|
|
153
|
+
children: /*#__PURE__*/jsxRuntime.jsx(formik.ActionBlock, {
|
|
154
|
+
position: "right",
|
|
155
|
+
cancelButtonProps: {
|
|
156
|
+
onClick: onClose,
|
|
157
|
+
style: "tertiary"
|
|
158
|
+
},
|
|
159
|
+
submitButtonProps: {
|
|
160
|
+
disabled: false,
|
|
161
|
+
label: t("neetoPayments.common.submit")
|
|
162
|
+
}
|
|
163
|
+
})
|
|
164
|
+
})]
|
|
165
|
+
})
|
|
166
|
+
})]
|
|
167
|
+
});
|
|
172
168
|
};
|
|
173
169
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
t
|
|
180
|
-
|
|
170
|
+
const Status = ({
|
|
171
|
+
type,
|
|
172
|
+
status = ""
|
|
173
|
+
}) => {
|
|
174
|
+
const {
|
|
175
|
+
t
|
|
176
|
+
} = reactI18next.useTranslation();
|
|
177
|
+
const processedStatus = constants.preProcessStatus(type, status);
|
|
181
178
|
if (neetocist.isNotPresent(status)) {
|
|
182
|
-
return /*#__PURE__*/
|
|
183
|
-
style: "body2"
|
|
184
|
-
|
|
179
|
+
return /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
180
|
+
style: "body2",
|
|
181
|
+
children: t("neetoPayments.common.notAvailable")
|
|
182
|
+
});
|
|
185
183
|
}
|
|
186
|
-
return /*#__PURE__*/
|
|
187
|
-
content: t(
|
|
188
|
-
position: "top"
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
184
|
+
return /*#__PURE__*/jsxRuntime.jsx(neetoui.Tooltip, {
|
|
185
|
+
content: t(`neetoPayments.tooltipContent.${type}.${processedStatus}`),
|
|
186
|
+
position: "top",
|
|
187
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
188
|
+
className: "w-fit",
|
|
189
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoui.Tag, {
|
|
190
|
+
style: constants.getTagStyle(processedStatus),
|
|
191
|
+
label: neetocist.humanize(t(`neetoPayments.tagLabels.${type}.${processedStatus}`))
|
|
192
|
+
})
|
|
193
|
+
})
|
|
194
|
+
});
|
|
195
195
|
};
|
|
196
196
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
t
|
|
197
|
+
const Date = ({
|
|
198
|
+
date,
|
|
199
|
+
isTimeVisible = false
|
|
200
|
+
}) => {
|
|
201
|
+
const {
|
|
202
|
+
t
|
|
203
|
+
} = reactI18next.useTranslation();
|
|
203
204
|
if (neetocist.isNotPresent(date)) {
|
|
204
|
-
return /*#__PURE__*/
|
|
205
|
-
style: "body2"
|
|
206
|
-
|
|
205
|
+
return /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
206
|
+
style: "body2",
|
|
207
|
+
children: t("neetoPayments.common.notAvailable")
|
|
208
|
+
});
|
|
207
209
|
}
|
|
208
210
|
if (isTimeVisible) {
|
|
209
|
-
return /*#__PURE__*/
|
|
210
|
-
className: "flex items-center"
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
211
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
212
|
+
className: "flex items-center",
|
|
213
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DateFormat.DateTime, {
|
|
214
|
+
date
|
|
215
|
+
})
|
|
216
|
+
});
|
|
214
217
|
}
|
|
215
|
-
return /*#__PURE__*/
|
|
216
|
-
className: "flex items-center"
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
219
|
+
className: "flex items-center",
|
|
220
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DateFormat.Date, {
|
|
221
|
+
date
|
|
222
|
+
})
|
|
223
|
+
});
|
|
220
224
|
};
|
|
221
225
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
226
|
+
const DiscountCode = ({
|
|
227
|
+
discountCode,
|
|
228
|
+
currency
|
|
229
|
+
}) => {
|
|
230
|
+
const {
|
|
231
|
+
t
|
|
232
|
+
} = reactI18next.useTranslation();
|
|
233
|
+
const {
|
|
234
|
+
code,
|
|
235
|
+
value,
|
|
236
|
+
kind
|
|
237
|
+
} = discountCode;
|
|
238
|
+
return /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
239
|
+
style: "body2",
|
|
240
|
+
children: kind === "percentage" ? t("neetoPayments.splitTransferDetails.discountCodeOfPercentageApplied", {
|
|
241
|
+
code,
|
|
242
|
+
percentage: value.toFixed(1)
|
|
243
|
+
}) : t("neetoPayments.splitTransferDetails.discountCodeOfAmountApplied", {
|
|
244
|
+
code,
|
|
245
|
+
amount: utils.currencyFormat.withSymbol(value, currency.toUpperCase(), {
|
|
246
|
+
maximumFractionDigits: 2,
|
|
247
|
+
minimumFractionDigits: 2
|
|
248
|
+
})
|
|
240
249
|
})
|
|
241
|
-
})
|
|
250
|
+
});
|
|
242
251
|
};
|
|
243
252
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
t
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
253
|
+
const Details = ({
|
|
254
|
+
selectedTransfer,
|
|
255
|
+
setSelectedTransfer
|
|
256
|
+
}) => {
|
|
257
|
+
const {
|
|
258
|
+
t
|
|
259
|
+
} = reactI18next.useTranslation();
|
|
260
|
+
const {
|
|
261
|
+
isPending,
|
|
262
|
+
data: {
|
|
263
|
+
splitTransfer
|
|
264
|
+
} = {}
|
|
265
|
+
} = useShowSplitTransfers(selectedTransfer["id"], {
|
|
266
|
+
enabled: neetocist.isPresent(selectedTransfer["id"])
|
|
267
|
+
});
|
|
268
|
+
return /*#__PURE__*/jsxRuntime.jsxs(neetoui.Pane, {
|
|
258
269
|
isOpen: selectedTransfer["isPaneOpen"],
|
|
259
270
|
size: "large",
|
|
260
|
-
onClose:
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
271
|
+
onClose: () => setSelectedTransfer(ramda.mergeLeft({
|
|
272
|
+
isPaneOpen: false
|
|
273
|
+
}, selectedTransfer)),
|
|
274
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoui.Pane.Header, {
|
|
275
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
276
|
+
style: "h2",
|
|
277
|
+
children: t("neetoPayments.splitTransferDetails.title")
|
|
278
|
+
})
|
|
279
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Pane.Body, {
|
|
280
|
+
children: isPending ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
281
|
+
className: "flex h-full w-full items-center justify-center",
|
|
282
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoui.Spinner, {})
|
|
283
|
+
}) : /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
284
|
+
className: "space-y-4 p-3",
|
|
285
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
286
|
+
className: "flex grid-cols-2 flex-col gap-3 lg:grid",
|
|
287
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
288
|
+
style: "body1",
|
|
289
|
+
weight: "medium",
|
|
290
|
+
children: t("neetoPayments.common.identifier")
|
|
291
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Button, {
|
|
292
|
+
href: splitTransfer.transferUrl,
|
|
293
|
+
label: splitTransfer.identifier,
|
|
294
|
+
size: "small",
|
|
295
|
+
style: "link",
|
|
296
|
+
target: "_blank"
|
|
297
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
298
|
+
style: "body1",
|
|
299
|
+
weight: "medium",
|
|
300
|
+
children: t("neetoPayments.common.status")
|
|
301
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Status, {
|
|
302
|
+
status: splitTransfer.status,
|
|
303
|
+
type: "splitTransfers"
|
|
304
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
305
|
+
style: "body1",
|
|
306
|
+
weight: "medium",
|
|
307
|
+
children: t("neetoPayments.common.transferTime")
|
|
308
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Date, {
|
|
309
|
+
isTimeVisible: true,
|
|
310
|
+
date: splitTransfer.paymentAt
|
|
311
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
312
|
+
style: "body1",
|
|
313
|
+
weight: "medium",
|
|
314
|
+
children: t("neetoPayments.common.paymentAmount")
|
|
315
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
316
|
+
style: "body2",
|
|
317
|
+
children: utils.currencyFormat.withCode(splitTransfer.sourcePayment?.amount, splitTransfer.currency?.toUpperCase())
|
|
318
|
+
}), neetocist.isPresent(splitTransfer.discountCode) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
319
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
320
|
+
style: "body1",
|
|
321
|
+
weight: "medium",
|
|
322
|
+
children: t("neetoPayments.common.discountCode")
|
|
323
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DiscountCode, {
|
|
324
|
+
currency: splitTransfer.currency,
|
|
325
|
+
discountCode: splitTransfer.discountCode
|
|
326
|
+
})]
|
|
327
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
328
|
+
className: "flex items-center space-x-1",
|
|
329
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
330
|
+
style: "body1",
|
|
331
|
+
weight: "medium",
|
|
332
|
+
children: t("neetoPayments.common.netAmount")
|
|
333
|
+
}), /*#__PURE__*/jsxRuntime.jsx(HelpPopover, {
|
|
334
|
+
popoverProps: {
|
|
335
|
+
position: "right"
|
|
336
|
+
},
|
|
337
|
+
description: t("neetoPayments.splitTransferDetails.netAmountDescription"),
|
|
338
|
+
title: t("neetoPayments.splitTransferDetails.netAmountHelpTitle")
|
|
339
|
+
})]
|
|
340
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
341
|
+
style: "body2",
|
|
342
|
+
children: utils.currencyFormat.withCode(splitTransfer.sourcePayment?.netAmount, splitTransfer.currency?.toUpperCase())
|
|
343
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
344
|
+
className: "flex space-x-1",
|
|
345
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
346
|
+
style: "body1",
|
|
347
|
+
weight: "medium",
|
|
348
|
+
children: t("neetoPayments.common.platformShare")
|
|
349
|
+
}), /*#__PURE__*/jsxRuntime.jsx(HelpPopover, {
|
|
350
|
+
popoverProps: {
|
|
351
|
+
position: "right"
|
|
352
|
+
},
|
|
353
|
+
description: t("neetoPayments.splitTransferDetails.platformShareDescription"),
|
|
354
|
+
title: t("neetoPayments.splitTransferDetails.platformShareHelpTitle")
|
|
355
|
+
})]
|
|
356
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
357
|
+
style: "body2",
|
|
358
|
+
children: utils.currencyFormat.withCode(splitTransfer.platformShare, splitTransfer.currency?.toUpperCase())
|
|
359
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
360
|
+
style: "body1",
|
|
361
|
+
weight: "medium",
|
|
362
|
+
children: t("neetoPayments.common.transferredAmount")
|
|
363
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
364
|
+
style: "body2",
|
|
365
|
+
children: utils.currencyFormat.withCode(splitTransfer.amount, splitTransfer.currency?.toUpperCase())
|
|
366
|
+
})]
|
|
367
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
368
|
+
style: "h3",
|
|
369
|
+
children: t("neetoPayments.splitTransferDetails.destinationDetails")
|
|
370
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
371
|
+
className: "flex grid-cols-2 flex-col gap-3 lg:grid",
|
|
372
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
373
|
+
style: "body1",
|
|
374
|
+
weight: "medium",
|
|
375
|
+
children: t("neetoPayments.common.destinationAccountIdentifier")
|
|
376
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Button, {
|
|
377
|
+
href: splitTransfer.destinationAccount.dashboardUrl,
|
|
378
|
+
label: splitTransfer.destinationAccount.identifier,
|
|
379
|
+
size: "small",
|
|
380
|
+
style: "link",
|
|
381
|
+
target: "_blank"
|
|
382
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
383
|
+
style: "body1",
|
|
384
|
+
weight: "medium",
|
|
385
|
+
children: t("neetoPayments.common.destinationAccountName")
|
|
386
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
387
|
+
style: "body2",
|
|
388
|
+
children: splitTransfer.destinationAccount.userName
|
|
389
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
390
|
+
style: "body1",
|
|
391
|
+
weight: "medium",
|
|
392
|
+
children: t("neetoPayments.common.destinationAccountEmail")
|
|
393
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
394
|
+
style: "body2",
|
|
395
|
+
children: splitTransfer.destinationAccount.userEmail
|
|
396
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
397
|
+
style: "body1",
|
|
398
|
+
weight: "medium",
|
|
399
|
+
children: t("neetoPayments.common.payoutStatus")
|
|
400
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Status, {
|
|
401
|
+
status: splitTransfer.destinationPayout?.status,
|
|
402
|
+
type: "payout"
|
|
403
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
404
|
+
style: "body1",
|
|
405
|
+
weight: "medium",
|
|
406
|
+
children: t("neetoPayments.splitTransferDetails.payoutInitiatedDate")
|
|
407
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Date, {
|
|
408
|
+
date: splitTransfer.destinationPayout?.createdAt
|
|
409
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
410
|
+
style: "body1",
|
|
411
|
+
weight: "medium",
|
|
412
|
+
children: t("neetoPayments.splitTransferDetails.payoutArrivalDate")
|
|
413
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Date, {
|
|
414
|
+
date: splitTransfer.destinationPayout?.arrivalDate
|
|
415
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {})]
|
|
416
|
+
})]
|
|
417
|
+
})
|
|
418
|
+
})]
|
|
419
|
+
});
|
|
376
420
|
};
|
|
377
421
|
|
|
378
|
-
|
|
379
|
-
|
|
422
|
+
const renderIdentifier = ramda.curry((setSelectedTransfer, identifier, {
|
|
423
|
+
id
|
|
424
|
+
}) => {
|
|
380
425
|
if (neetocist.isNotPresent(identifier)) {
|
|
381
|
-
return /*#__PURE__*/
|
|
426
|
+
return /*#__PURE__*/jsxRuntime.jsx(neetoui.Tooltip, {
|
|
382
427
|
content: i18next.t("neetoPayments.tooltipContent.identifierUnavailable"),
|
|
383
|
-
position: "top"
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
428
|
+
position: "top",
|
|
429
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
430
|
+
className: "text-center",
|
|
431
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
432
|
+
style: "body2",
|
|
433
|
+
children: i18next.t("neetoPayments.common.notAvailable")
|
|
434
|
+
})
|
|
435
|
+
})
|
|
436
|
+
});
|
|
389
437
|
}
|
|
390
|
-
return /*#__PURE__*/
|
|
391
|
-
content: identifier
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
id: id,
|
|
438
|
+
return /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper.CopyButtonWrapper, {
|
|
439
|
+
content: identifier,
|
|
440
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoui.Button, {
|
|
441
|
+
label: identifier,
|
|
442
|
+
size: "small",
|
|
443
|
+
style: "link",
|
|
444
|
+
onClick: () => setSelectedTransfer({
|
|
445
|
+
id,
|
|
399
446
|
isPaneOpen: true
|
|
400
|
-
})
|
|
401
|
-
}
|
|
402
|
-
})
|
|
447
|
+
})
|
|
448
|
+
})
|
|
449
|
+
});
|
|
403
450
|
});
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
451
|
+
const renderPlatformPaymentIdentifier = ({
|
|
452
|
+
identifier,
|
|
453
|
+
receiptUrl,
|
|
454
|
+
kind
|
|
455
|
+
}) => {
|
|
408
456
|
if (kind === constants.PAYMENT_KIND.temporary) {
|
|
409
|
-
return /*#__PURE__*/
|
|
410
|
-
content: identifier
|
|
411
|
-
|
|
457
|
+
return /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper.CopyButtonWrapper, {
|
|
458
|
+
content: identifier,
|
|
459
|
+
children: identifier
|
|
460
|
+
});
|
|
412
461
|
}
|
|
413
|
-
return /*#__PURE__*/
|
|
414
|
-
content: identifier
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
462
|
+
return /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper.CopyButtonWrapper, {
|
|
463
|
+
content: identifier,
|
|
464
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoui.Button, {
|
|
465
|
+
href: receiptUrl,
|
|
466
|
+
label: identifier,
|
|
467
|
+
size: "small",
|
|
468
|
+
style: "link",
|
|
469
|
+
target: "_blank"
|
|
470
|
+
})
|
|
471
|
+
});
|
|
422
472
|
};
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
473
|
+
const renderDestinationAccountIdentifier = ({
|
|
474
|
+
identifier,
|
|
475
|
+
dashboardUrl
|
|
476
|
+
}) => /*#__PURE__*/jsxRuntime.jsx(CopyButtonWrapper.CopyButtonWrapper, {
|
|
477
|
+
content: identifier,
|
|
478
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoui.Button, {
|
|
429
479
|
href: dashboardUrl,
|
|
430
480
|
label: identifier,
|
|
431
481
|
size: "small",
|
|
432
482
|
style: "link",
|
|
433
483
|
target: "_blank"
|
|
434
|
-
})
|
|
435
|
-
};
|
|
436
|
-
var renderStatus = ramda.curry(function (type, status) {
|
|
437
|
-
return /*#__PURE__*/React.createElement(Status, {
|
|
438
|
-
status: status,
|
|
439
|
-
type: type
|
|
440
|
-
});
|
|
484
|
+
})
|
|
441
485
|
});
|
|
442
|
-
|
|
486
|
+
const renderStatus = ramda.curry((type, status) => /*#__PURE__*/jsxRuntime.jsx(Status, {
|
|
487
|
+
status,
|
|
488
|
+
type
|
|
489
|
+
}));
|
|
490
|
+
const renderDate = date => {
|
|
443
491
|
if (neetocist.isNotPresent(date)) {
|
|
444
|
-
return /*#__PURE__*/
|
|
492
|
+
return /*#__PURE__*/jsxRuntime.jsx(neetoui.Tooltip, {
|
|
445
493
|
content: i18next.t("neetoPayments.tooltipContent.dateUnavailable"),
|
|
446
|
-
position: "top"
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
494
|
+
position: "top",
|
|
495
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
496
|
+
className: "text-center",
|
|
497
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
498
|
+
style: "body2",
|
|
499
|
+
children: i18next.t("neetoPayments.common.notAvailable")
|
|
500
|
+
})
|
|
501
|
+
})
|
|
502
|
+
});
|
|
452
503
|
}
|
|
453
|
-
return /*#__PURE__*/
|
|
454
|
-
date
|
|
504
|
+
return /*#__PURE__*/jsxRuntime.jsx(DateFormat.DateTime, {
|
|
505
|
+
date
|
|
455
506
|
});
|
|
456
507
|
};
|
|
457
|
-
|
|
508
|
+
const renderPlatformShare = amount => {
|
|
458
509
|
if (neetocist.isNotPresent(amount)) {
|
|
459
|
-
return /*#__PURE__*/
|
|
510
|
+
return /*#__PURE__*/jsxRuntime.jsx(neetoui.Tooltip, {
|
|
460
511
|
content: i18next.t("neetoPayments.tooltipContent.platformShareUnavailable"),
|
|
461
|
-
position: "top"
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
512
|
+
position: "top",
|
|
513
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
514
|
+
style: "body2",
|
|
515
|
+
children: i18next.t("neetoPayments.common.notCalculated")
|
|
516
|
+
})
|
|
517
|
+
});
|
|
465
518
|
}
|
|
466
519
|
return constants.formatAmount(amount);
|
|
467
520
|
};
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
}];
|
|
540
|
-
};
|
|
521
|
+
const getDefaultColumns = setSelectedTransfer => [{
|
|
522
|
+
title: i18next.t("neetoPayments.common.id"),
|
|
523
|
+
dataIndex: "rowId",
|
|
524
|
+
key: "rowId",
|
|
525
|
+
width: 85,
|
|
526
|
+
position: 0,
|
|
527
|
+
isHidable: false
|
|
528
|
+
}, {
|
|
529
|
+
title: i18next.t("neetoPayments.common.identifier"),
|
|
530
|
+
dataIndex: "identifier",
|
|
531
|
+
key: "identifier",
|
|
532
|
+
width: 300,
|
|
533
|
+
render: renderIdentifier(setSelectedTransfer),
|
|
534
|
+
position: 1,
|
|
535
|
+
isHidable: false
|
|
536
|
+
}, {
|
|
537
|
+
title: i18next.t("neetoPayments.common.status"),
|
|
538
|
+
dataIndex: "status",
|
|
539
|
+
key: "status",
|
|
540
|
+
width: 150,
|
|
541
|
+
render: renderStatus("splitTransfers"),
|
|
542
|
+
sorter: true,
|
|
543
|
+
position: 2,
|
|
544
|
+
isHidable: false
|
|
545
|
+
}, {
|
|
546
|
+
title: i18next.t("neetoPayments.common.amount"),
|
|
547
|
+
dataIndex: "amount",
|
|
548
|
+
key: "amount",
|
|
549
|
+
width: 150,
|
|
550
|
+
sorter: true,
|
|
551
|
+
render: constants.formatAmount,
|
|
552
|
+
position: 3
|
|
553
|
+
}, {
|
|
554
|
+
title: i18next.t("neetoPayments.common.currency"),
|
|
555
|
+
dataIndex: "currency",
|
|
556
|
+
key: "currency",
|
|
557
|
+
width: 160,
|
|
558
|
+
sorter: true,
|
|
559
|
+
render: constants.formatCurrency,
|
|
560
|
+
position: 3
|
|
561
|
+
}, {
|
|
562
|
+
title: i18next.t("neetoPayments.common.platformShare"),
|
|
563
|
+
dataIndex: "platformShare",
|
|
564
|
+
key: "platformShare",
|
|
565
|
+
width: 205,
|
|
566
|
+
render: renderPlatformShare,
|
|
567
|
+
sorter: true,
|
|
568
|
+
position: 3
|
|
569
|
+
}, {
|
|
570
|
+
title: i18next.t("neetoPayments.common.transferTime"),
|
|
571
|
+
dataIndex: "paymentAt",
|
|
572
|
+
key: "paymentAt",
|
|
573
|
+
width: 190,
|
|
574
|
+
render: renderDate,
|
|
575
|
+
sorter: true,
|
|
576
|
+
position: 10
|
|
577
|
+
}, {
|
|
578
|
+
title: i18next.t("neetoPayments.common.platformPayment"),
|
|
579
|
+
dataIndex: "sourcePayment",
|
|
580
|
+
key: "sourcePayment",
|
|
581
|
+
render: renderPlatformPaymentIdentifier,
|
|
582
|
+
width: 300,
|
|
583
|
+
position: 19
|
|
584
|
+
}, {
|
|
585
|
+
title: i18next.t("neetoPayments.common.accountIdentifier"),
|
|
586
|
+
dataIndex: "destinationAccount",
|
|
587
|
+
key: "destinationAccount",
|
|
588
|
+
render: renderDestinationAccountIdentifier,
|
|
589
|
+
width: 320,
|
|
590
|
+
position: 20
|
|
591
|
+
}];
|
|
541
592
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
};
|
|
553
|
-
var buildTableColumns = function buildTableColumns(_ref) {
|
|
554
|
-
var tab = _ref.tab,
|
|
555
|
-
_ref$payableEntityCol = _ref.payableEntityColumns,
|
|
556
|
-
payableEntityColumns = _ref$payableEntityCol === void 0 ? [] : _ref$payableEntityCol,
|
|
557
|
-
setSelectedTransfer = _ref.setSelectedTransfer;
|
|
558
|
-
var filteredColumns = ramda.sortBy(ramda.prop("position"), ramda.concat(getDefaultColumns(setSelectedTransfer), payableEntityColumns));
|
|
593
|
+
const buildSearchProps = (searchProps, searchTerm) => ramda.mergeDeepWith(ramda.concat, SEARCH_PROPS, ramda.mergeLeft({
|
|
594
|
+
value: searchTerm.trim()
|
|
595
|
+
}, searchProps));
|
|
596
|
+
const buildFilterColumns = (payableEntityColumns = []) => ramda.reject(ramda.isNil, ramda.concat(FILTER_COLUMNS, ramda.map(ramda.prop("filterProps"), payableEntityColumns)));
|
|
597
|
+
const buildTableColumns = ({
|
|
598
|
+
tab,
|
|
599
|
+
payableEntityColumns = [],
|
|
600
|
+
setSelectedTransfer
|
|
601
|
+
}) => {
|
|
602
|
+
const filteredColumns = ramda.sortBy(ramda.prop("position"), ramda.concat(getDefaultColumns(setSelectedTransfer), payableEntityColumns));
|
|
559
603
|
if (tab === SPLIT_TRANSFERS_DASHBOARD_TAB.all) return filteredColumns;
|
|
560
604
|
return neetocist.removeBy({
|
|
561
605
|
key: "status"
|
|
562
606
|
}, filteredColumns);
|
|
563
607
|
};
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
});
|
|
572
|
-
});
|
|
573
|
-
};
|
|
608
|
+
const buildRowData = ({
|
|
609
|
+
splitTransfers,
|
|
610
|
+
pageProperties = {}
|
|
611
|
+
}) => splitTransfers?.map((element, index) => ({
|
|
612
|
+
...element,
|
|
613
|
+
rowId: ramda.isEmpty(pageProperties) ? index + 1 : pageProperties.pageSize * (pageProperties.page - 1) + index + 1
|
|
614
|
+
}));
|
|
574
615
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
var getRowSelection = function getRowSelection() {
|
|
616
|
+
const List = ({
|
|
617
|
+
isFetching,
|
|
618
|
+
splitTransfers,
|
|
619
|
+
selectedRows,
|
|
620
|
+
views,
|
|
621
|
+
payableEntityColumns,
|
|
622
|
+
pageProperties,
|
|
623
|
+
onRowSelect,
|
|
624
|
+
setSortProperties,
|
|
625
|
+
handleTablePagination,
|
|
626
|
+
setHasBulkSelectedAllRows
|
|
627
|
+
}) => {
|
|
628
|
+
const [selectedTransfer, setSelectedTransfer] = react.useState(INITIAL_TRANSFER_DETAILS);
|
|
629
|
+
const {
|
|
630
|
+
t
|
|
631
|
+
} = reactI18next.useTranslation();
|
|
632
|
+
const {
|
|
633
|
+
tab = SPLIT_TRANSFERS_DASHBOARD_TAB.all
|
|
634
|
+
} = utils.getQueryParams();
|
|
635
|
+
const splitTransfersCount = views[tab];
|
|
636
|
+
const getRowSelection = () => {
|
|
597
637
|
if (tab === SPLIT_TRANSFERS_DASHBOARD_TAB.successful) return false;
|
|
598
638
|
if (tab === SPLIT_TRANSFERS_DASHBOARD_TAB.all) {
|
|
599
639
|
return {
|
|
600
|
-
getCheckboxProps:
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
};
|
|
604
|
-
}
|
|
640
|
+
getCheckboxProps: record => ({
|
|
641
|
+
disabled: record.status === SPLIT_TRANSFERS_DASHBOARD_TAB.successful
|
|
642
|
+
})
|
|
605
643
|
};
|
|
606
644
|
}
|
|
607
645
|
return true;
|
|
608
646
|
};
|
|
609
|
-
|
|
610
|
-
tab
|
|
611
|
-
payableEntityColumns
|
|
612
|
-
setSelectedTransfer
|
|
647
|
+
const allColumns = buildTableColumns({
|
|
648
|
+
tab,
|
|
649
|
+
payableEntityColumns,
|
|
650
|
+
setSelectedTransfer
|
|
613
651
|
});
|
|
614
|
-
|
|
615
|
-
isTableConfigurationLoading
|
|
616
|
-
customizedColumns
|
|
617
|
-
hideColumn
|
|
618
|
-
|
|
619
|
-
|
|
652
|
+
const {
|
|
653
|
+
isTableConfigurationLoading,
|
|
654
|
+
customizedColumns,
|
|
655
|
+
hideColumn
|
|
656
|
+
} = Columns.useTableConfigurations(`${exportChannel.TABLE_KEYS.SPLIT_TRANSFERS_TABLE}-${tab}`, allColumns);
|
|
657
|
+
const handleTableChange = (_, __, sorter) => {
|
|
658
|
+
setSortProperties(neetocist.isPresent(sorter?.column) ? {
|
|
620
659
|
sortBy: neetocist.camelToSnakeCase(constants.processDataIndex(sorter.field)),
|
|
621
660
|
orderBy: sorter.order === "ascend" ? "ASC" : "DESC"
|
|
622
661
|
} : constants.DEFAULT_SORT_PROPERTIES);
|
|
623
662
|
};
|
|
624
663
|
if (neetocist.isNotPresent(splitTransfers)) {
|
|
625
|
-
return /*#__PURE__*/
|
|
626
|
-
className: "flex h-full w-full items-center justify-center"
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
664
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
665
|
+
className: "flex h-full w-full items-center justify-center",
|
|
666
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoui.NoData, {
|
|
667
|
+
title: tab === SPLIT_TRANSFERS_DASHBOARD_TAB.all ? t("neetoPayments.emptyState.splitTransfers") : t("neetoPayments.emptyState.splitTransfersWithStatus", {
|
|
668
|
+
status: tab
|
|
669
|
+
})
|
|
630
670
|
})
|
|
631
|
-
})
|
|
671
|
+
});
|
|
632
672
|
}
|
|
633
|
-
return /*#__PURE__*/
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
673
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
674
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(TableWrapper, {
|
|
675
|
+
hasPagination: splitTransfersCount > pageProperties?.pageSize,
|
|
676
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoui.Table, {
|
|
677
|
+
onRowSelect,
|
|
678
|
+
fixedHeight: true,
|
|
679
|
+
allowRowClick: false,
|
|
680
|
+
columnData: customizedColumns,
|
|
681
|
+
currentPageNumber: pageProperties?.page,
|
|
682
|
+
handlePageChange: handleTablePagination,
|
|
683
|
+
loading: isFetching || isTableConfigurationLoading,
|
|
684
|
+
rowData: buildRowData({
|
|
685
|
+
splitTransfers,
|
|
686
|
+
pageProperties,
|
|
687
|
+
tab
|
|
688
|
+
}),
|
|
689
|
+
rowSelection: getRowSelection(),
|
|
690
|
+
selectedRowKeys: selectedRows,
|
|
691
|
+
sortDirections: constants.SORT_DIRECTIONS,
|
|
692
|
+
totalCount: splitTransfersCount,
|
|
693
|
+
bulkSelectAllRowsProps: {
|
|
694
|
+
selectAllRowMessage: t("neetoPayments.splitTransferDetails.selectedSplitTransfers", {
|
|
695
|
+
count: selectedRows.length
|
|
696
|
+
}),
|
|
697
|
+
selectAllRowButtonLabel: t("neetoPayments.splitTransferDetails.selectAll", {
|
|
698
|
+
count: views[SPLIT_TRANSFERS_DASHBOARD_TAB.pending]
|
|
699
|
+
}),
|
|
700
|
+
setBulkSelectedAllRows: setHasBulkSelectedAllRows
|
|
701
|
+
},
|
|
702
|
+
paginationProps: {
|
|
703
|
+
showSizeChanger: true,
|
|
704
|
+
hideOnSinglePage: true,
|
|
705
|
+
pageSize: pageProperties?.pageSize,
|
|
706
|
+
total: splitTransfersCount
|
|
707
|
+
},
|
|
708
|
+
onChange: handleTableChange,
|
|
709
|
+
onColumnHide: ({
|
|
710
|
+
key
|
|
711
|
+
}) => hideColumn(key)
|
|
712
|
+
})
|
|
713
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Details, {
|
|
714
|
+
selectedTransfer,
|
|
715
|
+
setSelectedTransfer
|
|
716
|
+
})]
|
|
717
|
+
});
|
|
676
718
|
};
|
|
677
719
|
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
720
|
+
const ResumeModal = ({
|
|
721
|
+
isOpen,
|
|
722
|
+
onClose,
|
|
723
|
+
handleSplitTransfersUpdate
|
|
724
|
+
}) => {
|
|
725
|
+
const {
|
|
726
|
+
t
|
|
727
|
+
} = reactI18next.useTranslation();
|
|
728
|
+
const handleSubmit = ({
|
|
729
|
+
reason
|
|
730
|
+
}) => {
|
|
686
731
|
handleSplitTransfersUpdate("pending", reason);
|
|
687
732
|
};
|
|
688
|
-
return /*#__PURE__*/
|
|
689
|
-
isOpen
|
|
690
|
-
onClose
|
|
691
|
-
size: "large"
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
733
|
+
return /*#__PURE__*/jsxRuntime.jsxs(neetoui.Modal, {
|
|
734
|
+
isOpen,
|
|
735
|
+
onClose,
|
|
736
|
+
size: "large",
|
|
737
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoui.Modal.Header, {
|
|
738
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
739
|
+
style: "h2",
|
|
740
|
+
weight: "medium",
|
|
741
|
+
children: t("neetoPayments.resumeSplitTransfers.modal.title")
|
|
742
|
+
})
|
|
743
|
+
}), /*#__PURE__*/jsxRuntime.jsx(formik.Form, {
|
|
744
|
+
formikProps: {
|
|
745
|
+
initialValues: {
|
|
746
|
+
reason: ""
|
|
747
|
+
},
|
|
748
|
+
validationSchema: VALIDATION_SCHEMA,
|
|
749
|
+
onSubmit: handleSubmit
|
|
699
750
|
},
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
751
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
752
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoui.Modal.Body, {
|
|
753
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
754
|
+
className: "flex flex-col space-y-4",
|
|
755
|
+
children: /*#__PURE__*/jsxRuntime.jsx(formik.Textarea, {
|
|
756
|
+
required: true,
|
|
757
|
+
label: t("neetoPayments.resumeSplitTransfers.modal.reason"),
|
|
758
|
+
name: "reason"
|
|
759
|
+
})
|
|
760
|
+
})
|
|
761
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoui.Modal.Footer, {
|
|
762
|
+
children: /*#__PURE__*/jsxRuntime.jsx(formik.ActionBlock, {
|
|
763
|
+
position: "right",
|
|
764
|
+
cancelButtonProps: {
|
|
765
|
+
onClick: onClose,
|
|
766
|
+
style: "tertiary"
|
|
767
|
+
},
|
|
768
|
+
submitButtonProps: {
|
|
769
|
+
disabled: false,
|
|
770
|
+
label: t("neetoPayments.common.submit")
|
|
771
|
+
}
|
|
772
|
+
})
|
|
773
|
+
})]
|
|
774
|
+
})
|
|
775
|
+
})]
|
|
776
|
+
});
|
|
720
777
|
};
|
|
721
778
|
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
t
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
tab =
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
779
|
+
const {
|
|
780
|
+
Menu,
|
|
781
|
+
MenuItem
|
|
782
|
+
} = neetoui.Dropdown;
|
|
783
|
+
const TopSection = ({
|
|
784
|
+
views,
|
|
785
|
+
filters,
|
|
786
|
+
setIsCancelModalOpen,
|
|
787
|
+
setIsResumeModalOpen,
|
|
788
|
+
selectedRows,
|
|
789
|
+
selectedRowData,
|
|
790
|
+
setFilters,
|
|
791
|
+
hasBulkSelectedAllRows,
|
|
792
|
+
filterableColumns,
|
|
793
|
+
searchKeywordProps,
|
|
794
|
+
payableEntityColumns,
|
|
795
|
+
setIsExportModalOpen
|
|
796
|
+
}) => {
|
|
797
|
+
const [isFilterPaneOpen, setIsFilterPaneOpen] = react.useState(false);
|
|
798
|
+
const {
|
|
799
|
+
t
|
|
800
|
+
} = reactI18next.useTranslation();
|
|
801
|
+
const history = reactRouterDom.useHistory();
|
|
802
|
+
const {
|
|
803
|
+
tab = SPLIT_TRANSFERS_DASHBOARD_TAB.all
|
|
804
|
+
} = utils.getQueryParams();
|
|
805
|
+
const splitTransfersCount = views?.[tab];
|
|
806
|
+
const splitTransfersCountVisible = splitTransfersCount > 0 || splitTransfersCount === 0 && neetocist.isPresent(filters);
|
|
807
|
+
const isFilterButtonVisible = splitTransfersCount || neetocist.isPresent(filters);
|
|
808
|
+
const isDropdownVisible = neetocist.isNotEmpty(selectedRows);
|
|
809
|
+
const isCancelButtonDisabled = neetocist.existsBy({
|
|
752
810
|
status: SPLIT_TRANSFERS_DASHBOARD_TAB.cancelled
|
|
753
811
|
}, selectedRowData);
|
|
754
|
-
|
|
812
|
+
const isResumeButtonDisabled = neetocist.existsBy({
|
|
755
813
|
status: SPLIT_TRANSFERS_DASHBOARD_TAB.pending
|
|
756
814
|
}, selectedRowData);
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
react.startTransition(
|
|
815
|
+
const selectedRecordsCount = hasBulkSelectedAllRows ? splitTransfersCount : selectedRows.length;
|
|
816
|
+
const handleFiltersChange = filters => {
|
|
817
|
+
react.startTransition(() => {
|
|
760
818
|
setFilters(filters);
|
|
761
819
|
});
|
|
762
820
|
};
|
|
763
|
-
|
|
764
|
-
|
|
821
|
+
const handleTabChange = tab => {
|
|
822
|
+
const queryParams = utils.getQueryParams({
|
|
765
823
|
toCamelCase: false
|
|
766
824
|
});
|
|
767
|
-
|
|
768
|
-
tab
|
|
825
|
+
const newParams = {
|
|
826
|
+
tab,
|
|
769
827
|
page: constants$1.DEFAULT_PAGE_INDEX,
|
|
770
828
|
page_size: constants$1.DEFAULT_PAGE_SIZE
|
|
771
829
|
};
|
|
772
830
|
history.push(utils.buildUrl(window.location.pathname, ramda.mergeLeft(newParams, queryParams)));
|
|
773
831
|
};
|
|
774
|
-
return /*#__PURE__*/
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
}), constants.shouldTabsVisible(views) && /*#__PURE__*/React.createElement(neetoui.Tab, null, Object.keys(SPLIT_TRANSFERS_DASHBOARD_TAB).map(function (item) {
|
|
781
|
-
return /*#__PURE__*/React.createElement(neetoui.Tab.Item, {
|
|
782
|
-
active: tab === item,
|
|
783
|
-
key: item,
|
|
784
|
-
onClick: function onClick() {
|
|
785
|
-
return handleTabChange(item);
|
|
832
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
833
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Header, {
|
|
834
|
+
title: t("neetoPayments.title.splitTransfers"),
|
|
835
|
+
searchProps: isFilterButtonVisible && {
|
|
836
|
+
placeholder: searchKeywordProps.placeholder,
|
|
837
|
+
className: "w-96"
|
|
786
838
|
}
|
|
787
|
-
},
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
839
|
+
}), constants.shouldTabsVisible(views) && /*#__PURE__*/jsxRuntime.jsx(neetoui.Tab, {
|
|
840
|
+
children: Object.keys(SPLIT_TRANSFERS_DASHBOARD_TAB).map(item => /*#__PURE__*/jsxRuntime.jsx(neetoui.Tab.Item, {
|
|
841
|
+
active: tab === item,
|
|
842
|
+
onClick: () => handleTabChange(item),
|
|
843
|
+
children: t(`neetoPayments.common.${item}`)
|
|
844
|
+
}, item))
|
|
845
|
+
}), /*#__PURE__*/jsxRuntime.jsx(SubHeader, {
|
|
846
|
+
className: "my-4",
|
|
847
|
+
leftActionBlock: splitTransfersCountVisible && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
848
|
+
className: "w-100 flex items-center space-x-3",
|
|
849
|
+
children: isDropdownVisible ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
850
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
851
|
+
className: "neeto-ui-gray-800 me-2 font-semibold",
|
|
852
|
+
component: "h4",
|
|
853
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
854
|
+
count: selectedRecordsCount,
|
|
855
|
+
i18nKey: "neetoPayments.splitTransferDetails.recordWithCount",
|
|
856
|
+
components: {
|
|
857
|
+
span: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
858
|
+
className: "neeto-ui-text-gray-600"
|
|
859
|
+
})
|
|
860
|
+
},
|
|
861
|
+
values: {
|
|
862
|
+
count: selectedRecordsCount,
|
|
863
|
+
recordsCount: splitTransfersCount
|
|
864
|
+
}
|
|
865
|
+
})
|
|
866
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(neetoui.Dropdown, {
|
|
867
|
+
buttonStyle: "secondary",
|
|
868
|
+
label: t("neetoPayments.common.takeAction"),
|
|
869
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Menu, {
|
|
870
|
+
children: /*#__PURE__*/jsxRuntime.jsx(MenuItem.Button, {
|
|
871
|
+
isDisabled: isCancelButtonDisabled,
|
|
872
|
+
tooltipProps: isCancelButtonDisabled ? {
|
|
873
|
+
content: t("neetoPayments.tooltipContent.splitTransfers.cancelledRecordsSelected")
|
|
874
|
+
} : "",
|
|
875
|
+
onClick: () => setIsCancelModalOpen(true),
|
|
876
|
+
children: t("neetoPayments.common.cancel")
|
|
877
|
+
})
|
|
878
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Menu, {
|
|
879
|
+
children: /*#__PURE__*/jsxRuntime.jsx(MenuItem.Button, {
|
|
880
|
+
isDisabled: isResumeButtonDisabled,
|
|
881
|
+
tooltipProps: isResumeButtonDisabled ? {
|
|
882
|
+
content: t("neetoPayments.tooltipContent.splitTransfers.pendingRecordsSelected")
|
|
883
|
+
} : "",
|
|
884
|
+
onClick: () => setIsResumeModalOpen(true),
|
|
885
|
+
children: t("neetoPayments.common.resume")
|
|
886
|
+
})
|
|
887
|
+
})]
|
|
888
|
+
})]
|
|
889
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(neetoui.Typography, {
|
|
890
|
+
className: "neeto-ui-gray-800 me-2 font-semibold",
|
|
891
|
+
component: "h4",
|
|
892
|
+
children: tab === SPLIT_TRANSFERS_DASHBOARD_TAB.all ? t("neetoPayments.countOf.splitTransfer", {
|
|
893
|
+
count: splitTransfersCount
|
|
894
|
+
}) : t("neetoPayments.countOf.splitTransferWithStatus", {
|
|
895
|
+
count: splitTransfersCount,
|
|
896
|
+
status: tab
|
|
897
|
+
})
|
|
801
898
|
})
|
|
802
|
-
},
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
} : "",
|
|
823
|
-
onClick: function onClick() {
|
|
824
|
-
return setIsResumeModalOpen(true);
|
|
825
|
-
}
|
|
826
|
-
}, t("neetoPayments.common.resume"))))) : /*#__PURE__*/React.createElement(neetoui.Typography, {
|
|
827
|
-
className: "neeto-ui-gray-800 me-2 font-semibold",
|
|
828
|
-
component: "h4"
|
|
829
|
-
}, tab === SPLIT_TRANSFERS_DASHBOARD_TAB.all ? t("neetoPayments.countOf.splitTransfer", {
|
|
830
|
-
count: splitTransfersCount
|
|
831
|
-
}) : t("neetoPayments.countOf.splitTransferWithStatus", {
|
|
832
|
-
count: splitTransfersCount,
|
|
833
|
-
status: tab
|
|
834
|
-
}))),
|
|
835
|
-
rightActionBlock: isFilterButtonVisible && /*#__PURE__*/React.createElement(SubHeader.RightBlock, {
|
|
836
|
-
columnsButtonProps: {
|
|
837
|
-
columnData: buildTableColumns({
|
|
838
|
-
tab: tab,
|
|
839
|
-
payableEntityColumns: payableEntityColumns,
|
|
840
|
-
setSelectedTransfer: function setSelectedTransfer() {}
|
|
841
|
-
}).map(ramda.modify("dataIndex", constants.processDataIndex)),
|
|
842
|
-
fixedColumns: constants.UN_HIDEABLE_COLUMNS,
|
|
843
|
-
tableKey: "".concat(exportChannel.TABLE_KEYS.SPLIT_TRANSFERS_TABLE, "-").concat(tab)
|
|
844
|
-
},
|
|
845
|
-
downloadButtonProps: {
|
|
846
|
-
onClick: function onClick() {
|
|
847
|
-
return setIsExportModalOpen(true);
|
|
899
|
+
}),
|
|
900
|
+
rightActionBlock: isFilterButtonVisible && /*#__PURE__*/jsxRuntime.jsx(SubHeader.RightBlock, {
|
|
901
|
+
columnsButtonProps: {
|
|
902
|
+
columnData: buildTableColumns({
|
|
903
|
+
tab,
|
|
904
|
+
payableEntityColumns,
|
|
905
|
+
setSelectedTransfer: () => {}
|
|
906
|
+
}).map(ramda.modify("dataIndex", constants.processDataIndex)),
|
|
907
|
+
fixedColumns: constants.UN_HIDEABLE_COLUMNS,
|
|
908
|
+
tableKey: `${exportChannel.TABLE_KEYS.SPLIT_TRANSFERS_TABLE}-${tab}`
|
|
909
|
+
},
|
|
910
|
+
downloadButtonProps: {
|
|
911
|
+
onClick: () => setIsExportModalOpen(true)
|
|
912
|
+
},
|
|
913
|
+
filterProps: {
|
|
914
|
+
columns: filterableColumns,
|
|
915
|
+
isOpen: isFilterPaneOpen,
|
|
916
|
+
keyword: searchKeywordProps,
|
|
917
|
+
setIsOpen: setIsFilterPaneOpen,
|
|
918
|
+
onChange: handleFiltersChange
|
|
848
919
|
}
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
})
|
|
858
|
-
}), /*#__PURE__*/React.createElement(neetoFiltersFrontend.Bar, {
|
|
859
|
-
columns: filterableColumns,
|
|
860
|
-
keyword: searchKeywordProps,
|
|
861
|
-
setIsPaneOpen: setIsFilterPaneOpen,
|
|
862
|
-
onChange: handleFiltersChange
|
|
863
|
-
}));
|
|
920
|
+
})
|
|
921
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoFiltersFrontend.Bar, {
|
|
922
|
+
columns: filterableColumns,
|
|
923
|
+
keyword: searchKeywordProps,
|
|
924
|
+
setIsPaneOpen: setIsFilterPaneOpen,
|
|
925
|
+
onChange: handleFiltersChange
|
|
926
|
+
})]
|
|
927
|
+
});
|
|
864
928
|
};
|
|
865
929
|
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
var _getQueryParams2 = utils.getQueryParams(),
|
|
914
|
-
_getQueryParams2$tab = _getQueryParams2.tab,
|
|
915
|
-
tab = _getQueryParams2$tab === void 0 ? SPLIT_TRANSFERS_DASHBOARD_TAB.all : _getQueryParams2$tab;
|
|
916
|
-
var payload = _objectSpread(_objectSpread({
|
|
917
|
-
tab: tab,
|
|
918
|
-
filters: filters
|
|
919
|
-
}, pageProperties), sortProperties);
|
|
920
|
-
var _useFetchSplitTransfe = useFetchSplitTransfers(payload),
|
|
921
|
-
_useFetchSplitTransfe2 = _useFetchSplitTransfe.data,
|
|
922
|
-
_useFetchSplitTransfe3 = _useFetchSplitTransfe2 === void 0 ? {} : _useFetchSplitTransfe2,
|
|
923
|
-
splitTransfers = _useFetchSplitTransfe3.splitTransfers,
|
|
924
|
-
views = _useFetchSplitTransfe3.views,
|
|
925
|
-
isFetching = _useFetchSplitTransfe.isFetching,
|
|
926
|
-
isSplitTransfersLoading = _useFetchSplitTransfe.isPending;
|
|
927
|
-
var _useBulkUpdateSplitTr = useBulkUpdateSplitTransfers({
|
|
928
|
-
onSuccess: function onSuccess() {
|
|
929
|
-
setSelectedRowData([]);
|
|
930
|
-
setSelectedRows([]);
|
|
931
|
-
}
|
|
932
|
-
}),
|
|
933
|
-
updateSplitTransfers = _useBulkUpdateSplitTr.mutate,
|
|
934
|
-
isCancelling = _useBulkUpdateSplitTr.isPending;
|
|
935
|
-
var handleSplitTransfersUpdate = function handleSplitTransfersUpdate(status, reason) {
|
|
936
|
-
var ids = ramda.pluck("id", selectedRowData);
|
|
930
|
+
const SplitTransfersDashboard = ({
|
|
931
|
+
searchProps,
|
|
932
|
+
payableEntityColumns
|
|
933
|
+
}) => {
|
|
934
|
+
const {
|
|
935
|
+
searchTerm = ""
|
|
936
|
+
} = utils.getQueryParams();
|
|
937
|
+
const filterableColumns = buildFilterColumns(payableEntityColumns);
|
|
938
|
+
const searchKeywordProps = buildSearchProps(searchProps, searchTerm);
|
|
939
|
+
const [selectedRows, setSelectedRows] = react.useState([]);
|
|
940
|
+
const [selectedRowData, setSelectedRowData] = react.useState([]);
|
|
941
|
+
const [isExportModalOpen, setIsExportModalOpen] = react.useState(false);
|
|
942
|
+
const [isCancelModalOpen, setIsCancelModalOpen] = react.useState(false);
|
|
943
|
+
const [isResumeModalOpen, setIsResumeModalOpen] = react.useState(false);
|
|
944
|
+
const [hasBulkSelectedAllRows, setHasBulkSelectedAllRows] = react.useState(false);
|
|
945
|
+
const [sortProperties, setSortProperties] = react.useState(constants.DEFAULT_SORT_PROPERTIES);
|
|
946
|
+
const [pageProperties, setPageProperties] = react.useState(constants.DEFAULT_PAGE_VALUES);
|
|
947
|
+
const [filters, setFilters] = react.useState(neetoFiltersFrontend.buildFiltersFromURL([...filterableColumns, searchKeywordProps]));
|
|
948
|
+
const history = reactRouterDom.useHistory();
|
|
949
|
+
const {
|
|
950
|
+
tab = SPLIT_TRANSFERS_DASHBOARD_TAB.all
|
|
951
|
+
} = utils.getQueryParams();
|
|
952
|
+
const payload = {
|
|
953
|
+
tab,
|
|
954
|
+
filters,
|
|
955
|
+
...pageProperties,
|
|
956
|
+
...sortProperties
|
|
957
|
+
};
|
|
958
|
+
const {
|
|
959
|
+
data: {
|
|
960
|
+
splitTransfers,
|
|
961
|
+
views
|
|
962
|
+
} = {},
|
|
963
|
+
isFetching,
|
|
964
|
+
isPending: isSplitTransfersLoading
|
|
965
|
+
} = useFetchSplitTransfers(payload);
|
|
966
|
+
const {
|
|
967
|
+
mutate: updateSplitTransfers,
|
|
968
|
+
isPending: isCancelling
|
|
969
|
+
} = useBulkUpdateSplitTransfers({
|
|
970
|
+
onSuccess: () => {
|
|
971
|
+
setSelectedRowData([]);
|
|
972
|
+
setSelectedRows([]);
|
|
973
|
+
}
|
|
974
|
+
});
|
|
975
|
+
const handleSplitTransfersUpdate = (status, reason) => {
|
|
976
|
+
const ids = ramda.pluck("id", selectedRowData);
|
|
937
977
|
updateSplitTransfers({
|
|
938
|
-
ids
|
|
939
|
-
status
|
|
940
|
-
reason
|
|
978
|
+
ids,
|
|
979
|
+
status,
|
|
980
|
+
reason,
|
|
941
981
|
isApplyChangesToAllRequired: hasBulkSelectedAllRows
|
|
942
982
|
});
|
|
943
983
|
setIsCancelModalOpen(false);
|
|
944
984
|
setIsResumeModalOpen(false);
|
|
945
985
|
};
|
|
946
|
-
|
|
947
|
-
|
|
986
|
+
const handleTablePagination = (page, pageSize) => {
|
|
987
|
+
const queryParams = utils.getQueryParams({
|
|
948
988
|
toCamelCase: false
|
|
949
989
|
});
|
|
950
990
|
history.push(utils.buildUrl(window.location.pathname, ramda.mergeLeft({
|
|
951
|
-
page
|
|
991
|
+
page,
|
|
952
992
|
page_size: pageSize
|
|
953
993
|
}, queryParams)));
|
|
954
994
|
setPageProperties({
|
|
955
|
-
page
|
|
956
|
-
pageSize
|
|
995
|
+
page,
|
|
996
|
+
pageSize
|
|
957
997
|
});
|
|
958
998
|
};
|
|
959
|
-
|
|
999
|
+
const handleRowSelect = (keys, rowData) => {
|
|
960
1000
|
setSelectedRows(keys);
|
|
961
1001
|
setSelectedRowData(rowData);
|
|
962
1002
|
};
|
|
963
|
-
react.useEffect(
|
|
1003
|
+
react.useEffect(() => {
|
|
964
1004
|
handleTablePagination(constants$1.DEFAULT_PAGE_INDEX, constants$1.DEFAULT_PAGE_SIZE);
|
|
965
1005
|
setSortProperties(constants.DEFAULT_SORT_PROPERTIES);
|
|
966
1006
|
setSelectedRowData([]);
|
|
967
1007
|
setSelectedRows([]);
|
|
968
1008
|
}, [filters, tab]);
|
|
969
1009
|
if (isSplitTransfersLoading || isCancelling) {
|
|
970
|
-
return /*#__PURE__*/
|
|
971
|
-
className: "flex h-full w-full items-center justify-center"
|
|
972
|
-
|
|
1010
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1011
|
+
className: "flex h-full w-full items-center justify-center",
|
|
1012
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoui.Spinner, {})
|
|
1013
|
+
});
|
|
973
1014
|
}
|
|
974
|
-
return /*#__PURE__*/
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
}
|
|
1020
|
-
}));
|
|
1015
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1016
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(TopSection, {
|
|
1017
|
+
filterableColumns,
|
|
1018
|
+
filters,
|
|
1019
|
+
hasBulkSelectedAllRows,
|
|
1020
|
+
pageProperties,
|
|
1021
|
+
payableEntityColumns,
|
|
1022
|
+
searchKeywordProps,
|
|
1023
|
+
selectedRowData,
|
|
1024
|
+
selectedRows,
|
|
1025
|
+
setFilters,
|
|
1026
|
+
setIsCancelModalOpen,
|
|
1027
|
+
setIsExportModalOpen,
|
|
1028
|
+
setIsResumeModalOpen,
|
|
1029
|
+
setPageProperties,
|
|
1030
|
+
setSortProperties,
|
|
1031
|
+
views
|
|
1032
|
+
}), /*#__PURE__*/jsxRuntime.jsx(List, {
|
|
1033
|
+
handleTablePagination,
|
|
1034
|
+
isFetching,
|
|
1035
|
+
pageProperties,
|
|
1036
|
+
payableEntityColumns,
|
|
1037
|
+
selectedRows,
|
|
1038
|
+
setHasBulkSelectedAllRows,
|
|
1039
|
+
setSelectedRows,
|
|
1040
|
+
setSortProperties,
|
|
1041
|
+
splitTransfers,
|
|
1042
|
+
views,
|
|
1043
|
+
onRowSelect: handleRowSelect
|
|
1044
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ExportModal.ExportModal, {
|
|
1045
|
+
filters,
|
|
1046
|
+
isExportModalOpen,
|
|
1047
|
+
setIsExportModalOpen,
|
|
1048
|
+
sortProperties,
|
|
1049
|
+
dashboardKind: constants.DASHBOARD_KIND.splitTransfers
|
|
1050
|
+
}), /*#__PURE__*/jsxRuntime.jsx(CancelModal, {
|
|
1051
|
+
handleSplitTransfersUpdate,
|
|
1052
|
+
isOpen: isCancelModalOpen,
|
|
1053
|
+
onClose: () => setIsCancelModalOpen(false)
|
|
1054
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ResumeModal, {
|
|
1055
|
+
handleSplitTransfersUpdate,
|
|
1056
|
+
isOpen: isResumeModalOpen,
|
|
1057
|
+
onClose: () => setIsResumeModalOpen(false)
|
|
1058
|
+
})]
|
|
1059
|
+
});
|
|
1021
1060
|
};
|
|
1022
1061
|
|
|
1023
1062
|
module.exports = SplitTransfersDashboard;
|