@bigbinary/neeto-payments-frontend 3.0.2 → 3.0.4

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.
Files changed (110) hide show
  1. package/app/javascript/src/translations/en.json +17 -3
  2. package/dist/AccountsDashboard.js +5 -4
  3. package/dist/AccountsDashboard.js.map +1 -1
  4. package/dist/Dashboard.js +8 -7
  5. package/dist/Dashboard.js.map +1 -1
  6. package/dist/{ExportModal-2d866d2f.js → ExportModal-2ba129e8.js} +5 -4
  7. package/dist/ExportModal-2ba129e8.js.map +1 -0
  8. package/dist/ExportModal-33915720.js +131 -0
  9. package/dist/ExportModal-33915720.js.map +1 -0
  10. package/dist/PaymentsDashboard.js +34 -9
  11. package/dist/PaymentsDashboard.js.map +1 -1
  12. package/dist/PayoutsDashboard.js +7 -6
  13. package/dist/PayoutsDashboard.js.map +1 -1
  14. package/dist/PayoutsPage.js +8 -7
  15. package/dist/PayoutsPage.js.map +1 -1
  16. package/dist/RazorpayDashboard.js +8 -7
  17. package/dist/RazorpayDashboard.js.map +1 -1
  18. package/dist/RazorpayPaymentButton.js +2 -2
  19. package/dist/RefundsDashboard.js +34 -9
  20. package/dist/RefundsDashboard.js.map +1 -1
  21. package/dist/SplitTransfersDashboard.js +260 -64
  22. package/dist/SplitTransfersDashboard.js.map +1 -1
  23. package/dist/StripeConnect.js +2 -2
  24. package/dist/UpiMarkAsPaidButton.js +1 -1
  25. package/dist/UpiPayment.js +1 -1
  26. package/dist/V2PaymentsDashboard.js +4 -4
  27. package/dist/buildStripeTransactionLink.js +2 -2
  28. package/dist/cjs/AccountsDashboard.js +6 -5
  29. package/dist/cjs/AccountsDashboard.js.map +1 -1
  30. package/dist/cjs/Dashboard.js +8 -7
  31. package/dist/cjs/Dashboard.js.map +1 -1
  32. package/dist/cjs/ExportModal-08a78a62.js +142 -0
  33. package/dist/cjs/ExportModal-08a78a62.js.map +1 -0
  34. package/dist/cjs/{ExportModal-4d6fbca1.js → ExportModal-e0290ffb.js} +6 -5
  35. package/dist/cjs/ExportModal-e0290ffb.js.map +1 -0
  36. package/dist/cjs/PaymentsDashboard.js +33 -8
  37. package/dist/cjs/PaymentsDashboard.js.map +1 -1
  38. package/dist/cjs/PayoutsDashboard.js +8 -7
  39. package/dist/cjs/PayoutsDashboard.js.map +1 -1
  40. package/dist/cjs/PayoutsPage.js +8 -7
  41. package/dist/cjs/PayoutsPage.js.map +1 -1
  42. package/dist/cjs/RazorpayDashboard.js +8 -7
  43. package/dist/cjs/RazorpayDashboard.js.map +1 -1
  44. package/dist/cjs/RazorpayPaymentButton.js +2 -2
  45. package/dist/cjs/RefundsDashboard.js +33 -8
  46. package/dist/cjs/RefundsDashboard.js.map +1 -1
  47. package/dist/cjs/SplitTransfersDashboard.js +259 -62
  48. package/dist/cjs/SplitTransfersDashboard.js.map +1 -1
  49. package/dist/cjs/StripeConnect.js +2 -2
  50. package/dist/cjs/UpiMarkAsPaidButton.js +1 -1
  51. package/dist/cjs/UpiPayment.js +1 -1
  52. package/dist/cjs/V2PaymentsDashboard.js +4 -4
  53. package/dist/cjs/buildStripeTransactionLink.js +1 -1
  54. package/dist/cjs/constants.js +6 -0
  55. package/dist/cjs/constants.js.map +1 -1
  56. package/dist/cjs/exportChannel-2a51d2d8.js +24 -0
  57. package/dist/cjs/exportChannel-2a51d2d8.js.map +1 -0
  58. package/dist/cjs/{index-45e09f9d.js → index-c1abead3.js} +1 -1
  59. package/dist/cjs/{index-45e09f9d.js.map → index-c1abead3.js.map} +1 -1
  60. package/dist/cjs/index.js +12 -10
  61. package/dist/cjs/index.js.map +1 -1
  62. package/dist/cjs/{queryConstants-d80b151c.js → queryConstants-cee3a25c.js} +3 -2
  63. package/dist/cjs/queryConstants-cee3a25c.js.map +1 -0
  64. package/dist/cjs/{renderFunctions-2ce71130.js → renderFunctions-1109f706.js} +1 -1
  65. package/dist/cjs/{renderFunctions-2ce71130.js.map → renderFunctions-1109f706.js.map} +1 -1
  66. package/dist/cjs/{useConnectApi-7e80fd40.js → useConnectApi-6fa16e48.js} +2 -2
  67. package/dist/cjs/{useConnectApi-7e80fd40.js.map → useConnectApi-6fa16e48.js.map} +1 -1
  68. package/dist/cjs/{exportChannel-9f32f02e.js → useExportsApi-c932638b.js} +1 -21
  69. package/dist/cjs/useExportsApi-c932638b.js.map +1 -0
  70. package/dist/cjs/{useFiltersAndPagination-92122385.js → useFiltersAndPagination-273b22ef.js} +2 -2
  71. package/dist/cjs/{useFiltersAndPagination-92122385.js.map → useFiltersAndPagination-273b22ef.js.map} +1 -1
  72. package/dist/cjs/{usePaymentApi-aed31b4b.js → usePaymentApi-a73fbf17.js} +2 -2
  73. package/dist/cjs/{usePaymentApi-aed31b4b.js.map → usePaymentApi-a73fbf17.js.map} +1 -1
  74. package/dist/cjs/{usePaymentsApi-d6117d06.js → usePaymentsApi-7d59a030.js} +1 -1
  75. package/dist/cjs/{usePaymentsApi-d6117d06.js.map → usePaymentsApi-7d59a030.js.map} +1 -1
  76. package/dist/cjs/{usePlatformApi-2e36e5b0.js → usePlatformApi-a67a977b.js} +2 -2
  77. package/dist/cjs/{usePlatformApi-2e36e5b0.js.map → usePlatformApi-a67a977b.js.map} +1 -1
  78. package/dist/cjs/useRazorpayPayment.js +2 -2
  79. package/dist/constants.js +6 -1
  80. package/dist/constants.js.map +1 -1
  81. package/dist/{exportChannel-8d03ef0f.js → exportChannel-1da3d27c.js} +2 -18
  82. package/dist/exportChannel-1da3d27c.js.map +1 -0
  83. package/dist/{index-92fd4865.js → index-4c377784.js} +1 -1
  84. package/dist/{index-92fd4865.js.map → index-4c377784.js.map} +1 -1
  85. package/dist/index.js +12 -10
  86. package/dist/index.js.map +1 -1
  87. package/dist/{queryConstants-65ca40bc.js → queryConstants-27871137.js} +3 -2
  88. package/dist/queryConstants-27871137.js.map +1 -0
  89. package/dist/{renderFunctions-c701a29b.js → renderFunctions-d4afa84b.js} +1 -1
  90. package/dist/{renderFunctions-c701a29b.js.map → renderFunctions-d4afa84b.js.map} +1 -1
  91. package/dist/{useConnectApi-ff01fe01.js → useConnectApi-802a2a00.js} +2 -2
  92. package/dist/{useConnectApi-ff01fe01.js.map → useConnectApi-802a2a00.js.map} +1 -1
  93. package/dist/useExportsApi-33b2f83e.js +19 -0
  94. package/dist/useExportsApi-33b2f83e.js.map +1 -0
  95. package/dist/{useFiltersAndPagination-dd971674.js → useFiltersAndPagination-eb373dfb.js} +2 -2
  96. package/dist/{useFiltersAndPagination-dd971674.js.map → useFiltersAndPagination-eb373dfb.js.map} +1 -1
  97. package/dist/{usePaymentApi-6b31f3b2.js → usePaymentApi-2808fa20.js} +2 -2
  98. package/dist/{usePaymentApi-6b31f3b2.js.map → usePaymentApi-2808fa20.js.map} +1 -1
  99. package/dist/{usePaymentsApi-6387b978.js → usePaymentsApi-44077a54.js} +1 -1
  100. package/dist/{usePaymentsApi-6387b978.js.map → usePaymentsApi-44077a54.js.map} +1 -1
  101. package/dist/{usePlatformApi-825e78cf.js → usePlatformApi-a9c0ee16.js} +2 -2
  102. package/dist/{usePlatformApi-825e78cf.js.map → usePlatformApi-a9c0ee16.js.map} +1 -1
  103. package/dist/useRazorpayPayment.js +2 -2
  104. package/package.json +7 -7
  105. package/dist/ExportModal-2d866d2f.js.map +0 -1
  106. package/dist/cjs/ExportModal-4d6fbca1.js.map +0 -1
  107. package/dist/cjs/exportChannel-9f32f02e.js.map +0 -1
  108. package/dist/cjs/queryConstants-d80b151c.js.map +0 -1
  109. package/dist/exportChannel-8d03ef0f.js.map +0 -1
  110. package/dist/queryConstants-65ca40bc.js.map +0 -1
@@ -2,35 +2,40 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
3
3
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
4
4
  import { useState, startTransition } from 'react';
5
- import { getQueryParams, buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
5
+ import { currencyFormat, getQueryParams, buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
6
6
  import { buildFiltersFromURL } from '@bigbinary/neeto-filters-frontend/utils';
7
7
  import Spinner from '@bigbinary/neetoui/Spinner';
8
+ import { E as ExportModal } from './ExportModal-33915720.js';
8
9
  import { useQuery } from '@tanstack/react-query';
9
10
  import axios from 'axios';
10
- import { BASE_URL, DEFAULT_TAG_STYLE, PAYMENT_KIND, SORT_DIRECTIONS, DEFAULT_SORT_PROPERTIES, UN_HIDEABLE_COLUMNS, DEFAULT_PAGE_VALUES } from './constants.js';
11
- import { Q as QUERY_KEYS } from './queryConstants-65ca40bc.js';
11
+ import { BASE_URL, DEFAULT_TAG_STYLE, PAYMENT_KIND, SORT_DIRECTIONS, DEFAULT_SORT_PROPERTIES, UN_HIDEABLE_COLUMNS, DEFAULT_PAGE_VALUES, DASHBOARD_KIND } from './constants.js';
12
+ import { Q as QUERY_KEYS } from './queryConstants-27871137.js';
12
13
  import { t } from 'i18next';
13
- import { snakeToCamelCase, isNotPresent, removeBy, isPresent, camelToSnakeCase } from '@bigbinary/neeto-cist';
14
+ import { isNotPresent, isPresent, snakeToCamelCase, removeBy, camelToSnakeCase } from '@bigbinary/neeto-cist';
14
15
  import { useHiddenColumns } from '@bigbinary/neeto-molecules/Columns';
15
16
  import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
16
17
  import Table from '@bigbinary/neetoui/Table';
17
18
  import NoData from '@bigbinary/neetoui/NoData';
18
- import { curry, mergeDeepWith, concat, mergeLeft, reject, isNil, map, prop, sortBy, isEmpty, modify } from 'ramda';
19
+ import { mergeLeft, curry, mergeDeepWith, concat, reject, isNil, map, prop, sortBy, isEmpty, modify } from 'ramda';
19
20
  import { useTranslation } from 'react-i18next';
20
21
  import { useHistory } from 'react-router-dom';
21
- import { f as formatAmount, g as formatCurrency, p as processDataIndex, s as shouldTabsVisible } from './index-92fd4865.js';
22
- import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
22
+ import { f as formatAmount, g as formatCurrency, p as processDataIndex, s as shouldTabsVisible } from './index-4c377784.js';
23
+ import Pane from '@bigbinary/neetoui/Pane';
24
+ import Typography from '@bigbinary/neetoui/Typography';
23
25
  import Button from '@bigbinary/neetoui/Button';
26
+ import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
27
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
24
28
  import Tag from '@bigbinary/neetoui/Tag';
25
29
  import Tooltip from '@bigbinary/neetoui/Tooltip';
26
- import Typography from '@bigbinary/neetoui/Typography';
27
30
  import { C as CopyButtonWrapper } from './CopyButtonWrapper-54c5e270.js';
28
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
29
31
  import { DEFAULT_PAGE_INDEX, DEFAULT_PAGE_SIZE } from '@bigbinary/neeto-commons-frontend/constants';
30
32
  import FiltersBar from '@bigbinary/neeto-filters-frontend/Bar';
31
33
  import Header from '@bigbinary/neeto-molecules/Header';
32
34
  import SubHeader from '@bigbinary/neeto-molecules/SubHeader';
33
35
  import Tab from '@bigbinary/neetoui/Tab';
36
+ import '@bigbinary/neeto-icons/Download';
37
+ import '@bigbinary/neetoui/Modal';
38
+ import './exportChannel-1da3d27c.js';
34
39
  import '@bigbinary/neeto-molecules/CopyToClipboardButton';
35
40
 
36
41
  var list = function list(payload) {
@@ -38,8 +43,12 @@ var list = function list(payload) {
38
43
  params: payload
39
44
  });
40
45
  };
46
+ var show = function show(id) {
47
+ return axios.get("".concat(BASE_URL, "/api/v1/split_transfers/").concat(id));
48
+ };
41
49
  var splitTransfersApi = {
42
- list: list
50
+ list: list,
51
+ show: show
43
52
  };
44
53
 
45
54
  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; }
@@ -54,6 +63,14 @@ var useFetchSplitTransfers = function useFetchSplitTransfers() {
54
63
  }
55
64
  }, options));
56
65
  };
66
+ var useShowSplitTransfers = function useShowSplitTransfers(id, options) {
67
+ return useQuery(_objectSpread$2({
68
+ queryKey: [QUERY_KEYS.SPLIT_TRANSFERS_DETAILS, id],
69
+ queryFn: function queryFn() {
70
+ return splitTransfersApi.show(id);
71
+ }
72
+ }, options));
73
+ };
57
74
 
58
75
  var COLUMNS_STORAGE_KEY = "splitTransfersDashboard";
59
76
  var SPLIT_TRANSFERS_DASHBOARD_TAB = {
@@ -84,9 +101,147 @@ var TAG_STYLE = {
84
101
  cancelled: "secondary",
85
102
  pending: "warning"
86
103
  };
104
+ var INITIAL_TRANSFER_DETAILS = {
105
+ id: null,
106
+ isPaneOpen: false
107
+ };
108
+
109
+ var Date = function Date(_ref) {
110
+ var date = _ref.date,
111
+ _ref$isTimeVisible = _ref.isTimeVisible,
112
+ isTimeVisible = _ref$isTimeVisible === void 0 ? false : _ref$isTimeVisible;
113
+ var _useTranslation = useTranslation(),
114
+ t = _useTranslation.t;
115
+ if (isNotPresent(date)) {
116
+ return /*#__PURE__*/jsx(Typography, {
117
+ style: "body2",
118
+ children: t("neetoPayments.common.notAvailable")
119
+ });
120
+ }
121
+ if (isTimeVisible) {
122
+ return /*#__PURE__*/jsx("div", {
123
+ className: "flex items-center",
124
+ children: /*#__PURE__*/jsx(DateFormat.DateTime, {
125
+ date: date
126
+ })
127
+ });
128
+ }
129
+ return /*#__PURE__*/jsx("div", {
130
+ className: "flex items-center",
131
+ children: /*#__PURE__*/jsx(DateFormat.Date, {
132
+ date: date
133
+ })
134
+ });
135
+ };
87
136
 
88
- var renderIdentifier = function renderIdentifier(identifier, _ref) {
89
- var transferUrl = _ref.transferUrl;
137
+ var Details = function Details(_ref) {
138
+ var _splitTransfer$source, _splitTransfer$curren, _splitTransfer$curren2, _splitTransfer$curren3, _splitTransfer$destin, _splitTransfer$destin2;
139
+ var selectedTransfer = _ref.selectedTransfer,
140
+ setSelectedTransfer = _ref.setSelectedTransfer;
141
+ var _useTranslation = useTranslation(),
142
+ t = _useTranslation.t;
143
+ var _useShowSplitTransfer = useShowSplitTransfers(selectedTransfer["id"], {
144
+ enabled: isPresent(selectedTransfer["id"])
145
+ }),
146
+ isPending = _useShowSplitTransfer.isPending,
147
+ _useShowSplitTransfer2 = _useShowSplitTransfer.data,
148
+ _useShowSplitTransfer3 = _useShowSplitTransfer2 === void 0 ? {} : _useShowSplitTransfer2,
149
+ splitTransfer = _useShowSplitTransfer3.splitTransfer;
150
+ return /*#__PURE__*/jsxs(Pane, {
151
+ isOpen: selectedTransfer["isPaneOpen"],
152
+ size: "large",
153
+ onClose: function onClose() {
154
+ return setSelectedTransfer(mergeLeft({
155
+ isPaneOpen: false
156
+ }, selectedTransfer));
157
+ },
158
+ children: [/*#__PURE__*/jsx(Pane.Header, {
159
+ children: /*#__PURE__*/jsx(Typography, {
160
+ style: "h2",
161
+ children: t("neetoPayments.splitTransferDetails.title")
162
+ })
163
+ }), /*#__PURE__*/jsx(Pane.Body, {
164
+ children: isPending ? /*#__PURE__*/jsx("div", {
165
+ className: "flex h-full w-full items-center justify-center",
166
+ children: /*#__PURE__*/jsx(Spinner, {})
167
+ }) : /*#__PURE__*/jsxs(Fragment, {
168
+ children: [/*#__PURE__*/jsxs("div", {
169
+ className: "grid grid-cols-2 gap-3",
170
+ children: [/*#__PURE__*/jsx(Typography, {
171
+ style: "body1",
172
+ weight: "medium",
173
+ children: t("neetoPayments.common.identifier")
174
+ }), /*#__PURE__*/jsx(Typography, {
175
+ style: "body2",
176
+ children: splitTransfer === null || splitTransfer === void 0 ? void 0 : splitTransfer.identifier
177
+ }), /*#__PURE__*/jsx(Typography, {
178
+ style: "body1",
179
+ weight: "medium",
180
+ children: t("neetoPayments.common.transferTime")
181
+ }), /*#__PURE__*/jsx(Date, {
182
+ isTimeVisible: true,
183
+ date: splitTransfer === null || splitTransfer === void 0 ? void 0 : splitTransfer.paymentAt
184
+ }), /*#__PURE__*/jsx(Typography, {
185
+ style: "body1",
186
+ weight: "medium",
187
+ children: t("neetoPayments.common.paymentAmount")
188
+ }), /*#__PURE__*/jsx(Typography, {
189
+ style: "body2",
190
+ children: currencyFormat.withCode(splitTransfer === null || splitTransfer === void 0 ? void 0 : (_splitTransfer$source = splitTransfer.sourcePayment) === null || _splitTransfer$source === void 0 ? void 0 : _splitTransfer$source.amount, splitTransfer === null || splitTransfer === void 0 ? void 0 : (_splitTransfer$curren = splitTransfer.currency) === null || _splitTransfer$curren === void 0 ? void 0 : _splitTransfer$curren.toUpperCase())
191
+ }), /*#__PURE__*/jsx(Typography, {
192
+ style: "body1",
193
+ weight: "medium",
194
+ children: t("neetoPayments.common.transferredAmount")
195
+ }), /*#__PURE__*/jsx(Typography, {
196
+ style: "body2",
197
+ children: currencyFormat.withCode(splitTransfer === null || splitTransfer === void 0 ? void 0 : splitTransfer.amount, splitTransfer === null || splitTransfer === void 0 ? void 0 : (_splitTransfer$curren2 = splitTransfer.currency) === null || _splitTransfer$curren2 === void 0 ? void 0 : _splitTransfer$curren2.toUpperCase())
198
+ }), /*#__PURE__*/jsx(Typography, {
199
+ style: "body1",
200
+ weight: "medium",
201
+ children: t("neetoPayments.common.platformShare")
202
+ }), /*#__PURE__*/jsx(Typography, {
203
+ style: "body2",
204
+ children: currencyFormat.withCode(splitTransfer === null || splitTransfer === void 0 ? void 0 : splitTransfer.platformShare, splitTransfer === null || splitTransfer === void 0 ? void 0 : (_splitTransfer$curren3 = splitTransfer.currency) === null || _splitTransfer$curren3 === void 0 ? void 0 : _splitTransfer$curren3.toUpperCase())
205
+ })]
206
+ }), /*#__PURE__*/jsxs("div", {
207
+ className: "mt-5 space-y-4",
208
+ children: [/*#__PURE__*/jsx(Typography, {
209
+ style: "h3",
210
+ children: t("neetoPayments.splitTransferDetails.destinationDetails")
211
+ }), /*#__PURE__*/jsxs("div", {
212
+ className: "grid grid-cols-2 gap-3",
213
+ children: [/*#__PURE__*/jsx(Typography, {
214
+ style: "body1",
215
+ weight: "medium",
216
+ children: t("neetoPayments.common.destinationAccountIdentifier")
217
+ }), /*#__PURE__*/jsx(Button, {
218
+ href: splitTransfer.destinationAccount.dashboardUrl,
219
+ label: splitTransfer.destinationAccount.identifier,
220
+ size: "small",
221
+ style: "link",
222
+ target: "_blank"
223
+ }), /*#__PURE__*/jsx(Typography, {
224
+ style: "body1",
225
+ weight: "medium",
226
+ children: t("neetoPayments.splitTransferDetails.payoutInitiatedDate")
227
+ }), /*#__PURE__*/jsx(Date, {
228
+ date: splitTransfer === null || splitTransfer === void 0 ? void 0 : (_splitTransfer$destin = splitTransfer.destinationPayout) === null || _splitTransfer$destin === void 0 ? void 0 : _splitTransfer$destin.createdAt
229
+ }), /*#__PURE__*/jsx(Typography, {
230
+ style: "body1",
231
+ weight: "medium",
232
+ children: t("neetoPayments.splitTransferDetails.payoutArrivalDate")
233
+ }), /*#__PURE__*/jsx(Date, {
234
+ date: splitTransfer === null || splitTransfer === void 0 ? void 0 : (_splitTransfer$destin2 = splitTransfer.destinationPayout) === null || _splitTransfer$destin2 === void 0 ? void 0 : _splitTransfer$destin2.arrivalDate
235
+ }), /*#__PURE__*/jsx("div", {})]
236
+ })]
237
+ })]
238
+ })
239
+ })]
240
+ });
241
+ };
242
+
243
+ var renderIdentifier = curry(function (setSelectedTransfer, identifier, _ref) {
244
+ var id = _ref.id;
90
245
  if (isNotPresent(identifier)) {
91
246
  return /*#__PURE__*/jsx(Tooltip, {
92
247
  content: t("neetoPayments.tooltipContent.identifierUnavailable"),
@@ -103,14 +258,18 @@ var renderIdentifier = function renderIdentifier(identifier, _ref) {
103
258
  return /*#__PURE__*/jsx(CopyButtonWrapper, {
104
259
  content: identifier,
105
260
  children: /*#__PURE__*/jsx(Button, {
106
- href: transferUrl,
107
- label: identifier,
261
+ label: id,
108
262
  size: "small",
109
263
  style: "link",
110
- target: "_blank"
264
+ onClick: function onClick() {
265
+ return setSelectedTransfer({
266
+ id: id,
267
+ isPaneOpen: true
268
+ });
269
+ }
111
270
  })
112
271
  });
113
- };
272
+ });
114
273
  var renderPlatformPaymentIdentifier = function renderPlatformPaymentIdentifier(_ref2) {
115
274
  var identifier = _ref2.identifier,
116
275
  receiptUrl = _ref2.receiptUrl,
@@ -201,11 +360,11 @@ var renderPlatformShare = function renderPlatformShare(amount) {
201
360
  }
202
361
  return formatAmount(amount);
203
362
  };
204
- var getDefaultColumns = function getDefaultColumns() {
363
+ var getDefaultColumns = function getDefaultColumns(setSelectedTransfer) {
205
364
  return [{
206
365
  title: t("neetoPayments.common.id"),
207
- dataIndex: "id",
208
- key: "id",
366
+ dataIndex: "rowId",
367
+ key: "rowId",
209
368
  width: 85,
210
369
  position: 0,
211
370
  isHidable: false
@@ -214,7 +373,7 @@ var getDefaultColumns = function getDefaultColumns() {
214
373
  dataIndex: "identifier",
215
374
  key: "identifier",
216
375
  width: 300,
217
- render: renderIdentifier,
376
+ render: renderIdentifier(setSelectedTransfer),
218
377
  position: 1,
219
378
  isHidable: false
220
379
  }, {
@@ -286,10 +445,14 @@ var buildFilterColumns = function buildFilterColumns() {
286
445
  var payableEntityColumns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
287
446
  return reject(isNil, concat(FILTER_COLUMNS, map(prop("filterProps"), payableEntityColumns)));
288
447
  };
289
- var buildTableColumns = function buildTableColumns(tab, hiddenColumns) {
290
- var payableEntityColumns = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
291
- var filteredColumns = sortBy(prop("position"), concat(getDefaultColumns(), payableEntityColumns)).filter(function (_ref) {
292
- var dataIndex = _ref.dataIndex;
448
+ var buildTableColumns = function buildTableColumns(_ref) {
449
+ var tab = _ref.tab,
450
+ hiddenColumns = _ref.hiddenColumns,
451
+ _ref$payableEntityCol = _ref.payableEntityColumns,
452
+ payableEntityColumns = _ref$payableEntityCol === void 0 ? [] : _ref$payableEntityCol,
453
+ setSelectedTransfer = _ref.setSelectedTransfer;
454
+ var filteredColumns = sortBy(prop("position"), concat(getDefaultColumns(setSelectedTransfer), payableEntityColumns)).filter(function (_ref2) {
455
+ var dataIndex = _ref2.dataIndex;
293
456
  return !hiddenColumns.includes(processDataIndex(dataIndex));
294
457
  });
295
458
  if (tab === SPLIT_TRANSFERS_DASHBOARD_TAB.all) return filteredColumns;
@@ -297,24 +460,29 @@ var buildTableColumns = function buildTableColumns(tab, hiddenColumns) {
297
460
  key: "status"
298
461
  }, filteredColumns);
299
462
  };
300
- var buildRowData = function buildRowData(_ref2) {
301
- var splitTransfers = _ref2.splitTransfers,
302
- _ref2$pageProperties = _ref2.pageProperties,
303
- pageProperties = _ref2$pageProperties === void 0 ? {} : _ref2$pageProperties;
463
+ var buildRowData = function buildRowData(_ref3) {
464
+ var splitTransfers = _ref3.splitTransfers,
465
+ _ref3$pageProperties = _ref3.pageProperties,
466
+ pageProperties = _ref3$pageProperties === void 0 ? {} : _ref3$pageProperties;
304
467
  return splitTransfers === null || splitTransfers === void 0 ? void 0 : splitTransfers.map(function (element, index) {
305
468
  return _objectSpread$1(_objectSpread$1({}, element), {}, {
306
- id: isEmpty(pageProperties) ? index + 1 : pageProperties.pageSize * (pageProperties.page - 1) + index + 1
469
+ rowId: isEmpty(pageProperties) ? index + 1 : pageProperties.pageSize * (pageProperties.page - 1) + index + 1
307
470
  });
308
471
  });
309
472
  };
310
473
 
311
474
  var List = function List(_ref) {
312
- var splitTransfers = _ref.splitTransfers,
475
+ var isFetching = _ref.isFetching,
476
+ splitTransfers = _ref.splitTransfers,
313
477
  views = _ref.views,
314
478
  payableEntityColumns = _ref.payableEntityColumns,
315
479
  setPageProperties = _ref.setPageProperties,
316
480
  setSortProperties = _ref.setSortProperties,
317
481
  pageProperties = _ref.pageProperties;
482
+ var _useState = useState(INITIAL_TRANSFER_DETAILS),
483
+ _useState2 = _slicedToArray(_useState, 2),
484
+ selectedTransfer = _useState2[0],
485
+ setSelectedTransfer = _useState2[1];
318
486
  var _useTranslation = useTranslation(),
319
487
  t = _useTranslation.t;
320
488
  var history = useHistory();
@@ -326,7 +494,12 @@ var List = function List(_ref) {
326
494
  _useHiddenColumns$hid = _useHiddenColumns.hiddenColumns,
327
495
  hiddenColumns = _useHiddenColumns$hid === void 0 ? [] : _useHiddenColumns$hid;
328
496
  var splitTransfersCount = views[tab];
329
- var visibleColumns = buildTableColumns(tab, hiddenColumns, payableEntityColumns);
497
+ var visibleColumns = buildTableColumns({
498
+ tab: tab,
499
+ hiddenColumns: hiddenColumns,
500
+ payableEntityColumns: payableEntityColumns,
501
+ setSelectedTransfer: setSelectedTransfer
502
+ });
330
503
  var handleColumnHiding = function handleColumnHiding(column) {
331
504
  hideColumn(processDataIndex(column.dataIndex));
332
505
  };
@@ -359,31 +532,37 @@ var List = function List(_ref) {
359
532
  })
360
533
  });
361
534
  }
362
- return /*#__PURE__*/jsx(TableWrapper, {
363
- hasPagination: splitTransfersCount > (pageProperties === null || pageProperties === void 0 ? void 0 : pageProperties.pageSize),
364
- children: /*#__PURE__*/jsx(Table, {
365
- fixedHeight: true,
366
- allowRowClick: false,
367
- columnData: visibleColumns,
368
- currentPageNumber: pageProperties === null || pageProperties === void 0 ? void 0 : pageProperties.page,
369
- handlePageChange: handleTablePaginaton,
370
- rowData: buildRowData({
371
- splitTransfers: splitTransfers,
372
- pageProperties: pageProperties,
373
- tab: tab
374
- }),
375
- rowSelection: false,
376
- sortDirections: SORT_DIRECTIONS,
377
- totalCount: splitTransfersCount,
378
- paginationProps: {
379
- showSizeChanger: true,
380
- hideOnSinglePage: true,
381
- pageSize: pageProperties === null || pageProperties === void 0 ? void 0 : pageProperties.pageSize,
382
- total: splitTransfersCount
383
- },
384
- onChange: handleTableChange,
385
- onColumnHide: handleColumnHiding
386
- })
535
+ return /*#__PURE__*/jsxs(Fragment, {
536
+ children: [/*#__PURE__*/jsx(TableWrapper, {
537
+ hasPagination: splitTransfersCount > (pageProperties === null || pageProperties === void 0 ? void 0 : pageProperties.pageSize),
538
+ children: /*#__PURE__*/jsx(Table, {
539
+ fixedHeight: true,
540
+ allowRowClick: false,
541
+ columnData: visibleColumns,
542
+ currentPageNumber: pageProperties === null || pageProperties === void 0 ? void 0 : pageProperties.page,
543
+ handlePageChange: handleTablePaginaton,
544
+ loading: isFetching,
545
+ rowData: buildRowData({
546
+ splitTransfers: splitTransfers,
547
+ pageProperties: pageProperties,
548
+ tab: tab
549
+ }),
550
+ rowSelection: false,
551
+ sortDirections: SORT_DIRECTIONS,
552
+ totalCount: splitTransfersCount,
553
+ paginationProps: {
554
+ showSizeChanger: true,
555
+ hideOnSinglePage: true,
556
+ pageSize: pageProperties === null || pageProperties === void 0 ? void 0 : pageProperties.pageSize,
557
+ total: splitTransfersCount
558
+ },
559
+ onChange: handleTableChange,
560
+ onColumnHide: handleColumnHiding
561
+ })
562
+ }), /*#__PURE__*/jsx(Details, {
563
+ selectedTransfer: selectedTransfer,
564
+ setSelectedTransfer: setSelectedTransfer
565
+ })]
387
566
  });
388
567
  };
389
568
 
@@ -393,7 +572,8 @@ var TopSection = function TopSection(_ref) {
393
572
  setFilters = _ref.setFilters,
394
573
  filterableColumns = _ref.filterableColumns,
395
574
  searchKeywordProps = _ref.searchKeywordProps,
396
- payableEntityColumns = _ref.payableEntityColumns;
575
+ payableEntityColumns = _ref.payableEntityColumns,
576
+ setIsExportModalOpen = _ref.setIsExportModalOpen;
397
577
  var _useState = useState(false),
398
578
  _useState2 = _slicedToArray(_useState, 2),
399
579
  isFilterPaneOpen = _useState2[0],
@@ -464,6 +644,11 @@ var TopSection = function TopSection(_ref) {
464
644
  fixedColumns: UN_HIDEABLE_COLUMNS,
465
645
  localStorageKey: COLUMNS_STORAGE_KEY
466
646
  },
647
+ downloadButtonProps: {
648
+ onClick: function onClick() {
649
+ return setIsExportModalOpen(true);
650
+ }
651
+ },
467
652
  filterProps: {
468
653
  columns: filterableColumns,
469
654
  isOpen: isFilterPaneOpen,
@@ -495,10 +680,14 @@ var SplitTransfersDashboard = function SplitTransfersDashboard(_ref) {
495
680
  _useState4 = _slicedToArray(_useState3, 2),
496
681
  pageProperties = _useState4[0],
497
682
  setPageProperties = _useState4[1];
498
- var _useState5 = useState(buildFiltersFromURL([].concat(_toConsumableArray(filterableColumns), [searchKeywordProps]))),
683
+ var _useState5 = useState(false),
499
684
  _useState6 = _slicedToArray(_useState5, 2),
500
- filters = _useState6[0],
501
- setFilters = _useState6[1];
685
+ isExportModalOpen = _useState6[0],
686
+ setIsExportModalOpen = _useState6[1];
687
+ var _useState7 = useState(buildFiltersFromURL([].concat(_toConsumableArray(filterableColumns), [searchKeywordProps]))),
688
+ _useState8 = _slicedToArray(_useState7, 2),
689
+ filters = _useState8[0],
690
+ setFilters = _useState8[1];
502
691
  var _getQueryParams2 = getQueryParams(),
503
692
  _getQueryParams2$tab = _getQueryParams2.tab,
504
693
  tab = _getQueryParams2$tab === void 0 ? SPLIT_TRANSFERS_DASHBOARD_TAB.all : _getQueryParams2$tab;
@@ -506,14 +695,13 @@ var SplitTransfersDashboard = function SplitTransfersDashboard(_ref) {
506
695
  tab: tab,
507
696
  filters: filters
508
697
  }, pageProperties), sortProperties);
509
- var _useFetchSplitTransfe = useFetchSplitTransfers(payload, {
510
- enabled: true
511
- }),
698
+ var _useFetchSplitTransfe = useFetchSplitTransfers(payload),
512
699
  _useFetchSplitTransfe2 = _useFetchSplitTransfe.data,
513
700
  _useFetchSplitTransfe3 = _useFetchSplitTransfe2 === void 0 ? {} : _useFetchSplitTransfe2,
514
701
  splitTransfers = _useFetchSplitTransfe3.splitTransfers,
515
702
  views = _useFetchSplitTransfe3.views,
516
- isSplitTransfersLoading = _useFetchSplitTransfe.isLoading;
703
+ isFetching = _useFetchSplitTransfe.isFetching,
704
+ isSplitTransfersLoading = _useFetchSplitTransfe.isPending;
517
705
  if (isSplitTransfersLoading) {
518
706
  return /*#__PURE__*/jsx("div", {
519
707
  className: "flex h-full w-full items-center justify-center",
@@ -528,16 +716,24 @@ var SplitTransfersDashboard = function SplitTransfersDashboard(_ref) {
528
716
  payableEntityColumns: payableEntityColumns,
529
717
  searchKeywordProps: searchKeywordProps,
530
718
  setFilters: setFilters,
719
+ setIsExportModalOpen: setIsExportModalOpen,
531
720
  setPageProperties: setPageProperties,
532
721
  setSortProperties: setSortProperties,
533
722
  views: views
534
723
  }), /*#__PURE__*/jsx(List, {
724
+ isFetching: isFetching,
535
725
  pageProperties: pageProperties,
536
726
  payableEntityColumns: payableEntityColumns,
537
727
  setPageProperties: setPageProperties,
538
728
  setSortProperties: setSortProperties,
539
729
  splitTransfers: splitTransfers,
540
730
  views: views
731
+ }), /*#__PURE__*/jsx(ExportModal, {
732
+ filters: filters,
733
+ isExportModalOpen: isExportModalOpen,
734
+ setIsExportModalOpen: setIsExportModalOpen,
735
+ sortProperties: sortProperties,
736
+ dashboardKind: DASHBOARD_KIND.splitTransfers
541
737
  })]
542
738
  });
543
739
  };