@djb25/digit-ui-module-commonpt 1.0.18 → 1.0.19
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 +149 -54
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +149 -54
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12210,12 +12210,12 @@ const ActionModal$5 = _ref => {
|
|
|
12210
12210
|
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat7 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat7 !== void 0 && _parsedAdhocRebateDat7.adhocRebate) applicationData.additionalDetails.adhocRebate = parseInt(parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat8 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat8 === void 0 ? void 0 : _parsedAdhocRebateDat8.adhocRebate) || "";
|
|
12211
12211
|
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat9 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat9 !== void 0 && _parsedAdhocRebateDat9.adhocRebateComment) applicationData.additionalDetails.adhocRebateComment = (parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat0 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat0 === void 0 ? void 0 : _parsedAdhocRebateDat0.adhocRebateComment) || "";
|
|
12212
12212
|
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat1 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat1 !== void 0 && _parsedAdhocRebateDat1.adhocRebateReason) applicationData.additionalDetails.adhocRebateReason = (parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat10 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat10 === void 0 ? void 0 : _parsedAdhocRebateDat10.adhocRebateReason) || "";
|
|
12213
|
-
const
|
|
12214
|
-
if (
|
|
12213
|
+
const inspectionInformationData = sessionStorage.getItem("Digit.INSPECTION_INFORMATION_DATA");
|
|
12214
|
+
if (inspectionInformationData) {
|
|
12215
12215
|
try {
|
|
12216
|
-
applicationData.
|
|
12216
|
+
applicationData.inspectionInformation = JSON.parse(inspectionInformationData);
|
|
12217
12217
|
} catch (e) {
|
|
12218
|
-
console.error("Error parsing
|
|
12218
|
+
console.error("Error parsing inspection information data", e);
|
|
12219
12219
|
}
|
|
12220
12220
|
}
|
|
12221
12221
|
((_applicationData12 = applicationData) === null || _applicationData12 === void 0 ? void 0 : _applicationData12.serviceType) == "WATER" ? submitAction({
|
|
@@ -15444,19 +15444,23 @@ const WSFeeEstimation = _ref => {
|
|
|
15444
15444
|
var _wsAdditionalDetails$2, _wsAdditionalDetails$3, _sessionFormData$bill;
|
|
15445
15445
|
const data = _extends({}, wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$2 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$2 === void 0 ? void 0 : (_wsAdditionalDetails$3 = _wsAdditionalDetails$2.appDetails) === null || _wsAdditionalDetails$3 === void 0 ? void 0 : _wsAdditionalDetails$3.additionalDetails);
|
|
15446
15446
|
if ((sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill = sessionFormData.billDetails) === null || _sessionFormData$bill === void 0 ? void 0 : _sessionFormData$bill.length) > 0) {
|
|
15447
|
-
var _sessionFormData$bill2, _sessionFormData$bill3, _sessionFormData$bill4, _sessionFormData$bill5, _sessionFormData$bill6, _sessionFormData$bill7, _sessionFormData$bill8;
|
|
15448
|
-
const
|
|
15447
|
+
var _sessionFormData$bill2, _sessionFormData$bill3, _sessionFormData$bill4, _sessionFormData$bill5, _sessionFormData$bill6, _sessionFormData$bill7, _sessionFormData$bill8, _sessionFormData$bill9, _sessionFormData$bill0;
|
|
15448
|
+
const billAccountDetails = (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill2 = sessionFormData.billDetails) === null || _sessionFormData$bill2 === void 0 ? void 0 : (_sessionFormData$bill3 = _sessionFormData$bill2[0]) === null || _sessionFormData$bill3 === void 0 ? void 0 : _sessionFormData$bill3.billAccountDetails) || [];
|
|
15449
|
+
const values = billAccountDetails.length > 0 ? billAccountDetails.map(bill => ({
|
|
15450
|
+
title: bill === null || bill === void 0 ? void 0 : bill.taxHeadCode,
|
|
15451
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number(bill === null || bill === void 0 ? void 0 : bill.amount).toFixed(2))
|
|
15452
|
+
})) : [{
|
|
15449
15453
|
title: "WS_APPLICATION_FEE_HEADER",
|
|
15450
|
-
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15454
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill4 = sessionFormData.billDetails) === null || _sessionFormData$bill4 === void 0 ? void 0 : (_sessionFormData$bill5 = _sessionFormData$bill4[0]) === null || _sessionFormData$bill5 === void 0 ? void 0 : _sessionFormData$bill5.fee)
|
|
15451
15455
|
}, {
|
|
15452
15456
|
title: "WS_SERVICE_FEE_HEADER",
|
|
15453
|
-
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15457
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill6 = sessionFormData.billDetails) === null || _sessionFormData$bill6 === void 0 ? void 0 : (_sessionFormData$bill7 = _sessionFormData$bill6[0]) === null || _sessionFormData$bill7 === void 0 ? void 0 : _sessionFormData$bill7.charge)
|
|
15454
15458
|
}, {
|
|
15455
15459
|
title: "WS_TAX_HEADER",
|
|
15456
|
-
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15460
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill8 = sessionFormData.billDetails) === null || _sessionFormData$bill8 === void 0 ? void 0 : (_sessionFormData$bill9 = _sessionFormData$bill8[0]) === null || _sessionFormData$bill9 === void 0 ? void 0 : _sessionFormData$bill9.taxAmount)
|
|
15457
15461
|
}];
|
|
15458
15462
|
setValues(values);
|
|
15459
|
-
setBillDetails(sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15463
|
+
setBillDetails(sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill0 = sessionFormData.billDetails) === null || _sessionFormData$bill0 === void 0 ? void 0 : _sessionFormData$bill0[0]);
|
|
15460
15464
|
} else {
|
|
15461
15465
|
setSessionFormData(data);
|
|
15462
15466
|
setFields(data);
|
|
@@ -15520,24 +15524,28 @@ const WSFeeEstimation = _ref => {
|
|
|
15520
15524
|
};
|
|
15521
15525
|
let businessService = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$16 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$16 === void 0 ? void 0 : (_wsAdditionalDetails$17 = _wsAdditionalDetails$16.appDetails) === null || _wsAdditionalDetails$17 === void 0 ? void 0 : _wsAdditionalDetails$17.service) == "WATER" ? "WS" : "SW";
|
|
15522
15526
|
Digit.WSService.wsCalculationEstimate(data, businessService).then((result, err) => {
|
|
15523
|
-
var _result$Calculation, _result$Calculation$, _result$Calculation$$, _result$Calculation3, _result$Calculation3$, _result$Calculation4, _result$Calculation4$, _result$Calculation5, _result$Calculation5$, _result$Calculation6, _result$Calculation6$, _result$Calculation7;
|
|
15527
|
+
var _result$Calculation, _result$Calculation$, _result$Calculation$$, _result$Calculation3, _result$Calculation3$, _result$Calculation4, _result$Calculation4$, _result$Calculation5, _result$Calculation5$, _result$Calculation6, _result$Calculation6$, _result$Calculation7, _result$Calculation7$, _result$Calculation8;
|
|
15524
15528
|
if ((result === null || result === void 0 ? void 0 : (_result$Calculation = result.Calculation) === null || _result$Calculation === void 0 ? void 0 : (_result$Calculation$ = _result$Calculation[0]) === null || _result$Calculation$ === void 0 ? void 0 : (_result$Calculation$$ = _result$Calculation$.taxHeadEstimates) === null || _result$Calculation$$ === void 0 ? void 0 : _result$Calculation$$.length) > 0) {
|
|
15525
15529
|
var _result$Calculation2, _result$Calculation2$, _result$Calculation2$2;
|
|
15526
15530
|
result === null || result === void 0 ? void 0 : (_result$Calculation2 = result.Calculation) === null || _result$Calculation2 === void 0 ? void 0 : (_result$Calculation2$ = _result$Calculation2[0]) === null || _result$Calculation2$ === void 0 ? void 0 : (_result$Calculation2$2 = _result$Calculation2$.taxHeadEstimates) === null || _result$Calculation2$2 === void 0 ? void 0 : _result$Calculation2$2.forEach(data => data.amount = data.estimateAmount);
|
|
15527
15531
|
}
|
|
15528
15532
|
result.Calculation[0].billSlabData = _.groupBy(result === null || result === void 0 ? void 0 : (_result$Calculation3 = result.Calculation) === null || _result$Calculation3 === void 0 ? void 0 : (_result$Calculation3$ = _result$Calculation3[0]) === null || _result$Calculation3$ === void 0 ? void 0 : _result$Calculation3$.taxHeadEstimates, "category");
|
|
15529
|
-
const
|
|
15533
|
+
const taxHeadEstimates = (result === null || result === void 0 ? void 0 : (_result$Calculation4 = result.Calculation) === null || _result$Calculation4 === void 0 ? void 0 : (_result$Calculation4$ = _result$Calculation4[0]) === null || _result$Calculation4$ === void 0 ? void 0 : _result$Calculation4$.taxHeadEstimates) || [];
|
|
15534
|
+
const values = taxHeadEstimates.length > 0 ? taxHeadEstimates.map(data => ({
|
|
15535
|
+
title: data === null || data === void 0 ? void 0 : data.taxHeadCode,
|
|
15536
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.estimateAmount).toFixed(2))
|
|
15537
|
+
})) : [{
|
|
15530
15538
|
title: "WS_APPLICATION_FEE_HEADER",
|
|
15531
|
-
value: (_result$
|
|
15539
|
+
value: (_result$Calculation5 = result.Calculation) === null || _result$Calculation5 === void 0 ? void 0 : (_result$Calculation5$ = _result$Calculation5[0]) === null || _result$Calculation5$ === void 0 ? void 0 : _result$Calculation5$.fee
|
|
15532
15540
|
}, {
|
|
15533
15541
|
title: "WS_SERVICE_FEE_HEADER",
|
|
15534
|
-
value: (_result$
|
|
15542
|
+
value: (_result$Calculation6 = result.Calculation) === null || _result$Calculation6 === void 0 ? void 0 : (_result$Calculation6$ = _result$Calculation6[0]) === null || _result$Calculation6$ === void 0 ? void 0 : _result$Calculation6$.charge
|
|
15535
15543
|
}, {
|
|
15536
15544
|
title: "WS_TAX_HEADER",
|
|
15537
|
-
value: (_result$
|
|
15545
|
+
value: (_result$Calculation7 = result.Calculation) === null || _result$Calculation7 === void 0 ? void 0 : (_result$Calculation7$ = _result$Calculation7[0]) === null || _result$Calculation7$ === void 0 ? void 0 : _result$Calculation7$.taxAmount
|
|
15538
15546
|
}];
|
|
15539
15547
|
setSessionBillFormData(cloneDeep_1(result.Calculation[0]));
|
|
15540
|
-
setBillDetails(result === null || result === void 0 ? void 0 : (_result$
|
|
15548
|
+
setBillDetails(result === null || result === void 0 ? void 0 : (_result$Calculation8 = result.Calculation) === null || _result$Calculation8 === void 0 ? void 0 : _result$Calculation8[0]);
|
|
15541
15549
|
setValues(values);
|
|
15542
15550
|
fields.billDetails = result === null || result === void 0 ? void 0 : result.Calculation;
|
|
15543
15551
|
setSessionFormData(fields);
|
|
@@ -15607,7 +15615,7 @@ const WSFeeEstimation = _ref => {
|
|
|
15607
15615
|
className: "border-none",
|
|
15608
15616
|
key: "WS_COMMON_TOTAL_AMT",
|
|
15609
15617
|
label: "" + t("WS_COMMON_TOTAL_AMT"),
|
|
15610
|
-
text: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", (billDetails === null || billDetails === void 0 ? void 0 : billDetails.totalAmount)
|
|
15618
|
+
text: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", billDetails !== null && billDetails !== void 0 && billDetails.totalAmount ? Number(billDetails === null || billDetails === void 0 ? void 0 : billDetails.totalAmount).toFixed(2) : "0.00"),
|
|
15611
15619
|
textStyle: {
|
|
15612
15620
|
fontSize: "24px",
|
|
15613
15621
|
fontWeight: "700"
|
|
@@ -16297,36 +16305,65 @@ const DueVerification = _ref => {
|
|
|
16297
16305
|
const _useState = React.useState(""),
|
|
16298
16306
|
kno = _useState[0],
|
|
16299
16307
|
setKno = _useState[1];
|
|
16300
|
-
const _useState2 = React.useState(
|
|
16301
|
-
|
|
16302
|
-
|
|
16303
|
-
const
|
|
16304
|
-
|
|
16305
|
-
|
|
16306
|
-
|
|
16307
|
-
|
|
16308
|
-
|
|
16309
|
-
|
|
16310
|
-
|
|
16311
|
-
|
|
16312
|
-
|
|
16313
|
-
|
|
16314
|
-
accessor: "dueAmount"
|
|
16315
|
-
}, {
|
|
16316
|
-
Header: t("Total Amount"),
|
|
16317
|
-
accessor: "totalAmount"
|
|
16318
|
-
}], [t]);
|
|
16319
|
-
React.useEffect(() => {
|
|
16320
|
-
const savedData = sessionStorage.getItem("Digit.DUE_VERIFICATION_DATA");
|
|
16321
|
-
if (savedData) {
|
|
16322
|
-
try {
|
|
16323
|
-
setTableData(JSON.parse(savedData));
|
|
16324
|
-
} catch (e) {
|
|
16325
|
-
console.error("Error parsing due verification data", e);
|
|
16308
|
+
const _useState2 = React.useState(""),
|
|
16309
|
+
remarks = _useState2[0],
|
|
16310
|
+
setRemarks = _useState2[1];
|
|
16311
|
+
const _useState3 = React.useState([]),
|
|
16312
|
+
tableData = _useState3[0],
|
|
16313
|
+
setTableData = _useState3[1];
|
|
16314
|
+
const handleRemarkChange = React__default.useCallback((index, value) => {
|
|
16315
|
+
setTableData(prevData => {
|
|
16316
|
+
const newData = [...prevData];
|
|
16317
|
+
newData[index] = _extends({}, newData[index], {
|
|
16318
|
+
remarks: value
|
|
16319
|
+
});
|
|
16320
|
+
if (applicationData) {
|
|
16321
|
+
applicationData.dueVerification = newData;
|
|
16326
16322
|
}
|
|
16327
|
-
|
|
16323
|
+
return newData;
|
|
16324
|
+
});
|
|
16325
|
+
}, [applicationData]);
|
|
16326
|
+
const isPendingApproval = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_APPROVAL_FOR_CONNECTION";
|
|
16327
|
+
const columns = React.useMemo(() => {
|
|
16328
|
+
const baseColumns = [{
|
|
16329
|
+
Header: t("K No."),
|
|
16330
|
+
accessor: "kno"
|
|
16331
|
+
}, {
|
|
16332
|
+
Header: t("Full Name"),
|
|
16333
|
+
accessor: "fullName"
|
|
16334
|
+
}, {
|
|
16335
|
+
Header: t("Full Address"),
|
|
16336
|
+
accessor: "fullAddress"
|
|
16337
|
+
}, {
|
|
16338
|
+
Header: t("Due Amount"),
|
|
16339
|
+
accessor: "dueAmount"
|
|
16340
|
+
}, {
|
|
16341
|
+
Header: t("Total Amount"),
|
|
16342
|
+
accessor: "totalAmount"
|
|
16343
|
+
}];
|
|
16344
|
+
if (isPendingApproval) {
|
|
16345
|
+
baseColumns.push({
|
|
16346
|
+
Header: t("Remarks"),
|
|
16347
|
+
accessor: "remarks",
|
|
16348
|
+
Cell: _ref2 => {
|
|
16349
|
+
let row = _ref2.row,
|
|
16350
|
+
value = _ref2.value;
|
|
16351
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
16352
|
+
style: {
|
|
16353
|
+
marginBottom: "0px",
|
|
16354
|
+
minWidth: "150px"
|
|
16355
|
+
},
|
|
16356
|
+
value: value || "",
|
|
16357
|
+
onChange: e => handleRemarkChange(row.index, e.target.value)
|
|
16358
|
+
});
|
|
16359
|
+
}
|
|
16360
|
+
});
|
|
16361
|
+
}
|
|
16362
|
+
return baseColumns;
|
|
16363
|
+
}, [t, handleRemarkChange, isPendingApproval]);
|
|
16364
|
+
React.useEffect(() => {
|
|
16365
|
+
if (applicationData !== null && applicationData !== void 0 && applicationData.dueVerification && Array.isArray(applicationData.dueVerification)) {
|
|
16328
16366
|
setTableData(applicationData.dueVerification);
|
|
16329
|
-
sessionStorage.setItem("Digit.DUE_VERIFICATION_DATA", JSON.stringify(applicationData.dueVerification));
|
|
16330
16367
|
}
|
|
16331
16368
|
}, [applicationData]);
|
|
16332
16369
|
const handleAdd = () => {
|
|
@@ -16336,12 +16373,16 @@ const DueVerification = _ref => {
|
|
|
16336
16373
|
fullName: "John Doe",
|
|
16337
16374
|
fullAddress: "123 Main St, New Delhi, Delhi 110001",
|
|
16338
16375
|
dueAmount: "1500",
|
|
16339
|
-
totalAmount: "1500"
|
|
16376
|
+
totalAmount: "1500",
|
|
16377
|
+
remarks: remarks
|
|
16340
16378
|
};
|
|
16341
16379
|
const newTableData = [...tableData, mockData];
|
|
16342
16380
|
setTableData(newTableData);
|
|
16343
|
-
|
|
16381
|
+
if (applicationData) {
|
|
16382
|
+
applicationData.dueVerification = newTableData;
|
|
16383
|
+
}
|
|
16344
16384
|
setKno("");
|
|
16385
|
+
setRemarks("");
|
|
16345
16386
|
}
|
|
16346
16387
|
};
|
|
16347
16388
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -16423,7 +16464,8 @@ const DueVerification = _ref => {
|
|
|
16423
16464
|
})));
|
|
16424
16465
|
};
|
|
16425
16466
|
|
|
16426
|
-
const InspectionInformation =
|
|
16467
|
+
const InspectionInformation = _ref => {
|
|
16468
|
+
let applicationData = _ref.applicationData;
|
|
16427
16469
|
const _useTranslation = reactI18next.useTranslation(),
|
|
16428
16470
|
t = _useTranslation.t;
|
|
16429
16471
|
const _useState = React.useState(null),
|
|
@@ -16435,9 +16477,37 @@ const InspectionInformation = () => {
|
|
|
16435
16477
|
const _useState3 = React.useState(""),
|
|
16436
16478
|
inspectorName = _useState3[0],
|
|
16437
16479
|
setInspectorName = _useState3[1];
|
|
16480
|
+
React.useEffect(() => {
|
|
16481
|
+
const savedData = sessionStorage.getItem("Digit.INSPECTION_INFORMATION_DATA");
|
|
16482
|
+
if (savedData) {
|
|
16483
|
+
try {
|
|
16484
|
+
const parsed = JSON.parse(savedData);
|
|
16485
|
+
setInspectionType(parsed.inspectionType || null);
|
|
16486
|
+
setInspectionDate(parsed.inspectionDate || "");
|
|
16487
|
+
setInspectorName(parsed.inspectorName || "");
|
|
16488
|
+
} catch (e) {
|
|
16489
|
+
console.error("Error parsing inspection information data", e);
|
|
16490
|
+
}
|
|
16491
|
+
} else if (applicationData !== null && applicationData !== void 0 && applicationData.inspectionInformation) {
|
|
16492
|
+
setInspectionType(applicationData.inspectionInformation.inspectionType || null);
|
|
16493
|
+
setInspectionDate(applicationData.inspectionInformation.inspectionDate || "");
|
|
16494
|
+
setInspectorName(applicationData.inspectionInformation.inspectorName || "");
|
|
16495
|
+
sessionStorage.setItem("Digit.INSPECTION_INFORMATION_DATA", JSON.stringify(applicationData.inspectionInformation));
|
|
16496
|
+
}
|
|
16497
|
+
}, [applicationData]);
|
|
16498
|
+
React.useEffect(() => {
|
|
16499
|
+
sessionStorage.setItem("Digit.INSPECTION_INFORMATION_DATA", JSON.stringify({
|
|
16500
|
+
inspectionType,
|
|
16501
|
+
inspectionDate,
|
|
16502
|
+
inspectorName
|
|
16503
|
+
}));
|
|
16504
|
+
}, [inspectionType, inspectionDate, inspectorName]);
|
|
16438
16505
|
const inspectionTypeOptions = [{
|
|
16439
|
-
|
|
16506
|
+
i18nKey: "ES_COMMON_SELECT",
|
|
16440
16507
|
code: ""
|
|
16508
|
+
}, {
|
|
16509
|
+
i18nKey: "New Connection Visit",
|
|
16510
|
+
code: "new_connection_visit"
|
|
16441
16511
|
}];
|
|
16442
16512
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
16443
16513
|
style: {
|
|
@@ -16473,7 +16543,7 @@ const InspectionInformation = () => {
|
|
|
16473
16543
|
}
|
|
16474
16544
|
}, "*")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
16475
16545
|
option: inspectionTypeOptions,
|
|
16476
|
-
optionKey: "
|
|
16546
|
+
optionKey: "i18nKey",
|
|
16477
16547
|
id: "inspectionType",
|
|
16478
16548
|
selected: inspectionType,
|
|
16479
16549
|
select: setInspectionType,
|
|
@@ -17448,6 +17518,14 @@ const ApplicationDetails = props => {
|
|
|
17448
17518
|
function onActionSelect(action) {
|
|
17449
17519
|
sessionStorage.setItem("SELECTED_ACTION", action === null || action === void 0 ? void 0 : action.action);
|
|
17450
17520
|
if (action) {
|
|
17521
|
+
if ((action === null || action === void 0 ? void 0 : action.action) === "PAY" && !(action !== null && action !== void 0 && action.redirectionUrl) && !(action !== null && action !== void 0 && action.redirectionUrll)) {
|
|
17522
|
+
if (window.location.href.includes("/employee")) {
|
|
17523
|
+
history.push("/digit-ui/employee/payment/collect/" + businessService + "/" + applicationNumber + "?tenantId=" + tenantId);
|
|
17524
|
+
} else {
|
|
17525
|
+
history.push("/digit-ui/citizen/payment/my-bills/" + businessService + "/" + applicationNumber + "?tenantId=" + tenantId);
|
|
17526
|
+
}
|
|
17527
|
+
return;
|
|
17528
|
+
}
|
|
17451
17529
|
if (action !== null && action !== void 0 && action.isToast) {
|
|
17452
17530
|
setShowToast({
|
|
17453
17531
|
key: "error",
|
|
@@ -18316,7 +18394,6 @@ const PropertyLocationDetails = _ref => {
|
|
|
18316
18394
|
isEdit = _ref.isEdit,
|
|
18317
18395
|
onSelect = _ref.onSelect,
|
|
18318
18396
|
config = _ref.config,
|
|
18319
|
-
hideZRO = _ref.hideZRO,
|
|
18320
18397
|
formDataProp = _ref.formData,
|
|
18321
18398
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
18322
18399
|
const _useTranslation = reactI18next.useTranslation(),
|
|
@@ -18450,7 +18527,6 @@ const PropertyLocationDetails = _ref => {
|
|
|
18450
18527
|
isCollapsible: true
|
|
18451
18528
|
}, config),
|
|
18452
18529
|
isEdit: isEdit,
|
|
18453
|
-
showZRO: hideZRO ? false : true,
|
|
18454
18530
|
showMapActualLocation: true,
|
|
18455
18531
|
disable: isPropertyFound,
|
|
18456
18532
|
hideNextButton: true
|
|
@@ -18990,6 +19066,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
18990
19066
|
const watchCategoryType = watch("useDetails.categoryType");
|
|
18991
19067
|
const watchPropertyType = watch("useDetails.propertyType");
|
|
18992
19068
|
const watchPropertyCategory = watch("useDetails.propertyCategory");
|
|
19069
|
+
const watchWaterConnectionUsageType = watch("useDetails.WaterConnectionUsageType");
|
|
18993
19070
|
const isHospitalProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOSPITAL_NURSING_HOME" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HospitalNursingHome";
|
|
18994
19071
|
const isHotelRestaurantProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOTEL_OR_RESTAURANT" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HotelOrRestaurant";
|
|
18995
19072
|
const yearOptions = React.useMemo(() => {
|
|
@@ -19049,11 +19126,29 @@ const PropertyWaterConnection = _ref => {
|
|
|
19049
19126
|
}, [watchPropertyCategory, propertyTypeOptions, setValue, watchPropertyType]);
|
|
19050
19127
|
const usageTypeOptions = React.useMemo(() => {
|
|
19051
19128
|
var _ptServicesMastersDat5, _ptServicesMastersDat6;
|
|
19052
|
-
|
|
19129
|
+
let options = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat5 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat5 === void 0 ? void 0 : (_ptServicesMastersDat6 = _ptServicesMastersDat5.PropertyNewUsageType) === null || _ptServicesMastersDat6 === void 0 ? void 0 : _ptServicesMastersDat6.filter(item => item.active)) || [];
|
|
19130
|
+
if (watchPropertyCategory !== null && watchPropertyCategory !== void 0 && watchPropertyCategory.code) {
|
|
19131
|
+
var _watchPropertyCategor3;
|
|
19132
|
+
if ((watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : (_watchPropertyCategor3 = watchPropertyCategory.code) === null || _watchPropertyCategor3 === void 0 ? void 0 : _watchPropertyCategor3.toUpperCase()) !== "MIXED") {
|
|
19133
|
+
options = options.filter(item => {
|
|
19134
|
+
var _item$type2, _watchPropertyCategor4;
|
|
19135
|
+
return ((_item$type2 = item.type) === null || _item$type2 === void 0 ? void 0 : _item$type2.toUpperCase()) === ((_watchPropertyCategor4 = watchPropertyCategory.code) === null || _watchPropertyCategor4 === void 0 ? void 0 : _watchPropertyCategor4.toUpperCase());
|
|
19136
|
+
});
|
|
19137
|
+
}
|
|
19138
|
+
}
|
|
19139
|
+
return options.map(item => ({
|
|
19053
19140
|
code: item.code,
|
|
19054
19141
|
name: item.name
|
|
19055
19142
|
}));
|
|
19056
|
-
}, [ptServicesMastersData]);
|
|
19143
|
+
}, [ptServicesMastersData, watchPropertyCategory]);
|
|
19144
|
+
React.useEffect(() => {
|
|
19145
|
+
if (watchPropertyType && watchWaterConnectionUsageType) {
|
|
19146
|
+
const isUsageTypeValid = usageTypeOptions.some(opt => opt.code === watchWaterConnectionUsageType.code);
|
|
19147
|
+
if (!isUsageTypeValid) {
|
|
19148
|
+
setValue("useDetails.WaterConnectionUsageType", null);
|
|
19149
|
+
}
|
|
19150
|
+
}
|
|
19151
|
+
}, [watchPropertyType, usageTypeOptions, setValue, watchWaterConnectionUsageType]);
|
|
19057
19152
|
const floorOptions = React.useMemo(() => {
|
|
19058
19153
|
var _ptServicesMastersDat7, _ptServicesMastersDat8;
|
|
19059
19154
|
return ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat7 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat7 === void 0 ? void 0 : (_ptServicesMastersDat8 = _ptServicesMastersDat7.NoOfFloors) === null || _ptServicesMastersDat8 === void 0 ? void 0 : _ptServicesMastersDat8.filter(item => item.active).map(item => ({
|