@djb25/digit-ui-module-commonpt 1.0.23 → 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 +114 -45
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +114 -45
- 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) => {
|
|
@@ -15837,7 +15837,7 @@ const InfoDetails = _ref2 => {
|
|
|
15837
15837
|
};
|
|
15838
15838
|
|
|
15839
15839
|
const ViewBreakup = _ref => {
|
|
15840
|
-
var _breakUpData$calculat, _breakUpData$calculat2, _wsAdditionalDetails$8, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
|
|
15840
|
+
var _breakUpData$calculat, _breakUpData$calculat2, _breakUpData$calculat3, _wsAdditionalDetails$8, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
|
|
15841
15841
|
let wsAdditionalDetails = _ref.wsAdditionalDetails,
|
|
15842
15842
|
print = _ref.print,
|
|
15843
15843
|
download = _ref.download;
|
|
@@ -15948,11 +15948,8 @@ const ViewBreakup = _ref => {
|
|
|
15948
15948
|
title: t("WS_APPLICATION_FEE_HEADER"),
|
|
15949
15949
|
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
15950
|
}, {
|
|
15951
|
-
title: "
|
|
15952
|
-
values:
|
|
15953
|
-
}, {
|
|
15954
|
-
title: "Water demand details",
|
|
15955
|
-
values: waterDemandRows.map(_ref4 => {
|
|
15951
|
+
title: "Property details",
|
|
15952
|
+
values: propertyRows.map(_ref4 => {
|
|
15956
15953
|
let label = _ref4.label,
|
|
15957
15954
|
value = _ref4.value,
|
|
15958
15955
|
currency = _ref4.currency,
|
|
@@ -15964,8 +15961,11 @@ const ViewBreakup = _ref => {
|
|
|
15964
15961
|
};
|
|
15965
15962
|
})
|
|
15966
15963
|
}, {
|
|
15967
|
-
title: "
|
|
15968
|
-
values:
|
|
15964
|
+
title: "Taxes",
|
|
15965
|
+
values: amountRows(breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab3 = breakUpData.billSlabData) === null || _breakUpData$billSlab3 === void 0 ? void 0 : _breakUpData$billSlab3.TAX)
|
|
15966
|
+
}, {
|
|
15967
|
+
title: "Water demand details",
|
|
15968
|
+
values: waterDemandRows.map(_ref5 => {
|
|
15969
15969
|
let label = _ref5.label,
|
|
15970
15970
|
value = _ref5.value,
|
|
15971
15971
|
currency = _ref5.currency,
|
|
@@ -15976,6 +15976,19 @@ const ViewBreakup = _ref => {
|
|
|
15976
15976
|
value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
|
|
15977
15977
|
};
|
|
15978
15978
|
})
|
|
15979
|
+
}, {
|
|
15980
|
+
title: "Infrastructure charge details",
|
|
15981
|
+
values: infrastructureChargeRows.map(_ref6 => {
|
|
15982
|
+
let label = _ref6.label,
|
|
15983
|
+
value = _ref6.value,
|
|
15984
|
+
currency = _ref6.currency,
|
|
15985
|
+
unit = _ref6.unit,
|
|
15986
|
+
isText = _ref6.isText;
|
|
15987
|
+
return {
|
|
15988
|
+
title: label,
|
|
15989
|
+
value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
|
|
15990
|
+
};
|
|
15991
|
+
})
|
|
15979
15992
|
}, {
|
|
15980
15993
|
title: "Total",
|
|
15981
15994
|
values: [{
|
|
@@ -16017,8 +16030,58 @@ const ViewBreakup = _ref => {
|
|
|
16017
16030
|
printWindow.focus();
|
|
16018
16031
|
printWindow.print();
|
|
16019
16032
|
};
|
|
16020
|
-
const
|
|
16021
|
-
const
|
|
16033
|
+
const propertyDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat = breakUpData.calculationDetail) === null || _breakUpData$calculat === void 0 ? void 0 : _breakUpData$calculat.propertyDetail;
|
|
16034
|
+
const waterDemandDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat2 = breakUpData.calculationDetail) === null || _breakUpData$calculat2 === void 0 ? void 0 : _breakUpData$calculat2.waterDemandDetail;
|
|
16035
|
+
const infrastructureChargeDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat3 = breakUpData.calculationDetail) === null || _breakUpData$calculat3 === void 0 ? void 0 : _breakUpData$calculat3.infrastructureChargeDetail;
|
|
16036
|
+
const propertyRows = propertyDetail ? [{
|
|
16037
|
+
label: "Property ID",
|
|
16038
|
+
value: propertyDetail.propertyId,
|
|
16039
|
+
isText: true
|
|
16040
|
+
}, {
|
|
16041
|
+
label: "Property type",
|
|
16042
|
+
value: propertyDetail.propertyType,
|
|
16043
|
+
isText: true
|
|
16044
|
+
}, {
|
|
16045
|
+
label: "Plot area",
|
|
16046
|
+
value: propertyDetail.landArea,
|
|
16047
|
+
unit: " (sq. meter.)"
|
|
16048
|
+
}, {
|
|
16049
|
+
label: "Built-up area",
|
|
16050
|
+
value: propertyDetail.superBuiltUpArea,
|
|
16051
|
+
unit: " (sq. meter.)"
|
|
16052
|
+
}, {
|
|
16053
|
+
label: "farArea",
|
|
16054
|
+
value: propertyDetail.farArea,
|
|
16055
|
+
isText: true
|
|
16056
|
+
}, {
|
|
16057
|
+
label: "coveredArea",
|
|
16058
|
+
value: propertyDetail.coveredArea,
|
|
16059
|
+
isText: true
|
|
16060
|
+
}, {
|
|
16061
|
+
label: "numberOfDwellingUnits",
|
|
16062
|
+
value: propertyDetail.numberOfDwellingUnits,
|
|
16063
|
+
isText: true
|
|
16064
|
+
}, {
|
|
16065
|
+
label: "numberOfBeds",
|
|
16066
|
+
value: propertyDetail.numberOfBeds,
|
|
16067
|
+
isText: true
|
|
16068
|
+
}, {
|
|
16069
|
+
label: "numberOfRooms",
|
|
16070
|
+
value: propertyDetail.numberOfRooms,
|
|
16071
|
+
isText: true
|
|
16072
|
+
}, {
|
|
16073
|
+
label: "numberOfStudents",
|
|
16074
|
+
value: propertyDetail.numberOfStudents,
|
|
16075
|
+
isText: true
|
|
16076
|
+
}, {
|
|
16077
|
+
label: "numberOfStaff",
|
|
16078
|
+
value: propertyDetail.numberOfStaff,
|
|
16079
|
+
isText: true
|
|
16080
|
+
}, {
|
|
16081
|
+
label: "Usage category",
|
|
16082
|
+
value: propertyDetail.usageCategory,
|
|
16083
|
+
isText: true
|
|
16084
|
+
}] : [];
|
|
16022
16085
|
const waterDemandRows = waterDemandDetail ? [{
|
|
16023
16086
|
label: "Calculated occupancy",
|
|
16024
16087
|
value: waterDemandDetail.calculatedOccupancy,
|
|
@@ -16160,6 +16223,12 @@ const ViewBreakup = _ref => {
|
|
|
16160
16223
|
textStyle: {
|
|
16161
16224
|
textAlign: "right"
|
|
16162
16225
|
}
|
|
16226
|
+
})), propertyRows.length > 0 && /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
|
|
16227
|
+
style: {
|
|
16228
|
+
margin: "10px 0px"
|
|
16229
|
+
}
|
|
16230
|
+
}, "Property details"), /*#__PURE__*/React__default.createElement(DetailRows, {
|
|
16231
|
+
rows: propertyRows
|
|
16163
16232
|
})), waterDemandRows.length > 0 && /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
|
|
16164
16233
|
style: {
|
|
16165
16234
|
margin: "10px 0px"
|
|
@@ -19193,7 +19262,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19193
19262
|
NumberofRooms: "",
|
|
19194
19263
|
numberOfBeds: "",
|
|
19195
19264
|
numberOfStudents: "",
|
|
19196
|
-
|
|
19265
|
+
servantQuarterArea: ""
|
|
19197
19266
|
}
|
|
19198
19267
|
}
|
|
19199
19268
|
}),
|
|
@@ -19203,7 +19272,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19203
19272
|
watch = _useForm.watch,
|
|
19204
19273
|
setValue = _useForm.setValue;
|
|
19205
19274
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
19206
|
-
const _Digit$Hooks$pt$usePr = Digit.Hooks.pt.usePropertyMDMS(tenantId, "PropertyTax", ["PropertyCategory", "PropertyType", "NoOfFloors", "PropertyNewUsageType"]),
|
|
19275
|
+
const _Digit$Hooks$pt$usePr = Digit.Hooks.pt.usePropertyMDMS(tenantId, "PropertyTax", ["PropertyCategory", "PropertyType", "NoOfFloors", "PropertyNewUsageType", "PropertyToUsageMapping"]),
|
|
19207
19276
|
ptServicesMastersData = _Digit$Hooks$pt$usePr.data;
|
|
19208
19277
|
const _Digit$Hooks$ws$useMD = Digit.Hooks.ws.useMDMS(tenantId, "ws-services-masters", ["WsCategoryType"]),
|
|
19209
19278
|
wsServicesMastersData = _Digit$Hooks$ws$useMD.data;
|
|
@@ -19229,7 +19298,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19229
19298
|
const watchPropertyType = watch("useDetails.propertyType");
|
|
19230
19299
|
const watchPropertyCategory = watch("useDetails.propertyCategory");
|
|
19231
19300
|
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";
|
|
19301
|
+
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
19302
|
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
19303
|
const isSchoolCollegeProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "School" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "College";
|
|
19235
19304
|
const isDwellingUnit = (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL" || (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL";
|
|
@@ -19247,10 +19316,9 @@ const PropertyWaterConnection = _ref => {
|
|
|
19247
19316
|
}, []);
|
|
19248
19317
|
const categoryOptions = React.useMemo(() => {
|
|
19249
19318
|
var _ptServicesMastersDat, _ptServicesMastersDat2;
|
|
19319
|
+
if (!(watchCategoryType !== null && watchCategoryType !== void 0 && watchCategoryType.code)) return [];
|
|
19250
19320
|
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
|
-
}
|
|
19321
|
+
options = options.filter(item => item.type === watchCategoryType.code);
|
|
19254
19322
|
return options.map(item => ({
|
|
19255
19323
|
code: item.code,
|
|
19256
19324
|
name: item.name
|
|
@@ -19265,16 +19333,18 @@ const PropertyWaterConnection = _ref => {
|
|
|
19265
19333
|
}
|
|
19266
19334
|
}, [watchCategoryType, categoryOptions, setValue, watchPropertyCategory]);
|
|
19267
19335
|
const propertyTypeOptions = React.useMemo(() => {
|
|
19268
|
-
var _ptServicesMastersDat3, _ptServicesMastersDat4;
|
|
19336
|
+
var _ptServicesMastersDat3, _ptServicesMastersDat4, _ptServicesMastersDat5, _watchPropertyCategor;
|
|
19337
|
+
if (!(watchPropertyCategory !== null && watchPropertyCategory !== void 0 && watchPropertyCategory.code)) return [];
|
|
19269
19338
|
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
|
-
|
|
19339
|
+
let mapping = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat5 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat5 === void 0 ? void 0 : _ptServicesMastersDat5.PropertyToUsageMapping) || [];
|
|
19340
|
+
if (mapping.length > 0) {
|
|
19341
|
+
options = options.filter(item => mapping.some(m => m.propertyTypeCode === item.code));
|
|
19342
|
+
}
|
|
19343
|
+
if ((watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : (_watchPropertyCategor = watchPropertyCategory.code) === null || _watchPropertyCategor === void 0 ? void 0 : _watchPropertyCategor.toUpperCase()) !== "MIXED") {
|
|
19344
|
+
options = options.filter(item => {
|
|
19345
|
+
var _item$type, _watchPropertyCategor2;
|
|
19346
|
+
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());
|
|
19347
|
+
});
|
|
19278
19348
|
}
|
|
19279
19349
|
return options.map(item => ({
|
|
19280
19350
|
code: item.code,
|
|
@@ -19290,22 +19360,21 @@ const PropertyWaterConnection = _ref => {
|
|
|
19290
19360
|
}
|
|
19291
19361
|
}, [watchPropertyCategory, propertyTypeOptions, setValue, watchPropertyType]);
|
|
19292
19362
|
const usageTypeOptions = React.useMemo(() => {
|
|
19293
|
-
var
|
|
19294
|
-
|
|
19295
|
-
|
|
19296
|
-
|
|
19297
|
-
|
|
19298
|
-
|
|
19299
|
-
|
|
19300
|
-
|
|
19301
|
-
|
|
19302
|
-
}
|
|
19363
|
+
var _ptServicesMastersDat6, _ptServicesMastersDat7, _ptServicesMastersDat8;
|
|
19364
|
+
if (!(watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code)) return [];
|
|
19365
|
+
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)) || [];
|
|
19366
|
+
let mapping = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat8 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat8 === void 0 ? void 0 : _ptServicesMastersDat8.PropertyToUsageMapping) || [];
|
|
19367
|
+
const selectedMapping = mapping.find(m => m.propertyTypeCode === watchPropertyType.code);
|
|
19368
|
+
if (selectedMapping && selectedMapping.allowedUsages) {
|
|
19369
|
+
options = options.filter(item => selectedMapping.allowedUsages.includes(item.code));
|
|
19370
|
+
} else {
|
|
19371
|
+
options = [];
|
|
19303
19372
|
}
|
|
19304
19373
|
return options.map(item => ({
|
|
19305
19374
|
code: item.code,
|
|
19306
19375
|
name: item.name
|
|
19307
19376
|
}));
|
|
19308
|
-
}, [ptServicesMastersData, watchPropertyCategory]);
|
|
19377
|
+
}, [ptServicesMastersData, watchPropertyCategory, watchPropertyType]);
|
|
19309
19378
|
React.useEffect(() => {
|
|
19310
19379
|
if (watchPropertyType && watchWaterConnectionUsageType) {
|
|
19311
19380
|
const isUsageTypeValid = usageTypeOptions.some(opt => opt.code === watchWaterConnectionUsageType.code);
|
|
@@ -19315,8 +19384,8 @@ const PropertyWaterConnection = _ref => {
|
|
|
19315
19384
|
}
|
|
19316
19385
|
}, [watchPropertyType, usageTypeOptions, setValue, watchWaterConnectionUsageType]);
|
|
19317
19386
|
const floorOptions = React.useMemo(() => {
|
|
19318
|
-
var
|
|
19319
|
-
return ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (
|
|
19387
|
+
var _ptServicesMastersDat9, _ptServicesMastersDat0;
|
|
19388
|
+
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
19389
|
code: item.code,
|
|
19321
19390
|
name: item.name
|
|
19322
19391
|
}));
|
|
@@ -19365,7 +19434,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19365
19434
|
setValue("useDetails.NumberofRooms", "");
|
|
19366
19435
|
setValue("useDetails.numberOfBeds", "");
|
|
19367
19436
|
setValue("useDetails.numberOfStudents", "");
|
|
19368
|
-
setValue("useDetails.
|
|
19437
|
+
setValue("useDetails.servantQuarterArea", "");
|
|
19369
19438
|
}
|
|
19370
19439
|
}, [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
19440
|
const lastErrorState = React__default.useRef(null);
|
|
@@ -19616,11 +19685,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
19616
19685
|
message: t("ERR_INVALID_NUMBER")
|
|
19617
19686
|
}
|
|
19618
19687
|
}),
|
|
19619
|
-
name: "useDetails.
|
|
19688
|
+
name: "useDetails.servantQuarterArea",
|
|
19620
19689
|
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.
|
|
19690
|
+
}))) : 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
19691
|
style: errorStyle
|
|
19623
|
-
}, errors.useDetails.
|
|
19692
|
+
}, errors.useDetails.servantQuarterArea.message)));
|
|
19624
19693
|
};
|
|
19625
19694
|
|
|
19626
19695
|
const SwitchComponent = props => {
|