@djb25/digit-ui-module-commonpt 1.0.22 → 1.0.24
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 +365 -67
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +365 -67
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -6030,13 +6030,14 @@ const setPropertyDetailsLW = data => {
|
|
|
6030
6030
|
farArea: useDetails === null || useDetails === void 0 ? void 0 : useDetails.farArea,
|
|
6031
6031
|
numberOfRooms: useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofRooms,
|
|
6032
6032
|
numberOfBeds: useDetails === null || useDetails === void 0 ? void 0 : useDetails.numberOfBeds,
|
|
6033
|
-
numberOfStudents: useDetails === null || useDetails === void 0 ? void 0 : useDetails.numberOfStudents
|
|
6033
|
+
numberOfStudents: useDetails === null || useDetails === void 0 ? void 0 : useDetails.numberOfStudents,
|
|
6034
|
+
servantQuarterArea: useDetails === null || useDetails === void 0 ? void 0 : useDetails.servantQuarterArea
|
|
6034
6035
|
};
|
|
6035
6036
|
data.propertyDetails = propertyDetails;
|
|
6036
6037
|
return data;
|
|
6037
6038
|
};
|
|
6038
6039
|
const convertToPropertyLightWeight = function (data) {
|
|
6039
|
-
var _data$propertyDetails, _data$propertyDetails2, _data, _data$owners2, _data$owners2$, _data$propertyDetails3, _data$propertyDetails4, _data$waterConnection, _data$waterConnection2, _data$waterConnection3, _data$useDetails, _data$useDetails$cate, _data$waterConnection4, _data$waterConnection5, _data$waterConnection6, _data$useDetails2, _data$useDetails2$Wat, _data$waterConnection7, _data$waterConnection8, _data$waterConnection9, _data$useDetails3, _data$useDetails3$Sel, _data$waterConnection0, _data$waterConnection1, _data$useDetails4, _data$waterConnection10, _data$waterConnection11, _data$useDetails5, _data$waterConnection12, _data$waterConnection13, _data$waterConnection14, _data$useDetails6, _data$useDetails6$noO, _data$waterConnection15, _data$waterConnection16, _data$useDetails7, _data$waterConnection17, _data$waterConnection18, _data$useDetails8, _data$waterConnection19, _data$waterConnection20, _data$useDetails9, _data$waterConnection21, _data$waterConnection22, _data$useDetails0, _data$waterConnection23, _data$waterConnection24, _data$useDetails1;
|
|
6040
|
+
var _data$propertyDetails, _data$propertyDetails2, _data, _data$owners2, _data$owners2$, _data$propertyDetails3, _data$propertyDetails4, _data$waterConnection, _data$waterConnection2, _data$waterConnection3, _data$useDetails, _data$useDetails$cate, _data$waterConnection4, _data$waterConnection5, _data$waterConnection6, _data$useDetails2, _data$useDetails2$Wat, _data$waterConnection7, _data$waterConnection8, _data$waterConnection9, _data$useDetails3, _data$useDetails3$Sel, _data$waterConnection0, _data$waterConnection1, _data$useDetails4, _data$waterConnection10, _data$waterConnection11, _data$useDetails5, _data$waterConnection12, _data$waterConnection13, _data$waterConnection14, _data$useDetails6, _data$useDetails6$noO, _data$waterConnection15, _data$waterConnection16, _data$useDetails7, _data$waterConnection17, _data$waterConnection18, _data$useDetails8, _data$waterConnection19, _data$waterConnection20, _data$useDetails9, _data$waterConnection21, _data$waterConnection22, _data$useDetails0, _data$waterConnection23, _data$waterConnection24, _data$useDetails1, _data$waterConnection25, _data$waterConnection26, _data$useDetails10;
|
|
6040
6041
|
if (data === void 0) {
|
|
6041
6042
|
data = {};
|
|
6042
6043
|
}
|
|
@@ -6091,8 +6092,9 @@ const convertToPropertyLightWeight = function (data) {
|
|
|
6091
6092
|
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),
|
|
6092
6093
|
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),
|
|
6093
6094
|
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),
|
|
6094
|
-
|
|
6095
|
-
|
|
6095
|
+
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),
|
|
6096
|
+
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),
|
|
6097
|
+
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),
|
|
6096
6098
|
owners: [...(data.owners || []).map((owner, index) => {
|
|
6097
6099
|
var _owner$gender3, _owner$gender4, _owner$ownerType2, _owner$relationship2, _owner$inistitutetype2;
|
|
6098
6100
|
return _extends({}, owner, {
|
|
@@ -6130,7 +6132,7 @@ const convertToPropertyLightWeight = function (data) {
|
|
|
6130
6132
|
return formdata;
|
|
6131
6133
|
};
|
|
6132
6134
|
const convertToUpdatePropertyLightWeight = function (data) {
|
|
6133
|
-
var _data$propertyDetails5, _data$propertyDetails6, _data$
|
|
6135
|
+
var _data$propertyDetails5, _data$propertyDetails6, _data$waterConnection27, _data$waterConnection28, _data$waterConnection29, _data$useDetails11, _data$useDetails11$ca, _data$waterConnection30, _data$waterConnection31, _data$waterConnection32, _data$useDetails12, _data$useDetails12$Wa, _data$waterConnection33, _data$waterConnection34, _data$waterConnection35, _data$useDetails13, _data$useDetails13$Se, _data$waterConnection36, _data$waterConnection37, _data$useDetails14, _data$waterConnection38, _data$waterConnection39, _data$useDetails15, _data$waterConnection40, _data$waterConnection41, _data$waterConnection42, _data$useDetails16, _data$useDetails16$no, _data$waterConnection43, _data$waterConnection44, _data$useDetails17, _data$waterConnection45, _data$waterConnection46, _data$useDetails18, _data$waterConnection47, _data$waterConnection48, _data$useDetails19, _data$waterConnection49, _data$waterConnection50, _data$useDetails20, _data$waterConnection51, _data$waterConnection52, _data$useDetails21, _data$waterConnection53, _data$waterConnection54, _data$useDetails22, _formdata$Property, _data3, _formdata$Property3;
|
|
6134
6136
|
if (data === void 0) {
|
|
6135
6137
|
data = {};
|
|
6136
6138
|
}
|
|
@@ -6177,17 +6179,18 @@ const convertToUpdatePropertyLightWeight = function (data) {
|
|
|
6177
6179
|
noOfFloors: noOfFloors,
|
|
6178
6180
|
additionalDetails: {
|
|
6179
6181
|
isRainwaterHarvesting: false,
|
|
6180
|
-
categoryType: ((_data$
|
|
6181
|
-
waterConnectionUsageType: ((_data$
|
|
6182
|
-
yearOfConstruction: ((_data$
|
|
6183
|
-
numberOfDwellingUnits: ((_data$
|
|
6184
|
-
numberOfRooms: ((_data$
|
|
6185
|
-
numberOfFloors: ((_data$
|
|
6186
|
-
plotArea: ((_data$
|
|
6187
|
-
builtUpArea: ((_data$
|
|
6188
|
-
farArea: ((_data$
|
|
6189
|
-
|
|
6190
|
-
|
|
6182
|
+
categoryType: ((_data$waterConnection27 = data.waterConnection) === null || _data$waterConnection27 === void 0 ? void 0 : (_data$waterConnection28 = _data$waterConnection27.useDetails) === null || _data$waterConnection28 === void 0 ? void 0 : (_data$waterConnection29 = _data$waterConnection28.categoryType) === null || _data$waterConnection29 === void 0 ? void 0 : _data$waterConnection29.code) || ((_data$useDetails11 = data.useDetails) === null || _data$useDetails11 === void 0 ? void 0 : (_data$useDetails11$ca = _data$useDetails11.categoryType) === null || _data$useDetails11$ca === void 0 ? void 0 : _data$useDetails11$ca.code),
|
|
6183
|
+
waterConnectionUsageType: ((_data$waterConnection30 = data.waterConnection) === null || _data$waterConnection30 === void 0 ? void 0 : (_data$waterConnection31 = _data$waterConnection30.useDetails) === null || _data$waterConnection31 === void 0 ? void 0 : (_data$waterConnection32 = _data$waterConnection31.WaterConnectionUsageType) === null || _data$waterConnection32 === void 0 ? void 0 : _data$waterConnection32.code) || ((_data$useDetails12 = data.useDetails) === null || _data$useDetails12 === void 0 ? void 0 : (_data$useDetails12$Wa = _data$useDetails12.WaterConnectionUsageType) === null || _data$useDetails12$Wa === void 0 ? void 0 : _data$useDetails12$Wa.code),
|
|
6184
|
+
yearOfConstruction: ((_data$waterConnection33 = data.waterConnection) === null || _data$waterConnection33 === void 0 ? void 0 : (_data$waterConnection34 = _data$waterConnection33.useDetails) === null || _data$waterConnection34 === void 0 ? void 0 : (_data$waterConnection35 = _data$waterConnection34.SelectYearofConstruction) === null || _data$waterConnection35 === void 0 ? void 0 : _data$waterConnection35.value) || ((_data$useDetails13 = data.useDetails) === null || _data$useDetails13 === void 0 ? void 0 : (_data$useDetails13$Se = _data$useDetails13.SelectYearofConstruction) === null || _data$useDetails13$Se === void 0 ? void 0 : _data$useDetails13$Se.value),
|
|
6185
|
+
numberOfDwellingUnits: ((_data$waterConnection36 = data.waterConnection) === null || _data$waterConnection36 === void 0 ? void 0 : (_data$waterConnection37 = _data$waterConnection36.useDetails) === null || _data$waterConnection37 === void 0 ? void 0 : _data$waterConnection37.NumberofDwellingUnits) || ((_data$useDetails14 = data.useDetails) === null || _data$useDetails14 === void 0 ? void 0 : _data$useDetails14.NumberofDwellingUnits),
|
|
6186
|
+
numberOfRooms: ((_data$waterConnection38 = data.waterConnection) === null || _data$waterConnection38 === void 0 ? void 0 : (_data$waterConnection39 = _data$waterConnection38.useDetails) === null || _data$waterConnection39 === void 0 ? void 0 : _data$waterConnection39.NumberofRooms) || ((_data$useDetails15 = data.useDetails) === null || _data$useDetails15 === void 0 ? void 0 : _data$useDetails15.NumberofRooms),
|
|
6187
|
+
numberOfFloors: ((_data$waterConnection40 = data.waterConnection) === null || _data$waterConnection40 === void 0 ? void 0 : (_data$waterConnection41 = _data$waterConnection40.useDetails) === null || _data$waterConnection41 === void 0 ? void 0 : (_data$waterConnection42 = _data$waterConnection41.noOfFloors) === null || _data$waterConnection42 === void 0 ? void 0 : _data$waterConnection42.code) || ((_data$useDetails16 = data.useDetails) === null || _data$useDetails16 === void 0 ? void 0 : (_data$useDetails16$no = _data$useDetails16.noOfFloors) === null || _data$useDetails16$no === void 0 ? void 0 : _data$useDetails16$no.code) || 1,
|
|
6188
|
+
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),
|
|
6189
|
+
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),
|
|
6190
|
+
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),
|
|
6191
|
+
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),
|
|
6192
|
+
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),
|
|
6193
|
+
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),
|
|
6191
6194
|
owners: [...data.owners.map((owner, index) => {
|
|
6192
6195
|
var _owner$gender6, _owner$ownerType4, _owner$relationship4, _owner$inistitutetype4;
|
|
6193
6196
|
return _extends({}, owner, {
|
|
@@ -15831,8 +15834,10 @@ const InfoDetails = _ref2 => {
|
|
|
15831
15834
|
};
|
|
15832
15835
|
|
|
15833
15836
|
const ViewBreakup = _ref => {
|
|
15834
|
-
var
|
|
15835
|
-
let wsAdditionalDetails = _ref.wsAdditionalDetails
|
|
15837
|
+
var _breakUpData$calculat, _breakUpData$calculat2, _breakUpData$calculat3, _wsAdditionalDetails$8, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
|
|
15838
|
+
let wsAdditionalDetails = _ref.wsAdditionalDetails,
|
|
15839
|
+
print = _ref.print,
|
|
15840
|
+
download = _ref.download;
|
|
15836
15841
|
const _useTranslation = useTranslation(),
|
|
15837
15842
|
t = _useTranslation.t;
|
|
15838
15843
|
const _useState = useState(false),
|
|
@@ -15841,6 +15846,44 @@ const ViewBreakup = _ref => {
|
|
|
15841
15846
|
const _useState2 = useState({}),
|
|
15842
15847
|
breakUpData = _useState2[0],
|
|
15843
15848
|
setBreakUpData = _useState2[1];
|
|
15849
|
+
const breakupRef = useRef(null);
|
|
15850
|
+
const formatNumber = function (value, maximumFractionDigits) {
|
|
15851
|
+
if (maximumFractionDigits === void 0) {
|
|
15852
|
+
maximumFractionDigits = 2;
|
|
15853
|
+
}
|
|
15854
|
+
return Number(value || 0).toLocaleString("en-IN", {
|
|
15855
|
+
maximumFractionDigits
|
|
15856
|
+
});
|
|
15857
|
+
};
|
|
15858
|
+
const formatCurrency = value => /*#__PURE__*/React.createElement("span", null, "\u20B9", formatNumber(value));
|
|
15859
|
+
const DetailRows = _ref2 => {
|
|
15860
|
+
let rows = _ref2.rows;
|
|
15861
|
+
return rows.map(_ref3 => {
|
|
15862
|
+
let label = _ref3.label,
|
|
15863
|
+
value = _ref3.value,
|
|
15864
|
+
_ref3$currency = _ref3.currency,
|
|
15865
|
+
currency = _ref3$currency === void 0 ? false : _ref3$currency,
|
|
15866
|
+
_ref3$unit = _ref3.unit,
|
|
15867
|
+
unit = _ref3$unit === void 0 ? "" : _ref3$unit,
|
|
15868
|
+
_ref3$isText = _ref3.isText,
|
|
15869
|
+
isText = _ref3$isText === void 0 ? false : _ref3$isText;
|
|
15870
|
+
return /*#__PURE__*/React.createElement(Row, {
|
|
15871
|
+
className: "border-none",
|
|
15872
|
+
rowContainerStyle: {
|
|
15873
|
+
margin: "0px"
|
|
15874
|
+
},
|
|
15875
|
+
labelStyle: {
|
|
15876
|
+
width: "50%"
|
|
15877
|
+
},
|
|
15878
|
+
key: label,
|
|
15879
|
+
label: label,
|
|
15880
|
+
text: currency ? formatCurrency(value) : isText ? value || "-" : "" + formatNumber(value) + unit,
|
|
15881
|
+
textStyle: {
|
|
15882
|
+
textAlign: "right"
|
|
15883
|
+
}
|
|
15884
|
+
});
|
|
15885
|
+
});
|
|
15886
|
+
};
|
|
15844
15887
|
const Heading = props => {
|
|
15845
15888
|
return /*#__PURE__*/React.createElement("h1", {
|
|
15846
15889
|
className: "heading-m"
|
|
@@ -15863,21 +15906,244 @@ const ViewBreakup = _ref => {
|
|
|
15863
15906
|
}, /*#__PURE__*/React.createElement(Close, null));
|
|
15864
15907
|
};
|
|
15865
15908
|
const onPopupOpen = () => {
|
|
15866
|
-
var _sessionBillFormData$;
|
|
15867
|
-
let breakupData = wsAdditionalDetails.additionalDetails
|
|
15909
|
+
var _wsAdditionalDetails$, _sessionBillFormData$;
|
|
15910
|
+
let breakupData = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$ = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$ === void 0 ? void 0 : _wsAdditionalDetails$.data) || {};
|
|
15868
15911
|
const sessionBillData = sessionStorage.getItem("Digit.ADHOC_BILL_ADD_REBATE_DATA");
|
|
15869
15912
|
const sessionBillFormData = sessionBillData ? JSON.parse(sessionBillData) : {};
|
|
15870
15913
|
if (sessionBillFormData !== null && sessionBillFormData !== void 0 && (_sessionBillFormData$ = sessionBillFormData.value) !== null && _sessionBillFormData$ !== void 0 && _sessionBillFormData$.totalAmount) breakupData = sessionBillFormData === null || sessionBillFormData === void 0 ? void 0 : sessionBillFormData.value;
|
|
15871
15914
|
setBreakUpData(breakupData);
|
|
15872
15915
|
showPopUp(true);
|
|
15873
15916
|
};
|
|
15917
|
+
const getBreakupReportDetails = () => {
|
|
15918
|
+
var _wsAdditionalDetails$2, _wsAdditionalDetails$3, _wsAdditionalDetails$4, _wsAdditionalDetails$5, _wsAdditionalDetails$6, _wsAdditionalDetails$7, _breakUpData$billSlab, _breakUpData$billSlab2, _breakUpData$billSlab3;
|
|
15919
|
+
const amountRows = function (rows) {
|
|
15920
|
+
if (rows === void 0) {
|
|
15921
|
+
rows = [];
|
|
15922
|
+
}
|
|
15923
|
+
return rows.map(row => ({
|
|
15924
|
+
title: t(row === null || row === void 0 ? void 0 : row.taxHeadCode),
|
|
15925
|
+
value: "\u20B9" + formatNumber(row === null || row === void 0 ? void 0 : row.amount)
|
|
15926
|
+
}));
|
|
15927
|
+
};
|
|
15928
|
+
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];
|
|
15929
|
+
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(" ") || "-";
|
|
15930
|
+
const mobileNumber = (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.mobileNumber) || "-";
|
|
15931
|
+
const appNumber = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$5 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$5 === void 0 ? void 0 : (_wsAdditionalDetails$6 = _wsAdditionalDetails$5.data) === null || _wsAdditionalDetails$6 === void 0 ? void 0 : _wsAdditionalDetails$6.applicationNo) || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$7 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$7 === void 0 ? void 0 : _wsAdditionalDetails$7.applicationNumber) || "-";
|
|
15932
|
+
return [{
|
|
15933
|
+
title: "Applicant Details",
|
|
15934
|
+
values: [{
|
|
15935
|
+
title: "Application Number",
|
|
15936
|
+
value: appNumber
|
|
15937
|
+
}, {
|
|
15938
|
+
title: "Applicant Name",
|
|
15939
|
+
value: applicantName
|
|
15940
|
+
}, {
|
|
15941
|
+
title: "Mobile Number",
|
|
15942
|
+
value: mobileNumber
|
|
15943
|
+
}]
|
|
15944
|
+
}, {
|
|
15945
|
+
title: t("WS_APPLICATION_FEE_HEADER"),
|
|
15946
|
+
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) || [])])
|
|
15947
|
+
}, {
|
|
15948
|
+
title: "Property details",
|
|
15949
|
+
values: propertyRows.map(_ref4 => {
|
|
15950
|
+
let label = _ref4.label,
|
|
15951
|
+
value = _ref4.value,
|
|
15952
|
+
currency = _ref4.currency,
|
|
15953
|
+
unit = _ref4.unit,
|
|
15954
|
+
isText = _ref4.isText;
|
|
15955
|
+
return {
|
|
15956
|
+
title: label,
|
|
15957
|
+
value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
|
|
15958
|
+
};
|
|
15959
|
+
})
|
|
15960
|
+
}, {
|
|
15961
|
+
title: "Taxes",
|
|
15962
|
+
values: amountRows(breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab3 = breakUpData.billSlabData) === null || _breakUpData$billSlab3 === void 0 ? void 0 : _breakUpData$billSlab3.TAX)
|
|
15963
|
+
}, {
|
|
15964
|
+
title: "Water demand details",
|
|
15965
|
+
values: waterDemandRows.map(_ref5 => {
|
|
15966
|
+
let label = _ref5.label,
|
|
15967
|
+
value = _ref5.value,
|
|
15968
|
+
currency = _ref5.currency,
|
|
15969
|
+
unit = _ref5.unit,
|
|
15970
|
+
isText = _ref5.isText;
|
|
15971
|
+
return {
|
|
15972
|
+
title: label,
|
|
15973
|
+
value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
|
|
15974
|
+
};
|
|
15975
|
+
})
|
|
15976
|
+
}, {
|
|
15977
|
+
title: "Infrastructure charge details",
|
|
15978
|
+
values: infrastructureChargeRows.map(_ref6 => {
|
|
15979
|
+
let label = _ref6.label,
|
|
15980
|
+
value = _ref6.value,
|
|
15981
|
+
currency = _ref6.currency,
|
|
15982
|
+
unit = _ref6.unit,
|
|
15983
|
+
isText = _ref6.isText;
|
|
15984
|
+
return {
|
|
15985
|
+
title: label,
|
|
15986
|
+
value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
|
|
15987
|
+
};
|
|
15988
|
+
})
|
|
15989
|
+
}, {
|
|
15990
|
+
title: "Total",
|
|
15991
|
+
values: [{
|
|
15992
|
+
title: t("PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT"),
|
|
15993
|
+
value: "\u20B9" + formatNumber(breakUpData === null || breakUpData === void 0 ? void 0 : breakUpData.totalAmount)
|
|
15994
|
+
}]
|
|
15995
|
+
}].filter(section => section.values.length > 0);
|
|
15996
|
+
};
|
|
15997
|
+
const generateBreakupReport = mode => {
|
|
15998
|
+
var _Digit$Utils, _Digit$Utils$pdf;
|
|
15999
|
+
const generateReport = (_Digit$Utils = Digit.Utils) === null || _Digit$Utils === void 0 ? void 0 : (_Digit$Utils$pdf = _Digit$Utils.pdf) === null || _Digit$Utils$pdf === void 0 ? void 0 : _Digit$Utils$pdf.generateCalculationBreakupReport;
|
|
16000
|
+
if (typeof generateReport === "function") {
|
|
16001
|
+
return generateReport({
|
|
16002
|
+
tenantId: Digit.ULBService.getCurrentTenantId(),
|
|
16003
|
+
heading: t("WS_CALCULATION_BREAKUP"),
|
|
16004
|
+
details: getBreakupReportDetails(),
|
|
16005
|
+
t,
|
|
16006
|
+
mode
|
|
16007
|
+
});
|
|
16008
|
+
}
|
|
16009
|
+
return mode === "download" ? Digit.Download.PDF(breakupRef, t("WS_CALCULATION_BREAKUP")) : null;
|
|
16010
|
+
};
|
|
16011
|
+
const handleDownload = () => generateBreakupReport("download");
|
|
16012
|
+
const handlePrint = () => {
|
|
16013
|
+
var _Digit$Utils2, _Digit$Utils2$pdf, _breakupRef$current, _window$mSewaApp, _window$mSewaApp$isMs;
|
|
16014
|
+
if ((_Digit$Utils2 = Digit.Utils) !== null && _Digit$Utils2 !== void 0 && (_Digit$Utils2$pdf = _Digit$Utils2.pdf) !== null && _Digit$Utils2$pdf !== void 0 && _Digit$Utils2$pdf.generateCalculationBreakupReport) {
|
|
16015
|
+
return generateBreakupReport("print");
|
|
16016
|
+
}
|
|
16017
|
+
const content = (_breakupRef$current = breakupRef.current) === null || _breakupRef$current === void 0 ? void 0 : _breakupRef$current.innerHTML;
|
|
16018
|
+
if (!content) return;
|
|
16019
|
+
if ((_window$mSewaApp = window.mSewaApp) !== null && _window$mSewaApp !== void 0 && (_window$mSewaApp$isMs = _window$mSewaApp.isMsewaApp) !== null && _window$mSewaApp$isMs !== void 0 && _window$mSewaApp$isMs.call(_window$mSewaApp)) {
|
|
16020
|
+
window.mSewaApp.downloadBase64File(window.btoa(unescape(encodeURIComponent(content))), t("WS_CALCULATION_BREAKUP"));
|
|
16021
|
+
return;
|
|
16022
|
+
}
|
|
16023
|
+
const printWindow = window.open("", "");
|
|
16024
|
+
if (!printWindow) return;
|
|
16025
|
+
printWindow.document.write("<html><body>" + content + "</body></html>");
|
|
16026
|
+
printWindow.document.close();
|
|
16027
|
+
printWindow.focus();
|
|
16028
|
+
printWindow.print();
|
|
16029
|
+
};
|
|
16030
|
+
const propertyDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat = breakUpData.calculationDetail) === null || _breakUpData$calculat === void 0 ? void 0 : _breakUpData$calculat.propertyDetail;
|
|
16031
|
+
const waterDemandDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat2 = breakUpData.calculationDetail) === null || _breakUpData$calculat2 === void 0 ? void 0 : _breakUpData$calculat2.waterDemandDetail;
|
|
16032
|
+
const infrastructureChargeDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat3 = breakUpData.calculationDetail) === null || _breakUpData$calculat3 === void 0 ? void 0 : _breakUpData$calculat3.infrastructureChargeDetail;
|
|
16033
|
+
const propertyRows = propertyDetail ? [{
|
|
16034
|
+
label: "Property ID",
|
|
16035
|
+
value: propertyDetail.propertyId,
|
|
16036
|
+
isText: true
|
|
16037
|
+
}, {
|
|
16038
|
+
label: "Property type",
|
|
16039
|
+
value: propertyDetail.propertyType,
|
|
16040
|
+
isText: true
|
|
16041
|
+
}, {
|
|
16042
|
+
label: "Plot area",
|
|
16043
|
+
value: propertyDetail.landArea,
|
|
16044
|
+
unit: " (sq. meter.)"
|
|
16045
|
+
}, {
|
|
16046
|
+
label: "Built-up area",
|
|
16047
|
+
value: propertyDetail.superBuiltUpArea,
|
|
16048
|
+
unit: " (sq. meter.)"
|
|
16049
|
+
}, {
|
|
16050
|
+
label: "farArea",
|
|
16051
|
+
value: propertyDetail.farArea,
|
|
16052
|
+
isText: true
|
|
16053
|
+
}, {
|
|
16054
|
+
label: "coveredArea",
|
|
16055
|
+
value: propertyDetail.coveredArea,
|
|
16056
|
+
isText: true
|
|
16057
|
+
}, {
|
|
16058
|
+
label: "numberOfDwellingUnits",
|
|
16059
|
+
value: propertyDetail.numberOfDwellingUnits,
|
|
16060
|
+
isText: true
|
|
16061
|
+
}, {
|
|
16062
|
+
label: "numberOfBeds",
|
|
16063
|
+
value: propertyDetail.numberOfBeds,
|
|
16064
|
+
isText: true
|
|
16065
|
+
}, {
|
|
16066
|
+
label: "numberOfRooms",
|
|
16067
|
+
value: propertyDetail.numberOfRooms,
|
|
16068
|
+
isText: true
|
|
16069
|
+
}, {
|
|
16070
|
+
label: "numberOfStudents",
|
|
16071
|
+
value: propertyDetail.numberOfStudents,
|
|
16072
|
+
isText: true
|
|
16073
|
+
}, {
|
|
16074
|
+
label: "numberOfStaff",
|
|
16075
|
+
value: propertyDetail.numberOfStaff,
|
|
16076
|
+
isText: true
|
|
16077
|
+
}, {
|
|
16078
|
+
label: "Usage category",
|
|
16079
|
+
value: propertyDetail.usageCategory,
|
|
16080
|
+
isText: true
|
|
16081
|
+
}] : [];
|
|
16082
|
+
const waterDemandRows = waterDemandDetail ? [{
|
|
16083
|
+
label: "Calculated occupancy",
|
|
16084
|
+
value: waterDemandDetail.calculatedOccupancy,
|
|
16085
|
+
unit: " person"
|
|
16086
|
+
}, {
|
|
16087
|
+
label: "Applied LPCD",
|
|
16088
|
+
value: waterDemandDetail.chosenLpcd,
|
|
16089
|
+
unit: " LPD"
|
|
16090
|
+
}, {
|
|
16091
|
+
label: "Base demand",
|
|
16092
|
+
value: waterDemandDetail.baseDemand,
|
|
16093
|
+
unit: " LPD"
|
|
16094
|
+
}, {
|
|
16095
|
+
label: "Contingency/Floating Occupancy",
|
|
16096
|
+
value: waterDemandDetail.contingencyPercentage,
|
|
16097
|
+
unit: "%"
|
|
16098
|
+
}, {
|
|
16099
|
+
label: "Total water demand",
|
|
16100
|
+
value: waterDemandDetail.totalWaterDemandLPD,
|
|
16101
|
+
unit: " LPD"
|
|
16102
|
+
}] : [];
|
|
16103
|
+
const infrastructureChargeRows = infrastructureChargeDetail ? [{
|
|
16104
|
+
label: "Colony category",
|
|
16105
|
+
value: infrastructureChargeDetail.colonyCategory,
|
|
16106
|
+
isText: true
|
|
16107
|
+
}, {
|
|
16108
|
+
label: "Plot area",
|
|
16109
|
+
value: infrastructureChargeDetail.plotArea,
|
|
16110
|
+
unit: " (sq. meter.)"
|
|
16111
|
+
}, {
|
|
16112
|
+
label: "Water rate",
|
|
16113
|
+
value: infrastructureChargeDetail.waterRatePerLPD,
|
|
16114
|
+
currency: true
|
|
16115
|
+
}, {
|
|
16116
|
+
label: "Sewer rate",
|
|
16117
|
+
value: infrastructureChargeDetail.sewerRatePerLPD,
|
|
16118
|
+
currency: true
|
|
16119
|
+
}, {
|
|
16120
|
+
label: "Water Infra Charges",
|
|
16121
|
+
value: infrastructureChargeDetail.waterComponentIFC,
|
|
16122
|
+
currency: true
|
|
16123
|
+
}, {
|
|
16124
|
+
label: "Sewer Infra Charges",
|
|
16125
|
+
value: infrastructureChargeDetail.sewerComponentIFC,
|
|
16126
|
+
currency: true
|
|
16127
|
+
}, {
|
|
16128
|
+
label: "Rebate",
|
|
16129
|
+
value: infrastructureChargeDetail.rebatePercentage,
|
|
16130
|
+
unit: "%"
|
|
16131
|
+
}, {
|
|
16132
|
+
label: "Rebate amount",
|
|
16133
|
+
value: infrastructureChargeDetail.rebateAmount,
|
|
16134
|
+
currency: true
|
|
16135
|
+
}, {
|
|
16136
|
+
label: "Net IFC",
|
|
16137
|
+
value: infrastructureChargeDetail.netIFC,
|
|
16138
|
+
currency: true
|
|
16139
|
+
}] : [];
|
|
15874
16140
|
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("div", {
|
|
15875
16141
|
style: {
|
|
15876
16142
|
lineHeight: "19px",
|
|
15877
16143
|
maxWidth: "950px",
|
|
15878
16144
|
minWidth: "280px"
|
|
15879
16145
|
}
|
|
15880
|
-
}, wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$ = wsAdditionalDetails.additionalDetails) !== null && _wsAdditionalDetails$ !== void 0 && _wsAdditionalDetails
|
|
16146
|
+
}, wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$8 = wsAdditionalDetails.additionalDetails) !== null && _wsAdditionalDetails$8 !== void 0 && _wsAdditionalDetails$8.isViewBreakup ? /*#__PURE__*/React.createElement("div", {
|
|
15881
16147
|
onClick: e => onPopupOpen(),
|
|
15882
16148
|
style: {
|
|
15883
16149
|
marginTop: "12px"
|
|
@@ -15888,6 +16154,9 @@ const ViewBreakup = _ref => {
|
|
|
15888
16154
|
headerBarMain: /*#__PURE__*/React.createElement(Heading, {
|
|
15889
16155
|
label: t("WS_CALCULATION_BREAKUP")
|
|
15890
16156
|
}),
|
|
16157
|
+
width: "950px",
|
|
16158
|
+
print: print || handlePrint,
|
|
16159
|
+
download: download || handleDownload,
|
|
15891
16160
|
headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn, {
|
|
15892
16161
|
onClick: () => {
|
|
15893
16162
|
showPopUp(false);
|
|
@@ -15903,16 +16172,13 @@ const ViewBreakup = _ref => {
|
|
|
15903
16172
|
popupModuleMianStyles: {
|
|
15904
16173
|
paddingTop: "0px"
|
|
15905
16174
|
}
|
|
15906
|
-
}, /*#__PURE__*/React.createElement(
|
|
15907
|
-
|
|
15908
|
-
|
|
15909
|
-
paddingTop: "0px"
|
|
15910
|
-
}
|
|
15911
|
-
}, /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
16175
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
16176
|
+
ref: breakupRef
|
|
16177
|
+
}, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
15912
16178
|
style: {
|
|
15913
16179
|
margin: "10px 0px"
|
|
15914
16180
|
}
|
|
15915
|
-
}, t("WS_APPLICATION_FEE_HEADER")), breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$
|
|
16181
|
+
}, 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 => /*#__PURE__*/React.createElement(Row, {
|
|
15916
16182
|
className: "border-none",
|
|
15917
16183
|
rowContainerStyle: {
|
|
15918
16184
|
margin: "0px"
|
|
@@ -15926,11 +16192,7 @@ const ViewBreakup = _ref => {
|
|
|
15926
16192
|
textStyle: {
|
|
15927
16193
|
textAlign: "right"
|
|
15928
16194
|
}
|
|
15929
|
-
})), /*#__PURE__*/React.createElement(
|
|
15930
|
-
style: {
|
|
15931
|
-
margin: "10px 0px"
|
|
15932
|
-
}
|
|
15933
|
-
}, t("WS_SERVICE_FEE_HEADER")), breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab3 = breakUpData.billSlabData) === null || _breakUpData$billSlab3 === void 0 ? void 0 : (_breakUpData$billSlab4 = _breakUpData$billSlab3.CHARGES) === null || _breakUpData$billSlab4 === void 0 ? void 0 : _breakUpData$billSlab4.map(data => /*#__PURE__*/React.createElement(Row, {
|
|
16195
|
+
})), 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 => /*#__PURE__*/React.createElement(Row, {
|
|
15934
16196
|
className: "border-none",
|
|
15935
16197
|
rowContainerStyle: {
|
|
15936
16198
|
margin: "0px"
|
|
@@ -15944,7 +16206,7 @@ const ViewBreakup = _ref => {
|
|
|
15944
16206
|
textStyle: {
|
|
15945
16207
|
textAlign: "right"
|
|
15946
16208
|
}
|
|
15947
|
-
})), breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$
|
|
16209
|
+
})), 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 => /*#__PURE__*/React.createElement(Row, {
|
|
15948
16210
|
className: "border-none",
|
|
15949
16211
|
rowContainerStyle: {
|
|
15950
16212
|
margin: "0px"
|
|
@@ -15958,6 +16220,24 @@ const ViewBreakup = _ref => {
|
|
|
15958
16220
|
textStyle: {
|
|
15959
16221
|
textAlign: "right"
|
|
15960
16222
|
}
|
|
16223
|
+
})), propertyRows.length > 0 && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
16224
|
+
style: {
|
|
16225
|
+
margin: "10px 0px"
|
|
16226
|
+
}
|
|
16227
|
+
}, "Property details"), /*#__PURE__*/React.createElement(DetailRows, {
|
|
16228
|
+
rows: propertyRows
|
|
16229
|
+
})), waterDemandRows.length > 0 && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
16230
|
+
style: {
|
|
16231
|
+
margin: "10px 0px"
|
|
16232
|
+
}
|
|
16233
|
+
}, "Water demand details"), /*#__PURE__*/React.createElement(DetailRows, {
|
|
16234
|
+
rows: waterDemandRows
|
|
16235
|
+
})), infrastructureChargeRows.length > 0 && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
16236
|
+
style: {
|
|
16237
|
+
margin: "10px 0px"
|
|
16238
|
+
}
|
|
16239
|
+
}, "Infrastructure charge details"), /*#__PURE__*/React.createElement(DetailRows, {
|
|
16240
|
+
rows: infrastructureChargeRows
|
|
15961
16241
|
})), /*#__PURE__*/React.createElement("hr", {
|
|
15962
16242
|
style: {
|
|
15963
16243
|
color: "#cccccc",
|
|
@@ -15980,7 +16260,7 @@ const ViewBreakup = _ref => {
|
|
|
15980
16260
|
fontWeight: "700",
|
|
15981
16261
|
fontSize: "24px"
|
|
15982
16262
|
}
|
|
15983
|
-
})))));
|
|
16263
|
+
}))))));
|
|
15984
16264
|
};
|
|
15985
16265
|
|
|
15986
16266
|
const styles = {
|
|
@@ -18956,7 +19236,7 @@ const _excluded$4 = ["t", "config", "onSelect", "formData", "formState", "setErr
|
|
|
18956
19236
|
const NUMBER_PATTERN = /^\d+$/;
|
|
18957
19237
|
const DECIMAL_PATTERN = /^\d+(\.\d{1,2})?$/;
|
|
18958
19238
|
const PropertyWaterConnection = _ref => {
|
|
18959
|
-
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;
|
|
19239
|
+
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;
|
|
18960
19240
|
let t = _ref.t,
|
|
18961
19241
|
config = _ref.config,
|
|
18962
19242
|
onSelect = _ref.onSelect,
|
|
@@ -18978,7 +19258,8 @@ const PropertyWaterConnection = _ref => {
|
|
|
18978
19258
|
NumberofDwellingUnits: "",
|
|
18979
19259
|
NumberofRooms: "",
|
|
18980
19260
|
numberOfBeds: "",
|
|
18981
|
-
numberOfStudents: ""
|
|
19261
|
+
numberOfStudents: "",
|
|
19262
|
+
servantQuarterArea: ""
|
|
18982
19263
|
}
|
|
18983
19264
|
}
|
|
18984
19265
|
}),
|
|
@@ -18988,7 +19269,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
18988
19269
|
watch = _useForm.watch,
|
|
18989
19270
|
setValue = _useForm.setValue;
|
|
18990
19271
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
18991
|
-
const _Digit$Hooks$pt$usePr = Digit.Hooks.pt.usePropertyMDMS(tenantId, "PropertyTax", ["PropertyCategory", "PropertyType", "NoOfFloors", "PropertyNewUsageType"]),
|
|
19272
|
+
const _Digit$Hooks$pt$usePr = Digit.Hooks.pt.usePropertyMDMS(tenantId, "PropertyTax", ["PropertyCategory", "PropertyType", "NoOfFloors", "PropertyNewUsageType", "PropertyToUsageMapping"]),
|
|
18992
19273
|
ptServicesMastersData = _Digit$Hooks$pt$usePr.data;
|
|
18993
19274
|
const _Digit$Hooks$ws$useMD = Digit.Hooks.ws.useMDMS(tenantId, "ws-services-masters", ["WsCategoryType"]),
|
|
18994
19275
|
wsServicesMastersData = _Digit$Hooks$ws$useMD.data;
|
|
@@ -19014,9 +19295,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
19014
19295
|
const watchPropertyType = watch("useDetails.propertyType");
|
|
19015
19296
|
const watchPropertyCategory = watch("useDetails.propertyCategory");
|
|
19016
19297
|
const watchWaterConnectionUsageType = watch("useDetails.WaterConnectionUsageType");
|
|
19017
|
-
const isHospitalProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOSPITAL_NURSING_HOME" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HospitalNursingHome";
|
|
19298
|
+
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";
|
|
19018
19299
|
const isHotelRestaurantProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOTEL_OR_RESTAURANT" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HotelOrRestaurant";
|
|
19019
19300
|
const isSchoolCollegeProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "School" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "College";
|
|
19301
|
+
const isDwellingUnit = (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL" || (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL";
|
|
19302
|
+
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";
|
|
19020
19303
|
const yearOptions = useMemo(() => {
|
|
19021
19304
|
const currentYear = new Date().getFullYear();
|
|
19022
19305
|
const years = [];
|
|
@@ -19030,10 +19313,9 @@ const PropertyWaterConnection = _ref => {
|
|
|
19030
19313
|
}, []);
|
|
19031
19314
|
const categoryOptions = useMemo(() => {
|
|
19032
19315
|
var _ptServicesMastersDat, _ptServicesMastersDat2;
|
|
19316
|
+
if (!(watchCategoryType !== null && watchCategoryType !== void 0 && watchCategoryType.code)) return [];
|
|
19033
19317
|
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)) || [];
|
|
19034
|
-
|
|
19035
|
-
options = options.filter(item => item.type === watchCategoryType.code);
|
|
19036
|
-
}
|
|
19318
|
+
options = options.filter(item => item.type === watchCategoryType.code);
|
|
19037
19319
|
return options.map(item => ({
|
|
19038
19320
|
code: item.code,
|
|
19039
19321
|
name: item.name
|
|
@@ -19048,16 +19330,18 @@ const PropertyWaterConnection = _ref => {
|
|
|
19048
19330
|
}
|
|
19049
19331
|
}, [watchCategoryType, categoryOptions, setValue, watchPropertyCategory]);
|
|
19050
19332
|
const propertyTypeOptions = useMemo(() => {
|
|
19051
|
-
var _ptServicesMastersDat3, _ptServicesMastersDat4;
|
|
19333
|
+
var _ptServicesMastersDat3, _ptServicesMastersDat4, _ptServicesMastersDat5, _watchPropertyCategor;
|
|
19334
|
+
if (!(watchPropertyCategory !== null && watchPropertyCategory !== void 0 && watchPropertyCategory.code)) return [];
|
|
19052
19335
|
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)) || [];
|
|
19053
|
-
|
|
19054
|
-
|
|
19055
|
-
|
|
19056
|
-
|
|
19057
|
-
|
|
19058
|
-
|
|
19059
|
-
|
|
19060
|
-
|
|
19336
|
+
let mapping = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat5 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat5 === void 0 ? void 0 : _ptServicesMastersDat5.PropertyToUsageMapping) || [];
|
|
19337
|
+
if (mapping.length > 0) {
|
|
19338
|
+
options = options.filter(item => mapping.some(m => m.propertyTypeCode === item.code));
|
|
19339
|
+
}
|
|
19340
|
+
if ((watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : (_watchPropertyCategor = watchPropertyCategory.code) === null || _watchPropertyCategor === void 0 ? void 0 : _watchPropertyCategor.toUpperCase()) !== "MIXED") {
|
|
19341
|
+
options = options.filter(item => {
|
|
19342
|
+
var _item$type, _watchPropertyCategor2;
|
|
19343
|
+
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());
|
|
19344
|
+
});
|
|
19061
19345
|
}
|
|
19062
19346
|
return options.map(item => ({
|
|
19063
19347
|
code: item.code,
|
|
@@ -19073,22 +19357,21 @@ const PropertyWaterConnection = _ref => {
|
|
|
19073
19357
|
}
|
|
19074
19358
|
}, [watchPropertyCategory, propertyTypeOptions, setValue, watchPropertyType]);
|
|
19075
19359
|
const usageTypeOptions = useMemo(() => {
|
|
19076
|
-
var
|
|
19077
|
-
|
|
19078
|
-
|
|
19079
|
-
|
|
19080
|
-
|
|
19081
|
-
|
|
19082
|
-
|
|
19083
|
-
|
|
19084
|
-
|
|
19085
|
-
}
|
|
19360
|
+
var _ptServicesMastersDat6, _ptServicesMastersDat7, _ptServicesMastersDat8;
|
|
19361
|
+
if (!(watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code)) return [];
|
|
19362
|
+
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)) || [];
|
|
19363
|
+
let mapping = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat8 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat8 === void 0 ? void 0 : _ptServicesMastersDat8.PropertyToUsageMapping) || [];
|
|
19364
|
+
const selectedMapping = mapping.find(m => m.propertyTypeCode === watchPropertyType.code);
|
|
19365
|
+
if (selectedMapping && selectedMapping.allowedUsages) {
|
|
19366
|
+
options = options.filter(item => selectedMapping.allowedUsages.includes(item.code));
|
|
19367
|
+
} else {
|
|
19368
|
+
options = [];
|
|
19086
19369
|
}
|
|
19087
19370
|
return options.map(item => ({
|
|
19088
19371
|
code: item.code,
|
|
19089
19372
|
name: item.name
|
|
19090
19373
|
}));
|
|
19091
|
-
}, [ptServicesMastersData, watchPropertyCategory]);
|
|
19374
|
+
}, [ptServicesMastersData, watchPropertyCategory, watchPropertyType]);
|
|
19092
19375
|
useEffect(() => {
|
|
19093
19376
|
if (watchPropertyType && watchWaterConnectionUsageType) {
|
|
19094
19377
|
const isUsageTypeValid = usageTypeOptions.some(opt => opt.code === watchWaterConnectionUsageType.code);
|
|
@@ -19098,8 +19381,8 @@ const PropertyWaterConnection = _ref => {
|
|
|
19098
19381
|
}
|
|
19099
19382
|
}, [watchPropertyType, usageTypeOptions, setValue, watchWaterConnectionUsageType]);
|
|
19100
19383
|
const floorOptions = useMemo(() => {
|
|
19101
|
-
var
|
|
19102
|
-
return ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (
|
|
19384
|
+
var _ptServicesMastersDat9, _ptServicesMastersDat0;
|
|
19385
|
+
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 => ({
|
|
19103
19386
|
code: item.code,
|
|
19104
19387
|
name: item.name
|
|
19105
19388
|
}));
|
|
@@ -19148,6 +19431,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19148
19431
|
setValue("useDetails.NumberofRooms", "");
|
|
19149
19432
|
setValue("useDetails.numberOfBeds", "");
|
|
19150
19433
|
setValue("useDetails.numberOfStudents", "");
|
|
19434
|
+
setValue("useDetails.servantQuarterArea", "");
|
|
19151
19435
|
}
|
|
19152
19436
|
}, [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]);
|
|
19153
19437
|
const lastErrorState = React.useRef(null);
|
|
@@ -19330,7 +19614,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19330
19614
|
})
|
|
19331
19615
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails9 = errors.useDetails) === null || _errors$useDetails9 === void 0 ? void 0 : _errors$useDetails9.SelectYearofConstruction) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
19332
19616
|
style: errorStyle
|
|
19333
|
-
}, errors.useDetails.SelectYearofConstruction.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, "" + t("WS_NUMBER_OF_DWELLING_UNITS")), /*#__PURE__*/React.createElement("div", {
|
|
19617
|
+
}, errors.useDetails.SelectYearofConstruction.message), isDwellingUnit ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, "" + t("WS_NUMBER_OF_DWELLING_UNITS")), /*#__PURE__*/React.createElement("div", {
|
|
19334
19618
|
className: "form-field"
|
|
19335
19619
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
19336
19620
|
t: t,
|
|
@@ -19342,7 +19626,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19342
19626
|
}),
|
|
19343
19627
|
name: "useDetails.NumberofDwellingUnits",
|
|
19344
19628
|
disabled: isPropertyFound
|
|
19345
|
-
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails0 = errors.useDetails) === null || _errors$useDetails0 === void 0 ? void 0 : _errors$useDetails0.NumberofDwellingUnits) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
19629
|
+
}))) : null, isDwellingUnit && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails0 = errors.useDetails) === null || _errors$useDetails0 === void 0 ? void 0 : _errors$useDetails0.NumberofDwellingUnits) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
19346
19630
|
style: errorStyle
|
|
19347
19631
|
}, errors.useDetails.NumberofDwellingUnits.message), isHotelRestaurantProperty ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_NUMBER_OF_ROOMS") + "*"), /*#__PURE__*/React.createElement("div", {
|
|
19348
19632
|
className: "form-field"
|
|
@@ -19388,7 +19672,21 @@ const PropertyWaterConnection = _ref => {
|
|
|
19388
19672
|
disabled: isPropertyFound
|
|
19389
19673
|
}))) : null, isSchoolCollegeProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails11 = errors.useDetails) === null || _errors$useDetails11 === void 0 ? void 0 : _errors$useDetails11.numberOfStudents) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
19390
19674
|
style: errorStyle
|
|
19391
|
-
}, errors.useDetails.numberOfStudents.message)))
|
|
19675
|
+
}, errors.useDetails.numberOfStudents.message), isServentHouse ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, "" + t("WS_SERVENT_HOUSE")), /*#__PURE__*/React.createElement("div", {
|
|
19676
|
+
className: "form-field"
|
|
19677
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
19678
|
+
t: t,
|
|
19679
|
+
inputRef: register({
|
|
19680
|
+
pattern: {
|
|
19681
|
+
value: NUMBER_PATTERN,
|
|
19682
|
+
message: t("ERR_INVALID_NUMBER")
|
|
19683
|
+
}
|
|
19684
|
+
}),
|
|
19685
|
+
name: "useDetails.servantQuarterArea",
|
|
19686
|
+
disabled: isPropertyFound
|
|
19687
|
+
}))) : 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.createElement(CardLabelError, {
|
|
19688
|
+
style: errorStyle
|
|
19689
|
+
}, errors.useDetails.servantQuarterArea.message)));
|
|
19392
19690
|
};
|
|
19393
19691
|
|
|
19394
19692
|
const SwitchComponent = props => {
|