@djb25/digit-ui-module-commonpt 1.0.23 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
- ServantQuartersRoom: useDetails === null || useDetails === void 0 ? void 0 : useDetails.ServantQuartersRoom
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
- ServantQuartersRoom: ((_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.ServantQuartersRoom) || ((_data$useDetails0 = data.useDetails) === null || _data$useDetails0 === void 0 ? void 0 : _data$useDetails0.ServantQuartersRoom),
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.ServantQuartersRoom) || ((_data$useDetails20 = data.useDetails) === null || _data$useDetails20 === void 0 ? void 0 : _data$useDetails20.ServantQuartersRoom),
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) => {
@@ -15444,23 +15444,30 @@ const WSFeeEstimation = _ref => {
15444
15444
  var _wsAdditionalDetails$2, _wsAdditionalDetails$3, _sessionFormData$bill;
15445
15445
  const data = _extends({}, wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$2 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$2 === void 0 ? void 0 : (_wsAdditionalDetails$3 = _wsAdditionalDetails$2.appDetails) === null || _wsAdditionalDetails$3 === void 0 ? void 0 : _wsAdditionalDetails$3.additionalDetails);
15446
15446
  if ((sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill = sessionFormData.billDetails) === null || _sessionFormData$bill === void 0 ? void 0 : _sessionFormData$bill.length) > 0) {
15447
- var _sessionFormData$bill2, _sessionFormData$bill3, _sessionFormData$bill4, _sessionFormData$bill5, _sessionFormData$bill6, _sessionFormData$bill7, _sessionFormData$bill8, _sessionFormData$bill9, _sessionFormData$bill0;
15448
- const billAccountDetails = (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill2 = sessionFormData.billDetails) === null || _sessionFormData$bill2 === void 0 ? void 0 : (_sessionFormData$bill3 = _sessionFormData$bill2[0]) === null || _sessionFormData$bill3 === void 0 ? void 0 : _sessionFormData$bill3.billAccountDetails) || [];
15449
- const values = billAccountDetails.length > 0 ? billAccountDetails.map(bill => ({
15450
- title: bill === null || bill === void 0 ? void 0 : bill.taxHeadCode,
15451
- value: /*#__PURE__*/React.createElement("span", null, "\u20B9", Number(bill === null || bill === void 0 ? void 0 : bill.amount).toFixed(2))
15452
- })) : [{
15447
+ var _sessionFormData$bill2, _sessionFormData$bill3, _sessionFormData$bill4, _sessionFormData$bill5, _sessionFormData$bill6, _sessionFormData$bill7, _sessionFormData$bill8, _sessionFormData$bill9, _sessionFormData$bill0, _sessionFormData$bill1, _sessionFormData$bill10;
15448
+ const billAccountDetails = (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill2 = sessionFormData.billDetails) === null || _sessionFormData$bill2 === void 0 ? void 0 : (_sessionFormData$bill3 = _sessionFormData$bill2[0]) === null || _sessionFormData$bill3 === void 0 ? void 0 : _sessionFormData$bill3.billAccountDetails) || (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill4 = sessionFormData.billDetails) === null || _sessionFormData$bill4 === void 0 ? void 0 : (_sessionFormData$bill5 = _sessionFormData$bill4[0]) === null || _sessionFormData$bill5 === void 0 ? void 0 : _sessionFormData$bill5.taxHeadEstimates) || [];
15449
+ const values = billAccountDetails.length > 0 ? billAccountDetails.map(bill => {
15450
+ var _bill$status;
15451
+ return {
15452
+ title: bill === null || bill === void 0 ? void 0 : bill.taxHeadCode,
15453
+ value: /*#__PURE__*/React.createElement("span", null, "\u20B9", Number(bill === null || bill === void 0 ? void 0 : bill.amount).toFixed(2), bill !== null && bill !== void 0 && bill.status ? /*#__PURE__*/React.createElement("span", {
15454
+ style: {
15455
+ color: (bill === null || bill === void 0 ? void 0 : (_bill$status = bill.status) === null || _bill$status === void 0 ? void 0 : _bill$status.toUpperCase()) === "PAID" ? "green" : "red"
15456
+ }
15457
+ }, " (" + (bill === null || bill === void 0 ? void 0 : bill.status) + ")") : "")
15458
+ };
15459
+ }) : [{
15453
15460
  title: "WS_APPLICATION_FEE_HEADER",
15454
- value: /*#__PURE__*/React.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill4 = sessionFormData.billDetails) === null || _sessionFormData$bill4 === void 0 ? void 0 : (_sessionFormData$bill5 = _sessionFormData$bill4[0]) === null || _sessionFormData$bill5 === void 0 ? void 0 : _sessionFormData$bill5.fee)
15461
+ value: /*#__PURE__*/React.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill6 = sessionFormData.billDetails) === null || _sessionFormData$bill6 === void 0 ? void 0 : (_sessionFormData$bill7 = _sessionFormData$bill6[0]) === null || _sessionFormData$bill7 === void 0 ? void 0 : _sessionFormData$bill7.fee)
15455
15462
  }, {
15456
15463
  title: "WS_SERVICE_FEE_HEADER",
15457
- value: /*#__PURE__*/React.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill6 = sessionFormData.billDetails) === null || _sessionFormData$bill6 === void 0 ? void 0 : (_sessionFormData$bill7 = _sessionFormData$bill6[0]) === null || _sessionFormData$bill7 === void 0 ? void 0 : _sessionFormData$bill7.charge)
15464
+ value: /*#__PURE__*/React.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill8 = sessionFormData.billDetails) === null || _sessionFormData$bill8 === void 0 ? void 0 : (_sessionFormData$bill9 = _sessionFormData$bill8[0]) === null || _sessionFormData$bill9 === void 0 ? void 0 : _sessionFormData$bill9.charge)
15458
15465
  }, {
15459
15466
  title: "WS_TAX_HEADER",
15460
- value: /*#__PURE__*/React.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill8 = sessionFormData.billDetails) === null || _sessionFormData$bill8 === void 0 ? void 0 : (_sessionFormData$bill9 = _sessionFormData$bill8[0]) === null || _sessionFormData$bill9 === void 0 ? void 0 : _sessionFormData$bill9.taxAmount)
15467
+ value: /*#__PURE__*/React.createElement("span", null, "\u20B9", sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill0 = sessionFormData.billDetails) === null || _sessionFormData$bill0 === void 0 ? void 0 : (_sessionFormData$bill1 = _sessionFormData$bill0[0]) === null || _sessionFormData$bill1 === void 0 ? void 0 : _sessionFormData$bill1.taxAmount)
15461
15468
  }];
15462
15469
  setValues(values);
15463
- setBillDetails(sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill0 = sessionFormData.billDetails) === null || _sessionFormData$bill0 === void 0 ? void 0 : _sessionFormData$bill0[0]);
15470
+ setBillDetails(sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill10 = sessionFormData.billDetails) === null || _sessionFormData$bill10 === void 0 ? void 0 : _sessionFormData$bill10[0]);
15464
15471
  } else {
15465
15472
  setSessionFormData(data);
15466
15473
  setFields(data);
@@ -15531,10 +15538,17 @@ const WSFeeEstimation = _ref => {
15531
15538
  }
15532
15539
  result.Calculation[0].billSlabData = _.groupBy(result === null || result === void 0 ? void 0 : (_result$Calculation3 = result.Calculation) === null || _result$Calculation3 === void 0 ? void 0 : (_result$Calculation3$ = _result$Calculation3[0]) === null || _result$Calculation3$ === void 0 ? void 0 : _result$Calculation3$.taxHeadEstimates, "category");
15533
15540
  const taxHeadEstimates = (result === null || result === void 0 ? void 0 : (_result$Calculation4 = result.Calculation) === null || _result$Calculation4 === void 0 ? void 0 : (_result$Calculation4$ = _result$Calculation4[0]) === null || _result$Calculation4$ === void 0 ? void 0 : _result$Calculation4$.taxHeadEstimates) || [];
15534
- const values = taxHeadEstimates.length > 0 ? taxHeadEstimates.map(data => ({
15535
- title: data === null || data === void 0 ? void 0 : data.taxHeadCode,
15536
- value: /*#__PURE__*/React.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.estimateAmount).toFixed(2))
15537
- })) : [{
15541
+ const values = taxHeadEstimates.length > 0 ? taxHeadEstimates.map(data => {
15542
+ var _data$status;
15543
+ return {
15544
+ title: data === null || data === void 0 ? void 0 : data.taxHeadCode,
15545
+ value: /*#__PURE__*/React.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.estimateAmount).toFixed(2), data !== null && data !== void 0 && data.status ? /*#__PURE__*/React.createElement("span", {
15546
+ style: {
15547
+ color: (data === null || data === void 0 ? void 0 : (_data$status = data.status) === null || _data$status === void 0 ? void 0 : _data$status.toUpperCase()) === "PAID" ? "green" : "red"
15548
+ }
15549
+ }, " (" + (data === null || data === void 0 ? void 0 : data.status) + ")") : "")
15550
+ };
15551
+ }) : [{
15538
15552
  title: "WS_APPLICATION_FEE_HEADER",
15539
15553
  value: (_result$Calculation5 = result.Calculation) === null || _result$Calculation5 === void 0 ? void 0 : (_result$Calculation5$ = _result$Calculation5[0]) === null || _result$Calculation5$ === void 0 ? void 0 : _result$Calculation5$.fee
15540
15554
  }, {
@@ -15834,7 +15848,7 @@ const InfoDetails = _ref2 => {
15834
15848
  };
15835
15849
 
15836
15850
  const ViewBreakup = _ref => {
15837
- var _breakUpData$calculat, _breakUpData$calculat2, _wsAdditionalDetails$8, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
15851
+ var _breakUpData$calculat, _breakUpData$calculat2, _breakUpData$calculat3, _wsAdditionalDetails$8, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
15838
15852
  let wsAdditionalDetails = _ref.wsAdditionalDetails,
15839
15853
  print = _ref.print,
15840
15854
  download = _ref.download;
@@ -15920,10 +15934,17 @@ const ViewBreakup = _ref => {
15920
15934
  if (rows === void 0) {
15921
15935
  rows = [];
15922
15936
  }
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
- }));
15937
+ return rows.map(row => {
15938
+ var _row$status;
15939
+ return {
15940
+ title: t(row === null || row === void 0 ? void 0 : row.taxHeadCode),
15941
+ value: /*#__PURE__*/React.createElement("span", null, "\u20B9" + formatNumber(row === null || row === void 0 ? void 0 : row.amount), row !== null && row !== void 0 && row.status ? /*#__PURE__*/React.createElement("span", {
15942
+ style: {
15943
+ color: (row === null || row === void 0 ? void 0 : (_row$status = row.status) === null || _row$status === void 0 ? void 0 : _row$status.toUpperCase()) === "PAID" ? "green" : "red"
15944
+ }
15945
+ }, " (" + (row === null || row === void 0 ? void 0 : row.status) + ")") : "")
15946
+ };
15947
+ });
15927
15948
  };
15928
15949
  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
15950
  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(" ") || "-";
@@ -15945,11 +15966,8 @@ const ViewBreakup = _ref => {
15945
15966
  title: t("WS_APPLICATION_FEE_HEADER"),
15946
15967
  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
15968
  }, {
15948
- title: "Taxes",
15949
- values: amountRows(breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab3 = breakUpData.billSlabData) === null || _breakUpData$billSlab3 === void 0 ? void 0 : _breakUpData$billSlab3.TAX)
15950
- }, {
15951
- title: "Water demand details",
15952
- values: waterDemandRows.map(_ref4 => {
15969
+ title: "Property details",
15970
+ values: propertyRows.map(_ref4 => {
15953
15971
  let label = _ref4.label,
15954
15972
  value = _ref4.value,
15955
15973
  currency = _ref4.currency,
@@ -15961,8 +15979,11 @@ const ViewBreakup = _ref => {
15961
15979
  };
15962
15980
  })
15963
15981
  }, {
15964
- title: "Infrastructure charge details",
15965
- values: infrastructureChargeRows.map(_ref5 => {
15982
+ title: "Taxes",
15983
+ values: amountRows(breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab3 = breakUpData.billSlabData) === null || _breakUpData$billSlab3 === void 0 ? void 0 : _breakUpData$billSlab3.TAX)
15984
+ }, {
15985
+ title: "Water demand details",
15986
+ values: waterDemandRows.map(_ref5 => {
15966
15987
  let label = _ref5.label,
15967
15988
  value = _ref5.value,
15968
15989
  currency = _ref5.currency,
@@ -15973,6 +15994,19 @@ const ViewBreakup = _ref => {
15973
15994
  value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
15974
15995
  };
15975
15996
  })
15997
+ }, {
15998
+ title: "Infrastructure charge details",
15999
+ values: infrastructureChargeRows.map(_ref6 => {
16000
+ let label = _ref6.label,
16001
+ value = _ref6.value,
16002
+ currency = _ref6.currency,
16003
+ unit = _ref6.unit,
16004
+ isText = _ref6.isText;
16005
+ return {
16006
+ title: label,
16007
+ value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
16008
+ };
16009
+ })
15976
16010
  }, {
15977
16011
  title: "Total",
15978
16012
  values: [{
@@ -16014,8 +16048,58 @@ const ViewBreakup = _ref => {
16014
16048
  printWindow.focus();
16015
16049
  printWindow.print();
16016
16050
  };
16017
- const waterDemandDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat = breakUpData.calculationDetail) === null || _breakUpData$calculat === void 0 ? void 0 : _breakUpData$calculat.waterDemandDetail;
16018
- const infrastructureChargeDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat2 = breakUpData.calculationDetail) === null || _breakUpData$calculat2 === void 0 ? void 0 : _breakUpData$calculat2.infrastructureChargeDetail;
16051
+ const propertyDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat = breakUpData.calculationDetail) === null || _breakUpData$calculat === void 0 ? void 0 : _breakUpData$calculat.propertyDetail;
16052
+ const waterDemandDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat2 = breakUpData.calculationDetail) === null || _breakUpData$calculat2 === void 0 ? void 0 : _breakUpData$calculat2.waterDemandDetail;
16053
+ const infrastructureChargeDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat3 = breakUpData.calculationDetail) === null || _breakUpData$calculat3 === void 0 ? void 0 : _breakUpData$calculat3.infrastructureChargeDetail;
16054
+ const propertyRows = propertyDetail ? [{
16055
+ label: "Property ID",
16056
+ value: propertyDetail.propertyId,
16057
+ isText: true
16058
+ }, {
16059
+ label: "Property type",
16060
+ value: propertyDetail.propertyType,
16061
+ isText: true
16062
+ }, {
16063
+ label: "Plot area",
16064
+ value: propertyDetail.landArea,
16065
+ unit: " (sq. meter.)"
16066
+ }, {
16067
+ label: "Built-up area",
16068
+ value: propertyDetail.superBuiltUpArea,
16069
+ unit: " (sq. meter.)"
16070
+ }, {
16071
+ label: "farArea",
16072
+ value: propertyDetail.farArea,
16073
+ isText: true
16074
+ }, {
16075
+ label: "coveredArea",
16076
+ value: propertyDetail.coveredArea,
16077
+ isText: true
16078
+ }, {
16079
+ label: "numberOfDwellingUnits",
16080
+ value: propertyDetail.numberOfDwellingUnits,
16081
+ isText: true
16082
+ }, {
16083
+ label: "numberOfBeds",
16084
+ value: propertyDetail.numberOfBeds,
16085
+ isText: true
16086
+ }, {
16087
+ label: "numberOfRooms",
16088
+ value: propertyDetail.numberOfRooms,
16089
+ isText: true
16090
+ }, {
16091
+ label: "numberOfStudents",
16092
+ value: propertyDetail.numberOfStudents,
16093
+ isText: true
16094
+ }, {
16095
+ label: "numberOfStaff",
16096
+ value: propertyDetail.numberOfStaff,
16097
+ isText: true
16098
+ }, {
16099
+ label: "Usage category",
16100
+ value: propertyDetail.usageCategory,
16101
+ isText: true
16102
+ }] : [];
16019
16103
  const waterDemandRows = waterDemandDetail ? [{
16020
16104
  label: "Calculated occupancy",
16021
16105
  value: waterDemandDetail.calculatedOccupancy,
@@ -16115,48 +16199,75 @@ const ViewBreakup = _ref => {
16115
16199
  style: {
16116
16200
  margin: "10px 0px"
16117
16201
  }
16118
- }, 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, {
16119
- className: "border-none",
16120
- rowContainerStyle: {
16121
- margin: "0px"
16122
- },
16123
- labelStyle: {
16124
- width: "50%"
16125
- },
16126
- key: "" + (data === null || data === void 0 ? void 0 : data.taxHeadCode),
16127
- label: "" + t("" + (data === null || data === void 0 ? void 0 : data.taxHeadCode)),
16128
- text: /*#__PURE__*/React.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.amount) || 0),
16129
- textStyle: {
16130
- textAlign: "right"
16131
- }
16132
- })), 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, {
16133
- className: "border-none",
16134
- rowContainerStyle: {
16135
- margin: "0px"
16136
- },
16137
- labelStyle: {
16138
- width: "50%"
16139
- },
16140
- key: "" + (data === null || data === void 0 ? void 0 : data.taxHeadCode),
16141
- label: "" + t("" + (data === null || data === void 0 ? void 0 : data.taxHeadCode)),
16142
- text: /*#__PURE__*/React.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.amount) || 0),
16143
- textStyle: {
16144
- textAlign: "right"
16145
- }
16146
- })), 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, {
16147
- className: "border-none",
16148
- rowContainerStyle: {
16149
- margin: "0px"
16150
- },
16151
- labelStyle: {
16152
- width: "50%"
16153
- },
16154
- key: "" + (data === null || data === void 0 ? void 0 : data.taxHeadCode),
16155
- label: "" + t("" + (data === null || data === void 0 ? void 0 : data.taxHeadCode)),
16156
- text: /*#__PURE__*/React.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.amount) || 0),
16157
- textStyle: {
16158
- textAlign: "right"
16202
+ }, 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 => {
16203
+ var _data$status;
16204
+ return /*#__PURE__*/React.createElement(Row, {
16205
+ className: "border-none",
16206
+ rowContainerStyle: {
16207
+ margin: "0px"
16208
+ },
16209
+ labelStyle: {
16210
+ width: "50%"
16211
+ },
16212
+ key: "" + (data === null || data === void 0 ? void 0 : data.taxHeadCode),
16213
+ label: "" + t("" + (data === null || data === void 0 ? void 0 : data.taxHeadCode)),
16214
+ text: /*#__PURE__*/React.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.amount) || 0, data !== null && data !== void 0 && data.status ? /*#__PURE__*/React.createElement("span", {
16215
+ style: {
16216
+ color: (data === null || data === void 0 ? void 0 : (_data$status = data.status) === null || _data$status === void 0 ? void 0 : _data$status.toUpperCase()) === "PAID" ? "green" : "red"
16217
+ }
16218
+ }, " (" + (data === null || data === void 0 ? void 0 : data.status) + ")") : ""),
16219
+ textStyle: {
16220
+ textAlign: "right"
16221
+ }
16222
+ });
16223
+ }), 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 => {
16224
+ var _data$status2;
16225
+ return /*#__PURE__*/React.createElement(Row, {
16226
+ className: "border-none",
16227
+ rowContainerStyle: {
16228
+ margin: "0px"
16229
+ },
16230
+ labelStyle: {
16231
+ width: "50%"
16232
+ },
16233
+ key: "" + (data === null || data === void 0 ? void 0 : data.taxHeadCode),
16234
+ label: "" + t("" + (data === null || data === void 0 ? void 0 : data.taxHeadCode)),
16235
+ text: /*#__PURE__*/React.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.amount) || 0, data !== null && data !== void 0 && data.status ? /*#__PURE__*/React.createElement("span", {
16236
+ style: {
16237
+ color: (data === null || data === void 0 ? void 0 : (_data$status2 = data.status) === null || _data$status2 === void 0 ? void 0 : _data$status2.toUpperCase()) === "PAID" ? "green" : "red"
16238
+ }
16239
+ }, " (" + (data === null || data === void 0 ? void 0 : data.status) + ")") : ""),
16240
+ textStyle: {
16241
+ textAlign: "right"
16242
+ }
16243
+ });
16244
+ }), 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 => {
16245
+ var _data$status3;
16246
+ return /*#__PURE__*/React.createElement(Row, {
16247
+ className: "border-none",
16248
+ rowContainerStyle: {
16249
+ margin: "0px"
16250
+ },
16251
+ labelStyle: {
16252
+ width: "50%"
16253
+ },
16254
+ key: "" + (data === null || data === void 0 ? void 0 : data.taxHeadCode),
16255
+ label: "" + t("" + (data === null || data === void 0 ? void 0 : data.taxHeadCode)),
16256
+ text: /*#__PURE__*/React.createElement("span", null, "\u20B9", Number(data === null || data === void 0 ? void 0 : data.amount) || 0, data !== null && data !== void 0 && data.status ? /*#__PURE__*/React.createElement("span", {
16257
+ style: {
16258
+ color: (data === null || data === void 0 ? void 0 : (_data$status3 = data.status) === null || _data$status3 === void 0 ? void 0 : _data$status3.toUpperCase()) === "PAID" ? "green" : "red"
16259
+ }
16260
+ }, " (" + (data === null || data === void 0 ? void 0 : data.status) + ")") : ""),
16261
+ textStyle: {
16262
+ textAlign: "right"
16263
+ }
16264
+ });
16265
+ }), propertyRows.length > 0 && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(CardSectionHeader, {
16266
+ style: {
16267
+ margin: "10px 0px"
16159
16268
  }
16269
+ }, "Property details"), /*#__PURE__*/React.createElement(DetailRows, {
16270
+ rows: propertyRows
16160
16271
  })), waterDemandRows.length > 0 && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(CardSectionHeader, {
16161
16272
  style: {
16162
16273
  margin: "10px 0px"
@@ -16487,8 +16598,8 @@ const DueVerification = _ref => {
16487
16598
  return newData;
16488
16599
  });
16489
16600
  }, [applicationData]);
16490
- const isPendingApproval = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_APPROVAL_FOR_CONNECTION" || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_CONNECTION_ACTIVATION";
16491
- const isActivation = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_CONNECTION_ACTIVATION";
16601
+ const isPendingApproval = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_FIELD_INSPECTION";
16602
+ const isActivation = ["PENDING_FOR_BILLING_CLERK_REVIEW", "PENDING_FOR_ASO_APPROVAL", "PENDING_FOR_ZRO_APPROVAL", "PENDING_FOR_AE_APPROVAL", "PENDING_FOR_FINAL_PAYMENT", "PENDING_FOR_CONNECTION_ACTIVATION"].includes(applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus);
16492
16603
  const columns = useMemo(() => {
16493
16604
  const baseColumns = [{
16494
16605
  Header: t("K No."),
@@ -16506,7 +16617,7 @@ const DueVerification = _ref => {
16506
16617
  Header: t("Total Amount"),
16507
16618
  accessor: "totalAmount"
16508
16619
  }];
16509
- if (isPendingApproval) {
16620
+ if (isPendingApproval || isActivation) {
16510
16621
  baseColumns.push({
16511
16622
  Header: t("Remarks"),
16512
16623
  accessor: "remarks",
@@ -16525,7 +16636,7 @@ const DueVerification = _ref => {
16525
16636
  });
16526
16637
  }
16527
16638
  return baseColumns;
16528
- }, [t, handleRemarkChange, isPendingApproval]);
16639
+ }, [t, handleRemarkChange, isPendingApproval, isActivation]);
16529
16640
  useEffect(() => {
16530
16641
  if (applicationData !== null && applicationData !== void 0 && applicationData.dueVerification && Array.isArray(applicationData.dueVerification)) {
16531
16642
  setTableData(applicationData.dueVerification);
@@ -16627,7 +16738,11 @@ const InspectionInformation = _ref => {
16627
16738
  let applicationData = _ref.applicationData;
16628
16739
  const _useTranslation = useTranslation(),
16629
16740
  t = _useTranslation.t;
16630
- const _useState = useState(null),
16741
+ const defaultInspectionType = {
16742
+ i18nKey: "New Connection Visit",
16743
+ code: "new_connection_visit"
16744
+ };
16745
+ const _useState = useState(defaultInspectionType),
16631
16746
  inspectionType = _useState[0],
16632
16747
  setInspectionType = _useState[1];
16633
16748
  const _useState2 = useState(""),
@@ -16637,20 +16752,23 @@ const InspectionInformation = _ref => {
16637
16752
  inspectorName = _useState3[0],
16638
16753
  setInspectorName = _useState3[1];
16639
16754
  useEffect(() => {
16640
- if (applicationData !== null && applicationData !== void 0 && applicationData.inspectionInformation) {
16755
+ if (applicationData) {
16756
+ if (!applicationData.inspectionInformation) {
16757
+ applicationData.inspectionInformation = {};
16758
+ }
16759
+ if (!applicationData.inspectionInformation.inspectionType) {
16760
+ applicationData.inspectionInformation.inspectionType = defaultInspectionType;
16761
+ }
16641
16762
  const apiInspectionType = applicationData.inspectionInformation.inspectionType;
16642
16763
  let matchedType = null;
16643
16764
  const inspectionCode = typeof apiInspectionType === "object" && apiInspectionType !== null ? apiInspectionType.code : apiInspectionType;
16644
16765
  if (inspectionCode) {
16645
16766
  matchedType = [{
16646
- i18nKey: "ES_COMMON_SELECT",
16647
- code: ""
16648
- }, {
16649
16767
  i18nKey: "New Connection Visit",
16650
16768
  code: "new_connection_visit"
16651
16769
  }].find(opt => opt.code === inspectionCode || opt.i18nKey === inspectionCode);
16652
16770
  }
16653
- setInspectionType(matchedType || null);
16771
+ setInspectionType(matchedType || defaultInspectionType);
16654
16772
  let dateValue = applicationData.inspectionInformation.inspectionDate || "";
16655
16773
  if (dateValue && typeof dateValue === 'number') {
16656
16774
  const d = new Date(dateValue);
@@ -16667,9 +16785,6 @@ const InspectionInformation = _ref => {
16667
16785
  }
16668
16786
  }, [applicationData]);
16669
16787
  const inspectionTypeOptions = [{
16670
- i18nKey: "ES_COMMON_SELECT",
16671
- code: ""
16672
- }, {
16673
16788
  i18nKey: "New Connection Visit",
16674
16789
  code: "new_connection_visit"
16675
16790
  }];
@@ -16689,7 +16804,7 @@ const InspectionInformation = _ref => {
16689
16804
  if (!applicationData.inspectionInformation) applicationData.inspectionInformation = {};
16690
16805
  applicationData.inspectionInformation.inspectorName = val;
16691
16806
  };
16692
- const readOnly = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_CONNECTION_ACTIVATION";
16807
+ const readOnly = ["PENDING_FOR_BILLING_CLERK_REVIEW", "PENDING_FOR_ASO_APPROVAL", "PENDING_FOR_ZRO_APPROVAL", "PENDING_FOR_AE_APPROVAL", "PENDING_FOR_FINAL_PAYMENT", "PENDING_FOR_CONNECTION_ACTIVATION"].includes(applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus);
16693
16808
  return /*#__PURE__*/React.createElement("div", {
16694
16809
  style: {
16695
16810
  marginBottom: "20px"
@@ -17271,9 +17386,9 @@ function ApplicationDetailsContent(_ref) {
17271
17386
  }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet17 = detail.additionalDetails) === null || _detail$additionalDet17 === void 0 ? void 0 : _detail$additionalDet17.documents) && /*#__PURE__*/React.createElement(PropertyDocuments, {
17272
17387
  documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet18 = detail.additionalDetails) === null || _detail$additionalDet18 === void 0 ? void 0 : _detail$additionalDet18.documents,
17273
17388
  applicationStatus: applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus
17274
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.documents) && ((applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_FIELD_INSPECTION" || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_APPROVAL_FOR_CONNECTION" || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_CONNECTION_ACTIVATION" || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_RECONNECTION") && /*#__PURE__*/React.createElement(DueVerification, {
17389
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.documents) && ["PENDING_FOR_FIELD_INSPECTION", "PENDING_APPROVAL_FOR_CONNECTION", "PENDING_FOR_CONNECTION_ACTIVATION", "PENDING_FOR_RECONNECTION", "PENDING_FOR_DUE_VERIFICATION", "PENDING_FOR_BILLING_CLERK_REVIEW", "PENDING_FOR_ASO_APPROVAL", "PENDING_FOR_ZRO_APPROVAL", "PENDING_FOR_AE_APPROVAL", "PENDING_FOR_FINAL_PAYMENT", "CONNECTION_ACTIVATED", "PENDING_FOR_CONNECTION_ACTIVATION"].includes(applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) && /*#__PURE__*/React.createElement(DueVerification, {
17275
17390
  applicationData: applicationData
17276
- }), " ", (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.documents) && ((applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_APPROVAL_FOR_CONNECTION" || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_CONNECTION_ACTIVATION") && /*#__PURE__*/React.createElement(InspectionInformation, {
17391
+ }), " ", (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.documents) && ["PENDING_FOR_FIELD_INSPECTION", "PENDING_FOR_BILLING_CLERK_REVIEW", "PENDING_FOR_ASO_APPROVAL", "PENDING_FOR_ZRO_APPROVAL", "PENDING_FOR_AE_APPROVAL", "PENDING_FOR_FINAL_PAYMENT", "CONNECTION_ACTIVATED", "PENDING_FOR_CONNECTION_ACTIVATION"].includes(applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) && /*#__PURE__*/React.createElement(InspectionInformation, {
17277
17392
  applicationData: applicationData
17278
17393
  }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet21 = detail.additionalDetails) === null || _detail$additionalDet21 === void 0 ? void 0 : _detail$additionalDet21.taxHeadEstimatesCalculation) && /*#__PURE__*/React.createElement(PropertyEstimates, {
17279
17394
  taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet22 = detail.additionalDetails) === null || _detail$additionalDet22 === void 0 ? void 0 : _detail$additionalDet22.taxHeadEstimatesCalculation
@@ -18272,7 +18387,7 @@ const EmployeeApp = _ref => {
18272
18387
  }, /*#__PURE__*/React.createElement(ModuleHeader, {
18273
18388
  leftContent: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ArrowLeft, {
18274
18389
  className: "icon"
18275
- }), "Back"),
18390
+ }), t("CS_COMMON_BACK")),
18276
18391
  onLeftClick: () => window.history.back(),
18277
18392
  breadcrumbs: breadcrumbs
18278
18393
  }), /*#__PURE__*/React.createElement("div", {
@@ -19167,7 +19282,7 @@ const _excluded$4 = ["t", "config", "onSelect", "formData", "formState", "setErr
19167
19282
  const NUMBER_PATTERN = /^\d+$/;
19168
19283
  const DECIMAL_PATTERN = /^\d+(\.\d{1,2})?$/;
19169
19284
  const PropertyWaterConnection = _ref => {
19170
- 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;
19285
+ var _formData$cpt2, _errors$useDetails, _errors$useDetails2, _errors$useDetails3, _errors$useDetails4, _errors$useDetails5, _errors$useDetails6, _errors$useDetails7, _errors$useDetails8, _formValue$useDetails3, _formValue$useDetails4, _formValue$useDetails5, _formValue$useDetails6, _errors$useDetails9, _errors$useDetails0, _errors$useDetails1, _errors$useDetails10, _errors$useDetails11, _errors$useDetails12;
19171
19286
  let t = _ref.t,
19172
19287
  config = _ref.config,
19173
19288
  onSelect = _ref.onSelect,
@@ -19190,7 +19305,7 @@ const PropertyWaterConnection = _ref => {
19190
19305
  NumberofRooms: "",
19191
19306
  numberOfBeds: "",
19192
19307
  numberOfStudents: "",
19193
- ServantQuartersRoom: ""
19308
+ servantQuarterArea: ""
19194
19309
  }
19195
19310
  }
19196
19311
  }),
@@ -19200,7 +19315,7 @@ const PropertyWaterConnection = _ref => {
19200
19315
  watch = _useForm.watch,
19201
19316
  setValue = _useForm.setValue;
19202
19317
  const tenantId = Digit.ULBService.getCurrentTenantId();
19203
- const _Digit$Hooks$pt$usePr = Digit.Hooks.pt.usePropertyMDMS(tenantId, "PropertyTax", ["PropertyCategory", "PropertyType", "NoOfFloors", "PropertyNewUsageType"]),
19318
+ const _Digit$Hooks$pt$usePr = Digit.Hooks.pt.usePropertyMDMS(tenantId, "PropertyTax", ["PropertyCategory", "PropertyType", "NoOfFloors", "PropertyNewUsageType", "PropertyToUsageMapping"]),
19204
19319
  ptServicesMastersData = _Digit$Hooks$pt$usePr.data;
19205
19320
  const _Digit$Hooks$ws$useMD = Digit.Hooks.ws.useMDMS(tenantId, "ws-services-masters", ["WsCategoryType"]),
19206
19321
  wsServicesMastersData = _Digit$Hooks$ws$useMD.data;
@@ -19226,10 +19341,10 @@ const PropertyWaterConnection = _ref => {
19226
19341
  const watchPropertyType = watch("useDetails.propertyType");
19227
19342
  const watchPropertyCategory = watch("useDetails.propertyCategory");
19228
19343
  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";
19344
+ 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
19345
  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
19346
  const isSchoolCollegeProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "School" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "College";
19232
- const isDwellingUnit = (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL" || (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL";
19347
+ const isDwellingUnit = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "Apartment" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "FlatOrApartment" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "IndividualHouse";
19233
19348
  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";
19234
19349
  const yearOptions = useMemo(() => {
19235
19350
  const currentYear = new Date().getFullYear();
@@ -19244,10 +19359,9 @@ const PropertyWaterConnection = _ref => {
19244
19359
  }, []);
19245
19360
  const categoryOptions = useMemo(() => {
19246
19361
  var _ptServicesMastersDat, _ptServicesMastersDat2;
19362
+ if (!(watchCategoryType !== null && watchCategoryType !== void 0 && watchCategoryType.code)) return [];
19247
19363
  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
- if (watchCategoryType !== null && watchCategoryType !== void 0 && watchCategoryType.code) {
19249
- options = options.filter(item => item.type === watchCategoryType.code);
19250
- }
19364
+ options = options.filter(item => item.type === watchCategoryType.code);
19251
19365
  return options.map(item => ({
19252
19366
  code: item.code,
19253
19367
  name: item.name
@@ -19262,16 +19376,18 @@ const PropertyWaterConnection = _ref => {
19262
19376
  }
19263
19377
  }, [watchCategoryType, categoryOptions, setValue, watchPropertyCategory]);
19264
19378
  const propertyTypeOptions = useMemo(() => {
19265
- var _ptServicesMastersDat3, _ptServicesMastersDat4;
19379
+ var _ptServicesMastersDat3, _ptServicesMastersDat4, _ptServicesMastersDat5, _watchPropertyCategor;
19380
+ if (!(watchPropertyCategory !== null && watchPropertyCategory !== void 0 && watchPropertyCategory.code)) return [];
19266
19381
  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
- if (watchPropertyCategory !== null && watchPropertyCategory !== void 0 && watchPropertyCategory.code) {
19268
- var _watchPropertyCategor;
19269
- if ((watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : (_watchPropertyCategor = watchPropertyCategory.code) === null || _watchPropertyCategor === void 0 ? void 0 : _watchPropertyCategor.toUpperCase()) !== "MIXED") {
19270
- options = options.filter(item => {
19271
- var _item$type, _watchPropertyCategor2;
19272
- 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());
19273
- });
19274
- }
19382
+ let mapping = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat5 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat5 === void 0 ? void 0 : _ptServicesMastersDat5.PropertyToUsageMapping) || [];
19383
+ if (mapping.length > 0) {
19384
+ options = options.filter(item => mapping.some(m => m.propertyTypeCode === item.code));
19385
+ }
19386
+ if ((watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : (_watchPropertyCategor = watchPropertyCategory.code) === null || _watchPropertyCategor === void 0 ? void 0 : _watchPropertyCategor.toUpperCase()) !== "MIXED") {
19387
+ options = options.filter(item => {
19388
+ var _item$type, _watchPropertyCategor2;
19389
+ 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());
19390
+ });
19275
19391
  }
19276
19392
  return options.map(item => ({
19277
19393
  code: item.code,
@@ -19287,22 +19403,21 @@ const PropertyWaterConnection = _ref => {
19287
19403
  }
19288
19404
  }, [watchPropertyCategory, propertyTypeOptions, setValue, watchPropertyType]);
19289
19405
  const usageTypeOptions = useMemo(() => {
19290
- var _ptServicesMastersDat5, _ptServicesMastersDat6;
19291
- let options = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat5 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat5 === void 0 ? void 0 : (_ptServicesMastersDat6 = _ptServicesMastersDat5.PropertyNewUsageType) === null || _ptServicesMastersDat6 === void 0 ? void 0 : _ptServicesMastersDat6.filter(item => item.active)) || [];
19292
- if (watchPropertyCategory !== null && watchPropertyCategory !== void 0 && watchPropertyCategory.code) {
19293
- var _watchPropertyCategor3;
19294
- if ((watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : (_watchPropertyCategor3 = watchPropertyCategory.code) === null || _watchPropertyCategor3 === void 0 ? void 0 : _watchPropertyCategor3.toUpperCase()) !== "MIXED") {
19295
- options = options.filter(item => {
19296
- var _item$type2, _watchPropertyCategor4;
19297
- return ((_item$type2 = item.type) === null || _item$type2 === void 0 ? void 0 : _item$type2.toUpperCase()) === ((_watchPropertyCategor4 = watchPropertyCategory.code) === null || _watchPropertyCategor4 === void 0 ? void 0 : _watchPropertyCategor4.toUpperCase());
19298
- });
19299
- }
19406
+ var _ptServicesMastersDat6, _ptServicesMastersDat7, _ptServicesMastersDat8;
19407
+ if (!(watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code)) return [];
19408
+ 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)) || [];
19409
+ let mapping = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat8 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat8 === void 0 ? void 0 : _ptServicesMastersDat8.PropertyToUsageMapping) || [];
19410
+ const selectedMapping = mapping.find(m => m.propertyTypeCode === watchPropertyType.code);
19411
+ if (selectedMapping && selectedMapping.allowedUsages) {
19412
+ options = options.filter(item => selectedMapping.allowedUsages.includes(item.code));
19413
+ } else {
19414
+ options = [];
19300
19415
  }
19301
19416
  return options.map(item => ({
19302
19417
  code: item.code,
19303
19418
  name: item.name
19304
19419
  }));
19305
- }, [ptServicesMastersData, watchPropertyCategory]);
19420
+ }, [ptServicesMastersData, watchPropertyCategory, watchPropertyType]);
19306
19421
  useEffect(() => {
19307
19422
  if (watchPropertyType && watchWaterConnectionUsageType) {
19308
19423
  const isUsageTypeValid = usageTypeOptions.some(opt => opt.code === watchWaterConnectionUsageType.code);
@@ -19312,8 +19427,8 @@ const PropertyWaterConnection = _ref => {
19312
19427
  }
19313
19428
  }, [watchPropertyType, usageTypeOptions, setValue, watchWaterConnectionUsageType]);
19314
19429
  const floorOptions = useMemo(() => {
19315
- var _ptServicesMastersDat7, _ptServicesMastersDat8;
19316
- return ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat7 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat7 === void 0 ? void 0 : (_ptServicesMastersDat8 = _ptServicesMastersDat7.NoOfFloors) === null || _ptServicesMastersDat8 === void 0 ? void 0 : _ptServicesMastersDat8.filter(item => item.active).map(item => ({
19430
+ var _ptServicesMastersDat9, _ptServicesMastersDat0;
19431
+ 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
19432
  code: item.code,
19318
19433
  name: item.name
19319
19434
  }));
@@ -19362,7 +19477,7 @@ const PropertyWaterConnection = _ref => {
19362
19477
  setValue("useDetails.NumberofRooms", "");
19363
19478
  setValue("useDetails.numberOfBeds", "");
19364
19479
  setValue("useDetails.numberOfStudents", "");
19365
- setValue("useDetails.ServantQuartersRoom", "");
19480
+ setValue("useDetails.servantQuarterArea", "");
19366
19481
  }
19367
19482
  }, [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
19483
  const lastErrorState = React.useRef(null);
@@ -19498,7 +19613,7 @@ const PropertyWaterConnection = _ref => {
19498
19613
  disabled: isPropertyFound
19499
19614
  }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails6 = errors.useDetails) === null || _errors$useDetails6 === void 0 ? void 0 : _errors$useDetails6.plotArea) && /*#__PURE__*/React.createElement(CardLabelError, {
19500
19615
  style: errorStyle
19501
- }, errors.useDetails.plotArea.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, "" + t("WS_BUILT_UP_AREA")), /*#__PURE__*/React.createElement("div", {
19616
+ }, errors.useDetails.plotArea.message), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, "" + t("WS_BUILT_UP_AREA")), /*#__PURE__*/React.createElement("div", {
19502
19617
  className: "form-field"
19503
19618
  }, /*#__PURE__*/React.createElement(TextInput, {
19504
19619
  t: t,
@@ -19512,7 +19627,7 @@ const PropertyWaterConnection = _ref => {
19512
19627
  disabled: isPropertyFound
19513
19628
  }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails7 = errors.useDetails) === null || _errors$useDetails7 === void 0 ? void 0 : _errors$useDetails7.builtUpArea) && /*#__PURE__*/React.createElement(CardLabelError, {
19514
19629
  style: errorStyle
19515
- }, errors.useDetails.builtUpArea.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, "" + t("WS_FAR_AREA")), /*#__PURE__*/React.createElement("div", {
19630
+ }, errors.useDetails.builtUpArea.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, "" + t("WS_FAR_AREA")), /*#__PURE__*/React.createElement("div", {
19516
19631
  className: "form-field"
19517
19632
  }, /*#__PURE__*/React.createElement(TextInput, {
19518
19633
  t: t,
@@ -19520,13 +19635,26 @@ const PropertyWaterConnection = _ref => {
19520
19635
  pattern: {
19521
19636
  value: DECIMAL_PATTERN,
19522
19637
  message: t("ERR_INVALID_DECIMAL")
19638
+ },
19639
+ validate: value => {
19640
+ var _formValue$useDetails, _formValue$useDetails2;
19641
+ if (formValue !== null && formValue !== void 0 && (_formValue$useDetails = formValue.useDetails) !== null && _formValue$useDetails !== void 0 && _formValue$useDetails.builtUpArea && parseFloat(value) > parseFloat(formValue === null || formValue === void 0 ? void 0 : (_formValue$useDetails2 = formValue.useDetails) === null || _formValue$useDetails2 === void 0 ? void 0 : _formValue$useDetails2.builtUpArea)) {
19642
+ return t("WS_FAR_AREA_IS_SMALLER_THAN_BUILT_UP_AREA");
19643
+ }
19523
19644
  }
19524
19645
  }),
19525
19646
  name: "useDetails.farArea",
19526
19647
  disabled: isPropertyFound
19527
19648
  }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails8 = errors.useDetails) === null || _errors$useDetails8 === void 0 ? void 0 : _errors$useDetails8.farArea) && /*#__PURE__*/React.createElement(CardLabelError, {
19528
19649
  style: errorStyle
19529
- }, errors.useDetails.farArea.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_SELECT_YEAR_OF_CONSTRUCTION") + "*"), /*#__PURE__*/React.createElement("div", {
19650
+ }, errors.useDetails.farArea.message), (formValue === null || formValue === void 0 ? void 0 : (_formValue$useDetails3 = formValue.useDetails) === null || _formValue$useDetails3 === void 0 ? void 0 : _formValue$useDetails3.farArea) && (formValue === null || formValue === void 0 ? void 0 : (_formValue$useDetails4 = formValue.useDetails) === null || _formValue$useDetails4 === void 0 ? void 0 : _formValue$useDetails4.builtUpArea) && parseFloat(formValue === null || formValue === void 0 ? void 0 : (_formValue$useDetails5 = formValue.useDetails) === null || _formValue$useDetails5 === void 0 ? void 0 : _formValue$useDetails5.farArea) > parseFloat(formValue === null || formValue === void 0 ? void 0 : (_formValue$useDetails6 = formValue.useDetails) === null || _formValue$useDetails6 === void 0 ? void 0 : _formValue$useDetails6.builtUpArea) && /*#__PURE__*/React.createElement(CardLabelError, {
19651
+ style: {
19652
+ width: "70%",
19653
+ marginLeft: "30%",
19654
+ fontSize: "12px",
19655
+ marginTop: "5px"
19656
+ }
19657
+ }, t("WS_FAR_AREA_IS_SMALLER_THAN_BUILT_UP_AREA"))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_SELECT_YEAR_OF_CONSTRUCTION") + "*"), /*#__PURE__*/React.createElement("div", {
19530
19658
  className: "form-field"
19531
19659
  }, /*#__PURE__*/React.createElement(Controller, {
19532
19660
  control: control,
@@ -19613,11 +19741,11 @@ const PropertyWaterConnection = _ref => {
19613
19741
  message: t("ERR_INVALID_NUMBER")
19614
19742
  }
19615
19743
  }),
19616
- name: "useDetails.ServantQuartersRoom",
19744
+ name: "useDetails.servantQuarterArea",
19617
19745
  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.ServantQuartersRoom) && /*#__PURE__*/React.createElement(CardLabelError, {
19746
+ }))) : 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
19747
  style: errorStyle
19620
- }, errors.useDetails.ServantQuartersRoom.message)));
19748
+ }, errors.useDetails.servantQuarterArea.message)));
19621
19749
  };
19622
19750
 
19623
19751
  const SwitchComponent = props => {