@djb25/digit-ui-module-commonpt 1.0.18 → 1.0.20
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 +1 -20160
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +157 -58
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -12207,12 +12207,17 @@ 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
|
-
|
|
12213
|
+
const parsedInspectionData = JSON.parse(inspectionInformationData);
|
|
12214
|
+
if (parsedInspectionData !== null && parsedInspectionData !== void 0 && parsedInspectionData.inspectionDate) {
|
|
12215
|
+
const dateVal = parsedInspectionData.inspectionDate;
|
|
12216
|
+
parsedInspectionData.inspectionDate = typeof dateVal === 'string' ? new Date(dateVal).getTime() : dateVal;
|
|
12217
|
+
}
|
|
12218
|
+
applicationData.inspectionInformation = parsedInspectionData;
|
|
12214
12219
|
} catch (e) {
|
|
12215
|
-
console.error("Error parsing
|
|
12220
|
+
console.error("Error parsing inspection information data", e);
|
|
12216
12221
|
}
|
|
12217
12222
|
}
|
|
12218
12223
|
((_applicationData12 = applicationData) === null || _applicationData12 === void 0 ? void 0 : _applicationData12.serviceType) == "WATER" ? submitAction({
|
|
@@ -15441,19 +15446,23 @@ const WSFeeEstimation = _ref => {
|
|
|
15441
15446
|
var _wsAdditionalDetails$2, _wsAdditionalDetails$3, _sessionFormData$bill;
|
|
15442
15447
|
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
15448
|
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
|
|
15449
|
+
var _sessionFormData$bill2, _sessionFormData$bill3, _sessionFormData$bill4, _sessionFormData$bill5, _sessionFormData$bill6, _sessionFormData$bill7, _sessionFormData$bill8, _sessionFormData$bill9, _sessionFormData$bill0;
|
|
15450
|
+
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) || [];
|
|
15451
|
+
const values = billAccountDetails.length > 0 ? billAccountDetails.map(bill => ({
|
|
15452
|
+
title: bill === null || bill === void 0 ? void 0 : bill.taxHeadCode,
|
|
15453
|
+
value: /*#__PURE__*/React.createElement("span", null, "\u20B9", Number(bill === null || bill === void 0 ? void 0 : bill.amount).toFixed(2))
|
|
15454
|
+
})) : [{
|
|
15446
15455
|
title: "WS_APPLICATION_FEE_HEADER",
|
|
15447
|
-
value: /*#__PURE__*/React.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15456
|
+
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
15457
|
}, {
|
|
15449
15458
|
title: "WS_SERVICE_FEE_HEADER",
|
|
15450
|
-
value: /*#__PURE__*/React.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15459
|
+
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
15460
|
}, {
|
|
15452
15461
|
title: "WS_TAX_HEADER",
|
|
15453
|
-
value: /*#__PURE__*/React.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15462
|
+
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
15463
|
}];
|
|
15455
15464
|
setValues(values);
|
|
15456
|
-
setBillDetails(sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15465
|
+
setBillDetails(sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill0 = sessionFormData.billDetails) === null || _sessionFormData$bill0 === void 0 ? void 0 : _sessionFormData$bill0[0]);
|
|
15457
15466
|
} else {
|
|
15458
15467
|
setSessionFormData(data);
|
|
15459
15468
|
setFields(data);
|
|
@@ -15517,24 +15526,28 @@ const WSFeeEstimation = _ref => {
|
|
|
15517
15526
|
};
|
|
15518
15527
|
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
15528
|
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;
|
|
15529
|
+
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
15530
|
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
15531
|
var _result$Calculation2, _result$Calculation2$, _result$Calculation2$2;
|
|
15523
15532
|
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
15533
|
}
|
|
15525
15534
|
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
|
|
15535
|
+
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) || [];
|
|
15536
|
+
const values = taxHeadEstimates.length > 0 ? taxHeadEstimates.map(data => ({
|
|
15537
|
+
title: data === null || data === void 0 ? void 0 : data.taxHeadCode,
|
|
15538
|
+
value: /*#__PURE__*/React.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.estimateAmount).toFixed(2))
|
|
15539
|
+
})) : [{
|
|
15527
15540
|
title: "WS_APPLICATION_FEE_HEADER",
|
|
15528
|
-
value: (_result$
|
|
15541
|
+
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
15542
|
}, {
|
|
15530
15543
|
title: "WS_SERVICE_FEE_HEADER",
|
|
15531
|
-
value: (_result$
|
|
15544
|
+
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
15545
|
}, {
|
|
15533
15546
|
title: "WS_TAX_HEADER",
|
|
15534
|
-
value: (_result$
|
|
15547
|
+
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
15548
|
}];
|
|
15536
15549
|
setSessionBillFormData(cloneDeep_1(result.Calculation[0]));
|
|
15537
|
-
setBillDetails(result === null || result === void 0 ? void 0 : (_result$
|
|
15550
|
+
setBillDetails(result === null || result === void 0 ? void 0 : (_result$Calculation8 = result.Calculation) === null || _result$Calculation8 === void 0 ? void 0 : _result$Calculation8[0]);
|
|
15538
15551
|
setValues(values);
|
|
15539
15552
|
fields.billDetails = result === null || result === void 0 ? void 0 : result.Calculation;
|
|
15540
15553
|
setSessionFormData(fields);
|
|
@@ -15604,7 +15617,7 @@ const WSFeeEstimation = _ref => {
|
|
|
15604
15617
|
className: "border-none",
|
|
15605
15618
|
key: "WS_COMMON_TOTAL_AMT",
|
|
15606
15619
|
label: "" + t("WS_COMMON_TOTAL_AMT"),
|
|
15607
|
-
text: /*#__PURE__*/React.createElement("span", null, "\u20B9", (billDetails === null || billDetails === void 0 ? void 0 : billDetails.totalAmount)
|
|
15620
|
+
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
15621
|
textStyle: {
|
|
15609
15622
|
fontSize: "24px",
|
|
15610
15623
|
fontWeight: "700"
|
|
@@ -16294,36 +16307,65 @@ const DueVerification = _ref => {
|
|
|
16294
16307
|
const _useState = useState(""),
|
|
16295
16308
|
kno = _useState[0],
|
|
16296
16309
|
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);
|
|
16310
|
+
const _useState2 = useState(""),
|
|
16311
|
+
remarks = _useState2[0],
|
|
16312
|
+
setRemarks = _useState2[1];
|
|
16313
|
+
const _useState3 = useState([]),
|
|
16314
|
+
tableData = _useState3[0],
|
|
16315
|
+
setTableData = _useState3[1];
|
|
16316
|
+
const handleRemarkChange = React.useCallback((index, value) => {
|
|
16317
|
+
setTableData(prevData => {
|
|
16318
|
+
const newData = [...prevData];
|
|
16319
|
+
newData[index] = _extends({}, newData[index], {
|
|
16320
|
+
remarks: value
|
|
16321
|
+
});
|
|
16322
|
+
if (applicationData) {
|
|
16323
|
+
applicationData.dueVerification = newData;
|
|
16323
16324
|
}
|
|
16324
|
-
|
|
16325
|
+
return newData;
|
|
16326
|
+
});
|
|
16327
|
+
}, [applicationData]);
|
|
16328
|
+
const isPendingApproval = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_APPROVAL_FOR_CONNECTION";
|
|
16329
|
+
const columns = useMemo(() => {
|
|
16330
|
+
const baseColumns = [{
|
|
16331
|
+
Header: t("K No."),
|
|
16332
|
+
accessor: "kno"
|
|
16333
|
+
}, {
|
|
16334
|
+
Header: t("Full Name"),
|
|
16335
|
+
accessor: "fullName"
|
|
16336
|
+
}, {
|
|
16337
|
+
Header: t("Full Address"),
|
|
16338
|
+
accessor: "fullAddress"
|
|
16339
|
+
}, {
|
|
16340
|
+
Header: t("Due Amount"),
|
|
16341
|
+
accessor: "dueAmount"
|
|
16342
|
+
}, {
|
|
16343
|
+
Header: t("Total Amount"),
|
|
16344
|
+
accessor: "totalAmount"
|
|
16345
|
+
}];
|
|
16346
|
+
if (isPendingApproval) {
|
|
16347
|
+
baseColumns.push({
|
|
16348
|
+
Header: t("Remarks"),
|
|
16349
|
+
accessor: "remarks",
|
|
16350
|
+
Cell: _ref2 => {
|
|
16351
|
+
let row = _ref2.row,
|
|
16352
|
+
value = _ref2.value;
|
|
16353
|
+
return /*#__PURE__*/React.createElement(TextInput, {
|
|
16354
|
+
style: {
|
|
16355
|
+
marginBottom: "0px",
|
|
16356
|
+
minWidth: "150px"
|
|
16357
|
+
},
|
|
16358
|
+
value: value || "",
|
|
16359
|
+
onChange: e => handleRemarkChange(row.index, e.target.value)
|
|
16360
|
+
});
|
|
16361
|
+
}
|
|
16362
|
+
});
|
|
16363
|
+
}
|
|
16364
|
+
return baseColumns;
|
|
16365
|
+
}, [t, handleRemarkChange, isPendingApproval]);
|
|
16366
|
+
useEffect(() => {
|
|
16367
|
+
if (applicationData !== null && applicationData !== void 0 && applicationData.dueVerification && Array.isArray(applicationData.dueVerification)) {
|
|
16325
16368
|
setTableData(applicationData.dueVerification);
|
|
16326
|
-
sessionStorage.setItem("Digit.DUE_VERIFICATION_DATA", JSON.stringify(applicationData.dueVerification));
|
|
16327
16369
|
}
|
|
16328
16370
|
}, [applicationData]);
|
|
16329
16371
|
const handleAdd = () => {
|
|
@@ -16333,12 +16375,16 @@ const DueVerification = _ref => {
|
|
|
16333
16375
|
fullName: "John Doe",
|
|
16334
16376
|
fullAddress: "123 Main St, New Delhi, Delhi 110001",
|
|
16335
16377
|
dueAmount: "1500",
|
|
16336
|
-
totalAmount: "1500"
|
|
16378
|
+
totalAmount: "1500",
|
|
16379
|
+
remarks: remarks
|
|
16337
16380
|
};
|
|
16338
16381
|
const newTableData = [...tableData, mockData];
|
|
16339
16382
|
setTableData(newTableData);
|
|
16340
|
-
|
|
16383
|
+
if (applicationData) {
|
|
16384
|
+
applicationData.dueVerification = newTableData;
|
|
16385
|
+
}
|
|
16341
16386
|
setKno("");
|
|
16387
|
+
setRemarks("");
|
|
16342
16388
|
}
|
|
16343
16389
|
};
|
|
16344
16390
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -16420,7 +16466,8 @@ const DueVerification = _ref => {
|
|
|
16420
16466
|
})));
|
|
16421
16467
|
};
|
|
16422
16468
|
|
|
16423
|
-
const InspectionInformation =
|
|
16469
|
+
const InspectionInformation = _ref => {
|
|
16470
|
+
let applicationData = _ref.applicationData;
|
|
16424
16471
|
const _useTranslation = useTranslation(),
|
|
16425
16472
|
t = _useTranslation.t;
|
|
16426
16473
|
const _useState = useState(null),
|
|
@@ -16432,9 +16479,37 @@ const InspectionInformation = () => {
|
|
|
16432
16479
|
const _useState3 = useState(""),
|
|
16433
16480
|
inspectorName = _useState3[0],
|
|
16434
16481
|
setInspectorName = _useState3[1];
|
|
16482
|
+
useEffect(() => {
|
|
16483
|
+
const savedData = sessionStorage.getItem("Digit.INSPECTION_INFORMATION_DATA");
|
|
16484
|
+
if (savedData) {
|
|
16485
|
+
try {
|
|
16486
|
+
const parsed = JSON.parse(savedData);
|
|
16487
|
+
setInspectionType(parsed.inspectionType || null);
|
|
16488
|
+
setInspectionDate(parsed.inspectionDate || "");
|
|
16489
|
+
setInspectorName(parsed.inspectorName || "");
|
|
16490
|
+
} catch (e) {
|
|
16491
|
+
console.error("Error parsing inspection information data", e);
|
|
16492
|
+
}
|
|
16493
|
+
} else if (applicationData !== null && applicationData !== void 0 && applicationData.inspectionInformation) {
|
|
16494
|
+
setInspectionType(applicationData.inspectionInformation.inspectionType || null);
|
|
16495
|
+
setInspectionDate(applicationData.inspectionInformation.inspectionDate || "");
|
|
16496
|
+
setInspectorName(applicationData.inspectionInformation.inspectorName || "");
|
|
16497
|
+
sessionStorage.setItem("Digit.INSPECTION_INFORMATION_DATA", JSON.stringify(applicationData.inspectionInformation));
|
|
16498
|
+
}
|
|
16499
|
+
}, [applicationData]);
|
|
16500
|
+
useEffect(() => {
|
|
16501
|
+
sessionStorage.setItem("Digit.INSPECTION_INFORMATION_DATA", JSON.stringify({
|
|
16502
|
+
inspectionType,
|
|
16503
|
+
inspectionDate,
|
|
16504
|
+
inspectorName
|
|
16505
|
+
}));
|
|
16506
|
+
}, [inspectionType, inspectionDate, inspectorName]);
|
|
16435
16507
|
const inspectionTypeOptions = [{
|
|
16436
|
-
|
|
16508
|
+
i18nKey: "ES_COMMON_SELECT",
|
|
16437
16509
|
code: ""
|
|
16510
|
+
}, {
|
|
16511
|
+
i18nKey: "New Connection Visit",
|
|
16512
|
+
code: "new_connection_visit"
|
|
16438
16513
|
}];
|
|
16439
16514
|
return /*#__PURE__*/React.createElement("div", {
|
|
16440
16515
|
style: {
|
|
@@ -16470,7 +16545,7 @@ const InspectionInformation = () => {
|
|
|
16470
16545
|
}
|
|
16471
16546
|
}, "*")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
16472
16547
|
option: inspectionTypeOptions,
|
|
16473
|
-
optionKey: "
|
|
16548
|
+
optionKey: "i18nKey",
|
|
16474
16549
|
id: "inspectionType",
|
|
16475
16550
|
selected: inspectionType,
|
|
16476
16551
|
select: setInspectionType,
|
|
@@ -17445,6 +17520,14 @@ const ApplicationDetails = props => {
|
|
|
17445
17520
|
function onActionSelect(action) {
|
|
17446
17521
|
sessionStorage.setItem("SELECTED_ACTION", action === null || action === void 0 ? void 0 : action.action);
|
|
17447
17522
|
if (action) {
|
|
17523
|
+
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)) {
|
|
17524
|
+
if (window.location.href.includes("/employee")) {
|
|
17525
|
+
history.push("/digit-ui/employee/payment/collect/" + businessService + "/" + applicationNumber + "?tenantId=" + tenantId);
|
|
17526
|
+
} else {
|
|
17527
|
+
history.push("/digit-ui/citizen/payment/my-bills/" + businessService + "/" + applicationNumber + "?tenantId=" + tenantId);
|
|
17528
|
+
}
|
|
17529
|
+
return;
|
|
17530
|
+
}
|
|
17448
17531
|
if (action !== null && action !== void 0 && action.isToast) {
|
|
17449
17532
|
setShowToast({
|
|
17450
17533
|
key: "error",
|
|
@@ -18313,7 +18396,6 @@ const PropertyLocationDetails = _ref => {
|
|
|
18313
18396
|
isEdit = _ref.isEdit,
|
|
18314
18397
|
onSelect = _ref.onSelect,
|
|
18315
18398
|
config = _ref.config,
|
|
18316
|
-
hideZRO = _ref.hideZRO,
|
|
18317
18399
|
formDataProp = _ref.formData,
|
|
18318
18400
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
18319
18401
|
const _useTranslation = useTranslation(),
|
|
@@ -18447,7 +18529,6 @@ const PropertyLocationDetails = _ref => {
|
|
|
18447
18529
|
isCollapsible: true
|
|
18448
18530
|
}, config),
|
|
18449
18531
|
isEdit: isEdit,
|
|
18450
|
-
showZRO: hideZRO ? false : true,
|
|
18451
18532
|
showMapActualLocation: true,
|
|
18452
18533
|
disable: isPropertyFound,
|
|
18453
18534
|
hideNextButton: true
|
|
@@ -18957,8 +19038,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
18957
19038
|
}),
|
|
18958
19039
|
control = _useForm.control,
|
|
18959
19040
|
register = _useForm.register,
|
|
18960
|
-
|
|
18961
|
-
errors = _useForm$formState.errors,
|
|
19041
|
+
errors = _useForm.formState.errors,
|
|
18962
19042
|
watch = _useForm.watch,
|
|
18963
19043
|
setValue = _useForm.setValue;
|
|
18964
19044
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
@@ -18987,6 +19067,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
18987
19067
|
const watchCategoryType = watch("useDetails.categoryType");
|
|
18988
19068
|
const watchPropertyType = watch("useDetails.propertyType");
|
|
18989
19069
|
const watchPropertyCategory = watch("useDetails.propertyCategory");
|
|
19070
|
+
const watchWaterConnectionUsageType = watch("useDetails.WaterConnectionUsageType");
|
|
18990
19071
|
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
19072
|
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
19073
|
const yearOptions = useMemo(() => {
|
|
@@ -19046,11 +19127,29 @@ const PropertyWaterConnection = _ref => {
|
|
|
19046
19127
|
}, [watchPropertyCategory, propertyTypeOptions, setValue, watchPropertyType]);
|
|
19047
19128
|
const usageTypeOptions = useMemo(() => {
|
|
19048
19129
|
var _ptServicesMastersDat5, _ptServicesMastersDat6;
|
|
19049
|
-
|
|
19130
|
+
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)) || [];
|
|
19131
|
+
if (watchPropertyCategory !== null && watchPropertyCategory !== void 0 && watchPropertyCategory.code) {
|
|
19132
|
+
var _watchPropertyCategor3;
|
|
19133
|
+
if ((watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : (_watchPropertyCategor3 = watchPropertyCategory.code) === null || _watchPropertyCategor3 === void 0 ? void 0 : _watchPropertyCategor3.toUpperCase()) !== "MIXED") {
|
|
19134
|
+
options = options.filter(item => {
|
|
19135
|
+
var _item$type2, _watchPropertyCategor4;
|
|
19136
|
+
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());
|
|
19137
|
+
});
|
|
19138
|
+
}
|
|
19139
|
+
}
|
|
19140
|
+
return options.map(item => ({
|
|
19050
19141
|
code: item.code,
|
|
19051
19142
|
name: item.name
|
|
19052
19143
|
}));
|
|
19053
|
-
}, [ptServicesMastersData]);
|
|
19144
|
+
}, [ptServicesMastersData, watchPropertyCategory]);
|
|
19145
|
+
useEffect(() => {
|
|
19146
|
+
if (watchPropertyType && watchWaterConnectionUsageType) {
|
|
19147
|
+
const isUsageTypeValid = usageTypeOptions.some(opt => opt.code === watchWaterConnectionUsageType.code);
|
|
19148
|
+
if (!isUsageTypeValid) {
|
|
19149
|
+
setValue("useDetails.WaterConnectionUsageType", null);
|
|
19150
|
+
}
|
|
19151
|
+
}
|
|
19152
|
+
}, [watchPropertyType, usageTypeOptions, setValue, watchWaterConnectionUsageType]);
|
|
19054
19153
|
const floorOptions = useMemo(() => {
|
|
19055
19154
|
var _ptServicesMastersDat7, _ptServicesMastersDat8;
|
|
19056
19155
|
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 => ({
|
|
@@ -19124,8 +19223,8 @@ const PropertyWaterConnection = _ref => {
|
|
|
19124
19223
|
marginTop: "-21px"
|
|
19125
19224
|
};
|
|
19126
19225
|
return /*#__PURE__*/React.createElement(CollapsibleCardPage, {
|
|
19127
|
-
title: t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS") + (config !== null && config !== void 0 && config.isAutomaticFill ? " (Automatic Fill by Property
|
|
19128
|
-
defaultOpen:
|
|
19226
|
+
title: t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS") + (config !== null && config !== void 0 && config.isAutomaticFill ? " " + t("(Automatic Fill by Property)") : ""),
|
|
19227
|
+
defaultOpen: false,
|
|
19129
19228
|
style: props.style
|
|
19130
19229
|
}, /*#__PURE__*/React.createElement("div", {
|
|
19131
19230
|
className: "formcomposer-section-grid"
|