@bigbinary/neeto-payments-frontend 1.4.14 → 1.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/javascript/src/translations/en.json +5 -5
- package/dist/index.cjs.js +250 -183
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +104 -56
- package/dist/index.js.map +1 -1
- package/package.json +14 -12
package/dist/index.js
CHANGED
|
@@ -1,33 +1,50 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { useState, useMemo, useEffect, useTransition } from 'react';
|
|
3
3
|
import { t as t$1 } from 'i18next';
|
|
4
|
+
import { noop, camelToSnakeCase, isPresent, snakeToCamelCase, capitalize, removeBy, filterBy, isNotPresent, humanize } from '@bigbinary/neeto-cist';
|
|
4
5
|
import { useQueryParams, withTitle, useMutationWithInvalidation, withT, useStateWithDependency } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
5
6
|
import { buildFiltersFromURL, Bar } from '@bigbinary/neeto-filters-frontend';
|
|
6
7
|
import Header from '@bigbinary/neeto-molecules/Header';
|
|
7
8
|
import SubHeader from '@bigbinary/neeto-molecules/SubHeader';
|
|
8
|
-
import
|
|
9
|
+
import Tab from '@bigbinary/neetoui/Tab';
|
|
10
|
+
import Typography from '@bigbinary/neetoui/Typography';
|
|
9
11
|
import { useTranslation, Trans } from 'react-i18next';
|
|
10
12
|
import { QueryClient, QueryCache, QueryClientProvider, useMutation, useQuery } from 'react-query';
|
|
11
13
|
import { ReactQueryDevtools } from 'react-query/devtools';
|
|
12
14
|
import { DEFAULT_STALE_TIME, DEFAULT_PAGE_INDEX, DEFAULT_PAGE_SIZE } from '@bigbinary/neeto-commons-frontend/constants';
|
|
15
|
+
import Toastr from '@bigbinary/neetoui/Toastr';
|
|
13
16
|
import { Download, Down, Right } from '@bigbinary/neeto-icons';
|
|
17
|
+
import Button from '@bigbinary/neetoui/Button';
|
|
18
|
+
import Modal from '@bigbinary/neetoui/Modal';
|
|
14
19
|
import axios from 'axios';
|
|
15
|
-
import { noop, camelToSnakeCase, isPresent, snakeToCamelCase, capitalize, removeBy, filterBy, isNotPresent, humanize } from '@bigbinary/neeto-cist';
|
|
16
20
|
import { createSubscription, getQueryParams, buildUrl, dateFormat } from '@bigbinary/neeto-commons-frontend/utils';
|
|
17
21
|
import { isEmpty, assoc, modify, concat, curry, pipe, split, map, join, mergeLeft, equals, sortBy, prop, evolve, insert, mergeDeepLeft, pluck } from 'ramda';
|
|
18
22
|
import { useHistory } from 'react-router-dom';
|
|
19
23
|
import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
|
|
24
|
+
import Tag from '@bigbinary/neetoui/Tag';
|
|
25
|
+
import Tooltip from '@bigbinary/neetoui/Tooltip';
|
|
20
26
|
import CopyToClipboardButton from '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
21
27
|
import { useHiddenColumns } from '@bigbinary/neeto-molecules/Columns';
|
|
22
28
|
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
23
29
|
import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
|
|
30
|
+
import Table from '@bigbinary/neetoui/Table';
|
|
31
|
+
import NoData from '@bigbinary/neetoui/NoData';
|
|
24
32
|
import require$$0 from 'util';
|
|
33
|
+
import Pane from '@bigbinary/neetoui/Pane';
|
|
25
34
|
import { useParams } from 'react-router-dom/cjs/react-router-dom';
|
|
26
35
|
import classNames from 'classnames';
|
|
36
|
+
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
37
|
+
import Alert from '@bigbinary/neetoui/Alert';
|
|
27
38
|
import { Finish as Finish$1, Modal as Modal$1, Demo } from 'neetointegrations';
|
|
28
|
-
import
|
|
39
|
+
import Label from '@bigbinary/neetoui/Label';
|
|
40
|
+
import Select from '@bigbinary/neetoui/formik/Select';
|
|
41
|
+
import Form from '@bigbinary/neetoui/formik/Form';
|
|
42
|
+
import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
|
29
43
|
import * as yup from 'yup';
|
|
44
|
+
import Radio from '@bigbinary/neetoui/Radio';
|
|
45
|
+
import Input from '@bigbinary/neetoui/formik/Input';
|
|
30
46
|
import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
|
|
47
|
+
import QRCodeImage from 'qrcode.react';
|
|
31
48
|
import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
32
49
|
|
|
33
50
|
function _arrayWithHoles(arr) {
|
|
@@ -1026,7 +1043,7 @@ var useFiltersAndPagination$3 = function useFiltersAndPagination() {
|
|
|
1026
1043
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
1027
1044
|
filters = _useState10[0],
|
|
1028
1045
|
setFilters = _useState10[1];
|
|
1029
|
-
var _useState11 = useState(
|
|
1046
|
+
var _useState11 = useState(null),
|
|
1030
1047
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
1031
1048
|
dataSize = _useState12[0],
|
|
1032
1049
|
setDataSize = _useState12[1];
|
|
@@ -1035,6 +1052,7 @@ var useFiltersAndPagination$3 = function useFiltersAndPagination() {
|
|
|
1035
1052
|
}, COLUMNS$5) : COLUMNS$5;
|
|
1036
1053
|
var handleTabChange = function handleTabChange(tab) {
|
|
1037
1054
|
var _pageProperties$tab, _pageProperties$tab2;
|
|
1055
|
+
setDataSize(null);
|
|
1038
1056
|
var queryParams = getQueryParams({
|
|
1039
1057
|
toCamelCase: false
|
|
1040
1058
|
});
|
|
@@ -1242,7 +1260,7 @@ var AccountsDashboard = function AccountsDashboard() {
|
|
|
1242
1260
|
};
|
|
1243
1261
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Header, {
|
|
1244
1262
|
title: t("neetoPayments.title.account"),
|
|
1245
|
-
searchProps: {
|
|
1263
|
+
searchProps: isFilterButtonVisible && {
|
|
1246
1264
|
placeholder: t("neetoPayments.common.search"),
|
|
1247
1265
|
className: "w-80"
|
|
1248
1266
|
}
|
|
@@ -1256,7 +1274,7 @@ var AccountsDashboard = function AccountsDashboard() {
|
|
|
1256
1274
|
}, t("neetoPayments.common.".concat(item)));
|
|
1257
1275
|
})), /*#__PURE__*/React__default.createElement(SubHeader, {
|
|
1258
1276
|
className: "mt-4",
|
|
1259
|
-
leftActionBlock:
|
|
1277
|
+
leftActionBlock: isPresent(dataSize) && /*#__PURE__*/React__default.createElement(Typography, {
|
|
1260
1278
|
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
1261
1279
|
component: "h4"
|
|
1262
1280
|
}, tab === TAB$5.all ? t("neetoPayments.countOf.account", {
|
|
@@ -2087,7 +2105,7 @@ var useFiltersAndPagination$2 = function useFiltersAndPagination(_ref) {
|
|
|
2087
2105
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
2088
2106
|
filters = _useState10[0],
|
|
2089
2107
|
setFilters = _useState10[1];
|
|
2090
|
-
var _useState11 = useState(
|
|
2108
|
+
var _useState11 = useState(null),
|
|
2091
2109
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
2092
2110
|
dataSize = _useState12[0],
|
|
2093
2111
|
setDataSize = _useState12[1];
|
|
@@ -2106,6 +2124,7 @@ var useFiltersAndPagination$2 = function useFiltersAndPagination(_ref) {
|
|
|
2106
2124
|
var modifiedColumns = columns.map(modify("dataIndex", processDataIndex));
|
|
2107
2125
|
var handleTabChange = function handleTabChange(tab) {
|
|
2108
2126
|
var _pageProperties$tab, _pageProperties$tab2;
|
|
2127
|
+
setDataSize(null);
|
|
2109
2128
|
var queryParams = getQueryParams({
|
|
2110
2129
|
toCamelCase: false
|
|
2111
2130
|
});
|
|
@@ -4863,7 +4882,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
4863
4882
|
};
|
|
4864
4883
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Header, _extends$1({}, headerProps, {
|
|
4865
4884
|
title: t("neetoPayments.title.".concat(titleKind)),
|
|
4866
|
-
searchProps: {
|
|
4885
|
+
searchProps: isFilterButtonVisible && {
|
|
4867
4886
|
placeholder: searchKeywordProps.placeholder,
|
|
4868
4887
|
className: "w-80"
|
|
4869
4888
|
}
|
|
@@ -4877,7 +4896,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
4877
4896
|
}, t("neetoPayments.common.".concat(item)));
|
|
4878
4897
|
})), /*#__PURE__*/React__default.createElement(SubHeader, {
|
|
4879
4898
|
className: "mt-4",
|
|
4880
|
-
leftActionBlock:
|
|
4899
|
+
leftActionBlock: isPresent(dataSize) && /*#__PURE__*/React__default.createElement(Typography, {
|
|
4881
4900
|
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
4882
4901
|
component: "h4"
|
|
4883
4902
|
}, tab === TAB$4.all ? t("neetoPayments.countOf.".concat(kind), {
|
|
@@ -5163,7 +5182,7 @@ var useFiltersAndPagination$1 = function useFiltersAndPagination(payoutsPageRout
|
|
|
5163
5182
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
5164
5183
|
filters = _useState10[0],
|
|
5165
5184
|
setFilters = _useState10[1];
|
|
5166
|
-
var _useState11 = useState(
|
|
5185
|
+
var _useState11 = useState(null),
|
|
5167
5186
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
5168
5187
|
dataSize = _useState12[0],
|
|
5169
5188
|
setDataSize = _useState12[1];
|
|
@@ -5174,6 +5193,7 @@ var useFiltersAndPagination$1 = function useFiltersAndPagination(payoutsPageRout
|
|
|
5174
5193
|
}, columns) : columns;
|
|
5175
5194
|
var handleTabChange = function handleTabChange(tab) {
|
|
5176
5195
|
var _pageProperties$tab, _pageProperties$tab2;
|
|
5196
|
+
setDataSize(null);
|
|
5177
5197
|
var queryParams = getQueryParams({
|
|
5178
5198
|
toCamelCase: false
|
|
5179
5199
|
});
|
|
@@ -5362,7 +5382,7 @@ var PayoutsDashboard = function PayoutsDashboard(_ref) {
|
|
|
5362
5382
|
};
|
|
5363
5383
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Header, {
|
|
5364
5384
|
title: t("neetoPayments.title.payouts"),
|
|
5365
|
-
searchProps: {
|
|
5385
|
+
searchProps: isFilterButtonVisible && {
|
|
5366
5386
|
placeholder: t("neetoPayments.common.search"),
|
|
5367
5387
|
className: "w-80"
|
|
5368
5388
|
}
|
|
@@ -5376,7 +5396,7 @@ var PayoutsDashboard = function PayoutsDashboard(_ref) {
|
|
|
5376
5396
|
}, t("neetoPayments.common.".concat(item)));
|
|
5377
5397
|
})), /*#__PURE__*/React__default.createElement(SubHeader, {
|
|
5378
5398
|
className: "mt-4",
|
|
5379
|
-
leftActionBlock:
|
|
5399
|
+
leftActionBlock: isPresent(dataSize) && /*#__PURE__*/React__default.createElement(Typography, {
|
|
5380
5400
|
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
5381
5401
|
component: "h4"
|
|
5382
5402
|
}, tab === TAB$3.all ? t("neetoPayments.countOf.payout", {
|
|
@@ -5696,7 +5716,7 @@ var FilterWrapper = function FilterWrapper(_ref) {
|
|
|
5696
5716
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Header, _extends$1({}, _objectSpread$6(_objectSpread$6({}, headerProps), {}, {
|
|
5697
5717
|
title: title
|
|
5698
5718
|
}), {
|
|
5699
|
-
searchProps: {
|
|
5719
|
+
searchProps: isFilterButtonVisible && {
|
|
5700
5720
|
placeholder: searchKeywordProps.placeholder,
|
|
5701
5721
|
className: "w-80"
|
|
5702
5722
|
}
|
|
@@ -5710,7 +5730,7 @@ var FilterWrapper = function FilterWrapper(_ref) {
|
|
|
5710
5730
|
}, t("neetoPayments.common.".concat(item)));
|
|
5711
5731
|
})), /*#__PURE__*/React__default.createElement(SubHeader, {
|
|
5712
5732
|
className: "mt-4",
|
|
5713
|
-
leftActionBlock:
|
|
5733
|
+
leftActionBlock: isPresent(dataSize) && /*#__PURE__*/React__default.createElement(Typography, {
|
|
5714
5734
|
className: "neeto-ui-gray-800 mr-2 font-semibold",
|
|
5715
5735
|
component: "h4"
|
|
5716
5736
|
}, tab === "all" ? t("neetoPayments.countOf.".concat(kind), {
|
|
@@ -5911,7 +5931,7 @@ var useFiltersAndPagination = function useFiltersAndPagination(_ref) {
|
|
|
5911
5931
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
5912
5932
|
filters = _useState10[0],
|
|
5913
5933
|
setFilters = _useState10[1];
|
|
5914
|
-
var _useState11 = useState(
|
|
5934
|
+
var _useState11 = useState(null),
|
|
5915
5935
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
5916
5936
|
dataSize = _useState12[0],
|
|
5917
5937
|
setDataSize = _useState12[1];
|
|
@@ -5920,6 +5940,7 @@ var useFiltersAndPagination = function useFiltersAndPagination(_ref) {
|
|
|
5920
5940
|
searchTerm = _getQueryParams$searc === void 0 ? "" : _getQueryParams$searc;
|
|
5921
5941
|
var handleTabChange = function handleTabChange(tab) {
|
|
5922
5942
|
var _pageProperties$tab, _pageProperties$tab2;
|
|
5943
|
+
setDataSize(null);
|
|
5923
5944
|
var queryParams = getQueryParams({
|
|
5924
5945
|
toCamelCase: false
|
|
5925
5946
|
});
|
|
@@ -7179,6 +7200,7 @@ var AccountForm = function AccountForm(_ref) {
|
|
|
7179
7200
|
returnUrl = _ref.returnUrl;
|
|
7180
7201
|
var _useTranslation = useTranslation(),
|
|
7181
7202
|
t = _useTranslation.t;
|
|
7203
|
+
var history = useHistory();
|
|
7182
7204
|
var _useState = useState(false),
|
|
7183
7205
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7184
7206
|
isPolling = _useState2[0],
|
|
@@ -7242,11 +7264,16 @@ var AccountForm = function AccountForm(_ref) {
|
|
|
7242
7264
|
name: "country",
|
|
7243
7265
|
options: buildCountryOptions(countries),
|
|
7244
7266
|
placeholder: t("neetoPayments.integrationModal.form.placeholder")
|
|
7245
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7267
|
+
}), /*#__PURE__*/React__default.createElement(ActionBlock, {
|
|
7268
|
+
cancelButtonProps: {
|
|
7269
|
+
onClick: function onClick() {
|
|
7270
|
+
return history.goBack();
|
|
7271
|
+
}
|
|
7272
|
+
},
|
|
7273
|
+
isSubmitting: isCreating || isPolling,
|
|
7274
|
+
submitButtonProps: {
|
|
7275
|
+
label: submitButtonLabel
|
|
7276
|
+
}
|
|
7250
7277
|
})));
|
|
7251
7278
|
};
|
|
7252
7279
|
|
|
@@ -9134,12 +9161,14 @@ var StripeConnect = function StripeConnect(_ref) {
|
|
|
9134
9161
|
};
|
|
9135
9162
|
|
|
9136
9163
|
var VALIDATION_SCHEMA$1 = yup.object({
|
|
9137
|
-
upiId: yup.string().matches(/^[a-zA-Z0-9.-]{2,256}@[a-zA-
|
|
9164
|
+
upiId: yup.string().matches(/^[a-zA-Z0-9.-]{2,256}@[a-zA-Z][a-zA-Z]{2,64}$/, t$1("neetoPayments.upi.form.validation.invalidUpi")).required(t$1("neetoPayments.upi.form.validation.required"))
|
|
9138
9165
|
});
|
|
9139
9166
|
|
|
9140
|
-
var Add =
|
|
9141
|
-
var
|
|
9142
|
-
|
|
9167
|
+
var Add = function Add(_ref) {
|
|
9168
|
+
var handleCreateUpiId = _ref.handleCreateUpiId;
|
|
9169
|
+
var _useTranslation = useTranslation(),
|
|
9170
|
+
t = _useTranslation.t;
|
|
9171
|
+
var history = useHistory();
|
|
9143
9172
|
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Form, {
|
|
9144
9173
|
formikProps: {
|
|
9145
9174
|
initialValues: {
|
|
@@ -9152,13 +9181,20 @@ var Add = withT(function (_ref) {
|
|
|
9152
9181
|
className: "space-y-3"
|
|
9153
9182
|
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
9154
9183
|
className: "w-64",
|
|
9155
|
-
label: t("neetoPayments.
|
|
9156
|
-
name: "upiId"
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9184
|
+
label: t("neetoPayments.upi.form.enterUpi"),
|
|
9185
|
+
name: "upiId",
|
|
9186
|
+
placeholder: t("neetoPayments.upi.form.enterUpi")
|
|
9187
|
+
}), /*#__PURE__*/React__default.createElement(ActionBlock, {
|
|
9188
|
+
cancelButtonProps: {
|
|
9189
|
+
onClick: function onClick() {
|
|
9190
|
+
return history.goBack();
|
|
9191
|
+
}
|
|
9192
|
+
},
|
|
9193
|
+
submitButtonProps: {
|
|
9194
|
+
label: t("neetoPayments.upi.form.add")
|
|
9195
|
+
}
|
|
9160
9196
|
}))));
|
|
9161
|
-
}
|
|
9197
|
+
};
|
|
9162
9198
|
|
|
9163
9199
|
var getColumnData = function getColumnData(handleDeleteClick) {
|
|
9164
9200
|
return [{
|
|
@@ -9252,14 +9288,10 @@ var UpiConnect = function UpiConnect(_ref) {
|
|
|
9252
9288
|
handleDeleteUpiId = _ref$handleDeleteUpiI === void 0 ? noop : _ref$handleDeleteUpiI,
|
|
9253
9289
|
_ref$handleCreateUpiI = _ref.handleCreateUpiId,
|
|
9254
9290
|
handleCreateUpiId = _ref$handleCreateUpiI === void 0 ? noop : _ref$handleCreateUpiI;
|
|
9255
|
-
var _useTranslation = useTranslation(),
|
|
9256
|
-
t = _useTranslation.t;
|
|
9257
9291
|
if (isLoading) return /*#__PURE__*/React__default.createElement(Spinner, null);
|
|
9258
9292
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9259
9293
|
className: "flex w-full max-w-3xl flex-col items-start space-y-6"
|
|
9260
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
9261
|
-
style: "h2"
|
|
9262
|
-
}, t("neetoPayments.common.upiIds")), /*#__PURE__*/React__default.createElement(Add, {
|
|
9294
|
+
}, /*#__PURE__*/React__default.createElement(Add, {
|
|
9263
9295
|
handleCreateUpiId: handleCreateUpiId
|
|
9264
9296
|
}), /*#__PURE__*/React__default.createElement(List$1, {
|
|
9265
9297
|
handleDeleteUpiId: handleDeleteUpiId,
|
|
@@ -9322,11 +9354,15 @@ var VALIDATION_SCHEMA = yup.object({
|
|
|
9322
9354
|
transactionId: yup.string().required(t$1("neetoPayments.upi.payment.transaction.required")).min(6, t$1("neetoPayments.upi.payment.transaction.sixCharacters")).max(6, t$1("neetoPayments.upi.payment.transaction.sixCharacters"))
|
|
9323
9355
|
});
|
|
9324
9356
|
|
|
9357
|
+
var vpaIdToQrCodeValue = function vpaIdToQrCodeValue(vpaId) {
|
|
9358
|
+
return "upi://pay?pa=".concat(vpaId);
|
|
9359
|
+
};
|
|
9360
|
+
|
|
9325
9361
|
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; }
|
|
9326
9362
|
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9327
9363
|
var UpiPayment = function UpiPayment(_ref) {
|
|
9328
|
-
var _ref$
|
|
9329
|
-
|
|
9364
|
+
var _ref$fee = _ref.fee,
|
|
9365
|
+
fee = _ref$fee === void 0 ? {} : _ref$fee,
|
|
9330
9366
|
_ref$onSubmit = _ref.onSubmit,
|
|
9331
9367
|
onSubmit = _ref$onSubmit === void 0 ? noop : _ref$onSubmit,
|
|
9332
9368
|
_ref$onBackClick = _ref.onBackClick,
|
|
@@ -9334,7 +9370,7 @@ var UpiPayment = function UpiPayment(_ref) {
|
|
|
9334
9370
|
payableId = _ref.payableId;
|
|
9335
9371
|
var _useTranslation = useTranslation(),
|
|
9336
9372
|
t = _useTranslation.t;
|
|
9337
|
-
var vpaIds = pluck("address", vpas)
|
|
9373
|
+
var vpaIds = pluck("address", fee === null || fee === void 0 ? void 0 : fee.vpas);
|
|
9338
9374
|
var _useCreateUpiPayment = useCreateUpiPayment({}),
|
|
9339
9375
|
createPayment = _useCreateUpiPayment.mutate;
|
|
9340
9376
|
var handleSubmit = function handleSubmit(values) {
|
|
@@ -9353,29 +9389,41 @@ var UpiPayment = function UpiPayment(_ref) {
|
|
|
9353
9389
|
},
|
|
9354
9390
|
validationSchema: VALIDATION_SCHEMA
|
|
9355
9391
|
}
|
|
9356
|
-
}, /*#__PURE__*/React__default.createElement(Typography,
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9392
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
9393
|
+
style: "body1"
|
|
9394
|
+
}, t("neetoPayments.upi.payment.vpaText", {
|
|
9395
|
+
count: vpaIds.length
|
|
9396
|
+
})), isPresent(vpaIds) && /*#__PURE__*/React__default.createElement("div", {
|
|
9397
|
+
className: "grid grid-cols-1 gap-8 gap-y-4 sm:grid-cols-2"
|
|
9398
|
+
}, vpaIds.map(function (vpaId) {
|
|
9399
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9400
|
+
className: "flex flex-col items-center justify-center",
|
|
9401
|
+
key: vpaId
|
|
9402
|
+
}, /*#__PURE__*/React__default.createElement(QRCodeImage, {
|
|
9403
|
+
size: 256,
|
|
9404
|
+
style: {
|
|
9405
|
+
width: 80,
|
|
9406
|
+
height: 80
|
|
9407
|
+
},
|
|
9408
|
+
value: vpaIdToQrCodeValue(vpaId)
|
|
9409
|
+
}), /*#__PURE__*/React__default.createElement(Typography, {
|
|
9410
|
+
className: "mt-2 w-full break-words text-center",
|
|
9411
|
+
style: "body2"
|
|
9412
|
+
}, vpaId));
|
|
9364
9413
|
})), /*#__PURE__*/React__default.createElement(Input, {
|
|
9365
9414
|
required: true,
|
|
9366
9415
|
label: t("neetoPayments.upi.payment.transaction.label"),
|
|
9367
9416
|
name: "transactionId",
|
|
9368
9417
|
placeholder: t("neetoPayments.upi.payment.transaction.placeholder")
|
|
9369
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
}))));
|
|
9418
|
+
}), /*#__PURE__*/React__default.createElement(ActionBlock, {
|
|
9419
|
+
cancelButtonProps: {
|
|
9420
|
+
label: t("neetoPayments.upi.payment.buttons.back"),
|
|
9421
|
+
onClick: onBackClick
|
|
9422
|
+
},
|
|
9423
|
+
submitButtonProps: {
|
|
9424
|
+
label: t("neetoPayments.upi.payment.buttons.submit")
|
|
9425
|
+
}
|
|
9426
|
+
})));
|
|
9379
9427
|
};
|
|
9380
9428
|
|
|
9381
9429
|
var TAB = {
|