@mseva/digit-ui-module-ndc 1.0.14 → 1.0.16

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.
@@ -1221,13 +1221,14 @@ const ApplicationOverview = () => {
1221
1221
  useEffect(() => {
1222
1222
  var _applicationDetails$A;
1223
1223
  const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
1224
+ console.log("ndcObject", ndcObject);
1224
1225
  if (ndcObject) {
1225
- var _ndcObject$NdcDetails, _ndcObject$NdcDetails2, _ndcObject$NdcDetails3, _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$, _removeDuplicatesByUU;
1226
+ var _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$, _ndcObject$NdcDetails, _ndcObject$NdcDetails2, _ndcObject$NdcDetails3, _removeDuplicatesByUU;
1226
1227
  const applicantData = {
1227
- address: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$NdcDetails = ndcObject.NdcDetails) === null || _ndcObject$NdcDetails === void 0 ? void 0 : (_ndcObject$NdcDetails2 = _ndcObject$NdcDetails[0]) === null || _ndcObject$NdcDetails2 === void 0 ? void 0 : (_ndcObject$NdcDetails3 = _ndcObject$NdcDetails2.additionalDetails) === null || _ndcObject$NdcDetails3 === void 0 ? void 0 : _ndcObject$NdcDetails3.propertyAddress,
1228
- email: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners = ndcObject.owners) === null || _ndcObject$owners === void 0 ? void 0 : (_ndcObject$owners$ = _ndcObject$owners[0]) === null || _ndcObject$owners$ === void 0 ? void 0 : _ndcObject$owners$.emailId,
1228
+ name: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners = ndcObject.owners) === null || _ndcObject$owners === void 0 ? void 0 : (_ndcObject$owners$ = _ndcObject$owners[0]) === null || _ndcObject$owners$ === void 0 ? void 0 : _ndcObject$owners$.name,
1229
1229
  mobile: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners2 = ndcObject.owners) === null || _ndcObject$owners2 === void 0 ? void 0 : (_ndcObject$owners2$ = _ndcObject$owners2[0]) === null || _ndcObject$owners2$ === void 0 ? void 0 : _ndcObject$owners2$.mobileNumber,
1230
- name: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners3 = ndcObject.owners) === null || _ndcObject$owners3 === void 0 ? void 0 : (_ndcObject$owners3$ = _ndcObject$owners3[0]) === null || _ndcObject$owners3$ === void 0 ? void 0 : _ndcObject$owners3$.name,
1230
+ email: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$owners3 = ndcObject.owners) === null || _ndcObject$owners3 === void 0 ? void 0 : (_ndcObject$owners3$ = _ndcObject$owners3[0]) === null || _ndcObject$owners3$ === void 0 ? void 0 : _ndcObject$owners3$.emailId,
1231
+ address: ndcObject === null || ndcObject === void 0 ? void 0 : (_ndcObject$NdcDetails = ndcObject.NdcDetails) === null || _ndcObject$NdcDetails === void 0 ? void 0 : (_ndcObject$NdcDetails2 = _ndcObject$NdcDetails[0]) === null || _ndcObject$NdcDetails2 === void 0 ? void 0 : (_ndcObject$NdcDetails3 = _ndcObject$NdcDetails2.additionalDetails) === null || _ndcObject$NdcDetails3 === void 0 ? void 0 : _ndcObject$NdcDetails3.propertyAddress,
1231
1232
  applicationNo: ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.uuid
1232
1233
  };
1233
1234
  const Documents = removeDuplicatesByUUID((ndcObject === null || ndcObject === void 0 ? void 0 : ndcObject.Documents) || []);
@@ -1375,9 +1376,9 @@ const ApplicationOverview = () => {
1375
1376
  value: {
1376
1377
  workflowDocs: displayData === null || displayData === void 0 ? void 0 : displayData.Documents
1377
1378
  }
1378
- }) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : _workflowDetails$data9.timeline) && /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("NDC_APPLICATION_TIMELINE")), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data0 = workflowDetails.data) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.timeline.length) === 1 ? /*#__PURE__*/React.createElement(CheckPoint, {
1379
+ }) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : _workflowDetails$data9.timeline) && /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data0 = workflowDetails.data) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.timeline.length) === 1 ? /*#__PURE__*/React.createElement(CheckPoint, {
1379
1380
  isCompleted: true,
1380
- label: t("NDC_STATUS_" + (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data1 = workflowDetails.data) === null || _workflowDetails$data1 === void 0 ? void 0 : (_workflowDetails$data10 = _workflowDetails$data1.timeline[0]) === null || _workflowDetails$data10 === void 0 ? void 0 : _workflowDetails$data10.status))
1381
+ label: t(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data1 = workflowDetails.data) === null || _workflowDetails$data1 === void 0 ? void 0 : (_workflowDetails$data10 = _workflowDetails$data1.timeline[0]) === null || _workflowDetails$data10 === void 0 ? void 0 : _workflowDetails$data10.status)
1381
1382
  }) : /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data11 = workflowDetails.data) === null || _workflowDetails$data11 === void 0 ? void 0 : _workflowDetails$data11.timeline.map((checkpoint, index, arr) => /*#__PURE__*/React.createElement(CheckPoint, {
1382
1383
  keyValue: index,
1383
1384
  isCompleted: index === 0,
@@ -9005,7 +9006,7 @@ const CitizenApplicationOverview = () => {
9005
9006
  value: {
9006
9007
  workflowDocs: displayData === null || displayData === void 0 ? void 0 : displayData.Documents
9007
9008
  }
9008
- }) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline) && /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("NDC_APPLICATION_TIMELINE")), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.timeline.length) === 1 ? /*#__PURE__*/React.createElement(CheckPoint, {
9009
+ }) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline) && /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.timeline.length) === 1 ? /*#__PURE__*/React.createElement(CheckPoint, {
9009
9010
  isCompleted: true,
9010
9011
  label: t("NDC_STATUS_" + (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data3 = workflowDetails.data) === null || _workflowDetails$data3 === void 0 ? void 0 : (_workflowDetails$data4 = _workflowDetails$data3.timeline[0]) === null || _workflowDetails$data4 === void 0 ? void 0 : _workflowDetails$data4.status))
9011
9012
  }) : /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data5 = workflowDetails.data) === null || _workflowDetails$data5 === void 0 ? void 0 : _workflowDetails$data5.timeline.map((checkpoint, index, arr) => /*#__PURE__*/React.createElement(CheckPoint, {
@@ -11435,7 +11436,7 @@ const PropertyDetailsStep2 = ({
11435
11436
  };
11436
11437
 
11437
11438
  const config = [{
11438
- head: "NDC_COMMON_NEW_APPLICATION",
11439
+ head: "",
11439
11440
  stepNumber: 1,
11440
11441
  body: [{
11441
11442
  name: "",
@@ -11477,8 +11478,8 @@ const config = [{
11477
11478
  }];
11478
11479
 
11479
11480
  const createEmployeeConfig = [{
11480
- head: "NDC Details",
11481
- stepLabel: "NDC Details",
11481
+ head: "Applicant Details",
11482
+ stepLabel: "Applicant Details",
11482
11483
  stepNumber: 1,
11483
11484
  isStepEnabled: true,
11484
11485
  type: "component",
@@ -11542,7 +11543,7 @@ const NewNDCStepForm = () => {
11542
11543
  color: "#1C1D1F"
11543
11544
  },
11544
11545
  divider: true
11545
- }, t("New NDC Application")), /*#__PURE__*/React.createElement(Stepper, {
11546
+ }, t("ndc_header_application")), /*#__PURE__*/React.createElement(Stepper, {
11546
11547
  stepsList: updatedCreateEmployeeconfig,
11547
11548
  onSubmit: handleSubmit,
11548
11549
  step: step,
@@ -11572,7 +11573,6 @@ const NewNDCStepFormOne = ({
11572
11573
  const tenantId = window.localStorage.getItem("CITIZEN.CITY");
11573
11574
  function goNext(data) {
11574
11575
  var _checkFormData$apiDat, _checkFormData$apiDat2, _checkFormData$apiDat3;
11575
- console.log(`Data in step ${config.currStepNumber} is: \n`, data);
11576
11576
  const missingFields = validateStepData(currentStepData);
11577
11577
  if (missingFields.length > 0) {
11578
11578
  setError(`${missingFields[0]}`);
@@ -11675,19 +11675,43 @@ const NewNDCStepFormOne = ({
11675
11675
  };
11676
11676
  }
11677
11677
  };
11678
- const validatePropertyId = value => {
11679
- const regex = /^PT-\d{4}-\d{7,8}$/;
11680
- return regex.test(value);
11681
- };
11682
11678
  function validateStepData(data) {
11679
+ var _data$cpt6, _data$cpt6$dues, _data$cpt7, _data$cpt7$dues, _data$dues, _propertyDetails$wate, _propertyDetails$sewe;
11683
11680
  const missingFields = [];
11684
11681
  const invalidFields = [];
11685
11682
  const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
11686
11683
  const cptDetails = (cpt === null || cpt === void 0 ? void 0 : cpt.details) || {};
11687
11684
  const propertyDetails = (data === null || data === void 0 ? void 0 : data.PropertyDetails) || {};
11688
11685
  const NDCReason = (data === null || data === void 0 ? void 0 : data.NDCReason) || {};
11686
+ if ((data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : (_data$cpt6$dues = _data$cpt6.dues) === null || _data$cpt6$dues === void 0 ? void 0 : _data$cpt6$dues.totalAmount) != 0) {
11687
+ missingFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
11688
+ }
11689
+ if (data !== null && data !== void 0 && (_data$cpt7 = data.cpt) !== null && _data$cpt7 !== void 0 && (_data$cpt7$dues = _data$cpt7.dues) !== null && _data$cpt7$dues !== void 0 && _data$cpt7$dues.id && (data === null || data === void 0 ? void 0 : (_data$dues = data.dues) === null || _data$dues === void 0 ? void 0 : _data$dues.totalAmount) > 0) {
11690
+ missingFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
11691
+ }
11692
+ if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.length) > 0) {
11693
+ propertyDetails.waterConnection.forEach(value => {
11694
+ var _value$billData, _value$billData2, _value$billData3;
11695
+ if ((value === null || value === void 0 ? void 0 : (_value$billData = value.billData) === null || _value$billData === void 0 ? void 0 : _value$billData.totalAmount) != 0) {
11696
+ missingFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_WATER_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
11697
+ }
11698
+ if (value !== null && value !== void 0 && (_value$billData2 = value.billData) !== null && _value$billData2 !== void 0 && _value$billData2.id && (value === null || value === void 0 ? void 0 : (_value$billData3 = value.billData) === null || _value$billData3 === void 0 ? void 0 : _value$billData3.totalAmount) > 0) {
11699
+ missingFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_WATER_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
11700
+ }
11701
+ });
11702
+ }
11703
+ if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.length) > 0) {
11704
+ propertyDetails.sewerageConnection.forEach(value => {
11705
+ var _value$billData4, _value$billData5, _value$billData6;
11706
+ if ((value === null || value === void 0 ? void 0 : (_value$billData4 = value.billData) === null || _value$billData4 === void 0 ? void 0 : _value$billData4.totalAmount) != 0) {
11707
+ missingFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_SEWERAGE_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
11708
+ }
11709
+ if (value !== null && value !== void 0 && (_value$billData5 = value.billData) !== null && _value$billData5 !== void 0 && _value$billData5.id && (value === null || value === void 0 ? void 0 : (_value$billData6 = value.billData) === null || _value$billData6 === void 0 ? void 0 : _value$billData6.totalAmount) > 0) {
11710
+ missingFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_SEWERAGE_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
11711
+ }
11712
+ });
11713
+ }
11689
11714
  if (!(cpt !== null && cpt !== void 0 && cpt.id)) missingFields.push(t("NDC_MESSAGE_PROPERTY_ID"));
11690
- if (!validatePropertyId(cpt === null || cpt === void 0 ? void 0 : cpt.id)) missingFields.push(t("PT_PROPERTY_ID_INVALID"));
11691
11715
  if (!cptDetails || Object.keys(cptDetails).length === 0) missingFields.push(t("NDC_MESSAGE_PLEASE_SEARCH_PROPERTY_ID"));
11692
11716
  if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName)) missingFields.push(t("NDC_MESSAGE_FIRST_NAME"));
11693
11717
  if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.lastName)) missingFields.push(t("NDC_MESSAGE_LAST_NAME"));
@@ -11701,8 +11725,12 @@ const NewNDCStepFormOne = ({
11701
11725
  if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName && !nameRegex.test(propertyDetails.firstName)) {
11702
11726
  invalidFields.push(t("NDC_MESSAGE_FIRST_NAME_ONLY_ALPHABETS_ALLOWED"));
11703
11727
  }
11704
- if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.lastName && !nameRegex.test(propertyDetails.lastName)) {
11705
- invalidFields.push(t("NDC_MESSAGE_LAST_NAME_ONLY_ALPHABETS_ALLOWED"));
11728
+ if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.lastName) {
11729
+ if (!nameRegex.test(propertyDetails.lastName)) {
11730
+ invalidFields.push(t("NDC_MESSAGE_LAST_NAME_ONLY_ALPHABETS_ALLOWED"));
11731
+ } else if (propertyDetails.lastName.length > 100) {
11732
+ invalidFields.push(t("NDC_MESSAGE_LAST_NAME_MAX_100_CHARACTERS"));
11733
+ }
11706
11734
  }
11707
11735
  if (propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.email && !emailRegex.test(propertyDetails.email)) {
11708
11736
  invalidFields.push(t("NDC_MESSAGE_EMAIL_INVALID_FORMAT"));
@@ -11834,7 +11862,7 @@ const PropertyDetailsForm$1 = ({
11834
11862
  formState,
11835
11863
  clearErrors
11836
11864
  }) => {
11837
- var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4, _formData$cpt5, _propertyDetails$prop, _propertyDetails$prop2, _formData$cpt7, _propertyDetails$prop3, _propertyDetails$prop4, _formData$cpt8, _propertyDetails$prop6, _propertyDetails$prop7, _propertyDetails$wate, _propertyDetails$sewe;
11865
+ var _formData$cpt, _formData$cpt$details, _formData$cpt3, _Digit, _Digit$ComponentRegis, _formData$cpt4, _propertyDetails$wate, _propertyDetails$sewe;
11838
11866
  const {
11839
11867
  control,
11840
11868
  formState: localFormState,
@@ -11970,7 +11998,6 @@ const PropertyDetailsForm$1 = ({
11970
11998
  }));
11971
11999
  }
11972
12000
  async function fetchBill(bussinessService, consumercodes, index) {
11973
- setPropertyLoader(true);
11974
12001
  if (bussinessService === "WS") {
11975
12002
  const updated = [...propertyDetails.waterConnection];
11976
12003
  updated[index].isLoading = true;
@@ -11986,6 +12013,7 @@ const PropertyDetailsForm$1 = ({
11986
12013
  sewerageConnection: updated
11987
12014
  }));
11988
12015
  } else if (bussinessService === "PT") {
12016
+ setPropertyLoader(true);
11989
12017
  let updated = {
11990
12018
  ...(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyBillData)
11991
12019
  };
@@ -12002,6 +12030,7 @@ const PropertyDetailsForm$1 = ({
12002
12030
  consumerCode: consumercodes
12003
12031
  });
12004
12032
  setPropertyLoader(false);
12033
+ console.log("result======???????", result);
12005
12034
  if ((result === null || result === void 0 ? void 0 : (_result$Bill = result.Bill) === null || _result$Bill === void 0 ? void 0 : _result$Bill.length) > 0) {
12006
12035
  var _result$Bill$;
12007
12036
  if ((result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) > 0) {
@@ -12044,11 +12073,14 @@ const PropertyDetailsForm$1 = ({
12044
12073
  }
12045
12074
  } else if (result !== null && result !== void 0 && result.Bill) {
12046
12075
  setShowToast({
12047
- error: true,
12076
+ error: false,
12048
12077
  label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
12049
12078
  });
12050
12079
  if (bussinessService === "WS") {
12051
12080
  const updated = [...propertyDetails.waterConnection];
12081
+ updated[index].billData = {
12082
+ totalAmount: 0
12083
+ };
12052
12084
  updated[index].isLoading = false;
12053
12085
  setPropertyDetails(prev => ({
12054
12086
  ...prev,
@@ -12056,6 +12088,9 @@ const PropertyDetailsForm$1 = ({
12056
12088
  }));
12057
12089
  } else if (bussinessService === "SW") {
12058
12090
  const updated = [...propertyDetails.sewerageConnection];
12091
+ updated[index].billData = {
12092
+ totalAmount: 0
12093
+ };
12059
12094
  updated[index].isLoading = false;
12060
12095
  setPropertyDetails(prev => ({
12061
12096
  ...prev,
@@ -12073,12 +12108,15 @@ const PropertyDetailsForm$1 = ({
12073
12108
  }
12074
12109
  } else {
12075
12110
  setShowToast({
12076
- error: true,
12077
- label: t("INVALID_CONSUMER_NUMBER")
12111
+ error: false,
12112
+ label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
12078
12113
  });
12079
12114
  if (bussinessService === "WS") {
12080
12115
  const updated = [...propertyDetails.waterConnection];
12081
12116
  updated[index].isLoading = false;
12117
+ updated[index].billData = {
12118
+ totalAmount: 0
12119
+ };
12082
12120
  setPropertyDetails(prev => ({
12083
12121
  ...prev,
12084
12122
  waterConnection: updated
@@ -12086,6 +12124,9 @@ const PropertyDetailsForm$1 = ({
12086
12124
  } else if (bussinessService === "SW") {
12087
12125
  const updated = [...propertyDetails.sewerageConnection];
12088
12126
  updated[index].isLoading = false;
12127
+ updated[index].billData = {
12128
+ totalAmount: 0
12129
+ };
12089
12130
  setPropertyDetails(prev => ({
12090
12131
  ...prev,
12091
12132
  sewerageConnection: updated
@@ -12121,9 +12162,14 @@ const PropertyDetailsForm$1 = ({
12121
12162
  } else if ((billData === null || billData === void 0 ? void 0 : billData.businessService) === "SW") {
12122
12163
  service = "SEWERAGE";
12123
12164
  } else if ((billData === null || billData === void 0 ? void 0 : billData.businessService) === "PT") {
12124
- service = "PROPERTY";
12165
+ service = "PT";
12166
+ }
12167
+ let payUrl;
12168
+ if ((billData === null || billData === void 0 ? void 0 : billData.businessService) === "PT") {
12169
+ payUrl = "https://sdc-uat.lgpunjab.gov.in" + `/${userType}/egov-common/pay?consumerCode=${billData === null || billData === void 0 ? void 0 : billData.consumerCode}&tenantId=${billData === null || billData === void 0 ? void 0 : billData.tenantId}&businessService=${service}`;
12170
+ } else {
12171
+ payUrl = "https://sdc-uat.lgpunjab.gov.in" + `/${userType}/wns/viewBill?connectionNumber=${billData === null || billData === void 0 ? void 0 : billData.consumerCode}&tenantId=${billData === null || billData === void 0 ? void 0 : billData.tenantId}&service=${service}`;
12125
12172
  }
12126
- const payUrl = "https://sdc-uat.lgpunjab.gov.in" + `/${userType}/wns/viewBill?connectionNumber=${billData === null || billData === void 0 ? void 0 : billData.consumerCode}&tenantId=${billData === null || billData === void 0 ? void 0 : billData.tenantId}&service=${service}`;
12127
12173
  window.open(payUrl, "_blank");
12128
12174
  if ((billData === null || billData === void 0 ? void 0 : billData.businessService) === "WS") {
12129
12175
  const updated = [...propertyDetails.waterConnection];
@@ -12169,43 +12215,7 @@ const PropertyDetailsForm$1 = ({
12169
12215
  style: {
12170
12216
  marginBottom: "16px"
12171
12217
  }
12172
- }, (formData === null || formData === void 0 ? void 0 : (_formData$cpt4 = formData.cpt) === null || _formData$cpt4 === void 0 ? void 0 : _formData$cpt4.details) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", {
12173
- className: "field",
12174
- style: {
12175
- display: "flex",
12176
- flexDirection: "column",
12177
- gap: "4px"
12178
- }
12179
- }, /*#__PURE__*/React.createElement("div", {
12180
- style: {
12181
- display: "flex",
12182
- flexDirection: "row"
12183
- }
12184
- }, propertyLoader ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", null, (formData === null || formData === void 0 ? void 0 : (_formData$cpt5 = formData.cpt) === null || _formData$cpt5 === void 0 ? void 0 : _formData$cpt5.id) && !(propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$prop = propertyDetails.propertyBillData) !== null && _propertyDetails$prop !== void 0 && (_propertyDetails$prop2 = _propertyDetails$prop.billData) !== null && _propertyDetails$prop2 !== void 0 && _propertyDetails$prop2.id) && /*#__PURE__*/React.createElement("button", {
12185
- className: "submit-bar",
12186
- type: "button",
12187
- style: {
12188
- color: "white"
12189
- },
12190
- onClick: () => {
12191
- var _formData$cpt6;
12192
- fetchBill("PT", formData === null || formData === void 0 ? void 0 : (_formData$cpt6 = formData.cpt) === null || _formData$cpt6 === void 0 ? void 0 : _formData$cpt6.id);
12193
- }
12194
- }, `${t("CHECK_STATUS")}`), (formData === null || formData === void 0 ? void 0 : (_formData$cpt7 = formData.cpt) === null || _formData$cpt7 === void 0 ? void 0 : _formData$cpt7.id) && (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$prop3 = propertyDetails.propertyBillData) === null || _propertyDetails$prop3 === void 0 ? void 0 : (_propertyDetails$prop4 = _propertyDetails$prop3.billData) === null || _propertyDetails$prop4 === void 0 ? void 0 : _propertyDetails$prop4.totalAmount) > 0 && /*#__PURE__*/React.createElement("button", {
12195
- className: "submit-bar",
12196
- type: "button",
12197
- style: {
12198
- color: "white"
12199
- },
12200
- onClick: () => {
12201
- var _propertyDetails$prop5;
12202
- redirectToPayBill(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$prop5 = propertyDetails.propertyBillData) === null || _propertyDetails$prop5 === void 0 ? void 0 : _propertyDetails$prop5.billData);
12203
- }
12204
- }, `${t("PAY_DUES")}`), (formData === null || formData === void 0 ? void 0 : (_formData$cpt8 = formData.cpt) === null || _formData$cpt8 === void 0 ? void 0 : _formData$cpt8.id) && (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$prop6 = propertyDetails.propertyBillData) === null || _propertyDetails$prop6 === void 0 ? void 0 : (_propertyDetails$prop7 = _propertyDetails$prop6.billData) === null || _propertyDetails$prop7 === void 0 ? void 0 : _propertyDetails$prop7.totalAmount) == 0 && /*#__PURE__*/React.createElement("div", {
12205
- style: {
12206
- color: "green"
12207
- }
12208
- }, t("NO_DUES_FOUND_FOR_PROPERTY")))))), /*#__PURE__*/React.createElement(LabelFieldPair, {
12218
+ }, (formData === null || formData === void 0 ? void 0 : (_formData$cpt4 = formData.cpt) === null || _formData$cpt4 === void 0 ? void 0 : _formData$cpt4.details) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, {
12209
12219
  style: {
12210
12220
  marginTop: "40px"
12211
12221
  }
@@ -12216,11 +12226,13 @@ const PropertyDetailsForm$1 = ({
12216
12226
  style: {
12217
12227
  display: "flex",
12218
12228
  flexDirection: "column",
12219
- gap: "8px"
12229
+ gap: "8px",
12230
+ width: "100%"
12220
12231
  }
12221
12232
  }, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.map((item, index) => {
12222
- var _item$billData, _item$billData2, _item$billData3;
12233
+ var _item$billData, _item$billData2, _item$billData3, _item$billData4;
12223
12234
  return /*#__PURE__*/React.createElement("div", {
12235
+ className: "ndc_property_search",
12224
12236
  key: index,
12225
12237
  style: {
12226
12238
  display: "flex",
@@ -12259,16 +12271,17 @@ const PropertyDetailsForm$1 = ({
12259
12271
  alignItems: "center",
12260
12272
  gap: "12px"
12261
12273
  }
12262
- }, (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$billData = item.billData) !== null && _item$billData !== void 0 && _item$billData.id) && /*#__PURE__*/React.createElement("button", {
12274
+ }, (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$billData = item.billData) !== null && _item$billData !== void 0 && _item$billData.id) && (item === null || item === void 0 ? void 0 : (_item$billData2 = item.billData) === null || _item$billData2 === void 0 ? void 0 : _item$billData2.totalAmount) != 0 && /*#__PURE__*/React.createElement("button", {
12263
12275
  className: "submit-bar",
12264
12276
  type: "button",
12265
12277
  style: {
12266
- color: "white"
12278
+ color: "white",
12279
+ fontSize: "13px"
12267
12280
  },
12268
12281
  onClick: () => {
12269
12282
  fetchBill("WS", item.connectionNo, index);
12270
12283
  }
12271
- }, `${t("CHECK_STATUS")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData2 = item.billData) === null || _item$billData2 === void 0 ? void 0 : _item$billData2.totalAmount) > 0 && /*#__PURE__*/React.createElement("button", {
12284
+ }, `${t("CHECK_STATUS_WATER")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData3 = item.billData) === null || _item$billData3 === void 0 ? void 0 : _item$billData3.totalAmount) > 0 && /*#__PURE__*/React.createElement("button", {
12272
12285
  className: "submit-bar",
12273
12286
  type: "button",
12274
12287
  style: {
@@ -12277,7 +12290,7 @@ const PropertyDetailsForm$1 = ({
12277
12290
  onClick: () => {
12278
12291
  redirectToPayBill(item === null || item === void 0 ? void 0 : item.billData, index, item.isEdit);
12279
12292
  }
12280
- }, `${t("PAY_DUES")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData3 = item.billData) === null || _item$billData3 === void 0 ? void 0 : _item$billData3.totalAmount) == 0 && /*#__PURE__*/React.createElement("div", {
12293
+ }, `${t("PAY_DUES")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData4 = item.billData) === null || _item$billData4 === void 0 ? void 0 : _item$billData4.totalAmount) == 0 && /*#__PURE__*/React.createElement("div", {
12281
12294
  style: {
12282
12295
  color: "green"
12283
12296
  }
@@ -12304,7 +12317,8 @@ const PropertyDetailsForm$1 = ({
12304
12317
  className: "submit-bar",
12305
12318
  type: "button",
12306
12319
  style: {
12307
- color: "white"
12320
+ color: "white",
12321
+ fontSize: "12px"
12308
12322
  },
12309
12323
  onClick: () => {
12310
12324
  addWaterConnection();
@@ -12320,11 +12334,13 @@ const PropertyDetailsForm$1 = ({
12320
12334
  style: {
12321
12335
  display: "flex",
12322
12336
  flexDirection: "column",
12323
- gap: "8px"
12337
+ gap: "8px",
12338
+ width: "100%"
12324
12339
  }
12325
12340
  }, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.map((item, index) => {
12326
- var _item$billData4, _item$billData5, _item$billData6;
12341
+ var _item$billData5, _item$billData6, _item$billData7, _item$billData8;
12327
12342
  return /*#__PURE__*/React.createElement("div", {
12343
+ className: "ndc_property_search",
12328
12344
  key: index,
12329
12345
  style: {
12330
12346
  display: "flex",
@@ -12363,26 +12379,30 @@ const PropertyDetailsForm$1 = ({
12363
12379
  alignItems: "center",
12364
12380
  gap: "12px"
12365
12381
  }
12366
- }, (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$billData4 = item.billData) !== null && _item$billData4 !== void 0 && _item$billData4.id) && /*#__PURE__*/React.createElement("button", {
12382
+ }, (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$billData5 = item.billData) !== null && _item$billData5 !== void 0 && _item$billData5.id) && (item === null || item === void 0 ? void 0 : (_item$billData6 = item.billData) === null || _item$billData6 === void 0 ? void 0 : _item$billData6.totalAmount) != 0 && /*#__PURE__*/React.createElement("button", {
12367
12383
  className: "submit-bar",
12368
12384
  type: "button",
12369
12385
  style: {
12370
- color: "white"
12386
+ color: "white",
12387
+ fontSize: "13px"
12371
12388
  },
12372
12389
  onClick: () => {
12373
12390
  fetchBill("SW", item.connectionNo, index);
12374
12391
  }
12375
- }, `${t("CHECK_STATUS")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData5 = item.billData) === null || _item$billData5 === void 0 ? void 0 : _item$billData5.totalAmount) > 0 && /*#__PURE__*/React.createElement("button", {
12392
+ }, `${t("CHECK_STATUS_SEWERAGE")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData7 = item.billData) === null || _item$billData7 === void 0 ? void 0 : _item$billData7.totalAmount) > 0 && /*#__PURE__*/React.createElement("button", {
12376
12393
  className: "submit-bar",
12377
12394
  type: "button",
12378
12395
  style: {
12379
- color: "white",
12380
- padding: "3px 100px"
12396
+ color: "white"
12381
12397
  },
12382
12398
  onClick: () => {
12383
12399
  redirectToPayBill(item === null || item === void 0 ? void 0 : item.billData, index);
12384
12400
  }
12385
- }, `${t("PAY_DUES")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData6 = item.billData) === null || _item$billData6 === void 0 ? void 0 : _item$billData6.totalAmount) == 0 && /*#__PURE__*/React.createElement("div", null, t("NO_DUES")), (item === null || item === void 0 ? void 0 : item.isEdit) && /*#__PURE__*/React.createElement("button", {
12401
+ }, `${t("PAY_DUES")}`), (item === null || item === void 0 ? void 0 : item.connectionNo) && (item === null || item === void 0 ? void 0 : (_item$billData8 = item.billData) === null || _item$billData8 === void 0 ? void 0 : _item$billData8.totalAmount) == 0 && /*#__PURE__*/React.createElement("div", {
12402
+ style: {
12403
+ color: "green"
12404
+ }
12405
+ }, t("NO_DUES")), (item === null || item === void 0 ? void 0 : item.isEdit) && /*#__PURE__*/React.createElement("button", {
12386
12406
  onClick: () => {
12387
12407
  let updated = [...propertyDetails.sewerageConnection];
12388
12408
  updated.splice(index, 1);
@@ -12405,7 +12425,8 @@ const PropertyDetailsForm$1 = ({
12405
12425
  className: "submit-bar",
12406
12426
  type: "button",
12407
12427
  style: {
12408
- color: "white"
12428
+ color: "white",
12429
+ fontSize: " 12px"
12409
12430
  },
12410
12431
  onClick: () => {
12411
12432
  addSewerageConnection();
@@ -12429,7 +12450,7 @@ const PropertyDetailsForm$1 = ({
12429
12450
  }
12430
12451
  },
12431
12452
  render: props => {
12432
- var _formData$cpt9, _formData$cpt9$detail, _formData$cpt9$detail2, _formData$cpt9$detail3, _formData$cpt9$detail4, _formData$cpt9$detail5, _formData$cpt9$detail6;
12453
+ var _formData$cpt5, _formData$cpt5$detail, _formData$cpt5$detail2, _formData$cpt5$detail3, _formData$cpt5$detail4, _formData$cpt5$detail5, _formData$cpt5$detail6;
12433
12454
  return /*#__PURE__*/React.createElement(TextInput, {
12434
12455
  value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.firstName) || "",
12435
12456
  onChange: e => {
@@ -12442,7 +12463,7 @@ const PropertyDetailsForm$1 = ({
12442
12463
  onBlur: e => {
12443
12464
  props.onBlur(e);
12444
12465
  },
12445
- disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt9 = formData.cpt) === null || _formData$cpt9 === void 0 ? void 0 : (_formData$cpt9$detail = _formData$cpt9.details) === null || _formData$cpt9$detail === void 0 ? void 0 : (_formData$cpt9$detail2 = _formData$cpt9$detail.owners) === null || _formData$cpt9$detail2 === void 0 ? void 0 : (_formData$cpt9$detail3 = _formData$cpt9$detail2[0]) === null || _formData$cpt9$detail3 === void 0 ? void 0 : (_formData$cpt9$detail4 = _formData$cpt9$detail3.name) === null || _formData$cpt9$detail4 === void 0 ? void 0 : (_formData$cpt9$detail5 = _formData$cpt9$detail4.split(" ")) === null || _formData$cpt9$detail5 === void 0 ? void 0 : (_formData$cpt9$detail6 = _formData$cpt9$detail5[0]) === null || _formData$cpt9$detail6 === void 0 ? void 0 : _formData$cpt9$detail6.length) > 0
12466
+ disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt5 = formData.cpt) === null || _formData$cpt5 === void 0 ? void 0 : (_formData$cpt5$detail = _formData$cpt5.details) === null || _formData$cpt5$detail === void 0 ? void 0 : (_formData$cpt5$detail2 = _formData$cpt5$detail.owners) === null || _formData$cpt5$detail2 === void 0 ? void 0 : (_formData$cpt5$detail3 = _formData$cpt5$detail2[0]) === null || _formData$cpt5$detail3 === void 0 ? void 0 : (_formData$cpt5$detail4 = _formData$cpt5$detail3.name) === null || _formData$cpt5$detail4 === void 0 ? void 0 : (_formData$cpt5$detail5 = _formData$cpt5$detail4.split(" ")) === null || _formData$cpt5$detail5 === void 0 ? void 0 : (_formData$cpt5$detail6 = _formData$cpt5$detail5[0]) === null || _formData$cpt5$detail6 === void 0 ? void 0 : _formData$cpt5$detail6.length) > 0
12446
12467
  });
12447
12468
  }
12448
12469
  }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
@@ -12460,7 +12481,7 @@ const PropertyDetailsForm$1 = ({
12460
12481
  }
12461
12482
  },
12462
12483
  render: props => {
12463
- var _formData$cpt0, _formData$cpt0$detail, _formData$cpt0$detail2, _formData$cpt0$detail3, _formData$cpt0$detail4, _formData$cpt0$detail5, _formData$cpt0$detail6;
12484
+ var _formData$cpt6, _formData$cpt6$detail, _formData$cpt6$detail2, _formData$cpt6$detail3, _formData$cpt6$detail4, _formData$cpt6$detail5, _formData$cpt6$detail6;
12464
12485
  return /*#__PURE__*/React.createElement(TextInput, {
12465
12486
  value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.lastName) || "",
12466
12487
  onChange: e => {
@@ -12473,7 +12494,7 @@ const PropertyDetailsForm$1 = ({
12473
12494
  onBlur: e => {
12474
12495
  props.onBlur(e);
12475
12496
  },
12476
- disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt0 = formData.cpt) === null || _formData$cpt0 === void 0 ? void 0 : (_formData$cpt0$detail = _formData$cpt0.details) === null || _formData$cpt0$detail === void 0 ? void 0 : (_formData$cpt0$detail2 = _formData$cpt0$detail.owners) === null || _formData$cpt0$detail2 === void 0 ? void 0 : (_formData$cpt0$detail3 = _formData$cpt0$detail2[0]) === null || _formData$cpt0$detail3 === void 0 ? void 0 : (_formData$cpt0$detail4 = _formData$cpt0$detail3.name) === null || _formData$cpt0$detail4 === void 0 ? void 0 : (_formData$cpt0$detail5 = _formData$cpt0$detail4.split(" ")) === null || _formData$cpt0$detail5 === void 0 ? void 0 : (_formData$cpt0$detail6 = _formData$cpt0$detail5[1]) === null || _formData$cpt0$detail6 === void 0 ? void 0 : _formData$cpt0$detail6.length) > 0
12497
+ disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt6 = formData.cpt) === null || _formData$cpt6 === void 0 ? void 0 : (_formData$cpt6$detail = _formData$cpt6.details) === null || _formData$cpt6$detail === void 0 ? void 0 : (_formData$cpt6$detail2 = _formData$cpt6$detail.owners) === null || _formData$cpt6$detail2 === void 0 ? void 0 : (_formData$cpt6$detail3 = _formData$cpt6$detail2[0]) === null || _formData$cpt6$detail3 === void 0 ? void 0 : (_formData$cpt6$detail4 = _formData$cpt6$detail3.name) === null || _formData$cpt6$detail4 === void 0 ? void 0 : (_formData$cpt6$detail5 = _formData$cpt6$detail4.split(" ")) === null || _formData$cpt6$detail5 === void 0 ? void 0 : (_formData$cpt6$detail6 = _formData$cpt6$detail5[1]) === null || _formData$cpt6$detail6 === void 0 ? void 0 : _formData$cpt6$detail6.length) > 0
12477
12498
  });
12478
12499
  }
12479
12500
  }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
@@ -12485,7 +12506,7 @@ const PropertyDetailsForm$1 = ({
12485
12506
  name: "email",
12486
12507
  defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email) || "",
12487
12508
  render: props => {
12488
- var _formData$cpt1, _formData$cpt1$detail, _formData$cpt1$detail2, _formData$cpt1$detail3, _formData$cpt1$detail4;
12509
+ var _formData$cpt7, _formData$cpt7$detail, _formData$cpt7$detail2, _formData$cpt7$detail3, _formData$cpt7$detail4;
12489
12510
  return /*#__PURE__*/React.createElement(TextInput, {
12490
12511
  value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.email,
12491
12512
  onChange: e => {
@@ -12498,7 +12519,7 @@ const PropertyDetailsForm$1 = ({
12498
12519
  onBlur: e => {
12499
12520
  props.onBlur(e);
12500
12521
  },
12501
- disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt1 = formData.cpt) === null || _formData$cpt1 === void 0 ? void 0 : (_formData$cpt1$detail = _formData$cpt1.details) === null || _formData$cpt1$detail === void 0 ? void 0 : (_formData$cpt1$detail2 = _formData$cpt1$detail.owners) === null || _formData$cpt1$detail2 === void 0 ? void 0 : (_formData$cpt1$detail3 = _formData$cpt1$detail2[0]) === null || _formData$cpt1$detail3 === void 0 ? void 0 : (_formData$cpt1$detail4 = _formData$cpt1$detail3.email) === null || _formData$cpt1$detail4 === void 0 ? void 0 : _formData$cpt1$detail4.length) > 0
12522
+ disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt7 = formData.cpt) === null || _formData$cpt7 === void 0 ? void 0 : (_formData$cpt7$detail = _formData$cpt7.details) === null || _formData$cpt7$detail === void 0 ? void 0 : (_formData$cpt7$detail2 = _formData$cpt7$detail.owners) === null || _formData$cpt7$detail2 === void 0 ? void 0 : (_formData$cpt7$detail3 = _formData$cpt7$detail2[0]) === null || _formData$cpt7$detail3 === void 0 ? void 0 : (_formData$cpt7$detail4 = _formData$cpt7$detail3.email) === null || _formData$cpt7$detail4 === void 0 ? void 0 : _formData$cpt7$detail4.length) > 0
12502
12523
  });
12503
12524
  }
12504
12525
  }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
@@ -12531,7 +12552,7 @@ const PropertyDetailsForm$1 = ({
12531
12552
  name: "address",
12532
12553
  defaultValue: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address) || "",
12533
12554
  render: props => {
12534
- var _formData$cpt10, _formData$cpt10$detai, _formData$cpt10$detai2, _formData$cpt10$detai3, _formData$cpt10$detai4;
12555
+ var _formData$cpt8, _formData$cpt8$detail, _formData$cpt8$detail2, _formData$cpt8$detail3, _formData$cpt8$detail4;
12535
12556
  return /*#__PURE__*/React.createElement(TextInput, {
12536
12557
  value: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address,
12537
12558
  onChange: e => {
@@ -12544,7 +12565,7 @@ const PropertyDetailsForm$1 = ({
12544
12565
  onBlur: e => {
12545
12566
  props.onBlur(e);
12546
12567
  },
12547
- disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt10 = formData.cpt) === null || _formData$cpt10 === void 0 ? void 0 : (_formData$cpt10$detai = _formData$cpt10.details) === null || _formData$cpt10$detai === void 0 ? void 0 : (_formData$cpt10$detai2 = _formData$cpt10$detai.owners) === null || _formData$cpt10$detai2 === void 0 ? void 0 : (_formData$cpt10$detai3 = _formData$cpt10$detai2[0]) === null || _formData$cpt10$detai3 === void 0 ? void 0 : (_formData$cpt10$detai4 = _formData$cpt10$detai3.permanentAddress) === null || _formData$cpt10$detai4 === void 0 ? void 0 : _formData$cpt10$detai4.length) > 0
12568
+ disabled: (formData === null || formData === void 0 ? void 0 : (_formData$cpt8 = formData.cpt) === null || _formData$cpt8 === void 0 ? void 0 : (_formData$cpt8$detail = _formData$cpt8.details) === null || _formData$cpt8$detail === void 0 ? void 0 : (_formData$cpt8$detail2 = _formData$cpt8$detail.owners) === null || _formData$cpt8$detail2 === void 0 ? void 0 : (_formData$cpt8$detail3 = _formData$cpt8$detail2[0]) === null || _formData$cpt8$detail3 === void 0 ? void 0 : (_formData$cpt8$detail4 = _formData$cpt8$detail3.permanentAddress) === null || _formData$cpt8$detail4 === void 0 ? void 0 : _formData$cpt8$detail4.length) > 0
12548
12569
  });
12549
12570
  }
12550
12571
  })))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
@@ -12588,28 +12609,23 @@ const getAddress = (address, t) => {
12588
12609
  const PropertySearchNSummary = ({
12589
12610
  config,
12590
12611
  onSelect,
12591
- userType,
12592
- formData,
12593
- setError,
12594
- formState,
12595
- clearErrors
12612
+ formData
12596
12613
  }) => {
12597
- var _formData$cpt, _formData$cpt2, _propertyDetails$Prop3;
12614
+ var _formData$cpt, _formData$cpt2, _propertyDetails$Prop3, _formData$cpt11, _formData$cpt12, _formData$cpt14, _formData$cpt15, _formData$cpt15$dues, _formData$cpt17, _formData$cpt18, _formData$cpt18$dues;
12598
12615
  const {
12599
12616
  t
12600
12617
  } = useTranslation();
12601
- const history = useHistory();
12618
+ const myElementRef = useRef(null);
12602
12619
  let {
12603
12620
  pathname,
12604
12621
  state
12605
12622
  } = useLocation();
12606
12623
  state = state && (typeof state === "string" || state instanceof String) ? JSON.parse(state) : state;
12607
12624
  const isEditScreen = pathname.includes("/modify-application/");
12608
- const tenantId = Digit.ULBService.getCurrentPermanentCity();
12609
- const isEmpNewApplication = window.location.href.includes("/employee/tl/new-application") || window.location.href.includes("/citizen/tl/tradelicence/new-application");
12610
- const isEmpRenewLicense = window.location.href.includes("/employee/tl/renew-application-details") || window.location.href.includes("/employee/tl/edit-application-details");
12625
+ const tenantId = window.location.href.includes("employee") ? Digit.ULBService.getCurrentPermanentCity() : localStorage.getItem("CITIZEN.CITY");
12611
12626
  const search = useLocation().search;
12612
12627
  const urlPropertyId = new URLSearchParams(search).get("propertyId");
12628
+ const isfirstRender = useRef(true);
12613
12629
  const [propertyId, setPropertyId] = useState((formData === null || formData === void 0 ? void 0 : (_formData$cpt = formData.cpt) === null || _formData$cpt === void 0 ? void 0 : _formData$cpt.id) || (urlPropertyId !== "null" ? urlPropertyId : "") || "");
12614
12630
  const [searchPropertyId, setSearchPropertyId] = useState(formData !== null && formData !== void 0 && (_formData$cpt2 = formData.cpt) !== null && _formData$cpt2 !== void 0 && _formData$cpt2.id || urlPropertyId !== "null" ? urlPropertyId : "");
12615
12631
  const [showToast, setShowToast] = useState(null);
@@ -12628,9 +12644,22 @@ const PropertySearchNSummary = ({
12628
12644
  };
12629
12645
  }
12630
12646
  });
12631
- const isMobile = window.Digit.Utils.browser.isMobile();
12632
- const serachParams = window.location.href.includes("?") ? window.location.href.substring(window.location.href.indexOf("?") + 1, window.location.href.length) : "";
12633
- const myElementRef = useRef(null);
12647
+ const [propertyDues, setPropertyDues] = useState(() => {
12648
+ var _formData$cpt6, _formData$cpt7;
12649
+ if (formData !== null && formData !== void 0 && (_formData$cpt6 = formData.cpt) !== null && _formData$cpt6 !== void 0 && _formData$cpt6.dues && Object.keys(formData === null || formData === void 0 ? void 0 : (_formData$cpt7 = formData.cpt) === null || _formData$cpt7 === void 0 ? void 0 : _formData$cpt7.dues).length > 0) {
12650
+ var _formData$cpt8;
12651
+ return {
12652
+ dues: {
12653
+ ...(formData === null || formData === void 0 ? void 0 : (_formData$cpt8 = formData.cpt) === null || _formData$cpt8 === void 0 ? void 0 : _formData$cpt8.dues)
12654
+ }
12655
+ };
12656
+ } else {
12657
+ return {
12658
+ dues: {}
12659
+ };
12660
+ }
12661
+ });
12662
+ const [isSearchClicked, setIsSearchClicked] = useState(false);
12634
12663
  const {
12635
12664
  isLoading,
12636
12665
  isError,
@@ -12649,19 +12678,18 @@ const PropertySearchNSummary = ({
12649
12678
  enabled: searchPropertyId ? true : false,
12650
12679
  privacy: Digit.Utils.getPrivacyObject()
12651
12680
  });
12652
- const isfirstRender = useRef(true);
12653
12681
  useEffect(() => {
12654
12682
  var _propertyDetailsFetch;
12655
12683
  if (propertyDetailsFetch && propertyDetailsFetch !== null && propertyDetailsFetch !== void 0 && propertyDetailsFetch.Properties && (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch === void 0 ? void 0 : _propertyDetailsFetch.length) > 0) {
12656
12684
  setPropertyDetails(propertyDetailsFetch);
12657
12685
  setShowToast(null);
12658
12686
  } else {
12659
- var _formData$cpt6;
12687
+ var _formData$cpt9;
12660
12688
  if (isfirstRender.current) {
12661
12689
  isfirstRender.current = false;
12662
12690
  return;
12663
12691
  }
12664
- if (!(formData !== null && formData !== void 0 && (_formData$cpt6 = formData.cpt) !== null && _formData$cpt6 !== void 0 && _formData$cpt6.details)) {
12692
+ if (!(formData !== null && formData !== void 0 && (_formData$cpt9 = formData.cpt) !== null && _formData$cpt9 !== void 0 && _formData$cpt9.details)) {
12665
12693
  console.log("Property Id not found in response", propertyId);
12666
12694
  setPropertyDetails({});
12667
12695
  setShowToast({
@@ -12691,6 +12719,12 @@ const PropertySearchNSummary = ({
12691
12719
  details: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop2 = propertyDetails.Properties) === null || _propertyDetails$Prop2 === void 0 ? void 0 : _propertyDetails$Prop2[0]
12692
12720
  });
12693
12721
  }, [propertyDetails, pathname]);
12722
+ useEffect(() => {
12723
+ onSelect(config.key, {
12724
+ ...formData[config.key],
12725
+ dues: propertyDues === null || propertyDues === void 0 ? void 0 : propertyDues.dues
12726
+ });
12727
+ }, [propertyDues, pathname]);
12694
12728
  const searchProperty = () => {
12695
12729
  if (!propertyId) {
12696
12730
  setShowToast({
@@ -12704,8 +12738,14 @@ const PropertySearchNSummary = ({
12704
12738
  Properties: []
12705
12739
  });
12706
12740
  setSearchPropertyId(propertyId);
12741
+ setIsSearchClicked(true);
12707
12742
  }
12708
12743
  };
12744
+ const handlePropertyChange = e => {
12745
+ setPropertyId(e.target.value);
12746
+ setValue(e.target.value, propertyIdInput.name);
12747
+ setIsSearchClicked(false);
12748
+ };
12709
12749
  if (isEditScreen) {
12710
12750
  return /*#__PURE__*/React.createElement(React.Fragment, null);
12711
12751
  }
@@ -12736,7 +12776,65 @@ const PropertySearchNSummary = ({
12736
12776
  function getValue(input) {
12737
12777
  return formData && formData[config.key] ? formData[config.key][input] : undefined;
12738
12778
  }
12739
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
12779
+ async function fetchBill() {
12780
+ try {
12781
+ var _formData$cpt0, _result$Bill;
12782
+ const result = await Digit.PaymentService.fetchBill(tenantId, {
12783
+ businessService: "PT",
12784
+ consumerCode: formData === null || formData === void 0 ? void 0 : (_formData$cpt0 = formData.cpt) === null || _formData$cpt0 === void 0 ? void 0 : _formData$cpt0.id
12785
+ });
12786
+ if ((result === null || result === void 0 ? void 0 : (_result$Bill = result.Bill) === null || _result$Bill === void 0 ? void 0 : _result$Bill.length) > 0) {
12787
+ var _result$Bill$;
12788
+ if ((result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) > 0) {
12789
+ setShowToast({
12790
+ error: true,
12791
+ label: t("NDC_MESSAGE_DUES_FOUND_PLEASE_PAY")
12792
+ });
12793
+ } else {
12794
+ setShowToast({
12795
+ error: false,
12796
+ label: t("NDC_MESSAGE_NO_DUES_FOUND")
12797
+ });
12798
+ }
12799
+ setPropertyDues({
12800
+ dues: result === null || result === void 0 ? void 0 : result.Bill[0]
12801
+ });
12802
+ } else if (result !== null && result !== void 0 && result.Bill) {
12803
+ setShowToast({
12804
+ error: false,
12805
+ label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
12806
+ });
12807
+ setPropertyDues({
12808
+ dues: {
12809
+ totalAmount: 0
12810
+ }
12811
+ });
12812
+ } else {
12813
+ setShowToast({
12814
+ error: false,
12815
+ label: t("NDC_MESSAGE_NO_BILLS_FOUND_FOR_THIS_CONSUMER_NUMBER")
12816
+ });
12817
+ setPropertyDues({
12818
+ dues: {
12819
+ totalAmount: 0
12820
+ }
12821
+ });
12822
+ }
12823
+ } catch (error) {
12824
+ setShowToast({
12825
+ error: true,
12826
+ label: t("NDC_MESSAGE_FETCH_FAILED")
12827
+ });
12828
+ }
12829
+ }
12830
+ function redirectToPayBill(billData, index, isEdit) {
12831
+ var _formData$cpt1, _formData$cpt10, _formData$cpt10$detai;
12832
+ const userType = window.location.href.includes("employee") ? "employee" : "citizen";
12833
+ const payUrl = "https://sdc-uat.lgpunjab.gov.in" + `/${userType}/egov-common/pay?consumerCode=${formData === null || formData === void 0 ? void 0 : (_formData$cpt1 = formData.cpt) === null || _formData$cpt1 === void 0 ? void 0 : _formData$cpt1.id}&tenantId=${formData === null || formData === void 0 ? void 0 : (_formData$cpt10 = formData.cpt) === null || _formData$cpt10 === void 0 ? void 0 : (_formData$cpt10$detai = _formData$cpt10.details) === null || _formData$cpt10$detai === void 0 ? void 0 : _formData$cpt10$detai.tenantId}&businessService=PT`;
12834
+ window.open(payUrl, "_blank");
12835
+ setPropertyDues({});
12836
+ }
12837
+ return /*#__PURE__*/React.createElement(React.Fragment, null, isLoading && /*#__PURE__*/React.createElement(Loader, null), /*#__PURE__*/React.createElement("div", {
12740
12838
  style: {
12741
12839
  marginBottom: "16px"
12742
12840
  }
@@ -12744,36 +12842,62 @@ const PropertySearchNSummary = ({
12744
12842
  className: "card-label-smaller",
12745
12843
  style: getInputStyles()
12746
12844
  }, `${t(propertyIdInput.label)}`, null), /*#__PURE__*/React.createElement("div", {
12747
- className: "field",
12845
+ className: "field ndc_property_search",
12748
12846
  style: {
12749
12847
  marginTop: "20px",
12750
- display: "flex"
12848
+ display: "flex",
12849
+ gap: "16px",
12850
+ alignItems: "baseline",
12851
+ width: "100%"
12751
12852
  },
12752
12853
  ref: myElementRef,
12753
12854
  id: "search-property-field"
12754
12855
  }, /*#__PURE__*/React.createElement(TextInput, Object.assign({
12755
12856
  key: propertyIdInput.name,
12756
12857
  value: getValue(propertyIdInput.name),
12757
- onChange: e => {
12758
- setPropertyId(e.target.value);
12759
- setValue(e.target.value, propertyIdInput.name);
12760
- },
12858
+ onChange: handlePropertyChange,
12761
12859
  disable: false,
12762
12860
  maxlength: 16,
12763
- defaultValue: undefined,
12861
+ defaultValue: undefined
12862
+ }, propertyIdInput.validation)), !isSearchClicked && /*#__PURE__*/React.createElement("button", {
12863
+ className: "submit-bar",
12864
+ type: "button",
12865
+ style: {
12866
+ color: "white",
12867
+ width: "100%",
12868
+ maxWidth: "100px"
12869
+ },
12870
+ onClick: searchProperty
12871
+ }, `${t("PT_SEARCH")}`), (formData === null || formData === void 0 ? void 0 : (_formData$cpt11 = formData.cpt) === null || _formData$cpt11 === void 0 ? void 0 : _formData$cpt11.details) && !(formData !== null && formData !== void 0 && (_formData$cpt12 = formData.cpt) !== null && _formData$cpt12 !== void 0 && _formData$cpt12.dues) && /*#__PURE__*/React.createElement("button", {
12872
+ className: "submit-bar",
12873
+ type: "button",
12764
12874
  style: {
12765
- width: "80%",
12766
- float: "left",
12767
- marginRight: "20px"
12875
+ color: "white",
12876
+ fontSize: "13px",
12877
+ width: "100%",
12878
+ maxWidth: "180px"
12879
+ },
12880
+ onClick: () => {
12881
+ fetchBill();
12768
12882
  }
12769
- }, propertyIdInput.validation)), /*#__PURE__*/React.createElement("button", {
12883
+ }, `${t("CHECK_STATUS_PROPERTY")}`), (formData === null || formData === void 0 ? void 0 : (_formData$cpt14 = formData.cpt) === null || _formData$cpt14 === void 0 ? void 0 : _formData$cpt14.id) && (formData === null || formData === void 0 ? void 0 : (_formData$cpt15 = formData.cpt) === null || _formData$cpt15 === void 0 ? void 0 : (_formData$cpt15$dues = _formData$cpt15.dues) === null || _formData$cpt15$dues === void 0 ? void 0 : _formData$cpt15$dues.totalAmount) > 0 && /*#__PURE__*/React.createElement("button", {
12770
12884
  className: "submit-bar",
12771
12885
  type: "button",
12772
12886
  style: {
12773
- color: "white"
12887
+ color: "white",
12888
+ width: "100%",
12889
+ maxWidth: "100px"
12774
12890
  },
12775
- onClick: searchProperty
12776
- }, `${t("PT_SEARCH")}`))), showToast && /*#__PURE__*/React.createElement(Toast, {
12891
+ onClick: () => {
12892
+ redirectToPayBill();
12893
+ }
12894
+ }, `${t("PAY_DUES")}`), (formData === null || formData === void 0 ? void 0 : (_formData$cpt17 = formData.cpt) === null || _formData$cpt17 === void 0 ? void 0 : _formData$cpt17.id) && (formData === null || formData === void 0 ? void 0 : (_formData$cpt18 = formData.cpt) === null || _formData$cpt18 === void 0 ? void 0 : (_formData$cpt18$dues = _formData$cpt18.dues) === null || _formData$cpt18$dues === void 0 ? void 0 : _formData$cpt18$dues.totalAmount) == 0 && /*#__PURE__*/React.createElement("div", {
12895
+ style: {
12896
+ color: "green",
12897
+ width: "100%",
12898
+ maxWidth: "75px"
12899
+ }
12900
+ }, t("NO_DUES_FOUND_FOR_PROPERTY")))), showToast && /*#__PURE__*/React.createElement(Toast, {
12777
12901
  isDleteBtn: true,
12778
12902
  labelstyle: {
12779
12903
  width: "100%"
@@ -13486,8 +13610,8 @@ const PayWSBillModal = ({
13486
13610
  };
13487
13611
 
13488
13612
  const createEmployeeConfig$1 = [{
13489
- head: "NDC Details",
13490
- stepLabel: "NDC Details",
13613
+ head: "Applicant Details",
13614
+ stepLabel: "Applicant Details",
13491
13615
  stepNumber: 1,
13492
13616
  isStepEnabled: true,
13493
13617
  type: "component",
@@ -13548,7 +13672,7 @@ const NewNDCStepForm$1 = () => {
13548
13672
  color: "#1C1D1F"
13549
13673
  },
13550
13674
  divider: true
13551
- }, t("New NDC Application")), /*#__PURE__*/React.createElement(Stepper, {
13675
+ }, t("ndc_header_application")), /*#__PURE__*/React.createElement(Stepper, {
13552
13676
  stepsList: updatedCreateEmployeeconfig$1,
13553
13677
  onSubmit: handleSubmit,
13554
13678
  step: step,
@@ -13688,12 +13812,41 @@ const NewNDCStepFormOne$1 = ({
13688
13812
  }
13689
13813
  };
13690
13814
  function validateStepData(data) {
13815
+ var _data$cpt6, _data$cpt6$dues, _data$cpt7, _data$cpt7$dues, _data$dues, _propertyDetails$wate, _propertyDetails$sewe;
13691
13816
  const missingFields = [];
13692
13817
  const invalidFields = [];
13693
13818
  const cpt = (data === null || data === void 0 ? void 0 : data.cpt) || {};
13694
13819
  const cptDetails = (cpt === null || cpt === void 0 ? void 0 : cpt.details) || {};
13695
13820
  const propertyDetails = (data === null || data === void 0 ? void 0 : data.PropertyDetails) || {};
13696
13821
  const NDCReason = (data === null || data === void 0 ? void 0 : data.NDCReason) || {};
13822
+ if ((data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : (_data$cpt6$dues = _data$cpt6.dues) === null || _data$cpt6$dues === void 0 ? void 0 : _data$cpt6$dues.totalAmount) != 0) {
13823
+ invalidFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
13824
+ }
13825
+ if (data !== null && data !== void 0 && (_data$cpt7 = data.cpt) !== null && _data$cpt7 !== void 0 && (_data$cpt7$dues = _data$cpt7.dues) !== null && _data$cpt7$dues !== void 0 && _data$cpt7$dues.id && (data === null || data === void 0 ? void 0 : (_data$dues = data.dues) === null || _data$dues === void 0 ? void 0 : _data$dues.totalAmount) > 0) {
13826
+ invalidFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_PROPERTY_TAX")} ${cpt === null || cpt === void 0 ? void 0 : cpt.id}`);
13827
+ }
13828
+ if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.length) > 0) {
13829
+ propertyDetails.waterConnection.forEach(value => {
13830
+ var _value$billData, _value$billData2, _value$billData3;
13831
+ if ((value === null || value === void 0 ? void 0 : (_value$billData = value.billData) === null || _value$billData === void 0 ? void 0 : _value$billData.totalAmount) != 0) {
13832
+ invalidFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_WATER_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
13833
+ }
13834
+ if (value !== null && value !== void 0 && (_value$billData2 = value.billData) !== null && _value$billData2 !== void 0 && _value$billData2.id && (value === null || value === void 0 ? void 0 : (_value$billData3 = value.billData) === null || _value$billData3 === void 0 ? void 0 : _value$billData3.totalAmount) > 0) {
13835
+ invalidFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_WATER_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
13836
+ }
13837
+ });
13838
+ }
13839
+ if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.length) > 0) {
13840
+ propertyDetails.sewerageConnection.forEach(value => {
13841
+ var _value$billData4, _value$billData5, _value$billData6;
13842
+ if ((value === null || value === void 0 ? void 0 : (_value$billData4 = value.billData) === null || _value$billData4 === void 0 ? void 0 : _value$billData4.totalAmount) != 0) {
13843
+ invalidFields.push(`${t("NDC_MESSAGE_PLEASE_CHECK_STATUS_OF_SEWERAGE_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
13844
+ }
13845
+ if (value !== null && value !== void 0 && (_value$billData5 = value.billData) !== null && _value$billData5 !== void 0 && _value$billData5.id && (value === null || value === void 0 ? void 0 : (_value$billData6 = value.billData) === null || _value$billData6 === void 0 ? void 0 : _value$billData6.totalAmount) > 0) {
13846
+ invalidFields.push(`${t("NDC_MESSAGE_PLEASE_PAY_DUES_OF_SEWERAGE_CONNECTION")} ${value === null || value === void 0 ? void 0 : value.connectionNo}`);
13847
+ }
13848
+ });
13849
+ }
13697
13850
  if (!(cpt !== null && cpt !== void 0 && cpt.id)) missingFields.push(t("NDC_MESSAGE_PROPERTY_ID"));
13698
13851
  if (!cptDetails || Object.keys(cptDetails).length === 0) missingFields.push(t("NDC_MESSAGE_PLEASE_SEARCH_PROPERTY_ID"));
13699
13852
  if (!(propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.firstName)) missingFields.push(t("NDC_MESSAGE_FIRST_NAME"));