@djb25/digit-ui-module-common 1.0.8 → 1.0.10
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 +1003 -770
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1003 -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,32 @@ 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`
|
|
3008
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
3009
|
+
label: t("CORE_COMMON_GO_TO_HOME"),
|
|
3010
|
+
style: {
|
|
3011
|
+
marginTop: "15px"
|
|
3012
|
+
}
|
|
3013
|
+
})), ((business_service === null || business_service === void 0 ? void 0 : business_service.includes("WS")) || (business_service === null || business_service === void 0 ? void 0 : business_service.includes("SW"))) && /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
3014
|
+
to: `/digit-ui/citizen/ws/my-applications`
|
|
2848
3015
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
2849
3016
|
label: t("CORE_COMMON_GO_TO_HOME"),
|
|
2850
3017
|
style: {
|
|
@@ -2853,10 +3020,12 @@ const WrapPaymentComponent = props => {
|
|
|
2853
3020
|
})));
|
|
2854
3021
|
};
|
|
2855
3022
|
const FailedPayment = props => {
|
|
2856
|
-
const
|
|
2857
|
-
t
|
|
2858
|
-
|
|
2859
|
-
|
|
3023
|
+
const {
|
|
3024
|
+
t
|
|
3025
|
+
} = reactI18next.useTranslation();
|
|
3026
|
+
const {
|
|
3027
|
+
consumerCode
|
|
3028
|
+
} = reactRouterDom.useParams();
|
|
2860
3029
|
const getMessage = () => "Failure !";
|
|
2861
3030
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Banner, {
|
|
2862
3031
|
message: getMessage(),
|
|
@@ -2866,20 +3035,25 @@ const FailedPayment = props => {
|
|
|
2866
3035
|
};
|
|
2867
3036
|
|
|
2868
3037
|
const CitizenPayment = _ref => {
|
|
2869
|
-
let
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
const
|
|
2875
|
-
|
|
3038
|
+
let {
|
|
3039
|
+
stateCode,
|
|
3040
|
+
cityCode,
|
|
3041
|
+
moduleCode
|
|
3042
|
+
} = _ref;
|
|
3043
|
+
const {
|
|
3044
|
+
path: currentPath
|
|
3045
|
+
} = reactRouterDom.useRouteMatch();
|
|
3046
|
+
const {
|
|
3047
|
+
state: routerState
|
|
3048
|
+
} = reactRouterDom.useLocation();
|
|
2876
3049
|
const commonProps = {
|
|
2877
3050
|
stateCode,
|
|
2878
3051
|
cityCode,
|
|
2879
3052
|
moduleCode
|
|
2880
3053
|
};
|
|
2881
|
-
const
|
|
2882
|
-
t
|
|
3054
|
+
const {
|
|
3055
|
+
t
|
|
3056
|
+
} = reactI18next.useTranslation();
|
|
2883
3057
|
let isMobile = window.Digit.Utils.browser.isMobile();
|
|
2884
3058
|
const pathname = window.location.pathname;
|
|
2885
3059
|
const crumbs = [{
|
|
@@ -2957,23 +3131,23 @@ const CitizenPayment = _ref => {
|
|
|
2957
3131
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2958
3132
|
className: "employee-form-content"
|
|
2959
3133
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
2960
|
-
path: currentPath
|
|
3134
|
+
path: `${currentPath}/my-bills/:businessService`
|
|
2961
3135
|
}, /*#__PURE__*/React__default.createElement(MyBills, {
|
|
2962
3136
|
stateCode: stateCode
|
|
2963
3137
|
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
2964
|
-
path: currentPath
|
|
3138
|
+
path: `${currentPath}/billDetails/:businessService/:consumerCode/:paymentAmt`
|
|
2965
3139
|
}, /*#__PURE__*/React__default.createElement(SelectPaymentType, _extends({}, commonProps, {
|
|
2966
3140
|
stateCode: stateCode,
|
|
2967
3141
|
basePath: currentPath
|
|
2968
3142
|
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
2969
|
-
path: currentPath
|
|
3143
|
+
path: `${currentPath}/collect/:businessService/:consumerCode`
|
|
2970
3144
|
}, /*#__PURE__*/React__default.createElement(SelectPaymentType$1, _extends({}, commonProps, {
|
|
2971
3145
|
stateCode: stateCode,
|
|
2972
3146
|
basePath: currentPath
|
|
2973
3147
|
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
2974
|
-
path: currentPath
|
|
3148
|
+
path: `${currentPath}/success/:businessService/:consumerCode/:tenantId`
|
|
2975
3149
|
}, /*#__PURE__*/React__default.createElement(SuccessfulPayment, commonProps)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
2976
|
-
path: currentPath
|
|
3150
|
+
path: `${currentPath}/failure`
|
|
2977
3151
|
}, /*#__PURE__*/React__default.createElement(FailedPayment, commonProps))))))));
|
|
2978
3152
|
};
|
|
2979
3153
|
|
|
@@ -2994,7 +3168,7 @@ const getKeyNotesConfig = (businessService, t) => {
|
|
|
2994
3168
|
fontSize: "16px",
|
|
2995
3169
|
fontWeight: "normal"
|
|
2996
3170
|
}
|
|
2997
|
-
},
|
|
3171
|
+
}, ` ( ${t("CS_PAYMENT_OVERDUE")} ${days} ${t(days === 1 ? "CS_COMMON_DAY" : "CS_COMMON_DAYS")})`) : null);
|
|
2998
3172
|
}],
|
|
2999
3173
|
fallback: "N/A",
|
|
3000
3174
|
noteStyle: {
|
|
@@ -3017,9 +3191,10 @@ const getKeyNotesConfig = (businessService, t) => {
|
|
|
3017
3191
|
}, {
|
|
3018
3192
|
keyValue: "CS_PAYMENT_BILLING_PERIOD",
|
|
3019
3193
|
keyPath: ["billDetails", d => {
|
|
3020
|
-
const
|
|
3021
|
-
fromPeriod
|
|
3022
|
-
toPeriod
|
|
3194
|
+
const {
|
|
3195
|
+
fromPeriod,
|
|
3196
|
+
toPeriod
|
|
3197
|
+
} = d[0];
|
|
3023
3198
|
if (fromPeriod && toPeriod) {
|
|
3024
3199
|
let from = new Date(fromPeriod).getFullYear().toString();
|
|
3025
3200
|
let to = new Date(toPeriod).getFullYear().toString();
|
|
@@ -3030,11 +3205,11 @@ const getKeyNotesConfig = (businessService, t) => {
|
|
|
3030
3205
|
}, {
|
|
3031
3206
|
keyValue: "PT_DUE_DATE",
|
|
3032
3207
|
keyPath: ["billDetails", d => {
|
|
3033
|
-
var _d
|
|
3034
|
-
if (!((_d$
|
|
3035
|
-
const date = new Date((_d$
|
|
3208
|
+
var _d$, _d$2;
|
|
3209
|
+
if (!((_d$ = d[0]) !== null && _d$ !== void 0 && _d$.toPeriod)) return "N/A";
|
|
3210
|
+
const date = new Date((_d$2 = d[0]) === null || _d$2 === void 0 ? void 0 : _d$2.toPeriod);
|
|
3036
3211
|
const month = Digit.Utils.date.monthNames[date.getMonth()];
|
|
3037
|
-
return date.getDate()
|
|
3212
|
+
return `${date.getDate()} ${month} ${date.getFullYear()}`;
|
|
3038
3213
|
}],
|
|
3039
3214
|
fallback: "N/A"
|
|
3040
3215
|
}],
|
|
@@ -3085,15 +3260,14 @@ const useCashPaymentDetails = (props, t) => {
|
|
|
3085
3260
|
};
|
|
3086
3261
|
const CashDetailsComponent = _ref => {
|
|
3087
3262
|
var _props$value, _props$value2;
|
|
3088
|
-
let
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
const
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
const
|
|
3095
|
-
|
|
3096
|
-
setManualReceiptNumber = _useState2[1];
|
|
3263
|
+
let {
|
|
3264
|
+
...props
|
|
3265
|
+
} = _ref;
|
|
3266
|
+
const {
|
|
3267
|
+
t
|
|
3268
|
+
} = reactI18next.useTranslation();
|
|
3269
|
+
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);
|
|
3270
|
+
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
3271
|
React.useEffect(() => {
|
|
3098
3272
|
if (props.onChange) {
|
|
3099
3273
|
let errorObj = {};
|
|
@@ -3144,18 +3318,15 @@ const useCardPaymentDetails = (props, t) => {
|
|
|
3144
3318
|
};
|
|
3145
3319
|
const CardDetailsComponent = _ref => {
|
|
3146
3320
|
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];
|
|
3321
|
+
let {
|
|
3322
|
+
...props
|
|
3323
|
+
} = _ref;
|
|
3324
|
+
const {
|
|
3325
|
+
t
|
|
3326
|
+
} = reactI18next.useTranslation();
|
|
3327
|
+
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);
|
|
3328
|
+
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);
|
|
3329
|
+
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
3330
|
React.useEffect(() => {
|
|
3160
3331
|
if (props.onChange) {
|
|
3161
3332
|
let errorObj = {};
|
|
@@ -3172,19 +3343,19 @@ const CardDetailsComponent = _ref => {
|
|
|
3172
3343
|
}, [last4Digits, transactionNumber, reTransanctionNumber]);
|
|
3173
3344
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
3174
3345
|
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")
|
|
3346
|
+
}, /*#__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
3347
|
value: last4Digits,
|
|
3177
3348
|
name: "instrumentNumber",
|
|
3178
3349
|
maxLength: "4",
|
|
3179
3350
|
minLength: "4",
|
|
3180
3351
|
required: true,
|
|
3181
3352
|
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")
|
|
3353
|
+
})), /*#__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
3354
|
value: transactionNumber,
|
|
3184
3355
|
name: "instrumentNumber",
|
|
3185
3356
|
required: true,
|
|
3186
3357
|
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")
|
|
3358
|
+
})), /*#__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
3359
|
value: reTransanctionNumber,
|
|
3189
3360
|
name: "instrumentNumber",
|
|
3190
3361
|
required: true,
|
|
@@ -3223,26 +3394,15 @@ const useChequeDetails = (props, t) => {
|
|
|
3223
3394
|
};
|
|
3224
3395
|
const ChequeDetailsComponent = props => {
|
|
3225
3396
|
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];
|
|
3397
|
+
const {
|
|
3398
|
+
t
|
|
3399
|
+
} = reactI18next.useTranslation();
|
|
3400
|
+
const [instrumentDate, setChequeDate] = React.useState(props.chequeDetails.instrumentDate);
|
|
3401
|
+
const [instrumentNumber, setChequeNo] = React.useState(props.chequeDetails.instrumentNumber);
|
|
3402
|
+
const [ifscCode, setIfsc] = React.useState(props.chequeDetails.ifscCode);
|
|
3403
|
+
const [ifscCodeError, setIfscCodeError] = React.useState("");
|
|
3404
|
+
const [bankName, setBankName] = React.useState(props.chequeDetails.bankName);
|
|
3405
|
+
const [bankBranch, setBankBranch] = React.useState((_props$chequeDetails$ = props.chequeDetails.bankBranch) === null || _props$chequeDetails$ === void 0 ? void 0 : _props$chequeDetails$.replace(" ", " "));
|
|
3246
3406
|
React.useEffect(() => {
|
|
3247
3407
|
if (props.onChange) {
|
|
3248
3408
|
let errorObj = {};
|
|
@@ -3263,12 +3423,14 @@ const ChequeDetailsComponent = props => {
|
|
|
3263
3423
|
const setBankDetailsFromIFSC = function () {
|
|
3264
3424
|
try {
|
|
3265
3425
|
const _temp2 = _catch(function () {
|
|
3266
|
-
return Promise.resolve(window.fetch(
|
|
3426
|
+
return Promise.resolve(window.fetch(`https://ifsc.razorpay.com/${ifscCode}`)).then(function (res) {
|
|
3267
3427
|
const _temp = function () {
|
|
3268
3428
|
if (res.ok) {
|
|
3269
3429
|
return Promise.resolve(res.json()).then(function (_ref) {
|
|
3270
|
-
let
|
|
3271
|
-
|
|
3430
|
+
let {
|
|
3431
|
+
BANK,
|
|
3432
|
+
BRANCH
|
|
3433
|
+
} = _ref;
|
|
3272
3434
|
setBankName(BANK);
|
|
3273
3435
|
setBankBranch(BRANCH === null || BRANCH === void 0 ? void 0 : BRANCH.replace(" ", " "));
|
|
3274
3436
|
});
|
|
@@ -3290,18 +3452,18 @@ const ChequeDetailsComponent = props => {
|
|
|
3290
3452
|
};
|
|
3291
3453
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
3292
3454
|
className: "formcomposer-section-grid"
|
|
3293
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("PAYMENT_CHQ_NO_LABEL")
|
|
3455
|
+
}, /*#__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
3456
|
value: instrumentNumber,
|
|
3295
3457
|
onChange: e => setChequeNo(e.target.value),
|
|
3296
3458
|
name: "instrumentNumber",
|
|
3297
3459
|
required: true
|
|
3298
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("PAYMENT_CHEQUE_DATE_LABEL")
|
|
3460
|
+
})), /*#__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
3461
|
isRequired: true,
|
|
3300
3462
|
date: instrumentDate,
|
|
3301
3463
|
onChange: d => {
|
|
3302
3464
|
setChequeDate(d);
|
|
3303
3465
|
}
|
|
3304
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("PAYMENT_IFSC_CODE_LABEL")
|
|
3466
|
+
})), /*#__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
3467
|
className: "field"
|
|
3306
3468
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3307
3469
|
className: "cheque-date"
|
|
@@ -4320,9 +4482,10 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4320
4482
|
}, {
|
|
4321
4483
|
keyValue: "CS_PAYMENT_BILLING_PERIOD",
|
|
4322
4484
|
keyPath: ["billDetails", d => {
|
|
4323
|
-
const
|
|
4324
|
-
fromPeriod
|
|
4325
|
-
toPeriod
|
|
4485
|
+
const {
|
|
4486
|
+
fromPeriod,
|
|
4487
|
+
toPeriod
|
|
4488
|
+
} = d[0];
|
|
4326
4489
|
if (fromPeriod && toPeriod) {
|
|
4327
4490
|
let from = new Date(fromPeriod).getFullYear().toString();
|
|
4328
4491
|
let to = new Date(toPeriod).getFullYear().toString();
|
|
@@ -4333,7 +4496,9 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4333
4496
|
}, {
|
|
4334
4497
|
keyValue: "CS_BILL_NO",
|
|
4335
4498
|
keyPath: ["billDetails", d => {
|
|
4336
|
-
const
|
|
4499
|
+
const {
|
|
4500
|
+
currentBillNo
|
|
4501
|
+
} = d[0];
|
|
4337
4502
|
if (currentBillNo) {
|
|
4338
4503
|
return currentBillNo;
|
|
4339
4504
|
} else return "N/A";
|
|
@@ -4342,7 +4507,9 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4342
4507
|
}, {
|
|
4343
4508
|
keyValue: "CS_BILL_DUEDATE",
|
|
4344
4509
|
keyPath: ["billDetails", d => {
|
|
4345
|
-
const
|
|
4510
|
+
const {
|
|
4511
|
+
currentExpiryDate
|
|
4512
|
+
} = d[0];
|
|
4346
4513
|
if (currentExpiryDate) {
|
|
4347
4514
|
return new Date(currentExpiryDate).toLocaleDateString();
|
|
4348
4515
|
} else return "N/A";
|
|
@@ -4367,7 +4534,9 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4367
4534
|
}, {
|
|
4368
4535
|
keyValue: "CS_BILL_NO",
|
|
4369
4536
|
keyPath: ["billDetails", d => {
|
|
4370
|
-
const
|
|
4537
|
+
const {
|
|
4538
|
+
currentBillNo
|
|
4539
|
+
} = d[0];
|
|
4371
4540
|
if (currentBillNo) {
|
|
4372
4541
|
return currentBillNo;
|
|
4373
4542
|
} else return "N/A";
|
|
@@ -4376,7 +4545,9 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4376
4545
|
}, {
|
|
4377
4546
|
keyValue: "CS_BILL_DUEDATE",
|
|
4378
4547
|
keyPath: ["billDetails", d => {
|
|
4379
|
-
const
|
|
4548
|
+
const {
|
|
4549
|
+
currentExpiryDate
|
|
4550
|
+
} = d[0];
|
|
4380
4551
|
if (currentExpiryDate) {
|
|
4381
4552
|
return new Date(currentExpiryDate).toLocaleDateString();
|
|
4382
4553
|
} else return "N/A";
|
|
@@ -4433,9 +4604,10 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4433
4604
|
}, {
|
|
4434
4605
|
keyValue: "CS_PAYMENT_BILLING_PERIOD",
|
|
4435
4606
|
keyPath: ["billDetails", d => {
|
|
4436
|
-
const
|
|
4437
|
-
fromPeriod
|
|
4438
|
-
toPeriod
|
|
4607
|
+
const {
|
|
4608
|
+
fromPeriod,
|
|
4609
|
+
toPeriod
|
|
4610
|
+
} = d[0];
|
|
4439
4611
|
if (fromPeriod && toPeriod) {
|
|
4440
4612
|
let from = new Date(fromPeriod).toLocaleDateString();
|
|
4441
4613
|
let to = new Date(toPeriod).toLocaleDateString();
|
|
@@ -4450,7 +4622,9 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4450
4622
|
}, {
|
|
4451
4623
|
keyValue: "CS_BILL_DUEDATE",
|
|
4452
4624
|
keyPath: ["billDetails", d => {
|
|
4453
|
-
const
|
|
4625
|
+
const {
|
|
4626
|
+
currentExpiryDate
|
|
4627
|
+
} = d[0];
|
|
4454
4628
|
if (currentExpiryDate) {
|
|
4455
4629
|
return new Date(currentExpiryDate).toLocaleDateString();
|
|
4456
4630
|
} else return "N/A";
|
|
@@ -4467,9 +4641,10 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4467
4641
|
}, {
|
|
4468
4642
|
keyValue: "CS_PAYMENT_BILLING_PERIOD",
|
|
4469
4643
|
keyPath: ["billDetails", d => {
|
|
4470
|
-
const
|
|
4471
|
-
fromPeriod
|
|
4472
|
-
toPeriod
|
|
4644
|
+
const {
|
|
4645
|
+
fromPeriod,
|
|
4646
|
+
toPeriod
|
|
4647
|
+
} = d[0];
|
|
4473
4648
|
if (fromPeriod && toPeriod) {
|
|
4474
4649
|
let from = new Date(fromPeriod).toLocaleDateString();
|
|
4475
4650
|
let to = new Date(toPeriod).toLocaleDateString();
|
|
@@ -4484,7 +4659,9 @@ const BillDetailsKeyNoteConfig = () => ({
|
|
|
4484
4659
|
}, {
|
|
4485
4660
|
keyValue: "CS_BILL_DUEDATE",
|
|
4486
4661
|
keyPath: ["billDetails", d => {
|
|
4487
|
-
const
|
|
4662
|
+
const {
|
|
4663
|
+
expiryDate
|
|
4664
|
+
} = d[0];
|
|
4488
4665
|
if (expiryDate) {
|
|
4489
4666
|
return new Date(expiryDate).toLocaleDateString();
|
|
4490
4667
|
} else return "N/A";
|
|
@@ -4707,40 +4884,49 @@ const BillDetailsFormConfig = (props, t) => ({
|
|
|
4707
4884
|
});
|
|
4708
4885
|
const BillDetails$1 = _ref => {
|
|
4709
4886
|
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
|
-
|
|
4887
|
+
let {
|
|
4888
|
+
businessService,
|
|
4889
|
+
consumerCode,
|
|
4890
|
+
_amount,
|
|
4891
|
+
onChange
|
|
4892
|
+
} = _ref;
|
|
4893
|
+
const {
|
|
4894
|
+
t
|
|
4895
|
+
} = reactI18next.useTranslation();
|
|
4896
|
+
const {
|
|
4897
|
+
workflow: ModuleWorkflow,
|
|
4898
|
+
IsDisconnectionFlow
|
|
4899
|
+
} = Digit.Hooks.useQueryParams();
|
|
4718
4900
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
4719
|
-
const
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4901
|
+
const {
|
|
4902
|
+
data,
|
|
4903
|
+
isLoading
|
|
4904
|
+
} = Digit.Hooks.useFetchPayment({
|
|
4905
|
+
tenantId,
|
|
4906
|
+
businessService,
|
|
4907
|
+
consumerCode
|
|
4908
|
+
});
|
|
4726
4909
|
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
|
-
|
|
4910
|
+
const {
|
|
4911
|
+
isLoading: isDataLoading,
|
|
4912
|
+
data: applicationData
|
|
4913
|
+
} = Digit.Hooks.fsm.useSearch(tenantId, {
|
|
4914
|
+
applicationNos: consumerCode
|
|
4915
|
+
}, {
|
|
4916
|
+
staleTime: Infinity,
|
|
4917
|
+
enabled: businessService !== null && businessService !== void 0 && (_businessService$toUp = businessService.toUpperCase()) !== null && _businessService$toUp !== void 0 && _businessService$toUp.includes("FSM") ? true : false
|
|
4918
|
+
});
|
|
4919
|
+
const [bill, setBill] = React.useState();
|
|
4920
|
+
const [showDetails, setShowDetails] = React.useState(true);
|
|
4921
|
+
const {
|
|
4922
|
+
isLoading: isFSMLoading,
|
|
4923
|
+
isError,
|
|
4924
|
+
error,
|
|
4925
|
+
data: application,
|
|
4926
|
+
error: errorApplication
|
|
4927
|
+
} = Digit.Hooks.fsm.useApplicationDetail(t, tenantId, consumerCode, {
|
|
4928
|
+
enabled: checkFSM ? true : false
|
|
4929
|
+
}, "EMPLOYEE");
|
|
4744
4930
|
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
4931
|
const billDetails = (yearWiseBills === null || yearWiseBills === void 0 ? void 0 : yearWiseBills[0]) || [];
|
|
4746
4932
|
const getTotal = () => bill !== null && bill !== void 0 && bill.totalAmount ? bill === null || bill === void 0 ? void 0 : bill.totalAmount : 0;
|
|
@@ -4758,38 +4944,31 @@ const BillDetails$1 = _ref => {
|
|
|
4758
4944
|
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
4945
|
};
|
|
4760
4946
|
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];
|
|
4947
|
+
const {
|
|
4948
|
+
isLoading: mdmsLoading,
|
|
4949
|
+
data: mdmsBillingData
|
|
4950
|
+
} = Digit.Hooks.useGetPaymentRulesForBusinessServices(tenantId);
|
|
4951
|
+
const [paymentRules, setPaymentRules] = React.useState();
|
|
4767
4952
|
React.useEffect(() => {
|
|
4768
4953
|
var _mdmsBillingData$Mdms, _mdmsBillingData$Mdms2;
|
|
4769
4954
|
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
4955
|
if (payRestrictiondetails !== null && payRestrictiondetails !== void 0 && payRestrictiondetails.length) {
|
|
4771
4956
|
if (IsDisconnectionFlow) {
|
|
4772
|
-
setPaymentRules(
|
|
4957
|
+
setPaymentRules({
|
|
4958
|
+
...payRestrictiondetails.filter(e => e.code == businessService)[0],
|
|
4773
4959
|
partPaymentAllowed: false
|
|
4774
|
-
})
|
|
4960
|
+
});
|
|
4775
4961
|
} else setPaymentRules(payRestrictiondetails.filter(e => e.code == businessService)[0]);
|
|
4776
4962
|
} else setPaymentRules({});
|
|
4777
4963
|
}, [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];
|
|
4964
|
+
const {
|
|
4965
|
+
minAmountPayable,
|
|
4966
|
+
isAdvanceAllowed
|
|
4967
|
+
} = paymentRules || {};
|
|
4968
|
+
const [paymentType, setPaymentType] = React.useState(t("CS_PAYMENT_FULL_AMOUNT"));
|
|
4969
|
+
const [amount, setAmount] = React.useState(getTotal());
|
|
4970
|
+
const [paymentAllowed, setPaymentAllowed] = React.useState(true);
|
|
4971
|
+
const [formError, setError] = React.useState("");
|
|
4793
4972
|
const changeAmount = value => {
|
|
4794
4973
|
setAmount(value);
|
|
4795
4974
|
};
|
|
@@ -4843,15 +5022,19 @@ const BillDetails$1 = _ref => {
|
|
|
4843
5022
|
};
|
|
4844
5023
|
if (isLoading || mdmsLoading) return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
4845
5024
|
const getFinancialYear = _bill => {
|
|
4846
|
-
const
|
|
4847
|
-
|
|
5025
|
+
const {
|
|
5026
|
+
fromPeriod,
|
|
5027
|
+
toPeriod
|
|
5028
|
+
} = _bill;
|
|
4848
5029
|
let from = new Date(fromPeriod).getFullYear().toString();
|
|
4849
5030
|
let to = new Date(toPeriod).getFullYear().toString();
|
|
4850
5031
|
return from + "-" + to;
|
|
4851
5032
|
};
|
|
4852
5033
|
const getBillingPeriod = _bill => {
|
|
4853
|
-
const
|
|
4854
|
-
|
|
5034
|
+
const {
|
|
5035
|
+
fromPeriod,
|
|
5036
|
+
toPeriod
|
|
5037
|
+
} = _bill;
|
|
4855
5038
|
let from = new Date(fromPeriod).toLocaleDateString();
|
|
4856
5039
|
let to = new Date(toPeriod).toLocaleDateString();
|
|
4857
5040
|
return from + "-" + to;
|
|
@@ -4877,11 +5060,17 @@ const BillDetails$1 = _ref => {
|
|
|
4877
5060
|
}, /*#__PURE__*/React__default.createElement("thead", null, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
|
|
4878
5061
|
style: thStyle
|
|
4879
5062
|
}, t("CS_BILL_NO")), /*#__PURE__*/React__default.createElement("th", {
|
|
4880
|
-
style:
|
|
5063
|
+
style: {
|
|
5064
|
+
...thStyle
|
|
5065
|
+
}
|
|
4881
5066
|
}, t("CS_PAYMENT_BILLING_PERIOD")), /*#__PURE__*/React__default.createElement("th", {
|
|
4882
|
-
style:
|
|
5067
|
+
style: {
|
|
5068
|
+
...thStyle
|
|
5069
|
+
}
|
|
4883
5070
|
}, 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:
|
|
5071
|
+
style: {
|
|
5072
|
+
...thStyle
|
|
5073
|
+
},
|
|
4885
5074
|
key: index
|
|
4886
5075
|
}, t(head.taxHeadCode))), /*#__PURE__*/React__default.createElement("th", {
|
|
4887
5076
|
style: thStyle
|
|
@@ -5039,11 +5228,17 @@ const BillDetails$1 = _ref => {
|
|
|
5039
5228
|
}, /*#__PURE__*/React__default.createElement("thead", null, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
|
|
5040
5229
|
style: thStyle
|
|
5041
5230
|
}, t("FINANCIAL_YEAR")), /*#__PURE__*/React__default.createElement("th", {
|
|
5042
|
-
style:
|
|
5231
|
+
style: {
|
|
5232
|
+
...thStyle
|
|
5233
|
+
}
|
|
5043
5234
|
}, t("CS_BILL_NO")), /*#__PURE__*/React__default.createElement("th", {
|
|
5044
|
-
style:
|
|
5235
|
+
style: {
|
|
5236
|
+
...thStyle
|
|
5237
|
+
}
|
|
5045
5238
|
}, 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:
|
|
5239
|
+
style: {
|
|
5240
|
+
...thStyle
|
|
5241
|
+
},
|
|
5047
5242
|
key: index
|
|
5048
5243
|
}, t(head.taxHeadCode))), /*#__PURE__*/React__default.createElement("th", {
|
|
5049
5244
|
style: thStyle
|
|
@@ -5098,7 +5293,7 @@ const BillDetails$1 = _ref => {
|
|
|
5098
5293
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5099
5294
|
className: "payment-amount-front",
|
|
5100
5295
|
style: {
|
|
5101
|
-
border:
|
|
5296
|
+
border: `1px solid ${paymentType === t("CS_PAYMENT_FULL_AMOUNT") ? "#9a9a9a" : "black"}`
|
|
5102
5297
|
}
|
|
5103
5298
|
}, "\u20B9"), paymentType !== t("CS_PAYMENT_FULL_AMOUNT") ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
5104
5299
|
style: {
|
|
@@ -5122,58 +5317,61 @@ const BillDetails$1 = _ref => {
|
|
|
5122
5317
|
}, t(formError)))));
|
|
5123
5318
|
};
|
|
5124
5319
|
|
|
5125
|
-
const _excluded$2 = ["ManualRecieptDetails", "paymentModeDetails"],
|
|
5126
|
-
_excluded2 = ["errorObj"];
|
|
5127
5320
|
const CollectPayment = props => {
|
|
5128
5321
|
var _paymentdetails$Bill, _businessService$toUp;
|
|
5129
|
-
const
|
|
5130
|
-
ModuleWorkflow
|
|
5131
|
-
IsDisconnectionFlow
|
|
5132
|
-
|
|
5133
|
-
|
|
5322
|
+
const {
|
|
5323
|
+
workflow: ModuleWorkflow,
|
|
5324
|
+
IsDisconnectionFlow
|
|
5325
|
+
} = Digit.Hooks.useQueryParams();
|
|
5326
|
+
const {
|
|
5327
|
+
t
|
|
5328
|
+
} = reactI18next.useTranslation();
|
|
5134
5329
|
const history = reactRouterDom.useHistory();
|
|
5135
5330
|
const queryClient = reactQuery.useQueryClient();
|
|
5136
|
-
const
|
|
5137
|
-
state
|
|
5138
|
-
search
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5331
|
+
const {
|
|
5332
|
+
state,
|
|
5333
|
+
search
|
|
5334
|
+
} = reactRouterDom.useLocation();
|
|
5335
|
+
const {
|
|
5336
|
+
path: currentPath
|
|
5337
|
+
} = reactRouterDom.useRouteMatch();
|
|
5338
|
+
let {
|
|
5339
|
+
consumerCode,
|
|
5340
|
+
businessService
|
|
5341
|
+
} = reactRouterDom.useParams();
|
|
5143
5342
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
5144
|
-
const
|
|
5145
|
-
Time = _useState[0],
|
|
5146
|
-
setTime = _useState[1];
|
|
5343
|
+
const [Time, setTime] = React.useState(0);
|
|
5147
5344
|
if (window.location.href.includes("ISWSAPP")) consumerCode = new URLSearchParams(search).get("applicationNumber");
|
|
5148
5345
|
if (window.location.href.includes("ISWSCON") || ModuleWorkflow === "WS") consumerCode = decodeURIComponent(consumerCode);
|
|
5149
|
-
const
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5346
|
+
const {
|
|
5347
|
+
data: paymentdetails,
|
|
5348
|
+
isLoading
|
|
5349
|
+
} = Digit.Hooks.useFetchPayment({
|
|
5350
|
+
tenantId: tenantId,
|
|
5351
|
+
consumerCode,
|
|
5352
|
+
businessService
|
|
5353
|
+
});
|
|
5156
5354
|
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
|
-
|
|
5355
|
+
const {
|
|
5356
|
+
data: applicationData
|
|
5357
|
+
} = Digit.Hooks.fsm.useSearch(tenantId, {
|
|
5358
|
+
applicationNos: consumerCode
|
|
5359
|
+
}, {
|
|
5360
|
+
staleTime: Infinity,
|
|
5361
|
+
enabled: businessService !== null && businessService !== void 0 && (_businessService$toUp = businessService.toUpperCase()) !== null && _businessService$toUp !== void 0 && _businessService$toUp.includes("FSM") ? true : false
|
|
5362
|
+
});
|
|
5164
5363
|
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];
|
|
5364
|
+
const {
|
|
5365
|
+
cardConfig
|
|
5366
|
+
} = useCardPaymentDetails(props, t);
|
|
5367
|
+
const {
|
|
5368
|
+
chequeConfig
|
|
5369
|
+
} = useChequeDetails(props, t);
|
|
5370
|
+
const {
|
|
5371
|
+
cashConfig
|
|
5372
|
+
} = useCashPaymentDetails(props, t);
|
|
5373
|
+
const [formState, setFormState] = React.useState({});
|
|
5374
|
+
const [toast, setToast] = React.useState(null);
|
|
5177
5375
|
React.useEffect(() => {
|
|
5178
5376
|
if (paymentdetails !== null && paymentdetails !== void 0 && paymentdetails.Bill && paymentdetails.Bill.length === 0) {
|
|
5179
5377
|
setToast({
|
|
@@ -5207,15 +5405,11 @@ const CollectPayment = props => {
|
|
|
5207
5405
|
code: "OTHER",
|
|
5208
5406
|
name: t("COMMON_OTHER")
|
|
5209
5407
|
}];
|
|
5210
|
-
const
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
name: t("COMMON_OWNER")
|
|
5216
|
-
}),
|
|
5217
|
-
selectedPaidBy = _useState5[0],
|
|
5218
|
-
setselectedPaidBy = _useState5[1];
|
|
5408
|
+
const [selectedPaymentMode, setPaymentMode] = React.useState((formState === null || formState === void 0 ? void 0 : formState.selectedPaymentMode) || getPaymentModes()[0]);
|
|
5409
|
+
const [selectedPaidBy, setselectedPaidBy] = React.useState((formState === null || formState === void 0 ? void 0 : formState.paidBy) || {
|
|
5410
|
+
code: "OWNER",
|
|
5411
|
+
name: t("COMMON_OWNER")
|
|
5412
|
+
});
|
|
5219
5413
|
const onSubmit = function (data) {
|
|
5220
5414
|
try {
|
|
5221
5415
|
var _data$amount, _data$amount6, _data$amount7, _data$paymentMode, _data$paymentModeDeta, _recieptRequest$Payme2, _recieptRequest$Payme3, _recieptRequest$Payme4, _recieptRequest$Payme5, _recieptRequest$Payme6;
|
|
@@ -5233,12 +5427,15 @@ const CollectPayment = props => {
|
|
|
5233
5427
|
});
|
|
5234
5428
|
return Promise.resolve();
|
|
5235
5429
|
}
|
|
5236
|
-
const
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5430
|
+
const {
|
|
5431
|
+
ManualRecieptDetails,
|
|
5432
|
+
paymentModeDetails,
|
|
5433
|
+
...rest
|
|
5434
|
+
} = data;
|
|
5435
|
+
const {
|
|
5436
|
+
errorObj,
|
|
5437
|
+
...details
|
|
5438
|
+
} = paymentModeDetails || {};
|
|
5242
5439
|
let recieptRequest = {
|
|
5243
5440
|
Payment: {
|
|
5244
5441
|
mobileNumber: data.payerMobile,
|
|
@@ -5268,7 +5465,10 @@ const CollectPayment = props => {
|
|
|
5268
5465
|
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
5466
|
if (data.paymentModeDetails) {
|
|
5270
5467
|
var _recieptRequest$Payme;
|
|
5271
|
-
recieptRequest.Payment =
|
|
5468
|
+
recieptRequest.Payment = {
|
|
5469
|
+
...recieptRequest.Payment,
|
|
5470
|
+
...details
|
|
5471
|
+
};
|
|
5272
5472
|
delete recieptRequest.Payment.paymentModeDetails;
|
|
5273
5473
|
if (data.paymentModeDetails.errorObj) {
|
|
5274
5474
|
const errors = data.paymentModeDetails.errorObj;
|
|
@@ -5276,7 +5476,7 @@ const CollectPayment = props => {
|
|
|
5276
5476
|
if (messages) {
|
|
5277
5477
|
setToast({
|
|
5278
5478
|
key: "error",
|
|
5279
|
-
action: messages
|
|
5479
|
+
action: `${messages} ${t("ES_ERROR_REQUIRED")}`
|
|
5280
5480
|
});
|
|
5281
5481
|
setTimeout(() => setToast(null), 5000);
|
|
5282
5482
|
return Promise.resolve();
|
|
@@ -5313,7 +5513,7 @@ const CollectPayment = props => {
|
|
|
5313
5513
|
return Promise.resolve(Digit.PaymentService.createReciept(tenantId, recieptRequest)).then(function (resposne) {
|
|
5314
5514
|
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
5515
|
queryClient.invalidateQueries();
|
|
5316
|
-
history.push(IsDisconnectionFlow ? props.basePath
|
|
5516
|
+
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
5517
|
});
|
|
5318
5518
|
}, function (error) {
|
|
5319
5519
|
var _setToast, _error$response, _error$response$data, _error$response$data$;
|
|
@@ -5344,7 +5544,7 @@ const CollectPayment = props => {
|
|
|
5344
5544
|
marginBottom: 0,
|
|
5345
5545
|
textAlign: "right"
|
|
5346
5546
|
}
|
|
5347
|
-
}, " ",
|
|
5547
|
+
}, " ", `₹ ${bill === null || bill === void 0 ? void 0 : bill.totalAmount}`, " ")
|
|
5348
5548
|
}]
|
|
5349
5549
|
}, {
|
|
5350
5550
|
head: t("PAYMENT_PAID_BY_HEAD"),
|
|
@@ -5504,7 +5704,7 @@ const CollectPayment = props => {
|
|
|
5504
5704
|
}
|
|
5505
5705
|
}), toast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
5506
5706
|
error: toast.key === "error",
|
|
5507
|
-
label: t(toast.key === "success" ?
|
|
5707
|
+
label: t(toast.key === "success" ? `ES_${businessService.split(".")[0].toLowerCase()}_${toast.action}_UPDATE_SUCCESS` : toast.action),
|
|
5508
5708
|
onClose: () => setToast(null),
|
|
5509
5709
|
style: {
|
|
5510
5710
|
maxWidth: "670px"
|
|
@@ -5520,7 +5720,7 @@ const convertEpochToDate$1 = dateEpoch => {
|
|
|
5520
5720
|
let year = dateFromApi.getFullYear();
|
|
5521
5721
|
month = (month > 9 ? "" : "0") + month;
|
|
5522
5722
|
day = (day > 9 ? "" : "0") + day;
|
|
5523
|
-
return day
|
|
5723
|
+
return `${day}/${month}/${year}`;
|
|
5524
5724
|
} else {
|
|
5525
5725
|
return "NA";
|
|
5526
5726
|
}
|
|
@@ -5528,34 +5728,35 @@ const convertEpochToDate$1 = dateEpoch => {
|
|
|
5528
5728
|
const SuccessfulPayment$1 = props => {
|
|
5529
5729
|
var _location, _location$pathname, _data$6, _data$7, _data$8, _data$9, _data$0, _data$1, _data$10, _data$11, _data$12;
|
|
5530
5730
|
const history = reactRouterDom.useHistory();
|
|
5531
|
-
const
|
|
5532
|
-
t
|
|
5731
|
+
const {
|
|
5732
|
+
t
|
|
5733
|
+
} = reactI18next.useTranslation();
|
|
5533
5734
|
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];
|
|
5735
|
+
const {
|
|
5736
|
+
IsDisconnectionFlow
|
|
5737
|
+
} = Digit.Hooks.useQueryParams();
|
|
5738
|
+
const [displayMenu, setDisplayMenu] = React.useState(false);
|
|
5739
|
+
const [selectedAction, setSelectedAction] = React.useState(null);
|
|
5542
5740
|
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")
|
|
5741
|
+
const combineResponseFSM = isFSMResponse ? `${t("PAYMENT_COLLECT_LABEL")} / ${t("PAYMENT_COLLECT")}` : t("PAYMENT_LOCALIZATION_RESPONSE");
|
|
5544
5742
|
props.setLink(combineResponseFSM);
|
|
5545
|
-
let
|
|
5546
|
-
consumerCode
|
|
5547
|
-
receiptNumber
|
|
5548
|
-
businessService
|
|
5743
|
+
let {
|
|
5744
|
+
consumerCode,
|
|
5745
|
+
receiptNumber,
|
|
5746
|
+
businessService
|
|
5747
|
+
} = reactRouterDom.useParams();
|
|
5549
5748
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
5550
5749
|
receiptNumber = receiptNumber.replace(/%2F/g, "/");
|
|
5551
|
-
const
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5750
|
+
const {
|
|
5751
|
+
data = {},
|
|
5752
|
+
isLoading: isBpaSearchLoading,
|
|
5753
|
+
isSuccess: isBpaSuccess,
|
|
5754
|
+
error: bpaerror
|
|
5755
|
+
} = Digit.Hooks.obps.useOBPSSearch("", {}, tenantId, {
|
|
5756
|
+
applicationNo: consumerCode
|
|
5757
|
+
}, {}, {
|
|
5758
|
+
enabled: businessService !== null && businessService !== void 0 && businessService.includes("BPA") ? true : false
|
|
5759
|
+
});
|
|
5559
5760
|
const FSM_EDITOR = Digit.UserService.hasAccess("FSM_EDITOR_EMP") || false;
|
|
5560
5761
|
function onActionSelect(action) {
|
|
5561
5762
|
setSelectedAction(action);
|
|
@@ -5598,7 +5799,7 @@ const SuccessfulPayment$1 = props => {
|
|
|
5598
5799
|
case "GO_TO_HOME":
|
|
5599
5800
|
return history.push("/digit-ui/employee");
|
|
5600
5801
|
case "ASSIGN_TO_DSO":
|
|
5601
|
-
return history.push(
|
|
5802
|
+
return history.push(`/digit-ui/employee/fsm/application-details/${consumerCode}`);
|
|
5602
5803
|
default:
|
|
5603
5804
|
return null;
|
|
5604
5805
|
}
|
|
@@ -5613,23 +5814,26 @@ const SuccessfulPayment$1 = props => {
|
|
|
5613
5814
|
if (businessService !== null && businessService !== void 0 && businessService.includes("BPA")) {
|
|
5614
5815
|
let nameOfAchitect = sessionStorage.getItem("BPA_ARCHITECT_NAME");
|
|
5615
5816
|
let parsedArchitectName = nameOfAchitect ? JSON.parse(nameOfAchitect) : "ARCHITECT";
|
|
5616
|
-
return t(
|
|
5817
|
+
return t(`ES_PAYMENT_${businessService}_${parsedArchitectName}_SUCCESSFUL_DESCRIPTION`);
|
|
5617
5818
|
} else if (businessService !== null && businessService !== void 0 && businessService.includes("WS") || businessService !== null && businessService !== void 0 && businessService.includes("SW")) {
|
|
5618
|
-
return t(
|
|
5819
|
+
return t(`ES_PAYMENT_WS_${businessService === null || businessService === void 0 ? void 0 : businessService.replace(/\./g, "_")}_SUCCESSFUL_DESCRIPTION`);
|
|
5619
5820
|
} else {
|
|
5620
5821
|
return t("ES_PAYMENT_SUCCESSFUL_DESCRIPTION");
|
|
5621
5822
|
}
|
|
5622
5823
|
};
|
|
5623
|
-
const
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5824
|
+
const {
|
|
5825
|
+
data: generatePdfKey
|
|
5826
|
+
} = Digit.Hooks.useCommonMDMS(tenantId, "common-masters", "ReceiptKey", {
|
|
5827
|
+
select: data => {
|
|
5828
|
+
var _data$commonMasters, _data$commonMasters$u, _data$commonMasters$u2;
|
|
5829
|
+
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 => {
|
|
5830
|
+
let {
|
|
5831
|
+
code
|
|
5832
|
+
} = _ref;
|
|
5833
|
+
return businessService === null || businessService === void 0 ? void 0 : businessService.includes(code);
|
|
5834
|
+
})[0]) === null || _data$commonMasters$u2 === void 0 ? void 0 : _data$commonMasters$u2.receiptKey) || "consolidatedreceipt";
|
|
5835
|
+
}
|
|
5836
|
+
});
|
|
5633
5837
|
const printCertificate = function () {
|
|
5634
5838
|
try {
|
|
5635
5839
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
@@ -5722,9 +5926,12 @@ const SuccessfulPayment$1 = props => {
|
|
|
5722
5926
|
edcrData = edcrResponse === null || edcrResponse === void 0 ? void 0 : (_edcrResponse$edcrDet = edcrResponse.edcrDetail) === null || _edcrResponse$edcrDet === void 0 ? void 0 : _edcrResponse$edcrDet[0];
|
|
5723
5927
|
let currentDate = new Date();
|
|
5724
5928
|
bpaData.additionalDetails.runDate = convertDateToEpoch(currentDate.getFullYear() + "-" + (currentDate.getMonth() + 1) + "-" + currentDate.getDate());
|
|
5725
|
-
let reqData =
|
|
5726
|
-
|
|
5727
|
-
|
|
5929
|
+
let reqData = {
|
|
5930
|
+
...bpaData,
|
|
5931
|
+
edcrDetail: [{
|
|
5932
|
+
...edcrData
|
|
5933
|
+
}]
|
|
5934
|
+
};
|
|
5728
5935
|
return Promise.resolve(Digit.PaymentService.generatePdf(bpaData === null || bpaData === void 0 ? void 0 : bpaData.tenantId, {
|
|
5729
5936
|
Bpa: [reqData]
|
|
5730
5937
|
}, order)).then(function (response) {
|
|
@@ -5735,7 +5942,9 @@ const SuccessfulPayment$1 = props => {
|
|
|
5735
5942
|
window.open(fileStore[response === null || response === void 0 ? void 0 : response.filestoreIds[0]], "_blank");
|
|
5736
5943
|
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
5944
|
return Promise.resolve(Digit.OBPSService.edcr_report_download({
|
|
5738
|
-
BPA:
|
|
5945
|
+
BPA: {
|
|
5946
|
+
...reqData
|
|
5947
|
+
}
|
|
5739
5948
|
})).then(function (edcrResponseData) {
|
|
5740
5949
|
const responseStatus = parseInt(edcrResponseData.status, 10);
|
|
5741
5950
|
if (responseStatus === 201 || responseStatus === 200) {
|
|
@@ -5743,7 +5952,7 @@ const SuccessfulPayment$1 = props => {
|
|
|
5743
5952
|
type: "application/pdf"
|
|
5744
5953
|
})) : downloadPdf(new Blob([edcrResponseData.data], {
|
|
5745
5954
|
type: "application/pdf"
|
|
5746
|
-
}),
|
|
5955
|
+
}), `edcrReport.pdf`);
|
|
5747
5956
|
}
|
|
5748
5957
|
});
|
|
5749
5958
|
});
|
|
@@ -5812,16 +6021,21 @@ const SuccessfulPayment$1 = props => {
|
|
|
5812
6021
|
return Promise.resolve(Digit.OBPSService.BPASearch(payments.Payments[0].tenantId, queryObj)).then(function (bpaResponse) {
|
|
5813
6022
|
var _bpaResponse$BPA$, _bpaResponse$BPA$$add, _paymentData$paymentD, _bpaResponse$BPA$2, _bpaResponse$BPA$2$ad;
|
|
5814
6023
|
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
|
-
|
|
6024
|
+
const updatedpayments = {
|
|
6025
|
+
...paymentData,
|
|
6026
|
+
paymentDetails: [{
|
|
6027
|
+
...((_paymentData$paymentD = paymentData.paymentDetails) === null || _paymentData$paymentD === void 0 ? void 0 : _paymentData$paymentD[0]),
|
|
6028
|
+
additionalDetails: {
|
|
6029
|
+
...paymentData.paymentDetails[0].additionalDetails,
|
|
5818
6030
|
"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
6031
|
"stakeholderType": formattedStakeholderType.charAt(0).toUpperCase() + formattedStakeholderType.slice(1).toLowerCase()
|
|
5820
|
-
}
|
|
5821
|
-
}
|
|
5822
|
-
}
|
|
6032
|
+
}
|
|
6033
|
+
}]
|
|
6034
|
+
};
|
|
5823
6035
|
return Promise.resolve(Digit.PaymentService.generatePdf(state, {
|
|
5824
|
-
Payments: [
|
|
6036
|
+
Payments: [{
|
|
6037
|
+
...updatedpayments
|
|
6038
|
+
}]
|
|
5825
6039
|
}, generatePdfKey)).then(function (_Digit$PaymentService2) {
|
|
5826
6040
|
response = _Digit$PaymentService2;
|
|
5827
6041
|
});
|
|
@@ -6200,9 +6414,10 @@ const SuccessfulPayment$1 = props => {
|
|
|
6200
6414
|
return Promise.resolve(Digit.PaymentService.generatePdf(tenantId, {
|
|
6201
6415
|
hallsBookingApplication: [applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication[0]]
|
|
6202
6416
|
}, generatePdfKeyForTL)).then(function (response) {
|
|
6203
|
-
const updatedApplication =
|
|
6417
|
+
const updatedApplication = {
|
|
6418
|
+
...(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication[0]),
|
|
6204
6419
|
permissionLetterFilestoreId: response === null || response === void 0 ? void 0 : response.filestoreIds[0]
|
|
6205
|
-
}
|
|
6420
|
+
};
|
|
6206
6421
|
return Promise.resolve(mutation.mutateAsync({
|
|
6207
6422
|
hallsBookingApplication: updatedApplication
|
|
6208
6423
|
})).then(function () {
|
|
@@ -6240,9 +6455,10 @@ const SuccessfulPayment$1 = props => {
|
|
|
6240
6455
|
return Promise.resolve(Digit.PaymentService.generatePdf(tenantId, {
|
|
6241
6456
|
bookingApplication: [applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.bookingApplication[0]]
|
|
6242
6457
|
}, generatePdfKeyForTL)).then(function (response) {
|
|
6243
|
-
const updatedApplication =
|
|
6458
|
+
const updatedApplication = {
|
|
6459
|
+
...(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.bookingApplication[0]),
|
|
6244
6460
|
permissionLetterFilestoreId: response === null || response === void 0 ? void 0 : response.filestoreIds[0]
|
|
6245
|
-
}
|
|
6461
|
+
};
|
|
6246
6462
|
return Promise.resolve(AdvertisementCreateApi.mutateAsync({
|
|
6247
6463
|
bookingApplication: updatedApplication
|
|
6248
6464
|
})).then(function () {
|
|
@@ -6318,9 +6534,10 @@ const SuccessfulPayment$1 = props => {
|
|
|
6318
6534
|
}, "advservice-receipt")).then(function (_Digit$PaymentService8) {
|
|
6319
6535
|
var _response;
|
|
6320
6536
|
response = _Digit$PaymentService8;
|
|
6321
|
-
const updatedApplication =
|
|
6537
|
+
const updatedApplication = {
|
|
6538
|
+
...(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.bookingApplication[0]),
|
|
6322
6539
|
paymentReceiptFilestoreId: (_response = response) === null || _response === void 0 ? void 0 : _response.filestoreIds[0]
|
|
6323
|
-
}
|
|
6540
|
+
};
|
|
6324
6541
|
return Promise.resolve(AdvertisementCreateApi.mutateAsync({
|
|
6325
6542
|
bookingApplication: updatedApplication
|
|
6326
6543
|
})).then(function () {
|
|
@@ -6368,9 +6585,10 @@ const SuccessfulPayment$1 = props => {
|
|
|
6368
6585
|
}, "chbservice-receipt")).then(function (_Digit$PaymentService9) {
|
|
6369
6586
|
var _response3;
|
|
6370
6587
|
response = _Digit$PaymentService9;
|
|
6371
|
-
const updatedApplication =
|
|
6588
|
+
const updatedApplication = {
|
|
6589
|
+
...(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.hallsBookingApplication[0]),
|
|
6372
6590
|
paymentReceiptFilestoreId: (_response3 = response) === null || _response3 === void 0 ? void 0 : _response3.filestoreIds[0]
|
|
6373
|
-
}
|
|
6591
|
+
};
|
|
6374
6592
|
return Promise.resolve(mutation.mutateAsync({
|
|
6375
6593
|
hallsBookingApplication: updatedApplication
|
|
6376
6594
|
})).then(function () {
|
|
@@ -6645,10 +6863,12 @@ const SuccessfulPayment$1 = props => {
|
|
|
6645
6863
|
};
|
|
6646
6864
|
const FailedPayment$1 = props => {
|
|
6647
6865
|
props.setLink("Response");
|
|
6648
|
-
const
|
|
6649
|
-
t
|
|
6650
|
-
|
|
6651
|
-
|
|
6866
|
+
const {
|
|
6867
|
+
t
|
|
6868
|
+
} = reactI18next.useTranslation();
|
|
6869
|
+
const {
|
|
6870
|
+
consumerCode
|
|
6871
|
+
} = reactRouterDom.useParams();
|
|
6652
6872
|
const getMessage = () => t("ES_PAYMENT_COLLECTED_ERROR");
|
|
6653
6873
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Banner, {
|
|
6654
6874
|
message: getMessage(),
|
|
@@ -6692,12 +6912,14 @@ const middleWare_3 = function (data, _break, _next) {
|
|
|
6692
6912
|
const _temp3 = function () {
|
|
6693
6913
|
if (data.b === "b") {
|
|
6694
6914
|
const _temp2 = _catch(function () {
|
|
6695
|
-
return Promise.resolve(window.fetch(
|
|
6915
|
+
return Promise.resolve(window.fetch(`https://ifsc.razorpay.com/hdfc0000090`)).then(function (res) {
|
|
6696
6916
|
const _temp = function () {
|
|
6697
6917
|
if (res.ok) {
|
|
6698
6918
|
return Promise.resolve(res.json()).then(function (_ref) {
|
|
6699
|
-
let
|
|
6700
|
-
|
|
6919
|
+
let {
|
|
6920
|
+
BANK,
|
|
6921
|
+
BRANCH
|
|
6922
|
+
} = _ref;
|
|
6701
6923
|
data.BANKFROMMiddleWare = BANK;
|
|
6702
6924
|
});
|
|
6703
6925
|
} else alert("Wrong IFSC Code");
|
|
@@ -6792,12 +7014,14 @@ const testForm = {
|
|
|
6792
7014
|
setBankDetailsFromIFSC: function (props) {
|
|
6793
7015
|
try {
|
|
6794
7016
|
const _temp6 = _catch(function () {
|
|
6795
|
-
return Promise.resolve(window.fetch(
|
|
7017
|
+
return Promise.resolve(window.fetch(`https://ifsc.razorpay.com/${props.getValues("ifsc")}`)).then(function (res) {
|
|
6796
7018
|
const _temp5 = function () {
|
|
6797
7019
|
if (res.ok) {
|
|
6798
7020
|
return Promise.resolve(res.json()).then(function (_ref2) {
|
|
6799
|
-
let
|
|
6800
|
-
|
|
7021
|
+
let {
|
|
7022
|
+
BANK,
|
|
7023
|
+
BRANCH
|
|
7024
|
+
} = _ref2;
|
|
6801
7025
|
props.setValue("bank", BANK);
|
|
6802
7026
|
props.setValue("branch", BRANCH);
|
|
6803
7027
|
});
|
|
@@ -6852,28 +7076,29 @@ const testForm = {
|
|
|
6852
7076
|
};
|
|
6853
7077
|
|
|
6854
7078
|
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
|
-
|
|
7079
|
+
const {
|
|
7080
|
+
stateCode
|
|
7081
|
+
} = props;
|
|
7082
|
+
const {
|
|
7083
|
+
moduleName,
|
|
7084
|
+
pageName
|
|
7085
|
+
} = reactRouterDom.useParams();
|
|
7086
|
+
const {
|
|
7087
|
+
t
|
|
7088
|
+
} = reactI18next.useTranslation();
|
|
7089
|
+
const [url, setUrl] = React.useState("");
|
|
7090
|
+
const [title, setTitle] = React.useState("");
|
|
7091
|
+
const {
|
|
7092
|
+
data,
|
|
7093
|
+
isLoading
|
|
7094
|
+
} = Digit.Hooks.dss.useMDMS(stateCode, "common-masters", ["uiCommonConstants"], {
|
|
7095
|
+
select: data => {
|
|
7096
|
+
var _data$commonMasters, _data$commonMasters$u;
|
|
7097
|
+
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]) || {};
|
|
7098
|
+
return formattedResponse;
|
|
7099
|
+
},
|
|
7100
|
+
enabled: true
|
|
7101
|
+
});
|
|
6877
7102
|
React.useEffect(() => {
|
|
6878
7103
|
var _data$moduleName, _data$moduleName$ifra;
|
|
6879
7104
|
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 +7106,7 @@ const IFrameInterface = props => {
|
|
|
6881
7106
|
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
7107
|
const contextPath = (pageObject === null || pageObject === void 0 ? void 0 : pageObject["routePath"]) || "";
|
|
6883
7108
|
const title = (pageObject === null || pageObject === void 0 ? void 0 : pageObject["title"]) || "";
|
|
6884
|
-
let url =
|
|
7109
|
+
let url = `${domain}${contextPath}`;
|
|
6885
7110
|
setUrl(url);
|
|
6886
7111
|
setTitle(title);
|
|
6887
7112
|
}, [data, moduleName, pageName]);
|
|
@@ -6903,15 +7128,18 @@ const IFrameInterface = props => {
|
|
|
6903
7128
|
digitUiLibraries.subFormRegistry === null || digitUiLibraries.subFormRegistry === void 0 ? void 0 : digitUiLibraries.subFormRegistry.addSubForm("testForm", testForm);
|
|
6904
7129
|
const EmployeePayment = _ref => {
|
|
6905
7130
|
var _location, _location$pathname, _location2, _location2$pathname;
|
|
6906
|
-
let
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
const
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
7131
|
+
let {
|
|
7132
|
+
stateCode,
|
|
7133
|
+
cityCode,
|
|
7134
|
+
moduleCode
|
|
7135
|
+
} = _ref;
|
|
7136
|
+
const {
|
|
7137
|
+
path: currentPath
|
|
7138
|
+
} = reactRouterDom.useRouteMatch();
|
|
7139
|
+
const {
|
|
7140
|
+
t
|
|
7141
|
+
} = reactI18next.useTranslation();
|
|
7142
|
+
const [link, setLink] = React.useState(null);
|
|
6915
7143
|
const commonProps = {
|
|
6916
7144
|
stateCode,
|
|
6917
7145
|
cityCode,
|
|
@@ -6968,29 +7196,32 @@ const EmployeePayment = _ref => {
|
|
|
6968
7196
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6969
7197
|
className: "employee-form-content"
|
|
6970
7198
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
6971
|
-
path: currentPath
|
|
7199
|
+
path: `${currentPath}/collect/:businessService/:consumerCode`
|
|
6972
7200
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|
|
6973
7201
|
layoutClass: "action"
|
|
6974
7202
|
}, /*#__PURE__*/React__default.createElement(CollectPayment, _extends({}, commonProps, {
|
|
6975
7203
|
basePath: currentPath
|
|
6976
7204
|
})))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
6977
|
-
path: currentPath
|
|
7205
|
+
path: `${currentPath}/success/:businessService/:receiptNumber/:consumerCode`
|
|
6978
7206
|
}, /*#__PURE__*/React__default.createElement(SuccessfulPayment$1, commonProps)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
6979
|
-
path: currentPath
|
|
7207
|
+
path: `${currentPath}/integration/:moduleName/:pageName`
|
|
6980
7208
|
}, /*#__PURE__*/React__default.createElement(IFrameInterface, commonProps)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
6981
|
-
path: currentPath
|
|
7209
|
+
path: `${currentPath}/failure`
|
|
6982
7210
|
}, /*#__PURE__*/React__default.createElement(FailedPayment$1, commonProps)))))));
|
|
6983
7211
|
};
|
|
6984
7212
|
|
|
6985
7213
|
const PaymentModule = _ref => {
|
|
6986
|
-
let
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
7214
|
+
let {
|
|
7215
|
+
deltaConfig = {},
|
|
7216
|
+
stateCode,
|
|
7217
|
+
cityCode,
|
|
7218
|
+
moduleCode = "Payment",
|
|
7219
|
+
userType
|
|
7220
|
+
} = _ref;
|
|
7221
|
+
const {
|
|
7222
|
+
path,
|
|
7223
|
+
url
|
|
7224
|
+
} = reactRouterDom.useRouteMatch();
|
|
6994
7225
|
const store = {
|
|
6995
7226
|
data: {}
|
|
6996
7227
|
};
|
|
@@ -7013,7 +7244,9 @@ const PaymentModule = _ref => {
|
|
|
7013
7244
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, getPaymentHome());
|
|
7014
7245
|
};
|
|
7015
7246
|
const PaymentLinks = _ref2 => {
|
|
7016
|
-
const
|
|
7247
|
+
const {
|
|
7248
|
+
t
|
|
7249
|
+
} = reactI18next.useTranslation();
|
|
7017
7250
|
return null;
|
|
7018
7251
|
};
|
|
7019
7252
|
const paymentConfigs = {
|