@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.modern.js
CHANGED
|
@@ -12207,12 +12207,12 @@ const ActionModal$5 = _ref => {
|
|
|
12207
12207
|
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) || "";
|
|
12208
12208
|
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) || "";
|
|
12209
12209
|
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) || "";
|
|
12210
|
-
const
|
|
12211
|
-
if (
|
|
12210
|
+
const inspectionInformationData = sessionStorage.getItem("Digit.INSPECTION_INFORMATION_DATA");
|
|
12211
|
+
if (inspectionInformationData) {
|
|
12212
12212
|
try {
|
|
12213
|
-
applicationData.
|
|
12213
|
+
applicationData.inspectionInformation = JSON.parse(inspectionInformationData);
|
|
12214
12214
|
} catch (e) {
|
|
12215
|
-
console.error("Error parsing
|
|
12215
|
+
console.error("Error parsing inspection information data", e);
|
|
12216
12216
|
}
|
|
12217
12217
|
}
|
|
12218
12218
|
((_applicationData12 = applicationData) === null || _applicationData12 === void 0 ? void 0 : _applicationData12.serviceType) == "WATER" ? submitAction({
|
|
@@ -15441,19 +15441,23 @@ const WSFeeEstimation = _ref => {
|
|
|
15441
15441
|
var _wsAdditionalDetails$2, _wsAdditionalDetails$3, _sessionFormData$bill;
|
|
15442
15442
|
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);
|
|
15443
15443
|
if ((sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill = sessionFormData.billDetails) === null || _sessionFormData$bill === void 0 ? void 0 : _sessionFormData$bill.length) > 0) {
|
|
15444
|
-
var _sessionFormData$bill2, _sessionFormData$bill3, _sessionFormData$bill4, _sessionFormData$bill5, _sessionFormData$bill6, _sessionFormData$bill7, _sessionFormData$bill8;
|
|
15445
|
-
const
|
|
15444
|
+
var _sessionFormData$bill2, _sessionFormData$bill3, _sessionFormData$bill4, _sessionFormData$bill5, _sessionFormData$bill6, _sessionFormData$bill7, _sessionFormData$bill8, _sessionFormData$bill9, _sessionFormData$bill0;
|
|
15445
|
+
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) || [];
|
|
15446
|
+
const values = billAccountDetails.length > 0 ? billAccountDetails.map(bill => ({
|
|
15447
|
+
title: bill === null || bill === void 0 ? void 0 : bill.taxHeadCode,
|
|
15448
|
+
value: /*#__PURE__*/React.createElement("span", null, "\u20B9", Number(bill === null || bill === void 0 ? void 0 : bill.amount).toFixed(2))
|
|
15449
|
+
})) : [{
|
|
15446
15450
|
title: "WS_APPLICATION_FEE_HEADER",
|
|
15447
|
-
value: /*#__PURE__*/React.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15451
|
+
value: /*#__PURE__*/React.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)
|
|
15448
15452
|
}, {
|
|
15449
15453
|
title: "WS_SERVICE_FEE_HEADER",
|
|
15450
|
-
value: /*#__PURE__*/React.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15454
|
+
value: /*#__PURE__*/React.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)
|
|
15451
15455
|
}, {
|
|
15452
15456
|
title: "WS_TAX_HEADER",
|
|
15453
|
-
value: /*#__PURE__*/React.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15457
|
+
value: /*#__PURE__*/React.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)
|
|
15454
15458
|
}];
|
|
15455
15459
|
setValues(values);
|
|
15456
|
-
setBillDetails(sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15460
|
+
setBillDetails(sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill0 = sessionFormData.billDetails) === null || _sessionFormData$bill0 === void 0 ? void 0 : _sessionFormData$bill0[0]);
|
|
15457
15461
|
} else {
|
|
15458
15462
|
setSessionFormData(data);
|
|
15459
15463
|
setFields(data);
|
|
@@ -15517,24 +15521,28 @@ const WSFeeEstimation = _ref => {
|
|
|
15517
15521
|
};
|
|
15518
15522
|
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";
|
|
15519
15523
|
Digit.WSService.wsCalculationEstimate(data, businessService).then((result, err) => {
|
|
15520
|
-
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;
|
|
15524
|
+
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;
|
|
15521
15525
|
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) {
|
|
15522
15526
|
var _result$Calculation2, _result$Calculation2$, _result$Calculation2$2;
|
|
15523
15527
|
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);
|
|
15524
15528
|
}
|
|
15525
15529
|
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");
|
|
15526
|
-
const
|
|
15530
|
+
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) || [];
|
|
15531
|
+
const values = taxHeadEstimates.length > 0 ? taxHeadEstimates.map(data => ({
|
|
15532
|
+
title: data === null || data === void 0 ? void 0 : data.taxHeadCode,
|
|
15533
|
+
value: /*#__PURE__*/React.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.estimateAmount).toFixed(2))
|
|
15534
|
+
})) : [{
|
|
15527
15535
|
title: "WS_APPLICATION_FEE_HEADER",
|
|
15528
|
-
value: (_result$
|
|
15536
|
+
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
|
|
15529
15537
|
}, {
|
|
15530
15538
|
title: "WS_SERVICE_FEE_HEADER",
|
|
15531
|
-
value: (_result$
|
|
15539
|
+
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
|
|
15532
15540
|
}, {
|
|
15533
15541
|
title: "WS_TAX_HEADER",
|
|
15534
|
-
value: (_result$
|
|
15542
|
+
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
|
|
15535
15543
|
}];
|
|
15536
15544
|
setSessionBillFormData(cloneDeep_1(result.Calculation[0]));
|
|
15537
|
-
setBillDetails(result === null || result === void 0 ? void 0 : (_result$
|
|
15545
|
+
setBillDetails(result === null || result === void 0 ? void 0 : (_result$Calculation8 = result.Calculation) === null || _result$Calculation8 === void 0 ? void 0 : _result$Calculation8[0]);
|
|
15538
15546
|
setValues(values);
|
|
15539
15547
|
fields.billDetails = result === null || result === void 0 ? void 0 : result.Calculation;
|
|
15540
15548
|
setSessionFormData(fields);
|
|
@@ -15604,7 +15612,7 @@ const WSFeeEstimation = _ref => {
|
|
|
15604
15612
|
className: "border-none",
|
|
15605
15613
|
key: "WS_COMMON_TOTAL_AMT",
|
|
15606
15614
|
label: "" + t("WS_COMMON_TOTAL_AMT"),
|
|
15607
|
-
text: /*#__PURE__*/React.createElement("span", null, "\u20B9", (billDetails === null || billDetails === void 0 ? void 0 : billDetails.totalAmount)
|
|
15615
|
+
text: /*#__PURE__*/React.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"),
|
|
15608
15616
|
textStyle: {
|
|
15609
15617
|
fontSize: "24px",
|
|
15610
15618
|
fontWeight: "700"
|
|
@@ -16294,36 +16302,65 @@ const DueVerification = _ref => {
|
|
|
16294
16302
|
const _useState = useState(""),
|
|
16295
16303
|
kno = _useState[0],
|
|
16296
16304
|
setKno = _useState[1];
|
|
16297
|
-
const _useState2 = useState(
|
|
16298
|
-
|
|
16299
|
-
|
|
16300
|
-
const
|
|
16301
|
-
|
|
16302
|
-
|
|
16303
|
-
|
|
16304
|
-
|
|
16305
|
-
|
|
16306
|
-
|
|
16307
|
-
|
|
16308
|
-
|
|
16309
|
-
|
|
16310
|
-
|
|
16311
|
-
accessor: "dueAmount"
|
|
16312
|
-
}, {
|
|
16313
|
-
Header: t("Total Amount"),
|
|
16314
|
-
accessor: "totalAmount"
|
|
16315
|
-
}], [t]);
|
|
16316
|
-
useEffect(() => {
|
|
16317
|
-
const savedData = sessionStorage.getItem("Digit.DUE_VERIFICATION_DATA");
|
|
16318
|
-
if (savedData) {
|
|
16319
|
-
try {
|
|
16320
|
-
setTableData(JSON.parse(savedData));
|
|
16321
|
-
} catch (e) {
|
|
16322
|
-
console.error("Error parsing due verification data", e);
|
|
16305
|
+
const _useState2 = useState(""),
|
|
16306
|
+
remarks = _useState2[0],
|
|
16307
|
+
setRemarks = _useState2[1];
|
|
16308
|
+
const _useState3 = useState([]),
|
|
16309
|
+
tableData = _useState3[0],
|
|
16310
|
+
setTableData = _useState3[1];
|
|
16311
|
+
const handleRemarkChange = React.useCallback((index, value) => {
|
|
16312
|
+
setTableData(prevData => {
|
|
16313
|
+
const newData = [...prevData];
|
|
16314
|
+
newData[index] = _extends({}, newData[index], {
|
|
16315
|
+
remarks: value
|
|
16316
|
+
});
|
|
16317
|
+
if (applicationData) {
|
|
16318
|
+
applicationData.dueVerification = newData;
|
|
16323
16319
|
}
|
|
16324
|
-
|
|
16320
|
+
return newData;
|
|
16321
|
+
});
|
|
16322
|
+
}, [applicationData]);
|
|
16323
|
+
const isPendingApproval = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_APPROVAL_FOR_CONNECTION";
|
|
16324
|
+
const columns = useMemo(() => {
|
|
16325
|
+
const baseColumns = [{
|
|
16326
|
+
Header: t("K No."),
|
|
16327
|
+
accessor: "kno"
|
|
16328
|
+
}, {
|
|
16329
|
+
Header: t("Full Name"),
|
|
16330
|
+
accessor: "fullName"
|
|
16331
|
+
}, {
|
|
16332
|
+
Header: t("Full Address"),
|
|
16333
|
+
accessor: "fullAddress"
|
|
16334
|
+
}, {
|
|
16335
|
+
Header: t("Due Amount"),
|
|
16336
|
+
accessor: "dueAmount"
|
|
16337
|
+
}, {
|
|
16338
|
+
Header: t("Total Amount"),
|
|
16339
|
+
accessor: "totalAmount"
|
|
16340
|
+
}];
|
|
16341
|
+
if (isPendingApproval) {
|
|
16342
|
+
baseColumns.push({
|
|
16343
|
+
Header: t("Remarks"),
|
|
16344
|
+
accessor: "remarks",
|
|
16345
|
+
Cell: _ref2 => {
|
|
16346
|
+
let row = _ref2.row,
|
|
16347
|
+
value = _ref2.value;
|
|
16348
|
+
return /*#__PURE__*/React.createElement(TextInput, {
|
|
16349
|
+
style: {
|
|
16350
|
+
marginBottom: "0px",
|
|
16351
|
+
minWidth: "150px"
|
|
16352
|
+
},
|
|
16353
|
+
value: value || "",
|
|
16354
|
+
onChange: e => handleRemarkChange(row.index, e.target.value)
|
|
16355
|
+
});
|
|
16356
|
+
}
|
|
16357
|
+
});
|
|
16358
|
+
}
|
|
16359
|
+
return baseColumns;
|
|
16360
|
+
}, [t, handleRemarkChange, isPendingApproval]);
|
|
16361
|
+
useEffect(() => {
|
|
16362
|
+
if (applicationData !== null && applicationData !== void 0 && applicationData.dueVerification && Array.isArray(applicationData.dueVerification)) {
|
|
16325
16363
|
setTableData(applicationData.dueVerification);
|
|
16326
|
-
sessionStorage.setItem("Digit.DUE_VERIFICATION_DATA", JSON.stringify(applicationData.dueVerification));
|
|
16327
16364
|
}
|
|
16328
16365
|
}, [applicationData]);
|
|
16329
16366
|
const handleAdd = () => {
|
|
@@ -16333,12 +16370,16 @@ const DueVerification = _ref => {
|
|
|
16333
16370
|
fullName: "John Doe",
|
|
16334
16371
|
fullAddress: "123 Main St, New Delhi, Delhi 110001",
|
|
16335
16372
|
dueAmount: "1500",
|
|
16336
|
-
totalAmount: "1500"
|
|
16373
|
+
totalAmount: "1500",
|
|
16374
|
+
remarks: remarks
|
|
16337
16375
|
};
|
|
16338
16376
|
const newTableData = [...tableData, mockData];
|
|
16339
16377
|
setTableData(newTableData);
|
|
16340
|
-
|
|
16378
|
+
if (applicationData) {
|
|
16379
|
+
applicationData.dueVerification = newTableData;
|
|
16380
|
+
}
|
|
16341
16381
|
setKno("");
|
|
16382
|
+
setRemarks("");
|
|
16342
16383
|
}
|
|
16343
16384
|
};
|
|
16344
16385
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -16420,7 +16461,8 @@ const DueVerification = _ref => {
|
|
|
16420
16461
|
})));
|
|
16421
16462
|
};
|
|
16422
16463
|
|
|
16423
|
-
const InspectionInformation =
|
|
16464
|
+
const InspectionInformation = _ref => {
|
|
16465
|
+
let applicationData = _ref.applicationData;
|
|
16424
16466
|
const _useTranslation = useTranslation(),
|
|
16425
16467
|
t = _useTranslation.t;
|
|
16426
16468
|
const _useState = useState(null),
|
|
@@ -16432,9 +16474,37 @@ const InspectionInformation = () => {
|
|
|
16432
16474
|
const _useState3 = useState(""),
|
|
16433
16475
|
inspectorName = _useState3[0],
|
|
16434
16476
|
setInspectorName = _useState3[1];
|
|
16477
|
+
useEffect(() => {
|
|
16478
|
+
const savedData = sessionStorage.getItem("Digit.INSPECTION_INFORMATION_DATA");
|
|
16479
|
+
if (savedData) {
|
|
16480
|
+
try {
|
|
16481
|
+
const parsed = JSON.parse(savedData);
|
|
16482
|
+
setInspectionType(parsed.inspectionType || null);
|
|
16483
|
+
setInspectionDate(parsed.inspectionDate || "");
|
|
16484
|
+
setInspectorName(parsed.inspectorName || "");
|
|
16485
|
+
} catch (e) {
|
|
16486
|
+
console.error("Error parsing inspection information data", e);
|
|
16487
|
+
}
|
|
16488
|
+
} else if (applicationData !== null && applicationData !== void 0 && applicationData.inspectionInformation) {
|
|
16489
|
+
setInspectionType(applicationData.inspectionInformation.inspectionType || null);
|
|
16490
|
+
setInspectionDate(applicationData.inspectionInformation.inspectionDate || "");
|
|
16491
|
+
setInspectorName(applicationData.inspectionInformation.inspectorName || "");
|
|
16492
|
+
sessionStorage.setItem("Digit.INSPECTION_INFORMATION_DATA", JSON.stringify(applicationData.inspectionInformation));
|
|
16493
|
+
}
|
|
16494
|
+
}, [applicationData]);
|
|
16495
|
+
useEffect(() => {
|
|
16496
|
+
sessionStorage.setItem("Digit.INSPECTION_INFORMATION_DATA", JSON.stringify({
|
|
16497
|
+
inspectionType,
|
|
16498
|
+
inspectionDate,
|
|
16499
|
+
inspectorName
|
|
16500
|
+
}));
|
|
16501
|
+
}, [inspectionType, inspectionDate, inspectorName]);
|
|
16435
16502
|
const inspectionTypeOptions = [{
|
|
16436
|
-
|
|
16503
|
+
i18nKey: "ES_COMMON_SELECT",
|
|
16437
16504
|
code: ""
|
|
16505
|
+
}, {
|
|
16506
|
+
i18nKey: "New Connection Visit",
|
|
16507
|
+
code: "new_connection_visit"
|
|
16438
16508
|
}];
|
|
16439
16509
|
return /*#__PURE__*/React.createElement("div", {
|
|
16440
16510
|
style: {
|
|
@@ -16470,7 +16540,7 @@ const InspectionInformation = () => {
|
|
|
16470
16540
|
}
|
|
16471
16541
|
}, "*")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
16472
16542
|
option: inspectionTypeOptions,
|
|
16473
|
-
optionKey: "
|
|
16543
|
+
optionKey: "i18nKey",
|
|
16474
16544
|
id: "inspectionType",
|
|
16475
16545
|
selected: inspectionType,
|
|
16476
16546
|
select: setInspectionType,
|
|
@@ -17445,6 +17515,14 @@ const ApplicationDetails = props => {
|
|
|
17445
17515
|
function onActionSelect(action) {
|
|
17446
17516
|
sessionStorage.setItem("SELECTED_ACTION", action === null || action === void 0 ? void 0 : action.action);
|
|
17447
17517
|
if (action) {
|
|
17518
|
+
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)) {
|
|
17519
|
+
if (window.location.href.includes("/employee")) {
|
|
17520
|
+
history.push("/digit-ui/employee/payment/collect/" + businessService + "/" + applicationNumber + "?tenantId=" + tenantId);
|
|
17521
|
+
} else {
|
|
17522
|
+
history.push("/digit-ui/citizen/payment/my-bills/" + businessService + "/" + applicationNumber + "?tenantId=" + tenantId);
|
|
17523
|
+
}
|
|
17524
|
+
return;
|
|
17525
|
+
}
|
|
17448
17526
|
if (action !== null && action !== void 0 && action.isToast) {
|
|
17449
17527
|
setShowToast({
|
|
17450
17528
|
key: "error",
|
|
@@ -18313,7 +18391,6 @@ const PropertyLocationDetails = _ref => {
|
|
|
18313
18391
|
isEdit = _ref.isEdit,
|
|
18314
18392
|
onSelect = _ref.onSelect,
|
|
18315
18393
|
config = _ref.config,
|
|
18316
|
-
hideZRO = _ref.hideZRO,
|
|
18317
18394
|
formDataProp = _ref.formData,
|
|
18318
18395
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
18319
18396
|
const _useTranslation = useTranslation(),
|
|
@@ -18447,7 +18524,6 @@ const PropertyLocationDetails = _ref => {
|
|
|
18447
18524
|
isCollapsible: true
|
|
18448
18525
|
}, config),
|
|
18449
18526
|
isEdit: isEdit,
|
|
18450
|
-
showZRO: hideZRO ? false : true,
|
|
18451
18527
|
showMapActualLocation: true,
|
|
18452
18528
|
disable: isPropertyFound,
|
|
18453
18529
|
hideNextButton: true
|
|
@@ -18987,6 +19063,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
18987
19063
|
const watchCategoryType = watch("useDetails.categoryType");
|
|
18988
19064
|
const watchPropertyType = watch("useDetails.propertyType");
|
|
18989
19065
|
const watchPropertyCategory = watch("useDetails.propertyCategory");
|
|
19066
|
+
const watchWaterConnectionUsageType = watch("useDetails.WaterConnectionUsageType");
|
|
18990
19067
|
const isHospitalProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOSPITAL_NURSING_HOME" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HospitalNursingHome";
|
|
18991
19068
|
const isHotelRestaurantProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOTEL_OR_RESTAURANT" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HotelOrRestaurant";
|
|
18992
19069
|
const yearOptions = useMemo(() => {
|
|
@@ -19046,11 +19123,29 @@ const PropertyWaterConnection = _ref => {
|
|
|
19046
19123
|
}, [watchPropertyCategory, propertyTypeOptions, setValue, watchPropertyType]);
|
|
19047
19124
|
const usageTypeOptions = useMemo(() => {
|
|
19048
19125
|
var _ptServicesMastersDat5, _ptServicesMastersDat6;
|
|
19049
|
-
|
|
19126
|
+
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)) || [];
|
|
19127
|
+
if (watchPropertyCategory !== null && watchPropertyCategory !== void 0 && watchPropertyCategory.code) {
|
|
19128
|
+
var _watchPropertyCategor3;
|
|
19129
|
+
if ((watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : (_watchPropertyCategor3 = watchPropertyCategory.code) === null || _watchPropertyCategor3 === void 0 ? void 0 : _watchPropertyCategor3.toUpperCase()) !== "MIXED") {
|
|
19130
|
+
options = options.filter(item => {
|
|
19131
|
+
var _item$type2, _watchPropertyCategor4;
|
|
19132
|
+
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());
|
|
19133
|
+
});
|
|
19134
|
+
}
|
|
19135
|
+
}
|
|
19136
|
+
return options.map(item => ({
|
|
19050
19137
|
code: item.code,
|
|
19051
19138
|
name: item.name
|
|
19052
19139
|
}));
|
|
19053
|
-
}, [ptServicesMastersData]);
|
|
19140
|
+
}, [ptServicesMastersData, watchPropertyCategory]);
|
|
19141
|
+
useEffect(() => {
|
|
19142
|
+
if (watchPropertyType && watchWaterConnectionUsageType) {
|
|
19143
|
+
const isUsageTypeValid = usageTypeOptions.some(opt => opt.code === watchWaterConnectionUsageType.code);
|
|
19144
|
+
if (!isUsageTypeValid) {
|
|
19145
|
+
setValue("useDetails.WaterConnectionUsageType", null);
|
|
19146
|
+
}
|
|
19147
|
+
}
|
|
19148
|
+
}, [watchPropertyType, usageTypeOptions, setValue, watchWaterConnectionUsageType]);
|
|
19054
19149
|
const floorOptions = useMemo(() => {
|
|
19055
19150
|
var _ptServicesMastersDat7, _ptServicesMastersDat8;
|
|
19056
19151
|
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 => ({
|