@djb25/digit-ui-module-common 1.0.8 → 1.0.9
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/dist/index.js +996 -770
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +996 -770
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19,18 +19,6 @@ function _extends() {
|
|
|
19
19
|
return n;
|
|
20
20
|
}, _extends.apply(null, arguments);
|
|
21
21
|
}
|
|
22
|
-
function _objectDestructuringEmpty(t) {
|
|
23
|
-
if (null == t) throw new TypeError("Cannot destructure " + t);
|
|
24
|
-
}
|
|
25
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
26
|
-
if (null == r) return {};
|
|
27
|
-
var t = {};
|
|
28
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
29
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
30
|
-
t[n] = r[n];
|
|
31
|
-
}
|
|
32
|
-
return t;
|
|
33
|
-
}
|
|
34
22
|
|
|
35
23
|
const stringReplaceAll = function (str, searcher, replaceWith) {
|
|
36
24
|
if (str === void 0) {
|
|
@@ -56,7 +44,6 @@ const timerEnabledForBusinessService = businessService => {
|
|
|
56
44
|
return false;
|
|
57
45
|
};
|
|
58
46
|
|
|
59
|
-
const _excluded = ["state"];
|
|
60
47
|
const SelectPaymentType = props => {
|
|
61
48
|
var _Digit$UserService$ge, _Digit$UserService$ge2, _data$Bill, _data$Bill$, _bill$billDetails, _bill$billDetails$sor, _bill$billDetails2, _bill$billDetails2$so;
|
|
62
49
|
const optionFirst = {
|
|
@@ -72,34 +59,37 @@ const SelectPaymentType = props => {
|
|
|
72
59
|
const userInfo = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info;
|
|
73
60
|
const payersActiveName = userInfo === null || userInfo === void 0 ? void 0 : userInfo.name;
|
|
74
61
|
const payersActiveMobileNumber = userInfo === null || userInfo === void 0 ? void 0 : userInfo.mobileNumber;
|
|
75
|
-
const
|
|
76
|
-
t
|
|
62
|
+
const {
|
|
63
|
+
t
|
|
64
|
+
} = reactI18next.useTranslation();
|
|
77
65
|
const history = reactRouterDom.useHistory();
|
|
78
|
-
const
|
|
79
|
-
state
|
|
80
|
-
location
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
66
|
+
const {
|
|
67
|
+
state,
|
|
68
|
+
...location
|
|
69
|
+
} = reactRouterDom.useLocation();
|
|
70
|
+
const {
|
|
71
|
+
consumerCode,
|
|
72
|
+
businessService,
|
|
73
|
+
paymentAmt
|
|
74
|
+
} = reactRouterDom.useParams();
|
|
75
|
+
const {
|
|
76
|
+
workflow: wrkflow,
|
|
77
|
+
tenantId: _tenantId,
|
|
78
|
+
ConsumerName
|
|
79
|
+
} = Digit.Hooks.useQueryParams();
|
|
80
|
+
const [bill, setBill] = React.useState(state === null || state === void 0 ? void 0 : state.bill);
|
|
92
81
|
const tenantId = (state === null || state === void 0 ? void 0 : state.tenantId) || _tenantId || ((_Digit$UserService$ge2 = Digit.UserService.getUser().info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.tenantId);
|
|
93
82
|
const isLoggedIn = Digit.UserService.getUser();
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
83
|
+
const {
|
|
84
|
+
data,
|
|
85
|
+
isLoading
|
|
86
|
+
} = state !== null && state !== void 0 && state.bill ? {
|
|
87
|
+
isLoading: false
|
|
88
|
+
} : Digit.Hooks.useFetchPayment({
|
|
89
|
+
tenantId,
|
|
90
|
+
businessService,
|
|
91
|
+
consumerCode
|
|
92
|
+
});
|
|
103
93
|
let Useruuid = (data === null || data === void 0 ? void 0 : (_data$Bill = data.Bill) === null || _data$Bill === void 0 ? void 0 : (_data$Bill$ = _data$Bill[0]) === null || _data$Bill$ === void 0 ? void 0 : _data$Bill$.userId) || "";
|
|
104
94
|
let requestCriteria = ["/user/_search", {}, {
|
|
105
95
|
data: {
|
|
@@ -112,42 +102,31 @@ const SelectPaymentType = props => {
|
|
|
112
102
|
enabled: Useruuid ? true : false,
|
|
113
103
|
cacheTime: 100
|
|
114
104
|
}];
|
|
115
|
-
const
|
|
116
|
-
isUserLoading
|
|
117
|
-
userData
|
|
105
|
+
const {
|
|
106
|
+
isLoading: isUserLoading,
|
|
107
|
+
data: userData,
|
|
108
|
+
revalidate
|
|
109
|
+
} = Digit.Hooks.useCustomAPIHook(...requestCriteria);
|
|
118
110
|
const billDetails = (bill === null || bill === void 0 ? void 0 : (_bill$billDetails = bill.billDetails) === null || _bill$billDetails === void 0 ? void 0 : (_bill$billDetails$sor = _bill$billDetails.sort((a, b) => b.fromPeriod - a.fromPeriod)) === null || _bill$billDetails$sor === void 0 ? void 0 : _bill$billDetails$sor[0]) || [];
|
|
119
111
|
const Arrears = (bill === null || bill === void 0 ? void 0 : (_bill$billDetails2 = bill.billDetails) === null || _bill$billDetails2 === void 0 ? void 0 : (_bill$billDetails2$so = _bill$billDetails2.sort((a, b) => b.fromPeriod - a.fromPeriod)) === null || _bill$billDetails2$so === void 0 ? void 0 : _bill$billDetails2$so.reduce((total, current, index) => index === 0 ? total : total + current.amount, 0)) || 0;
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
isCheckBox = _useState7[0],
|
|
139
|
-
setIsCheckBox = _useState7[1];
|
|
140
|
-
const _useState8 = React.useState(false),
|
|
141
|
-
isCCFEnabled = _useState8[0],
|
|
142
|
-
setisCCFEnabled = _useState8[1];
|
|
143
|
-
const _useState9 = React.useState(""),
|
|
144
|
-
mdmsConfig = _useState9[0],
|
|
145
|
-
setMdmsConfig = _useState9[1];
|
|
146
|
-
const _Digit$Hooks$useCusto2 = Digit.Hooks.useCustomMDMS(Digit.ULBService.getStateId(), "common-masters", [{
|
|
147
|
-
name: "CitizenConsentForm"
|
|
148
|
-
}]),
|
|
149
|
-
citizenConcentFormLoading = _Digit$Hooks$useCusto2.isLoading,
|
|
150
|
-
ccfData = _Digit$Hooks$useCusto2.data;
|
|
112
|
+
const [paymentType, setPaymentType] = React.useState(optionFirst);
|
|
113
|
+
const [payersName, setPayersName] = React.useState("");
|
|
114
|
+
const [payersMobileNumber, setPayersMobileNumber] = React.useState("");
|
|
115
|
+
const {
|
|
116
|
+
control,
|
|
117
|
+
handleSubmit
|
|
118
|
+
} = reactHookForm.useForm();
|
|
119
|
+
const [canSubmit, setCanSubmit] = React.useState(false);
|
|
120
|
+
const [mobileNumberError, setmobileNumberError] = React.useState(null);
|
|
121
|
+
const [isCheckBox, setIsCheckBox] = React.useState(false);
|
|
122
|
+
const [isCCFEnabled, setisCCFEnabled] = React.useState(false);
|
|
123
|
+
const [mdmsConfig, setMdmsConfig] = React.useState("");
|
|
124
|
+
const {
|
|
125
|
+
isLoading: citizenConcentFormLoading,
|
|
126
|
+
data: ccfData
|
|
127
|
+
} = Digit.Hooks.useCustomMDMS(Digit.ULBService.getStateId(), "common-masters", [{
|
|
128
|
+
name: "CitizenConsentForm"
|
|
129
|
+
}]);
|
|
151
130
|
function setTermsAndPolicyDetails(e) {
|
|
152
131
|
setIsCheckBox(e.target.checked);
|
|
153
132
|
}
|
|
@@ -175,7 +154,7 @@ const SelectPaymentType = props => {
|
|
|
175
154
|
var _isCCFEnabled$checkBo;
|
|
176
155
|
return /*#__PURE__*/React__default.createElement("span", null, isCCFEnabled === null || isCCFEnabled === void 0 ? void 0 : (_isCCFEnabled$checkBo = isCCFEnabled.checkBoxLabels) === null || _isCCFEnabled$checkBo === void 0 ? void 0 : _isCCFEnabled$checkBo.map((data, index) => {
|
|
177
156
|
var _isCCFEnabled$checkBo2;
|
|
178
|
-
return /*#__PURE__*/React__default.createElement("span", null, (data === null || data === void 0 ? void 0 : data.linkPrefix) && /*#__PURE__*/React__default.createElement("span", null, t(
|
|
157
|
+
return /*#__PURE__*/React__default.createElement("span", null, (data === null || data === void 0 ? void 0 : data.linkPrefix) && /*#__PURE__*/React__default.createElement("span", null, t(`${data === null || data === void 0 ? void 0 : data.linkPrefix}_`)), (data === null || data === void 0 ? void 0 : data.link) && /*#__PURE__*/React__default.createElement("span", {
|
|
179
158
|
id: data === null || data === void 0 ? void 0 : data.linkId,
|
|
180
159
|
onClick: e => {
|
|
181
160
|
onLinkClick(e);
|
|
@@ -184,7 +163,7 @@ const SelectPaymentType = props => {
|
|
|
184
163
|
color: "#a82227",
|
|
185
164
|
cursor: "pointer"
|
|
186
165
|
}
|
|
187
|
-
}, t(
|
|
166
|
+
}, t(`${data === null || data === void 0 ? void 0 : data.link}_`)), (data === null || data === void 0 ? void 0 : data.linkPostfix) && /*#__PURE__*/React__default.createElement("span", null, t(`${data === null || data === void 0 ? void 0 : data.linkPostfix}_`)), index == (isCCFEnabled === null || isCCFEnabled === void 0 ? void 0 : (_isCCFEnabled$checkBo2 = isCCFEnabled.checkBoxLabels) === null || _isCCFEnabled$checkBo2 === void 0 ? void 0 : _isCCFEnabled$checkBo2.length) - 1 && t("LABEL"));
|
|
188
167
|
}));
|
|
189
168
|
};
|
|
190
169
|
React.useEffect(() => {
|
|
@@ -211,7 +190,7 @@ const SelectPaymentType = props => {
|
|
|
211
190
|
const onSubmit = () => {
|
|
212
191
|
if (wrkflow === "WNS") {
|
|
213
192
|
var _bill$mobileNumber, _userData$user, _userData$user$;
|
|
214
|
-
history.push(
|
|
193
|
+
history.push(`/digit-ui/citizen/payment/collect/${businessService}/${consumerCode}?workflow=WNS&consumerCode=${stringReplaceAll(consumerCode, "+", "/")}`, {
|
|
215
194
|
paymentAmount: paymentAmt,
|
|
216
195
|
tenantId: billDetails.tenantId,
|
|
217
196
|
name: (paymentType === null || paymentType === void 0 ? void 0 : paymentType.code) !== (optionSecound === null || optionSecound === void 0 ? void 0 : optionSecound.code) && ConsumerName !== "undefined" ? ConsumerName : userInfo ? payersActiveName : payersName,
|
|
@@ -219,7 +198,7 @@ const SelectPaymentType = props => {
|
|
|
219
198
|
});
|
|
220
199
|
} else {
|
|
221
200
|
var _bill$mobileNumber2, _userData$user2, _userData$user2$;
|
|
222
|
-
history.push(
|
|
201
|
+
history.push(`/digit-ui/citizen/payment/collect/${businessService}/${consumerCode}`, {
|
|
223
202
|
paymentAmount: paymentAmt,
|
|
224
203
|
tenantId: billDetails.tenantId,
|
|
225
204
|
name: (paymentType === null || paymentType === void 0 ? void 0 : paymentType.code) !== (optionSecound === null || optionSecound === void 0 ? void 0 : optionSecound.code) ? bill === null || bill === void 0 ? void 0 : bill.payerName : userInfo ? payersActiveName : payersName,
|
|
@@ -285,15 +264,18 @@ const SelectPaymentType = props => {
|
|
|
285
264
|
|
|
286
265
|
const MyBill = _ref => {
|
|
287
266
|
var _bill$totalAmount;
|
|
288
|
-
let
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
267
|
+
let {
|
|
268
|
+
bill,
|
|
269
|
+
currentPath,
|
|
270
|
+
businessService,
|
|
271
|
+
getKeyNotesConfig
|
|
272
|
+
} = _ref;
|
|
273
|
+
const {
|
|
274
|
+
t
|
|
275
|
+
} = reactI18next.useTranslation();
|
|
294
276
|
const history = reactRouterDom.useHistory();
|
|
295
277
|
const onSubmit = () => {
|
|
296
|
-
history.push(currentPath
|
|
278
|
+
history.push(`${currentPath}/${bill.consumerCode}`, {
|
|
297
279
|
tenantId: bill === null || bill === void 0 ? void 0 : bill.tenantId
|
|
298
280
|
});
|
|
299
281
|
};
|
|
@@ -316,11 +298,14 @@ const MyBill = _ref => {
|
|
|
316
298
|
};
|
|
317
299
|
|
|
318
300
|
const BillList = _ref => {
|
|
319
|
-
let
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
301
|
+
let {
|
|
302
|
+
billsList,
|
|
303
|
+
currentPath,
|
|
304
|
+
businessService
|
|
305
|
+
} = _ref;
|
|
306
|
+
const {
|
|
307
|
+
t
|
|
308
|
+
} = reactI18next.useTranslation();
|
|
324
309
|
const history = reactRouterDom.useHistory();
|
|
325
310
|
const consumerCodes = billsList.map(bill => bill.consumerCode);
|
|
326
311
|
const searchResult = Digit.Hooks.useApplicationsForBusinessServiceSearch({
|
|
@@ -330,14 +315,11 @@ const BillList = _ref => {
|
|
|
330
315
|
businessService
|
|
331
316
|
});
|
|
332
317
|
const keyForConsumerCode = searchResult.key;
|
|
333
|
-
const
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
return (_Digit$ComponentRegis = Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent("getBillDetailsConfigWithBusinessService");
|
|
339
|
-
}),
|
|
340
|
-
getKeyNotesConfig = _useState2[0];
|
|
318
|
+
const [applicationList, setApplicationList] = React.useState([]);
|
|
319
|
+
const [getKeyNotesConfig, setConfig] = React.useState(() => {
|
|
320
|
+
var _Digit$ComponentRegis;
|
|
321
|
+
return (_Digit$ComponentRegis = Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent("getBillDetailsConfigWithBusinessService");
|
|
322
|
+
});
|
|
341
323
|
const billableApplicationsObj = React.useMemo(() => ({}), []);
|
|
342
324
|
const billsListObj = React.useMemo(() => ({}), []);
|
|
343
325
|
React.useEffect(() => {
|
|
@@ -353,7 +335,10 @@ const BillList = _ref => {
|
|
|
353
335
|
billsList.forEach(bill => {
|
|
354
336
|
billsListObj[bill.consumerCode] = bill;
|
|
355
337
|
});
|
|
356
|
-
const newBillsList = billableIDs.map(e =>
|
|
338
|
+
const newBillsList = billableIDs.map(e => ({
|
|
339
|
+
...billsListObj[e],
|
|
340
|
+
...billableApplicationsObj[e]
|
|
341
|
+
}));
|
|
357
342
|
setApplicationList(newBillsList);
|
|
358
343
|
}
|
|
359
344
|
}, [searchResult.data, getKeyNotesConfig]);
|
|
@@ -362,7 +347,7 @@ const BillList = _ref => {
|
|
|
362
347
|
}
|
|
363
348
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
364
349
|
className: "static"
|
|
365
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Header, null, t("CS_TITLE_MY_BILLS") +
|
|
350
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Header, null, t("CS_TITLE_MY_BILLS") + ` (${applicationList.length})`), (applicationList === null || applicationList === void 0 ? void 0 : applicationList.length) > 0 && getKeyNotesConfig && applicationList.map((bill, index) => /*#__PURE__*/React__default.createElement("div", {
|
|
366
351
|
key: index
|
|
367
352
|
}, /*#__PURE__*/React__default.createElement(MyBill, {
|
|
368
353
|
bill,
|
|
@@ -393,7 +378,7 @@ const styles = {
|
|
|
393
378
|
boxShadow: "none"
|
|
394
379
|
},
|
|
395
380
|
table: {
|
|
396
|
-
|
|
381
|
+
width: "100%",
|
|
397
382
|
backgroundColor: "rgba(250, 250, 250, var(--bg-opacity))"
|
|
398
383
|
},
|
|
399
384
|
cell: {
|
|
@@ -413,62 +398,81 @@ const styles = {
|
|
|
413
398
|
cellRight: {}
|
|
414
399
|
};
|
|
415
400
|
const ArrearTable = _ref => {
|
|
416
|
-
let
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
values =
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
const
|
|
423
|
-
t
|
|
401
|
+
let {
|
|
402
|
+
className = "table",
|
|
403
|
+
headers = [],
|
|
404
|
+
values = [],
|
|
405
|
+
arrears = 0
|
|
406
|
+
} = _ref;
|
|
407
|
+
const {
|
|
408
|
+
t
|
|
409
|
+
} = reactI18next.useTranslation();
|
|
424
410
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
425
411
|
style: styles.root
|
|
426
412
|
}, /*#__PURE__*/React__default.createElement("table", {
|
|
427
413
|
className: "table-fixed-column-common-pay",
|
|
428
414
|
style: styles.table
|
|
429
415
|
}, /*#__PURE__*/React__default.createElement("thead", null, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
|
|
430
|
-
style:
|
|
416
|
+
style: {
|
|
417
|
+
...styles.cell,
|
|
418
|
+
...styles.cellLeft,
|
|
419
|
+
...styles.cellHeader
|
|
420
|
+
}
|
|
431
421
|
}, t("CS_BILL_PERIOD")), headers.map((header, ind) => {
|
|
432
422
|
let styleRight = headers.length == ind + 1 ? styles.cellRight : {};
|
|
433
423
|
return /*#__PURE__*/React__default.createElement("th", {
|
|
434
|
-
style:
|
|
424
|
+
style: {
|
|
425
|
+
...styles.cell,
|
|
426
|
+
...styleRight,
|
|
427
|
+
...styles.cellHeader
|
|
428
|
+
},
|
|
435
429
|
key: ind
|
|
436
430
|
}, t(header));
|
|
437
431
|
}))), /*#__PURE__*/React__default.createElement("tbody", null, Object.values(values).map((row, ind) => /*#__PURE__*/React__default.createElement("tr", {
|
|
438
432
|
key: ind
|
|
439
433
|
}, /*#__PURE__*/React__default.createElement("td", {
|
|
440
|
-
style:
|
|
434
|
+
style: {
|
|
435
|
+
...styles.cell,
|
|
436
|
+
...styles.cellLeft
|
|
437
|
+
},
|
|
441
438
|
component: "th",
|
|
442
439
|
scope: "row"
|
|
443
440
|
}, Object.keys(values)[ind]), headers.map((header, i) => {
|
|
444
441
|
let styleRight = headers.length == i + 1 ? styles.cellRight : {};
|
|
445
442
|
return /*#__PURE__*/React__default.createElement("td", {
|
|
446
|
-
style:
|
|
447
|
-
|
|
448
|
-
|
|
443
|
+
style: {
|
|
444
|
+
...styles.cell,
|
|
445
|
+
textAlign: "left",
|
|
446
|
+
...styleRight,
|
|
449
447
|
whiteSpace: "pre"
|
|
450
|
-
}
|
|
448
|
+
},
|
|
451
449
|
key: i,
|
|
452
450
|
numeric: true
|
|
453
451
|
}, i > 1 && "₹", row[header] && row[header]["value"] || "0");
|
|
454
452
|
}))), /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("td", {
|
|
455
|
-
style:
|
|
453
|
+
style: {
|
|
454
|
+
...styles.cell,
|
|
455
|
+
...styles.cellLeft
|
|
456
|
+
}
|
|
456
457
|
}), headers.map((header, ind) => {
|
|
457
458
|
if (ind == headers.length - 1) {
|
|
458
459
|
return /*#__PURE__*/React__default.createElement("td", {
|
|
459
|
-
style:
|
|
460
|
+
style: {
|
|
461
|
+
...styles.cell,
|
|
462
|
+
...styles.cellRight,
|
|
460
463
|
textAlign: "left",
|
|
461
464
|
fontWeight: "700",
|
|
462
465
|
whiteSpace: "pre"
|
|
463
|
-
}
|
|
466
|
+
},
|
|
464
467
|
key: ind,
|
|
465
468
|
numeric: true
|
|
466
469
|
}, arrears);
|
|
467
470
|
} else if (ind == headers.length - 2) {
|
|
468
471
|
return /*#__PURE__*/React__default.createElement("td", {
|
|
469
|
-
style:
|
|
472
|
+
style: {
|
|
473
|
+
...styles.cell,
|
|
470
474
|
textAlign: "left"
|
|
471
|
-
}
|
|
475
|
+
},
|
|
472
476
|
key: ind,
|
|
473
477
|
numeric: true
|
|
474
478
|
}, t("COMMON_ARREARS_TOTAL"));
|
|
@@ -486,7 +490,11 @@ const styles$1 = {
|
|
|
486
490
|
buttonStyle: {
|
|
487
491
|
display: "flex",
|
|
488
492
|
justifyContent: "flex-end",
|
|
489
|
-
color: "#a82227"
|
|
493
|
+
color: "#a82227",
|
|
494
|
+
marginTop: "10px",
|
|
495
|
+
marginBottom: "10px",
|
|
496
|
+
cursor: "pointer",
|
|
497
|
+
fontWeight: "bold"
|
|
490
498
|
},
|
|
491
499
|
headerStyle: {
|
|
492
500
|
marginTop: "10px",
|
|
@@ -496,21 +504,102 @@ const styles$1 = {
|
|
|
496
504
|
color: " rgba(11, 12, 12, var(--text-opacity))"
|
|
497
505
|
}
|
|
498
506
|
};
|
|
507
|
+
const thStyle = {
|
|
508
|
+
textAlign: "left",
|
|
509
|
+
borderBottom: "#D6D5D4 1px solid",
|
|
510
|
+
padding: "16px 12px",
|
|
511
|
+
whiteSpace: "break-spaces",
|
|
512
|
+
fontSize: "14px",
|
|
513
|
+
fontWeight: "bold"
|
|
514
|
+
};
|
|
515
|
+
const tdStyle = {
|
|
516
|
+
textAlign: "left",
|
|
517
|
+
borderBottom: "#D6D5D4 1px solid",
|
|
518
|
+
padding: "8px 10px",
|
|
519
|
+
wordBreak: "keep-all",
|
|
520
|
+
fontSize: "14px"
|
|
521
|
+
};
|
|
499
522
|
const ArrearSummary = _ref => {
|
|
500
|
-
var _bill$billDetails, _sortedBillDetails, _arrears$toFixed;
|
|
501
|
-
let
|
|
502
|
-
bill =
|
|
503
|
-
|
|
504
|
-
|
|
523
|
+
var _bill$billDetails, _bill$billDetails2, _sortedBillDetails, _arrears$toFixed;
|
|
524
|
+
let {
|
|
525
|
+
bill = {},
|
|
526
|
+
businessService
|
|
527
|
+
} = _ref;
|
|
528
|
+
const {
|
|
529
|
+
t
|
|
530
|
+
} = reactI18next.useTranslation();
|
|
531
|
+
const [showArrear, setShowArrear] = React.useState(false);
|
|
532
|
+
const isWNS = businessService === "WS" || businessService === "SW";
|
|
533
|
+
const yearWiseBills = bill === null || bill === void 0 ? void 0 : (_bill$billDetails = bill.billDetails) === null || _bill$billDetails === void 0 ? void 0 : _bill$billDetails.sort((a, b) => b.fromPeriod - a.fromPeriod);
|
|
534
|
+
const getBillingPeriod = _bill => {
|
|
535
|
+
const {
|
|
536
|
+
fromPeriod,
|
|
537
|
+
toPeriod
|
|
538
|
+
} = _bill;
|
|
539
|
+
let from = new Date(fromPeriod).toLocaleDateString();
|
|
540
|
+
let to = new Date(toPeriod).toLocaleDateString();
|
|
541
|
+
return from + "-" + to;
|
|
542
|
+
};
|
|
543
|
+
const renderArrearDetailsForWNS = () => {
|
|
544
|
+
var _yearWiseBills$filter, _yearWiseBills$filter2, _yearWiseBills$filter3, _yearWiseBills$filter4, _yearWiseBills$filter5;
|
|
545
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
546
|
+
style: {
|
|
547
|
+
maxWidth: "100%",
|
|
548
|
+
overflowX: "auto",
|
|
549
|
+
backgroundColor: "#EEEEEE",
|
|
550
|
+
marginTop: "10px"
|
|
551
|
+
}
|
|
552
|
+
}, /*#__PURE__*/React__default.createElement("table", {
|
|
553
|
+
className: "table-fixed-column-common-pay",
|
|
554
|
+
style: {
|
|
555
|
+
width: "100%",
|
|
556
|
+
borderCollapse: "collapse"
|
|
557
|
+
}
|
|
558
|
+
}, /*#__PURE__*/React__default.createElement("thead", null, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
|
|
559
|
+
style: thStyle
|
|
560
|
+
}, t("CS_BILL_NO")), /*#__PURE__*/React__default.createElement("th", {
|
|
561
|
+
style: {
|
|
562
|
+
...thStyle
|
|
563
|
+
}
|
|
564
|
+
}, t("CS_PAYMENT_BILLING_PERIOD")), /*#__PURE__*/React__default.createElement("th", {
|
|
565
|
+
style: {
|
|
566
|
+
...thStyle
|
|
567
|
+
}
|
|
568
|
+
}, t("CS_BILL_DUEDATE")), yearWiseBills === null || yearWiseBills === void 0 ? void 0 : (_yearWiseBills$filter = yearWiseBills.filter((e, ind) => ind > 0)) === null || _yearWiseBills$filter === void 0 ? void 0 : (_yearWiseBills$filter2 = _yearWiseBills$filter[0]) === null || _yearWiseBills$filter2 === void 0 ? void 0 : (_yearWiseBills$filter3 = _yearWiseBills$filter2.billAccountDetails) === null || _yearWiseBills$filter3 === void 0 ? void 0 : (_yearWiseBills$filter4 = _yearWiseBills$filter3.sort((a, b) => a.order - b.order)) === null || _yearWiseBills$filter4 === void 0 ? void 0 : _yearWiseBills$filter4.map((head, index) => /*#__PURE__*/React__default.createElement("th", {
|
|
569
|
+
style: {
|
|
570
|
+
...thStyle
|
|
571
|
+
},
|
|
572
|
+
key: index
|
|
573
|
+
}, t(head.taxHeadCode))), /*#__PURE__*/React__default.createElement("th", {
|
|
574
|
+
style: thStyle
|
|
575
|
+
}, t("TOTAL_TAX")))), /*#__PURE__*/React__default.createElement("tbody", null, yearWiseBills === null || yearWiseBills === void 0 ? void 0 : (_yearWiseBills$filter5 = yearWiseBills.filter((e, ind) => ind > 0)) === null || _yearWiseBills$filter5 === void 0 ? void 0 : _yearWiseBills$filter5.map((year_bill, index) => {
|
|
576
|
+
var _year_bill$billAccoun;
|
|
577
|
+
const sorted_tax_heads = year_bill === null || year_bill === void 0 ? void 0 : (_year_bill$billAccoun = year_bill.billAccountDetails) === null || _year_bill$billAccoun === void 0 ? void 0 : _year_bill$billAccoun.sort((a, b) => a.order - b.order);
|
|
578
|
+
return /*#__PURE__*/React__default.createElement("tr", {
|
|
579
|
+
key: index
|
|
580
|
+
}, /*#__PURE__*/React__default.createElement("td", {
|
|
581
|
+
style: tdStyle
|
|
582
|
+
}, year_bill === null || year_bill === void 0 ? void 0 : year_bill.billNumber), /*#__PURE__*/React__default.createElement("td", {
|
|
583
|
+
style: tdStyle
|
|
584
|
+
}, getBillingPeriod(year_bill)), /*#__PURE__*/React__default.createElement("td", {
|
|
585
|
+
style: tdStyle
|
|
586
|
+
}, (year_bill === null || year_bill === void 0 ? void 0 : year_bill.expiryDate) && new Date(year_bill === null || year_bill === void 0 ? void 0 : year_bill.expiryDate).toLocaleDateString()), sorted_tax_heads === null || sorted_tax_heads === void 0 ? void 0 : sorted_tax_heads.map((e, i) => /*#__PURE__*/React__default.createElement("td", {
|
|
587
|
+
style: tdStyle,
|
|
588
|
+
key: i
|
|
589
|
+
}, e.amount)), /*#__PURE__*/React__default.createElement("td", {
|
|
590
|
+
style: tdStyle
|
|
591
|
+
}, year_bill.amount));
|
|
592
|
+
}))));
|
|
593
|
+
};
|
|
505
594
|
const formatTaxHeaders = function (billDetail) {
|
|
506
|
-
var _billDetail2, _billDetail3
|
|
595
|
+
var _billDetail, _billDetail2, _billDetail3;
|
|
507
596
|
if (billDetail === void 0) {
|
|
508
597
|
billDetail = {};
|
|
509
598
|
}
|
|
510
599
|
let formattedFees = {};
|
|
511
|
-
const
|
|
512
|
-
|
|
513
|
-
|
|
600
|
+
const {
|
|
601
|
+
billAccountDetails = []
|
|
602
|
+
} = billDetail;
|
|
514
603
|
billAccountDetails.map(taxHead => {
|
|
515
604
|
formattedFees[taxHead.taxHeadCode] = {
|
|
516
605
|
value: taxHead.amount,
|
|
@@ -518,11 +607,11 @@ const ArrearSummary = _ref => {
|
|
|
518
607
|
};
|
|
519
608
|
});
|
|
520
609
|
formattedFees["CS_BILL_NO"] = {
|
|
521
|
-
value: ((
|
|
610
|
+
value: ((_billDetail = billDetail) === null || _billDetail === void 0 ? void 0 : _billDetail.billNumber) || "NA",
|
|
522
611
|
order: -2
|
|
523
612
|
};
|
|
524
613
|
formattedFees["CS_BILL_DUEDATE"] = {
|
|
525
|
-
value: ((
|
|
614
|
+
value: ((_billDetail2 = billDetail) === null || _billDetail2 === void 0 ? void 0 : _billDetail2.expiryDate) && new Date((_billDetail3 = billDetail) === null || _billDetail3 === void 0 ? void 0 : _billDetail3.expiryDate).toLocaleDateString() || "NA",
|
|
526
615
|
order: -1
|
|
527
616
|
};
|
|
528
617
|
formattedFees["TL_COMMON_TOTAL_AMT"] = {
|
|
@@ -535,15 +624,15 @@ const ArrearSummary = _ref => {
|
|
|
535
624
|
const fromDate = new Date(from);
|
|
536
625
|
const toDate = new Date(to);
|
|
537
626
|
if (toDate.getYear() - fromDate.getYear() != 0) {
|
|
538
|
-
return
|
|
627
|
+
return `FY${fromDate.getYear() + 1900}-${toDate.getYear() - 100}`;
|
|
539
628
|
}
|
|
540
|
-
return fromDate.toLocaleDateString()
|
|
629
|
+
return `${fromDate.toLocaleDateString()}-${toDate.toLocaleDateString()}`;
|
|
541
630
|
};
|
|
542
631
|
let fees = {};
|
|
543
|
-
let sortedBillDetails = (bill === null || bill === void 0 ? void 0 : (_bill$
|
|
632
|
+
let sortedBillDetails = (bill === null || bill === void 0 ? void 0 : (_bill$billDetails2 = bill.billDetails) === null || _bill$billDetails2 === void 0 ? void 0 : _bill$billDetails2.sort((a, b) => b.fromPeriod - a.fromPeriod)) || [];
|
|
544
633
|
sortedBillDetails = [...sortedBillDetails];
|
|
545
634
|
const arrears = ((_sortedBillDetails = sortedBillDetails) === null || _sortedBillDetails === void 0 ? void 0 : _sortedBillDetails.reduce((total, current, index) => index === 0 ? total : total + current.amount, 0)) || 0;
|
|
546
|
-
let arrearsAmount =
|
|
635
|
+
let arrearsAmount = `₹ ${(arrears === null || arrears === void 0 ? void 0 : (_arrears$toFixed = arrears.toFixed) === null || _arrears$toFixed === void 0 ? void 0 : _arrears$toFixed.call(arrears, 0)) || Number(0).toFixed(0)}`;
|
|
547
636
|
sortedBillDetails.shift();
|
|
548
637
|
sortedBillDetails.map(bill => {
|
|
549
638
|
let fee = formatTaxHeaders(bill);
|
|
@@ -558,9 +647,18 @@ const ArrearSummary = _ref => {
|
|
|
558
647
|
let keys = [];
|
|
559
648
|
keys = Object.keys(head);
|
|
560
649
|
keys.sort((x, y) => head[x] - head[y]);
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
650
|
+
if (isWNS) {
|
|
651
|
+
if (!yearWiseBills || yearWiseBills.length <= 1) {
|
|
652
|
+
return /*#__PURE__*/React__default.createElement("span", null);
|
|
653
|
+
}
|
|
654
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, showArrear && renderArrearDetailsForWNS(), /*#__PURE__*/React__default.createElement("div", {
|
|
655
|
+
style: styles$1.buttonStyle
|
|
656
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
657
|
+
onClick: () => {
|
|
658
|
+
setShowArrear(!showArrear);
|
|
659
|
+
}
|
|
660
|
+
}, showArrear ? t("ES_COMMON_HIDE_DETAILS") : t("ES_COMMON_VIEW_DETAILS"))));
|
|
661
|
+
}
|
|
564
662
|
if (arrears == 0 || arrears < 0) {
|
|
565
663
|
return /*#__PURE__*/React__default.createElement("span", null);
|
|
566
664
|
}
|
|
@@ -623,13 +721,18 @@ const ReceiptSlashIconSVG = () => /*#__PURE__*/React__default.createElement("svg
|
|
|
623
721
|
y2: "21"
|
|
624
722
|
}));
|
|
625
723
|
const BillSumary = _ref => {
|
|
626
|
-
let
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
724
|
+
let {
|
|
725
|
+
billAccountDetails,
|
|
726
|
+
total,
|
|
727
|
+
businessService,
|
|
728
|
+
arrears
|
|
729
|
+
} = _ref;
|
|
730
|
+
const {
|
|
731
|
+
t
|
|
732
|
+
} = reactI18next.useTranslation();
|
|
733
|
+
const {
|
|
734
|
+
workflow: ModuleWorkflow
|
|
735
|
+
} = Digit.Hooks.useQueryParams();
|
|
633
736
|
React.useEffect(() => {
|
|
634
737
|
ModuleWorkflow === "mcollect" && billAccountDetails && billAccountDetails.map(ob => {
|
|
635
738
|
if (ob.taxHeadCode.includes("CGST")) ob.order = 3;else if (ob.taxHeadCode.includes("SGST")) ob.order = 4;
|
|
@@ -748,33 +851,30 @@ function _catch(body, recover) {
|
|
|
748
851
|
}
|
|
749
852
|
|
|
750
853
|
const TimerServices = _ref => {
|
|
751
|
-
let
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
const
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
enabled: false
|
|
776
|
-
}),
|
|
777
|
-
refetch = _Digit$Hooks$chb$useC.refetch;
|
|
854
|
+
let {
|
|
855
|
+
businessService,
|
|
856
|
+
t,
|
|
857
|
+
timerValues,
|
|
858
|
+
SlotSearchData = "",
|
|
859
|
+
setTime
|
|
860
|
+
} = _ref;
|
|
861
|
+
const [timeRemaining, setTimeRemaining] = React.useState(0);
|
|
862
|
+
const [showToast, setShowToast] = React.useState(null);
|
|
863
|
+
const [hasFetched, setHasFetched] = React.useState(false);
|
|
864
|
+
const {
|
|
865
|
+
refetch
|
|
866
|
+
} = Digit.Hooks.chb.useChbSlotSearch({
|
|
867
|
+
tenantId: SlotSearchData === null || SlotSearchData === void 0 ? void 0 : SlotSearchData.tenantId,
|
|
868
|
+
filters: {
|
|
869
|
+
bookingId: SlotSearchData === null || SlotSearchData === void 0 ? void 0 : SlotSearchData.bookingId,
|
|
870
|
+
communityHallCode: SlotSearchData === null || SlotSearchData === void 0 ? void 0 : SlotSearchData.communityHallCode,
|
|
871
|
+
bookingStartDate: SlotSearchData === null || SlotSearchData === void 0 ? void 0 : SlotSearchData.bookingStartDate,
|
|
872
|
+
bookingEndDate: SlotSearchData === null || SlotSearchData === void 0 ? void 0 : SlotSearchData.bookingEndDate,
|
|
873
|
+
hallCode: SlotSearchData === null || SlotSearchData === void 0 ? void 0 : SlotSearchData.hallCode,
|
|
874
|
+
isTimerRequired: true
|
|
875
|
+
},
|
|
876
|
+
enabled: false
|
|
877
|
+
});
|
|
778
878
|
const slotSearchData = Digit.Hooks.ads.useADSSlotSearch();
|
|
779
879
|
React.useEffect(() => {
|
|
780
880
|
const fetchSlotData = function () {
|
|
@@ -870,7 +970,7 @@ const TimerServices = _ref => {
|
|
|
870
970
|
const formatTime = seconds => {
|
|
871
971
|
const minutes = Math.floor(seconds / 60);
|
|
872
972
|
const remainingSeconds = seconds % 60;
|
|
873
|
-
return minutes
|
|
973
|
+
return `${minutes}:${remainingSeconds < 10 ? '0' : ''}${remainingSeconds}`;
|
|
874
974
|
};
|
|
875
975
|
return /*#__PURE__*/React__default.createElement("div", null, t("CS_TIME_REMAINING"), ": ", /*#__PURE__*/React__default.createElement("span", {
|
|
876
976
|
className: "astericColor"
|
|
@@ -886,40 +986,44 @@ const TimerServices = _ref => {
|
|
|
886
986
|
|
|
887
987
|
const BillDetails = _ref => {
|
|
888
988
|
var _Digit$UserService$ge, _data$Bill, _data$Bill$, _bill$billDetails, _bill$billDetails$sor, _bill$billDetails2, _bill$billDetails2$so, _application$pdfData6, _application$pdfData7, _application$pdfData8, _application$pdfData9, _application$pdfData0, _application$pdfData1, _application$pdfData10, _application$pdfData11, _application$pdfData12;
|
|
889
|
-
let
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
989
|
+
let {
|
|
990
|
+
paymentRules,
|
|
991
|
+
businessService
|
|
992
|
+
} = _ref;
|
|
993
|
+
const {
|
|
994
|
+
t
|
|
995
|
+
} = reactI18next.useTranslation();
|
|
893
996
|
const history = reactRouterDom.useHistory();
|
|
894
|
-
const
|
|
895
|
-
state
|
|
896
|
-
pathname
|
|
897
|
-
search
|
|
997
|
+
const {
|
|
998
|
+
state,
|
|
999
|
+
pathname,
|
|
1000
|
+
search
|
|
1001
|
+
} = reactRouterDom.useLocation();
|
|
898
1002
|
const userInfo = Digit.UserService.getUser();
|
|
899
|
-
let
|
|
900
|
-
consumerCode
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
1003
|
+
let {
|
|
1004
|
+
consumerCode
|
|
1005
|
+
} = reactRouterDom.useParams();
|
|
1006
|
+
const {
|
|
1007
|
+
workflow: wrkflow,
|
|
1008
|
+
tenantId: _tenantId,
|
|
1009
|
+
authorization,
|
|
1010
|
+
ConsumerName
|
|
1011
|
+
} = Digit.Hooks.useQueryParams();
|
|
1012
|
+
const [bill, setBill] = React.useState(state === null || state === void 0 ? void 0 : state.bill);
|
|
909
1013
|
const tenantId = (state === null || state === void 0 ? void 0 : state.tenantId) || _tenantId || ((_Digit$UserService$ge = Digit.UserService.getUser().info) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.tenantId);
|
|
910
1014
|
const propertyId = state === null || state === void 0 ? void 0 : state.propertyId;
|
|
911
|
-
const
|
|
912
|
-
setTime = _useState2[1];
|
|
1015
|
+
const [Time, setTime] = React.useState(0);
|
|
913
1016
|
if (wrkflow === "WNS" && consumerCode.includes("?")) consumerCode = consumerCode.substring(0, consumerCode.indexOf("?"));
|
|
914
|
-
const
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
1017
|
+
const {
|
|
1018
|
+
data,
|
|
1019
|
+
isLoading
|
|
1020
|
+
} = state !== null && state !== void 0 && state.bill ? {
|
|
1021
|
+
isLoading: false
|
|
1022
|
+
} : Digit.Hooks.useFetchPayment({
|
|
1023
|
+
tenantId,
|
|
1024
|
+
businessService,
|
|
1025
|
+
consumerCode: wrkflow === "WNS" ? stringReplaceAll(consumerCode, "+", "/") : consumerCode
|
|
1026
|
+
});
|
|
923
1027
|
let Useruuid = (data === null || data === void 0 ? void 0 : (_data$Bill = data.Bill) === null || _data$Bill === void 0 ? void 0 : (_data$Bill$ = _data$Bill[0]) === null || _data$Bill$ === void 0 ? void 0 : _data$Bill$.userId) || "";
|
|
924
1028
|
let requestCriteria = ["/user/_search", {}, {
|
|
925
1029
|
data: {
|
|
@@ -932,27 +1036,40 @@ const BillDetails = _ref => {
|
|
|
932
1036
|
enabled: Useruuid ? true : false,
|
|
933
1037
|
cacheTime: 100
|
|
934
1038
|
}];
|
|
935
|
-
const
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
1039
|
+
const {
|
|
1040
|
+
isLoading: isUserLoading,
|
|
1041
|
+
data: userData,
|
|
1042
|
+
revalidate
|
|
1043
|
+
} = Digit.Hooks.useCustomAPIHook(...requestCriteria);
|
|
1044
|
+
const {
|
|
1045
|
+
isLoading: isFSMLoading,
|
|
1046
|
+
isError,
|
|
1047
|
+
error,
|
|
1048
|
+
data: application,
|
|
1049
|
+
error: errorApplication
|
|
1050
|
+
} = Digit.Hooks.fsm.useApplicationDetail(t, tenantId, consumerCode, {
|
|
1051
|
+
enabled: pathname.includes("FSM") ? true : false
|
|
1052
|
+
}, "CITIZEN");
|
|
1053
|
+
let {
|
|
1054
|
+
minAmountPayable,
|
|
1055
|
+
isAdvanceAllowed
|
|
1056
|
+
} = paymentRules;
|
|
944
1057
|
minAmountPayable = wrkflow === "WNS" ? 100 : minAmountPayable;
|
|
945
1058
|
const billDetails = (bill === null || bill === void 0 ? void 0 : (_bill$billDetails = bill.billDetails) === null || _bill$billDetails === void 0 ? void 0 : (_bill$billDetails$sor = _bill$billDetails.sort((a, b) => b.fromPeriod - a.fromPeriod)) === null || _bill$billDetails$sor === void 0 ? void 0 : _bill$billDetails$sor[0]) || [];
|
|
946
1059
|
const Arrears = (bill === null || bill === void 0 ? void 0 : (_bill$billDetails2 = bill.billDetails) === null || _bill$billDetails2 === void 0 ? void 0 : (_bill$billDetails2$so = _bill$billDetails2.sort((a, b) => b.fromPeriod - a.fromPeriod)) === null || _bill$billDetails2$so === void 0 ? void 0 : _bill$billDetails2$so.reduce((total, current, index) => index === 0 ? total : total + current.amount, 0)) || 0;
|
|
947
|
-
const
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
1060
|
+
const {
|
|
1061
|
+
key,
|
|
1062
|
+
label
|
|
1063
|
+
} = Digit.Hooks.useApplicationsForBusinessServiceSearch({
|
|
1064
|
+
businessService
|
|
1065
|
+
}, {
|
|
1066
|
+
enabled: false
|
|
1067
|
+
});
|
|
953
1068
|
const getBillingPeriod = () => {
|
|
954
|
-
const
|
|
955
|
-
|
|
1069
|
+
const {
|
|
1070
|
+
fromPeriod,
|
|
1071
|
+
toPeriod
|
|
1072
|
+
} = billDetails;
|
|
956
1073
|
if (fromPeriod && toPeriod) {
|
|
957
1074
|
let from, to;
|
|
958
1075
|
if (wrkflow === "mcollect" || wrkflow === "WNS") {
|
|
@@ -984,23 +1101,15 @@ const BillDetails = _ref => {
|
|
|
984
1101
|
var _application$pdfData;
|
|
985
1102
|
return application === null || application === void 0 ? void 0 : (_application$pdfData = application.pdfData) === null || _application$pdfData === void 0 ? void 0 : _application$pdfData.advanceAmount;
|
|
986
1103
|
};
|
|
987
|
-
const
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
const
|
|
991
|
-
amount = _useState4[0],
|
|
992
|
-
setAmount = _useState4[1];
|
|
993
|
-
const _useState5 = React.useState(true),
|
|
994
|
-
paymentAllowed = _useState5[0],
|
|
995
|
-
setPaymentAllowed = _useState5[1];
|
|
996
|
-
const _useState6 = React.useState(""),
|
|
997
|
-
formError = _useState6[0],
|
|
998
|
-
setError = _useState6[1];
|
|
1104
|
+
const [paymentType, setPaymentType] = React.useState(t("CS_PAYMENT_FULL_AMOUNT"));
|
|
1105
|
+
const [amount, setAmount] = React.useState(getTotal());
|
|
1106
|
+
const [paymentAllowed, setPaymentAllowed] = React.useState(true);
|
|
1107
|
+
const [formError, setError] = React.useState("");
|
|
999
1108
|
const kc = window.keycloak;
|
|
1000
1109
|
if (authorization === "true" && !(kc !== null && kc !== void 0 && kc.authenticated)) {
|
|
1001
1110
|
localStorage.clear();
|
|
1002
1111
|
sessionStorage.clear();
|
|
1003
|
-
window.location.href =
|
|
1112
|
+
window.location.href = `/digit-ui/citizen/login?from=${encodeURIComponent(pathname + search)}`;
|
|
1004
1113
|
}
|
|
1005
1114
|
React.useEffect(() => {
|
|
1006
1115
|
window.scroll({
|
|
@@ -1034,13 +1143,13 @@ const BillDetails = _ref => {
|
|
|
1034
1143
|
var _application$pdfData4, _application$pdfData5;
|
|
1035
1144
|
let paymentAmount = paymentType === t("CS_PAYMENT_FULL_AMOUNT") ? businessService === "FSM.TRIP_CHARGES" ? application === null || application === void 0 ? void 0 : (_application$pdfData4 = application.pdfData) === null || _application$pdfData4 === void 0 ? void 0 : _application$pdfData4.advanceAmount : getTotal() : amount || businessService === "FSM.TRIP_CHARGES" ? application === null || application === void 0 ? void 0 : (_application$pdfData5 = application.pdfData) === null || _application$pdfData5 === void 0 ? void 0 : _application$pdfData5.advanceAmount : amount;
|
|
1036
1145
|
if (window.location.href.includes("mcollect")) {
|
|
1037
|
-
history.push(
|
|
1146
|
+
history.push(`/digit-ui/citizen/payment/collect/${businessService}/${consumerCode}?workflow=mcollect`, {
|
|
1038
1147
|
paymentAmount,
|
|
1039
1148
|
tenantId: billDetails.tenantId
|
|
1040
1149
|
});
|
|
1041
1150
|
} else if (wrkflow === "WNS") {
|
|
1042
1151
|
var _bill$mobileNumber, _userData$user, _userData$user$;
|
|
1043
|
-
history.push(
|
|
1152
|
+
history.push(`/digit-ui/citizen/payment/billDetails/${businessService}/${consumerCode}/${paymentAmount}?workflow=WNS&ConsumerName=${ConsumerName}`, {
|
|
1044
1153
|
paymentAmount,
|
|
1045
1154
|
tenantId: billDetails.tenantId,
|
|
1046
1155
|
name: bill.payerName,
|
|
@@ -1048,14 +1157,14 @@ const BillDetails = _ref => {
|
|
|
1048
1157
|
});
|
|
1049
1158
|
} else if (businessService === "PT") {
|
|
1050
1159
|
var _bill$mobileNumber2, _userData$user2, _userData$user2$;
|
|
1051
|
-
history.push(
|
|
1160
|
+
history.push(`/digit-ui/citizen/payment/billDetails/${businessService}/${consumerCode}/${paymentAmount}`, {
|
|
1052
1161
|
paymentAmount,
|
|
1053
1162
|
tenantId: billDetails.tenantId,
|
|
1054
1163
|
name: bill.payerName,
|
|
1055
1164
|
mobileNumber: bill.mobileNumber && (_bill$mobileNumber2 = bill.mobileNumber) !== null && _bill$mobileNumber2 !== void 0 && _bill$mobileNumber2.includes("*") ? userData === null || userData === void 0 ? void 0 : (_userData$user2 = userData.user) === null || _userData$user2 === void 0 ? void 0 : (_userData$user2$ = _userData$user2[0]) === null || _userData$user2$ === void 0 ? void 0 : _userData$user2$.mobileNumber : bill.mobileNumber
|
|
1056
1165
|
});
|
|
1057
1166
|
} else if (timerEnabledForBusinessService(businessService)) {
|
|
1058
|
-
history.push(
|
|
1167
|
+
history.push(`/digit-ui/citizen/payment/collect/${businessService}/${consumerCode}`, {
|
|
1059
1168
|
paymentAmount,
|
|
1060
1169
|
tenantId: billDetails.tenantId,
|
|
1061
1170
|
propertyId: propertyId,
|
|
@@ -1063,7 +1172,7 @@ const BillDetails = _ref => {
|
|
|
1063
1172
|
SlotSearchData: state === null || state === void 0 ? void 0 : state.SlotSearchData
|
|
1064
1173
|
});
|
|
1065
1174
|
} else {
|
|
1066
|
-
history.push(
|
|
1175
|
+
history.push(`/digit-ui/citizen/payment/collect/${businessService}/${consumerCode}`, {
|
|
1067
1176
|
paymentAmount,
|
|
1068
1177
|
tenantId: billDetails.tenantId,
|
|
1069
1178
|
propertyId: propertyId
|
|
@@ -1138,7 +1247,8 @@ const BillDetails = _ref => {
|
|
|
1138
1247
|
businessService: businessService,
|
|
1139
1248
|
arrears: Arrears
|
|
1140
1249
|
}), /*#__PURE__*/React__default.createElement(ArrearSummary, {
|
|
1141
|
-
bill: bill
|
|
1250
|
+
bill: bill,
|
|
1251
|
+
businessService: businessService
|
|
1142
1252
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
1143
1253
|
className: "bill-payment-amount"
|
|
1144
1254
|
}, /*#__PURE__*/React__default.createElement("hr", {
|
|
@@ -1156,7 +1266,7 @@ const BillDetails = _ref => {
|
|
|
1156
1266
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
1157
1267
|
className: "payment-amount-front",
|
|
1158
1268
|
style: {
|
|
1159
|
-
border:
|
|
1269
|
+
border: `1px solid ${paymentType === t("CS_PAYMENT_FULL_AMOUNT") ? "#9a9a9a" : "#9a9a9a"}`
|
|
1160
1270
|
}
|
|
1161
1271
|
}, "\u20B9"), paymentType !== t("CS_PAYMENT_FULL_AMOUNT") ? businessService === "FSM.TRIP_CHARGES" ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
1162
1272
|
className: "text-indent-xl",
|
|
@@ -1194,17 +1304,19 @@ const BillDetails = _ref => {
|
|
|
1194
1304
|
})))));
|
|
1195
1305
|
};
|
|
1196
1306
|
|
|
1197
|
-
const _excluded$1 = ["url"];
|
|
1198
1307
|
const BillRoutes = _ref => {
|
|
1199
|
-
let
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1308
|
+
let {
|
|
1309
|
+
billsList,
|
|
1310
|
+
paymentRules,
|
|
1311
|
+
businessService
|
|
1312
|
+
} = _ref;
|
|
1313
|
+
const {
|
|
1314
|
+
url: currentPath,
|
|
1315
|
+
...match
|
|
1316
|
+
} = reactRouterDom.useRouteMatch();
|
|
1205
1317
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
1206
1318
|
exact: true,
|
|
1207
|
-
path:
|
|
1319
|
+
path: `${currentPath}`,
|
|
1208
1320
|
component: () => /*#__PURE__*/React__default.createElement(BillList, {
|
|
1209
1321
|
billsList,
|
|
1210
1322
|
currentPath,
|
|
@@ -1212,7 +1324,7 @@ const BillRoutes = _ref => {
|
|
|
1212
1324
|
businessService
|
|
1213
1325
|
})
|
|
1214
1326
|
}), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
1215
|
-
path: currentPath
|
|
1327
|
+
path: `${currentPath}/:consumerCode`,
|
|
1216
1328
|
component: () => /*#__PURE__*/React__default.createElement(BillDetails, {
|
|
1217
1329
|
paymentRules,
|
|
1218
1330
|
businessService
|
|
@@ -1221,41 +1333,49 @@ const BillRoutes = _ref => {
|
|
|
1221
1333
|
};
|
|
1222
1334
|
|
|
1223
1335
|
const MyBills = _ref => {
|
|
1224
|
-
var _Digit$UserService$ge, _location$state, _location$state2;
|
|
1225
|
-
let
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
const
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
const
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1336
|
+
var _Digit$UserService$ge, _Digit$UserService$ge2, _location$state, _location$state2, _location$state3;
|
|
1337
|
+
let {
|
|
1338
|
+
stateCode
|
|
1339
|
+
} = _ref;
|
|
1340
|
+
const {
|
|
1341
|
+
businessService
|
|
1342
|
+
} = reactRouterDom.useParams();
|
|
1343
|
+
const {
|
|
1344
|
+
tenantId: _tenantId,
|
|
1345
|
+
isDisoconnectFlow
|
|
1346
|
+
} = Digit.Hooks.useQueryParams();
|
|
1347
|
+
const {
|
|
1348
|
+
isLoading: storeLoading,
|
|
1349
|
+
data: store
|
|
1350
|
+
} = Digit.Services.useStore({
|
|
1351
|
+
stateCode,
|
|
1352
|
+
moduleCode: businessService,
|
|
1353
|
+
language: Digit.StoreData.getCurrentLanguage()
|
|
1354
|
+
});
|
|
1236
1355
|
const history = reactRouterDom.useHistory();
|
|
1237
|
-
const
|
|
1238
|
-
url
|
|
1356
|
+
const {
|
|
1357
|
+
url
|
|
1358
|
+
} = reactRouterDom.useRouteMatch();
|
|
1239
1359
|
const location = reactRouterDom.useLocation();
|
|
1240
|
-
const
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
tenantId = _ref2.tenantId;
|
|
1244
|
-
if (!tenantId && !(location !== null && location !== void 0 && (_location$state = location.state) !== null && _location$state !== void 0 && _location$state.fromSearchResults)) {
|
|
1245
|
-
history.replace("/digit-ui/citizen/login", {
|
|
1360
|
+
const tenantId = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.tenantId) || (location === null || location === void 0 ? void 0 : (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.tenantId) || _tenantId;
|
|
1361
|
+
if (!tenantId && !(location !== null && location !== void 0 && (_location$state2 = location.state) !== null && _location$state2 !== void 0 && _location$state2.fromSearchResults)) {
|
|
1362
|
+
history.replace(`/digit-ui/citizen/login`, {
|
|
1246
1363
|
from: url
|
|
1247
1364
|
});
|
|
1248
1365
|
}
|
|
1249
|
-
const
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1366
|
+
const {
|
|
1367
|
+
isLoading,
|
|
1368
|
+
data
|
|
1369
|
+
} = Digit.Hooks.useFetchCitizenBillsForBuissnessService({
|
|
1370
|
+
businessService
|
|
1371
|
+
}, {
|
|
1372
|
+
refetchOnMount: true,
|
|
1373
|
+
enabled: !(location !== null && location !== void 0 && (_location$state3 = location.state) !== null && _location$state3 !== void 0 && _location$state3.fromSearchResults)
|
|
1374
|
+
});
|
|
1375
|
+
const {
|
|
1376
|
+
isLoading: mdmsLoading,
|
|
1377
|
+
data: mdmsBillingData
|
|
1378
|
+
} = Digit.Hooks.useGetPaymentRulesForBusinessServices(tenantId);
|
|
1259
1379
|
const billsList = (data === null || data === void 0 ? void 0 : data.Bill) || [];
|
|
1260
1380
|
const getPaymentRestrictionDetails = () => {
|
|
1261
1381
|
var _mdmsBillingData$Mdms, _mdmsBillingData$Mdms2, _payRestrictiondetail;
|
|
@@ -1300,47 +1420,50 @@ const makePayment = function (url, data) {
|
|
|
1300
1420
|
|
|
1301
1421
|
const SelectPaymentType$1 = props => {
|
|
1302
1422
|
var _paymentdetails$Bill;
|
|
1303
|
-
const
|
|
1304
|
-
|
|
1305
|
-
|
|
1423
|
+
const {
|
|
1424
|
+
state = {}
|
|
1425
|
+
} = reactRouterDom.useLocation();
|
|
1306
1426
|
const userInfo = Digit.UserService.getUser();
|
|
1307
|
-
const
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
connectionNo = _Digit$Hooks$useQuery.consumerCode;
|
|
1427
|
+
const [showToast, setShowToast] = React.useState(null);
|
|
1428
|
+
const {
|
|
1429
|
+
tenantId: __tenantId,
|
|
1430
|
+
authorization,
|
|
1431
|
+
workflow: wrkflow,
|
|
1432
|
+
consumerCode: connectionNo
|
|
1433
|
+
} = Digit.Hooks.useQueryParams();
|
|
1315
1434
|
const paymentAmount = state === null || state === void 0 ? void 0 : state.paymentAmount;
|
|
1316
|
-
const
|
|
1317
|
-
t
|
|
1435
|
+
const {
|
|
1436
|
+
t
|
|
1437
|
+
} = reactI18next.useTranslation();
|
|
1318
1438
|
const history = reactRouterDom.useHistory();
|
|
1319
|
-
const
|
|
1320
|
-
pathname
|
|
1321
|
-
search
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1439
|
+
const {
|
|
1440
|
+
pathname,
|
|
1441
|
+
search
|
|
1442
|
+
} = reactRouterDom.useLocation();
|
|
1443
|
+
let {
|
|
1444
|
+
consumerCode,
|
|
1445
|
+
businessService
|
|
1446
|
+
} = reactRouterDom.useParams();
|
|
1325
1447
|
const tenantId = (state === null || state === void 0 ? void 0 : state.tenantId) || __tenantId || Digit.ULBService.getCurrentTenantId();
|
|
1326
1448
|
const kc = window.keycloak;
|
|
1327
1449
|
const stateTenant = Digit.ULBService.getStateId();
|
|
1328
|
-
const
|
|
1329
|
-
control
|
|
1330
|
-
handleSubmit
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
const
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1450
|
+
const {
|
|
1451
|
+
control,
|
|
1452
|
+
handleSubmit
|
|
1453
|
+
} = reactHookForm.useForm();
|
|
1454
|
+
const [Time, setTime] = React.useState(0);
|
|
1455
|
+
const {
|
|
1456
|
+
data: menu,
|
|
1457
|
+
isLoading
|
|
1458
|
+
} = Digit.Hooks.useCommonMDMS(stateTenant, "DIGIT-UI", "PaymentGateway");
|
|
1459
|
+
const {
|
|
1460
|
+
data: paymentdetails,
|
|
1461
|
+
isLoading: paymentLoading
|
|
1462
|
+
} = Digit.Hooks.useFetchPayment({
|
|
1463
|
+
tenantId: tenantId,
|
|
1464
|
+
consumerCode: wrkflow === "WNS" ? connectionNo : consumerCode,
|
|
1465
|
+
businessService
|
|
1466
|
+
}, {});
|
|
1344
1467
|
if (window.location.href.includes("ISWSCON") || wrkflow === "WNS") consumerCode = decodeURIComponent(consumerCode);
|
|
1345
1468
|
if (wrkflow === "WNS") consumerCode = stringReplaceAll(consumerCode, "+", "/");
|
|
1346
1469
|
React.useEffect(() => {
|
|
@@ -1354,8 +1477,10 @@ const SelectPaymentType$1 = props => {
|
|
|
1354
1477
|
React.useEffect(() => {
|
|
1355
1478
|
localStorage.setItem("BillPaymentEnabled", "true");
|
|
1356
1479
|
}, []);
|
|
1357
|
-
const
|
|
1358
|
-
|
|
1480
|
+
const {
|
|
1481
|
+
name,
|
|
1482
|
+
mobileNumber
|
|
1483
|
+
} = state;
|
|
1359
1484
|
const billDetails = paymentdetails !== null && paymentdetails !== void 0 && (_paymentdetails$Bill = paymentdetails.Bill) !== null && _paymentdetails$Bill !== void 0 && _paymentdetails$Bill.length ? paymentdetails === null || paymentdetails === void 0 ? void 0 : paymentdetails.Bill[0] : {};
|
|
1360
1485
|
const onSubmit = function (d) {
|
|
1361
1486
|
try {
|
|
@@ -1381,7 +1506,7 @@ const SelectPaymentType$1 = props => {
|
|
|
1381
1506
|
emailId: (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info4 = userInfo.info) === null || _userInfo$info4 === void 0 ? void 0 : _userInfo$info4.emailId) || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.emailId),
|
|
1382
1507
|
username: (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info5 = userInfo.info) === null || _userInfo$info5 === void 0 ? void 0 : _userInfo$info5.userName) || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.userName)
|
|
1383
1508
|
},
|
|
1384
|
-
callbackUrl: window.location.href.includes("mcollect") || wrkflow === "WNS" ? window.location.protocol
|
|
1509
|
+
callbackUrl: window.location.href.includes("mcollect") || wrkflow === "WNS" ? `${window.location.protocol}//${window.location.host}/digit-ui/citizen/payment/success/${businessService}/${encodeURIComponent(consumerCode)}/${tenantId}?workflow=${wrkflow === "WNS" ? wrkflow : "mcollect"}` : `${window.location.protocol}//${window.location.host}/digit-ui/citizen/payment/success/${businessService}/${encodeURIComponent(consumerCode)}/${tenantId}?propertyId=${encodeURIComponent(consumerCode)}`,
|
|
1385
1510
|
additionalDetails: {
|
|
1386
1511
|
isWhatsapp: false
|
|
1387
1512
|
}
|
|
@@ -1418,7 +1543,7 @@ const SelectPaymentType$1 = props => {
|
|
|
1418
1543
|
target: "_top"
|
|
1419
1544
|
});
|
|
1420
1545
|
const orderForNDSLPaymentSite = ["checksum", "messageType", "merchantId", "serviceId", "orderId", "customerId", "transactionAmount", "currencyCode", "requestDateTime", "successUrl", "failUrl", "additionalField1", "additionalField2", "additionalField3", "additionalField4", "additionalField5"];
|
|
1421
|
-
gatewayParam["requestDateTime"] = (_gatewayParam$request = gatewayParam["requestDateTime"]) === null || _gatewayParam$request === void 0 ? void 0 : _gatewayParam$request.split(new Date().getFullYear()).join(new Date().getFullYear()
|
|
1546
|
+
gatewayParam["requestDateTime"] = (_gatewayParam$request = gatewayParam["requestDateTime"]) === null || _gatewayParam$request === void 0 ? void 0 : _gatewayParam$request.split(new Date().getFullYear()).join(`${new Date().getFullYear()} `);
|
|
1422
1547
|
gatewayParam["successUrl"] = (redirectUrl === null || redirectUrl === void 0 ? void 0 : (_redirectUrl$split2 = redirectUrl.split("successUrl=")) === null || _redirectUrl$split2 === void 0 ? void 0 : (_redirectUrl$split2$ = _redirectUrl$split2[1]) === null || _redirectUrl$split2$ === void 0 ? void 0 : (_redirectUrl$split2$$ = _redirectUrl$split2$.split("eg_pg_txnid=")) === null || _redirectUrl$split2$$ === void 0 ? void 0 : _redirectUrl$split2$$[0]) + "eg_pg_txnid=" + (gatewayParam === null || gatewayParam === void 0 ? void 0 : gatewayParam.orderId);
|
|
1423
1548
|
gatewayParam["failUrl"] = (redirectUrl === null || redirectUrl === void 0 ? void 0 : (_redirectUrl$split3 = redirectUrl.split("failUrl=")) === null || _redirectUrl$split3 === void 0 ? void 0 : (_redirectUrl$split3$ = _redirectUrl$split3[1]) === null || _redirectUrl$split3$ === void 0 ? void 0 : (_redirectUrl$split3$$ = _redirectUrl$split3$.split("eg_pg_txnid=")) === null || _redirectUrl$split3$$ === void 0 ? void 0 : _redirectUrl$split3$$[0]) + "eg_pg_txnid=" + (gatewayParam === null || gatewayParam === void 0 ? void 0 : gatewayParam.orderId);
|
|
1424
1549
|
for (var key of orderForNDSLPaymentSite) {
|
|
@@ -1440,9 +1565,10 @@ const SelectPaymentType$1 = props => {
|
|
|
1440
1565
|
let messageToShow = "CS_PAYMENT_UNKNOWN_ERROR_ON_SERVER";
|
|
1441
1566
|
if ((_error$response = error.response) !== null && _error$response !== void 0 && (_error$response$data = _error$response.data) !== null && _error$response$data !== void 0 && (_error$response$data$ = _error$response$data.Errors) !== null && _error$response$data$ !== void 0 && _error$response$data$[0]) {
|
|
1442
1567
|
var _error$response2, _error$response2$data, _error$response2$data2;
|
|
1443
|
-
const
|
|
1444
|
-
code
|
|
1445
|
-
message
|
|
1568
|
+
const {
|
|
1569
|
+
code,
|
|
1570
|
+
message
|
|
1571
|
+
} = (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : (_error$response2$data2 = _error$response2$data.Errors) === null || _error$response2$data2 === void 0 ? void 0 : _error$response2$data2[0];
|
|
1446
1572
|
messageToShow = code;
|
|
1447
1573
|
}
|
|
1448
1574
|
setShowToast({
|
|
@@ -1458,7 +1584,7 @@ const SelectPaymentType$1 = props => {
|
|
|
1458
1584
|
if (authorization === "true" && !kc.authenticated) {
|
|
1459
1585
|
localStorage.clear();
|
|
1460
1586
|
sessionStorage.clear();
|
|
1461
|
-
window.location.href =
|
|
1587
|
+
window.location.href = `/digit-ui/citizen/login?from=${encodeURIComponent(pathname + search)}`;
|
|
1462
1588
|
}
|
|
1463
1589
|
if (isLoading || paymentLoading) {
|
|
1464
1590
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
@@ -1524,86 +1650,94 @@ const convertEpochToDate = dateEpoch => {
|
|
|
1524
1650
|
let year = dateFromApi.getFullYear();
|
|
1525
1651
|
month = (month > 9 ? "" : "0") + month;
|
|
1526
1652
|
day = (day > 9 ? "" : "0") + day;
|
|
1527
|
-
return day
|
|
1653
|
+
return `${day}/${month}/${year}`;
|
|
1528
1654
|
} else {
|
|
1529
1655
|
return "NA";
|
|
1530
1656
|
}
|
|
1531
1657
|
};
|
|
1532
1658
|
const WrapPaymentComponent = props => {
|
|
1533
1659
|
var _data$payments, _data$payments$Paymen, _data$payments$Paymen2, _data$payments2, _paymentData$paymentD0, _paymentData$paymentD1, _reciept_data$payment3, _reciept_data$payment4, _reciept_data$payment5, _reciept_data$payment6, _reciept_data$payment7, _reciept_data$payment8, _reciept_data$payment9, _reciept_data$payment0, _reciept_data$payment1, _reciept_data$payment10, _reciept_data$payment11, _reciept_data$payment12, _bpaData$5, _bpaData$6, _bpaData$7, _bpaData$8, _bpaData$9, _bpaData$0, _bpaData$1, _bpaData$10, _bpaData$11, _business_service$spl;
|
|
1534
|
-
const
|
|
1535
|
-
t
|
|
1660
|
+
const {
|
|
1661
|
+
t
|
|
1662
|
+
} = reactI18next.useTranslation();
|
|
1536
1663
|
const queryClient = reactQuery.useQueryClient();
|
|
1537
|
-
const
|
|
1538
|
-
egId
|
|
1539
|
-
workflw
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
const
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1664
|
+
const {
|
|
1665
|
+
eg_pg_txnid: egId,
|
|
1666
|
+
workflow: workflw,
|
|
1667
|
+
propertyId
|
|
1668
|
+
} = Digit.Hooks.useQueryParams();
|
|
1669
|
+
const [printing, setPrinting] = React.useState(false);
|
|
1670
|
+
const [allowFetchBill, setallowFetchBill] = React.useState(false);
|
|
1671
|
+
const {
|
|
1672
|
+
businessService: business_service,
|
|
1673
|
+
consumerCode,
|
|
1674
|
+
tenantId
|
|
1675
|
+
} = reactRouterDom.useParams();
|
|
1676
|
+
const {
|
|
1677
|
+
data: bpaData = {},
|
|
1678
|
+
isLoading: isBpaSearchLoading,
|
|
1679
|
+
isSuccess: isBpaSuccess,
|
|
1680
|
+
error: bpaerror
|
|
1681
|
+
} = Digit.Hooks.obps.useOBPSSearch("", {}, tenantId, {
|
|
1682
|
+
applicationNo: consumerCode
|
|
1683
|
+
}, {}, {
|
|
1684
|
+
enabled: window.location.href.includes("bpa") || window.location.href.includes("BPA")
|
|
1685
|
+
});
|
|
1686
|
+
const {
|
|
1687
|
+
isLoading,
|
|
1688
|
+
data,
|
|
1689
|
+
isError
|
|
1690
|
+
} = Digit.Hooks.usePaymentUpdate({
|
|
1691
|
+
egId,
|
|
1692
|
+
tenantId
|
|
1693
|
+
}, business_service, {
|
|
1694
|
+
retry: false,
|
|
1695
|
+
staleTime: Infinity,
|
|
1696
|
+
refetchOnWindowFocus: false
|
|
1697
|
+
});
|
|
1569
1698
|
console.log("datatatataty", data);
|
|
1570
|
-
const
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1699
|
+
const {
|
|
1700
|
+
label
|
|
1701
|
+
} = Digit.Hooks.useApplicationsForBusinessServiceSearch({
|
|
1702
|
+
businessService: business_service
|
|
1703
|
+
}, {
|
|
1704
|
+
enabled: false
|
|
1705
|
+
});
|
|
1576
1706
|
const mutation = Digit.Hooks.chb.useChbCreateAPI(tenantId, false);
|
|
1577
1707
|
const AdvertisementCreateApi = Digit.Hooks.ads.useADSCreateAPI(tenantId, false);
|
|
1578
1708
|
const newTenantId = business_service.includes("WS.ONE_TIME_FEE" ) ? Digit.ULBService.getStateId() : tenantId;
|
|
1579
|
-
const
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1709
|
+
const {
|
|
1710
|
+
data: reciept_data,
|
|
1711
|
+
isLoading: recieptDataLoading
|
|
1712
|
+
} = Digit.Hooks.useRecieptSearch({
|
|
1713
|
+
tenantId,
|
|
1714
|
+
businessService: business_service,
|
|
1715
|
+
receiptNumbers: data === null || data === void 0 ? void 0 : (_data$payments = data.payments) === null || _data$payments === void 0 ? void 0 : (_data$payments$Paymen = _data$payments.Payments) === null || _data$payments$Paymen === void 0 ? void 0 : (_data$payments$Paymen2 = _data$payments$Paymen[0]) === null || _data$payments$Paymen2 === void 0 ? void 0 : _data$payments$Paymen2.paymentDetails[0].receiptNumber
|
|
1716
|
+
}, {
|
|
1717
|
+
retry: false,
|
|
1718
|
+
staleTime: Infinity,
|
|
1719
|
+
refetchOnWindowFocus: false,
|
|
1720
|
+
select: dat => {
|
|
1721
|
+
return dat.Payments[0];
|
|
1722
|
+
},
|
|
1723
|
+
enabled: allowFetchBill
|
|
1724
|
+
});
|
|
1725
|
+
const {
|
|
1726
|
+
data: generatePdfKey
|
|
1727
|
+
} = Digit.Hooks.useCommonMDMS(newTenantId, "common-masters", "ReceiptKey", {
|
|
1728
|
+
select: data => {
|
|
1729
|
+
var _data$commonMasters, _data$commonMasters$u, _data$commonMasters$u2;
|
|
1730
|
+
return ((_data$commonMasters = data["common-masters"]) === null || _data$commonMasters === void 0 ? void 0 : (_data$commonMasters$u = _data$commonMasters.uiCommonPay) === null || _data$commonMasters$u === void 0 ? void 0 : (_data$commonMasters$u2 = _data$commonMasters$u.filter(_ref => {
|
|
1731
|
+
let {
|
|
1732
|
+
code
|
|
1733
|
+
} = _ref;
|
|
1734
|
+
return business_service === null || business_service === void 0 ? void 0 : business_service.includes(code);
|
|
1735
|
+
})[0]) === null || _data$commonMasters$u2 === void 0 ? void 0 : _data$commonMasters$u2.receiptKey) || "consolidatedreceipt";
|
|
1736
|
+
},
|
|
1737
|
+
retry: false,
|
|
1738
|
+
staleTime: Infinity,
|
|
1739
|
+
refetchOnWindowFocus: false
|
|
1740
|
+
});
|
|
1607
1741
|
const payments = data === null || data === void 0 ? void 0 : data.payments;
|
|
1608
1742
|
React.useEffect(() => {
|
|
1609
1743
|
return () => {
|
|
@@ -1628,11 +1762,11 @@ const WrapPaymentComponent = props => {
|
|
|
1628
1762
|
applicationNumber: egId,
|
|
1629
1763
|
successful: false
|
|
1630
1764
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, null, t("CS_PAYMENT_FAILURE_MESSAGE")), !(business_service !== null && business_service !== void 0 && business_service.includes("PT")) ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
1631
|
-
to:
|
|
1765
|
+
to: `/digit-ui/citizen`
|
|
1632
1766
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
1633
1767
|
label: t("CORE_COMMON_GO_TO_HOME")
|
|
1634
1768
|
})) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
1635
|
-
to: applicationNo &&
|
|
1769
|
+
to: applicationNo && `/digit-ui/citizen/payment/my-bills/${business_service}/${applicationNo}` || "/digit-ui/citizen"
|
|
1636
1770
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
1637
1771
|
label: t("CS_PAYMENT_TRY_AGAIN")
|
|
1638
1772
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -1645,7 +1779,7 @@ const WrapPaymentComponent = props => {
|
|
|
1645
1779
|
marginTop: "8px"
|
|
1646
1780
|
}
|
|
1647
1781
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
1648
|
-
to:
|
|
1782
|
+
to: `/digit-ui/citizen`
|
|
1649
1783
|
}, t("CORE_COMMON_GO_TO_HOME")))));
|
|
1650
1784
|
}
|
|
1651
1785
|
const paymentData = data === null || data === void 0 ? void 0 : (_data$payments2 = data.payments) === null || _data$payments2 === void 0 ? void 0 : _data$payments2.Payments[0];
|
|
@@ -1743,9 +1877,10 @@ const WrapPaymentComponent = props => {
|
|
|
1743
1877
|
let details;
|
|
1744
1878
|
let businessServ = payments.Payments[0].paymentDetails[0].businessService;
|
|
1745
1879
|
if (payments.Payments[0].paymentDetails[0].businessService == "BPAREG") {
|
|
1746
|
-
details =
|
|
1880
|
+
details = {
|
|
1881
|
+
...payments.Payments[0].additionalDetails,
|
|
1747
1882
|
"stakeholderType": "Application"
|
|
1748
|
-
}
|
|
1883
|
+
};
|
|
1749
1884
|
}
|
|
1750
1885
|
payments.Payments[0].additionalDetails = details;
|
|
1751
1886
|
paymentArray[0] = payments.Payments[0];
|
|
@@ -1753,13 +1888,17 @@ const WrapPaymentComponent = props => {
|
|
|
1753
1888
|
const _temp4 = function () {
|
|
1754
1889
|
if (business_service !== null && business_service !== void 0 && business_service.includes("WS") || business_service !== null && business_service !== void 0 && business_service.includes("SW")) {
|
|
1755
1890
|
return Promise.resolve(Digit.PaymentService.generatePdf(state, {
|
|
1756
|
-
Payments: [
|
|
1891
|
+
Payments: [{
|
|
1892
|
+
...paymentData
|
|
1893
|
+
}]
|
|
1757
1894
|
}, generatePdfKeyForWs)).then(function (_Digit$PaymentService) {
|
|
1758
1895
|
response = _Digit$PaymentService;
|
|
1759
1896
|
const _temp2 = function (_response3, _response3$filestoreI, _response4, _response4$fileStoreI) {
|
|
1760
1897
|
if (!((_response3 = response) !== null && _response3 !== void 0 && (_response3$filestoreI = _response3.filestoreIds) !== null && _response3$filestoreI !== void 0 && _response3$filestoreI[0]) && !((_response4 = response) !== null && _response4 !== void 0 && (_response4$fileStoreI = _response4.fileStoreIds) !== null && _response4$fileStoreI !== void 0 && _response4$fileStoreI[0])) {
|
|
1761
1898
|
return Promise.resolve(Digit.PaymentService.generatePdf(state, {
|
|
1762
|
-
Payments: [
|
|
1899
|
+
Payments: [{
|
|
1900
|
+
...paymentData
|
|
1901
|
+
}]
|
|
1763
1902
|
}, generatePdfKey)).then(function (_Digit$PaymentService2) {
|
|
1764
1903
|
response = _Digit$PaymentService2;
|
|
1765
1904
|
});
|
|
@@ -1777,23 +1916,30 @@ const WrapPaymentComponent = props => {
|
|
|
1777
1916
|
return Promise.resolve(Digit.OBPSService.BPASearch(payments.Payments[0].tenantId, queryObj)).then(function (bpaResponse) {
|
|
1778
1917
|
var _bpaResponse$BPA$, _bpaResponse$BPA$$add, _paymentData$paymentD, _bpaResponse$BPA$2, _bpaResponse$BPA$2$ad;
|
|
1779
1918
|
const formattedStakeholderType = bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA$ = bpaResponse.BPA[0]) === null || _bpaResponse$BPA$ === void 0 ? void 0 : (_bpaResponse$BPA$$add = _bpaResponse$BPA$.additionalDetails) === null || _bpaResponse$BPA$$add === void 0 ? void 0 : _bpaResponse$BPA$$add.typeOfArchitect;
|
|
1780
|
-
const updatedpayments =
|
|
1781
|
-
|
|
1782
|
-
|
|
1919
|
+
const updatedpayments = {
|
|
1920
|
+
...paymentData,
|
|
1921
|
+
paymentDetails: [{
|
|
1922
|
+
...((_paymentData$paymentD = paymentData.paymentDetails) === null || _paymentData$paymentD === void 0 ? void 0 : _paymentData$paymentD[0]),
|
|
1923
|
+
additionalDetails: {
|
|
1924
|
+
...paymentData.paymentDetails[0].additionalDetails,
|
|
1783
1925
|
"propertyID": bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA$2 = bpaResponse.BPA[0]) === null || _bpaResponse$BPA$2 === void 0 ? void 0 : (_bpaResponse$BPA$2$ad = _bpaResponse$BPA$2.additionalDetails) === null || _bpaResponse$BPA$2$ad === void 0 ? void 0 : _bpaResponse$BPA$2$ad.propertyID,
|
|
1784
1926
|
"stakeholderType": formattedStakeholderType.charAt(0).toUpperCase() + formattedStakeholderType.slice(1).toLowerCase()
|
|
1785
|
-
}
|
|
1786
|
-
}
|
|
1787
|
-
}
|
|
1927
|
+
}
|
|
1928
|
+
}]
|
|
1929
|
+
};
|
|
1788
1930
|
return Promise.resolve(Digit.PaymentService.generatePdf(state, {
|
|
1789
|
-
Payments: [
|
|
1931
|
+
Payments: [{
|
|
1932
|
+
...updatedpayments
|
|
1933
|
+
}]
|
|
1790
1934
|
}, generatePdfKey)).then(function (_Digit$PaymentService3) {
|
|
1791
1935
|
response = _Digit$PaymentService3;
|
|
1792
1936
|
});
|
|
1793
1937
|
});
|
|
1794
1938
|
} else {
|
|
1795
1939
|
return Promise.resolve(Digit.PaymentService.generatePdf(state, {
|
|
1796
|
-
Payments: [
|
|
1940
|
+
Payments: [{
|
|
1941
|
+
...paymentData
|
|
1942
|
+
}]
|
|
1797
1943
|
}, generatePdfKey)).then(function (_Digit$PaymentService4) {
|
|
1798
1944
|
response = _Digit$PaymentService4;
|
|
1799
1945
|
});
|
|
@@ -1877,9 +2023,12 @@ const WrapPaymentComponent = props => {
|
|
|
1877
2023
|
edcrData = edcrResponse === null || edcrResponse === void 0 ? void 0 : (_edcrResponse$edcrDet = edcrResponse.edcrDetail) === null || _edcrResponse$edcrDet === void 0 ? void 0 : _edcrResponse$edcrDet[0];
|
|
1878
2024
|
let currentDate = new Date();
|
|
1879
2025
|
bpaDataDetails.additionalDetails.runDate = convertDateToEpoch(currentDate.getFullYear() + "-" + (currentDate.getMonth() + 1) + "-" + currentDate.getDate());
|
|
1880
|
-
let reqData =
|
|
1881
|
-
|
|
1882
|
-
|
|
2026
|
+
let reqData = {
|
|
2027
|
+
...bpaDataDetails,
|
|
2028
|
+
edcrDetail: [{
|
|
2029
|
+
...edcrData
|
|
2030
|
+
}]
|
|
2031
|
+
};
|
|
1883
2032
|
console.log("reqData", reqData);
|
|
1884
2033
|
return Promise.resolve(Digit.PaymentService.generatePdf(bpaDataDetails === null || bpaDataDetails === void 0 ? void 0 : bpaDataDetails.tenantId, {
|
|
1885
2034
|
Bpa: [reqData]
|
|
@@ -1891,7 +2040,9 @@ const WrapPaymentComponent = props => {
|
|
|
1891
2040
|
window.open(fileStore[response === null || response === void 0 ? void 0 : response.filestoreIds[0]], "_blank");
|
|
1892
2041
|
reqData["applicationType"] = bpaDataDetails === null || bpaDataDetails === void 0 ? void 0 : (_bpaDataDetails$addit = bpaDataDetails.additionalDetails) === null || _bpaDataDetails$addit === void 0 ? void 0 : _bpaDataDetails$addit.applicationType;
|
|
1893
2042
|
return Promise.resolve(Digit.OBPSService.edcr_report_download({
|
|
1894
|
-
BPA:
|
|
2043
|
+
BPA: {
|
|
2044
|
+
...reqData
|
|
2045
|
+
}
|
|
1895
2046
|
})).then(function (edcrresponse) {
|
|
1896
2047
|
const responseStatus = parseInt(edcrresponse.status, 10);
|
|
1897
2048
|
if (responseStatus === 201 || responseStatus === 200) {
|
|
@@ -1899,7 +2050,7 @@ const WrapPaymentComponent = props => {
|
|
|
1899
2050
|
type: "application/pdf"
|
|
1900
2051
|
})) : downloadPdf(new Blob([edcrresponse.data], {
|
|
1901
2052
|
type: "application/pdf"
|
|
1902
|
-
}),
|
|
2053
|
+
}), `edcrReport.pdf`);
|
|
1903
2054
|
}
|
|
1904
2055
|
});
|
|
1905
2056
|
});
|
|
@@ -1911,11 +2062,12 @@ const WrapPaymentComponent = props => {
|
|
|
1911
2062
|
}
|
|
1912
2063
|
};
|
|
1913
2064
|
const getBillingPeriod = billDetails => {
|
|
1914
|
-
const
|
|
1915
|
-
taxPeriodFrom
|
|
1916
|
-
taxPeriodTo
|
|
1917
|
-
fromPeriod
|
|
1918
|
-
toPeriod
|
|
2065
|
+
const {
|
|
2066
|
+
taxPeriodFrom,
|
|
2067
|
+
taxPeriodTo,
|
|
2068
|
+
fromPeriod,
|
|
2069
|
+
toPeriod
|
|
2070
|
+
} = billDetails || {};
|
|
1919
2071
|
if (taxPeriodFrom && taxPeriodTo) {
|
|
1920
2072
|
let from = new Date(taxPeriodFrom).getFullYear().toString();
|
|
1921
2073
|
let to = new Date(taxPeriodTo).getFullYear().toString();
|
|
@@ -1937,19 +2089,19 @@ const WrapPaymentComponent = props => {
|
|
|
1937
2089
|
};
|
|
1938
2090
|
let bannerText;
|
|
1939
2091
|
if (workflw) {
|
|
1940
|
-
bannerText =
|
|
2092
|
+
bannerText = `CITIZEN_SUCCESS_UC_PAYMENT_MESSAGE`;
|
|
1941
2093
|
} else {
|
|
1942
2094
|
var _paymentData$paymentD2, _paymentData$paymentD3, _paymentData$paymentD4, _paymentData$paymentD5, _paymentData$paymentD6;
|
|
1943
2095
|
if (paymentData !== null && paymentData !== void 0 && (_paymentData$paymentD2 = paymentData.paymentDetails) !== null && _paymentData$paymentD2 !== void 0 && (_paymentData$paymentD3 = _paymentData$paymentD2[0]) !== null && _paymentData$paymentD3 !== void 0 && _paymentData$paymentD3.businessService && paymentData !== null && paymentData !== void 0 && (_paymentData$paymentD4 = paymentData.paymentDetails) !== null && _paymentData$paymentD4 !== void 0 && (_paymentData$paymentD5 = _paymentData$paymentD4[0]) !== null && _paymentData$paymentD5 !== void 0 && (_paymentData$paymentD6 = _paymentData$paymentD5.businessService) !== null && _paymentData$paymentD6 !== void 0 && _paymentData$paymentD6.includes("BPA")) {
|
|
1944
2096
|
var _paymentData$paymentD7;
|
|
1945
2097
|
let nameOfAchitect = sessionStorage.getItem("BPA_ARCHITECT_NAME");
|
|
1946
2098
|
let parsedArchitectName = nameOfAchitect ? JSON.parse(nameOfAchitect) : "ARCHITECT";
|
|
1947
|
-
bannerText =
|
|
2099
|
+
bannerText = `CITIZEN_SUCCESS_${paymentData === null || paymentData === void 0 ? void 0 : (_paymentData$paymentD7 = paymentData.paymentDetails[0]) === null || _paymentData$paymentD7 === void 0 ? void 0 : _paymentData$paymentD7.businessService.replace(/\./g, "_")}_${parsedArchitectName}_PAYMENT_MESSAGE`;
|
|
1948
2100
|
} else if (business_service !== null && business_service !== void 0 && business_service.includes("WS") || business_service !== null && business_service !== void 0 && business_service.includes("SW")) {
|
|
1949
|
-
bannerText = t(
|
|
2101
|
+
bannerText = t(`CITIZEN_SUCCESS_${paymentData === null || paymentData === void 0 ? void 0 : paymentData.paymentDetails[0].businessService.replace(/\./g, "_")}_WS_PAYMENT_MESSAGE`);
|
|
1950
2102
|
} else {
|
|
1951
2103
|
var _paymentData$paymentD8, _paymentData$paymentD9;
|
|
1952
|
-
bannerText = paymentData !== null && paymentData !== void 0 && (_paymentData$paymentD8 = paymentData.paymentDetails[0]) !== null && _paymentData$paymentD8 !== void 0 && _paymentData$paymentD8.businessService ?
|
|
2104
|
+
bannerText = paymentData !== null && paymentData !== void 0 && (_paymentData$paymentD8 = paymentData.paymentDetails[0]) !== null && _paymentData$paymentD8 !== void 0 && _paymentData$paymentD8.businessService ? `CITIZEN_SUCCESS_${paymentData === null || paymentData === void 0 ? void 0 : (_paymentData$paymentD9 = paymentData.paymentDetails[0]) === null || _paymentData$paymentD9 === void 0 ? void 0 : _paymentData$paymentD9.businessService.replace(/\./g, "_")}_PAYMENT_MESSAGE` : t("CITIZEN_SUCCESS_UC_PAYMENT_MESSAGE");
|
|
1953
2105
|
}
|
|
1954
2106
|
}
|
|
1955
2107
|
const rowContainerStyle = {
|
|
@@ -1979,9 +2131,10 @@ const WrapPaymentComponent = props => {
|
|
|
1979
2131
|
return Promise.resolve(Digit.PaymentService.generatePdf(tenantId, {
|
|
1980
2132
|
hallsBookingApplication: [applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication[0]]
|
|
1981
2133
|
}, generatePdfKeyForTL)).then(function (response) {
|
|
1982
|
-
const updatedApplication =
|
|
2134
|
+
const updatedApplication = {
|
|
2135
|
+
...(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication[0]),
|
|
1983
2136
|
permissionLetterFilestoreId: response === null || response === void 0 ? void 0 : response.filestoreIds[0]
|
|
1984
|
-
}
|
|
2137
|
+
};
|
|
1985
2138
|
return Promise.resolve(mutation.mutateAsync({
|
|
1986
2139
|
hallsBookingApplication: updatedApplication
|
|
1987
2140
|
})).then(function () {
|
|
@@ -2019,9 +2172,10 @@ const WrapPaymentComponent = props => {
|
|
|
2019
2172
|
return Promise.resolve(Digit.PaymentService.generatePdf(tenantId, {
|
|
2020
2173
|
bookingApplication: [applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.bookingApplication[0]]
|
|
2021
2174
|
}, generatePdfKeyForTL)).then(function (response) {
|
|
2022
|
-
const updatedApplication =
|
|
2175
|
+
const updatedApplication = {
|
|
2176
|
+
...(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.bookingApplication[0]),
|
|
2023
2177
|
permissionLetterFilestoreId: response === null || response === void 0 ? void 0 : response.filestoreIds[0]
|
|
2024
|
-
}
|
|
2178
|
+
};
|
|
2025
2179
|
return Promise.resolve(AdvertisementCreateApi.mutateAsync({
|
|
2026
2180
|
bookingApplication: updatedApplication
|
|
2027
2181
|
})).then(function () {
|
|
@@ -2151,13 +2305,16 @@ const WrapPaymentComponent = props => {
|
|
|
2151
2305
|
filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
|
|
2152
2306
|
};
|
|
2153
2307
|
return Promise.resolve(Digit.PaymentService.generatePdf(tenantId, {
|
|
2154
|
-
Payments: [
|
|
2308
|
+
Payments: [{
|
|
2309
|
+
...paymentData
|
|
2310
|
+
}]
|
|
2155
2311
|
}, "advservice-receipt")).then(function (_Digit$PaymentService5) {
|
|
2156
2312
|
var _response5;
|
|
2157
2313
|
response = _Digit$PaymentService5;
|
|
2158
|
-
const updatedApplication =
|
|
2314
|
+
const updatedApplication = {
|
|
2315
|
+
...(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.bookingApplication[0]),
|
|
2159
2316
|
paymentReceiptFilestoreId: (_response5 = response) === null || _response5 === void 0 ? void 0 : _response5.filestoreIds[0]
|
|
2160
|
-
}
|
|
2317
|
+
};
|
|
2161
2318
|
return Promise.resolve(AdvertisementCreateApi.mutateAsync({
|
|
2162
2319
|
bookingApplication: updatedApplication
|
|
2163
2320
|
})).then(function () {
|
|
@@ -2196,13 +2353,16 @@ const WrapPaymentComponent = props => {
|
|
|
2196
2353
|
filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
|
|
2197
2354
|
};
|
|
2198
2355
|
return Promise.resolve(Digit.PaymentService.generatePdf(tenantId, {
|
|
2199
|
-
Payments: [
|
|
2356
|
+
Payments: [{
|
|
2357
|
+
...paymentData
|
|
2358
|
+
}]
|
|
2200
2359
|
}, "chbservice-receipt")).then(function (_Digit$PaymentService6) {
|
|
2201
2360
|
var _response7;
|
|
2202
2361
|
response = _Digit$PaymentService6;
|
|
2203
|
-
const updatedApplication =
|
|
2362
|
+
const updatedApplication = {
|
|
2363
|
+
...(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication[0]),
|
|
2204
2364
|
paymentReceiptFilestoreId: (_response7 = response) === null || _response7 === void 0 ? void 0 : _response7.filestoreIds[0]
|
|
2205
|
-
}
|
|
2365
|
+
};
|
|
2206
2366
|
return Promise.resolve(mutation.mutateAsync({
|
|
2207
2367
|
hallsBookingApplication: updatedApplication
|
|
2208
2368
|
})).then(function () {
|
|
@@ -2505,7 +2665,7 @@ const WrapPaymentComponent = props => {
|
|
|
2505
2665
|
rowContainerStyle: rowContainerStyle,
|
|
2506
2666
|
last: true,
|
|
2507
2667
|
label: t("CS_PAYMENT_AMOUNT_PENDING"),
|
|
2508
|
-
text: (paymentData === null || paymentData === void 0 ? void 0 : paymentData.totalDue) - (paymentData === null || paymentData === void 0 ? void 0 : paymentData.totalAmountPaid) || reciept_data !== null && reciept_data !== void 0 && (_reciept_data$payment3 = reciept_data.paymentDetails) !== null && _reciept_data$payment3 !== void 0 && (_reciept_data$payment4 = _reciept_data$payment3[0]) !== null && _reciept_data$payment4 !== void 0 && _reciept_data$payment4.totalDue && reciept_data !== null && reciept_data !== void 0 && (_reciept_data$payment5 = reciept_data.paymentDetails) !== null && _reciept_data$payment5 !== void 0 && (_reciept_data$payment6 = _reciept_data$payment5[0]) !== null && _reciept_data$payment6 !== void 0 && _reciept_data$payment6.totalAmountPaid ?
|
|
2668
|
+
text: (paymentData === null || paymentData === void 0 ? void 0 : paymentData.totalDue) - (paymentData === null || paymentData === void 0 ? void 0 : paymentData.totalAmountPaid) || reciept_data !== null && reciept_data !== void 0 && (_reciept_data$payment3 = reciept_data.paymentDetails) !== null && _reciept_data$payment3 !== void 0 && (_reciept_data$payment4 = _reciept_data$payment3[0]) !== null && _reciept_data$payment4 !== void 0 && _reciept_data$payment4.totalDue && reciept_data !== null && reciept_data !== void 0 && (_reciept_data$payment5 = reciept_data.paymentDetails) !== null && _reciept_data$payment5 !== void 0 && (_reciept_data$payment6 = _reciept_data$payment5[0]) !== null && _reciept_data$payment6 !== void 0 && _reciept_data$payment6.totalAmountPaid ? `₹ ${(reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$payment7 = reciept_data.paymentDetails) === null || _reciept_data$payment7 === void 0 ? void 0 : (_reciept_data$payment8 = _reciept_data$payment7[0]) === null || _reciept_data$payment8 === void 0 ? void 0 : _reciept_data$payment8.totalDue) - (reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$payment9 = reciept_data.paymentDetails) === null || _reciept_data$payment9 === void 0 ? void 0 : (_reciept_data$payment0 = _reciept_data$payment9[0]) === null || _reciept_data$payment0 === void 0 ? void 0 : _reciept_data$payment0.totalAmountPaid)}` : `₹ ${0}`
|
|
2509
2669
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
2510
2670
|
rowContainerStyle: rowContainerStyle,
|
|
2511
2671
|
last: true,
|
|
@@ -2515,7 +2675,7 @@ const WrapPaymentComponent = props => {
|
|
|
2515
2675
|
rowContainerStyle: rowContainerStyle,
|
|
2516
2676
|
last: true,
|
|
2517
2677
|
label: t(ommitRupeeSymbol ? "CS_PAYMENT_AMOUNT_PAID_WITHOUT_SYMBOL" : "CS_PAYMENT_AMOUNT_PAID"),
|
|
2518
|
-
text: (paymentData === null || paymentData === void 0 ? void 0 : paymentData.totalAmountPaid) || (reciept_data !== null && reciept_data !== void 0 && (_reciept_data$payment1 = reciept_data.paymentDetails) !== null && _reciept_data$payment1 !== void 0 && (_reciept_data$payment10 = _reciept_data$payment1[0]) !== null && _reciept_data$payment10 !== void 0 && _reciept_data$payment10.totalAmountPaid ? "₹ " + (reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$payment11 = reciept_data.paymentDetails) === null || _reciept_data$payment11 === void 0 ? void 0 : (_reciept_data$payment12 = _reciept_data$payment11[0]) === null || _reciept_data$payment12 === void 0 ? void 0 : _reciept_data$payment12.totalAmountPaid) :
|
|
2678
|
+
text: (paymentData === null || paymentData === void 0 ? void 0 : paymentData.totalAmountPaid) || (reciept_data !== null && reciept_data !== void 0 && (_reciept_data$payment1 = reciept_data.paymentDetails) !== null && _reciept_data$payment1 !== void 0 && (_reciept_data$payment10 = _reciept_data$payment1[0]) !== null && _reciept_data$payment10 !== void 0 && _reciept_data$payment10.totalAmountPaid ? "₹ " + (reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$payment11 = reciept_data.paymentDetails) === null || _reciept_data$payment11 === void 0 ? void 0 : (_reciept_data$payment12 = _reciept_data$payment11[0]) === null || _reciept_data$payment12 === void 0 ? void 0 : _reciept_data$payment12.totalAmountPaid) : `₹ 0`)
|
|
2519
2679
|
}), (business_service !== "PT" || workflw) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
2520
2680
|
rowContainerStyle: rowContainerStyle,
|
|
2521
2681
|
last: true,
|
|
@@ -2626,7 +2786,7 @@ const WrapPaymentComponent = props => {
|
|
|
2626
2786
|
marginTop: "10px"
|
|
2627
2787
|
}
|
|
2628
2788
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
2629
|
-
to:
|
|
2789
|
+
to: `/digit-ui/citizen/feedback?redirectedFrom=${"digit-ui/citizen/payment/success"}&propertyId=${consumerCode ? consumerCode : ""}&acknowldgementNumber=${egId ? egId : ""}&tenantId=${tenantId}&creationReason=${business_service === null || business_service === void 0 ? void 0 : (_business_service$spl = business_service.split(".")) === null || _business_service$spl === void 0 ? void 0 : _business_service$spl[1]}`
|
|
2630
2790
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
2631
2791
|
label: t("CS_REVIEW_AND_FEEDBACK")
|
|
2632
2792
|
}))), business_service !== null && business_service !== void 0 && business_service.includes("PT") ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -2826,25 +2986,25 @@ const WrapPaymentComponent = props => {
|
|
|
2826
2986
|
marginTop: "8px"
|
|
2827
2987
|
}
|
|
2828
2988
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
2829
|
-
to:
|
|
2989
|
+
to: `/digit-ui/citizen`
|
|
2830
2990
|
}, t("CORE_COMMON_GO_TO_HOME"))), business_service == "TL" && /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
2831
|
-
to:
|
|
2991
|
+
to: `/digit-ui/citizen`
|
|
2832
2992
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
2833
2993
|
label: t("CORE_COMMON_GO_TO_HOME")
|
|
2834
2994
|
})), business_service == "pet-services" && /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
2835
|
-
to:
|
|
2995
|
+
to: `/digit-ui/citizen`
|
|
2836
2996
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
2837
2997
|
label: t("CORE_COMMON_GO_TO_HOME")
|
|
2838
2998
|
})), business_service == "chb-services" && /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
2839
|
-
to:
|
|
2999
|
+
to: `/digit-ui/citizen`
|
|
2840
3000
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
2841
3001
|
label: t("CORE_COMMON_GO_TO_HOME")
|
|
2842
3002
|
})), business_service == "adv-services" && /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
2843
|
-
to:
|
|
3003
|
+
to: `/digit-ui/citizen`
|
|
2844
3004
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
2845
3005
|
label: t("CORE_COMMON_GO_TO_HOME")
|
|
2846
3006
|
})), business_service == "sv-services" && /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
2847
|
-
to:
|
|
3007
|
+
to: `/digit-ui/citizen`
|
|
2848
3008
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
2849
3009
|
label: t("CORE_COMMON_GO_TO_HOME"),
|
|
2850
3010
|
style: {
|
|
@@ -2853,10 +3013,12 @@ const WrapPaymentComponent = props => {
|
|
|
2853
3013
|
})));
|
|
2854
3014
|
};
|
|
2855
3015
|
const FailedPayment = props => {
|
|
2856
|
-
const
|
|
2857
|
-
t
|
|
2858
|
-
|
|
2859
|
-
|
|
3016
|
+
const {
|
|
3017
|
+
t
|
|
3018
|
+
} = reactI18next.useTranslation();
|
|
3019
|
+
const {
|
|
3020
|
+
consumerCode
|
|
3021
|
+
} = reactRouterDom.useParams();
|
|
2860
3022
|
const getMessage = () => "Failure !";
|
|
2861
3023
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Banner, {
|
|
2862
3024
|
message: getMessage(),
|
|
@@ -2866,20 +3028,25 @@ const FailedPayment = props => {
|
|
|
2866
3028
|
};
|
|
2867
3029
|
|
|
2868
3030
|
const CitizenPayment = _ref => {
|
|
2869
|
-
let
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
const
|
|
2875
|
-
|
|
3031
|
+
let {
|
|
3032
|
+
stateCode,
|
|
3033
|
+
cityCode,
|
|
3034
|
+
moduleCode
|
|
3035
|
+
} = _ref;
|
|
3036
|
+
const {
|
|
3037
|
+
path: currentPath
|
|
3038
|
+
} = reactRouterDom.useRouteMatch();
|
|
3039
|
+
const {
|
|
3040
|
+
state: routerState
|
|
3041
|
+
} = reactRouterDom.useLocation();
|
|
2876
3042
|
const commonProps = {
|
|
2877
3043
|
stateCode,
|
|
2878
3044
|
cityCode,
|
|
2879
3045
|
moduleCode
|
|
2880
3046
|
};
|
|
2881
|
-
const
|
|
2882
|
-
t
|
|
3047
|
+
const {
|
|
3048
|
+
t
|
|
3049
|
+
} = reactI18next.useTranslation();
|
|
2883
3050
|
let isMobile = window.Digit.Utils.browser.isMobile();
|
|
2884
3051
|
const pathname = window.location.pathname;
|
|
2885
3052
|
const crumbs = [{
|
|
@@ -2957,23 +3124,23 @@ const CitizenPayment = _ref => {
|
|
|
2957
3124
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2958
3125
|
className: "employee-form-content"
|
|
2959
3126
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
2960
|
-
path: currentPath
|
|
3127
|
+
path: `${currentPath}/my-bills/:businessService`
|
|
2961
3128
|
}, /*#__PURE__*/React__default.createElement(MyBills, {
|
|
2962
3129
|
stateCode: stateCode
|
|
2963
3130
|
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
2964
|
-
path: currentPath
|
|
3131
|
+
path: `${currentPath}/billDetails/:businessService/:consumerCode/:paymentAmt`
|
|
2965
3132
|
}, /*#__PURE__*/React__default.createElement(SelectPaymentType, _extends({}, commonProps, {
|
|
2966
3133
|
stateCode: stateCode,
|
|
2967
3134
|
basePath: currentPath
|
|
2968
3135
|
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
2969
|
-
path: currentPath
|
|
3136
|
+
path: `${currentPath}/collect/:businessService/:consumerCode`
|
|
2970
3137
|
}, /*#__PURE__*/React__default.createElement(SelectPaymentType$1, _extends({}, commonProps, {
|
|
2971
3138
|
stateCode: stateCode,
|
|
2972
3139
|
basePath: currentPath
|
|
2973
3140
|
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
2974
|
-
path: currentPath
|
|
3141
|
+
path: `${currentPath}/success/:businessService/:consumerCode/:tenantId`
|
|
2975
3142
|
}, /*#__PURE__*/React__default.createElement(SuccessfulPayment, commonProps)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
2976
|
-
path: currentPath
|
|
3143
|
+
path: `${currentPath}/failure`
|
|
2977
3144
|
}, /*#__PURE__*/React__default.createElement(FailedPayment, commonProps))))))));
|
|
2978
3145
|
};
|
|
2979
3146
|
|
|
@@ -2994,7 +3161,7 @@ const getKeyNotesConfig = (businessService, t) => {
|
|
|
2994
3161
|
fontSize: "16px",
|
|
2995
3162
|
fontWeight: "normal"
|
|
2996
3163
|
}
|
|
2997
|
-
},
|
|
3164
|
+
}, ` ( ${t("CS_PAYMENT_OVERDUE")} ${days} ${t(days === 1 ? "CS_COMMON_DAY" : "CS_COMMON_DAYS")})`) : null);
|
|
2998
3165
|
}],
|
|
2999
3166
|
fallback: "N/A",
|
|
3000
3167
|
noteStyle: {
|
|
@@ -3017,9 +3184,10 @@ const getKeyNotesConfig = (businessService, t) => {
|
|
|
3017
3184
|
}, {
|
|
3018
3185
|
keyValue: "CS_PAYMENT_BILLING_PERIOD",
|
|
3019
3186
|
keyPath: ["billDetails", d => {
|
|
3020
|
-
const
|
|
3021
|
-
fromPeriod
|
|
3022
|
-
toPeriod
|
|
3187
|
+
const {
|
|
3188
|
+
fromPeriod,
|
|
3189
|
+
toPeriod
|
|
3190
|
+
} = d[0];
|
|
3023
3191
|
if (fromPeriod && toPeriod) {
|
|
3024
3192
|
let from = new Date(fromPeriod).getFullYear().toString();
|
|
3025
3193
|
let to = new Date(toPeriod).getFullYear().toString();
|
|
@@ -3030,11 +3198,11 @@ const getKeyNotesConfig = (businessService, t) => {
|
|
|
3030
3198
|
}, {
|
|
3031
3199
|
keyValue: "PT_DUE_DATE",
|
|
3032
3200
|
keyPath: ["billDetails", d => {
|
|
3033
|
-
var _d
|
|
3034
|
-
if (!((_d$
|
|
3035
|
-
const date = new Date((_d$
|
|
3201
|
+
var _d$, _d$2;
|
|
3202
|
+
if (!((_d$ = d[0]) !== null && _d$ !== void 0 && _d$.toPeriod)) return "N/A";
|
|
3203
|
+
const date = new Date((_d$2 = d[0]) === null || _d$2 === void 0 ? void 0 : _d$2.toPeriod);
|
|
3036
3204
|
const month = Digit.Utils.date.monthNames[date.getMonth()];
|
|
3037
|
-
return date.getDate()
|
|
3205
|
+
return `${date.getDate()} ${month} ${date.getFullYear()}`;
|
|
3038
3206
|
}],
|
|
3039
3207
|
fallback: "N/A"
|
|
3040
3208
|
}],
|
|
@@ -3085,15 +3253,14 @@ const useCashPaymentDetails = (props, t) => {
|
|
|
3085
3253
|
};
|
|
3086
3254
|
const CashDetailsComponent = _ref => {
|
|
3087
3255
|
var _props$value, _props$value2;
|
|
3088
|
-
let
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
const
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
const
|
|
3095
|
-
|
|
3096
|
-
setManualReceiptNumber = _useState2[1];
|
|
3256
|
+
let {
|
|
3257
|
+
...props
|
|
3258
|
+
} = _ref;
|
|
3259
|
+
const {
|
|
3260
|
+
t
|
|
3261
|
+
} = reactI18next.useTranslation();
|
|
3262
|
+
const [manualReceiptDate, setManualReceiptDate] = React.useState(props === null || props === void 0 ? void 0 : (_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.manualReceiptDate);
|
|
3263
|
+
const [manualReceiptNumber, setManualReceiptNumber] = React.useState(props === null || props === void 0 ? void 0 : (_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2.manualReceiptNumber);
|
|
3097
3264
|
React.useEffect(() => {
|
|
3098
3265
|
if (props.onChange) {
|
|
3099
3266
|
let errorObj = {};
|
|
@@ -3144,18 +3311,15 @@ const useCardPaymentDetails = (props, t) => {
|
|
|
3144
3311
|
};
|
|
3145
3312
|
const CardDetailsComponent = _ref => {
|
|
3146
3313
|
var _props$value, _props$value2, _props$value3;
|
|
3147
|
-
let
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
const
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
const
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
const _useState3 = React.useState(props === null || props === void 0 ? void 0 : (_props$value3 = props.value) === null || _props$value3 === void 0 ? void 0 : _props$value3.reTransanctionNumber),
|
|
3157
|
-
reTransanctionNumber = _useState3[0],
|
|
3158
|
-
setReTransanctionNumber = _useState3[1];
|
|
3314
|
+
let {
|
|
3315
|
+
...props
|
|
3316
|
+
} = _ref;
|
|
3317
|
+
const {
|
|
3318
|
+
t
|
|
3319
|
+
} = reactI18next.useTranslation();
|
|
3320
|
+
const [last4Digits, setLast4Digits] = React.useState(props === null || props === void 0 ? void 0 : (_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.last4Digits);
|
|
3321
|
+
const [transactionNumber, setTransactionNumber] = React.useState(props === null || props === void 0 ? void 0 : (_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2.transactionNumber);
|
|
3322
|
+
const [reTransanctionNumber, setReTransanctionNumber] = React.useState(props === null || props === void 0 ? void 0 : (_props$value3 = props.value) === null || _props$value3 === void 0 ? void 0 : _props$value3.reTransanctionNumber);
|
|
3159
3323
|
React.useEffect(() => {
|
|
3160
3324
|
if (props.onChange) {
|
|
3161
3325
|
let errorObj = {};
|
|
@@ -3172,19 +3336,19 @@ const CardDetailsComponent = _ref => {
|
|
|
3172
3336
|
}, [last4Digits, transactionNumber, reTransanctionNumber]);
|
|
3173
3337
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
3174
3338
|
className: "formcomposer-section-grid"
|
|
3175
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("NOC_PAYMENT_CARD_LAST_DIGITS_LABEL")
|
|
3339
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("NOC_PAYMENT_CARD_LAST_DIGITS_LABEL")} *`), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
3176
3340
|
value: last4Digits,
|
|
3177
3341
|
name: "instrumentNumber",
|
|
3178
3342
|
maxLength: "4",
|
|
3179
3343
|
minLength: "4",
|
|
3180
3344
|
required: true,
|
|
3181
3345
|
onChange: e => setLast4Digits(e.target.value)
|
|
3182
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("NOC_PAYMENT_TRANS_NO_LABEL")
|
|
3346
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("NOC_PAYMENT_TRANS_NO_LABEL")} *`), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
3183
3347
|
value: transactionNumber,
|
|
3184
3348
|
name: "instrumentNumber",
|
|
3185
3349
|
required: true,
|
|
3186
3350
|
onChange: e => setTransactionNumber(e.target.value)
|
|
3187
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("NOC_PAYMENT_RENTR_TRANS_LABEL")
|
|
3351
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("NOC_PAYMENT_RENTR_TRANS_LABEL")} *`), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
3188
3352
|
value: reTransanctionNumber,
|
|
3189
3353
|
name: "instrumentNumber",
|
|
3190
3354
|
required: true,
|
|
@@ -3223,26 +3387,15 @@ const useChequeDetails = (props, t) => {
|
|
|
3223
3387
|
};
|
|
3224
3388
|
const ChequeDetailsComponent = props => {
|
|
3225
3389
|
var _props$chequeDetails$;
|
|
3226
|
-
const
|
|
3227
|
-
t
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
const
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
const
|
|
3235
|
-
ifscCode = _useState3[0],
|
|
3236
|
-
setIfsc = _useState3[1];
|
|
3237
|
-
const _useState4 = React.useState(""),
|
|
3238
|
-
ifscCodeError = _useState4[0],
|
|
3239
|
-
setIfscCodeError = _useState4[1];
|
|
3240
|
-
const _useState5 = React.useState(props.chequeDetails.bankName),
|
|
3241
|
-
bankName = _useState5[0],
|
|
3242
|
-
setBankName = _useState5[1];
|
|
3243
|
-
const _useState6 = React.useState((_props$chequeDetails$ = props.chequeDetails.bankBranch) === null || _props$chequeDetails$ === void 0 ? void 0 : _props$chequeDetails$.replace(" ", " ")),
|
|
3244
|
-
bankBranch = _useState6[0],
|
|
3245
|
-
setBankBranch = _useState6[1];
|
|
3390
|
+
const {
|
|
3391
|
+
t
|
|
3392
|
+
} = reactI18next.useTranslation();
|
|
3393
|
+
const [instrumentDate, setChequeDate] = React.useState(props.chequeDetails.instrumentDate);
|
|
3394
|
+
const [instrumentNumber, setChequeNo] = React.useState(props.chequeDetails.instrumentNumber);
|
|
3395
|
+
const [ifscCode, setIfsc] = React.useState(props.chequeDetails.ifscCode);
|
|
3396
|
+
const [ifscCodeError, setIfscCodeError] = React.useState("");
|
|
3397
|
+
const [bankName, setBankName] = React.useState(props.chequeDetails.bankName);
|
|
3398
|
+
const [bankBranch, setBankBranch] = React.useState((_props$chequeDetails$ = props.chequeDetails.bankBranch) === null || _props$chequeDetails$ === void 0 ? void 0 : _props$chequeDetails$.replace(" ", " "));
|
|
3246
3399
|
React.useEffect(() => {
|
|
3247
3400
|
if (props.onChange) {
|
|
3248
3401
|
let errorObj = {};
|
|
@@ -3263,12 +3416,14 @@ const ChequeDetailsComponent = props => {
|
|
|
3263
3416
|
const setBankDetailsFromIFSC = function () {
|
|
3264
3417
|
try {
|
|
3265
3418
|
const _temp2 = _catch(function () {
|
|
3266
|
-
return Promise.resolve(window.fetch(
|
|
3419
|
+
return Promise.resolve(window.fetch(`https://ifsc.razorpay.com/${ifscCode}`)).then(function (res) {
|
|
3267
3420
|
const _temp = function () {
|
|
3268
3421
|
if (res.ok) {
|
|
3269
3422
|
return Promise.resolve(res.json()).then(function (_ref) {
|
|
3270
|
-
let
|
|
3271
|
-
|
|
3423
|
+
let {
|
|
3424
|
+
BANK,
|
|
3425
|
+
BRANCH
|
|
3426
|
+
} = _ref;
|
|
3272
3427
|
setBankName(BANK);
|
|
3273
3428
|
setBankBranch(BRANCH === null || BRANCH === void 0 ? void 0 : BRANCH.replace(" ", " "));
|
|
3274
3429
|
});
|
|
@@ -3290,18 +3445,18 @@ const ChequeDetailsComponent = props => {
|
|
|
3290
3445
|
};
|
|
3291
3446
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
3292
3447
|
className: "formcomposer-section-grid"
|
|
3293
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("PAYMENT_CHQ_NO_LABEL")
|
|
3448
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("PAYMENT_CHQ_NO_LABEL")} *`), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
3294
3449
|
value: instrumentNumber,
|
|
3295
3450
|
onChange: e => setChequeNo(e.target.value),
|
|
3296
3451
|
name: "instrumentNumber",
|
|
3297
3452
|
required: true
|
|
3298
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("PAYMENT_CHEQUE_DATE_LABEL")
|
|
3453
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("PAYMENT_CHEQUE_DATE_LABEL")} *`), /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, {
|
|
3299
3454
|
isRequired: true,
|
|
3300
3455
|
date: instrumentDate,
|
|
3301
3456
|
onChange: d => {
|
|
3302
3457
|
setChequeDate(d);
|
|
3303
3458
|
}
|
|
3304
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("PAYMENT_IFSC_CODE_LABEL")
|
|
3459
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("PAYMENT_IFSC_CODE_LABEL")} *`), /*#__PURE__*/React__default.createElement("div", {
|
|
3305
3460
|
className: "field"
|
|
3306
3461
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3307
3462
|
className: "cheque-date"
|
|
@@ -4320,9 +4475,10 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4320
4475
|
}, {
|
|
4321
4476
|
keyValue: "CS_PAYMENT_BILLING_PERIOD",
|
|
4322
4477
|
keyPath: ["billDetails", d => {
|
|
4323
|
-
const
|
|
4324
|
-
fromPeriod
|
|
4325
|
-
toPeriod
|
|
4478
|
+
const {
|
|
4479
|
+
fromPeriod,
|
|
4480
|
+
toPeriod
|
|
4481
|
+
} = d[0];
|
|
4326
4482
|
if (fromPeriod && toPeriod) {
|
|
4327
4483
|
let from = new Date(fromPeriod).getFullYear().toString();
|
|
4328
4484
|
let to = new Date(toPeriod).getFullYear().toString();
|
|
@@ -4333,7 +4489,9 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4333
4489
|
}, {
|
|
4334
4490
|
keyValue: "CS_BILL_NO",
|
|
4335
4491
|
keyPath: ["billDetails", d => {
|
|
4336
|
-
const
|
|
4492
|
+
const {
|
|
4493
|
+
currentBillNo
|
|
4494
|
+
} = d[0];
|
|
4337
4495
|
if (currentBillNo) {
|
|
4338
4496
|
return currentBillNo;
|
|
4339
4497
|
} else return "N/A";
|
|
@@ -4342,7 +4500,9 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4342
4500
|
}, {
|
|
4343
4501
|
keyValue: "CS_BILL_DUEDATE",
|
|
4344
4502
|
keyPath: ["billDetails", d => {
|
|
4345
|
-
const
|
|
4503
|
+
const {
|
|
4504
|
+
currentExpiryDate
|
|
4505
|
+
} = d[0];
|
|
4346
4506
|
if (currentExpiryDate) {
|
|
4347
4507
|
return new Date(currentExpiryDate).toLocaleDateString();
|
|
4348
4508
|
} else return "N/A";
|
|
@@ -4367,7 +4527,9 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4367
4527
|
}, {
|
|
4368
4528
|
keyValue: "CS_BILL_NO",
|
|
4369
4529
|
keyPath: ["billDetails", d => {
|
|
4370
|
-
const
|
|
4530
|
+
const {
|
|
4531
|
+
currentBillNo
|
|
4532
|
+
} = d[0];
|
|
4371
4533
|
if (currentBillNo) {
|
|
4372
4534
|
return currentBillNo;
|
|
4373
4535
|
} else return "N/A";
|
|
@@ -4376,7 +4538,9 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4376
4538
|
}, {
|
|
4377
4539
|
keyValue: "CS_BILL_DUEDATE",
|
|
4378
4540
|
keyPath: ["billDetails", d => {
|
|
4379
|
-
const
|
|
4541
|
+
const {
|
|
4542
|
+
currentExpiryDate
|
|
4543
|
+
} = d[0];
|
|
4380
4544
|
if (currentExpiryDate) {
|
|
4381
4545
|
return new Date(currentExpiryDate).toLocaleDateString();
|
|
4382
4546
|
} else return "N/A";
|
|
@@ -4433,9 +4597,10 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4433
4597
|
}, {
|
|
4434
4598
|
keyValue: "CS_PAYMENT_BILLING_PERIOD",
|
|
4435
4599
|
keyPath: ["billDetails", d => {
|
|
4436
|
-
const
|
|
4437
|
-
fromPeriod
|
|
4438
|
-
toPeriod
|
|
4600
|
+
const {
|
|
4601
|
+
fromPeriod,
|
|
4602
|
+
toPeriod
|
|
4603
|
+
} = d[0];
|
|
4439
4604
|
if (fromPeriod && toPeriod) {
|
|
4440
4605
|
let from = new Date(fromPeriod).toLocaleDateString();
|
|
4441
4606
|
let to = new Date(toPeriod).toLocaleDateString();
|
|
@@ -4450,7 +4615,9 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4450
4615
|
}, {
|
|
4451
4616
|
keyValue: "CS_BILL_DUEDATE",
|
|
4452
4617
|
keyPath: ["billDetails", d => {
|
|
4453
|
-
const
|
|
4618
|
+
const {
|
|
4619
|
+
currentExpiryDate
|
|
4620
|
+
} = d[0];
|
|
4454
4621
|
if (currentExpiryDate) {
|
|
4455
4622
|
return new Date(currentExpiryDate).toLocaleDateString();
|
|
4456
4623
|
} else return "N/A";
|
|
@@ -4467,9 +4634,10 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4467
4634
|
}, {
|
|
4468
4635
|
keyValue: "CS_PAYMENT_BILLING_PERIOD",
|
|
4469
4636
|
keyPath: ["billDetails", d => {
|
|
4470
|
-
const
|
|
4471
|
-
fromPeriod
|
|
4472
|
-
toPeriod
|
|
4637
|
+
const {
|
|
4638
|
+
fromPeriod,
|
|
4639
|
+
toPeriod
|
|
4640
|
+
} = d[0];
|
|
4473
4641
|
if (fromPeriod && toPeriod) {
|
|
4474
4642
|
let from = new Date(fromPeriod).toLocaleDateString();
|
|
4475
4643
|
let to = new Date(toPeriod).toLocaleDateString();
|
|
@@ -4484,7 +4652,9 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4484
4652
|
}, {
|
|
4485
4653
|
keyValue: "CS_BILL_DUEDATE",
|
|
4486
4654
|
keyPath: ["billDetails", d => {
|
|
4487
|
-
const
|
|
4655
|
+
const {
|
|
4656
|
+
expiryDate
|
|
4657
|
+
} = d[0];
|
|
4488
4658
|
if (expiryDate) {
|
|
4489
4659
|
return new Date(expiryDate).toLocaleDateString();
|
|
4490
4660
|
} else return "N/A";
|
|
@@ -4707,40 +4877,49 @@ const BillDetailsFormConfig = (props, t) => ({
|
|
|
4707
4877
|
});
|
|
4708
4878
|
const BillDetails$1 = _ref => {
|
|
4709
4879
|
var _businessService$toUp, _bill$billDetails, _bill$billDetails2, _bill$billDetails2$so, _billDetails$billAcco, _arrears$toFixed, _arrears$toFixed2, _yearWiseBills$filter6, _yearWiseBills$filter7, _yearWiseBills$filter8, _yearWiseBills$filter9, _yearWiseBills$filter0;
|
|
4710
|
-
let
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4880
|
+
let {
|
|
4881
|
+
businessService,
|
|
4882
|
+
consumerCode,
|
|
4883
|
+
_amount,
|
|
4884
|
+
onChange
|
|
4885
|
+
} = _ref;
|
|
4886
|
+
const {
|
|
4887
|
+
t
|
|
4888
|
+
} = reactI18next.useTranslation();
|
|
4889
|
+
const {
|
|
4890
|
+
workflow: ModuleWorkflow,
|
|
4891
|
+
IsDisconnectionFlow
|
|
4892
|
+
} = Digit.Hooks.useQueryParams();
|
|
4718
4893
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
4719
|
-
const
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4894
|
+
const {
|
|
4895
|
+
data,
|
|
4896
|
+
isLoading
|
|
4897
|
+
} = Digit.Hooks.useFetchPayment({
|
|
4898
|
+
tenantId,
|
|
4899
|
+
businessService,
|
|
4900
|
+
consumerCode
|
|
4901
|
+
});
|
|
4726
4902
|
const checkFSM = window.location.href.includes("FSM");
|
|
4727
|
-
const
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
const
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4903
|
+
const {
|
|
4904
|
+
isLoading: isDataLoading,
|
|
4905
|
+
data: applicationData
|
|
4906
|
+
} = Digit.Hooks.fsm.useSearch(tenantId, {
|
|
4907
|
+
applicationNos: consumerCode
|
|
4908
|
+
}, {
|
|
4909
|
+
staleTime: Infinity,
|
|
4910
|
+
enabled: businessService !== null && businessService !== void 0 && (_businessService$toUp = businessService.toUpperCase()) !== null && _businessService$toUp !== void 0 && _businessService$toUp.includes("FSM") ? true : false
|
|
4911
|
+
});
|
|
4912
|
+
const [bill, setBill] = React.useState();
|
|
4913
|
+
const [showDetails, setShowDetails] = React.useState(true);
|
|
4914
|
+
const {
|
|
4915
|
+
isLoading: isFSMLoading,
|
|
4916
|
+
isError,
|
|
4917
|
+
error,
|
|
4918
|
+
data: application,
|
|
4919
|
+
error: errorApplication
|
|
4920
|
+
} = Digit.Hooks.fsm.useApplicationDetail(t, tenantId, consumerCode, {
|
|
4921
|
+
enabled: checkFSM ? true : false
|
|
4922
|
+
}, "EMPLOYEE");
|
|
4744
4923
|
const yearWiseBills = bill === null || bill === void 0 ? void 0 : (_bill$billDetails = bill.billDetails) === null || _bill$billDetails === void 0 ? void 0 : _bill$billDetails.sort((a, b) => b.fromPeriod - a.fromPeriod);
|
|
4745
4924
|
const billDetails = (yearWiseBills === null || yearWiseBills === void 0 ? void 0 : yearWiseBills[0]) || [];
|
|
4746
4925
|
const getTotal = () => bill !== null && bill !== void 0 && bill.totalAmount ? bill === null || bill === void 0 ? void 0 : bill.totalAmount : 0;
|
|
@@ -4758,38 +4937,31 @@ const BillDetails$1 = _ref => {
|
|
|
4758
4937
|
return application !== null && application !== void 0 && (_application$addition = application.additionalDetails) !== null && _application$addition !== void 0 && _application$addition.tripAmount ? application === null || application === void 0 ? void 0 : (_application$addition2 = application.additionalDetails) === null || _application$addition2 === void 0 ? void 0 : _application$addition2.tripAmount : 0;
|
|
4759
4938
|
};
|
|
4760
4939
|
const arrears = (bill === null || bill === void 0 ? void 0 : (_bill$billDetails2 = bill.billDetails) === null || _bill$billDetails2 === void 0 ? void 0 : (_bill$billDetails2$so = _bill$billDetails2.sort((a, b) => b.fromPeriod - a.fromPeriod)) === null || _bill$billDetails2$so === void 0 ? void 0 : _bill$billDetails2$so.reduce((total, current, index) => index === 0 ? total : total + current.amount, 0)) || 0;
|
|
4761
|
-
const
|
|
4762
|
-
mdmsLoading
|
|
4763
|
-
mdmsBillingData
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
setPaymentRules = _useState3[1];
|
|
4940
|
+
const {
|
|
4941
|
+
isLoading: mdmsLoading,
|
|
4942
|
+
data: mdmsBillingData
|
|
4943
|
+
} = Digit.Hooks.useGetPaymentRulesForBusinessServices(tenantId);
|
|
4944
|
+
const [paymentRules, setPaymentRules] = React.useState();
|
|
4767
4945
|
React.useEffect(() => {
|
|
4768
4946
|
var _mdmsBillingData$Mdms, _mdmsBillingData$Mdms2;
|
|
4769
4947
|
const payRestrictiondetails = mdmsBillingData === null || mdmsBillingData === void 0 ? void 0 : (_mdmsBillingData$Mdms = mdmsBillingData.MdmsRes) === null || _mdmsBillingData$Mdms === void 0 ? void 0 : (_mdmsBillingData$Mdms2 = _mdmsBillingData$Mdms.BillingService) === null || _mdmsBillingData$Mdms2 === void 0 ? void 0 : _mdmsBillingData$Mdms2.BusinessService;
|
|
4770
4948
|
if (payRestrictiondetails !== null && payRestrictiondetails !== void 0 && payRestrictiondetails.length) {
|
|
4771
4949
|
if (IsDisconnectionFlow) {
|
|
4772
|
-
setPaymentRules(
|
|
4950
|
+
setPaymentRules({
|
|
4951
|
+
...payRestrictiondetails.filter(e => e.code == businessService)[0],
|
|
4773
4952
|
partPaymentAllowed: false
|
|
4774
|
-
})
|
|
4953
|
+
});
|
|
4775
4954
|
} else setPaymentRules(payRestrictiondetails.filter(e => e.code == businessService)[0]);
|
|
4776
4955
|
} else setPaymentRules({});
|
|
4777
4956
|
}, [mdmsBillingData]);
|
|
4778
|
-
const
|
|
4779
|
-
minAmountPayable
|
|
4780
|
-
isAdvanceAllowed
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
const
|
|
4785
|
-
|
|
4786
|
-
setAmount = _useState5[1];
|
|
4787
|
-
const _useState6 = React.useState(true),
|
|
4788
|
-
paymentAllowed = _useState6[0],
|
|
4789
|
-
setPaymentAllowed = _useState6[1];
|
|
4790
|
-
const _useState7 = React.useState(""),
|
|
4791
|
-
formError = _useState7[0],
|
|
4792
|
-
setError = _useState7[1];
|
|
4957
|
+
const {
|
|
4958
|
+
minAmountPayable,
|
|
4959
|
+
isAdvanceAllowed
|
|
4960
|
+
} = paymentRules || {};
|
|
4961
|
+
const [paymentType, setPaymentType] = React.useState(t("CS_PAYMENT_FULL_AMOUNT"));
|
|
4962
|
+
const [amount, setAmount] = React.useState(getTotal());
|
|
4963
|
+
const [paymentAllowed, setPaymentAllowed] = React.useState(true);
|
|
4964
|
+
const [formError, setError] = React.useState("");
|
|
4793
4965
|
const changeAmount = value => {
|
|
4794
4966
|
setAmount(value);
|
|
4795
4967
|
};
|
|
@@ -4843,15 +5015,19 @@ const BillDetails$1 = _ref => {
|
|
|
4843
5015
|
};
|
|
4844
5016
|
if (isLoading || mdmsLoading) return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
4845
5017
|
const getFinancialYear = _bill => {
|
|
4846
|
-
const
|
|
4847
|
-
|
|
5018
|
+
const {
|
|
5019
|
+
fromPeriod,
|
|
5020
|
+
toPeriod
|
|
5021
|
+
} = _bill;
|
|
4848
5022
|
let from = new Date(fromPeriod).getFullYear().toString();
|
|
4849
5023
|
let to = new Date(toPeriod).getFullYear().toString();
|
|
4850
5024
|
return from + "-" + to;
|
|
4851
5025
|
};
|
|
4852
5026
|
const getBillingPeriod = _bill => {
|
|
4853
|
-
const
|
|
4854
|
-
|
|
5027
|
+
const {
|
|
5028
|
+
fromPeriod,
|
|
5029
|
+
toPeriod
|
|
5030
|
+
} = _bill;
|
|
4855
5031
|
let from = new Date(fromPeriod).toLocaleDateString();
|
|
4856
5032
|
let to = new Date(toPeriod).toLocaleDateString();
|
|
4857
5033
|
return from + "-" + to;
|
|
@@ -4877,11 +5053,17 @@ const BillDetails$1 = _ref => {
|
|
|
4877
5053
|
}, /*#__PURE__*/React__default.createElement("thead", null, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
|
|
4878
5054
|
style: thStyle
|
|
4879
5055
|
}, t("CS_BILL_NO")), /*#__PURE__*/React__default.createElement("th", {
|
|
4880
|
-
style:
|
|
5056
|
+
style: {
|
|
5057
|
+
...thStyle
|
|
5058
|
+
}
|
|
4881
5059
|
}, t("CS_PAYMENT_BILLING_PERIOD")), /*#__PURE__*/React__default.createElement("th", {
|
|
4882
|
-
style:
|
|
5060
|
+
style: {
|
|
5061
|
+
...thStyle
|
|
5062
|
+
}
|
|
4883
5063
|
}, t("CS_BILL_DUEDATE")), yearWiseBills === null || yearWiseBills === void 0 ? void 0 : (_yearWiseBills$filter = yearWiseBills.filter((e, ind) => ind > 0)) === null || _yearWiseBills$filter === void 0 ? void 0 : (_yearWiseBills$filter2 = _yearWiseBills$filter[0]) === null || _yearWiseBills$filter2 === void 0 ? void 0 : (_yearWiseBills$filter3 = _yearWiseBills$filter2.billAccountDetails) === null || _yearWiseBills$filter3 === void 0 ? void 0 : (_yearWiseBills$filter4 = _yearWiseBills$filter3.sort((a, b) => a.order - b.order)) === null || _yearWiseBills$filter4 === void 0 ? void 0 : _yearWiseBills$filter4.map((head, index) => /*#__PURE__*/React__default.createElement("th", {
|
|
4884
|
-
style:
|
|
5064
|
+
style: {
|
|
5065
|
+
...thStyle
|
|
5066
|
+
},
|
|
4885
5067
|
key: index
|
|
4886
5068
|
}, t(head.taxHeadCode))), /*#__PURE__*/React__default.createElement("th", {
|
|
4887
5069
|
style: thStyle
|
|
@@ -5039,11 +5221,17 @@ const BillDetails$1 = _ref => {
|
|
|
5039
5221
|
}, /*#__PURE__*/React__default.createElement("thead", null, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
|
|
5040
5222
|
style: thStyle
|
|
5041
5223
|
}, t("FINANCIAL_YEAR")), /*#__PURE__*/React__default.createElement("th", {
|
|
5042
|
-
style:
|
|
5224
|
+
style: {
|
|
5225
|
+
...thStyle
|
|
5226
|
+
}
|
|
5043
5227
|
}, t("CS_BILL_NO")), /*#__PURE__*/React__default.createElement("th", {
|
|
5044
|
-
style:
|
|
5228
|
+
style: {
|
|
5229
|
+
...thStyle
|
|
5230
|
+
}
|
|
5045
5231
|
}, t("CS_BILL_DUEDATE")), yearWiseBills === null || yearWiseBills === void 0 ? void 0 : (_yearWiseBills$filter6 = yearWiseBills.filter((e, ind) => ind > 0)) === null || _yearWiseBills$filter6 === void 0 ? void 0 : (_yearWiseBills$filter7 = _yearWiseBills$filter6[0]) === null || _yearWiseBills$filter7 === void 0 ? void 0 : (_yearWiseBills$filter8 = _yearWiseBills$filter7.billAccountDetails) === null || _yearWiseBills$filter8 === void 0 ? void 0 : (_yearWiseBills$filter9 = _yearWiseBills$filter8.sort((a, b) => a.order - b.order)) === null || _yearWiseBills$filter9 === void 0 ? void 0 : _yearWiseBills$filter9.map((head, index) => /*#__PURE__*/React__default.createElement("th", {
|
|
5046
|
-
style:
|
|
5232
|
+
style: {
|
|
5233
|
+
...thStyle
|
|
5234
|
+
},
|
|
5047
5235
|
key: index
|
|
5048
5236
|
}, t(head.taxHeadCode))), /*#__PURE__*/React__default.createElement("th", {
|
|
5049
5237
|
style: thStyle
|
|
@@ -5098,7 +5286,7 @@ const BillDetails$1 = _ref => {
|
|
|
5098
5286
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5099
5287
|
className: "payment-amount-front",
|
|
5100
5288
|
style: {
|
|
5101
|
-
border:
|
|
5289
|
+
border: `1px solid ${paymentType === t("CS_PAYMENT_FULL_AMOUNT") ? "#9a9a9a" : "black"}`
|
|
5102
5290
|
}
|
|
5103
5291
|
}, "\u20B9"), paymentType !== t("CS_PAYMENT_FULL_AMOUNT") ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
5104
5292
|
style: {
|
|
@@ -5122,58 +5310,61 @@ const BillDetails$1 = _ref => {
|
|
|
5122
5310
|
}, t(formError)))));
|
|
5123
5311
|
};
|
|
5124
5312
|
|
|
5125
|
-
const _excluded$2 = ["ManualRecieptDetails", "paymentModeDetails"],
|
|
5126
|
-
_excluded2 = ["errorObj"];
|
|
5127
5313
|
const CollectPayment = props => {
|
|
5128
5314
|
var _paymentdetails$Bill, _businessService$toUp;
|
|
5129
|
-
const
|
|
5130
|
-
ModuleWorkflow
|
|
5131
|
-
IsDisconnectionFlow
|
|
5132
|
-
|
|
5133
|
-
|
|
5315
|
+
const {
|
|
5316
|
+
workflow: ModuleWorkflow,
|
|
5317
|
+
IsDisconnectionFlow
|
|
5318
|
+
} = Digit.Hooks.useQueryParams();
|
|
5319
|
+
const {
|
|
5320
|
+
t
|
|
5321
|
+
} = reactI18next.useTranslation();
|
|
5134
5322
|
const history = reactRouterDom.useHistory();
|
|
5135
5323
|
const queryClient = reactQuery.useQueryClient();
|
|
5136
|
-
const
|
|
5137
|
-
state
|
|
5138
|
-
search
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5324
|
+
const {
|
|
5325
|
+
state,
|
|
5326
|
+
search
|
|
5327
|
+
} = reactRouterDom.useLocation();
|
|
5328
|
+
const {
|
|
5329
|
+
path: currentPath
|
|
5330
|
+
} = reactRouterDom.useRouteMatch();
|
|
5331
|
+
let {
|
|
5332
|
+
consumerCode,
|
|
5333
|
+
businessService
|
|
5334
|
+
} = reactRouterDom.useParams();
|
|
5143
5335
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
5144
|
-
const
|
|
5145
|
-
Time = _useState[0],
|
|
5146
|
-
setTime = _useState[1];
|
|
5336
|
+
const [Time, setTime] = React.useState(0);
|
|
5147
5337
|
if (window.location.href.includes("ISWSAPP")) consumerCode = new URLSearchParams(search).get("applicationNumber");
|
|
5148
5338
|
if (window.location.href.includes("ISWSCON") || ModuleWorkflow === "WS") consumerCode = decodeURIComponent(consumerCode);
|
|
5149
|
-
const
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5339
|
+
const {
|
|
5340
|
+
data: paymentdetails,
|
|
5341
|
+
isLoading
|
|
5342
|
+
} = Digit.Hooks.useFetchPayment({
|
|
5343
|
+
tenantId: tenantId,
|
|
5344
|
+
consumerCode,
|
|
5345
|
+
businessService
|
|
5346
|
+
});
|
|
5156
5347
|
const bill = (paymentdetails === null || paymentdetails === void 0 ? void 0 : (_paymentdetails$Bill = paymentdetails.Bill) === null || _paymentdetails$Bill === void 0 ? void 0 : _paymentdetails$Bill.length) > 0 ? paymentdetails === null || paymentdetails === void 0 ? void 0 : paymentdetails.Bill[0] : {};
|
|
5157
|
-
const
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5348
|
+
const {
|
|
5349
|
+
data: applicationData
|
|
5350
|
+
} = Digit.Hooks.fsm.useSearch(tenantId, {
|
|
5351
|
+
applicationNos: consumerCode
|
|
5352
|
+
}, {
|
|
5353
|
+
staleTime: Infinity,
|
|
5354
|
+
enabled: businessService !== null && businessService !== void 0 && (_businessService$toUp = businessService.toUpperCase()) !== null && _businessService$toUp !== void 0 && _businessService$toUp.includes("FSM") ? true : false
|
|
5355
|
+
});
|
|
5164
5356
|
const advanceBill = applicationData === null || applicationData === void 0 ? void 0 : applicationData.advanceAmount;
|
|
5165
|
-
const
|
|
5166
|
-
cardConfig
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
const
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
const
|
|
5175
|
-
|
|
5176
|
-
setToast = _useState3[1];
|
|
5357
|
+
const {
|
|
5358
|
+
cardConfig
|
|
5359
|
+
} = useCardPaymentDetails(props, t);
|
|
5360
|
+
const {
|
|
5361
|
+
chequeConfig
|
|
5362
|
+
} = useChequeDetails(props, t);
|
|
5363
|
+
const {
|
|
5364
|
+
cashConfig
|
|
5365
|
+
} = useCashPaymentDetails(props, t);
|
|
5366
|
+
const [formState, setFormState] = React.useState({});
|
|
5367
|
+
const [toast, setToast] = React.useState(null);
|
|
5177
5368
|
React.useEffect(() => {
|
|
5178
5369
|
if (paymentdetails !== null && paymentdetails !== void 0 && paymentdetails.Bill && paymentdetails.Bill.length === 0) {
|
|
5179
5370
|
setToast({
|
|
@@ -5207,15 +5398,11 @@ const CollectPayment = props => {
|
|
|
5207
5398
|
code: "OTHER",
|
|
5208
5399
|
name: t("COMMON_OTHER")
|
|
5209
5400
|
}];
|
|
5210
|
-
const
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
name: t("COMMON_OWNER")
|
|
5216
|
-
}),
|
|
5217
|
-
selectedPaidBy = _useState5[0],
|
|
5218
|
-
setselectedPaidBy = _useState5[1];
|
|
5401
|
+
const [selectedPaymentMode, setPaymentMode] = React.useState((formState === null || formState === void 0 ? void 0 : formState.selectedPaymentMode) || getPaymentModes()[0]);
|
|
5402
|
+
const [selectedPaidBy, setselectedPaidBy] = React.useState((formState === null || formState === void 0 ? void 0 : formState.paidBy) || {
|
|
5403
|
+
code: "OWNER",
|
|
5404
|
+
name: t("COMMON_OWNER")
|
|
5405
|
+
});
|
|
5219
5406
|
const onSubmit = function (data) {
|
|
5220
5407
|
try {
|
|
5221
5408
|
var _data$amount, _data$amount6, _data$amount7, _data$paymentMode, _data$paymentModeDeta, _recieptRequest$Payme2, _recieptRequest$Payme3, _recieptRequest$Payme4, _recieptRequest$Payme5, _recieptRequest$Payme6;
|
|
@@ -5233,12 +5420,15 @@ const CollectPayment = props => {
|
|
|
5233
5420
|
});
|
|
5234
5421
|
return Promise.resolve();
|
|
5235
5422
|
}
|
|
5236
|
-
const
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5423
|
+
const {
|
|
5424
|
+
ManualRecieptDetails,
|
|
5425
|
+
paymentModeDetails,
|
|
5426
|
+
...rest
|
|
5427
|
+
} = data;
|
|
5428
|
+
const {
|
|
5429
|
+
errorObj,
|
|
5430
|
+
...details
|
|
5431
|
+
} = paymentModeDetails || {};
|
|
5242
5432
|
let recieptRequest = {
|
|
5243
5433
|
Payment: {
|
|
5244
5434
|
mobileNumber: data.payerMobile,
|
|
@@ -5268,7 +5458,10 @@ const CollectPayment = props => {
|
|
|
5268
5458
|
recieptRequest.Payment.paymentMode = data === null || data === void 0 ? void 0 : (_data$paymentMode = data.paymentMode) === null || _data$paymentMode === void 0 ? void 0 : _data$paymentMode.code;
|
|
5269
5459
|
if (data.paymentModeDetails) {
|
|
5270
5460
|
var _recieptRequest$Payme;
|
|
5271
|
-
recieptRequest.Payment =
|
|
5461
|
+
recieptRequest.Payment = {
|
|
5462
|
+
...recieptRequest.Payment,
|
|
5463
|
+
...details
|
|
5464
|
+
};
|
|
5272
5465
|
delete recieptRequest.Payment.paymentModeDetails;
|
|
5273
5466
|
if (data.paymentModeDetails.errorObj) {
|
|
5274
5467
|
const errors = data.paymentModeDetails.errorObj;
|
|
@@ -5276,7 +5469,7 @@ const CollectPayment = props => {
|
|
|
5276
5469
|
if (messages) {
|
|
5277
5470
|
setToast({
|
|
5278
5471
|
key: "error",
|
|
5279
|
-
action: messages
|
|
5472
|
+
action: `${messages} ${t("ES_ERROR_REQUIRED")}`
|
|
5280
5473
|
});
|
|
5281
5474
|
setTimeout(() => setToast(null), 5000);
|
|
5282
5475
|
return Promise.resolve();
|
|
@@ -5313,7 +5506,7 @@ const CollectPayment = props => {
|
|
|
5313
5506
|
return Promise.resolve(Digit.PaymentService.createReciept(tenantId, recieptRequest)).then(function (resposne) {
|
|
5314
5507
|
var _resposne$Payments$, _resposne$Payments$$p, _resposne$Payments$2, _resposne$Payments$2$, _resposne$Payments$2$2, _resposne$Payments$3, _resposne$Payments$3$, _resposne$Payments$4, _resposne$Payments$4$, _resposne$Payments$4$2;
|
|
5315
5508
|
queryClient.invalidateQueries();
|
|
5316
|
-
history.push(IsDisconnectionFlow ? props.basePath
|
|
5509
|
+
history.push(IsDisconnectionFlow ? `${props.basePath}/success/${businessService}/${resposne === null || resposne === void 0 ? void 0 : (_resposne$Payments$ = resposne.Payments[0]) === null || _resposne$Payments$ === void 0 ? void 0 : (_resposne$Payments$$p = _resposne$Payments$.paymentDetails[0]) === null || _resposne$Payments$$p === void 0 ? void 0 : _resposne$Payments$$p.receiptNumber.replace(/\//g, "%2F")}/${resposne === null || resposne === void 0 ? void 0 : (_resposne$Payments$2 = resposne.Payments[0]) === null || _resposne$Payments$2 === void 0 ? void 0 : (_resposne$Payments$2$ = _resposne$Payments$2.paymentDetails[0]) === null || _resposne$Payments$2$ === void 0 ? void 0 : (_resposne$Payments$2$2 = _resposne$Payments$2$.bill) === null || _resposne$Payments$2$2 === void 0 ? void 0 : _resposne$Payments$2$2.consumerCode}?IsDisconnectionFlow=${IsDisconnectionFlow}` : `${props.basePath}/success/${businessService}/${resposne === null || resposne === void 0 ? void 0 : (_resposne$Payments$3 = resposne.Payments[0]) === null || _resposne$Payments$3 === void 0 ? void 0 : (_resposne$Payments$3$ = _resposne$Payments$3.paymentDetails[0]) === null || _resposne$Payments$3$ === void 0 ? void 0 : _resposne$Payments$3$.receiptNumber.replace(/\//g, "%2F")}/${resposne === null || resposne === void 0 ? void 0 : (_resposne$Payments$4 = resposne.Payments[0]) === null || _resposne$Payments$4 === void 0 ? void 0 : (_resposne$Payments$4$ = _resposne$Payments$4.paymentDetails[0]) === null || _resposne$Payments$4$ === void 0 ? void 0 : (_resposne$Payments$4$2 = _resposne$Payments$4$.bill) === null || _resposne$Payments$4$2 === void 0 ? void 0 : _resposne$Payments$4$2.consumerCode}?IsDisconnectionFlow=${IsDisconnectionFlow}`);
|
|
5317
5510
|
});
|
|
5318
5511
|
}, function (error) {
|
|
5319
5512
|
var _setToast, _error$response, _error$response$data, _error$response$data$;
|
|
@@ -5344,7 +5537,7 @@ const CollectPayment = props => {
|
|
|
5344
5537
|
marginBottom: 0,
|
|
5345
5538
|
textAlign: "right"
|
|
5346
5539
|
}
|
|
5347
|
-
}, " ",
|
|
5540
|
+
}, " ", `₹ ${bill === null || bill === void 0 ? void 0 : bill.totalAmount}`, " ")
|
|
5348
5541
|
}]
|
|
5349
5542
|
}, {
|
|
5350
5543
|
head: t("PAYMENT_PAID_BY_HEAD"),
|
|
@@ -5504,7 +5697,7 @@ const CollectPayment = props => {
|
|
|
5504
5697
|
}
|
|
5505
5698
|
}), toast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
5506
5699
|
error: toast.key === "error",
|
|
5507
|
-
label: t(toast.key === "success" ?
|
|
5700
|
+
label: t(toast.key === "success" ? `ES_${businessService.split(".")[0].toLowerCase()}_${toast.action}_UPDATE_SUCCESS` : toast.action),
|
|
5508
5701
|
onClose: () => setToast(null),
|
|
5509
5702
|
style: {
|
|
5510
5703
|
maxWidth: "670px"
|
|
@@ -5520,7 +5713,7 @@ const convertEpochToDate$1 = dateEpoch => {
|
|
|
5520
5713
|
let year = dateFromApi.getFullYear();
|
|
5521
5714
|
month = (month > 9 ? "" : "0") + month;
|
|
5522
5715
|
day = (day > 9 ? "" : "0") + day;
|
|
5523
|
-
return day
|
|
5716
|
+
return `${day}/${month}/${year}`;
|
|
5524
5717
|
} else {
|
|
5525
5718
|
return "NA";
|
|
5526
5719
|
}
|
|
@@ -5528,34 +5721,35 @@ const convertEpochToDate$1 = dateEpoch => {
|
|
|
5528
5721
|
const SuccessfulPayment$1 = props => {
|
|
5529
5722
|
var _location, _location$pathname, _data$6, _data$7, _data$8, _data$9, _data$0, _data$1, _data$10, _data$11, _data$12;
|
|
5530
5723
|
const history = reactRouterDom.useHistory();
|
|
5531
|
-
const
|
|
5532
|
-
t
|
|
5724
|
+
const {
|
|
5725
|
+
t
|
|
5726
|
+
} = reactI18next.useTranslation();
|
|
5533
5727
|
const queryClient = reactQuery.useQueryClient();
|
|
5534
|
-
const
|
|
5535
|
-
IsDisconnectionFlow
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
const _useState2 = React.useState(null),
|
|
5540
|
-
selectedAction = _useState2[0],
|
|
5541
|
-
setSelectedAction = _useState2[1];
|
|
5728
|
+
const {
|
|
5729
|
+
IsDisconnectionFlow
|
|
5730
|
+
} = Digit.Hooks.useQueryParams();
|
|
5731
|
+
const [displayMenu, setDisplayMenu] = React.useState(false);
|
|
5732
|
+
const [selectedAction, setSelectedAction] = React.useState(null);
|
|
5542
5733
|
const isFSMResponse = (_location = location) === null || _location === void 0 ? void 0 : (_location$pathname = _location.pathname) === null || _location$pathname === void 0 ? void 0 : _location$pathname.includes("payment/success/FSM.TRIP_CHARGES");
|
|
5543
|
-
const combineResponseFSM = isFSMResponse ? t("PAYMENT_COLLECT_LABEL")
|
|
5734
|
+
const combineResponseFSM = isFSMResponse ? `${t("PAYMENT_COLLECT_LABEL")} / ${t("PAYMENT_COLLECT")}` : t("PAYMENT_LOCALIZATION_RESPONSE");
|
|
5544
5735
|
props.setLink(combineResponseFSM);
|
|
5545
|
-
let
|
|
5546
|
-
consumerCode
|
|
5547
|
-
receiptNumber
|
|
5548
|
-
businessService
|
|
5736
|
+
let {
|
|
5737
|
+
consumerCode,
|
|
5738
|
+
receiptNumber,
|
|
5739
|
+
businessService
|
|
5740
|
+
} = reactRouterDom.useParams();
|
|
5549
5741
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
5550
5742
|
receiptNumber = receiptNumber.replace(/%2F/g, "/");
|
|
5551
|
-
const
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5743
|
+
const {
|
|
5744
|
+
data = {},
|
|
5745
|
+
isLoading: isBpaSearchLoading,
|
|
5746
|
+
isSuccess: isBpaSuccess,
|
|
5747
|
+
error: bpaerror
|
|
5748
|
+
} = Digit.Hooks.obps.useOBPSSearch("", {}, tenantId, {
|
|
5749
|
+
applicationNo: consumerCode
|
|
5750
|
+
}, {}, {
|
|
5751
|
+
enabled: businessService !== null && businessService !== void 0 && businessService.includes("BPA") ? true : false
|
|
5752
|
+
});
|
|
5559
5753
|
const FSM_EDITOR = Digit.UserService.hasAccess("FSM_EDITOR_EMP") || false;
|
|
5560
5754
|
function onActionSelect(action) {
|
|
5561
5755
|
setSelectedAction(action);
|
|
@@ -5598,7 +5792,7 @@ const SuccessfulPayment$1 = props => {
|
|
|
5598
5792
|
case "GO_TO_HOME":
|
|
5599
5793
|
return history.push("/digit-ui/employee");
|
|
5600
5794
|
case "ASSIGN_TO_DSO":
|
|
5601
|
-
return history.push(
|
|
5795
|
+
return history.push(`/digit-ui/employee/fsm/application-details/${consumerCode}`);
|
|
5602
5796
|
default:
|
|
5603
5797
|
return null;
|
|
5604
5798
|
}
|
|
@@ -5613,23 +5807,26 @@ const SuccessfulPayment$1 = props => {
|
|
|
5613
5807
|
if (businessService !== null && businessService !== void 0 && businessService.includes("BPA")) {
|
|
5614
5808
|
let nameOfAchitect = sessionStorage.getItem("BPA_ARCHITECT_NAME");
|
|
5615
5809
|
let parsedArchitectName = nameOfAchitect ? JSON.parse(nameOfAchitect) : "ARCHITECT";
|
|
5616
|
-
return t(
|
|
5810
|
+
return t(`ES_PAYMENT_${businessService}_${parsedArchitectName}_SUCCESSFUL_DESCRIPTION`);
|
|
5617
5811
|
} else if (businessService !== null && businessService !== void 0 && businessService.includes("WS") || businessService !== null && businessService !== void 0 && businessService.includes("SW")) {
|
|
5618
|
-
return t(
|
|
5812
|
+
return t(`ES_PAYMENT_WS_${businessService === null || businessService === void 0 ? void 0 : businessService.replace(/\./g, "_")}_SUCCESSFUL_DESCRIPTION`);
|
|
5619
5813
|
} else {
|
|
5620
5814
|
return t("ES_PAYMENT_SUCCESSFUL_DESCRIPTION");
|
|
5621
5815
|
}
|
|
5622
5816
|
};
|
|
5623
|
-
const
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5817
|
+
const {
|
|
5818
|
+
data: generatePdfKey
|
|
5819
|
+
} = Digit.Hooks.useCommonMDMS(tenantId, "common-masters", "ReceiptKey", {
|
|
5820
|
+
select: data => {
|
|
5821
|
+
var _data$commonMasters, _data$commonMasters$u, _data$commonMasters$u2;
|
|
5822
|
+
return ((_data$commonMasters = data["common-masters"]) === null || _data$commonMasters === void 0 ? void 0 : (_data$commonMasters$u = _data$commonMasters.uiCommonPay) === null || _data$commonMasters$u === void 0 ? void 0 : (_data$commonMasters$u2 = _data$commonMasters$u.filter(_ref => {
|
|
5823
|
+
let {
|
|
5824
|
+
code
|
|
5825
|
+
} = _ref;
|
|
5826
|
+
return businessService === null || businessService === void 0 ? void 0 : businessService.includes(code);
|
|
5827
|
+
})[0]) === null || _data$commonMasters$u2 === void 0 ? void 0 : _data$commonMasters$u2.receiptKey) || "consolidatedreceipt";
|
|
5828
|
+
}
|
|
5829
|
+
});
|
|
5633
5830
|
const printCertificate = function () {
|
|
5634
5831
|
try {
|
|
5635
5832
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
@@ -5722,9 +5919,12 @@ const SuccessfulPayment$1 = props => {
|
|
|
5722
5919
|
edcrData = edcrResponse === null || edcrResponse === void 0 ? void 0 : (_edcrResponse$edcrDet = edcrResponse.edcrDetail) === null || _edcrResponse$edcrDet === void 0 ? void 0 : _edcrResponse$edcrDet[0];
|
|
5723
5920
|
let currentDate = new Date();
|
|
5724
5921
|
bpaData.additionalDetails.runDate = convertDateToEpoch(currentDate.getFullYear() + "-" + (currentDate.getMonth() + 1) + "-" + currentDate.getDate());
|
|
5725
|
-
let reqData =
|
|
5726
|
-
|
|
5727
|
-
|
|
5922
|
+
let reqData = {
|
|
5923
|
+
...bpaData,
|
|
5924
|
+
edcrDetail: [{
|
|
5925
|
+
...edcrData
|
|
5926
|
+
}]
|
|
5927
|
+
};
|
|
5728
5928
|
return Promise.resolve(Digit.PaymentService.generatePdf(bpaData === null || bpaData === void 0 ? void 0 : bpaData.tenantId, {
|
|
5729
5929
|
Bpa: [reqData]
|
|
5730
5930
|
}, order)).then(function (response) {
|
|
@@ -5735,7 +5935,9 @@ const SuccessfulPayment$1 = props => {
|
|
|
5735
5935
|
window.open(fileStore[response === null || response === void 0 ? void 0 : response.filestoreIds[0]], "_blank");
|
|
5736
5936
|
reqData["applicationType"] = data === null || data === void 0 ? void 0 : (_data$5 = data[0]) === null || _data$5 === void 0 ? void 0 : (_data$5$additionalDet = _data$5.additionalDetails) === null || _data$5$additionalDet === void 0 ? void 0 : _data$5$additionalDet.applicationType;
|
|
5737
5937
|
return Promise.resolve(Digit.OBPSService.edcr_report_download({
|
|
5738
|
-
BPA:
|
|
5938
|
+
BPA: {
|
|
5939
|
+
...reqData
|
|
5940
|
+
}
|
|
5739
5941
|
})).then(function (edcrResponseData) {
|
|
5740
5942
|
const responseStatus = parseInt(edcrResponseData.status, 10);
|
|
5741
5943
|
if (responseStatus === 201 || responseStatus === 200) {
|
|
@@ -5743,7 +5945,7 @@ const SuccessfulPayment$1 = props => {
|
|
|
5743
5945
|
type: "application/pdf"
|
|
5744
5946
|
})) : downloadPdf(new Blob([edcrResponseData.data], {
|
|
5745
5947
|
type: "application/pdf"
|
|
5746
|
-
}),
|
|
5948
|
+
}), `edcrReport.pdf`);
|
|
5747
5949
|
}
|
|
5748
5950
|
});
|
|
5749
5951
|
});
|
|
@@ -5812,16 +6014,21 @@ const SuccessfulPayment$1 = props => {
|
|
|
5812
6014
|
return Promise.resolve(Digit.OBPSService.BPASearch(payments.Payments[0].tenantId, queryObj)).then(function (bpaResponse) {
|
|
5813
6015
|
var _bpaResponse$BPA$, _bpaResponse$BPA$$add, _paymentData$paymentD, _bpaResponse$BPA$2, _bpaResponse$BPA$2$ad;
|
|
5814
6016
|
const formattedStakeholderType = bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA$ = bpaResponse.BPA[0]) === null || _bpaResponse$BPA$ === void 0 ? void 0 : (_bpaResponse$BPA$$add = _bpaResponse$BPA$.additionalDetails) === null || _bpaResponse$BPA$$add === void 0 ? void 0 : _bpaResponse$BPA$$add.typeOfArchitect;
|
|
5815
|
-
const updatedpayments =
|
|
5816
|
-
|
|
5817
|
-
|
|
6017
|
+
const updatedpayments = {
|
|
6018
|
+
...paymentData,
|
|
6019
|
+
paymentDetails: [{
|
|
6020
|
+
...((_paymentData$paymentD = paymentData.paymentDetails) === null || _paymentData$paymentD === void 0 ? void 0 : _paymentData$paymentD[0]),
|
|
6021
|
+
additionalDetails: {
|
|
6022
|
+
...paymentData.paymentDetails[0].additionalDetails,
|
|
5818
6023
|
"propertyID": bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA$2 = bpaResponse.BPA[0]) === null || _bpaResponse$BPA$2 === void 0 ? void 0 : (_bpaResponse$BPA$2$ad = _bpaResponse$BPA$2.additionalDetails) === null || _bpaResponse$BPA$2$ad === void 0 ? void 0 : _bpaResponse$BPA$2$ad.propertyID,
|
|
5819
6024
|
"stakeholderType": formattedStakeholderType.charAt(0).toUpperCase() + formattedStakeholderType.slice(1).toLowerCase()
|
|
5820
|
-
}
|
|
5821
|
-
}
|
|
5822
|
-
}
|
|
6025
|
+
}
|
|
6026
|
+
}]
|
|
6027
|
+
};
|
|
5823
6028
|
return Promise.resolve(Digit.PaymentService.generatePdf(state, {
|
|
5824
|
-
Payments: [
|
|
6029
|
+
Payments: [{
|
|
6030
|
+
...updatedpayments
|
|
6031
|
+
}]
|
|
5825
6032
|
}, generatePdfKey)).then(function (_Digit$PaymentService2) {
|
|
5826
6033
|
response = _Digit$PaymentService2;
|
|
5827
6034
|
});
|
|
@@ -6200,9 +6407,10 @@ const SuccessfulPayment$1 = props => {
|
|
|
6200
6407
|
return Promise.resolve(Digit.PaymentService.generatePdf(tenantId, {
|
|
6201
6408
|
hallsBookingApplication: [applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication[0]]
|
|
6202
6409
|
}, generatePdfKeyForTL)).then(function (response) {
|
|
6203
|
-
const updatedApplication =
|
|
6410
|
+
const updatedApplication = {
|
|
6411
|
+
...(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication[0]),
|
|
6204
6412
|
permissionLetterFilestoreId: response === null || response === void 0 ? void 0 : response.filestoreIds[0]
|
|
6205
|
-
}
|
|
6413
|
+
};
|
|
6206
6414
|
return Promise.resolve(mutation.mutateAsync({
|
|
6207
6415
|
hallsBookingApplication: updatedApplication
|
|
6208
6416
|
})).then(function () {
|
|
@@ -6240,9 +6448,10 @@ const SuccessfulPayment$1 = props => {
|
|
|
6240
6448
|
return Promise.resolve(Digit.PaymentService.generatePdf(tenantId, {
|
|
6241
6449
|
bookingApplication: [applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.bookingApplication[0]]
|
|
6242
6450
|
}, generatePdfKeyForTL)).then(function (response) {
|
|
6243
|
-
const updatedApplication =
|
|
6451
|
+
const updatedApplication = {
|
|
6452
|
+
...(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.bookingApplication[0]),
|
|
6244
6453
|
permissionLetterFilestoreId: response === null || response === void 0 ? void 0 : response.filestoreIds[0]
|
|
6245
|
-
}
|
|
6454
|
+
};
|
|
6246
6455
|
return Promise.resolve(AdvertisementCreateApi.mutateAsync({
|
|
6247
6456
|
bookingApplication: updatedApplication
|
|
6248
6457
|
})).then(function () {
|
|
@@ -6318,9 +6527,10 @@ const SuccessfulPayment$1 = props => {
|
|
|
6318
6527
|
}, "advservice-receipt")).then(function (_Digit$PaymentService8) {
|
|
6319
6528
|
var _response;
|
|
6320
6529
|
response = _Digit$PaymentService8;
|
|
6321
|
-
const updatedApplication =
|
|
6530
|
+
const updatedApplication = {
|
|
6531
|
+
...(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.bookingApplication[0]),
|
|
6322
6532
|
paymentReceiptFilestoreId: (_response = response) === null || _response === void 0 ? void 0 : _response.filestoreIds[0]
|
|
6323
|
-
}
|
|
6533
|
+
};
|
|
6324
6534
|
return Promise.resolve(AdvertisementCreateApi.mutateAsync({
|
|
6325
6535
|
bookingApplication: updatedApplication
|
|
6326
6536
|
})).then(function () {
|
|
@@ -6368,9 +6578,10 @@ const SuccessfulPayment$1 = props => {
|
|
|
6368
6578
|
}, "chbservice-receipt")).then(function (_Digit$PaymentService9) {
|
|
6369
6579
|
var _response3;
|
|
6370
6580
|
response = _Digit$PaymentService9;
|
|
6371
|
-
const updatedApplication =
|
|
6581
|
+
const updatedApplication = {
|
|
6582
|
+
...(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication[0]),
|
|
6372
6583
|
paymentReceiptFilestoreId: (_response3 = response) === null || _response3 === void 0 ? void 0 : _response3.filestoreIds[0]
|
|
6373
|
-
}
|
|
6584
|
+
};
|
|
6374
6585
|
return Promise.resolve(mutation.mutateAsync({
|
|
6375
6586
|
hallsBookingApplication: updatedApplication
|
|
6376
6587
|
})).then(function () {
|
|
@@ -6645,10 +6856,12 @@ const SuccessfulPayment$1 = props => {
|
|
|
6645
6856
|
};
|
|
6646
6857
|
const FailedPayment$1 = props => {
|
|
6647
6858
|
props.setLink("Response");
|
|
6648
|
-
const
|
|
6649
|
-
t
|
|
6650
|
-
|
|
6651
|
-
|
|
6859
|
+
const {
|
|
6860
|
+
t
|
|
6861
|
+
} = reactI18next.useTranslation();
|
|
6862
|
+
const {
|
|
6863
|
+
consumerCode
|
|
6864
|
+
} = reactRouterDom.useParams();
|
|
6652
6865
|
const getMessage = () => t("ES_PAYMENT_COLLECTED_ERROR");
|
|
6653
6866
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Banner, {
|
|
6654
6867
|
message: getMessage(),
|
|
@@ -6692,12 +6905,14 @@ const middleWare_3 = function (data, _break, _next) {
|
|
|
6692
6905
|
const _temp3 = function () {
|
|
6693
6906
|
if (data.b === "b") {
|
|
6694
6907
|
const _temp2 = _catch(function () {
|
|
6695
|
-
return Promise.resolve(window.fetch(
|
|
6908
|
+
return Promise.resolve(window.fetch(`https://ifsc.razorpay.com/hdfc0000090`)).then(function (res) {
|
|
6696
6909
|
const _temp = function () {
|
|
6697
6910
|
if (res.ok) {
|
|
6698
6911
|
return Promise.resolve(res.json()).then(function (_ref) {
|
|
6699
|
-
let
|
|
6700
|
-
|
|
6912
|
+
let {
|
|
6913
|
+
BANK,
|
|
6914
|
+
BRANCH
|
|
6915
|
+
} = _ref;
|
|
6701
6916
|
data.BANKFROMMiddleWare = BANK;
|
|
6702
6917
|
});
|
|
6703
6918
|
} else alert("Wrong IFSC Code");
|
|
@@ -6792,12 +7007,14 @@ const testForm = {
|
|
|
6792
7007
|
setBankDetailsFromIFSC: function (props) {
|
|
6793
7008
|
try {
|
|
6794
7009
|
const _temp6 = _catch(function () {
|
|
6795
|
-
return Promise.resolve(window.fetch(
|
|
7010
|
+
return Promise.resolve(window.fetch(`https://ifsc.razorpay.com/${props.getValues("ifsc")}`)).then(function (res) {
|
|
6796
7011
|
const _temp5 = function () {
|
|
6797
7012
|
if (res.ok) {
|
|
6798
7013
|
return Promise.resolve(res.json()).then(function (_ref2) {
|
|
6799
|
-
let
|
|
6800
|
-
|
|
7014
|
+
let {
|
|
7015
|
+
BANK,
|
|
7016
|
+
BRANCH
|
|
7017
|
+
} = _ref2;
|
|
6801
7018
|
props.setValue("bank", BANK);
|
|
6802
7019
|
props.setValue("branch", BRANCH);
|
|
6803
7020
|
});
|
|
@@ -6852,28 +7069,29 @@ const testForm = {
|
|
|
6852
7069
|
};
|
|
6853
7070
|
|
|
6854
7071
|
const IFrameInterface = props => {
|
|
6855
|
-
const
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
const
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
7072
|
+
const {
|
|
7073
|
+
stateCode
|
|
7074
|
+
} = props;
|
|
7075
|
+
const {
|
|
7076
|
+
moduleName,
|
|
7077
|
+
pageName
|
|
7078
|
+
} = reactRouterDom.useParams();
|
|
7079
|
+
const {
|
|
7080
|
+
t
|
|
7081
|
+
} = reactI18next.useTranslation();
|
|
7082
|
+
const [url, setUrl] = React.useState("");
|
|
7083
|
+
const [title, setTitle] = React.useState("");
|
|
7084
|
+
const {
|
|
7085
|
+
data,
|
|
7086
|
+
isLoading
|
|
7087
|
+
} = Digit.Hooks.dss.useMDMS(stateCode, "common-masters", ["uiCommonConstants"], {
|
|
7088
|
+
select: data => {
|
|
7089
|
+
var _data$commonMasters, _data$commonMasters$u;
|
|
7090
|
+
let formattedResponse = (data === null || data === void 0 ? void 0 : (_data$commonMasters = data["common-masters"]) === null || _data$commonMasters === void 0 ? void 0 : (_data$commonMasters$u = _data$commonMasters["uiCommonConstants"]) === null || _data$commonMasters$u === void 0 ? void 0 : _data$commonMasters$u[0]) || {};
|
|
7091
|
+
return formattedResponse;
|
|
7092
|
+
},
|
|
7093
|
+
enabled: true
|
|
7094
|
+
});
|
|
6877
7095
|
React.useEffect(() => {
|
|
6878
7096
|
var _data$moduleName, _data$moduleName$ifra;
|
|
6879
7097
|
const pageObject = (data === null || data === void 0 ? void 0 : (_data$moduleName = data[moduleName]) === null || _data$moduleName === void 0 ? void 0 : (_data$moduleName$ifra = _data$moduleName["iframe-routes"]) === null || _data$moduleName$ifra === void 0 ? void 0 : _data$moduleName$ifra[pageName]) || {};
|
|
@@ -6881,7 +7099,7 @@ const IFrameInterface = props => {
|
|
|
6881
7099
|
const domain = isOrign ? process.env.NODE_ENV === "development" ? "https://qa.digit.org" : document.location.origin : pageObject === null || pageObject === void 0 ? void 0 : pageObject["domain"];
|
|
6882
7100
|
const contextPath = (pageObject === null || pageObject === void 0 ? void 0 : pageObject["routePath"]) || "";
|
|
6883
7101
|
const title = (pageObject === null || pageObject === void 0 ? void 0 : pageObject["title"]) || "";
|
|
6884
|
-
let url =
|
|
7102
|
+
let url = `${domain}${contextPath}`;
|
|
6885
7103
|
setUrl(url);
|
|
6886
7104
|
setTitle(title);
|
|
6887
7105
|
}, [data, moduleName, pageName]);
|
|
@@ -6903,15 +7121,18 @@ const IFrameInterface = props => {
|
|
|
6903
7121
|
digitUiLibraries.subFormRegistry === null || digitUiLibraries.subFormRegistry === void 0 ? void 0 : digitUiLibraries.subFormRegistry.addSubForm("testForm", testForm);
|
|
6904
7122
|
const EmployeePayment = _ref => {
|
|
6905
7123
|
var _location, _location$pathname, _location2, _location2$pathname;
|
|
6906
|
-
let
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
const
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
7124
|
+
let {
|
|
7125
|
+
stateCode,
|
|
7126
|
+
cityCode,
|
|
7127
|
+
moduleCode
|
|
7128
|
+
} = _ref;
|
|
7129
|
+
const {
|
|
7130
|
+
path: currentPath
|
|
7131
|
+
} = reactRouterDom.useRouteMatch();
|
|
7132
|
+
const {
|
|
7133
|
+
t
|
|
7134
|
+
} = reactI18next.useTranslation();
|
|
7135
|
+
const [link, setLink] = React.useState(null);
|
|
6915
7136
|
const commonProps = {
|
|
6916
7137
|
stateCode,
|
|
6917
7138
|
cityCode,
|
|
@@ -6968,29 +7189,32 @@ const EmployeePayment = _ref => {
|
|
|
6968
7189
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6969
7190
|
className: "employee-form-content"
|
|
6970
7191
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
6971
|
-
path: currentPath
|
|
7192
|
+
path: `${currentPath}/collect/:businessService/:consumerCode`
|
|
6972
7193
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|
|
6973
7194
|
layoutClass: "action"
|
|
6974
7195
|
}, /*#__PURE__*/React__default.createElement(CollectPayment, _extends({}, commonProps, {
|
|
6975
7196
|
basePath: currentPath
|
|
6976
7197
|
})))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
6977
|
-
path: currentPath
|
|
7198
|
+
path: `${currentPath}/success/:businessService/:receiptNumber/:consumerCode`
|
|
6978
7199
|
}, /*#__PURE__*/React__default.createElement(SuccessfulPayment$1, commonProps)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
6979
|
-
path: currentPath
|
|
7200
|
+
path: `${currentPath}/integration/:moduleName/:pageName`
|
|
6980
7201
|
}, /*#__PURE__*/React__default.createElement(IFrameInterface, commonProps)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
6981
|
-
path: currentPath
|
|
7202
|
+
path: `${currentPath}/failure`
|
|
6982
7203
|
}, /*#__PURE__*/React__default.createElement(FailedPayment$1, commonProps)))))));
|
|
6983
7204
|
};
|
|
6984
7205
|
|
|
6985
7206
|
const PaymentModule = _ref => {
|
|
6986
|
-
let
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
7207
|
+
let {
|
|
7208
|
+
deltaConfig = {},
|
|
7209
|
+
stateCode,
|
|
7210
|
+
cityCode,
|
|
7211
|
+
moduleCode = "Payment",
|
|
7212
|
+
userType
|
|
7213
|
+
} = _ref;
|
|
7214
|
+
const {
|
|
7215
|
+
path,
|
|
7216
|
+
url
|
|
7217
|
+
} = reactRouterDom.useRouteMatch();
|
|
6994
7218
|
const store = {
|
|
6995
7219
|
data: {}
|
|
6996
7220
|
};
|
|
@@ -7013,7 +7237,9 @@ const PaymentModule = _ref => {
|
|
|
7013
7237
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, getPaymentHome());
|
|
7014
7238
|
};
|
|
7015
7239
|
const PaymentLinks = _ref2 => {
|
|
7016
|
-
const
|
|
7240
|
+
const {
|
|
7241
|
+
t
|
|
7242
|
+
} = reactI18next.useTranslation();
|
|
7017
7243
|
return null;
|
|
7018
7244
|
};
|
|
7019
7245
|
const paymentConfigs = {
|