@bigbinary/neeto-payments-frontend 3.0.3 → 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 (48) hide show
  1. package/app/javascript/src/translations/en.json +9 -1
  2. package/dist/AccountsDashboard.js +1 -1
  3. package/dist/Dashboard.js +3 -3
  4. package/dist/PaymentsDashboard.js +1 -1
  5. package/dist/PayoutsDashboard.js +3 -3
  6. package/dist/PayoutsPage.js +3 -3
  7. package/dist/RazorpayDashboard.js +2 -2
  8. package/dist/RazorpayPaymentButton.js +2 -2
  9. package/dist/RefundsDashboard.js +1 -1
  10. package/dist/SplitTransfersDashboard.js +227 -54
  11. package/dist/SplitTransfersDashboard.js.map +1 -1
  12. package/dist/StripeConnect.js +2 -2
  13. package/dist/V2PaymentsDashboard.js +1 -1
  14. package/dist/cjs/AccountsDashboard.js +1 -1
  15. package/dist/cjs/Dashboard.js +3 -3
  16. package/dist/cjs/PaymentsDashboard.js +1 -1
  17. package/dist/cjs/PayoutsDashboard.js +3 -3
  18. package/dist/cjs/PayoutsPage.js +3 -3
  19. package/dist/cjs/RazorpayDashboard.js +2 -2
  20. package/dist/cjs/RazorpayPaymentButton.js +2 -2
  21. package/dist/cjs/RefundsDashboard.js +1 -1
  22. package/dist/cjs/SplitTransfersDashboard.js +227 -53
  23. package/dist/cjs/SplitTransfersDashboard.js.map +1 -1
  24. package/dist/cjs/StripeConnect.js +2 -2
  25. package/dist/cjs/V2PaymentsDashboard.js +1 -1
  26. package/dist/cjs/index.js +4 -4
  27. package/dist/cjs/{queryConstants-d80b151c.js → queryConstants-cee3a25c.js} +3 -2
  28. package/dist/cjs/queryConstants-cee3a25c.js.map +1 -0
  29. package/dist/cjs/{useConnectApi-9024eec3.js → useConnectApi-6fa16e48.js} +2 -2
  30. package/dist/cjs/{useConnectApi-9024eec3.js.map → useConnectApi-6fa16e48.js.map} +1 -1
  31. package/dist/cjs/{usePaymentApi-4578d6b2.js → usePaymentApi-a73fbf17.js} +2 -2
  32. package/dist/cjs/{usePaymentApi-4578d6b2.js.map → usePaymentApi-a73fbf17.js.map} +1 -1
  33. package/dist/cjs/{usePlatformApi-a7d0c600.js → usePlatformApi-a67a977b.js} +2 -2
  34. package/dist/cjs/{usePlatformApi-a7d0c600.js.map → usePlatformApi-a67a977b.js.map} +1 -1
  35. package/dist/cjs/useRazorpayPayment.js +2 -2
  36. package/dist/index.js +4 -4
  37. package/dist/{queryConstants-65ca40bc.js → queryConstants-27871137.js} +3 -2
  38. package/dist/queryConstants-27871137.js.map +1 -0
  39. package/dist/{useConnectApi-df2ea319.js → useConnectApi-802a2a00.js} +2 -2
  40. package/dist/{useConnectApi-df2ea319.js.map → useConnectApi-802a2a00.js.map} +1 -1
  41. package/dist/{usePaymentApi-e2aa9755.js → usePaymentApi-2808fa20.js} +2 -2
  42. package/dist/{usePaymentApi-e2aa9755.js.map → usePaymentApi-2808fa20.js.map} +1 -1
  43. package/dist/{usePlatformApi-ddfa361c.js → usePlatformApi-a9c0ee16.js} +2 -2
  44. package/dist/{usePlatformApi-ddfa361c.js.map → usePlatformApi-a9c0ee16.js.map} +1 -1
  45. package/dist/useRazorpayPayment.js +2 -2
  46. package/package.json +7 -7
  47. package/dist/cjs/queryConstants-d80b151c.js.map +0 -1
  48. package/dist/queryConstants-65ca40bc.js.map +0 -1
@@ -38,6 +38,7 @@
38
38
  "export": "Export",
39
39
  "cancel": "Cancel",
40
40
  "paymentAmount": "Payment amount",
41
+ "transferredAmount": "Transferred amount",
41
42
  "search": "Search",
42
43
  "createdAt": "Created at",
43
44
  "country": "Country",
@@ -61,7 +62,8 @@
61
62
  "delete": "Delete",
62
63
  "transactionId": "Transaction ID",
63
64
  "paymentProvider": "Payment provider",
64
- "provider": "Provider"
65
+ "provider": "Provider",
66
+ "destinationAccountIdentifier": "Account identifier"
65
67
  },
66
68
  "alert": {
67
69
  "stripe": {
@@ -392,6 +394,12 @@
392
394
  "markAsPaid": "Mark as paid"
393
395
  }
394
396
  }
397
+ },
398
+ "splitTransferDetails": {
399
+ "title": "Split transfer details",
400
+ "destinationDetails": "Destination details",
401
+ "payoutInitiatedDate": "Payout to bank initiated on",
402
+ "payoutArrivalDate": "Estimated bank arrival date"
395
403
  }
396
404
  }
397
405
  }
@@ -34,7 +34,7 @@ import NoData from '@bigbinary/neetoui/NoData';
34
34
  import Spinner from '@bigbinary/neetoui/Spinner';
35
35
  import { useQuery } from '@tanstack/react-query';
36
36
  import axios from 'axios';
37
- import { Q as QUERY_KEYS } from './queryConstants-65ca40bc.js';
37
+ import { Q as QUERY_KEYS } from './queryConstants-27871137.js';
38
38
  import '@tanstack/react-query-devtools';
39
39
  import '@bigbinary/neeto-molecules/DateFormat';
40
40
  import '@bigbinary/neetoui/Tag';
package/dist/Dashboard.js CHANGED
@@ -26,8 +26,8 @@ import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
26
26
  import Table from '@bigbinary/neetoui/Table';
27
27
  import NoData from '@bigbinary/neetoui/NoData';
28
28
  import Spinner from '@bigbinary/neetoui/Spinner';
29
- import { u as useFetchStripeTransactions, a as useFetchConnectedStripeAccount } from './useConnectApi-df2ea319.js';
30
- import { u as useFetchStripeRefunds, a as useFetchStripePlatformTransactions, b as useFetchStripePlatformSplits, c as useFetchStripePlatformTransaction, d as useFetchStripePlatformAccount } from './usePlatformApi-ddfa361c.js';
29
+ import { u as useFetchStripeTransactions, a as useFetchConnectedStripeAccount } from './useConnectApi-802a2a00.js';
30
+ import { u as useFetchStripeRefunds, a as useFetchStripePlatformTransactions, b as useFetchStripePlatformSplits, c as useFetchStripePlatformTransaction, d as useFetchStripePlatformAccount } from './usePlatformApi-a9c0ee16.js';
31
31
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
32
32
  import Down from '@bigbinary/neeto-icons/Down';
33
33
  import Right from '@bigbinary/neeto-icons/Right';
@@ -48,7 +48,7 @@ import './useExportsApi-33b2f83e.js';
48
48
  import './exportChannel-1da3d27c.js';
49
49
  import './IdentifierButton-350fcc55.js';
50
50
  import 'qs';
51
- import './queryConstants-65ca40bc.js';
51
+ import './queryConstants-27871137.js';
52
52
 
53
53
  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; }
54
54
  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; }
@@ -9,7 +9,7 @@ import { E as ExportModal } from './ExportModal-33915720.js';
9
9
  import { useQuery } from '@tanstack/react-query';
10
10
  import axios from 'axios';
11
11
  import { BASE_URL, PAYMENT_PROVIDERS, DEFAULT_TAG_STYLE, SORT_DIRECTIONS, DEFAULT_SORT_PROPERTIES, UN_HIDEABLE_COLUMNS, DEFAULT_PAGE_VALUES, DASHBOARD_KIND } from './constants.js';
12
- import { Q as QUERY_KEYS } from './queryConstants-65ca40bc.js';
12
+ import { Q as QUERY_KEYS } from './queryConstants-27871137.js';
13
13
  import { t } from 'i18next';
14
14
  import { toLabelAndValue, snakeToCamelCase, humanize, isNotPresent, isPresent, camelToSnakeCase } from '@bigbinary/neeto-cist';
15
15
  import { map, curry, mergeDeepWith, concat, mergeLeft, reject, isNil, prop, isEmpty, modify } from 'ramda';
@@ -31,8 +31,8 @@ import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
31
31
  import Table from '@bigbinary/neetoui/Table';
32
32
  import NoData from '@bigbinary/neetoui/NoData';
33
33
  import Spinner from '@bigbinary/neetoui/Spinner';
34
- import { b as useFetchStripePayouts } from './useConnectApi-df2ea319.js';
35
- import { e as useFetchStripePlatformPayouts } from './usePlatformApi-ddfa361c.js';
34
+ import { b as useFetchStripePayouts } from './useConnectApi-802a2a00.js';
35
+ import { e as useFetchStripePlatformPayouts } from './usePlatformApi-a9c0ee16.js';
36
36
  import '@tanstack/react-query';
37
37
  import '@tanstack/react-query-devtools';
38
38
  import '@bigbinary/neeto-molecules/DateFormat';
@@ -41,7 +41,7 @@ import '@bigbinary/neetoui/Tooltip';
41
41
  import 'axios';
42
42
  import '@bigbinary/neeto-molecules/CopyToClipboardButton';
43
43
  import 'qs';
44
- import './queryConstants-65ca40bc.js';
44
+ import './queryConstants-27871137.js';
45
45
 
46
46
  var TAB = {
47
47
  all: "all",
@@ -7,8 +7,8 @@ import Typography from '@bigbinary/neetoui/Typography';
7
7
  import { useTranslation } from 'react-i18next';
8
8
  import { useParams } from 'react-router-dom/cjs/react-router-dom';
9
9
  import { r as renderStatus, c as renderDate } from './renderFunctions-d4afa84b.js';
10
- import { c as useShowStripePayout } from './useConnectApi-df2ea319.js';
11
- import { f as useShowStripePlatformPayout } from './usePlatformApi-ddfa361c.js';
10
+ import { c as useShowStripePayout } from './useConnectApi-802a2a00.js';
11
+ import { f as useShowStripePlatformPayout } from './usePlatformApi-a9c0ee16.js';
12
12
  import { C as CopyButtonWrapper } from './CopyButtonWrapper-54c5e270.js';
13
13
  import { I as IdentifierButton } from './IdentifierButton-350fcc55.js';
14
14
  import { j as buildStripePayoutLink } from './index-4c377784.js';
@@ -27,7 +27,7 @@ import '@bigbinary/neetoui/Tooltip';
27
27
  import '@bigbinary/neeto-commons-frontend/react-utils';
28
28
  import 'axios';
29
29
  import 'qs';
30
- import './queryConstants-65ca40bc.js';
30
+ import './queryConstants-27871137.js';
31
31
  import '@bigbinary/neeto-molecules/CopyToClipboardButton';
32
32
  import 'react';
33
33
  import '@bigbinary/neeto-commons-frontend/utils';
@@ -19,8 +19,8 @@ import { useHistory } from 'react-router-dom';
19
19
  import { useQuery } from '@tanstack/react-query';
20
20
  import axios from 'axios';
21
21
  import { BASE_URL, SORT_DIRECTIONS, DEFAULT_SORT_PROPERTIES } from './constants.js';
22
- import { Q as QUERY_KEYS } from './queryConstants-65ca40bc.js';
23
- import { u as useFetchRazorpayPayments } from './usePaymentApi-e2aa9755.js';
22
+ import { Q as QUERY_KEYS } from './queryConstants-27871137.js';
23
+ import { u as useFetchRazorpayPayments } from './usePaymentApi-2808fa20.js';
24
24
  import { p as processDataIndex } from './index-4c377784.js';
25
25
  import { jsx, jsxs } from 'react/jsx-runtime';
26
26
  import '@bigbinary/neeto-filters-frontend/Bar';
@@ -4,13 +4,13 @@ import { noop, findBy, isNotPresent } from '@bigbinary/neeto-cist';
4
4
  import Button from '@bigbinary/neetoui/Button';
5
5
  import { mergeDeepLeft } from 'ramda';
6
6
  import { useTranslation } from 'react-i18next';
7
- import { a as useCreateRazorpayPayment } from './usePaymentApi-e2aa9755.js';
7
+ import { a as useCreateRazorpayPayment } from './usePaymentApi-2808fa20.js';
8
8
  import { RAZORPAY_PAYMENT_BUTTON_OPTIONS } from './constants.js';
9
9
  import { jsx } from 'react/jsx-runtime';
10
10
  import '@babel/runtime/helpers/defineProperty';
11
11
  import '@tanstack/react-query';
12
12
  import 'axios';
13
- import './queryConstants-65ca40bc.js';
13
+ import './queryConstants-27871137.js';
14
14
  import 'i18next';
15
15
  import '@bigbinary/neeto-commons-frontend/constants';
16
16
 
@@ -9,7 +9,7 @@ import { E as ExportModal } from './ExportModal-33915720.js';
9
9
  import { useQuery } from '@tanstack/react-query';
10
10
  import axios from 'axios';
11
11
  import { BASE_URL, PAYMENT_PROVIDERS, DEFAULT_TAG_STYLE, SORT_DIRECTIONS, DEFAULT_SORT_PROPERTIES, UN_HIDEABLE_COLUMNS, DEFAULT_PAGE_VALUES, DASHBOARD_KIND } from './constants.js';
12
- import { Q as QUERY_KEYS } from './queryConstants-65ca40bc.js';
12
+ import { Q as QUERY_KEYS } from './queryConstants-27871137.js';
13
13
  import { t } from 'i18next';
14
14
  import { toLabelAndValue, snakeToCamelCase, humanize, isNotPresent, isPresent, camelToSnakeCase } from '@bigbinary/neeto-cist';
15
15
  import { map, curry, mergeDeepWith, concat, mergeLeft, reject, isNil, prop, isEmpty, modify } from 'ramda';
@@ -2,31 +2,32 @@ 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
8
  import { E as ExportModal } from './ExportModal-33915720.js';
9
9
  import { useQuery } from '@tanstack/react-query';
10
10
  import axios from 'axios';
11
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-65ca40bc.js';
12
+ import { Q as QUERY_KEYS } from './queryConstants-27871137.js';
13
13
  import { t } from 'i18next';
14
- import { snakeToCamelCase, isNotPresent, removeBy, isPresent, camelToSnakeCase } from '@bigbinary/neeto-cist';
14
+ import { isNotPresent, isPresent, snakeToCamelCase, removeBy, camelToSnakeCase } from '@bigbinary/neeto-cist';
15
15
  import { useHiddenColumns } from '@bigbinary/neeto-molecules/Columns';
16
16
  import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
17
17
  import Table from '@bigbinary/neetoui/Table';
18
18
  import NoData from '@bigbinary/neetoui/NoData';
19
- 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';
20
20
  import { useTranslation } from 'react-i18next';
21
21
  import { useHistory } from 'react-router-dom';
22
22
  import { f as formatAmount, g as formatCurrency, p as processDataIndex, s as shouldTabsVisible } from './index-4c377784.js';
23
- import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
23
+ import Pane from '@bigbinary/neetoui/Pane';
24
+ import Typography from '@bigbinary/neetoui/Typography';
24
25
  import Button from '@bigbinary/neetoui/Button';
26
+ import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
27
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
25
28
  import Tag from '@bigbinary/neetoui/Tag';
26
29
  import Tooltip from '@bigbinary/neetoui/Tooltip';
27
- import Typography from '@bigbinary/neetoui/Typography';
28
30
  import { C as CopyButtonWrapper } from './CopyButtonWrapper-54c5e270.js';
29
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
30
31
  import { DEFAULT_PAGE_INDEX, DEFAULT_PAGE_SIZE } from '@bigbinary/neeto-commons-frontend/constants';
31
32
  import FiltersBar from '@bigbinary/neeto-filters-frontend/Bar';
32
33
  import Header from '@bigbinary/neeto-molecules/Header';
@@ -42,8 +43,12 @@ var list = function list(payload) {
42
43
  params: payload
43
44
  });
44
45
  };
46
+ var show = function show(id) {
47
+ return axios.get("".concat(BASE_URL, "/api/v1/split_transfers/").concat(id));
48
+ };
45
49
  var splitTransfersApi = {
46
- list: list
50
+ list: list,
51
+ show: show
47
52
  };
48
53
 
49
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; }
@@ -58,6 +63,14 @@ var useFetchSplitTransfers = function useFetchSplitTransfers() {
58
63
  }
59
64
  }, options));
60
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
+ };
61
74
 
62
75
  var COLUMNS_STORAGE_KEY = "splitTransfersDashboard";
63
76
  var SPLIT_TRANSFERS_DASHBOARD_TAB = {
@@ -88,9 +101,147 @@ var TAG_STYLE = {
88
101
  cancelled: "secondary",
89
102
  pending: "warning"
90
103
  };
104
+ var INITIAL_TRANSFER_DETAILS = {
105
+ id: null,
106
+ isPaneOpen: false
107
+ };
91
108
 
92
- var renderIdentifier = function renderIdentifier(identifier, _ref) {
93
- var transferUrl = _ref.transferUrl;
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
+ };
136
+
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;
94
245
  if (isNotPresent(identifier)) {
95
246
  return /*#__PURE__*/jsx(Tooltip, {
96
247
  content: t("neetoPayments.tooltipContent.identifierUnavailable"),
@@ -107,14 +258,18 @@ var renderIdentifier = function renderIdentifier(identifier, _ref) {
107
258
  return /*#__PURE__*/jsx(CopyButtonWrapper, {
108
259
  content: identifier,
109
260
  children: /*#__PURE__*/jsx(Button, {
110
- href: transferUrl,
111
- label: identifier,
261
+ label: id,
112
262
  size: "small",
113
263
  style: "link",
114
- target: "_blank"
264
+ onClick: function onClick() {
265
+ return setSelectedTransfer({
266
+ id: id,
267
+ isPaneOpen: true
268
+ });
269
+ }
115
270
  })
116
271
  });
117
- };
272
+ });
118
273
  var renderPlatformPaymentIdentifier = function renderPlatformPaymentIdentifier(_ref2) {
119
274
  var identifier = _ref2.identifier,
120
275
  receiptUrl = _ref2.receiptUrl,
@@ -205,11 +360,11 @@ var renderPlatformShare = function renderPlatformShare(amount) {
205
360
  }
206
361
  return formatAmount(amount);
207
362
  };
208
- var getDefaultColumns = function getDefaultColumns() {
363
+ var getDefaultColumns = function getDefaultColumns(setSelectedTransfer) {
209
364
  return [{
210
365
  title: t("neetoPayments.common.id"),
211
- dataIndex: "id",
212
- key: "id",
366
+ dataIndex: "rowId",
367
+ key: "rowId",
213
368
  width: 85,
214
369
  position: 0,
215
370
  isHidable: false
@@ -218,7 +373,7 @@ var getDefaultColumns = function getDefaultColumns() {
218
373
  dataIndex: "identifier",
219
374
  key: "identifier",
220
375
  width: 300,
221
- render: renderIdentifier,
376
+ render: renderIdentifier(setSelectedTransfer),
222
377
  position: 1,
223
378
  isHidable: false
224
379
  }, {
@@ -290,10 +445,14 @@ var buildFilterColumns = function buildFilterColumns() {
290
445
  var payableEntityColumns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
291
446
  return reject(isNil, concat(FILTER_COLUMNS, map(prop("filterProps"), payableEntityColumns)));
292
447
  };
293
- var buildTableColumns = function buildTableColumns(tab, hiddenColumns) {
294
- var payableEntityColumns = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
295
- var filteredColumns = sortBy(prop("position"), concat(getDefaultColumns(), payableEntityColumns)).filter(function (_ref) {
296
- 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;
297
456
  return !hiddenColumns.includes(processDataIndex(dataIndex));
298
457
  });
299
458
  if (tab === SPLIT_TRANSFERS_DASHBOARD_TAB.all) return filteredColumns;
@@ -301,13 +460,13 @@ var buildTableColumns = function buildTableColumns(tab, hiddenColumns) {
301
460
  key: "status"
302
461
  }, filteredColumns);
303
462
  };
304
- var buildRowData = function buildRowData(_ref2) {
305
- var splitTransfers = _ref2.splitTransfers,
306
- _ref2$pageProperties = _ref2.pageProperties,
307
- 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;
308
467
  return splitTransfers === null || splitTransfers === void 0 ? void 0 : splitTransfers.map(function (element, index) {
309
468
  return _objectSpread$1(_objectSpread$1({}, element), {}, {
310
- 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
311
470
  });
312
471
  });
313
472
  };
@@ -320,6 +479,10 @@ var List = function List(_ref) {
320
479
  setPageProperties = _ref.setPageProperties,
321
480
  setSortProperties = _ref.setSortProperties,
322
481
  pageProperties = _ref.pageProperties;
482
+ var _useState = useState(INITIAL_TRANSFER_DETAILS),
483
+ _useState2 = _slicedToArray(_useState, 2),
484
+ selectedTransfer = _useState2[0],
485
+ setSelectedTransfer = _useState2[1];
323
486
  var _useTranslation = useTranslation(),
324
487
  t = _useTranslation.t;
325
488
  var history = useHistory();
@@ -331,7 +494,12 @@ var List = function List(_ref) {
331
494
  _useHiddenColumns$hid = _useHiddenColumns.hiddenColumns,
332
495
  hiddenColumns = _useHiddenColumns$hid === void 0 ? [] : _useHiddenColumns$hid;
333
496
  var splitTransfersCount = views[tab];
334
- var visibleColumns = buildTableColumns(tab, hiddenColumns, payableEntityColumns);
497
+ var visibleColumns = buildTableColumns({
498
+ tab: tab,
499
+ hiddenColumns: hiddenColumns,
500
+ payableEntityColumns: payableEntityColumns,
501
+ setSelectedTransfer: setSelectedTransfer
502
+ });
335
503
  var handleColumnHiding = function handleColumnHiding(column) {
336
504
  hideColumn(processDataIndex(column.dataIndex));
337
505
  };
@@ -364,32 +532,37 @@ var List = function List(_ref) {
364
532
  })
365
533
  });
366
534
  }
367
- return /*#__PURE__*/jsx(TableWrapper, {
368
- hasPagination: splitTransfersCount > (pageProperties === null || pageProperties === void 0 ? void 0 : pageProperties.pageSize),
369
- children: /*#__PURE__*/jsx(Table, {
370
- fixedHeight: true,
371
- allowRowClick: false,
372
- columnData: visibleColumns,
373
- currentPageNumber: pageProperties === null || pageProperties === void 0 ? void 0 : pageProperties.page,
374
- handlePageChange: handleTablePaginaton,
375
- loading: isFetching,
376
- rowData: buildRowData({
377
- splitTransfers: splitTransfers,
378
- pageProperties: pageProperties,
379
- tab: tab
380
- }),
381
- rowSelection: false,
382
- sortDirections: SORT_DIRECTIONS,
383
- totalCount: splitTransfersCount,
384
- paginationProps: {
385
- showSizeChanger: true,
386
- hideOnSinglePage: true,
387
- pageSize: pageProperties === null || pageProperties === void 0 ? void 0 : pageProperties.pageSize,
388
- total: splitTransfersCount
389
- },
390
- onChange: handleTableChange,
391
- onColumnHide: handleColumnHiding
392
- })
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
+ })]
393
566
  });
394
567
  };
395
568