@bigbinary/neeto-payments-frontend 1.4.19 → 1.5.0
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/README.md +0 -95
- package/app/javascript/src/translations/en.json +0 -15
- package/dist/AccountsDashboard.js +1 -1
- package/dist/Dashboard.js +3 -3
- package/dist/PayoutsDashboard.js +3 -3
- package/dist/PayoutsPage.js +3 -3
- package/dist/RazorpayDashboard.js +4 -4
- package/dist/RazorpayDashboard.js.map +1 -1
- package/dist/RazorpayPaymentButton.js +2 -2
- package/dist/StripeConnect.js +2 -2
- package/dist/V2PaymentsDashboard.js +2 -2
- package/dist/cjs/AccountsDashboard.js +1 -1
- package/dist/cjs/Dashboard.js +3 -3
- package/dist/cjs/PayoutsDashboard.js +3 -3
- package/dist/cjs/PayoutsPage.js +3 -3
- package/dist/cjs/RazorpayDashboard.js +4 -4
- package/dist/cjs/RazorpayDashboard.js.map +1 -1
- package/dist/cjs/RazorpayPaymentButton.js +2 -2
- package/dist/cjs/StripeConnect.js +2 -2
- package/dist/cjs/V2PaymentsDashboard.js +2 -2
- package/dist/cjs/index.js +6 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/{queryConstants-a6a3c360.js → queryConstants-45f84f3e.js} +1 -4
- package/dist/cjs/queryConstants-45f84f3e.js.map +1 -0
- package/dist/cjs/{useConnectApi-b8770f71.js → useConnectApi-f248a942.js} +2 -2
- package/dist/cjs/{useConnectApi-b8770f71.js.map → useConnectApi-f248a942.js.map} +1 -1
- package/dist/cjs/{useFiltersAndPagination-a5f10d80.js → useFiltersAndPagination-4ab52847.js} +12 -145
- package/dist/cjs/useFiltersAndPagination-4ab52847.js.map +1 -0
- package/dist/cjs/{usePaymentApi-a0b4ea86.js → usePaymentApi-8ef50777.js} +3 -3
- package/dist/cjs/usePaymentApi-8ef50777.js.map +1 -0
- package/dist/cjs/{usePlatformApi-c77f6fdd.js → usePlatformApi-4eca1acd.js} +3 -3
- package/dist/cjs/{usePlatformApi-c77f6fdd.js.map → usePlatformApi-4eca1acd.js.map} +1 -1
- package/dist/cjs/useRazorpayPayment.js +2 -2
- package/dist/index.js +6 -10
- package/dist/index.js.map +1 -1
- package/dist/{queryConstants-9b7fe0cf.js → queryConstants-7d91832f.js} +1 -4
- package/dist/queryConstants-7d91832f.js.map +1 -0
- package/dist/{useConnectApi-185a67ad.js → useConnectApi-f74b7a05.js} +2 -2
- package/dist/{useConnectApi-185a67ad.js.map → useConnectApi-f74b7a05.js.map} +1 -1
- package/dist/{useFiltersAndPagination-e5dc4b96.js → useFiltersAndPagination-ad2d332e.js} +12 -142
- package/dist/useFiltersAndPagination-ad2d332e.js.map +1 -0
- package/dist/{usePaymentApi-8b68e636.js → usePaymentApi-04ce2d23.js} +3 -3
- package/dist/usePaymentApi-04ce2d23.js.map +1 -0
- package/dist/{usePlatformApi-5dba6b28.js → usePlatformApi-c3fc984a.js} +3 -3
- package/dist/{usePlatformApi-5dba6b28.js.map → usePlatformApi-c3fc984a.js.map} +1 -1
- package/dist/useRazorpayPayment.js +2 -2
- package/package.json +6 -7
- package/types.d.ts +0 -3
- package/dist/SquareCard.js +0 -65
- package/dist/SquareCard.js.map +0 -1
- package/dist/SquareDashboard.js +0 -294
- package/dist/SquareDashboard.js.map +0 -1
- package/dist/cjs/SquareCard.js +0 -73
- package/dist/cjs/SquareCard.js.map +0 -1
- package/dist/cjs/SquareDashboard.js +0 -305
- package/dist/cjs/SquareDashboard.js.map +0 -1
- package/dist/cjs/index-042b6907.js +0 -6
- package/dist/cjs/index-042b6907.js.map +0 -1
- package/dist/cjs/queryConstants-a6a3c360.js.map +0 -1
- package/dist/cjs/useFiltersAndPagination-a5f10d80.js.map +0 -1
- package/dist/cjs/usePaymentApi-a0b4ea86.js.map +0 -1
- package/dist/cjs/useSquareCard.js +0 -32
- package/dist/cjs/useSquareCard.js.map +0 -1
- package/dist/index-87824935.js +0 -4
- package/dist/index-87824935.js.map +0 -1
- package/dist/queryConstants-9b7fe0cf.js.map +0 -1
- package/dist/useFiltersAndPagination-e5dc4b96.js.map +0 -1
- package/dist/usePaymentApi-8b68e636.js.map +0 -1
- package/dist/useSquareCard.js +0 -30
- package/dist/useSquareCard.js.map +0 -1
- package/types/SquareCard.d.ts +0 -14
- package/types/SquareDashboard.d.ts +0 -13
- package/types/useSquareCard.d.ts +0 -9
package/README.md
CHANGED
|
@@ -202,42 +202,6 @@ const App = () => {
|
|
|
202
202
|
export default App;
|
|
203
203
|
```
|
|
204
204
|
|
|
205
|
-
#### 3. `SquareCard` ([source code](https://github.com/bigbinary/neeto-payments-nano/blob/42ad8330442696b102d8555930162d75cf94931e/app/javascript/src/components/SquareCard/index.jsx))
|
|
206
|
-
|
|
207
|
-
**Props**
|
|
208
|
-
- `card`: The Square card instance.
|
|
209
|
-
- `setCard`: Function to set the Square card instance.
|
|
210
|
-
|
|
211
|
-
**Optional Props**
|
|
212
|
-
- `onChange`: Event handler function triggered on Square card events.
|
|
213
|
-
- `id`: ID of the container element for the Square card. Defaults to `square-card-container`.
|
|
214
|
-
- `options`: Configuration options for the Square card. Defaults to `{}`.
|
|
215
|
-
- `disabled`: Disables pointer events if set to `true`. Defaults to `false`.
|
|
216
|
-
|
|
217
|
-
**Usage**
|
|
218
|
-
```jsx
|
|
219
|
-
import React, { useState } from "react";
|
|
220
|
-
import { SquareCard } from "@bigbinary/neeto-payments-frontend";
|
|
221
|
-
|
|
222
|
-
const App = () => {
|
|
223
|
-
const [squareCard, setSquareCard] = useState(null);
|
|
224
|
-
const handleCardChange = event => {
|
|
225
|
-
// Handle Square card events
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
return (
|
|
229
|
-
<SquareCard
|
|
230
|
-
card={squareCard}
|
|
231
|
-
setCard={setSquareCard}
|
|
232
|
-
onChange={handleCardChange}
|
|
233
|
-
disabled={false}
|
|
234
|
-
/>
|
|
235
|
-
);
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
export default App;
|
|
239
|
-
```
|
|
240
|
-
|
|
241
205
|
#### 4. `PayoutsDashboard` ([source code](https://github.com/bigbinary/neeto-payments-nano/blob/42ad8330442696b102d8555930162d75cf94931e/app/javascript/src/components/PayoutsDashboard/index.jsx))
|
|
242
206
|
|
|
243
207
|
**Props**
|
|
@@ -261,50 +225,6 @@ const App = () => {
|
|
|
261
225
|
export default App;
|
|
262
226
|
```
|
|
263
227
|
|
|
264
|
-
#### 5. `SquareDashboard` ([source code](https://github.com/bigbinary/neeto-payments-nano/blob/42ad8330442696b102d8555930162d75cf94931e/app/javascript/src/components/SquareDashboard/index.jsx))
|
|
265
|
-
|
|
266
|
-
**Props**
|
|
267
|
-
- `searchProps`: To specify the search props to be passed to the neetoUI `Header`
|
|
268
|
-
component used in the `Dashboard`.
|
|
269
|
-
|
|
270
|
-
**Optional Props**
|
|
271
|
-
- `holdableId`: To specify the ID of the entity that holds the stripe
|
|
272
|
-
account. If the value is not specified, the current
|
|
273
|
-
organization ID is taken as the default value while querying for
|
|
274
|
-
transactions.
|
|
275
|
-
- `payableEntityColumns`: To specify the columns from the payable entity
|
|
276
|
-
which need to be additionally displayed. Defaults to `[]`.
|
|
277
|
-
- `kind`: To specify the type of payment. Defaults to `squarePayment`.
|
|
278
|
-
- `headerProps`: To specify the props to be passed to the neetoUI `Header`
|
|
279
|
-
component used in the `Dashboard`. Defaults to `{}`.
|
|
280
|
-
|
|
281
|
-
**Usage**
|
|
282
|
-
```jsx
|
|
283
|
-
import React from "react";
|
|
284
|
-
import { SquareDashboard } from "@bigbinary/neeto-payments-frontend";
|
|
285
|
-
|
|
286
|
-
const App = () => {
|
|
287
|
-
const searchProps = {
|
|
288
|
-
placeholder: "Search...",
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
const headerProps = {
|
|
292
|
-
className: "w-80",
|
|
293
|
-
// Your header properties
|
|
294
|
-
};
|
|
295
|
-
return (
|
|
296
|
-
<SquareDashboard
|
|
297
|
-
searchProps={searchProps}
|
|
298
|
-
headerProps={headerProps}
|
|
299
|
-
kind="squarePayment"
|
|
300
|
-
payableEntityColumns=[]
|
|
301
|
-
/>
|
|
302
|
-
);
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
export default App;
|
|
306
|
-
```
|
|
307
|
-
|
|
308
228
|
### Hooks
|
|
309
229
|
#### 1. `useStripePromise` ([source code](https://github.com/bigbinary/neeto-payments-nano/blob/42ad8330442696b102d8555930162d75cf94931e/app/javascript/src/hooks/useStripePromise.js))
|
|
310
230
|
|
|
@@ -326,21 +246,6 @@ identifier as input and returns a `Promise`.
|
|
|
326
246
|
</Elements>
|
|
327
247
|
```
|
|
328
248
|
|
|
329
|
-
#### 2. `useSquareCard` ([source code](https://github.com/bigbinary/neeto-payments-nano/blob/42ad8330442696b102d8555930162d75cf94931e/app/javascript/src/hooks/useSquareCard.js))
|
|
330
|
-
|
|
331
|
-
- This hook manages the state and functionality related to the Square card instance, providing methods for setting the card, accessing the current card instance, and tokenizing the card.
|
|
332
|
-
- Usage in [neetoInvoice](https://github.com/bigbinary/neeto-payments-nano/blob/42ad8330442696b102d8555930162d75cf94931e/app/javascript/src/hooks/useSquareCard.js).
|
|
333
|
-
|
|
334
|
-
**Returns**
|
|
335
|
-
- `card`: The Square card instance.
|
|
336
|
-
- `setCard`: Function to set the Square card instance.
|
|
337
|
-
- `tokenizeCard`: Asynchronous function to tokenize the Square card instance. It returns a Promise that resolves to the tokenized card. If no card instance is found, a warning is logged, and an empty string is returned. If tokenization is successful, the token is returned. In case of errors during tokenization, an error is logged, and an empty string is returned.
|
|
338
|
-
|
|
339
|
-
**Usage**
|
|
340
|
-
```jsx
|
|
341
|
-
const { card, setCard, tokenizeCard } = useSquareCard();
|
|
342
|
-
```
|
|
343
|
-
|
|
344
249
|
### Functions
|
|
345
250
|
#### 1. `buildStripeTransactionLink` ([source code](https://github.com/bigbinary/neeto-payments-nano/blob/42ad8330442696b102d8555930162d75cf94931e/app/javascript/src/utils/index.js#L3))
|
|
346
251
|
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
"paymentIdentifier": "Payment identifier",
|
|
27
27
|
"notAvailable": "-",
|
|
28
28
|
"rejected": "Rejected",
|
|
29
|
-
"squarePayments": "Square Payments",
|
|
30
29
|
"razorpayPayments": "Razorpay payments",
|
|
31
30
|
"upiPayments": "UPI payments",
|
|
32
31
|
"completed": "Completed",
|
|
@@ -75,8 +74,6 @@
|
|
|
75
74
|
"split": "Stripe split transfers",
|
|
76
75
|
"transfer": "Stripe standard transactions",
|
|
77
76
|
"refund": "Stripe refunds",
|
|
78
|
-
"squarePayment": "Square payments",
|
|
79
|
-
"squareRefund": "Square refunds",
|
|
80
77
|
"account": "Standard accounts",
|
|
81
78
|
"payouts": "Stripe payouts"
|
|
82
79
|
},
|
|
@@ -93,10 +90,6 @@
|
|
|
93
90
|
"refundWithStatus": "There are no {{status}} refunds.",
|
|
94
91
|
"account": "There are no standard accounts.",
|
|
95
92
|
"accountWithStatus": "There are no {{status}} standard accounts.",
|
|
96
|
-
"squarePayment": "There are no payments.",
|
|
97
|
-
"squarePaymentWithStatus": "There are no {{status}} payments.",
|
|
98
|
-
"squareRefund": "There are no refunds.",
|
|
99
|
-
"squareRefundWithStatus": "There are no {{status}} refunds.",
|
|
100
93
|
"razorpayPayment": "There are no payments.",
|
|
101
94
|
"razorpayPaymentWithStatus": "There are no {{status}} payments.",
|
|
102
95
|
"upiPayment": "There are no payments.",
|
|
@@ -263,14 +256,6 @@
|
|
|
263
256
|
"refund_other": "{{count}} refunds",
|
|
264
257
|
"refundWithStatus": "{{count}} {{status}} refund",
|
|
265
258
|
"refundWithStatus_other": "{{count}} {{status}} refunds",
|
|
266
|
-
"squarePayment": "{{count}} payment",
|
|
267
|
-
"squarePayment_other": "{{count}} payments",
|
|
268
|
-
"squarePaymentWithStatus": "{{count}} {{status}} payment",
|
|
269
|
-
"squarePaymentWithStatus_other": "{{count}} {{status}} payments",
|
|
270
|
-
"squareRefund": "{{count}} refund",
|
|
271
|
-
"squareRefund_other": "{{count}} refunds",
|
|
272
|
-
"squareRefundWithStatus": "{{count}} {{status}} refund",
|
|
273
|
-
"squareRefundWithStatus_other": "{{count}} {{status}} refunds",
|
|
274
259
|
"account": "{{count}} standard account",
|
|
275
260
|
"account_other": "{{count}} standard accounts",
|
|
276
261
|
"accountWithStatus": "{{count}} {{status}} standard account",
|
|
@@ -27,7 +27,7 @@ import Table from '@bigbinary/neetoui/Table';
|
|
|
27
27
|
import NoData from '@bigbinary/neetoui/NoData';
|
|
28
28
|
import { useQuery } from 'react-query';
|
|
29
29
|
import axios from 'axios';
|
|
30
|
-
import { Q as QUERY_KEYS } from './queryConstants-
|
|
30
|
+
import { Q as QUERY_KEYS } from './queryConstants-7d91832f.js';
|
|
31
31
|
import 'react-query/devtools';
|
|
32
32
|
import '@bigbinary/neetoui/Toastr';
|
|
33
33
|
import '@bigbinary/neeto-molecules/DateFormat';
|
package/dist/Dashboard.js
CHANGED
|
@@ -23,8 +23,8 @@ import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
|
23
23
|
import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
|
|
24
24
|
import Table from '@bigbinary/neetoui/Table';
|
|
25
25
|
import NoData from '@bigbinary/neetoui/NoData';
|
|
26
|
-
import { u as useFetchStripeTransactions, a as useFetchConnectedStripeAccount } from './useConnectApi-
|
|
27
|
-
import { u as useFetchStripeRefunds, a as useFetchStripePlatformTransactions, b as useFetchStripePlatformSplits, c as useFetchStripePlatformTransaction, d as useFetchStripePlatformAccount } from './usePlatformApi-
|
|
26
|
+
import { u as useFetchStripeTransactions, a as useFetchConnectedStripeAccount } from './useConnectApi-f74b7a05.js';
|
|
27
|
+
import { u as useFetchStripeRefunds, a as useFetchStripePlatformTransactions, b as useFetchStripePlatformSplits, c as useFetchStripePlatformTransaction, d as useFetchStripePlatformAccount } from './usePlatformApi-c3fc984a.js';
|
|
28
28
|
import { Down, Right } from '@bigbinary/neeto-icons';
|
|
29
29
|
import Pane from '@bigbinary/neetoui/Pane';
|
|
30
30
|
import 'react-query';
|
|
@@ -40,7 +40,7 @@ import 'axios';
|
|
|
40
40
|
import './exportChannel-e0822151.js';
|
|
41
41
|
import './IdentifierButton-73cadb18.js';
|
|
42
42
|
import 'util';
|
|
43
|
-
import './queryConstants-
|
|
43
|
+
import './queryConstants-7d91832f.js';
|
|
44
44
|
|
|
45
45
|
const useFiltersAndPagination = _ref => {
|
|
46
46
|
let {
|
package/dist/PayoutsDashboard.js
CHANGED
|
@@ -24,8 +24,8 @@ import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
|
24
24
|
import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
|
|
25
25
|
import Table from '@bigbinary/neetoui/Table';
|
|
26
26
|
import NoData from '@bigbinary/neetoui/NoData';
|
|
27
|
-
import { b as useFetchStripePayouts } from './useConnectApi-
|
|
28
|
-
import { e as useFetchStripePlatformPayouts } from './usePlatformApi-
|
|
27
|
+
import { b as useFetchStripePayouts } from './useConnectApi-f74b7a05.js';
|
|
28
|
+
import { e as useFetchStripePlatformPayouts } from './usePlatformApi-c3fc984a.js';
|
|
29
29
|
import 'react-query';
|
|
30
30
|
import 'react-query/devtools';
|
|
31
31
|
import '@bigbinary/neetoui/Toastr';
|
|
@@ -35,7 +35,7 @@ import '@bigbinary/neetoui/Tooltip';
|
|
|
35
35
|
import '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
36
36
|
import 'axios';
|
|
37
37
|
import 'util';
|
|
38
|
-
import './queryConstants-
|
|
38
|
+
import './queryConstants-7d91832f.js';
|
|
39
39
|
|
|
40
40
|
const TAB = {
|
|
41
41
|
all: "all",
|
package/dist/PayoutsPage.js
CHANGED
|
@@ -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 { C as CopyButtonWrapper, r as renderStatus, c as renderDate } from './renderFunctions-5f829290.js';
|
|
10
|
-
import { c as useShowStripePayout } from './useConnectApi-
|
|
11
|
-
import { f as useShowStripePlatformPayout } from './usePlatformApi-
|
|
10
|
+
import { c as useShowStripePayout } from './useConnectApi-f74b7a05.js';
|
|
11
|
+
import { f as useShowStripePlatformPayout } from './usePlatformApi-c3fc984a.js';
|
|
12
12
|
import { I as IdentifierButton } from './IdentifierButton-73cadb18.js';
|
|
13
13
|
import { f as buildStripePayoutLink } from './index-48f8b281.js';
|
|
14
14
|
import Dashboard from './Dashboard.js';
|
|
@@ -27,7 +27,7 @@ import '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
|
27
27
|
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
28
28
|
import 'axios';
|
|
29
29
|
import 'util';
|
|
30
|
-
import './queryConstants-
|
|
30
|
+
import './queryConstants-7d91832f.js';
|
|
31
31
|
import '@bigbinary/neeto-filters-frontend';
|
|
32
32
|
import '@bigbinary/neeto-molecules/SubHeader';
|
|
33
33
|
import '@bigbinary/neetoui/Tab';
|
|
@@ -3,7 +3,7 @@ import React__default, { useEffect, useState } from 'react';
|
|
|
3
3
|
import { t } from 'i18next';
|
|
4
4
|
import { withTitle } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { b as buildPaymentColumns, i as isPaymentKind, u as useFiltersAndPagination, F as FilterWrapper } from './useFiltersAndPagination-
|
|
6
|
+
import { b as buildPaymentColumns, i as isPaymentKind, u as useFiltersAndPagination, F as FilterWrapper } from './useFiltersAndPagination-ad2d332e.js';
|
|
7
7
|
import { e as buildPayload, f as buildRowData, w as withReactQuery } from './renderFunctions-5f829290.js';
|
|
8
8
|
import { E as ExportModal } from './ExportModal-a00544db.js';
|
|
9
9
|
import { isPresent, camelToSnakeCase } from '@bigbinary/neeto-cist';
|
|
@@ -18,8 +18,8 @@ import { useHistory } from 'react-router-dom';
|
|
|
18
18
|
import { useQuery } from 'react-query';
|
|
19
19
|
import axios from 'axios';
|
|
20
20
|
import { BASE_URL, SORT_DIRECTIONS, DEFAULT_SORT_PROPERTIES } from './constants.js';
|
|
21
|
-
import { Q as QUERY_KEYS } from './queryConstants-
|
|
22
|
-
import { u as useFetchRazorpayPayments } from './usePaymentApi-
|
|
21
|
+
import { Q as QUERY_KEYS } from './queryConstants-7d91832f.js';
|
|
22
|
+
import { u as useFetchRazorpayPayments } from './usePaymentApi-04ce2d23.js';
|
|
23
23
|
import { p as processDataIndex } from './index-48f8b281.js';
|
|
24
24
|
import '@bigbinary/neeto-filters-frontend';
|
|
25
25
|
import '@bigbinary/neeto-molecules/Header';
|
|
@@ -57,7 +57,7 @@ const accountsApi = {
|
|
|
57
57
|
|
|
58
58
|
const useFetchRazorpayAccount = function (holdableId) {
|
|
59
59
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
60
|
-
return useQuery([QUERY_KEYS.
|
|
60
|
+
return useQuery([QUERY_KEYS.RAZORPAY_ACCOUNT_DETAILS, holdableId], () => {
|
|
61
61
|
if (isPresent(holdableId)) return accountsApi.show(holdableId);
|
|
62
62
|
return accountsApi.defaultShow();
|
|
63
63
|
}, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RazorpayDashboard.js","sources":["../app/javascript/src/components/RazorpayDashboard/constants/index.js","../app/javascript/src/apis/razorpay/accounts.js","../app/javascript/src/hooks/reactQuery/razorpay/useAccountApi.js","../app/javascript/src/components/RazorpayDashboard/List.jsx","../app/javascript/src/components/RazorpayDashboard/index.jsx"],"sourcesContent":["export const TAB = {\n all: \"all\",\n successful: \"successful\",\n declined: \"declined\",\n refunded: \"refunded\",\n};\n\nexport const TABS = Object.values(TAB);\n","import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst defaultShow = () =>\n axios.get(`${BASE_URL}/api/v1/razorpay/holdable/account`);\n\nconst show = holdableId =>\n axios.get(`${BASE_URL}/api/v1/razorpay/holdables/${holdableId}/account`);\n\nconst accountsApi = { defaultShow, show };\n\nexport default accountsApi;\n","import { isPresent } from \"neetocist\";\nimport { useQuery } from \"react-query\";\n\nimport accountsApi from \"apis/razorpay/accounts\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchRazorpayAccount = (holdableId, options = {}) =>\n useQuery(\n [QUERY_KEYS.SQUARE_ACCOUNT_DETAILS, holdableId],\n () => {\n if (isPresent(holdableId)) return accountsApi.show(holdableId);\n\n return accountsApi.defaultShow();\n },\n options\n );\n","import React, { useEffect } from \"react\";\n\nimport { camelToSnakeCase, isPresent } from \"neetocist\";\nimport { buildUrl, getQueryParams } from \"neetocommons/utils\";\nimport { useHiddenColumns } from \"neetomolecules/Columns\";\nimport PageLoader from \"neetomolecules/PageLoader\";\nimport TableWrapper from \"neetomolecules/TableWrapper\";\nimport { Table, NoData } from \"neetoui\";\nimport { assoc, mergeLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { useFetchRazorpayAccount } from \"hooks/reactQuery/razorpay/useAccountApi\";\nimport { useFetchRazorpayPayments } from \"hooks/reactQuery/razorpay/usePaymentApi\";\nimport { DEFAULT_SORT_PROPERTIES, SORT_DIRECTIONS } from \"src/constants\";\nimport { processDataIndex } from \"utils\";\nimport { buildPayload, buildRowData } from \"utils/dashboard\";\n\nimport { TAB } from \"./constants\";\nimport { buildPaymentColumns, isPaymentKind } from \"./utils\";\n\nconst List = ({\n holdableId,\n kind,\n filters,\n setIsFilterButtonVisible,\n pageProperties,\n payableEntityColumns,\n setPageProperties,\n tab,\n sortProperties,\n setSortProperties,\n setDataSize,\n}) => {\n const history = useHistory();\n const { t } = useTranslation();\n const columnData = buildPaymentColumns({\n tab,\n kind,\n payableEntityColumns,\n });\n\n const { isLoading: isAccountLoading, data: { account } = {} } =\n useFetchRazorpayAccount();\n\n const payload = buildPayload({\n tab,\n filters,\n pageProperties,\n sortProperties,\n });\n\n const { hideColumn, hiddenColumns = [] } = useHiddenColumns(\n `paymentDashboard_${kind}`\n );\n\n const {\n data: { payments, views = {} } = {},\n isLoading: isPaymentsLoaidng,\n isFetching,\n } = useFetchRazorpayPayments(holdableId, payload, {\n enabled: isPaymentKind(kind),\n });\n\n useEffect(() => {\n setIsFilterButtonVisible(isPresent(payments) || isPresent(filters));\n setDataSize(views[tab]);\n }, [payments]);\n\n const handleTablePaginaton = (page, pageSize) => {\n const queryParams = getQueryParams({ toCamelCase: false });\n history.push(\n buildUrl(\n window.location.pathname,\n mergeLeft({ page, page_size: pageSize }, queryParams)\n )\n );\n setPageProperties(assoc(tab, { page, pageSize }));\n };\n\n const handleTableChange = (_, __, sorter) => {\n setSortProperties(\n isPresent(sorter?.column)\n ? {\n sortBy: camelToSnakeCase(sorter.field),\n orderBy: sorter.order === \"ascend\" ? \"ASC\" : \"DESC\",\n }\n : DEFAULT_SORT_PROPERTIES\n );\n };\n\n const visibleColumns = columnData.filter(\n ({ dataIndex }) => !hiddenColumns.includes(processDataIndex(dataIndex))\n );\n\n if (isAccountLoading || isPaymentsLoaidng) {\n return <PageLoader />;\n }\n\n if ((!account?.isConnected && views <= 0) || !isPresent(payments)) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <NoData\n title={\n tab === TAB.all\n ? t(`neetoPayments.emptyState.${kind}`)\n : t(`neetoPayments.emptyState.${kind}WithStatus`, { status: tab })\n }\n />\n </div>\n );\n }\n\n return (\n <TableWrapper hasPagination={views > pageProperties[tab]?.pageSize}>\n <Table\n fixedHeight\n allowRowClick={false}\n columnData={visibleColumns}\n currentPageNumber={pageProperties[tab]?.page}\n handlePageChange={handleTablePaginaton}\n loading={isFetching}\n rowData={buildRowData({ data: payments, pageProperties, tab })}\n rowSelection={false}\n sortDirections={SORT_DIRECTIONS}\n totalCount={views}\n paginationProps={{\n showSizeChanger: true,\n hideOnSinglePage: true,\n pageSize: pageProperties[tab]?.pageSize,\n total: views,\n }}\n onChange={handleTableChange}\n onColumnHide={columnData => {\n hideColumn(processDataIndex(columnData.dataIndex));\n }}\n />\n </TableWrapper>\n );\n};\n\nexport default List;\n","import React, { useState } from \"react\";\n\nimport { t } from \"i18next\";\nimport { withTitle } from \"neetocommons/react-utils\";\nimport { useTranslation } from \"react-i18next\";\n\nimport FilterWrapper from \"components/Common/FilterWrapper\";\nimport withReactQuery from \"components/Common/withReactQuery\";\nimport ExportModal from \"components/Dashboard/ExportModal\";\nimport { useFiltersAndPagination } from \"hooks/useFiltersAndPagination\";\n\nimport { TABS } from \"./constants\";\nimport List from \"./List\";\n\nconst RazorpayDashboard = ({\n searchProps,\n headerProps = {},\n holdableId = null,\n payableEntityColumns = [],\n kind = \"razorpayPayment\",\n}) => {\n const [showExportModal, setShowExportModal] = useState(false);\n const { t } = useTranslation();\n const filterPaginationState = useFiltersAndPagination({\n payableEntityColumns,\n kind,\n initialTabs: TABS,\n tabMetaData: {},\n });\n\n const {\n filters,\n setIsFilterButtonVisible,\n pageProperties,\n setPageProperties,\n sortProperties,\n setSortProperties,\n tab,\n setDataSize,\n } = filterPaginationState;\n\n return (\n <FilterWrapper\n title={t(\"neetoPayments.common.razorpayPayments\")}\n {...{\n headerProps,\n kind,\n payableEntityColumns,\n searchProps,\n setShowExportModal,\n ...filterPaginationState,\n }}\n >\n <List\n {...{\n filters,\n holdableId,\n kind,\n pageProperties,\n payableEntityColumns,\n setDataSize,\n setIsFilterButtonVisible,\n setPageProperties,\n setSortProperties,\n sortProperties,\n tab,\n }}\n />\n <ExportModal\n {...{\n filters,\n holdableId,\n kind,\n setShowExportModal,\n showExportModal,\n sortProperties,\n tab,\n }}\n />\n </FilterWrapper>\n );\n};\n\nexport default withTitle(\n withReactQuery(RazorpayDashboard),\n t(\"neetoPayments.common.razorpayPayments\")\n);\n"],"names":["TAB","all","successful","declined","refunded","TABS","Object","values","defaultShow","axios","get","BASE_URL","show","holdableId","accountsApi","useFetchRazorpayAccount","options","arguments","length","undefined","useQuery","QUERY_KEYS","SQUARE_ACCOUNT_DETAILS","isPresent","List","_ref","kind","filters","setIsFilterButtonVisible","pageProperties","payableEntityColumns","setPageProperties","tab","sortProperties","setSortProperties","setDataSize","history","useHistory","t","useTranslation","columnData","buildPaymentColumns","isLoading","isAccountLoading","data","account","payload","buildPayload","hideColumn","hiddenColumns","useHiddenColumns","payments","views","isPaymentsLoaidng","isFetching","useFetchRazorpayPayments","enabled","isPaymentKind","useEffect","handleTablePaginaton","page","pageSize","queryParams","getQueryParams","toCamelCase","push","buildUrl","window","location","pathname","mergeLeft","page_size","assoc","handleTableChange","_","__","sorter","column","sortBy","camelToSnakeCase","field","orderBy","order","DEFAULT_SORT_PROPERTIES","visibleColumns","filter","_ref2","dataIndex","includes","processDataIndex","React","createElement","PageLoader","isConnected","className","NoData","title","status","TableWrapper","hasPagination","Table","fixedHeight","allowRowClick","currentPageNumber","handlePageChange","loading","rowData","buildRowData","rowSelection","sortDirections","SORT_DIRECTIONS","totalCount","paginationProps","showSizeChanger","hideOnSinglePage","total","onChange","onColumnHide","RazorpayDashboard","searchProps","headerProps","showExportModal","setShowExportModal","useState","filterPaginationState","useFiltersAndPagination","initialTabs","tabMetaData","FilterWrapper","_extends","ExportModal","withTitle","withReactQuery"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,GAAG,GAAG;AACjBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,QAAQ,EAAE,UAAA;AACZ,CAAC,CAAA;AAEM,MAAMC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACP,GAAG,CAAC;;ACHtC,MAAMQ,WAAW,GAAGA,MAClBC,KAAK,CAACC,GAAG,CAAE,CAAA,EAAEC,QAAS,CAAA,iCAAA,CAAkC,CAAC,CAAA;AAE3D,MAAMC,IAAI,GAAGC,UAAU,IACrBJ,KAAK,CAACC,GAAG,CAAE,C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IACfxF,cAAc;AACdD,IAAAA,GAAAA;AAAG,GAEN,CACY,CAAC,CAAA;AAEpB,CAAC,CAAA;AAED,YAAemG,SAAS,CACtBC,cAAc,CAACd,iBAAiB,CAAC,EACjChF,CAAC,CAAC,uCAAuC,CAC3C,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"RazorpayDashboard.js","sources":["../app/javascript/src/components/RazorpayDashboard/constants/index.js","../app/javascript/src/apis/razorpay/accounts.js","../app/javascript/src/hooks/reactQuery/razorpay/useAccountApi.js","../app/javascript/src/components/RazorpayDashboard/List.jsx","../app/javascript/src/components/RazorpayDashboard/index.jsx"],"sourcesContent":["export const TAB = {\n all: \"all\",\n successful: \"successful\",\n declined: \"declined\",\n refunded: \"refunded\",\n};\n\nexport const TABS = Object.values(TAB);\n","import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst defaultShow = () =>\n axios.get(`${BASE_URL}/api/v1/razorpay/holdable/account`);\n\nconst show = holdableId =>\n axios.get(`${BASE_URL}/api/v1/razorpay/holdables/${holdableId}/account`);\n\nconst accountsApi = { defaultShow, show };\n\nexport default accountsApi;\n","import { isPresent } from \"neetocist\";\nimport { useQuery } from \"react-query\";\n\nimport accountsApi from \"apis/razorpay/accounts\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchRazorpayAccount = (holdableId, options = {}) =>\n useQuery(\n [QUERY_KEYS.RAZORPAY_ACCOUNT_DETAILS, holdableId],\n () => {\n if (isPresent(holdableId)) return accountsApi.show(holdableId);\n\n return accountsApi.defaultShow();\n },\n options\n );\n","import React, { useEffect } from \"react\";\n\nimport { camelToSnakeCase, isPresent } from \"neetocist\";\nimport { buildUrl, getQueryParams } from \"neetocommons/utils\";\nimport { useHiddenColumns } from \"neetomolecules/Columns\";\nimport PageLoader from \"neetomolecules/PageLoader\";\nimport TableWrapper from \"neetomolecules/TableWrapper\";\nimport { Table, NoData } from \"neetoui\";\nimport { assoc, mergeLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { useFetchRazorpayAccount } from \"hooks/reactQuery/razorpay/useAccountApi\";\nimport { useFetchRazorpayPayments } from \"hooks/reactQuery/razorpay/usePaymentApi\";\nimport { DEFAULT_SORT_PROPERTIES, SORT_DIRECTIONS } from \"src/constants\";\nimport { processDataIndex } from \"utils\";\nimport { buildPayload, buildRowData } from \"utils/dashboard\";\n\nimport { TAB } from \"./constants\";\nimport { buildPaymentColumns, isPaymentKind } from \"./utils\";\n\nconst List = ({\n holdableId,\n kind,\n filters,\n setIsFilterButtonVisible,\n pageProperties,\n payableEntityColumns,\n setPageProperties,\n tab,\n sortProperties,\n setSortProperties,\n setDataSize,\n}) => {\n const history = useHistory();\n const { t } = useTranslation();\n const columnData = buildPaymentColumns({\n tab,\n kind,\n payableEntityColumns,\n });\n\n const { isLoading: isAccountLoading, data: { account } = {} } =\n useFetchRazorpayAccount();\n\n const payload = buildPayload({\n tab,\n filters,\n pageProperties,\n sortProperties,\n });\n\n const { hideColumn, hiddenColumns = [] } = useHiddenColumns(\n `paymentDashboard_${kind}`\n );\n\n const {\n data: { payments, views = {} } = {},\n isLoading: isPaymentsLoaidng,\n isFetching,\n } = useFetchRazorpayPayments(holdableId, payload, {\n enabled: isPaymentKind(kind),\n });\n\n useEffect(() => {\n setIsFilterButtonVisible(isPresent(payments) || isPresent(filters));\n setDataSize(views[tab]);\n }, [payments]);\n\n const handleTablePaginaton = (page, pageSize) => {\n const queryParams = getQueryParams({ toCamelCase: false });\n history.push(\n buildUrl(\n window.location.pathname,\n mergeLeft({ page, page_size: pageSize }, queryParams)\n )\n );\n setPageProperties(assoc(tab, { page, pageSize }));\n };\n\n const handleTableChange = (_, __, sorter) => {\n setSortProperties(\n isPresent(sorter?.column)\n ? {\n sortBy: camelToSnakeCase(sorter.field),\n orderBy: sorter.order === \"ascend\" ? \"ASC\" : \"DESC\",\n }\n : DEFAULT_SORT_PROPERTIES\n );\n };\n\n const visibleColumns = columnData.filter(\n ({ dataIndex }) => !hiddenColumns.includes(processDataIndex(dataIndex))\n );\n\n if (isAccountLoading || isPaymentsLoaidng) {\n return <PageLoader />;\n }\n\n if ((!account?.isConnected && views <= 0) || !isPresent(payments)) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <NoData\n title={\n tab === TAB.all\n ? t(`neetoPayments.emptyState.${kind}`)\n : t(`neetoPayments.emptyState.${kind}WithStatus`, { status: tab })\n }\n />\n </div>\n );\n }\n\n return (\n <TableWrapper hasPagination={views > pageProperties[tab]?.pageSize}>\n <Table\n fixedHeight\n allowRowClick={false}\n columnData={visibleColumns}\n currentPageNumber={pageProperties[tab]?.page}\n handlePageChange={handleTablePaginaton}\n loading={isFetching}\n rowData={buildRowData({ data: payments, pageProperties, tab })}\n rowSelection={false}\n sortDirections={SORT_DIRECTIONS}\n totalCount={views}\n paginationProps={{\n showSizeChanger: true,\n hideOnSinglePage: true,\n pageSize: pageProperties[tab]?.pageSize,\n total: views,\n }}\n onChange={handleTableChange}\n onColumnHide={columnData => {\n hideColumn(processDataIndex(columnData.dataIndex));\n }}\n />\n </TableWrapper>\n );\n};\n\nexport default List;\n","import React, { useState } from \"react\";\n\nimport { t } from \"i18next\";\nimport { withTitle } from \"neetocommons/react-utils\";\nimport { useTranslation } from \"react-i18next\";\n\nimport FilterWrapper from \"components/Common/FilterWrapper\";\nimport withReactQuery from \"components/Common/withReactQuery\";\nimport ExportModal from \"components/Dashboard/ExportModal\";\nimport { useFiltersAndPagination } from \"hooks/useFiltersAndPagination\";\n\nimport { TABS } from \"./constants\";\nimport List from \"./List\";\n\nconst RazorpayDashboard = ({\n searchProps,\n headerProps = {},\n holdableId = null,\n payableEntityColumns = [],\n kind = \"razorpayPayment\",\n}) => {\n const [showExportModal, setShowExportModal] = useState(false);\n const { t } = useTranslation();\n const filterPaginationState = useFiltersAndPagination({\n payableEntityColumns,\n kind,\n initialTabs: TABS,\n tabMetaData: {},\n });\n\n const {\n filters,\n setIsFilterButtonVisible,\n pageProperties,\n setPageProperties,\n sortProperties,\n setSortProperties,\n tab,\n setDataSize,\n } = filterPaginationState;\n\n return (\n <FilterWrapper\n title={t(\"neetoPayments.common.razorpayPayments\")}\n {...{\n headerProps,\n kind,\n payableEntityColumns,\n searchProps,\n setShowExportModal,\n ...filterPaginationState,\n }}\n >\n <List\n {...{\n filters,\n holdableId,\n kind,\n pageProperties,\n payableEntityColumns,\n setDataSize,\n setIsFilterButtonVisible,\n setPageProperties,\n setSortProperties,\n sortProperties,\n tab,\n }}\n />\n <ExportModal\n {...{\n filters,\n holdableId,\n kind,\n setShowExportModal,\n showExportModal,\n sortProperties,\n tab,\n }}\n />\n </FilterWrapper>\n );\n};\n\nexport default withTitle(\n withReactQuery(RazorpayDashboard),\n t(\"neetoPayments.common.razorpayPayments\")\n);\n"],"names":["TAB","all","successful","declined","refunded","TABS","Object","values","defaultShow","axios","get","BASE_URL","show","holdableId","accountsApi","useFetchRazorpayAccount","options","arguments","length","undefined","useQuery","QUERY_KEYS","RAZORPAY_ACCOUNT_DETAILS","isPresent","List","_ref","kind","filters","setIsFilterButtonVisible","pageProperties","payableEntityColumns","setPageProperties","tab","sortProperties","setSortProperties","setDataSize","history","useHistory","t","useTranslation","columnData","buildPaymentColumns","isLoading","isAccountLoading","data","account","payload","buildPayload","hideColumn","hiddenColumns","useHiddenColumns","payments","views","isPaymentsLoaidng","isFetching","useFetchRazorpayPayments","enabled","isPaymentKind","useEffect","handleTablePaginaton","page","pageSize","queryParams","getQueryParams","toCamelCase","push","buildUrl","window","location","pathname","mergeLeft","page_size","assoc","handleTableChange","_","__","sorter","column","sortBy","camelToSnakeCase","field","orderBy","order","DEFAULT_SORT_PROPERTIES","visibleColumns","filter","_ref2","dataIndex","includes","processDataIndex","React","createElement","PageLoader","isConnected","className","NoData","title","status","TableWrapper","hasPagination","Table","fixedHeight","allowRowClick","currentPageNumber","handlePageChange","loading","rowData","buildRowData","rowSelection","sortDirections","SORT_DIRECTIONS","totalCount","paginationProps","showSizeChanger","hideOnSinglePage","total","onChange","onColumnHide","RazorpayDashboard","searchProps","headerProps","showExportModal","setShowExportModal","useState","filterPaginationState","useFiltersAndPagination","initialTabs","tabMetaData","FilterWrapper","_extends","ExportModal","withTitle","withReactQuery"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,GAAG,GAAG;AACjBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,QAAQ,EAAE,UAAA;AACZ,CAAC,CAAA;AAEM,MAAMC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACP,GAAG,CAAC;;ACHtC,MAAMQ,WAAW,GAAGA,MAClBC,KAAK,CAACC,GAAG,CAAE,CAAA,EAAEC,QAAS,CAAA,iCAAA,CAAkC,CAAC,CAAA;AAE3D,MAAMC,IAAI,GAAGC,UAAU,IACrBJ,KAAK,CAACC,GAAG,CAAE,CAAEC,EAAAA,QAAS,CAA6BE,2BAAAA,EAAAA,UAAW,UAAS,CAAC,CAAA;AAE1E,MAAMC,WAAW,GAAG;EAAEN,WAAW;AAAEI,EAAAA,IAAAA;AAAK,CAAC;;ACJlC,MAAMG,uBAAuB,GAAG,UAACF,UAAU,EAAA;AAAA,EAAA,IAAEG,OAAO,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE,CAAA;EAAA,OAC9DG,QAAQ,CACN,CAACC,UAAU,CAACC,wBAAwB,EAAET,UAAU,CAAC,EACjD,MAAM;IACJ,IAAIU,SAAS,CAACV,UAAU,CAAC,EAAE,OAAOC,WAAW,CAACF,IAAI,CAACC,UAAU,CAAC,CAAA;AAE9D,IAAA,OAAOC,WAAW,CAACN,WAAW,EAAE,CAAA;GACjC,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,iBAAiB;IACjBF,GAAG;AACHG,IAAAA,WAAAA;AACF,GAAC,GAAGyF,qBAAqB,CAAA;AAEzB,EAAA,oBACElC,cAAA,CAAAC,aAAA,CAACqC,aAAa,EAAAC,QAAA,CAAA;AACZjC,IAAAA,KAAK,EAAE1D,CAAC,CAAC,uCAAuC,CAAE;IAEhDkF,WAAW;IACX9F,IAAI;IACJI,oBAAoB;IACpByF,WAAW;AACXG,IAAAA,kBAAAA;AAAkB,GAAA,EACfE,qBAAqB,CAG1BlC,eAAAA,cAAA,CAAAC,aAAA,CAACnE,IAAI,EAAA;IAEDG,OAAO;IACPd,UAAU;IACVa,IAAI;IACJG,cAAc;IACdC,oBAAoB;IACpBK,WAAW;IACXP,wBAAwB;IACxBG,iBAAiB;IACjBG,iBAAiB;IACjBD,cAAc;AACdD,IAAAA,GAAAA;AAAG,GAEN,CAAC,eACF0D,cAAA,CAAAC,aAAA,CAACuC,WAAW,EAAA;IAERvG,OAAO;IACPd,UAAU;IACVa,IAAI;IACJgG,kBAAkB;IAClBD,eAAe;IACfxF,cAAc;AACdD,IAAAA,GAAAA;AAAG,GAEN,CACY,CAAC,CAAA;AAEpB,CAAC,CAAA;AAED,YAAemG,SAAS,CACtBC,cAAc,CAACd,iBAAiB,CAAC,EACjChF,CAAC,CAAC,uCAAuC,CAC3C,CAAC;;;;"}
|
|
@@ -3,11 +3,11 @@ import { noop, isNotPresent } from '@bigbinary/neeto-cist';
|
|
|
3
3
|
import Button from '@bigbinary/neetoui/Button';
|
|
4
4
|
import { mergeDeepLeft } from 'ramda';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { a as useCreateRazorpayPayment } from './usePaymentApi-
|
|
6
|
+
import { a as useCreateRazorpayPayment } from './usePaymentApi-04ce2d23.js';
|
|
7
7
|
import { RAZORPAY_PAYMENT_BUTTON_OPTIONS } from './constants.js';
|
|
8
8
|
import 'react-query';
|
|
9
9
|
import 'axios';
|
|
10
|
-
import './queryConstants-
|
|
10
|
+
import './queryConstants-7d91832f.js';
|
|
11
11
|
import 'i18next';
|
|
12
12
|
import '@bigbinary/neeto-commons-frontend/constants';
|
|
13
13
|
|
package/dist/StripeConnect.js
CHANGED
|
@@ -3,7 +3,7 @@ import React__default, { useState, useEffect, useMemo } from 'react';
|
|
|
3
3
|
import { humanize, isPresent } from '@bigbinary/neeto-cist';
|
|
4
4
|
import { useQueryParams, withT, useStateWithDependency } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
5
5
|
import { Finish as Finish$1, Modal, Demo } from 'neetointegrations';
|
|
6
|
-
import { d as useCreateStripeAccount, e as usePollingStripeAccountCreationStatus, a as useFetchConnectedStripeAccount, f as useDestroyStripeAccount, g as usePollingStripeAccount } from './useConnectApi-
|
|
6
|
+
import { d as useCreateStripeAccount, e as usePollingStripeAccountCreationStatus, a as useFetchConnectedStripeAccount, f as useDestroyStripeAccount, g as usePollingStripeAccount } from './useConnectApi-f74b7a05.js';
|
|
7
7
|
import Label from '@bigbinary/neetoui/Label';
|
|
8
8
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
9
9
|
import { useTranslation, Trans } from 'react-i18next';
|
|
@@ -15,7 +15,7 @@ import { useHistory } from 'react-router-dom';
|
|
|
15
15
|
import { useQuery } from 'react-query';
|
|
16
16
|
import axios from 'axios';
|
|
17
17
|
import { BASE_URL } from './constants.js';
|
|
18
|
-
import { Q as QUERY_KEYS } from './queryConstants-
|
|
18
|
+
import { Q as QUERY_KEYS } from './queryConstants-7d91832f.js';
|
|
19
19
|
import { t } from 'i18next';
|
|
20
20
|
import * as yup from 'yup';
|
|
21
21
|
import 'ramda';
|
|
@@ -3,7 +3,7 @@ import React__default, { useEffect } from 'react';
|
|
|
3
3
|
import { t } from 'i18next';
|
|
4
4
|
import { withTitle } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { u as useFiltersAndPagination, F as FilterWrapper } from './useFiltersAndPagination-
|
|
6
|
+
import { u as useFiltersAndPagination, F as FilterWrapper } from './useFiltersAndPagination-ad2d332e.js';
|
|
7
7
|
import { r as renderStatus, c as renderDate, e as buildPayload, w as withReactQuery } from './renderFunctions-5f829290.js';
|
|
8
8
|
import { isPresent, camelToSnakeCase } from '@bigbinary/neeto-cist';
|
|
9
9
|
import { getQueryParams, buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
|
|
@@ -17,7 +17,7 @@ import { useHistory } from 'react-router-dom';
|
|
|
17
17
|
import { useQuery } from 'react-query';
|
|
18
18
|
import axios from 'axios';
|
|
19
19
|
import { BASE_URL, SORT_DIRECTIONS, DEFAULT_SORT_PROPERTIES } from './constants.js';
|
|
20
|
-
import { Q as QUERY_KEYS } from './queryConstants-
|
|
20
|
+
import { Q as QUERY_KEYS } from './queryConstants-7d91832f.js';
|
|
21
21
|
import { p as processDataIndex } from './index-48f8b281.js';
|
|
22
22
|
import '@bigbinary/neeto-filters-frontend';
|
|
23
23
|
import '@bigbinary/neeto-molecules/Header';
|
|
@@ -29,7 +29,7 @@ var Table = require('@bigbinary/neetoui/Table');
|
|
|
29
29
|
var NoData = require('@bigbinary/neetoui/NoData');
|
|
30
30
|
var reactQuery = require('react-query');
|
|
31
31
|
var axios = require('axios');
|
|
32
|
-
var queryConstants = require('./queryConstants-
|
|
32
|
+
var queryConstants = require('./queryConstants-45f84f3e.js');
|
|
33
33
|
require('react-query/devtools');
|
|
34
34
|
require('@bigbinary/neetoui/Toastr');
|
|
35
35
|
require('@bigbinary/neeto-molecules/DateFormat');
|
package/dist/cjs/Dashboard.js
CHANGED
|
@@ -25,8 +25,8 @@ var PageLoader = require('@bigbinary/neeto-molecules/PageLoader');
|
|
|
25
25
|
var TableWrapper = require('@bigbinary/neeto-molecules/TableWrapper');
|
|
26
26
|
var Table = require('@bigbinary/neetoui/Table');
|
|
27
27
|
var NoData = require('@bigbinary/neetoui/NoData');
|
|
28
|
-
var useConnectApi = require('./useConnectApi-
|
|
29
|
-
var usePlatformApi = require('./usePlatformApi-
|
|
28
|
+
var useConnectApi = require('./useConnectApi-f248a942.js');
|
|
29
|
+
var usePlatformApi = require('./usePlatformApi-4eca1acd.js');
|
|
30
30
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
31
31
|
var Pane = require('@bigbinary/neetoui/Pane');
|
|
32
32
|
require('react-query');
|
|
@@ -42,7 +42,7 @@ require('axios');
|
|
|
42
42
|
require('./exportChannel-e4cc2bb1.js');
|
|
43
43
|
require('./IdentifierButton-40b5459d.js');
|
|
44
44
|
require('util');
|
|
45
|
-
require('./queryConstants-
|
|
45
|
+
require('./queryConstants-45f84f3e.js');
|
|
46
46
|
|
|
47
47
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
48
48
|
|
|
@@ -26,8 +26,8 @@ var PageLoader = require('@bigbinary/neeto-molecules/PageLoader');
|
|
|
26
26
|
var TableWrapper = require('@bigbinary/neeto-molecules/TableWrapper');
|
|
27
27
|
var Table = require('@bigbinary/neetoui/Table');
|
|
28
28
|
var NoData = require('@bigbinary/neetoui/NoData');
|
|
29
|
-
var useConnectApi = require('./useConnectApi-
|
|
30
|
-
var usePlatformApi = require('./usePlatformApi-
|
|
29
|
+
var useConnectApi = require('./useConnectApi-f248a942.js');
|
|
30
|
+
var usePlatformApi = require('./usePlatformApi-4eca1acd.js');
|
|
31
31
|
require('react-query');
|
|
32
32
|
require('react-query/devtools');
|
|
33
33
|
require('@bigbinary/neetoui/Toastr');
|
|
@@ -37,7 +37,7 @@ require('@bigbinary/neetoui/Tooltip');
|
|
|
37
37
|
require('@bigbinary/neeto-molecules/CopyToClipboardButton');
|
|
38
38
|
require('axios');
|
|
39
39
|
require('util');
|
|
40
|
-
require('./queryConstants-
|
|
40
|
+
require('./queryConstants-45f84f3e.js');
|
|
41
41
|
|
|
42
42
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
43
43
|
|
package/dist/cjs/PayoutsPage.js
CHANGED
|
@@ -9,8 +9,8 @@ var Typography = require('@bigbinary/neetoui/Typography');
|
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
10
10
|
var reactRouterDom = require('react-router-dom/cjs/react-router-dom');
|
|
11
11
|
var renderFunctions = require('./renderFunctions-5e706b7a.js');
|
|
12
|
-
var useConnectApi = require('./useConnectApi-
|
|
13
|
-
var usePlatformApi = require('./usePlatformApi-
|
|
12
|
+
var useConnectApi = require('./useConnectApi-f248a942.js');
|
|
13
|
+
var usePlatformApi = require('./usePlatformApi-4eca1acd.js');
|
|
14
14
|
var IdentifierButton = require('./IdentifierButton-40b5459d.js');
|
|
15
15
|
var index = require('./index-b097dce8.js');
|
|
16
16
|
var Dashboard = require('./Dashboard.js');
|
|
@@ -29,7 +29,7 @@ require('@bigbinary/neeto-molecules/CopyToClipboardButton');
|
|
|
29
29
|
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
30
30
|
require('axios');
|
|
31
31
|
require('util');
|
|
32
|
-
require('./queryConstants-
|
|
32
|
+
require('./queryConstants-45f84f3e.js');
|
|
33
33
|
require('@bigbinary/neeto-filters-frontend');
|
|
34
34
|
require('@bigbinary/neeto-molecules/SubHeader');
|
|
35
35
|
require('@bigbinary/neetoui/Tab');
|
|
@@ -5,7 +5,7 @@ var React = require('react');
|
|
|
5
5
|
var i18next = require('i18next');
|
|
6
6
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
7
7
|
var reactI18next = require('react-i18next');
|
|
8
|
-
var useFiltersAndPagination = require('./useFiltersAndPagination-
|
|
8
|
+
var useFiltersAndPagination = require('./useFiltersAndPagination-4ab52847.js');
|
|
9
9
|
var renderFunctions = require('./renderFunctions-5e706b7a.js');
|
|
10
10
|
var ExportModal = require('./ExportModal-408e0ed8.js');
|
|
11
11
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
@@ -20,8 +20,8 @@ var reactRouterDom = require('react-router-dom');
|
|
|
20
20
|
var reactQuery = require('react-query');
|
|
21
21
|
var axios = require('axios');
|
|
22
22
|
var constants = require('./constants.js');
|
|
23
|
-
var queryConstants = require('./queryConstants-
|
|
24
|
-
var usePaymentApi = require('./usePaymentApi-
|
|
23
|
+
var queryConstants = require('./queryConstants-45f84f3e.js');
|
|
24
|
+
var usePaymentApi = require('./usePaymentApi-8ef50777.js');
|
|
25
25
|
var index$1 = require('./index-b097dce8.js');
|
|
26
26
|
require('@bigbinary/neeto-filters-frontend');
|
|
27
27
|
require('@bigbinary/neeto-molecules/Header');
|
|
@@ -68,7 +68,7 @@ const accountsApi = {
|
|
|
68
68
|
|
|
69
69
|
const useFetchRazorpayAccount = function (holdableId) {
|
|
70
70
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
71
|
-
return reactQuery.useQuery([queryConstants.QUERY_KEYS.
|
|
71
|
+
return reactQuery.useQuery([queryConstants.QUERY_KEYS.RAZORPAY_ACCOUNT_DETAILS, holdableId], () => {
|
|
72
72
|
if (neetoCist.isPresent(holdableId)) return accountsApi.show(holdableId);
|
|
73
73
|
return accountsApi.defaultShow();
|
|
74
74
|
}, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RazorpayDashboard.js","sources":["../../app/javascript/src/components/RazorpayDashboard/constants/index.js","../../app/javascript/src/apis/razorpay/accounts.js","../../app/javascript/src/hooks/reactQuery/razorpay/useAccountApi.js","../../app/javascript/src/components/RazorpayDashboard/List.jsx","../../app/javascript/src/components/RazorpayDashboard/index.jsx"],"sourcesContent":["export const TAB = {\n all: \"all\",\n successful: \"successful\",\n declined: \"declined\",\n refunded: \"refunded\",\n};\n\nexport const TABS = Object.values(TAB);\n","import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst defaultShow = () =>\n axios.get(`${BASE_URL}/api/v1/razorpay/holdable/account`);\n\nconst show = holdableId =>\n axios.get(`${BASE_URL}/api/v1/razorpay/holdables/${holdableId}/account`);\n\nconst accountsApi = { defaultShow, show };\n\nexport default accountsApi;\n","import { isPresent } from \"neetocist\";\nimport { useQuery } from \"react-query\";\n\nimport accountsApi from \"apis/razorpay/accounts\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchRazorpayAccount = (holdableId, options = {}) =>\n useQuery(\n [QUERY_KEYS.SQUARE_ACCOUNT_DETAILS, holdableId],\n () => {\n if (isPresent(holdableId)) return accountsApi.show(holdableId);\n\n return accountsApi.defaultShow();\n },\n options\n );\n","import React, { useEffect } from \"react\";\n\nimport { camelToSnakeCase, isPresent } from \"neetocist\";\nimport { buildUrl, getQueryParams } from \"neetocommons/utils\";\nimport { useHiddenColumns } from \"neetomolecules/Columns\";\nimport PageLoader from \"neetomolecules/PageLoader\";\nimport TableWrapper from \"neetomolecules/TableWrapper\";\nimport { Table, NoData } from \"neetoui\";\nimport { assoc, mergeLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { useFetchRazorpayAccount } from \"hooks/reactQuery/razorpay/useAccountApi\";\nimport { useFetchRazorpayPayments } from \"hooks/reactQuery/razorpay/usePaymentApi\";\nimport { DEFAULT_SORT_PROPERTIES, SORT_DIRECTIONS } from \"src/constants\";\nimport { processDataIndex } from \"utils\";\nimport { buildPayload, buildRowData } from \"utils/dashboard\";\n\nimport { TAB } from \"./constants\";\nimport { buildPaymentColumns, isPaymentKind } from \"./utils\";\n\nconst List = ({\n holdableId,\n kind,\n filters,\n setIsFilterButtonVisible,\n pageProperties,\n payableEntityColumns,\n setPageProperties,\n tab,\n sortProperties,\n setSortProperties,\n setDataSize,\n}) => {\n const history = useHistory();\n const { t } = useTranslation();\n const columnData = buildPaymentColumns({\n tab,\n kind,\n payableEntityColumns,\n });\n\n const { isLoading: isAccountLoading, data: { account } = {} } =\n useFetchRazorpayAccount();\n\n const payload = buildPayload({\n tab,\n filters,\n pageProperties,\n sortProperties,\n });\n\n const { hideColumn, hiddenColumns = [] } = useHiddenColumns(\n `paymentDashboard_${kind}`\n );\n\n const {\n data: { payments, views = {} } = {},\n isLoading: isPaymentsLoaidng,\n isFetching,\n } = useFetchRazorpayPayments(holdableId, payload, {\n enabled: isPaymentKind(kind),\n });\n\n useEffect(() => {\n setIsFilterButtonVisible(isPresent(payments) || isPresent(filters));\n setDataSize(views[tab]);\n }, [payments]);\n\n const handleTablePaginaton = (page, pageSize) => {\n const queryParams = getQueryParams({ toCamelCase: false });\n history.push(\n buildUrl(\n window.location.pathname,\n mergeLeft({ page, page_size: pageSize }, queryParams)\n )\n );\n setPageProperties(assoc(tab, { page, pageSize }));\n };\n\n const handleTableChange = (_, __, sorter) => {\n setSortProperties(\n isPresent(sorter?.column)\n ? {\n sortBy: camelToSnakeCase(sorter.field),\n orderBy: sorter.order === \"ascend\" ? \"ASC\" : \"DESC\",\n }\n : DEFAULT_SORT_PROPERTIES\n );\n };\n\n const visibleColumns = columnData.filter(\n ({ dataIndex }) => !hiddenColumns.includes(processDataIndex(dataIndex))\n );\n\n if (isAccountLoading || isPaymentsLoaidng) {\n return <PageLoader />;\n }\n\n if ((!account?.isConnected && views <= 0) || !isPresent(payments)) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <NoData\n title={\n tab === TAB.all\n ? t(`neetoPayments.emptyState.${kind}`)\n : t(`neetoPayments.emptyState.${kind}WithStatus`, { status: tab })\n }\n />\n </div>\n );\n }\n\n return (\n <TableWrapper hasPagination={views > pageProperties[tab]?.pageSize}>\n <Table\n fixedHeight\n allowRowClick={false}\n columnData={visibleColumns}\n currentPageNumber={pageProperties[tab]?.page}\n handlePageChange={handleTablePaginaton}\n loading={isFetching}\n rowData={buildRowData({ data: payments, pageProperties, tab })}\n rowSelection={false}\n sortDirections={SORT_DIRECTIONS}\n totalCount={views}\n paginationProps={{\n showSizeChanger: true,\n hideOnSinglePage: true,\n pageSize: pageProperties[tab]?.pageSize,\n total: views,\n }}\n onChange={handleTableChange}\n onColumnHide={columnData => {\n hideColumn(processDataIndex(columnData.dataIndex));\n }}\n />\n </TableWrapper>\n );\n};\n\nexport default List;\n","import React, { useState } from \"react\";\n\nimport { t } from \"i18next\";\nimport { withTitle } from \"neetocommons/react-utils\";\nimport { useTranslation } from \"react-i18next\";\n\nimport FilterWrapper from \"components/Common/FilterWrapper\";\nimport withReactQuery from \"components/Common/withReactQuery\";\nimport ExportModal from \"components/Dashboard/ExportModal\";\nimport { useFiltersAndPagination } from \"hooks/useFiltersAndPagination\";\n\nimport { TABS } from \"./constants\";\nimport List from \"./List\";\n\nconst RazorpayDashboard = ({\n searchProps,\n headerProps = {},\n holdableId = null,\n payableEntityColumns = [],\n kind = \"razorpayPayment\",\n}) => {\n const [showExportModal, setShowExportModal] = useState(false);\n const { t } = useTranslation();\n const filterPaginationState = useFiltersAndPagination({\n payableEntityColumns,\n kind,\n initialTabs: TABS,\n tabMetaData: {},\n });\n\n const {\n filters,\n setIsFilterButtonVisible,\n pageProperties,\n setPageProperties,\n sortProperties,\n setSortProperties,\n tab,\n setDataSize,\n } = filterPaginationState;\n\n return (\n <FilterWrapper\n title={t(\"neetoPayments.common.razorpayPayments\")}\n {...{\n headerProps,\n kind,\n payableEntityColumns,\n searchProps,\n setShowExportModal,\n ...filterPaginationState,\n }}\n >\n <List\n {...{\n filters,\n holdableId,\n kind,\n pageProperties,\n payableEntityColumns,\n setDataSize,\n setIsFilterButtonVisible,\n setPageProperties,\n setSortProperties,\n sortProperties,\n tab,\n }}\n />\n <ExportModal\n {...{\n filters,\n holdableId,\n kind,\n setShowExportModal,\n showExportModal,\n sortProperties,\n tab,\n }}\n />\n </FilterWrapper>\n );\n};\n\nexport default withTitle(\n withReactQuery(RazorpayDashboard),\n t(\"neetoPayments.common.razorpayPayments\")\n);\n"],"names":["TAB","all","successful","declined","refunded","TABS","Object","values","defaultShow","axios","get","BASE_URL","show","holdableId","accountsApi","useFetchRazorpayAccount","options","arguments","length","undefined","useQuery","QUERY_KEYS","SQUARE_ACCOUNT_DETAILS","isPresent","List","_ref","kind","filters","setIsFilterButtonVisible","pageProperties","payableEntityColumns","setPageProperties","tab","sortProperties","setSortProperties","setDataSize","history","useHistory","t","useTranslation","columnData","buildPaymentColumns","isLoading","isAccountLoading","data","account","payload","buildPayload","hideColumn","hiddenColumns","useHiddenColumns","payments","views","isPaymentsLoaidng","isFetching","useFetchRazorpayPayments","enabled","isPaymentKind","useEffect","handleTablePaginaton","page","pageSize","queryParams","getQueryParams","toCamelCase","push","buildUrl","window","location","pathname","mergeLeft","page_size","assoc","handleTableChange","_","__","sorter","column","sortBy","camelToSnakeCase","field","orderBy","order","DEFAULT_SORT_PROPERTIES","visibleColumns","filter","_ref2","dataIndex","includes","processDataIndex","React","createElement","PageLoader","isConnected","className","NoData","title","status","TableWrapper","hasPagination","Table","fixedHeight","allowRowClick","currentPageNumber","handlePageChange","loading","rowData","buildRowData","rowSelection","sortDirections","SORT_DIRECTIONS","totalCount","paginationProps","showSizeChanger","hideOnSinglePage","total","onChange","onColumnHide","RazorpayDashboard","searchProps","headerProps","showExportModal","setShowExportModal","useState","filterPaginationState","useFiltersAndPagination","initialTabs","tabMetaData","FilterWrapper","_extends","ExportModal","withTitle","withReactQuery"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,GAAG,GAAG;AACjBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,QAAQ,EAAE,UAAA;AACZ,CAAC,CAAA;AAEM,MAAMC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACP,GAAG,CAAC;;ACHtC,MAAMQ,WAAW,GAAGA,MAClBC,yBAAK,CAACC,GAAG,CAAE,CAAA,EAAEC,kBAAS,CAAA,iCAAA,CAAkC,CAAC,CAAA;AAE3D,MAAMC,IAAI,GAAGC,UAAU,IACrBJ,yBAAK,CAACC,GAAG,CAAE,CAAEC,EAAA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JgG,kBAAkB;IAClBD,eAAe;IACfxF,cAAc;AACdD,IAAAA,GAAAA;AAAG,GAEN,CACY,CAAC,CAAA;AAEpB,CAAC,CAAA;AAED,YAAemG,oBAAS,CACtBC,8BAAc,CAACd,iBAAiB,CAAC,EACjChF,SAAC,CAAC,uCAAuC,CAC3C,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"RazorpayDashboard.js","sources":["../../app/javascript/src/components/RazorpayDashboard/constants/index.js","../../app/javascript/src/apis/razorpay/accounts.js","../../app/javascript/src/hooks/reactQuery/razorpay/useAccountApi.js","../../app/javascript/src/components/RazorpayDashboard/List.jsx","../../app/javascript/src/components/RazorpayDashboard/index.jsx"],"sourcesContent":["export const TAB = {\n all: \"all\",\n successful: \"successful\",\n declined: \"declined\",\n refunded: \"refunded\",\n};\n\nexport const TABS = Object.values(TAB);\n","import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst defaultShow = () =>\n axios.get(`${BASE_URL}/api/v1/razorpay/holdable/account`);\n\nconst show = holdableId =>\n axios.get(`${BASE_URL}/api/v1/razorpay/holdables/${holdableId}/account`);\n\nconst accountsApi = { defaultShow, show };\n\nexport default accountsApi;\n","import { isPresent } from \"neetocist\";\nimport { useQuery } from \"react-query\";\n\nimport accountsApi from \"apis/razorpay/accounts\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchRazorpayAccount = (holdableId, options = {}) =>\n useQuery(\n [QUERY_KEYS.RAZORPAY_ACCOUNT_DETAILS, holdableId],\n () => {\n if (isPresent(holdableId)) return accountsApi.show(holdableId);\n\n return accountsApi.defaultShow();\n },\n options\n );\n","import React, { useEffect } from \"react\";\n\nimport { camelToSnakeCase, isPresent } from \"neetocist\";\nimport { buildUrl, getQueryParams } from \"neetocommons/utils\";\nimport { useHiddenColumns } from \"neetomolecules/Columns\";\nimport PageLoader from \"neetomolecules/PageLoader\";\nimport TableWrapper from \"neetomolecules/TableWrapper\";\nimport { Table, NoData } from \"neetoui\";\nimport { assoc, mergeLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { useFetchRazorpayAccount } from \"hooks/reactQuery/razorpay/useAccountApi\";\nimport { useFetchRazorpayPayments } from \"hooks/reactQuery/razorpay/usePaymentApi\";\nimport { DEFAULT_SORT_PROPERTIES, SORT_DIRECTIONS } from \"src/constants\";\nimport { processDataIndex } from \"utils\";\nimport { buildPayload, buildRowData } from \"utils/dashboard\";\n\nimport { TAB } from \"./constants\";\nimport { buildPaymentColumns, isPaymentKind } from \"./utils\";\n\nconst List = ({\n holdableId,\n kind,\n filters,\n setIsFilterButtonVisible,\n pageProperties,\n payableEntityColumns,\n setPageProperties,\n tab,\n sortProperties,\n setSortProperties,\n setDataSize,\n}) => {\n const history = useHistory();\n const { t } = useTranslation();\n const columnData = buildPaymentColumns({\n tab,\n kind,\n payableEntityColumns,\n });\n\n const { isLoading: isAccountLoading, data: { account } = {} } =\n useFetchRazorpayAccount();\n\n const payload = buildPayload({\n tab,\n filters,\n pageProperties,\n sortProperties,\n });\n\n const { hideColumn, hiddenColumns = [] } = useHiddenColumns(\n `paymentDashboard_${kind}`\n );\n\n const {\n data: { payments, views = {} } = {},\n isLoading: isPaymentsLoaidng,\n isFetching,\n } = useFetchRazorpayPayments(holdableId, payload, {\n enabled: isPaymentKind(kind),\n });\n\n useEffect(() => {\n setIsFilterButtonVisible(isPresent(payments) || isPresent(filters));\n setDataSize(views[tab]);\n }, [payments]);\n\n const handleTablePaginaton = (page, pageSize) => {\n const queryParams = getQueryParams({ toCamelCase: false });\n history.push(\n buildUrl(\n window.location.pathname,\n mergeLeft({ page, page_size: pageSize }, queryParams)\n )\n );\n setPageProperties(assoc(tab, { page, pageSize }));\n };\n\n const handleTableChange = (_, __, sorter) => {\n setSortProperties(\n isPresent(sorter?.column)\n ? {\n sortBy: camelToSnakeCase(sorter.field),\n orderBy: sorter.order === \"ascend\" ? \"ASC\" : \"DESC\",\n }\n : DEFAULT_SORT_PROPERTIES\n );\n };\n\n const visibleColumns = columnData.filter(\n ({ dataIndex }) => !hiddenColumns.includes(processDataIndex(dataIndex))\n );\n\n if (isAccountLoading || isPaymentsLoaidng) {\n return <PageLoader />;\n }\n\n if ((!account?.isConnected && views <= 0) || !isPresent(payments)) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <NoData\n title={\n tab === TAB.all\n ? t(`neetoPayments.emptyState.${kind}`)\n : t(`neetoPayments.emptyState.${kind}WithStatus`, { status: tab })\n }\n />\n </div>\n );\n }\n\n return (\n <TableWrapper hasPagination={views > pageProperties[tab]?.pageSize}>\n <Table\n fixedHeight\n allowRowClick={false}\n columnData={visibleColumns}\n currentPageNumber={pageProperties[tab]?.page}\n handlePageChange={handleTablePaginaton}\n loading={isFetching}\n rowData={buildRowData({ data: payments, pageProperties, tab })}\n rowSelection={false}\n sortDirections={SORT_DIRECTIONS}\n totalCount={views}\n paginationProps={{\n showSizeChanger: true,\n hideOnSinglePage: true,\n pageSize: pageProperties[tab]?.pageSize,\n total: views,\n }}\n onChange={handleTableChange}\n onColumnHide={columnData => {\n hideColumn(processDataIndex(columnData.dataIndex));\n }}\n />\n </TableWrapper>\n );\n};\n\nexport default List;\n","import React, { useState } from \"react\";\n\nimport { t } from \"i18next\";\nimport { withTitle } from \"neetocommons/react-utils\";\nimport { useTranslation } from \"react-i18next\";\n\nimport FilterWrapper from \"components/Common/FilterWrapper\";\nimport withReactQuery from \"components/Common/withReactQuery\";\nimport ExportModal from \"components/Dashboard/ExportModal\";\nimport { useFiltersAndPagination } from \"hooks/useFiltersAndPagination\";\n\nimport { TABS } from \"./constants\";\nimport List from \"./List\";\n\nconst RazorpayDashboard = ({\n searchProps,\n headerProps = {},\n holdableId = null,\n payableEntityColumns = [],\n kind = \"razorpayPayment\",\n}) => {\n const [showExportModal, setShowExportModal] = useState(false);\n const { t } = useTranslation();\n const filterPaginationState = useFiltersAndPagination({\n payableEntityColumns,\n kind,\n initialTabs: TABS,\n tabMetaData: {},\n });\n\n const {\n filters,\n setIsFilterButtonVisible,\n pageProperties,\n setPageProperties,\n sortProperties,\n setSortProperties,\n tab,\n setDataSize,\n } = filterPaginationState;\n\n return (\n <FilterWrapper\n title={t(\"neetoPayments.common.razorpayPayments\")}\n {...{\n headerProps,\n kind,\n payableEntityColumns,\n searchProps,\n setShowExportModal,\n ...filterPaginationState,\n }}\n >\n <List\n {...{\n filters,\n holdableId,\n kind,\n pageProperties,\n payableEntityColumns,\n setDataSize,\n setIsFilterButtonVisible,\n setPageProperties,\n setSortProperties,\n sortProperties,\n tab,\n }}\n />\n <ExportModal\n {...{\n filters,\n holdableId,\n kind,\n setShowExportModal,\n showExportModal,\n sortProperties,\n tab,\n }}\n />\n </FilterWrapper>\n );\n};\n\nexport default withTitle(\n withReactQuery(RazorpayDashboard),\n t(\"neetoPayments.common.razorpayPayments\")\n);\n"],"names":["TAB","all","successful","declined","refunded","TABS","Object","values","defaultShow","axios","get","BASE_URL","show","holdableId","accountsApi","useFetchRazorpayAccount","options","arguments","length","undefined","useQuery","QUERY_KEYS","RAZORPAY_ACCOUNT_DETAILS","isPresent","List","_ref","kind","filters","setIsFilterButtonVisible","pageProperties","payableEntityColumns","setPageProperties","tab","sortProperties","setSortProperties","setDataSize","history","useHistory","t","useTranslation","columnData","buildPaymentColumns","isLoading","isAccountLoading","data","account","payload","buildPayload","hideColumn","hiddenColumns","useHiddenColumns","payments","views","isPaymentsLoaidng","isFetching","useFetchRazorpayPayments","enabled","isPaymentKind","useEffect","handleTablePaginaton","page","pageSize","queryParams","getQueryParams","toCamelCase","push","buildUrl","window","location","pathname","mergeLeft","page_size","assoc","handleTableChange","_","__","sorter","column","sortBy","camelToSnakeCase","field","orderBy","order","DEFAULT_SORT_PROPERTIES","visibleColumns","filter","_ref2","dataIndex","includes","processDataIndex","React","createElement","PageLoader","isConnected","className","NoData","title","status","TableWrapper","hasPagination","Table","fixedHeight","allowRowClick","currentPageNumber","handlePageChange","loading","rowData","buildRowData","rowSelection","sortDirections","SORT_DIRECTIONS","totalCount","paginationProps","showSizeChanger","hideOnSinglePage","total","onChange","onColumnHide","RazorpayDashboard","searchProps","headerProps","showExportModal","setShowExportModal","useState","filterPaginationState","useFiltersAndPagination","initialTabs","tabMetaData","FilterWrapper","_extends","ExportModal","withTitle","withReactQuery"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,GAAG,GAAG;AACjBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,QAAQ,EAAE,UAAA;AACZ,CAAC,CAAA;AAEM,MAAMC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACP,GAAG,CAAC;;ACHtC,MAAMQ,WAAW,GAAGA,MAClBC,yBAAK,CAACC,GAAG,CAAE,CAAA,EAAEC,kBAAS,CAAA,iCAAA,CAAkC,CAAC,CAAA;AAE3D,MAAMC,IAAI,GAAGC,UAAU,IACrBJ,yBAAK,CAACC,GAAG,CAAE,CAAEC,EAAAA,kBAAS,CAA6BE,2BAAAA,EAAAA,UAAW,UAAS,CAAC,CAAA;AAE1E,MAAMC,WAAW,GAAG;EAAEN,WAAW;AAAEI,EAAAA,IAAAA;AAAK,CAAC;;ACJlC,MAAMG,uBAAuB,GAAG,UAACF,UAAU,EAAA;AAAA,EAAA,IAAEG,OAAO,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE,CAAA;EAAA,OAC9DG,mBAAQ,CACN,CAACC,yBAAU,CAACC,wBAAwB,EAAET,UAAU,CAAC,EACjD,MAAM;IACJ,IAAIU,mBAAS,CAACV,UAAU,CAAC,EAAE,OAAOC,WAAW,CAACF,IAAI,CAACC,UAAU,CAAC,CAAA;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F,MAAM;IACJpG,OAAO;IACPC,wBAAwB;IACxBC,cAAc;IACdE,iBAAiB;IACjBE,cAAc;IACdC,iBAAiB;IACjBF,GAAG;AACHG,IAAAA,WAAAA;AACF,GAAC,GAAGyF,qBAAqB,CAAA;AAEzB,EAAA,oBACElC,yBAAA,CAAAC,aAAA,CAACqC,qCAAa,EAAAC,iBAAA,CAAA;AACZjC,IAAAA,KAAK,EAAE1D,CAAC,CAAC,uCAAuC,CAAE;IAEhDkF,WAAW;IACX9F,IAAI;IACJI,oBAAoB;IACpByF,WAAW;AACXG,IAAAA,kBAAAA;AAAkB,GAAA,EACfE,qBAAqB,CAG1BlC,eAAAA,yBAAA,CAAAC,aAAA,CAACnE,IAAI,EAAA;IAEDG,OAAO;IACPd,UAAU;IACVa,IAAI;IACJG,cAAc;IACdC,oBAAoB;IACpBK,WAAW;IACXP,wBAAwB;IACxBG,iBAAiB;IACjBG,iBAAiB;IACjBD,cAAc;AACdD,IAAAA,GAAAA;AAAG,GAEN,CAAC,eACF0D,yBAAA,CAAAC,aAAA,CAACuC,uBAAW,EAAA;IAERvG,OAAO;IACPd,UAAU;IACVa,IAAI;IACJgG,kBAAkB;IAClBD,eAAe;IACfxF,cAAc;AACdD,IAAAA,GAAAA;AAAG,GAEN,CACY,CAAC,CAAA;AAEpB,CAAC,CAAA;AAED,YAAemG,oBAAS,CACtBC,8BAAc,CAACd,iBAAiB,CAAC,EACjChF,SAAC,CAAC,uCAAuC,CAC3C,CAAC;;;;"}
|
|
@@ -5,11 +5,11 @@ var neetoCist = require('@bigbinary/neeto-cist');
|
|
|
5
5
|
var Button = require('@bigbinary/neetoui/Button');
|
|
6
6
|
var ramda = require('ramda');
|
|
7
7
|
var reactI18next = require('react-i18next');
|
|
8
|
-
var usePaymentApi = require('./usePaymentApi-
|
|
8
|
+
var usePaymentApi = require('./usePaymentApi-8ef50777.js');
|
|
9
9
|
var constants = require('./constants.js');
|
|
10
10
|
require('react-query');
|
|
11
11
|
require('axios');
|
|
12
|
-
require('./queryConstants-
|
|
12
|
+
require('./queryConstants-45f84f3e.js');
|
|
13
13
|
require('i18next');
|
|
14
14
|
require('@bigbinary/neeto-commons-frontend/constants');
|
|
15
15
|
|
|
@@ -4,7 +4,7 @@ var React = require('react');
|
|
|
4
4
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
5
5
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
6
6
|
var neetointegrations = require('neetointegrations');
|
|
7
|
-
var useConnectApi = require('./useConnectApi-
|
|
7
|
+
var useConnectApi = require('./useConnectApi-f248a942.js');
|
|
8
8
|
var Label = require('@bigbinary/neetoui/Label');
|
|
9
9
|
var Typography = require('@bigbinary/neetoui/Typography');
|
|
10
10
|
var reactI18next = require('react-i18next');
|
|
@@ -16,7 +16,7 @@ var reactRouterDom = require('react-router-dom');
|
|
|
16
16
|
var reactQuery = require('react-query');
|
|
17
17
|
var axios = require('axios');
|
|
18
18
|
var constants = require('./constants.js');
|
|
19
|
-
var queryConstants = require('./queryConstants-
|
|
19
|
+
var queryConstants = require('./queryConstants-45f84f3e.js');
|
|
20
20
|
var i18next = require('i18next');
|
|
21
21
|
var yup = require('yup');
|
|
22
22
|
require('ramda');
|