@bigbinary/neeto-payments-frontend 3.0.21 → 3.0.23
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/app/javascript/src/translations/en.json +2 -2
- package/dist/AccountsDashboard.js +8 -6
- package/dist/AccountsDashboard.js.map +1 -1
- package/dist/{ExportModal-CYHlSNLI.js → ExportModal-C6-IwFlZ.js} +4 -2
- package/dist/ExportModal-C6-IwFlZ.js.map +1 -0
- package/dist/PaymentsDashboard.js +2 -2
- package/dist/PayoutsDashboard.js +6 -6
- package/dist/PayoutsPage.js +16 -51
- package/dist/PayoutsPage.js.map +1 -1
- package/dist/RazorpayPaymentButton.js +2 -3
- package/dist/RazorpayPaymentButton.js.map +1 -1
- package/dist/RefundsDashboard.js +2 -2
- package/dist/SplitTransfersDashboard.js +3 -3
- package/dist/SplitTransfersDashboard.js.map +1 -1
- package/dist/StripeConnect.js +2 -2
- package/dist/UpiMarkAsPaidButton.js +2 -2
- package/dist/UpiPayment.js +2 -2
- package/dist/buildStripeTransactionLink.js +1 -1
- package/dist/cjs/AccountsDashboard.js +13 -11
- package/dist/cjs/AccountsDashboard.js.map +1 -1
- package/dist/cjs/{ExportModal-DNZkMM58.js → ExportModal-DaLww9x0.js} +4 -2
- package/dist/cjs/ExportModal-DaLww9x0.js.map +1 -0
- package/dist/cjs/PaymentsDashboard.js +2 -2
- package/dist/cjs/PayoutsDashboard.js +11 -11
- package/dist/cjs/PayoutsDashboard.js.map +1 -1
- package/dist/cjs/PayoutsPage.js +16 -51
- package/dist/cjs/PayoutsPage.js.map +1 -1
- package/dist/cjs/RazorpayPaymentButton.js +2 -3
- package/dist/cjs/RazorpayPaymentButton.js.map +1 -1
- package/dist/cjs/RefundsDashboard.js +2 -2
- package/dist/cjs/SplitTransfersDashboard.js +3 -3
- package/dist/cjs/SplitTransfersDashboard.js.map +1 -1
- package/dist/cjs/StripeConnect.js +2 -2
- package/dist/cjs/UpiMarkAsPaidButton.js +2 -2
- package/dist/cjs/UpiPayment.js +2 -2
- package/dist/cjs/buildStripeTransactionLink.js +1 -1
- package/dist/cjs/constants.js +1 -1
- package/dist/cjs/{renderFunctions-PCwwCeDH.js → dashboard-BAIM4ZLC.js} +19 -60
- package/dist/cjs/dashboard-BAIM4ZLC.js.map +1 -0
- package/dist/cjs/{index-zFKnsfIq.js → index-Br_ibfWm.js} +1 -17
- package/dist/cjs/index-Br_ibfWm.js.map +1 -0
- package/dist/cjs/index.js +15 -27
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/renderFunctions-DW0frqfV.js +66 -0
- package/dist/cjs/renderFunctions-DW0frqfV.js.map +1 -0
- package/dist/cjs/{useConnectApi-DK-vd1fm.js → useConnectApi-C3EpIQ0I.js} +6 -46
- package/dist/cjs/useConnectApi-C3EpIQ0I.js.map +1 -0
- package/dist/cjs/{usePaymentApi-CrN9sk9a.js → usePaymentApi-lZYye4u0.js} +3 -17
- package/dist/cjs/usePaymentApi-lZYye4u0.js.map +1 -0
- package/dist/cjs/{usePaymentsApi-QmSQQ00p.js → usePaymentsApi-CDy4nTGr.js} +2 -2
- package/dist/cjs/{usePaymentsApi-QmSQQ00p.js.map → usePaymentsApi-CDy4nTGr.js.map} +1 -1
- package/dist/cjs/usePlatformApi-BajSo0Hl.js +46 -0
- package/dist/cjs/usePlatformApi-BajSo0Hl.js.map +1 -0
- package/dist/cjs/useRazorpayPayment.js +2 -3
- package/dist/cjs/useRazorpayPayment.js.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/{renderFunctions-grWPDbgH.js → dashboard-CzHfj-E5.js} +22 -60
- package/dist/dashboard-CzHfj-E5.js.map +1 -0
- package/dist/{index-CY-RxkbT.js → index-lD18ClWH.js} +2 -15
- package/dist/index-lD18ClWH.js.map +1 -0
- package/dist/index.js +15 -24
- package/dist/index.js.map +1 -1
- package/dist/renderFunctions-TxCky_xI.js +61 -0
- package/dist/renderFunctions-TxCky_xI.js.map +1 -0
- package/dist/{useConnectApi-DKV0_XY2.js → useConnectApi-DzvCFwAu.js} +7 -46
- package/dist/useConnectApi-DzvCFwAu.js.map +1 -0
- package/dist/{usePaymentApi-D2IDhsBx.js → usePaymentApi-4b6Udgmj.js} +5 -18
- package/dist/usePaymentApi-4b6Udgmj.js.map +1 -0
- package/dist/{usePaymentsApi-BdNGObVp.js → usePaymentsApi-CwVIUDRp.js} +2 -2
- package/dist/{usePaymentsApi-BdNGObVp.js.map → usePaymentsApi-CwVIUDRp.js.map} +1 -1
- package/dist/usePlatformApi-X-BDj5nS.js +43 -0
- package/dist/usePlatformApi-X-BDj5nS.js.map +1 -0
- package/dist/useRazorpayPayment.js +2 -3
- package/dist/useRazorpayPayment.js.map +1 -1
- package/package.json +9 -9
- package/dist/Dashboard.js +0 -696
- package/dist/Dashboard.js.map +0 -1
- package/dist/ExportModal-CYHlSNLI.js.map +0 -1
- package/dist/ExportModal-Wp5ZItOx.js +0 -694
- package/dist/ExportModal-Wp5ZItOx.js.map +0 -1
- package/dist/IdentifierButton-DdXIkdI0.js +0 -19
- package/dist/IdentifierButton-DdXIkdI0.js.map +0 -1
- package/dist/RazorpayDashboard.js +0 -265
- package/dist/RazorpayDashboard.js.map +0 -1
- package/dist/V2PaymentsDashboard.js +0 -313
- package/dist/V2PaymentsDashboard.js.map +0 -1
- package/dist/cjs/Dashboard.js +0 -698
- package/dist/cjs/Dashboard.js.map +0 -1
- package/dist/cjs/ExportModal-DNZkMM58.js.map +0 -1
- package/dist/cjs/ExportModal-hUc8sq24.js +0 -708
- package/dist/cjs/ExportModal-hUc8sq24.js.map +0 -1
- package/dist/cjs/IdentifierButton-C0gz-cb3.js +0 -21
- package/dist/cjs/IdentifierButton-C0gz-cb3.js.map +0 -1
- package/dist/cjs/RazorpayDashboard.js +0 -267
- package/dist/cjs/RazorpayDashboard.js.map +0 -1
- package/dist/cjs/V2PaymentsDashboard.js +0 -315
- package/dist/cjs/V2PaymentsDashboard.js.map +0 -1
- package/dist/cjs/index-BuNTaf1f.js +0 -88
- package/dist/cjs/index-BuNTaf1f.js.map +0 -1
- package/dist/cjs/index-zFKnsfIq.js.map +0 -1
- package/dist/cjs/renderFunctions-PCwwCeDH.js.map +0 -1
- package/dist/cjs/useConnectApi-DK-vd1fm.js.map +0 -1
- package/dist/cjs/useExportsApi-DR1OfSi9.js +0 -21
- package/dist/cjs/useExportsApi-DR1OfSi9.js.map +0 -1
- package/dist/cjs/useFiltersAndPagination-Cn3e6dKn.js +0 -308
- package/dist/cjs/useFiltersAndPagination-Cn3e6dKn.js.map +0 -1
- package/dist/cjs/usePaymentApi-CrN9sk9a.js.map +0 -1
- package/dist/cjs/usePlatformApi-CuXnZnd2.js +0 -145
- package/dist/cjs/usePlatformApi-CuXnZnd2.js.map +0 -1
- package/dist/index-CY-RxkbT.js.map +0 -1
- package/dist/index-DFxMGqOe.js +0 -80
- package/dist/index-DFxMGqOe.js.map +0 -1
- package/dist/renderFunctions-grWPDbgH.js.map +0 -1
- package/dist/useConnectApi-DKV0_XY2.js.map +0 -1
- package/dist/useExportsApi-CLBIM4c0.js +0 -19
- package/dist/useExportsApi-CLBIM4c0.js.map +0 -1
- package/dist/useFiltersAndPagination-CPG1yICV.js +0 -303
- package/dist/useFiltersAndPagination-CPG1yICV.js.map +0 -1
- package/dist/usePaymentApi-D2IDhsBx.js.map +0 -1
- package/dist/usePlatformApi-vWY5OcFd.js +0 -137
- package/dist/usePlatformApi-vWY5OcFd.js.map +0 -1
package/dist/cjs/Dashboard.js
DELETED
|
@@ -1,698 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
-
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var i18next = require('i18next');
|
|
7
|
-
var neetoCist = require('@bigbinary/neeto-cist');
|
|
8
|
-
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
9
|
-
var FiltersBar = require('@bigbinary/neeto-filters-frontend/Bar');
|
|
10
|
-
var Header = require('@bigbinary/neeto-molecules/Header');
|
|
11
|
-
var SubHeader = require('@bigbinary/neeto-molecules/SubHeader');
|
|
12
|
-
var Tab = require('@bigbinary/neetoui/Tab');
|
|
13
|
-
var Typography = require('@bigbinary/neetoui/Typography');
|
|
14
|
-
var reactI18next = require('react-i18next');
|
|
15
|
-
var renderFunctions = require('./renderFunctions-PCwwCeDH.js');
|
|
16
|
-
var index = require('./index-BuNTaf1f.js');
|
|
17
|
-
var ExportModal = require('./ExportModal-hUc8sq24.js');
|
|
18
|
-
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
19
|
-
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
20
|
-
var utils$1 = require('@bigbinary/neeto-filters-frontend/utils');
|
|
21
|
-
var ramda = require('ramda');
|
|
22
|
-
var reactRouterDom = require('react-router-dom');
|
|
23
|
-
var constants = require('./index-zFKnsfIq.js');
|
|
24
|
-
var constants$1 = require('@bigbinary/neeto-commons-frontend/constants');
|
|
25
|
-
var Columns = require('@bigbinary/neeto-molecules/Columns');
|
|
26
|
-
var TableWrapper = require('@bigbinary/neeto-molecules/TableWrapper');
|
|
27
|
-
var Table = require('@bigbinary/neetoui/Table');
|
|
28
|
-
var NoData = require('@bigbinary/neetoui/NoData');
|
|
29
|
-
var Spinner = require('@bigbinary/neetoui/Spinner');
|
|
30
|
-
var useConnectApi = require('./useConnectApi-DK-vd1fm.js');
|
|
31
|
-
var usePlatformApi = require('./usePlatformApi-CuXnZnd2.js');
|
|
32
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
33
|
-
var Down = require('@bigbinary/neeto-icons/Down');
|
|
34
|
-
var Right = require('@bigbinary/neeto-icons/Right');
|
|
35
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
36
|
-
var Pane = require('@bigbinary/neetoui/Pane');
|
|
37
|
-
require('@tanstack/react-query');
|
|
38
|
-
require('@tanstack/react-query-devtools');
|
|
39
|
-
require('@bigbinary/neeto-molecules/DateFormat');
|
|
40
|
-
require('@bigbinary/neetoui/Button');
|
|
41
|
-
require('@bigbinary/neetoui/Tag');
|
|
42
|
-
require('@bigbinary/neetoui/Tooltip');
|
|
43
|
-
require('./CopyButtonWrapper-Ds1k64E0.js');
|
|
44
|
-
require('@bigbinary/neeto-molecules/CopyToClipboardButton');
|
|
45
|
-
require('@bigbinary/neeto-icons/Download');
|
|
46
|
-
require('@bigbinary/neetoui/Modal');
|
|
47
|
-
require('axios');
|
|
48
|
-
require('./useExportsApi-DR1OfSi9.js');
|
|
49
|
-
require('./exportChannel-BsZ3fusx.js');
|
|
50
|
-
require('./IdentifierButton-C0gz-cb3.js');
|
|
51
|
-
require('qs');
|
|
52
|
-
require('./queryConstants-DjUfvjMz.js');
|
|
53
|
-
|
|
54
|
-
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
55
|
-
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
56
|
-
var useFiltersAndPagination = function useFiltersAndPagination(_ref) {
|
|
57
|
-
var payableEntityColumns = _ref.payableEntityColumns,
|
|
58
|
-
kind = _ref.kind,
|
|
59
|
-
searchProps = _ref.searchProps;
|
|
60
|
-
var _useQueryParams = reactUtils.useQueryParams(),
|
|
61
|
-
_useQueryParams$tab = _useQueryParams.tab,
|
|
62
|
-
tab = _useQueryParams$tab === void 0 ? index.TAB.all : _useQueryParams$tab;
|
|
63
|
-
var history = reactRouterDom.useHistory();
|
|
64
|
-
var tabs = index.TABS.filter(function (tab) {
|
|
65
|
-
var _TAB_METADATA$tab, _TAB_METADATA$tab$isH;
|
|
66
|
-
return !((_TAB_METADATA$tab = index.TAB_METADATA[tab]) !== null && _TAB_METADATA$tab !== void 0 && (_TAB_METADATA$tab$isH = _TAB_METADATA$tab.isHidden) !== null && _TAB_METADATA$tab$isH !== void 0 && _TAB_METADATA$tab$isH[kind]);
|
|
67
|
-
});
|
|
68
|
-
var _useState = React.useState(false),
|
|
69
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
70
|
-
isFilterButtonVisible = _useState2[0],
|
|
71
|
-
setIsFilterButtonVisible = _useState2[1];
|
|
72
|
-
var _useState3 = React.useState(false),
|
|
73
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
74
|
-
isFilterPaneOpen = _useState4[0],
|
|
75
|
-
setIsFilterPaneOpen = _useState4[1];
|
|
76
|
-
var _useState5 = React.useState(renderFunctions.buildDefaultPageProperties(tabs)),
|
|
77
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
78
|
-
pageProperties = _useState6[0],
|
|
79
|
-
setPageProperties = _useState6[1];
|
|
80
|
-
var _useState7 = React.useState(constants.DEFAULT_SORT_PROPERTIES),
|
|
81
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
82
|
-
sortProperties = _useState8[0],
|
|
83
|
-
setSortProperties = _useState8[1];
|
|
84
|
-
var filterableColumns = ExportModal.buildFilterColumns(tab, kind, payableEntityColumns);
|
|
85
|
-
var _getQueryParams = utils.getQueryParams(),
|
|
86
|
-
_getQueryParams$searc = _getQueryParams.searchTerm,
|
|
87
|
-
searchTerm = _getQueryParams$searc === void 0 ? "" : _getQueryParams$searc;
|
|
88
|
-
var searchKeywordProps = _objectSpread$4(_objectSpread$4({}, ExportModal.modifySearchProps({
|
|
89
|
-
searchProps: searchProps,
|
|
90
|
-
kind: kind
|
|
91
|
-
})), {}, {
|
|
92
|
-
key: "search_term",
|
|
93
|
-
value: searchTerm.trim()
|
|
94
|
-
});
|
|
95
|
-
var _useState9 = React.useState(utils$1.buildFiltersFromURL([].concat(_toConsumableArray(filterableColumns), [searchKeywordProps]))),
|
|
96
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
97
|
-
filters = _useState10[0],
|
|
98
|
-
setFilters = _useState10[1];
|
|
99
|
-
var _useState11 = React.useState(null),
|
|
100
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
101
|
-
dataSize = _useState12[0],
|
|
102
|
-
setDataSize = _useState12[1];
|
|
103
|
-
var _useState13 = React.useState(index.INITIAL_PANE_STATUS),
|
|
104
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
105
|
-
paneStatus = _useState14[0],
|
|
106
|
-
setPaneStatus = _useState14[1];
|
|
107
|
-
var columns = ExportModal.buildPaymentColumns({
|
|
108
|
-
tab: tab,
|
|
109
|
-
kind: kind,
|
|
110
|
-
payableEntityColumns: payableEntityColumns,
|
|
111
|
-
specialColumnArguments: {
|
|
112
|
-
setPaneStatus: setPaneStatus
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
var modifiedColumns = columns.map(ramda.modify("dataIndex", constants.processDataIndex));
|
|
116
|
-
var handleTabChange = function handleTabChange(tab) {
|
|
117
|
-
var _pageProperties$tab, _pageProperties$tab2;
|
|
118
|
-
setDataSize(null);
|
|
119
|
-
var queryParams = utils.getQueryParams({
|
|
120
|
-
toCamelCase: false
|
|
121
|
-
});
|
|
122
|
-
var newParams = {
|
|
123
|
-
tab: tab,
|
|
124
|
-
page: (_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.page,
|
|
125
|
-
page_size: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.pageSize
|
|
126
|
-
};
|
|
127
|
-
history.push(utils.buildUrl(window.location.pathname, ramda.mergeLeft(newParams, queryParams)));
|
|
128
|
-
};
|
|
129
|
-
return {
|
|
130
|
-
isFilterButtonVisible: isFilterButtonVisible,
|
|
131
|
-
isFilterPaneOpen: isFilterPaneOpen,
|
|
132
|
-
pageProperties: pageProperties,
|
|
133
|
-
paneStatus: paneStatus,
|
|
134
|
-
filters: filters,
|
|
135
|
-
searchKeywordProps: searchKeywordProps,
|
|
136
|
-
tabs: tabs,
|
|
137
|
-
tab: tab,
|
|
138
|
-
dataSize: dataSize,
|
|
139
|
-
filterableColumns: filterableColumns,
|
|
140
|
-
sortProperties: sortProperties,
|
|
141
|
-
columns: columns,
|
|
142
|
-
modifiedColumns: modifiedColumns,
|
|
143
|
-
setIsFilterButtonVisible: setIsFilterButtonVisible,
|
|
144
|
-
setIsFilterPaneOpen: setIsFilterPaneOpen,
|
|
145
|
-
setPageProperties: setPageProperties,
|
|
146
|
-
setPaneStatus: setPaneStatus,
|
|
147
|
-
setFilters: setFilters,
|
|
148
|
-
handleTabChange: handleTabChange,
|
|
149
|
-
setDataSize: setDataSize,
|
|
150
|
-
setSortProperties: setSortProperties
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
var SPLIT_COLUMNS = [{
|
|
155
|
-
key: "splitSubId",
|
|
156
|
-
title: i18next.t("neetoPayments.common.id"),
|
|
157
|
-
dataIndex: "id",
|
|
158
|
-
width: "72px"
|
|
159
|
-
}, {
|
|
160
|
-
key: "splitSubIdentifier",
|
|
161
|
-
title: i18next.t("neetoPayments.common.identifier"),
|
|
162
|
-
dataIndex: "identifier",
|
|
163
|
-
width: "300px",
|
|
164
|
-
render: ExportModal.renderSplitIdentifier
|
|
165
|
-
}, {
|
|
166
|
-
key: "splitSubAmount",
|
|
167
|
-
title: i18next.t("neetoPayments.common.amount"),
|
|
168
|
-
dataIndex: "amount",
|
|
169
|
-
width: "150px"
|
|
170
|
-
}, {
|
|
171
|
-
key: "splitSubStatus",
|
|
172
|
-
title: i18next.t("neetoPayments.common.status"),
|
|
173
|
-
dataIndex: "status",
|
|
174
|
-
width: "130px",
|
|
175
|
-
render: renderFunctions.renderStatus("split")
|
|
176
|
-
}];
|
|
177
|
-
var REFUND_COLUMNS = [{
|
|
178
|
-
key: "refundId",
|
|
179
|
-
title: i18next.t("neetoPayments.common.id"),
|
|
180
|
-
dataIndex: "id",
|
|
181
|
-
width: "72px"
|
|
182
|
-
}, {
|
|
183
|
-
key: "refundIdentifier",
|
|
184
|
-
title: i18next.t("neetoPayments.common.identifier"),
|
|
185
|
-
dataIndex: "identifier",
|
|
186
|
-
width: "290px",
|
|
187
|
-
render: ExportModal.renderRefundIdentifier
|
|
188
|
-
}, {
|
|
189
|
-
key: "refundAmount",
|
|
190
|
-
title: i18next.t("neetoPayments.common.amount"),
|
|
191
|
-
dataIndex: "amount",
|
|
192
|
-
width: "150px"
|
|
193
|
-
}, {
|
|
194
|
-
key: "refundStatus",
|
|
195
|
-
title: i18next.t("neetoPayments.common.status"),
|
|
196
|
-
dataIndex: "status",
|
|
197
|
-
width: "200px",
|
|
198
|
-
render: renderFunctions.renderStatus("refund")
|
|
199
|
-
}];
|
|
200
|
-
|
|
201
|
-
var SubTable = function SubTable(_ref) {
|
|
202
|
-
var _ref$data = _ref.data,
|
|
203
|
-
data = _ref$data === void 0 ? [] : _ref$data,
|
|
204
|
-
_ref$className = _ref.className,
|
|
205
|
-
className = _ref$className === void 0 ? "" : _ref$className,
|
|
206
|
-
_ref$kind = _ref.kind,
|
|
207
|
-
kind = _ref$kind === void 0 ? "split" : _ref$kind;
|
|
208
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
209
|
-
className: className || "ml-12 max-w-3xl",
|
|
210
|
-
children: /*#__PURE__*/jsxRuntime.jsx(TableWrapper, {
|
|
211
|
-
hasPagination: false,
|
|
212
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Table, {
|
|
213
|
-
fixedHeight: true,
|
|
214
|
-
columnData: ExportModal.isSplitKind(kind) ? SPLIT_COLUMNS : REFUND_COLUMNS,
|
|
215
|
-
pagination: false,
|
|
216
|
-
rowData: renderFunctions.buildRowData({
|
|
217
|
-
data: data
|
|
218
|
-
}),
|
|
219
|
-
scroll: {
|
|
220
|
-
y: 300
|
|
221
|
-
}
|
|
222
|
-
})
|
|
223
|
-
})
|
|
224
|
-
});
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
var ExpandedRow = function ExpandedRow() {
|
|
228
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
229
|
-
_ref$splits = _ref.splits,
|
|
230
|
-
splits = _ref$splits === void 0 ? [] : _ref$splits,
|
|
231
|
-
_ref$refunds = _ref.refunds,
|
|
232
|
-
refunds = _ref$refunds === void 0 ? [] : _ref$refunds;
|
|
233
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
234
|
-
className: "my-2 space-y-2",
|
|
235
|
-
children: [!ramda.isEmpty(splits) && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
236
|
-
className: "space-y-4",
|
|
237
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
238
|
-
className: "ml-12",
|
|
239
|
-
style: "h3",
|
|
240
|
-
children: i18next.t("neetoPayments.common.splits")
|
|
241
|
-
}), /*#__PURE__*/jsxRuntime.jsx(SubTable, {
|
|
242
|
-
data: splits
|
|
243
|
-
})]
|
|
244
|
-
}), !ramda.isEmpty(refunds) && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
245
|
-
className: "space-y-4",
|
|
246
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
247
|
-
className: "ml-12",
|
|
248
|
-
style: "h3",
|
|
249
|
-
children: i18next.t("neetoPayments.title.refund")
|
|
250
|
-
}), /*#__PURE__*/jsxRuntime.jsx(SubTable, {
|
|
251
|
-
data: refunds,
|
|
252
|
-
kind: "refund"
|
|
253
|
-
})]
|
|
254
|
-
})]
|
|
255
|
-
});
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
259
|
-
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
260
|
-
var useFetchData = function useFetchData(_ref) {
|
|
261
|
-
var _data$kind, _data$kind2, _data$kind2$data, _data$kind2$data$coun, _data$kind3, _data$kind4;
|
|
262
|
-
var kind = _ref.kind,
|
|
263
|
-
holdableId = _ref.holdableId,
|
|
264
|
-
payload = _ref.payload,
|
|
265
|
-
isPlatformEnabled = _ref.isPlatformEnabled;
|
|
266
|
-
var data = {};
|
|
267
|
-
data.transfer = data.connected = useConnectApi.useFetchStripeTransactions(holdableId, _objectSpread$3(_objectSpread$3({}, payload), {}, {
|
|
268
|
-
kind: kind
|
|
269
|
-
}), {
|
|
270
|
-
enabled: ExportModal.isTransferKind(kind) || ExportModal.isConnectedKind(kind)
|
|
271
|
-
});
|
|
272
|
-
data.refund = usePlatformApi.useFetchStripeRefunds(payload, {
|
|
273
|
-
enabled: ExportModal.isRefundKind(kind)
|
|
274
|
-
});
|
|
275
|
-
data.platform = usePlatformApi.useFetchStripePlatformTransactions(payload, {
|
|
276
|
-
enabled: ExportModal.isPlatformKind(kind) && isPlatformEnabled
|
|
277
|
-
});
|
|
278
|
-
data.split = usePlatformApi.useFetchStripePlatformSplits(payload, {
|
|
279
|
-
enabled: ExportModal.isSplitKind(kind)
|
|
280
|
-
});
|
|
281
|
-
return {
|
|
282
|
-
data: ExportModal.processResponse((_data$kind = data[kind]) === null || _data$kind === void 0 ? void 0 : _data$kind.data, kind),
|
|
283
|
-
dataSize: (_data$kind2 = data[kind]) === null || _data$kind2 === void 0 ? void 0 : (_data$kind2$data = _data$kind2.data) === null || _data$kind2$data === void 0 ? void 0 : (_data$kind2$data$coun = _data$kind2$data.counts) === null || _data$kind2$data$coun === void 0 ? void 0 : _data$kind2$data$coun[payload === null || payload === void 0 ? void 0 : payload.tab],
|
|
284
|
-
isDataLoading: (_data$kind3 = data[kind]) === null || _data$kind3 === void 0 ? void 0 : _data$kind3.isLoading,
|
|
285
|
-
isDataFetching: (_data$kind4 = data[kind]) === null || _data$kind4 === void 0 ? void 0 : _data$kind4.isFetching
|
|
286
|
-
};
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
var RowExpander = function RowExpander(_ref) {
|
|
290
|
-
var expanded = _ref.expanded,
|
|
291
|
-
onExpand = _ref.onExpand,
|
|
292
|
-
record = _ref.record,
|
|
293
|
-
expandable = _ref.expandable;
|
|
294
|
-
return expandable && (expanded ? /*#__PURE__*/jsxRuntime.jsx(Down, {
|
|
295
|
-
className: "cursor-pointer",
|
|
296
|
-
onClick: function onClick(e) {
|
|
297
|
-
return onExpand(record, e);
|
|
298
|
-
}
|
|
299
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(Right, {
|
|
300
|
-
className: "cursor-pointer",
|
|
301
|
-
onClick: function onClick(e) {
|
|
302
|
-
return onExpand(record, e);
|
|
303
|
-
}
|
|
304
|
-
}));
|
|
305
|
-
};
|
|
306
|
-
|
|
307
|
-
var _excluded = ["transactionId"];
|
|
308
|
-
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
309
|
-
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
310
|
-
var Details = function Details(_ref) {
|
|
311
|
-
var transactionId = _ref.transactionId,
|
|
312
|
-
paneProps = _objectWithoutProperties(_ref, _excluded);
|
|
313
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
314
|
-
t = _useTranslation.t;
|
|
315
|
-
var _useFetchStripePlatfo = usePlatformApi.useFetchStripePlatformTransaction(transactionId),
|
|
316
|
-
isLoading = _useFetchStripePlatfo.isLoading,
|
|
317
|
-
_useFetchStripePlatfo2 = _useFetchStripePlatfo.data,
|
|
318
|
-
_useFetchStripePlatfo3 = _useFetchStripePlatfo2 === void 0 ? {} : _useFetchStripePlatfo2,
|
|
319
|
-
amount = _useFetchStripePlatfo3.amount,
|
|
320
|
-
netAmount = _useFetchStripePlatfo3.netAmount,
|
|
321
|
-
status = _useFetchStripePlatfo3.status,
|
|
322
|
-
paymentAt = _useFetchStripePlatfo3.paymentAt,
|
|
323
|
-
identifier = _useFetchStripePlatfo3.identifier,
|
|
324
|
-
live = _useFetchStripePlatfo3.live,
|
|
325
|
-
_useFetchStripePlatfo4 = _useFetchStripePlatfo3.splits,
|
|
326
|
-
splits = _useFetchStripePlatfo4 === void 0 ? [] : _useFetchStripePlatfo4;
|
|
327
|
-
return /*#__PURE__*/jsxRuntime.jsxs(Pane, _objectSpread$2(_objectSpread$2({}, paneProps), {}, {
|
|
328
|
-
size: "large",
|
|
329
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Pane.Header, {
|
|
330
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
331
|
-
style: "h2",
|
|
332
|
-
children: "Transaction Details"
|
|
333
|
-
})
|
|
334
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Pane.Body, {
|
|
335
|
-
children: isLoading ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
336
|
-
className: "flex h-full w-full items-center justify-center",
|
|
337
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Spinner, {})
|
|
338
|
-
}) : /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
339
|
-
className: "w-full space-y-6 p-2",
|
|
340
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
341
|
-
className: "w-full space-y-2",
|
|
342
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
343
|
-
className: "flex items-center space-x-2",
|
|
344
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
345
|
-
style: "body2",
|
|
346
|
-
children: t("neetoPayments.transactionPane.transactionId")
|
|
347
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
348
|
-
className: "neeto-ui-text-black font-medium",
|
|
349
|
-
style: "body2",
|
|
350
|
-
children: ExportModal.renderIdentifier({
|
|
351
|
-
identifier: identifier,
|
|
352
|
-
live: live
|
|
353
|
-
})
|
|
354
|
-
})]
|
|
355
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
356
|
-
className: "flex items-center space-x-2",
|
|
357
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
358
|
-
style: "body2",
|
|
359
|
-
children: t("neetoPayments.transactionPane.amount")
|
|
360
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
361
|
-
className: "neeto-ui-text-black font-medium",
|
|
362
|
-
style: "body2",
|
|
363
|
-
children: amount
|
|
364
|
-
})]
|
|
365
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
366
|
-
className: "flex items-center space-x-2",
|
|
367
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
368
|
-
style: "body2",
|
|
369
|
-
children: t("neetoPayments.transactionPane.netAmount")
|
|
370
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
371
|
-
className: "neeto-ui-text-black font-medium",
|
|
372
|
-
style: "body2",
|
|
373
|
-
children: netAmount
|
|
374
|
-
})]
|
|
375
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
376
|
-
className: "flex items-center space-x-2",
|
|
377
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
378
|
-
style: "body2",
|
|
379
|
-
children: t("neetoPayments.transactionPane.status")
|
|
380
|
-
}), renderFunctions.renderStatus("transaction", status)]
|
|
381
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
382
|
-
className: "flex items-center space-x-2",
|
|
383
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
384
|
-
style: "body2",
|
|
385
|
-
children: t("neetoPayments.transactionPane.paidOn")
|
|
386
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
387
|
-
className: "neeto-ui-text-black font-medium",
|
|
388
|
-
style: "body2",
|
|
389
|
-
children: renderFunctions.renderDate(paymentAt)
|
|
390
|
-
})]
|
|
391
|
-
})]
|
|
392
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
393
|
-
style: "h3",
|
|
394
|
-
children: "Splits"
|
|
395
|
-
}), /*#__PURE__*/jsxRuntime.jsx(SubTable, {
|
|
396
|
-
className: "ml-0 w-full",
|
|
397
|
-
data: splits
|
|
398
|
-
})]
|
|
399
|
-
})
|
|
400
|
-
})]
|
|
401
|
-
}));
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
405
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
406
|
-
var List = function List(_ref) {
|
|
407
|
-
var _pageProperties$tab, _pageProperties$tab2, _pageProperties$tab3;
|
|
408
|
-
var _ref$isPlatformEnable = _ref.isPlatformEnabled,
|
|
409
|
-
isPlatformEnabled = _ref$isPlatformEnable === void 0 ? false : _ref$isPlatformEnable,
|
|
410
|
-
kind = _ref.kind,
|
|
411
|
-
_ref$holdableId = _ref.holdableId,
|
|
412
|
-
holdableId = _ref$holdableId === void 0 ? null : _ref$holdableId,
|
|
413
|
-
filters = _ref.filters,
|
|
414
|
-
setIsFilterButtonVisible = _ref.setIsFilterButtonVisible,
|
|
415
|
-
pageProperties = _ref.pageProperties,
|
|
416
|
-
setPageProperties = _ref.setPageProperties,
|
|
417
|
-
tab = _ref.tab,
|
|
418
|
-
paneStatus = _ref.paneStatus,
|
|
419
|
-
setPaneStatus = _ref.setPaneStatus,
|
|
420
|
-
setDataSize = _ref.setDataSize,
|
|
421
|
-
sortProperties = _ref.sortProperties,
|
|
422
|
-
setSortProperties = _ref.setSortProperties,
|
|
423
|
-
payoutId = _ref.payoutId,
|
|
424
|
-
columns = _ref.columns;
|
|
425
|
-
var history = reactRouterDom.useHistory();
|
|
426
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
427
|
-
t = _useTranslation.t;
|
|
428
|
-
var _useHiddenColumns = Columns.useHiddenColumns("stripePaymentDashboard_".concat(kind)),
|
|
429
|
-
hideColumn = _useHiddenColumns.hideColumn,
|
|
430
|
-
_useHiddenColumns$hid = _useHiddenColumns.hiddenColumns,
|
|
431
|
-
hiddenColumns = _useHiddenColumns$hid === void 0 ? [] : _useHiddenColumns$hid;
|
|
432
|
-
var _useFetchStripePlatfo = usePlatformApi.useFetchStripePlatformAccount({
|
|
433
|
-
enabled: isPlatformEnabled
|
|
434
|
-
}),
|
|
435
|
-
isStripePlatformAccountLoading = _useFetchStripePlatfo.isLoading,
|
|
436
|
-
_useFetchStripePlatfo2 = _useFetchStripePlatfo.data,
|
|
437
|
-
_useFetchStripePlatfo3 = _useFetchStripePlatfo2 === void 0 ? {} : _useFetchStripePlatfo2,
|
|
438
|
-
stripePlatformAccount = _useFetchStripePlatfo3.platformAccount;
|
|
439
|
-
var _useFetchConnectedStr = useConnectApi.useFetchConnectedStripeAccount(holdableId),
|
|
440
|
-
isStripeAccountLoading = _useFetchConnectedStr.isLoading,
|
|
441
|
-
_useFetchConnectedStr2 = _useFetchConnectedStr.data,
|
|
442
|
-
_useFetchConnectedStr3 = _useFetchConnectedStr2 === void 0 ? {} : _useFetchConnectedStr2,
|
|
443
|
-
stripeConnectedAccount = _useFetchConnectedStr3.account;
|
|
444
|
-
var _useFetchData = useFetchData({
|
|
445
|
-
kind: kind,
|
|
446
|
-
holdableId: holdableId,
|
|
447
|
-
payload: renderFunctions.buildPayload({
|
|
448
|
-
tab: tab,
|
|
449
|
-
filters: filters,
|
|
450
|
-
pageProperties: pageProperties,
|
|
451
|
-
sortProperties: sortProperties,
|
|
452
|
-
payoutId: payoutId
|
|
453
|
-
}),
|
|
454
|
-
isPlatformEnabled: isPlatformEnabled
|
|
455
|
-
}),
|
|
456
|
-
data = _useFetchData.data,
|
|
457
|
-
isDataLoading = _useFetchData.isDataLoading,
|
|
458
|
-
dataSize = _useFetchData.dataSize,
|
|
459
|
-
isDataFetching = _useFetchData.isDataFetching;
|
|
460
|
-
var isStripeAccountConnected = (stripeConnectedAccount === null || stripeConnectedAccount === void 0 ? void 0 : stripeConnectedAccount.isConnected) || (stripePlatformAccount === null || stripePlatformAccount === void 0 ? void 0 : stripePlatformAccount.isConnected);
|
|
461
|
-
React.useEffect(function () {
|
|
462
|
-
setIsFilterButtonVisible(neetoCist.isPresent(data) || neetoCist.isPresent(filters));
|
|
463
|
-
setDataSize(dataSize);
|
|
464
|
-
}, [data]);
|
|
465
|
-
var handleTablePaginaton = function handleTablePaginaton(page, pageSize) {
|
|
466
|
-
var queryParams = utils.getQueryParams({
|
|
467
|
-
toCamelCase: false
|
|
468
|
-
});
|
|
469
|
-
history.push(utils.buildUrl(window.location.pathname, ramda.mergeLeft({
|
|
470
|
-
page: page,
|
|
471
|
-
page_size: pageSize
|
|
472
|
-
}, queryParams)));
|
|
473
|
-
setPageProperties(ramda.assoc(tab, {
|
|
474
|
-
page: page,
|
|
475
|
-
pageSize: pageSize
|
|
476
|
-
}));
|
|
477
|
-
};
|
|
478
|
-
React.useEffect(function () {
|
|
479
|
-
handleTablePaginaton(constants$1.DEFAULT_PAGE_INDEX, constants$1.DEFAULT_PAGE_SIZE);
|
|
480
|
-
setSortProperties(constants.DEFAULT_SORT_PROPERTIES);
|
|
481
|
-
}, [filters, tab]);
|
|
482
|
-
var handleTableChange = function handleTableChange(_, __, sorter) {
|
|
483
|
-
setSortProperties(neetoCist.isPresent(sorter === null || sorter === void 0 ? void 0 : sorter.column) ? {
|
|
484
|
-
sortBy: neetoCist.camelToSnakeCase(constants.processDataIndex(sorter.field)),
|
|
485
|
-
orderBy: sorter.order === "ascend" ? "ASC" : "DESC"
|
|
486
|
-
} : constants.DEFAULT_SORT_PROPERTIES);
|
|
487
|
-
};
|
|
488
|
-
if (isStripeAccountLoading || isStripePlatformAccountLoading || isDataLoading) {
|
|
489
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
490
|
-
className: "flex h-full w-full items-center justify-center",
|
|
491
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Spinner, {})
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
if (!isStripeAccountConnected && dataSize <= 0 || !neetoCist.isPresent(data)) {
|
|
495
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
496
|
-
className: "flex h-full w-full items-center justify-center",
|
|
497
|
-
children: /*#__PURE__*/jsxRuntime.jsx(NoData, {
|
|
498
|
-
title: tab === index.TAB.all ? t("neetoPayments.emptyState.".concat(kind)) : t("neetoPayments.emptyState.".concat(kind, "WithStatus"), {
|
|
499
|
-
status: tab
|
|
500
|
-
})
|
|
501
|
-
})
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
var visibleColumns = columns.filter(function (_ref2) {
|
|
505
|
-
var dataIndex = _ref2.dataIndex;
|
|
506
|
-
return !hiddenColumns.includes(constants.processDataIndex(dataIndex));
|
|
507
|
-
});
|
|
508
|
-
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
509
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(TableWrapper, {
|
|
510
|
-
hasPagination: dataSize > ((_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.pageSize),
|
|
511
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Table, {
|
|
512
|
-
fixedHeight: true,
|
|
513
|
-
allowRowClick: false,
|
|
514
|
-
columnData: visibleColumns,
|
|
515
|
-
currentPageNumber: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.page,
|
|
516
|
-
handlePageChange: handleTablePaginaton,
|
|
517
|
-
loading: isDataFetching,
|
|
518
|
-
rowData: renderFunctions.buildRowData({
|
|
519
|
-
data: data,
|
|
520
|
-
pageProperties: pageProperties,
|
|
521
|
-
tab: tab
|
|
522
|
-
}),
|
|
523
|
-
rowSelection: false,
|
|
524
|
-
sortDirections: constants.SORT_DIRECTIONS,
|
|
525
|
-
totalCount: dataSize,
|
|
526
|
-
expandable: {
|
|
527
|
-
expandedRowRender: ExpandedRow,
|
|
528
|
-
showExpandColumn: ExportModal.isPlatformKind(kind),
|
|
529
|
-
rowExpandable: function rowExpandable(record) {
|
|
530
|
-
return !(ramda.isEmpty(record.splits) && ramda.isEmpty(record.refunds));
|
|
531
|
-
},
|
|
532
|
-
columnWidth: "64px",
|
|
533
|
-
expandIcon: RowExpander
|
|
534
|
-
},
|
|
535
|
-
paginationProps: {
|
|
536
|
-
showSizeChanger: true,
|
|
537
|
-
hideOnSinglePage: true,
|
|
538
|
-
pageSize: (_pageProperties$tab3 = pageProperties[tab]) === null || _pageProperties$tab3 === void 0 ? void 0 : _pageProperties$tab3.pageSize,
|
|
539
|
-
total: dataSize
|
|
540
|
-
},
|
|
541
|
-
onChange: handleTableChange,
|
|
542
|
-
onColumnHide: function onColumnHide(column) {
|
|
543
|
-
hideColumn(constants.processDataIndex(column.dataIndex));
|
|
544
|
-
}
|
|
545
|
-
})
|
|
546
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Details, _objectSpread$1(_objectSpread$1({}, paneStatus), {}, {
|
|
547
|
-
onClose: function onClose() {
|
|
548
|
-
return setPaneStatus(index.INITIAL_PANE_STATUS);
|
|
549
|
-
}
|
|
550
|
-
}))]
|
|
551
|
-
});
|
|
552
|
-
};
|
|
553
|
-
|
|
554
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
555
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
556
|
-
var Dashboard = function Dashboard(_ref) {
|
|
557
|
-
var _ref$isPlatformEnable = _ref.isPlatformEnabled,
|
|
558
|
-
isPlatformEnabled = _ref$isPlatformEnable === void 0 ? false : _ref$isPlatformEnable,
|
|
559
|
-
searchProps = _ref.searchProps,
|
|
560
|
-
_ref$headerProps = _ref.headerProps,
|
|
561
|
-
headerProps = _ref$headerProps === void 0 ? {} : _ref$headerProps,
|
|
562
|
-
_ref$holdableId = _ref.holdableId,
|
|
563
|
-
holdableId = _ref$holdableId === void 0 ? null : _ref$holdableId,
|
|
564
|
-
_ref$payableEntityCol = _ref.payableEntityColumns,
|
|
565
|
-
payableEntityColumns = _ref$payableEntityCol === void 0 ? [] : _ref$payableEntityCol,
|
|
566
|
-
_ref$kind = _ref.kind,
|
|
567
|
-
kind = _ref$kind === void 0 ? "connected" : _ref$kind,
|
|
568
|
-
_ref$payoutId = _ref.payoutId,
|
|
569
|
-
payoutId = _ref$payoutId === void 0 ? null : _ref$payoutId;
|
|
570
|
-
var _useTransition = React.useTransition(),
|
|
571
|
-
_useTransition2 = _slicedToArray(_useTransition, 2);
|
|
572
|
-
_useTransition2[0];
|
|
573
|
-
var startTransition = _useTransition2[1];
|
|
574
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
575
|
-
t = _useTranslation.t;
|
|
576
|
-
var _useState = React.useState(false),
|
|
577
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
578
|
-
showExportModal = _useState2[0],
|
|
579
|
-
setShowExportModal = _useState2[1];
|
|
580
|
-
var _useFiltersAndPaginat = useFiltersAndPagination({
|
|
581
|
-
payableEntityColumns: payableEntityColumns,
|
|
582
|
-
kind: kind,
|
|
583
|
-
searchProps: searchProps
|
|
584
|
-
}),
|
|
585
|
-
searchKeywordProps = _useFiltersAndPaginat.searchKeywordProps,
|
|
586
|
-
pageProperties = _useFiltersAndPaginat.pageProperties,
|
|
587
|
-
filterableColumns = _useFiltersAndPaginat.filterableColumns,
|
|
588
|
-
isFilterButtonVisible = _useFiltersAndPaginat.isFilterButtonVisible,
|
|
589
|
-
isFilterPaneOpen = _useFiltersAndPaginat.isFilterPaneOpen,
|
|
590
|
-
filters = _useFiltersAndPaginat.filters,
|
|
591
|
-
tabs = _useFiltersAndPaginat.tabs,
|
|
592
|
-
tab = _useFiltersAndPaginat.tab,
|
|
593
|
-
dataSize = _useFiltersAndPaginat.dataSize,
|
|
594
|
-
sortProperties = _useFiltersAndPaginat.sortProperties,
|
|
595
|
-
columns = _useFiltersAndPaginat.columns,
|
|
596
|
-
modifiedColumns = _useFiltersAndPaginat.modifiedColumns,
|
|
597
|
-
paneStatus = _useFiltersAndPaginat.paneStatus,
|
|
598
|
-
setPaneStatus = _useFiltersAndPaginat.setPaneStatus,
|
|
599
|
-
setIsFilterButtonVisible = _useFiltersAndPaginat.setIsFilterButtonVisible,
|
|
600
|
-
setIsFilterPaneOpen = _useFiltersAndPaginat.setIsFilterPaneOpen,
|
|
601
|
-
setFilters = _useFiltersAndPaginat.setFilters,
|
|
602
|
-
setPageProperties = _useFiltersAndPaginat.setPageProperties,
|
|
603
|
-
handleTabChange = _useFiltersAndPaginat.handleTabChange,
|
|
604
|
-
setDataSize = _useFiltersAndPaginat.setDataSize,
|
|
605
|
-
setSortProperties = _useFiltersAndPaginat.setSortProperties;
|
|
606
|
-
var isTabsVisible = (isFilterButtonVisible || tab !== "all") && neetoCist.isNotPresent(payoutId);
|
|
607
|
-
var titleKind = kind === "transfer" && !isPlatformEnabled ? index.KIND.connected : kind;
|
|
608
|
-
var handleFiltersChange = function handleFiltersChange(filters) {
|
|
609
|
-
startTransition(function () {
|
|
610
|
-
setFilters(filters);
|
|
611
|
-
});
|
|
612
|
-
};
|
|
613
|
-
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
614
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Header, _objectSpread(_objectSpread({}, headerProps), {}, {
|
|
615
|
-
title: t("neetoPayments.title.".concat(titleKind)),
|
|
616
|
-
searchProps: isFilterButtonVisible && {
|
|
617
|
-
placeholder: searchKeywordProps.placeholder,
|
|
618
|
-
className: "w-80"
|
|
619
|
-
}
|
|
620
|
-
})), isTabsVisible && /*#__PURE__*/jsxRuntime.jsx(Tab, {
|
|
621
|
-
children: tabs.map(function (item) {
|
|
622
|
-
return /*#__PURE__*/jsxRuntime.jsx(Tab.Item, {
|
|
623
|
-
active: tab === item,
|
|
624
|
-
onClick: function onClick() {
|
|
625
|
-
return handleTabChange(item);
|
|
626
|
-
},
|
|
627
|
-
children: t("neetoPayments.common.".concat(item))
|
|
628
|
-
}, item);
|
|
629
|
-
})
|
|
630
|
-
}), /*#__PURE__*/jsxRuntime.jsx(SubHeader, {
|
|
631
|
-
className: "mt-4",
|
|
632
|
-
leftActionBlock: dataSize > 0 && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
633
|
-
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
634
|
-
component: "h4",
|
|
635
|
-
children: tab === index.TAB.all ? t("neetoPayments.countOf.".concat(kind), {
|
|
636
|
-
count: dataSize
|
|
637
|
-
}) : t("neetoPayments.countOf.".concat(kind, "WithStatus"), {
|
|
638
|
-
count: dataSize,
|
|
639
|
-
status: tab
|
|
640
|
-
})
|
|
641
|
-
}),
|
|
642
|
-
rightActionBlock: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
643
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(FiltersBar, {
|
|
644
|
-
columns: filterableColumns,
|
|
645
|
-
keyword: searchKeywordProps,
|
|
646
|
-
setIsPaneOpen: setIsFilterPaneOpen,
|
|
647
|
-
onChange: handleFiltersChange
|
|
648
|
-
}), isFilterButtonVisible && /*#__PURE__*/jsxRuntime.jsx(SubHeader.RightBlock, {
|
|
649
|
-
columnsButtonProps: {
|
|
650
|
-
columnData: modifiedColumns,
|
|
651
|
-
fixedColumns: index.DASHBOARD_MANDATORY_COLUMNS,
|
|
652
|
-
localStorageKey: "stripePaymentDashboard_".concat(kind)
|
|
653
|
-
},
|
|
654
|
-
downloadButtonProps: {
|
|
655
|
-
onClick: function onClick() {
|
|
656
|
-
return setShowExportModal(true);
|
|
657
|
-
}
|
|
658
|
-
},
|
|
659
|
-
filterProps: {
|
|
660
|
-
columns: filterableColumns,
|
|
661
|
-
isOpen: isFilterPaneOpen,
|
|
662
|
-
keyword: searchKeywordProps,
|
|
663
|
-
setIsOpen: setIsFilterPaneOpen,
|
|
664
|
-
onChange: handleFiltersChange
|
|
665
|
-
}
|
|
666
|
-
})]
|
|
667
|
-
})
|
|
668
|
-
}), /*#__PURE__*/jsxRuntime.jsx(List, {
|
|
669
|
-
columns: columns,
|
|
670
|
-
filters: filters,
|
|
671
|
-
holdableId: holdableId,
|
|
672
|
-
isPlatformEnabled: isPlatformEnabled,
|
|
673
|
-
kind: kind,
|
|
674
|
-
pageProperties: pageProperties,
|
|
675
|
-
paneStatus: paneStatus,
|
|
676
|
-
payoutId: payoutId,
|
|
677
|
-
setDataSize: setDataSize,
|
|
678
|
-
setIsFilterButtonVisible: setIsFilterButtonVisible,
|
|
679
|
-
setPageProperties: setPageProperties,
|
|
680
|
-
setPaneStatus: setPaneStatus,
|
|
681
|
-
setSortProperties: setSortProperties,
|
|
682
|
-
sortProperties: sortProperties,
|
|
683
|
-
tab: tab
|
|
684
|
-
}), /*#__PURE__*/jsxRuntime.jsx(ExportModal.ExportModal, {
|
|
685
|
-
filters: filters,
|
|
686
|
-
holdableId: holdableId,
|
|
687
|
-
kind: kind,
|
|
688
|
-
setShowExportModal: setShowExportModal,
|
|
689
|
-
showExportModal: showExportModal,
|
|
690
|
-
sortProperties: sortProperties,
|
|
691
|
-
tab: tab
|
|
692
|
-
})]
|
|
693
|
-
});
|
|
694
|
-
};
|
|
695
|
-
var Dashboard$1 = reactUtils.withTitle(renderFunctions.withReactQuery(Dashboard), i18next.t("neetoPayments.common.payments"));
|
|
696
|
-
|
|
697
|
-
module.exports = Dashboard$1;
|
|
698
|
-
//# sourceMappingURL=Dashboard.js.map
|