@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.modern.js
CHANGED
|
@@ -6031,7 +6031,7 @@ const setPropertyDetailsLW = data => {
|
|
|
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
6033
|
numberOfStudents: useDetails === null || useDetails === void 0 ? void 0 : useDetails.numberOfStudents,
|
|
6034
|
-
|
|
6034
|
+
servantQuarterArea: useDetails === null || useDetails === void 0 ? void 0 : useDetails.servantQuarterArea
|
|
6035
6035
|
};
|
|
6036
6036
|
data.propertyDetails = propertyDetails;
|
|
6037
6037
|
return data;
|
|
@@ -6092,7 +6092,7 @@ const convertToPropertyLightWeight = function (data) {
|
|
|
6092
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),
|
|
6093
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),
|
|
6094
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),
|
|
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
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
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),
|
|
6098
6098
|
owners: [...(data.owners || []).map((owner, index) => {
|
|
@@ -6188,7 +6188,7 @@ const convertToUpdatePropertyLightWeight = function (data) {
|
|
|
6188
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
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
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.
|
|
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
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
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),
|
|
6194
6194
|
owners: [...data.owners.map((owner, index) => {
|
|
@@ -15834,7 +15834,7 @@ const InfoDetails = _ref2 => {
|
|
|
15834
15834
|
};
|
|
15835
15835
|
|
|
15836
15836
|
const ViewBreakup = _ref => {
|
|
15837
|
-
var _breakUpData$calculat, _breakUpData$calculat2, _wsAdditionalDetails$8, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
|
|
15837
|
+
var _breakUpData$calculat, _breakUpData$calculat2, _breakUpData$calculat3, _wsAdditionalDetails$8, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
|
|
15838
15838
|
let wsAdditionalDetails = _ref.wsAdditionalDetails,
|
|
15839
15839
|
print = _ref.print,
|
|
15840
15840
|
download = _ref.download;
|
|
@@ -15945,11 +15945,8 @@ const ViewBreakup = _ref => {
|
|
|
15945
15945
|
title: t("WS_APPLICATION_FEE_HEADER"),
|
|
15946
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
15947
|
}, {
|
|
15948
|
-
title: "
|
|
15949
|
-
values:
|
|
15950
|
-
}, {
|
|
15951
|
-
title: "Water demand details",
|
|
15952
|
-
values: waterDemandRows.map(_ref4 => {
|
|
15948
|
+
title: "Property details",
|
|
15949
|
+
values: propertyRows.map(_ref4 => {
|
|
15953
15950
|
let label = _ref4.label,
|
|
15954
15951
|
value = _ref4.value,
|
|
15955
15952
|
currency = _ref4.currency,
|
|
@@ -15961,8 +15958,11 @@ const ViewBreakup = _ref => {
|
|
|
15961
15958
|
};
|
|
15962
15959
|
})
|
|
15963
15960
|
}, {
|
|
15964
|
-
title: "
|
|
15965
|
-
values:
|
|
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
15966
|
let label = _ref5.label,
|
|
15967
15967
|
value = _ref5.value,
|
|
15968
15968
|
currency = _ref5.currency,
|
|
@@ -15973,6 +15973,19 @@ const ViewBreakup = _ref => {
|
|
|
15973
15973
|
value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
|
|
15974
15974
|
};
|
|
15975
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
|
+
})
|
|
15976
15989
|
}, {
|
|
15977
15990
|
title: "Total",
|
|
15978
15991
|
values: [{
|
|
@@ -16014,8 +16027,58 @@ const ViewBreakup = _ref => {
|
|
|
16014
16027
|
printWindow.focus();
|
|
16015
16028
|
printWindow.print();
|
|
16016
16029
|
};
|
|
16017
|
-
const
|
|
16018
|
-
const
|
|
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
|
+
}] : [];
|
|
16019
16082
|
const waterDemandRows = waterDemandDetail ? [{
|
|
16020
16083
|
label: "Calculated occupancy",
|
|
16021
16084
|
value: waterDemandDetail.calculatedOccupancy,
|
|
@@ -16157,6 +16220,12 @@ const ViewBreakup = _ref => {
|
|
|
16157
16220
|
textStyle: {
|
|
16158
16221
|
textAlign: "right"
|
|
16159
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
|
|
16160
16229
|
})), waterDemandRows.length > 0 && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
16161
16230
|
style: {
|
|
16162
16231
|
margin: "10px 0px"
|
|
@@ -19190,7 +19259,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19190
19259
|
NumberofRooms: "",
|
|
19191
19260
|
numberOfBeds: "",
|
|
19192
19261
|
numberOfStudents: "",
|
|
19193
|
-
|
|
19262
|
+
servantQuarterArea: ""
|
|
19194
19263
|
}
|
|
19195
19264
|
}
|
|
19196
19265
|
}),
|
|
@@ -19200,7 +19269,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19200
19269
|
watch = _useForm.watch,
|
|
19201
19270
|
setValue = _useForm.setValue;
|
|
19202
19271
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
19203
|
-
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"]),
|
|
19204
19273
|
ptServicesMastersData = _Digit$Hooks$pt$usePr.data;
|
|
19205
19274
|
const _Digit$Hooks$ws$useMD = Digit.Hooks.ws.useMDMS(tenantId, "ws-services-masters", ["WsCategoryType"]),
|
|
19206
19275
|
wsServicesMastersData = _Digit$Hooks$ws$useMD.data;
|
|
@@ -19226,7 +19295,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19226
19295
|
const watchPropertyType = watch("useDetails.propertyType");
|
|
19227
19296
|
const watchPropertyCategory = watch("useDetails.propertyCategory");
|
|
19228
19297
|
const watchWaterConnectionUsageType = watch("useDetails.WaterConnectionUsageType");
|
|
19229
|
-
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";
|
|
19230
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";
|
|
19231
19300
|
const isSchoolCollegeProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "School" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "College";
|
|
19232
19301
|
const isDwellingUnit = (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL" || (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL";
|
|
@@ -19244,10 +19313,9 @@ const PropertyWaterConnection = _ref => {
|
|
|
19244
19313
|
}, []);
|
|
19245
19314
|
const categoryOptions = useMemo(() => {
|
|
19246
19315
|
var _ptServicesMastersDat, _ptServicesMastersDat2;
|
|
19316
|
+
if (!(watchCategoryType !== null && watchCategoryType !== void 0 && watchCategoryType.code)) return [];
|
|
19247
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)) || [];
|
|
19248
|
-
|
|
19249
|
-
options = options.filter(item => item.type === watchCategoryType.code);
|
|
19250
|
-
}
|
|
19318
|
+
options = options.filter(item => item.type === watchCategoryType.code);
|
|
19251
19319
|
return options.map(item => ({
|
|
19252
19320
|
code: item.code,
|
|
19253
19321
|
name: item.name
|
|
@@ -19262,16 +19330,18 @@ const PropertyWaterConnection = _ref => {
|
|
|
19262
19330
|
}
|
|
19263
19331
|
}, [watchCategoryType, categoryOptions, setValue, watchPropertyCategory]);
|
|
19264
19332
|
const propertyTypeOptions = useMemo(() => {
|
|
19265
|
-
var _ptServicesMastersDat3, _ptServicesMastersDat4;
|
|
19333
|
+
var _ptServicesMastersDat3, _ptServicesMastersDat4, _ptServicesMastersDat5, _watchPropertyCategor;
|
|
19334
|
+
if (!(watchPropertyCategory !== null && watchPropertyCategory !== void 0 && watchPropertyCategory.code)) return [];
|
|
19266
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)) || [];
|
|
19267
|
-
|
|
19268
|
-
|
|
19269
|
-
|
|
19270
|
-
|
|
19271
|
-
|
|
19272
|
-
|
|
19273
|
-
|
|
19274
|
-
|
|
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
|
+
});
|
|
19275
19345
|
}
|
|
19276
19346
|
return options.map(item => ({
|
|
19277
19347
|
code: item.code,
|
|
@@ -19287,22 +19357,21 @@ const PropertyWaterConnection = _ref => {
|
|
|
19287
19357
|
}
|
|
19288
19358
|
}, [watchPropertyCategory, propertyTypeOptions, setValue, watchPropertyType]);
|
|
19289
19359
|
const usageTypeOptions = useMemo(() => {
|
|
19290
|
-
var
|
|
19291
|
-
|
|
19292
|
-
|
|
19293
|
-
|
|
19294
|
-
|
|
19295
|
-
|
|
19296
|
-
|
|
19297
|
-
|
|
19298
|
-
|
|
19299
|
-
}
|
|
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 = [];
|
|
19300
19369
|
}
|
|
19301
19370
|
return options.map(item => ({
|
|
19302
19371
|
code: item.code,
|
|
19303
19372
|
name: item.name
|
|
19304
19373
|
}));
|
|
19305
|
-
}, [ptServicesMastersData, watchPropertyCategory]);
|
|
19374
|
+
}, [ptServicesMastersData, watchPropertyCategory, watchPropertyType]);
|
|
19306
19375
|
useEffect(() => {
|
|
19307
19376
|
if (watchPropertyType && watchWaterConnectionUsageType) {
|
|
19308
19377
|
const isUsageTypeValid = usageTypeOptions.some(opt => opt.code === watchWaterConnectionUsageType.code);
|
|
@@ -19312,8 +19381,8 @@ const PropertyWaterConnection = _ref => {
|
|
|
19312
19381
|
}
|
|
19313
19382
|
}, [watchPropertyType, usageTypeOptions, setValue, watchWaterConnectionUsageType]);
|
|
19314
19383
|
const floorOptions = useMemo(() => {
|
|
19315
|
-
var
|
|
19316
|
-
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 => ({
|
|
19317
19386
|
code: item.code,
|
|
19318
19387
|
name: item.name
|
|
19319
19388
|
}));
|
|
@@ -19362,7 +19431,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
19362
19431
|
setValue("useDetails.NumberofRooms", "");
|
|
19363
19432
|
setValue("useDetails.numberOfBeds", "");
|
|
19364
19433
|
setValue("useDetails.numberOfStudents", "");
|
|
19365
|
-
setValue("useDetails.
|
|
19434
|
+
setValue("useDetails.servantQuarterArea", "");
|
|
19366
19435
|
}
|
|
19367
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]);
|
|
19368
19437
|
const lastErrorState = React.useRef(null);
|
|
@@ -19613,11 +19682,11 @@ const PropertyWaterConnection = _ref => {
|
|
|
19613
19682
|
message: t("ERR_INVALID_NUMBER")
|
|
19614
19683
|
}
|
|
19615
19684
|
}),
|
|
19616
|
-
name: "useDetails.
|
|
19685
|
+
name: "useDetails.servantQuarterArea",
|
|
19617
19686
|
disabled: isPropertyFound
|
|
19618
|
-
}))) : null, isServentHouse && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails12 = errors.useDetails) === null || _errors$useDetails12 === void 0 ? void 0 : _errors$useDetails12.
|
|
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, {
|
|
19619
19688
|
style: errorStyle
|
|
19620
|
-
}, errors.useDetails.
|
|
19689
|
+
}, errors.useDetails.servantQuarterArea.message)));
|
|
19621
19690
|
};
|
|
19622
19691
|
|
|
19623
19692
|
const SwitchComponent = props => {
|