@djb25/digit-ui-module-commonpt 1.0.23 → 1.0.25
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 +254 -126
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +254 -126
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6034,7 +6034,7 @@ const setPropertyDetailsLW = data => {
|
|
|
6034
6034
|
numberOfRooms: useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofRooms,
|
|
6035
6035
|
numberOfBeds: useDetails === null || useDetails === void 0 ? void 0 : useDetails.numberOfBeds,
|
|
6036
6036
|
numberOfStudents: useDetails === null || useDetails === void 0 ? void 0 : useDetails.numberOfStudents,
|
|
6037
|
-
|
|
6037
|
+
servantQuarterArea: useDetails === null || useDetails === void 0 ? void 0 : useDetails.servantQuarterArea
|
|
6038
6038
|
};
|
|
6039
6039
|
data.propertyDetails = propertyDetails;
|
|
6040
6040
|
return data;
|
|
@@ -6095,7 +6095,7 @@ const convertToPropertyLightWeight = function (data) {
|
|
|
6095
6095
|
plotArea: ((_data$waterConnection15 = data.waterConnection) === null || _data$waterConnection15 === void 0 ? void 0 : (_data$waterConnection16 = _data$waterConnection15.useDetails) === null || _data$waterConnection16 === void 0 ? void 0 : _data$waterConnection16.plotArea) || ((_data$useDetails7 = data.useDetails) === null || _data$useDetails7 === void 0 ? void 0 : _data$useDetails7.plotArea),
|
|
6096
6096
|
builtUpArea: ((_data$waterConnection17 = data.waterConnection) === null || _data$waterConnection17 === void 0 ? void 0 : (_data$waterConnection18 = _data$waterConnection17.useDetails) === null || _data$waterConnection18 === void 0 ? void 0 : _data$waterConnection18.builtUpArea) || ((_data$useDetails8 = data.useDetails) === null || _data$useDetails8 === void 0 ? void 0 : _data$useDetails8.builtUpArea),
|
|
6097
6097
|
farArea: ((_data$waterConnection19 = data.waterConnection) === null || _data$waterConnection19 === void 0 ? void 0 : (_data$waterConnection20 = _data$waterConnection19.useDetails) === null || _data$waterConnection20 === void 0 ? void 0 : _data$waterConnection20.farArea) || ((_data$useDetails9 = data.useDetails) === null || _data$useDetails9 === void 0 ? void 0 : _data$useDetails9.farArea),
|
|
6098
|
-
|
|
6098
|
+
servantQuarterArea: ((_data$waterConnection21 = data.waterConnection) === null || _data$waterConnection21 === void 0 ? void 0 : (_data$waterConnection22 = _data$waterConnection21.useDetails) === null || _data$waterConnection22 === void 0 ? void 0 : _data$waterConnection22.servantQuarterArea) || ((_data$useDetails0 = data.useDetails) === null || _data$useDetails0 === void 0 ? void 0 : _data$useDetails0.servantQuarterArea),
|
|
6099
6099
|
numberOfStudents: ((_data$waterConnection23 = data.waterConnection) === null || _data$waterConnection23 === void 0 ? void 0 : (_data$waterConnection24 = _data$waterConnection23.useDetails) === null || _data$waterConnection24 === void 0 ? void 0 : _data$waterConnection24.numberOfStudents) || ((_data$useDetails1 = data.useDetails) === null || _data$useDetails1 === void 0 ? void 0 : _data$useDetails1.numberOfStudents),
|
|
6100
6100
|
numberOfBeds: ((_data$waterConnection25 = data.waterConnection) === null || _data$waterConnection25 === void 0 ? void 0 : (_data$waterConnection26 = _data$waterConnection25.useDetails) === null || _data$waterConnection26 === void 0 ? void 0 : _data$waterConnection26.numberOfBeds) || ((_data$useDetails10 = data.useDetails) === null || _data$useDetails10 === void 0 ? void 0 : _data$useDetails10.numberOfBeds),
|
|
6101
6101
|
owners: [...(data.owners || []).map((owner, index) => {
|
|
@@ -6191,7 +6191,7 @@ const convertToUpdatePropertyLightWeight = function (data) {
|
|
|
6191
6191
|
plotArea: ((_data$waterConnection43 = data.waterConnection) === null || _data$waterConnection43 === void 0 ? void 0 : (_data$waterConnection44 = _data$waterConnection43.useDetails) === null || _data$waterConnection44 === void 0 ? void 0 : _data$waterConnection44.plotArea) || ((_data$useDetails17 = data.useDetails) === null || _data$useDetails17 === void 0 ? void 0 : _data$useDetails17.plotArea),
|
|
6192
6192
|
builtUpArea: ((_data$waterConnection45 = data.waterConnection) === null || _data$waterConnection45 === void 0 ? void 0 : (_data$waterConnection46 = _data$waterConnection45.useDetails) === null || _data$waterConnection46 === void 0 ? void 0 : _data$waterConnection46.builtUpArea) || ((_data$useDetails18 = data.useDetails) === null || _data$useDetails18 === void 0 ? void 0 : _data$useDetails18.builtUpArea),
|
|
6193
6193
|
farArea: ((_data$waterConnection47 = data.waterConnection) === null || _data$waterConnection47 === void 0 ? void 0 : (_data$waterConnection48 = _data$waterConnection47.useDetails) === null || _data$waterConnection48 === void 0 ? void 0 : _data$waterConnection48.farArea) || ((_data$useDetails19 = data.useDetails) === null || _data$useDetails19 === void 0 ? void 0 : _data$useDetails19.farArea),
|
|
6194
|
-
numberOfServantQuarters: ((_data$waterConnection49 = data.waterConnection) === null || _data$waterConnection49 === void 0 ? void 0 : (_data$waterConnection50 = _data$waterConnection49.useDetails) === null || _data$waterConnection50 === void 0 ? void 0 : _data$waterConnection50.
|
|
6194
|
+
numberOfServantQuarters: ((_data$waterConnection49 = data.waterConnection) === null || _data$waterConnection49 === void 0 ? void 0 : (_data$waterConnection50 = _data$waterConnection49.useDetails) === null || _data$waterConnection50 === void 0 ? void 0 : _data$waterConnection50.servantQuarterArea) || ((_data$useDetails20 = data.useDetails) === null || _data$useDetails20 === void 0 ? void 0 : _data$useDetails20.servantQuarterArea),
|
|
6195
6195
|
numberOfStudents: ((_data$waterConnection51 = data.waterConnection) === null || _data$waterConnection51 === void 0 ? void 0 : (_data$waterConnection52 = _data$waterConnection51.useDetails) === null || _data$waterConnection52 === void 0 ? void 0 : _data$waterConnection52.numberOfStudents) || ((_data$useDetails21 = data.useDetails) === null || _data$useDetails21 === void 0 ? void 0 : _data$useDetails21.numberOfStudents),
|
|
6196
6196
|
numberOfBeds: ((_data$waterConnection53 = data.waterConnection) === null || _data$waterConnection53 === void 0 ? void 0 : (_data$waterConnection54 = _data$waterConnection53.useDetails) === null || _data$waterConnection54 === void 0 ? void 0 : _data$waterConnection54.numberOfBeds) || ((_data$useDetails22 = data.useDetails) === null || _data$useDetails22 === void 0 ? void 0 : _data$useDetails22.numberOfBeds),
|
|
6197
6197
|
owners: [...data.owners.map((owner, index) => {
|
|
@@ -15447,23 +15447,30 @@ const WSFeeEstimation = _ref => {
|
|
|
15447
15447
|
var _wsAdditionalDetails$2, _wsAdditionalDetails$3, _sessionFormData$bill;
|
|
15448
15448
|
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);
|
|
15449
15449
|
if ((sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill = sessionFormData.billDetails) === null || _sessionFormData$bill === void 0 ? void 0 : _sessionFormData$bill.length) > 0) {
|
|
15450
|
-
var _sessionFormData$bill2, _sessionFormData$bill3, _sessionFormData$bill4, _sessionFormData$bill5, _sessionFormData$bill6, _sessionFormData$bill7, _sessionFormData$bill8, _sessionFormData$bill9, _sessionFormData$bill0;
|
|
15451
|
-
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) || [];
|
|
15452
|
-
const values = billAccountDetails.length > 0 ? billAccountDetails.map(bill =>
|
|
15453
|
-
|
|
15454
|
-
|
|
15455
|
-
|
|
15450
|
+
var _sessionFormData$bill2, _sessionFormData$bill3, _sessionFormData$bill4, _sessionFormData$bill5, _sessionFormData$bill6, _sessionFormData$bill7, _sessionFormData$bill8, _sessionFormData$bill9, _sessionFormData$bill0, _sessionFormData$bill1, _sessionFormData$bill10;
|
|
15451
|
+
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) || (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.taxHeadEstimates) || [];
|
|
15452
|
+
const values = billAccountDetails.length > 0 ? billAccountDetails.map(bill => {
|
|
15453
|
+
var _bill$status;
|
|
15454
|
+
return {
|
|
15455
|
+
title: bill === null || bill === void 0 ? void 0 : bill.taxHeadCode,
|
|
15456
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number(bill === null || bill === void 0 ? void 0 : bill.amount).toFixed(2), bill !== null && bill !== void 0 && bill.status ? /*#__PURE__*/React__default.createElement("span", {
|
|
15457
|
+
style: {
|
|
15458
|
+
color: (bill === null || bill === void 0 ? void 0 : (_bill$status = bill.status) === null || _bill$status === void 0 ? void 0 : _bill$status.toUpperCase()) === "PAID" ? "green" : "red"
|
|
15459
|
+
}
|
|
15460
|
+
}, " (" + (bill === null || bill === void 0 ? void 0 : bill.status) + ")") : "")
|
|
15461
|
+
};
|
|
15462
|
+
}) : [{
|
|
15456
15463
|
title: "WS_APPLICATION_FEE_HEADER",
|
|
15457
|
-
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15464
|
+
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.fee)
|
|
15458
15465
|
}, {
|
|
15459
15466
|
title: "WS_SERVICE_FEE_HEADER",
|
|
15460
|
-
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15467
|
+
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.charge)
|
|
15461
15468
|
}, {
|
|
15462
15469
|
title: "WS_TAX_HEADER",
|
|
15463
|
-
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15470
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill0 = sessionFormData.billDetails) === null || _sessionFormData$bill0 === void 0 ? void 0 : (_sessionFormData$bill1 = _sessionFormData$bill0[0]) === null || _sessionFormData$bill1 === void 0 ? void 0 : _sessionFormData$bill1.taxAmount)
|
|
15464
15471
|
}];
|
|
15465
15472
|
setValues(values);
|
|
15466
|
-
setBillDetails(sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$
|
|
15473
|
+
setBillDetails(sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill10 = sessionFormData.billDetails) === null || _sessionFormData$bill10 === void 0 ? void 0 : _sessionFormData$bill10[0]);
|
|
15467
15474
|
} else {
|
|
15468
15475
|
setSessionFormData(data);
|
|
15469
15476
|
setFields(data);
|
|
@@ -15534,10 +15541,17 @@ const WSFeeEstimation = _ref => {
|
|
|
15534
15541
|
}
|
|
15535
15542
|
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");
|
|
15536
15543
|
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) || [];
|
|
15537
|
-
const values = taxHeadEstimates.length > 0 ? taxHeadEstimates.map(data =>
|
|
15538
|
-
|
|
15539
|
-
|
|
15540
|
-
|
|
15544
|
+
const values = taxHeadEstimates.length > 0 ? taxHeadEstimates.map(data => {
|
|
15545
|
+
var _data$status;
|
|
15546
|
+
return {
|
|
15547
|
+
title: data === null || data === void 0 ? void 0 : data.taxHeadCode,
|
|
15548
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.estimateAmount).toFixed(2), data !== null && data !== void 0 && data.status ? /*#__PURE__*/React__default.createElement("span", {
|
|
15549
|
+
style: {
|
|
15550
|
+
color: (data === null || data === void 0 ? void 0 : (_data$status = data.status) === null || _data$status === void 0 ? void 0 : _data$status.toUpperCase()) === "PAID" ? "green" : "red"
|
|
15551
|
+
}
|
|
15552
|
+
}, " (" + (data === null || data === void 0 ? void 0 : data.status) + ")") : "")
|
|
15553
|
+
};
|
|
15554
|
+
}) : [{
|
|
15541
15555
|
title: "WS_APPLICATION_FEE_HEADER",
|
|
15542
15556
|
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
|
|
15543
15557
|
}, {
|
|
@@ -15837,7 +15851,7 @@ const InfoDetails = _ref2 => {
|
|
|
15837
15851
|
};
|
|
15838
15852
|
|
|
15839
15853
|
const ViewBreakup = _ref => {
|
|
15840
|
-
var _breakUpData$calculat, _breakUpData$calculat2, _wsAdditionalDetails$8, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
|
|
15854
|
+
var _breakUpData$calculat, _breakUpData$calculat2, _breakUpData$calculat3, _wsAdditionalDetails$8, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
|
|
15841
15855
|
let wsAdditionalDetails = _ref.wsAdditionalDetails,
|
|
15842
15856
|
print = _ref.print,
|
|
15843
15857
|
download = _ref.download;
|
|
@@ -15923,10 +15937,17 @@ const ViewBreakup = _ref => {
|
|
|
15923
15937
|
if (rows === void 0) {
|
|
15924
15938
|
rows = [];
|
|
15925
15939
|
}
|
|
15926
|
-
return rows.map(row =>
|
|
15927
|
-
|
|
15928
|
-
|
|
15929
|
-
|
|
15940
|
+
return rows.map(row => {
|
|
15941
|
+
var _row$status;
|
|
15942
|
+
return {
|
|
15943
|
+
title: t(row === null || row === void 0 ? void 0 : row.taxHeadCode),
|
|
15944
|
+
value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9" + formatNumber(row === null || row === void 0 ? void 0 : row.amount), row !== null && row !== void 0 && row.status ? /*#__PURE__*/React__default.createElement("span", {
|
|
15945
|
+
style: {
|
|
15946
|
+
color: (row === null || row === void 0 ? void 0 : (_row$status = row.status) === null || _row$status === void 0 ? void 0 : _row$status.toUpperCase()) === "PAID" ? "green" : "red"
|
|
15947
|
+
}
|
|
15948
|
+
}, " (" + (row === null || row === void 0 ? void 0 : row.status) + ")") : "")
|
|
15949
|
+
};
|
|
15950
|
+
});
|
|
15930
15951
|
};
|
|
15931
15952
|
const connectionHolder = 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$4 = _wsAdditionalDetails$3.connectionHolders) === null || _wsAdditionalDetails$4 === void 0 ? void 0 : _wsAdditionalDetails$4[0];
|
|
15932
15953
|
const applicantName = [connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.name, connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.middleName, connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.lastName].filter(Boolean).join(" ") || "-";
|
|
@@ -15948,11 +15969,8 @@ const ViewBreakup = _ref => {
|
|
|
15948
15969
|
title: t("WS_APPLICATION_FEE_HEADER"),
|
|
15949
15970
|
values: amountRows([...((breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab = breakUpData.billSlabData) === null || _breakUpData$billSlab === void 0 ? void 0 : _breakUpData$billSlab.FEE) || []), ...((breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab2 = breakUpData.billSlabData) === null || _breakUpData$billSlab2 === void 0 ? void 0 : _breakUpData$billSlab2.CHARGES) || [])])
|
|
15950
15971
|
}, {
|
|
15951
|
-
title: "
|
|
15952
|
-
values:
|
|
15953
|
-
}, {
|
|
15954
|
-
title: "Water demand details",
|
|
15955
|
-
values: waterDemandRows.map(_ref4 => {
|
|
15972
|
+
title: "Property details",
|
|
15973
|
+
values: propertyRows.map(_ref4 => {
|
|
15956
15974
|
let label = _ref4.label,
|
|
15957
15975
|
value = _ref4.value,
|
|
15958
15976
|
currency = _ref4.currency,
|
|
@@ -15964,8 +15982,11 @@ const ViewBreakup = _ref => {
|
|
|
15964
15982
|
};
|
|
15965
15983
|
})
|
|
15966
15984
|
}, {
|
|
15967
|
-
title: "
|
|
15968
|
-
values:
|
|
15985
|
+
title: "Taxes",
|
|
15986
|
+
values: amountRows(breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab3 = breakUpData.billSlabData) === null || _breakUpData$billSlab3 === void 0 ? void 0 : _breakUpData$billSlab3.TAX)
|
|
15987
|
+
}, {
|
|
15988
|
+
title: "Water demand details",
|
|
15989
|
+
values: waterDemandRows.map(_ref5 => {
|
|
15969
15990
|
let label = _ref5.label,
|
|
15970
15991
|
value = _ref5.value,
|
|
15971
15992
|
currency = _ref5.currency,
|
|
@@ -15976,6 +15997,19 @@ const ViewBreakup = _ref => {
|
|
|
15976
15997
|
value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
|
|
15977
15998
|
};
|
|
15978
15999
|
})
|
|
16000
|
+
}, {
|
|
16001
|
+
title: "Infrastructure charge details",
|
|
16002
|
+
values: infrastructureChargeRows.map(_ref6 => {
|
|
16003
|
+
let label = _ref6.label,
|
|
16004
|
+
value = _ref6.value,
|
|
16005
|
+
currency = _ref6.currency,
|
|
16006
|
+
unit = _ref6.unit,
|
|
16007
|
+
isText = _ref6.isText;
|
|
16008
|
+
return {
|
|
16009
|
+
title: label,
|
|
16010
|
+
value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
|
|
16011
|
+
};
|
|
16012
|
+
})
|
|
15979
16013
|
}, {
|
|
15980
16014
|
title: "Total",
|
|
15981
16015
|
values: [{
|
|
@@ -16017,8 +16051,58 @@ const ViewBreakup = _ref => {
|
|
|
16017
16051
|
printWindow.focus();
|
|
16018
16052
|
printWindow.print();
|
|
16019
16053
|
};
|
|
16020
|
-
const
|
|
16021
|
-
const
|
|
16054
|
+
const propertyDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat = breakUpData.calculationDetail) === null || _breakUpData$calculat === void 0 ? void 0 : _breakUpData$calculat.propertyDetail;
|
|
16055
|
+
const waterDemandDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat2 = breakUpData.calculationDetail) === null || _breakUpData$calculat2 === void 0 ? void 0 : _breakUpData$calculat2.waterDemandDetail;
|
|
16056
|
+
const infrastructureChargeDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat3 = breakUpData.calculationDetail) === null || _breakUpData$calculat3 === void 0 ? void 0 : _breakUpData$calculat3.infrastructureChargeDetail;
|
|
16057
|
+
const propertyRows = propertyDetail ? [{
|
|
16058
|
+
label: "Property ID",
|
|
16059
|
+
value: propertyDetail.propertyId,
|
|
16060
|
+
isText: true
|
|
16061
|
+
}, {
|
|
16062
|
+
label: "Property type",
|
|
16063
|
+
value: propertyDetail.propertyType,
|
|
16064
|
+
isText: true
|
|
16065
|
+
}, {
|
|
16066
|
+
label: "Plot area",
|
|
16067
|
+
value: propertyDetail.landArea,
|
|
16068
|
+
unit: " (sq. meter.)"
|
|
16069
|
+
}, {
|
|
16070
|
+
label: "Built-up area",
|
|
16071
|
+
value: propertyDetail.superBuiltUpArea,
|
|
16072
|
+
unit: " (sq. meter.)"
|
|
16073
|
+
}, {
|
|
16074
|
+
label: "farArea",
|
|
16075
|
+
value: propertyDetail.farArea,
|
|
16076
|
+
isText: true
|
|
16077
|
+
}, {
|
|
16078
|
+
label: "coveredArea",
|
|
16079
|
+
value: propertyDetail.coveredArea,
|
|
16080
|
+
isText: true
|
|
16081
|
+
}, {
|
|
16082
|
+
label: "numberOfDwellingUnits",
|
|
16083
|
+
value: propertyDetail.numberOfDwellingUnits,
|
|
16084
|
+
isText: true
|
|
16085
|
+
}, {
|
|
16086
|
+
label: "numberOfBeds",
|
|
16087
|
+
value: propertyDetail.numberOfBeds,
|
|
16088
|
+
isText: true
|
|
16089
|
+
}, {
|
|
16090
|
+
label: "numberOfRooms",
|
|
16091
|
+
value: propertyDetail.numberOfRooms,
|
|
16092
|
+
isText: true
|
|
16093
|
+
}, {
|
|
16094
|
+
label: "numberOfStudents",
|
|
16095
|
+
value: propertyDetail.numberOfStudents,
|
|
16096
|
+
isText: true
|
|
16097
|
+
}, {
|
|
16098
|
+
label: "numberOfStaff",
|
|
16099
|
+
value: propertyDetail.numberOfStaff,
|
|
16100
|
+
isText: true
|
|
16101
|
+
}, {
|
|
16102
|
+
label: "Usage category",
|
|
16103
|
+
value: propertyDetail.usageCategory,
|
|
16104
|
+
isText: true
|
|
16105
|
+
}] : [];
|
|
16022
16106
|
const waterDemandRows = waterDemandDetail ? [{
|
|
16023
16107
|
label: "Calculated occupancy",
|
|
16024
16108
|
value: waterDemandDetail.calculatedOccupancy,
|
|
@@ -16118,48 +16202,75 @@ const ViewBreakup = _ref => {
|
|
|
16118
16202
|
style: {
|
|
16119
16203
|
margin: "10px 0px"
|
|
16120
16204
|
}
|
|
16121
|
-
}, t("WS_APPLICATION_FEE_HEADER")), breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab4 = breakUpData.billSlabData) === null || _breakUpData$billSlab4 === void 0 ? void 0 : (_breakUpData$billSlab5 = _breakUpData$billSlab4.FEE) === null || _breakUpData$billSlab5 === void 0 ? void 0 : _breakUpData$billSlab5.map(data =>
|
|
16122
|
-
|
|
16123
|
-
|
|
16124
|
-
|
|
16125
|
-
|
|
16126
|
-
|
|
16127
|
-
|
|
16128
|
-
|
|
16129
|
-
|
|
16130
|
-
|
|
16131
|
-
|
|
16132
|
-
|
|
16133
|
-
|
|
16134
|
-
|
|
16135
|
-
|
|
16136
|
-
|
|
16137
|
-
|
|
16138
|
-
|
|
16139
|
-
|
|
16140
|
-
|
|
16141
|
-
|
|
16142
|
-
|
|
16143
|
-
|
|
16144
|
-
|
|
16145
|
-
|
|
16146
|
-
|
|
16147
|
-
|
|
16148
|
-
|
|
16149
|
-
|
|
16150
|
-
|
|
16151
|
-
|
|
16152
|
-
|
|
16153
|
-
|
|
16154
|
-
|
|
16155
|
-
|
|
16156
|
-
|
|
16157
|
-
|
|
16158
|
-
|
|
16159
|
-
|
|
16160
|
-
|
|
16161
|
-
|
|
16205
|
+
}, t("WS_APPLICATION_FEE_HEADER")), breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab4 = breakUpData.billSlabData) === null || _breakUpData$billSlab4 === void 0 ? void 0 : (_breakUpData$billSlab5 = _breakUpData$billSlab4.FEE) === null || _breakUpData$billSlab5 === void 0 ? void 0 : _breakUpData$billSlab5.map(data => {
|
|
16206
|
+
var _data$status;
|
|
16207
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
16208
|
+
className: "border-none",
|
|
16209
|
+
rowContainerStyle: {
|
|
16210
|
+
margin: "0px"
|
|
16211
|
+
},
|
|
16212
|
+
labelStyle: {
|
|
16213
|
+
width: "50%"
|
|
16214
|
+
},
|
|
16215
|
+
key: "" + (data === null || data === void 0 ? void 0 : data.taxHeadCode),
|
|
16216
|
+
label: "" + t("" + (data === null || data === void 0 ? void 0 : data.taxHeadCode)),
|
|
16217
|
+
text: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.amount) || 0, data !== null && data !== void 0 && data.status ? /*#__PURE__*/React__default.createElement("span", {
|
|
16218
|
+
style: {
|
|
16219
|
+
color: (data === null || data === void 0 ? void 0 : (_data$status = data.status) === null || _data$status === void 0 ? void 0 : _data$status.toUpperCase()) === "PAID" ? "green" : "red"
|
|
16220
|
+
}
|
|
16221
|
+
}, " (" + (data === null || data === void 0 ? void 0 : data.status) + ")") : ""),
|
|
16222
|
+
textStyle: {
|
|
16223
|
+
textAlign: "right"
|
|
16224
|
+
}
|
|
16225
|
+
});
|
|
16226
|
+
}), breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab6 = breakUpData.billSlabData) === null || _breakUpData$billSlab6 === void 0 ? void 0 : (_breakUpData$billSlab7 = _breakUpData$billSlab6.CHARGES) === null || _breakUpData$billSlab7 === void 0 ? void 0 : _breakUpData$billSlab7.map(data => {
|
|
16227
|
+
var _data$status2;
|
|
16228
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
16229
|
+
className: "border-none",
|
|
16230
|
+
rowContainerStyle: {
|
|
16231
|
+
margin: "0px"
|
|
16232
|
+
},
|
|
16233
|
+
labelStyle: {
|
|
16234
|
+
width: "50%"
|
|
16235
|
+
},
|
|
16236
|
+
key: "" + (data === null || data === void 0 ? void 0 : data.taxHeadCode),
|
|
16237
|
+
label: "" + t("" + (data === null || data === void 0 ? void 0 : data.taxHeadCode)),
|
|
16238
|
+
text: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.amount) || 0, data !== null && data !== void 0 && data.status ? /*#__PURE__*/React__default.createElement("span", {
|
|
16239
|
+
style: {
|
|
16240
|
+
color: (data === null || data === void 0 ? void 0 : (_data$status2 = data.status) === null || _data$status2 === void 0 ? void 0 : _data$status2.toUpperCase()) === "PAID" ? "green" : "red"
|
|
16241
|
+
}
|
|
16242
|
+
}, " (" + (data === null || data === void 0 ? void 0 : data.status) + ")") : ""),
|
|
16243
|
+
textStyle: {
|
|
16244
|
+
textAlign: "right"
|
|
16245
|
+
}
|
|
16246
|
+
});
|
|
16247
|
+
}), breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab8 = breakUpData.billSlabData) === null || _breakUpData$billSlab8 === void 0 ? void 0 : (_breakUpData$billSlab9 = _breakUpData$billSlab8.TAX) === null || _breakUpData$billSlab9 === void 0 ? void 0 : _breakUpData$billSlab9.map(data => {
|
|
16248
|
+
var _data$status3;
|
|
16249
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
16250
|
+
className: "border-none",
|
|
16251
|
+
rowContainerStyle: {
|
|
16252
|
+
margin: "0px"
|
|
16253
|
+
},
|
|
16254
|
+
labelStyle: {
|
|
16255
|
+
width: "50%"
|
|
16256
|
+
},
|
|
16257
|
+
key: "" + (data === null || data === void 0 ? void 0 : data.taxHeadCode),
|
|
16258
|
+
label: "" + t("" + (data === null || data === void 0 ? void 0 : data.taxHeadCode)),
|
|
16259
|
+
text: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.amount) || 0, data !== null && data !== void 0 && data.status ? /*#__PURE__*/React__default.createElement("span", {
|
|
16260
|
+
style: {
|
|
16261
|
+
color: (data === null || data === void 0 ? void 0 : (_data$status3 = data.status) === null || _data$status3 === void 0 ? void 0 : _data$status3.toUpperCase()) === "PAID" ? "green" : "red"
|
|
16262
|
+
}
|
|
16263
|
+
}, " (" + (data === null || data === void 0 ? void 0 : data.status) + ")") : ""),
|
|
16264
|
+
textStyle: {
|
|
16265
|
+
textAlign: "right"
|
|
16266
|
+
}
|
|
16267
|
+
});
|
|
16268
|
+
}), propertyRows.length > 0 && /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
|
|
16269
|
+
style: {
|
|
16270
|
+
margin: "10px 0px"
|
|
16162
16271
|
}
|
|
16272
|
+
}, "Property details"), /*#__PURE__*/React__default.createElement(DetailRows, {
|
|
16273
|
+
rows: propertyRows
|
|
16163
16274
|
})), waterDemandRows.length > 0 && /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
|
|
16164
16275
|
style: {
|
|
16165
16276
|
margin: "10px 0px"
|
|
@@ -16490,8 +16601,8 @@ const DueVerification = _ref => {
|
|
|
16490
16601
|
return newData;
|
|
16491
16602
|
});
|
|
16492
16603
|
}, [applicationData]);
|
|
16493
|
-
const isPendingApproval = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "
|
|
16494
|
-
const isActivation = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus)
|
|
16604
|
+
const isPendingApproval = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_FIELD_INSPECTION";
|
|
16605
|
+
const isActivation = ["PENDING_FOR_BILLING_CLERK_REVIEW", "PENDING_FOR_ASO_APPROVAL", "PENDING_FOR_ZRO_APPROVAL", "PENDING_FOR_AE_APPROVAL", "PENDING_FOR_FINAL_PAYMENT", "PENDING_FOR_CONNECTION_ACTIVATION"].includes(applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus);
|
|
16495
16606
|
const columns = React.useMemo(() => {
|
|
16496
16607
|
const baseColumns = [{
|
|
16497
16608
|
Header: t("K No."),
|
|
@@ -16509,7 +16620,7 @@ const DueVerification = _ref => {
|
|
|
16509
16620
|
Header: t("Total Amount"),
|
|
16510
16621
|
accessor: "totalAmount"
|
|
16511
16622
|
}];
|
|
16512
|
-
if (isPendingApproval) {
|
|
16623
|
+
if (isPendingApproval || isActivation) {
|
|
16513
16624
|
baseColumns.push({
|
|
16514
16625
|
Header: t("Remarks"),
|
|
16515
16626
|
accessor: "remarks",
|
|
@@ -16528,7 +16639,7 @@ const DueVerification = _ref => {
|
|
|
16528
16639
|
});
|
|
16529
16640
|
}
|
|
16530
16641
|
return baseColumns;
|
|
16531
|
-
}, [t, handleRemarkChange, isPendingApproval]);
|
|
16642
|
+
}, [t, handleRemarkChange, isPendingApproval, isActivation]);
|
|
16532
16643
|
React.useEffect(() => {
|
|
16533
16644
|
if (applicationData !== null && applicationData !== void 0 && applicationData.dueVerification && Array.isArray(applicationData.dueVerification)) {
|
|
16534
16645
|
setTableData(applicationData.dueVerification);
|
|
@@ -16630,7 +16741,11 @@ const InspectionInformation = _ref => {
|
|
|
16630
16741
|
let applicationData = _ref.applicationData;
|
|
16631
16742
|
const _useTranslation = reactI18next.useTranslation(),
|
|
16632
16743
|
t = _useTranslation.t;
|
|
16633
|
-
const
|
|
16744
|
+
const defaultInspectionType = {
|
|
16745
|
+
i18nKey: "New Connection Visit",
|
|
16746
|
+
code: "new_connection_visit"
|
|
16747
|
+
};
|
|
16748
|
+
const _useState = React.useState(defaultInspectionType),
|
|
16634
16749
|
inspectionType = _useState[0],
|
|
16635
16750
|
setInspectionType = _useState[1];
|
|
16636
16751
|
const _useState2 = React.useState(""),
|
|
@@ -16640,20 +16755,23 @@ const InspectionInformation = _ref => {
|
|
|
16640
16755
|
inspectorName = _useState3[0],
|
|
16641
16756
|
setInspectorName = _useState3[1];
|
|
16642
16757
|
React.useEffect(() => {
|
|
16643
|
-
if (applicationData
|
|
16758
|
+
if (applicationData) {
|
|
16759
|
+
if (!applicationData.inspectionInformation) {
|
|
16760
|
+
applicationData.inspectionInformation = {};
|
|
16761
|
+
}
|
|
16762
|
+
if (!applicationData.inspectionInformation.inspectionType) {
|
|
16763
|
+
applicationData.inspectionInformation.inspectionType = defaultInspectionType;
|
|
16764
|
+
}
|
|
16644
16765
|
const apiInspectionType = applicationData.inspectionInformation.inspectionType;
|
|
16645
16766
|
let matchedType = null;
|
|
16646
16767
|
const inspectionCode = typeof apiInspectionType === "object" && apiInspectionType !== null ? apiInspectionType.code : apiInspectionType;
|
|
16647
16768
|
if (inspectionCode) {
|
|
16648
16769
|
matchedType = [{
|
|
16649
|
-
i18nKey: "ES_COMMON_SELECT",
|
|
16650
|
-
code: ""
|
|
16651
|
-
}, {
|
|
16652
16770
|
i18nKey: "New Connection Visit",
|
|
16653
16771
|
code: "new_connection_visit"
|
|
16654
16772
|
}].find(opt => opt.code === inspectionCode || opt.i18nKey === inspectionCode);
|
|
16655
16773
|
}
|
|
16656
|
-
setInspectionType(matchedType ||
|
|
16774
|
+
setInspectionType(matchedType || defaultInspectionType);
|
|
16657
16775
|
let dateValue = applicationData.inspectionInformation.inspectionDate || "";
|
|
16658
16776
|
if (dateValue && typeof dateValue === 'number') {
|
|
16659
16777
|
const d = new Date(dateValue);
|
|
@@ -16670,9 +16788,6 @@ const InspectionInformation = _ref => {
|
|
|
16670
16788
|
}
|
|
16671
16789
|
}, [applicationData]);
|
|
16672
16790
|
const inspectionTypeOptions = [{
|
|
16673
|
-
i18nKey: "ES_COMMON_SELECT",
|
|
16674
|
-
code: ""
|
|
16675
|
-
}, {
|
|
16676
16791
|
i18nKey: "New Connection Visit",
|
|
16677
16792
|
code: "new_connection_visit"
|
|
16678
16793
|
}];
|
|
@@ -16692,7 +16807,7 @@ const InspectionInformation = _ref => {
|
|
|
16692
16807
|
if (!applicationData.inspectionInformation) applicationData.inspectionInformation = {};
|
|
16693
16808
|
applicationData.inspectionInformation.inspectorName = val;
|
|
16694
16809
|
};
|
|
16695
|
-
const readOnly = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus)
|
|
16810
|
+
const readOnly = ["PENDING_FOR_BILLING_CLERK_REVIEW", "PENDING_FOR_ASO_APPROVAL", "PENDING_FOR_ZRO_APPROVAL", "PENDING_FOR_AE_APPROVAL", "PENDING_FOR_FINAL_PAYMENT", "PENDING_FOR_CONNECTION_ACTIVATION"].includes(applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus);
|
|
16696
16811
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
16697
16812
|
style: {
|
|
16698
16813
|
marginBottom: "20px"
|
|
@@ -17274,9 +17389,9 @@ function ApplicationDetailsContent(_ref) {
|
|
|
17274
17389
|
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet17 = detail.additionalDetails) === null || _detail$additionalDet17 === void 0 ? void 0 : _detail$additionalDet17.documents) && /*#__PURE__*/React__default.createElement(PropertyDocuments, {
|
|
17275
17390
|
documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet18 = detail.additionalDetails) === null || _detail$additionalDet18 === void 0 ? void 0 : _detail$additionalDet18.documents,
|
|
17276
17391
|
applicationStatus: applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus
|
|
17277
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.documents) &&
|
|
17392
|
+
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.documents) && ["PENDING_FOR_FIELD_INSPECTION", "PENDING_APPROVAL_FOR_CONNECTION", "PENDING_FOR_CONNECTION_ACTIVATION", "PENDING_FOR_RECONNECTION", "PENDING_FOR_DUE_VERIFICATION", "PENDING_FOR_BILLING_CLERK_REVIEW", "PENDING_FOR_ASO_APPROVAL", "PENDING_FOR_ZRO_APPROVAL", "PENDING_FOR_AE_APPROVAL", "PENDING_FOR_FINAL_PAYMENT", "CONNECTION_ACTIVATED", "PENDING_FOR_CONNECTION_ACTIVATION"].includes(applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) && /*#__PURE__*/React__default.createElement(DueVerification, {
|
|
17278
17393
|
applicationData: applicationData
|
|
17279
|
-
}), " ", (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.documents) &&
|
|
17394
|
+
}), " ", (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.documents) && ["PENDING_FOR_FIELD_INSPECTION", "PENDING_FOR_BILLING_CLERK_REVIEW", "PENDING_FOR_ASO_APPROVAL", "PENDING_FOR_ZRO_APPROVAL", "PENDING_FOR_AE_APPROVAL", "PENDING_FOR_FINAL_PAYMENT", "CONNECTION_ACTIVATED", "PENDING_FOR_CONNECTION_ACTIVATION"].includes(applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) && /*#__PURE__*/React__default.createElement(InspectionInformation, {
|
|
17280
17395
|
applicationData: applicationData
|
|
17281
17396
|
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet21 = detail.additionalDetails) === null || _detail$additionalDet21 === void 0 ? void 0 : _detail$additionalDet21.taxHeadEstimatesCalculation) && /*#__PURE__*/React__default.createElement(PropertyEstimates, {
|
|
17282
17397
|
taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet22 = detail.additionalDetails) === null || _detail$additionalDet22 === void 0 ? void 0 : _detail$additionalDet22.taxHeadEstimatesCalculation
|
|
@@ -18275,7 +18390,7 @@ const EmployeeApp = _ref => {
|
|
|
18275
18390
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ModuleHeader, {
|
|
18276
18391
|
leftContent: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ArrowLeft, {
|
|
18277
18392
|
className: "icon"
|
|
18278
|
-
}), "
|
|
18393
|
+
}), t("CS_COMMON_BACK")),
|
|
18279
18394
|
onLeftClick: () => window.history.back(),
|
|
18280
18395
|
breadcrumbs: breadcrumbs
|
|
18281
18396
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -19170,7 +19285,7 @@ const _excluded$4 = ["t", "config", "onSelect", "formData", "formState", "setErr
|
|
|
19170
19285
|
const NUMBER_PATTERN = /^\d+$/;
|
|
19171
19286
|
const DECIMAL_PATTERN = /^\d+(\.\d{1,2})?$/;
|
|
19172
19287
|
const PropertyWaterConnection = _ref => {
|
|
19173
|
-
var _formData$cpt2, _errors$useDetails, _errors$useDetails2, _errors$useDetails3, _errors$useDetails4, _errors$useDetails5, _errors$useDetails6, _errors$useDetails7, _errors$useDetails8, _errors$useDetails9, _errors$useDetails0, _errors$useDetails1, _errors$useDetails10, _errors$useDetails11, _errors$useDetails12;
|
|
19288
|
+
var _formData$cpt2, _errors$useDetails, _errors$useDetails2, _errors$useDetails3, _errors$useDetails4, _errors$useDetails5, _errors$useDetails6, _errors$useDetails7, _errors$useDetails8, _formValue$useDetails3, _formValue$useDetails4, _formValue$useDetails5, _formValue$useDetails6, _errors$useDetails9, _errors$useDetails0, _errors$useDetails1, _errors$useDetails10, _errors$useDetails11, _errors$useDetails12;
|
|
19174
19289
|
let t = _ref.t,
|
|
19175
19290
|
config = _ref.config,
|
|
19176
19291
|
onSelect = _ref.onSelect,
|
|
@@ -19193,7 +19308,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19193
19308
|
NumberofRooms: "",
|
|
19194
19309
|
numberOfBeds: "",
|
|
19195
19310
|
numberOfStudents: "",
|
|
19196
|
-
|
|
19311
|
+
servantQuarterArea: ""
|
|
19197
19312
|
}
|
|
19198
19313
|
}
|
|
19199
19314
|
}),
|
|
@@ -19203,7 +19318,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19203
19318
|
watch = _useForm.watch,
|
|
19204
19319
|
setValue = _useForm.setValue;
|
|
19205
19320
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
19206
|
-
const _Digit$Hooks$pt$usePr = Digit.Hooks.pt.usePropertyMDMS(tenantId, "PropertyTax", ["PropertyCategory", "PropertyType", "NoOfFloors", "PropertyNewUsageType"]),
|
|
19321
|
+
const _Digit$Hooks$pt$usePr = Digit.Hooks.pt.usePropertyMDMS(tenantId, "PropertyTax", ["PropertyCategory", "PropertyType", "NoOfFloors", "PropertyNewUsageType", "PropertyToUsageMapping"]),
|
|
19207
19322
|
ptServicesMastersData = _Digit$Hooks$pt$usePr.data;
|
|
19208
19323
|
const _Digit$Hooks$ws$useMD = Digit.Hooks.ws.useMDMS(tenantId, "ws-services-masters", ["WsCategoryType"]),
|
|
19209
19324
|
wsServicesMastersData = _Digit$Hooks$ws$useMD.data;
|
|
@@ -19229,10 +19344,10 @@ const PropertyWaterConnection = _ref => {
|
|
|
19229
19344
|
const watchPropertyType = watch("useDetails.propertyType");
|
|
19230
19345
|
const watchPropertyCategory = watch("useDetails.propertyCategory");
|
|
19231
19346
|
const watchWaterConnectionUsageType = watch("useDetails.WaterConnectionUsageType");
|
|
19232
|
-
const isHospitalProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOSPITAL_NURSING_HOME" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HospitalNursingHome";
|
|
19347
|
+
const isHospitalProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOSPITAL_NURSING_HOME" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "DharamshalasOrHostels" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HospitalNursingHome";
|
|
19233
19348
|
const isHotelRestaurantProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOTEL_OR_RESTAURANT" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HotelOrRestaurant";
|
|
19234
19349
|
const isSchoolCollegeProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "School" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "College";
|
|
19235
|
-
const isDwellingUnit = (
|
|
19350
|
+
const isDwellingUnit = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "Apartment" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "FlatOrApartment" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "IndividualHouse";
|
|
19236
19351
|
const isServentHouse = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "Apartment" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "FlatOrApartment" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "IndividualHouse";
|
|
19237
19352
|
const yearOptions = React.useMemo(() => {
|
|
19238
19353
|
const currentYear = new Date().getFullYear();
|
|
@@ -19247,10 +19362,9 @@ const PropertyWaterConnection = _ref => {
|
|
|
19247
19362
|
}, []);
|
|
19248
19363
|
const categoryOptions = React.useMemo(() => {
|
|
19249
19364
|
var _ptServicesMastersDat, _ptServicesMastersDat2;
|
|
19365
|
+
if (!(watchCategoryType !== null && watchCategoryType !== void 0 && watchCategoryType.code)) return [];
|
|
19250
19366
|
let options = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat === void 0 ? void 0 : (_ptServicesMastersDat2 = _ptServicesMastersDat.PropertyCategory) === null || _ptServicesMastersDat2 === void 0 ? void 0 : _ptServicesMastersDat2.filter(item => item.active)) || [];
|
|
19251
|
-
|
|
19252
|
-
options = options.filter(item => item.type === watchCategoryType.code);
|
|
19253
|
-
}
|
|
19367
|
+
options = options.filter(item => item.type === watchCategoryType.code);
|
|
19254
19368
|
return options.map(item => ({
|
|
19255
19369
|
code: item.code,
|
|
19256
19370
|
name: item.name
|
|
@@ -19265,16 +19379,18 @@ const PropertyWaterConnection = _ref => {
|
|
|
19265
19379
|
}
|
|
19266
19380
|
}, [watchCategoryType, categoryOptions, setValue, watchPropertyCategory]);
|
|
19267
19381
|
const propertyTypeOptions = React.useMemo(() => {
|
|
19268
|
-
var _ptServicesMastersDat3, _ptServicesMastersDat4;
|
|
19382
|
+
var _ptServicesMastersDat3, _ptServicesMastersDat4, _ptServicesMastersDat5, _watchPropertyCategor;
|
|
19383
|
+
if (!(watchPropertyCategory !== null && watchPropertyCategory !== void 0 && watchPropertyCategory.code)) return [];
|
|
19269
19384
|
let options = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat3 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat3 === void 0 ? void 0 : (_ptServicesMastersDat4 = _ptServicesMastersDat3.PropertyType) === null || _ptServicesMastersDat4 === void 0 ? void 0 : _ptServicesMastersDat4.filter(item => item.active)) || [];
|
|
19270
|
-
|
|
19271
|
-
|
|
19272
|
-
|
|
19273
|
-
|
|
19274
|
-
|
|
19275
|
-
|
|
19276
|
-
|
|
19277
|
-
|
|
19385
|
+
let mapping = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat5 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat5 === void 0 ? void 0 : _ptServicesMastersDat5.PropertyToUsageMapping) || [];
|
|
19386
|
+
if (mapping.length > 0) {
|
|
19387
|
+
options = options.filter(item => mapping.some(m => m.propertyTypeCode === item.code));
|
|
19388
|
+
}
|
|
19389
|
+
if ((watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : (_watchPropertyCategor = watchPropertyCategory.code) === null || _watchPropertyCategor === void 0 ? void 0 : _watchPropertyCategor.toUpperCase()) !== "MIXED") {
|
|
19390
|
+
options = options.filter(item => {
|
|
19391
|
+
var _item$type, _watchPropertyCategor2;
|
|
19392
|
+
return ((_item$type = item.type) === null || _item$type === void 0 ? void 0 : _item$type.toUpperCase()) === ((_watchPropertyCategor2 = watchPropertyCategory.code) === null || _watchPropertyCategor2 === void 0 ? void 0 : _watchPropertyCategor2.toUpperCase());
|
|
19393
|
+
});
|
|
19278
19394
|
}
|
|
19279
19395
|
return options.map(item => ({
|
|
19280
19396
|
code: item.code,
|
|
@@ -19290,22 +19406,21 @@ const PropertyWaterConnection = _ref => {
|
|
|
19290
19406
|
}
|
|
19291
19407
|
}, [watchPropertyCategory, propertyTypeOptions, setValue, watchPropertyType]);
|
|
19292
19408
|
const usageTypeOptions = React.useMemo(() => {
|
|
19293
|
-
var
|
|
19294
|
-
|
|
19295
|
-
|
|
19296
|
-
|
|
19297
|
-
|
|
19298
|
-
|
|
19299
|
-
|
|
19300
|
-
|
|
19301
|
-
|
|
19302
|
-
}
|
|
19409
|
+
var _ptServicesMastersDat6, _ptServicesMastersDat7, _ptServicesMastersDat8;
|
|
19410
|
+
if (!(watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code)) return [];
|
|
19411
|
+
let options = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat6 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat6 === void 0 ? void 0 : (_ptServicesMastersDat7 = _ptServicesMastersDat6.PropertyNewUsageType) === null || _ptServicesMastersDat7 === void 0 ? void 0 : _ptServicesMastersDat7.filter(item => item.active)) || [];
|
|
19412
|
+
let mapping = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat8 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat8 === void 0 ? void 0 : _ptServicesMastersDat8.PropertyToUsageMapping) || [];
|
|
19413
|
+
const selectedMapping = mapping.find(m => m.propertyTypeCode === watchPropertyType.code);
|
|
19414
|
+
if (selectedMapping && selectedMapping.allowedUsages) {
|
|
19415
|
+
options = options.filter(item => selectedMapping.allowedUsages.includes(item.code));
|
|
19416
|
+
} else {
|
|
19417
|
+
options = [];
|
|
19303
19418
|
}
|
|
19304
19419
|
return options.map(item => ({
|
|
19305
19420
|
code: item.code,
|
|
19306
19421
|
name: item.name
|
|
19307
19422
|
}));
|
|
19308
|
-
}, [ptServicesMastersData, watchPropertyCategory]);
|
|
19423
|
+
}, [ptServicesMastersData, watchPropertyCategory, watchPropertyType]);
|
|
19309
19424
|
React.useEffect(() => {
|
|
19310
19425
|
if (watchPropertyType && watchWaterConnectionUsageType) {
|
|
19311
19426
|
const isUsageTypeValid = usageTypeOptions.some(opt => opt.code === watchWaterConnectionUsageType.code);
|
|
@@ -19315,8 +19430,8 @@ const PropertyWaterConnection = _ref => {
|
|
|
19315
19430
|
}
|
|
19316
19431
|
}, [watchPropertyType, usageTypeOptions, setValue, watchWaterConnectionUsageType]);
|
|
19317
19432
|
const floorOptions = React.useMemo(() => {
|
|
19318
|
-
var
|
|
19319
|
-
return ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (
|
|
19433
|
+
var _ptServicesMastersDat9, _ptServicesMastersDat0;
|
|
19434
|
+
return ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat9 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat9 === void 0 ? void 0 : (_ptServicesMastersDat0 = _ptServicesMastersDat9.NoOfFloors) === null || _ptServicesMastersDat0 === void 0 ? void 0 : _ptServicesMastersDat0.filter(item => item.active).map(item => ({
|
|
19320
19435
|
code: item.code,
|
|
19321
19436
|
name: item.name
|
|
19322
19437
|
}));
|
|
@@ -19365,7 +19480,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19365
19480
|
setValue("useDetails.NumberofRooms", "");
|
|
19366
19481
|
setValue("useDetails.numberOfBeds", "");
|
|
19367
19482
|
setValue("useDetails.numberOfStudents", "");
|
|
19368
|
-
setValue("useDetails.
|
|
19483
|
+
setValue("useDetails.servantQuarterArea", "");
|
|
19369
19484
|
}
|
|
19370
19485
|
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt2 = formData.cpt) === null || _formData$cpt2 === void 0 ? void 0 : _formData$cpt2.details, formData === null || formData === void 0 ? void 0 : formData.cpt, categoryOptions, propertyTypeOptions, usageTypeOptions, floorOptions, yearOptions, categoryTypeList, setValue]);
|
|
19371
19486
|
const lastErrorState = React__default.useRef(null);
|
|
@@ -19501,7 +19616,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19501
19616
|
disabled: isPropertyFound
|
|
19502
19617
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails6 = errors.useDetails) === null || _errors$useDetails6 === void 0 ? void 0 : _errors$useDetails6.plotArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
19503
19618
|
style: errorStyle
|
|
19504
|
-
}, errors.useDetails.plotArea.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, "" + t("WS_BUILT_UP_AREA")), /*#__PURE__*/React__default.createElement("div", {
|
|
19619
|
+
}, errors.useDetails.plotArea.message), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, "" + t("WS_BUILT_UP_AREA")), /*#__PURE__*/React__default.createElement("div", {
|
|
19505
19620
|
className: "form-field"
|
|
19506
19621
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
19507
19622
|
t: t,
|
|
@@ -19515,7 +19630,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19515
19630
|
disabled: isPropertyFound
|
|
19516
19631
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails7 = errors.useDetails) === null || _errors$useDetails7 === void 0 ? void 0 : _errors$useDetails7.builtUpArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
19517
19632
|
style: errorStyle
|
|
19518
|
-
}, errors.useDetails.builtUpArea.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, "" + t("WS_FAR_AREA")), /*#__PURE__*/React__default.createElement("div", {
|
|
19633
|
+
}, errors.useDetails.builtUpArea.message)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, "" + t("WS_FAR_AREA")), /*#__PURE__*/React__default.createElement("div", {
|
|
19519
19634
|
className: "form-field"
|
|
19520
19635
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
19521
19636
|
t: t,
|
|
@@ -19523,13 +19638,26 @@ const PropertyWaterConnection = _ref => {
|
|
|
19523
19638
|
pattern: {
|
|
19524
19639
|
value: DECIMAL_PATTERN,
|
|
19525
19640
|
message: t("ERR_INVALID_DECIMAL")
|
|
19641
|
+
},
|
|
19642
|
+
validate: value => {
|
|
19643
|
+
var _formValue$useDetails, _formValue$useDetails2;
|
|
19644
|
+
if (formValue !== null && formValue !== void 0 && (_formValue$useDetails = formValue.useDetails) !== null && _formValue$useDetails !== void 0 && _formValue$useDetails.builtUpArea && parseFloat(value) > parseFloat(formValue === null || formValue === void 0 ? void 0 : (_formValue$useDetails2 = formValue.useDetails) === null || _formValue$useDetails2 === void 0 ? void 0 : _formValue$useDetails2.builtUpArea)) {
|
|
19645
|
+
return t("WS_FAR_AREA_IS_SMALLER_THAN_BUILT_UP_AREA");
|
|
19646
|
+
}
|
|
19526
19647
|
}
|
|
19527
19648
|
}),
|
|
19528
19649
|
name: "useDetails.farArea",
|
|
19529
19650
|
disabled: isPropertyFound
|
|
19530
19651
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails8 = errors.useDetails) === null || _errors$useDetails8 === void 0 ? void 0 : _errors$useDetails8.farArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
19531
19652
|
style: errorStyle
|
|
19532
|
-
}, errors.useDetails.farArea.message),
|
|
19653
|
+
}, errors.useDetails.farArea.message), (formValue === null || formValue === void 0 ? void 0 : (_formValue$useDetails3 = formValue.useDetails) === null || _formValue$useDetails3 === void 0 ? void 0 : _formValue$useDetails3.farArea) && (formValue === null || formValue === void 0 ? void 0 : (_formValue$useDetails4 = formValue.useDetails) === null || _formValue$useDetails4 === void 0 ? void 0 : _formValue$useDetails4.builtUpArea) && parseFloat(formValue === null || formValue === void 0 ? void 0 : (_formValue$useDetails5 = formValue.useDetails) === null || _formValue$useDetails5 === void 0 ? void 0 : _formValue$useDetails5.farArea) > parseFloat(formValue === null || formValue === void 0 ? void 0 : (_formValue$useDetails6 = formValue.useDetails) === null || _formValue$useDetails6 === void 0 ? void 0 : _formValue$useDetails6.builtUpArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
19654
|
+
style: {
|
|
19655
|
+
width: "70%",
|
|
19656
|
+
marginLeft: "30%",
|
|
19657
|
+
fontSize: "12px",
|
|
19658
|
+
marginTop: "5px"
|
|
19659
|
+
}
|
|
19660
|
+
}, t("WS_FAR_AREA_IS_SMALLER_THAN_BUILT_UP_AREA"))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_SELECT_YEAR_OF_CONSTRUCTION") + "*"), /*#__PURE__*/React__default.createElement("div", {
|
|
19533
19661
|
className: "form-field"
|
|
19534
19662
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
19535
19663
|
control: control,
|
|
@@ -19616,11 +19744,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
19616
19744
|
message: t("ERR_INVALID_NUMBER")
|
|
19617
19745
|
}
|
|
19618
19746
|
}),
|
|
19619
|
-
name: "useDetails.
|
|
19747
|
+
name: "useDetails.servantQuarterArea",
|
|
19620
19748
|
disabled: isPropertyFound
|
|
19621
|
-
}))) : null, isServentHouse && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails12 = errors.useDetails) === null || _errors$useDetails12 === void 0 ? void 0 : _errors$useDetails12.
|
|
19749
|
+
}))) : null, isServentHouse && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails12 = errors.useDetails) === null || _errors$useDetails12 === void 0 ? void 0 : _errors$useDetails12.servantQuarterArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
19622
19750
|
style: errorStyle
|
|
19623
|
-
}, errors.useDetails.
|
|
19751
|
+
}, errors.useDetails.servantQuarterArea.message)));
|
|
19624
19752
|
};
|
|
19625
19753
|
|
|
19626
19754
|
const SwitchComponent = props => {
|