@djb25/digit-ui-module-ws 1.0.17 → 1.0.18

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.
@@ -441,29 +441,32 @@ const getFiles = async (filesArray, tenant) => {
441
441
  response !== null && response !== void 0 && (_response$data = response.data) !== null && _response$data !== void 0 && (_response$data$fileSt = _response$data.fileStoreIds) !== null && _response$data$fileSt !== void 0 && (_response$data$fileSt2 = _response$data$fileSt[0]) !== null && _response$data$fileSt2 !== void 0 && _response$data$fileSt2.url ? window.open(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$fileS = _response$data2.fileStoreIds) === null || _response$data2$fileS === void 0 ? void 0 : (_response$data2$fileS2 = _response$data2$fileS[0]) === null || _response$data2$fileS2 === void 0 ? void 0 : _response$data2$fileS2.url) : null;
442
442
  };
443
443
  const createPayloadOfWS = async data => {
444
- var _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$ConnectionDetai, _data$ConnectionDetai2, _data$ConnectionDetai3, _data$ConnectionDetai4, _data$ConnectionDetai5, _data$ConnectionDetai6, _data$ConnectionDetai7, _data$ConnectionDetai8, _data$ConnectionDetai9, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$ConnectionDetai13, _data$ConnectionDetai14, _data$ConnectionDetai15, _data$ConnectionDetai16, _data$ConnectionDetai17, _data$ConnectionDetai18, _data$ConnectionDetai19, _data$ConnectionDetai20, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$ConnectionHolde8, _data$ConnectionHolde9, _data$ConnectionHolde0, _data$ConnectionHolde1, _data$ConnectionHolde10, _data$ConnectionHolde11, _data$ConnectionHolde12, _data$ConnectionHolde13, _data$ConnectionHolde14, _data$ConnectionHolde15, _data$ConnectionHolde16, _data$ConnectionHolde17, _data$ConnectionHolde18, _data$ConnectionHolde19, _data$ConnectionHolde20, _data$ConnectionDetai21, _data$ConnectionDetai22, _data$ConnectionDetai23, _data$ConnectionDetai24, _data$ConnectionDetai25, _data$ConnectionDetai26, _data$ConnectionDetai27, _data$ConnectionDetai28, _data$cpt2, _data$cpt3, _data$cpt3$details, _data$cpt4, _data$cpt4$details, _data$cpt4$details$ad, _data$cpt4$details$ad2, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$DocumentsRequir, _data$cpt6, _Digit, _Digit$Customizations, _Digit$Customizations2, _Digit2, _Digit2$Customization, _Digit2$Customization2;
444
+ var _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$applicationSele, _data$applicationSele2, _data$useDetails, _data$useDetails2, _data$useDetails3, _data$useDetails3$pro, _data$useDetails4, _data$useDetails4$pro, _data$useDetails5, _data$useDetails6, _data$useDetails7, _data$useDetails8, _data$propertyAddress, _data$applicant, _data$useDetails9, _data$useDetails9$gen, _data$contact, _data$applicant2, _data$applicant3, _data$applicant4, _data$applicationSele3, _data$applicationSele4, _data$contact2, _data$cpt2, _data$cpt3, _data$cpt3$details, _data$zro, _data$propertyAddress2, _data$propertyAddress3, _data$applicationSele5, _data$applicationSele6, _data$applicationSele7, _data$applicationSele8, _data$applicationSele9, _data$applicationSele0, _data$applicationSele1, _data$applicationSele10, _data$applicationSele11, _data$applicationSele12, _data$applicationSele13, _data$contact3, _data$cpt4, _data$cpt4$details, _data$propertyAddress4, _data$propertyAddress5, _data$cpt5, _Digit, _Digit$Customizations, _Digit$Customizations2, _Digit2, _Digit2$Customization, _Digit2$Customization2;
445
445
  data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : (_data$cpt$details = _data$cpt.details) === null || _data$cpt$details === void 0 ? void 0 : (_data$cpt$details$own = _data$cpt$details.owners) === null || _data$cpt$details$own === void 0 ? void 0 : _data$cpt$details$own.forEach(owner => {
446
446
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
447
447
  });
448
+ const serviceType = data === null || data === void 0 ? void 0 : (_data$applicationSele = data.applicationSelection) === null || _data$applicationSele === void 0 ? void 0 : (_data$applicationSele2 = _data$applicationSele.serviceType) === null || _data$applicationSele2 === void 0 ? void 0 : _data$applicationSele2.code;
449
+ const isWater = serviceType === "WATER" || serviceType === "BOTH";
450
+ const isSewerage = serviceType === "SEWERAGE" || serviceType === "BOTH";
448
451
  let payload = {
449
- water: data === null || data === void 0 ? void 0 : (_data$ConnectionDetai = data.ConnectionDetails) === null || _data$ConnectionDetai === void 0 ? void 0 : (_data$ConnectionDetai2 = _data$ConnectionDetai[0]) === null || _data$ConnectionDetai2 === void 0 ? void 0 : _data$ConnectionDetai2.water,
450
- sewerage: data === null || data === void 0 ? void 0 : (_data$ConnectionDetai3 = data.ConnectionDetails) === null || _data$ConnectionDetai3 === void 0 ? void 0 : (_data$ConnectionDetai4 = _data$ConnectionDetai3[0]) === null || _data$ConnectionDetai4 === void 0 ? void 0 : _data$ConnectionDetai4.sewerage,
451
- proposedTaps: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai5 = data.ConnectionDetails) === null || _data$ConnectionDetai5 === void 0 ? void 0 : (_data$ConnectionDetai6 = _data$ConnectionDetai5[0]) === null || _data$ConnectionDetai6 === void 0 ? void 0 : _data$ConnectionDetai6.proposedTaps) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai7 = data.ConnectionDetails) === null || _data$ConnectionDetai7 === void 0 ? void 0 : (_data$ConnectionDetai8 = _data$ConnectionDetai7[0]) === null || _data$ConnectionDetai8 === void 0 ? void 0 : _data$ConnectionDetai8.proposedTaps),
452
- proposedPipeSize: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai9 = data.ConnectionDetails) === null || _data$ConnectionDetai9 === void 0 ? void 0 : (_data$ConnectionDetai0 = _data$ConnectionDetai9[0]) === null || _data$ConnectionDetai0 === void 0 ? void 0 : (_data$ConnectionDetai1 = _data$ConnectionDetai0.proposedPipeSize) === null || _data$ConnectionDetai1 === void 0 ? void 0 : _data$ConnectionDetai1.size) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai10 = data.ConnectionDetails) === null || _data$ConnectionDetai10 === void 0 ? void 0 : (_data$ConnectionDetai11 = _data$ConnectionDetai10[0]) === null || _data$ConnectionDetai11 === void 0 ? void 0 : (_data$ConnectionDetai12 = _data$ConnectionDetai11.proposedPipeSize) === null || _data$ConnectionDetai12 === void 0 ? void 0 : _data$ConnectionDetai12.size),
453
- proposedWaterClosets: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai13 = data.ConnectionDetails) === null || _data$ConnectionDetai13 === void 0 ? void 0 : (_data$ConnectionDetai14 = _data$ConnectionDetai13[0]) === null || _data$ConnectionDetai14 === void 0 ? void 0 : _data$ConnectionDetai14.proposedWaterClosets) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai15 = data.ConnectionDetails) === null || _data$ConnectionDetai15 === void 0 ? void 0 : (_data$ConnectionDetai16 = _data$ConnectionDetai15[0]) === null || _data$ConnectionDetai16 === void 0 ? void 0 : _data$ConnectionDetai16.proposedWaterClosets),
454
- proposedToilets: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai17 = data.ConnectionDetails) === null || _data$ConnectionDetai17 === void 0 ? void 0 : (_data$ConnectionDetai18 = _data$ConnectionDetai17[0]) === null || _data$ConnectionDetai18 === void 0 ? void 0 : _data$ConnectionDetai18.proposedToilets) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai19 = data.ConnectionDetails) === null || _data$ConnectionDetai19 === void 0 ? void 0 : (_data$ConnectionDetai20 = _data$ConnectionDetai19[0]) === null || _data$ConnectionDetai20 === void 0 ? void 0 : _data$ConnectionDetai20.proposedToilets),
455
- connectionHolders: !(data !== null && data !== void 0 && (_data$ConnectionHolde = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde !== void 0 && (_data$ConnectionHolde2 = _data$ConnectionHolde[0]) !== null && _data$ConnectionHolde2 !== void 0 && _data$ConnectionHolde2.sameAsOwnerDetails) ? [{
456
- correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde3 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde3 === void 0 ? void 0 : (_data$ConnectionHolde4 = _data$ConnectionHolde3[0]) === null || _data$ConnectionHolde4 === void 0 ? void 0 : _data$ConnectionHolde4.address) || "",
457
- fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde5 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde5 === void 0 ? void 0 : (_data$ConnectionHolde6 = _data$ConnectionHolde5[0]) === null || _data$ConnectionHolde6 === void 0 ? void 0 : _data$ConnectionHolde6.guardian) || "",
458
- gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde7 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde7 === void 0 ? void 0 : (_data$ConnectionHolde8 = _data$ConnectionHolde7[0]) === null || _data$ConnectionHolde8 === void 0 ? void 0 : (_data$ConnectionHolde9 = _data$ConnectionHolde8.gender) === null || _data$ConnectionHolde9 === void 0 ? void 0 : _data$ConnectionHolde9.code) || "",
459
- mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde0 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde0 === void 0 ? void 0 : (_data$ConnectionHolde1 = _data$ConnectionHolde0[0]) === null || _data$ConnectionHolde1 === void 0 ? void 0 : _data$ConnectionHolde1.mobileNumber) || "",
460
- name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde10 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde10 === void 0 ? void 0 : (_data$ConnectionHolde11 = _data$ConnectionHolde10[0]) === null || _data$ConnectionHolde11 === void 0 ? void 0 : _data$ConnectionHolde11.name) || "",
461
- ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde12 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde12 === void 0 ? void 0 : (_data$ConnectionHolde13 = _data$ConnectionHolde12[0]) === null || _data$ConnectionHolde13 === void 0 ? void 0 : (_data$ConnectionHolde14 = _data$ConnectionHolde13.ownerType) === null || _data$ConnectionHolde14 === void 0 ? void 0 : _data$ConnectionHolde14.code) || "",
462
- relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde15 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde15 === void 0 ? void 0 : (_data$ConnectionHolde16 = _data$ConnectionHolde15[0]) === null || _data$ConnectionHolde16 === void 0 ? void 0 : (_data$ConnectionHolde17 = _data$ConnectionHolde16.relationship) === null || _data$ConnectionHolde17 === void 0 ? void 0 : _data$ConnectionHolde17.code) || "",
463
- sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde18 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde18 === void 0 ? void 0 : (_data$ConnectionHolde19 = _data$ConnectionHolde18[0]) === null || _data$ConnectionHolde19 === void 0 ? void 0 : _data$ConnectionHolde19.sameAsOwnerDetails,
464
- emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde20 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde20 === void 0 ? void 0 : _data$ConnectionHolde20[0].emailId) || ""
465
- }] : null,
466
- service: data !== null && data !== void 0 && (_data$ConnectionDetai21 = data.ConnectionDetails) !== null && _data$ConnectionDetai21 !== void 0 && (_data$ConnectionDetai22 = _data$ConnectionDetai21[0]) !== null && _data$ConnectionDetai22 !== void 0 && _data$ConnectionDetai22.water && !(data !== null && data !== void 0 && (_data$ConnectionDetai23 = data.ConnectionDetails) !== null && _data$ConnectionDetai23 !== void 0 && (_data$ConnectionDetai24 = _data$ConnectionDetai23[0]) !== null && _data$ConnectionDetai24 !== void 0 && _data$ConnectionDetai24.sewerage) ? "Water" : !(data !== null && data !== void 0 && (_data$ConnectionDetai25 = data.ConnectionDetails) !== null && _data$ConnectionDetai25 !== void 0 && (_data$ConnectionDetai26 = _data$ConnectionDetai25[0]) !== null && _data$ConnectionDetai26 !== void 0 && _data$ConnectionDetai26.water) && data !== null && data !== void 0 && (_data$ConnectionDetai27 = data.ConnectionDetails) !== null && _data$ConnectionDetai27 !== void 0 && (_data$ConnectionDetai28 = _data$ConnectionDetai27[0]) !== null && _data$ConnectionDetai28 !== void 0 && _data$ConnectionDetai28.sewerage ? "Sewerage" : "Water And Sewerage",
452
+ water: isWater,
453
+ sewerage: isSewerage,
454
+ proposedTaps: (data === null || data === void 0 ? void 0 : (_data$useDetails = data.useDetails) === null || _data$useDetails === void 0 ? void 0 : _data$useDetails.noOfTaps) && Number(data === null || data === void 0 ? void 0 : (_data$useDetails2 = data.useDetails) === null || _data$useDetails2 === void 0 ? void 0 : _data$useDetails2.noOfTaps),
455
+ proposedPipeSize: (data === null || data === void 0 ? void 0 : (_data$useDetails3 = data.useDetails) === null || _data$useDetails3 === void 0 ? void 0 : (_data$useDetails3$pro = _data$useDetails3.proposedPipeSize) === null || _data$useDetails3$pro === void 0 ? void 0 : _data$useDetails3$pro.size) && Number(data === null || data === void 0 ? void 0 : (_data$useDetails4 = data.useDetails) === null || _data$useDetails4 === void 0 ? void 0 : (_data$useDetails4$pro = _data$useDetails4.proposedPipeSize) === null || _data$useDetails4$pro === void 0 ? void 0 : _data$useDetails4$pro.size),
456
+ proposedWaterClosets: (data === null || data === void 0 ? void 0 : (_data$useDetails5 = data.useDetails) === null || _data$useDetails5 === void 0 ? void 0 : _data$useDetails5.proposedWaterClosets) && Number(data === null || data === void 0 ? void 0 : (_data$useDetails6 = data.useDetails) === null || _data$useDetails6 === void 0 ? void 0 : _data$useDetails6.proposedWaterClosets),
457
+ proposedToilets: (data === null || data === void 0 ? void 0 : (_data$useDetails7 = data.useDetails) === null || _data$useDetails7 === void 0 ? void 0 : _data$useDetails7.proposedToilets) && Number(data === null || data === void 0 ? void 0 : (_data$useDetails8 = data.useDetails) === null || _data$useDetails8 === void 0 ? void 0 : _data$useDetails8.proposedToilets),
458
+ connectionHolders: [{
459
+ correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$propertyAddress = data.propertyAddress) === null || _data$propertyAddress === void 0 ? void 0 : _data$propertyAddress.address) || "",
460
+ fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$applicant = data.applicant) === null || _data$applicant === void 0 ? void 0 : _data$applicant.ParentorSpouse) || "",
461
+ gender: (data === null || data === void 0 ? void 0 : (_data$useDetails9 = data.useDetails) === null || _data$useDetails9 === void 0 ? void 0 : (_data$useDetails9$gen = _data$useDetails9.gender) === null || _data$useDetails9$gen === void 0 ? void 0 : _data$useDetails9$gen.code) || "",
462
+ mobileNumber: (data === null || data === void 0 ? void 0 : (_data$contact = data.contact) === null || _data$contact === void 0 ? void 0 : _data$contact.mobileNumber) || "",
463
+ name: `${data === null || data === void 0 ? void 0 : (_data$applicant2 = data.applicant) === null || _data$applicant2 === void 0 ? void 0 : _data$applicant2.firstName} ${(data === null || data === void 0 ? void 0 : (_data$applicant3 = data.applicant) === null || _data$applicant3 === void 0 ? void 0 : _data$applicant3.middleName) || ""} ${data === null || data === void 0 ? void 0 : (_data$applicant4 = data.applicant) === null || _data$applicant4 === void 0 ? void 0 : _data$applicant4.lastName}`.replace(/\s+/g, " ").trim(),
464
+ ownerType: (data === null || data === void 0 ? void 0 : (_data$applicationSele3 = data.applicationSelection) === null || _data$applicationSele3 === void 0 ? void 0 : (_data$applicationSele4 = _data$applicationSele3.categoryType) === null || _data$applicationSele4 === void 0 ? void 0 : _data$applicationSele4.code) || "",
465
+ relationship: "OTHERS",
466
+ sameAsPropertyAddress: true,
467
+ emailId: (data === null || data === void 0 ? void 0 : (_data$contact2 = data.contact) === null || _data$contact2 === void 0 ? void 0 : _data$contact2.emailId) || ""
468
+ }],
469
+ service: isWater && !isSewerage ? "Water" : !isWater && isSewerage ? "Sewerage" : "Water And Sewerage",
467
470
  property: data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : _data$cpt2.details,
468
471
  propertyId: data === null || data === void 0 ? void 0 : (_data$cpt3 = data.cpt) === null || _data$cpt3 === void 0 ? void 0 : (_data$cpt3$details = _data$cpt3.details) === null || _data$cpt3$details === void 0 ? void 0 : _data$cpt3$details.propertyId,
469
472
  roadCuttingArea: null,
@@ -471,18 +474,28 @@ const createPayloadOfWS = async data => {
471
474
  noOfWaterClosets: null,
472
475
  noOfToilets: null,
473
476
  additionalDetails: {
474
- initialMeterReading: null,
475
- detailsProvidedBy: "",
476
- locality: data === null || data === void 0 ? void 0 : (_data$cpt4 = data.cpt) === null || _data$cpt4 === void 0 ? void 0 : (_data$cpt4$details = _data$cpt4.details) === null || _data$cpt4$details === void 0 ? void 0 : (_data$cpt4$details$ad = _data$cpt4$details.address) === null || _data$cpt4$details$ad === void 0 ? void 0 : (_data$cpt4$details$ad2 = _data$cpt4$details$ad.locality) === null || _data$cpt4$details$ad2 === void 0 ? void 0 : _data$cpt4$details$ad2.code
477
- },
478
- tenantId: data === null || data === void 0 ? void 0 : (_data$cpt5 = data.cpt) === null || _data$cpt5 === void 0 ? void 0 : (_data$cpt5$details = _data$cpt5.details) === null || _data$cpt5$details === void 0 ? void 0 : (_data$cpt5$details$ad = _data$cpt5$details.address) === null || _data$cpt5$details$ad === void 0 ? void 0 : _data$cpt5$details$ad.tenantId,
477
+ ...(data === null || data === void 0 ? void 0 : data.useDetails),
478
+ ...(data === null || data === void 0 ? void 0 : data.djbEmployee),
479
+ ...(data === null || data === void 0 ? void 0 : data.bankDetails),
480
+ zro: data === null || data === void 0 ? void 0 : (_data$zro = data.zro) === null || _data$zro === void 0 ? void 0 : _data$zro.code,
481
+ locality: data === null || data === void 0 ? void 0 : (_data$propertyAddress2 = data.propertyAddress) === null || _data$propertyAddress2 === void 0 ? void 0 : (_data$propertyAddress3 = _data$propertyAddress2.locality) === null || _data$propertyAddress3 === void 0 ? void 0 : _data$propertyAddress3.code,
482
+ applicantType: data === null || data === void 0 ? void 0 : (_data$applicationSele5 = data.applicationSelection) === null || _data$applicationSele5 === void 0 ? void 0 : (_data$applicationSele6 = _data$applicationSele5.applicantType) === null || _data$applicationSele6 === void 0 ? void 0 : _data$applicationSele6.code,
483
+ connectionType: data === null || data === void 0 ? void 0 : (_data$applicationSele7 = data.applicationSelection) === null || _data$applicationSele7 === void 0 ? void 0 : (_data$applicationSele8 = _data$applicationSele7.connectionType) === null || _data$applicationSele8 === void 0 ? void 0 : _data$applicationSele8.code,
484
+ categoryType: data === null || data === void 0 ? void 0 : (_data$applicationSele9 = data.applicationSelection) === null || _data$applicationSele9 === void 0 ? void 0 : (_data$applicationSele0 = _data$applicationSele9.categoryType) === null || _data$applicationSele0 === void 0 ? void 0 : _data$applicationSele0.code,
485
+ subCategory: data === null || data === void 0 ? void 0 : (_data$applicationSele1 = data.applicationSelection) === null || _data$applicationSele1 === void 0 ? void 0 : (_data$applicationSele10 = _data$applicationSele1.subCategory) === null || _data$applicationSele10 === void 0 ? void 0 : _data$applicationSele10.code,
486
+ commercialType: data === null || data === void 0 ? void 0 : (_data$applicationSele11 = data.applicationSelection) === null || _data$applicationSele11 === void 0 ? void 0 : (_data$applicationSele12 = _data$applicationSele11.commercialType) === null || _data$applicationSele12 === void 0 ? void 0 : _data$applicationSele12.code,
487
+ govtOrganization: data === null || data === void 0 ? void 0 : (_data$applicationSele13 = data.applicationSelection) === null || _data$applicationSele13 === void 0 ? void 0 : _data$applicationSele13.govtOrganization,
488
+ whatsAppNumber: data === null || data === void 0 ? void 0 : (_data$contact3 = data.contact) === null || _data$contact3 === void 0 ? void 0 : _data$contact3.whatsAppNumber,
489
+ detailsProvidedBy: ""
490
+ },
491
+ tenantId: (data === null || data === void 0 ? void 0 : (_data$cpt4 = data.cpt) === null || _data$cpt4 === void 0 ? void 0 : (_data$cpt4$details = _data$cpt4.details) === null || _data$cpt4$details === void 0 ? void 0 : _data$cpt4$details.tenantId) || (data === null || data === void 0 ? void 0 : (_data$propertyAddress4 = data.propertyAddress) === null || _data$propertyAddress4 === void 0 ? void 0 : (_data$propertyAddress5 = _data$propertyAddress4.city) === null || _data$propertyAddress5 === void 0 ? void 0 : _data$propertyAddress5.code),
479
492
  processInstance: {
480
493
  action: "INITIATE"
481
494
  },
482
495
  channel: "CFC_COUNTER"
483
496
  };
484
- sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$DocumentsRequir = data.DocumentsRequired) === null || _data$DocumentsRequir === void 0 ? void 0 : _data$DocumentsRequir.documents));
485
- sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : _data$cpt6.details));
497
+ sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : data.documents));
498
+ sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$cpt5 = data.cpt) === null || _data$cpt5 === void 0 ? void 0 : _data$cpt5.details));
486
499
  payload = (_Digit = Digit) !== null && _Digit !== void 0 && (_Digit$Customizations = _Digit.Customizations) !== null && _Digit$Customizations !== void 0 && (_Digit$Customizations2 = _Digit$Customizations.WS) !== null && _Digit$Customizations2 !== void 0 && _Digit$Customizations2.customiseCreatePayloadOfWS ? (_Digit2 = Digit) === null || _Digit2 === void 0 ? void 0 : (_Digit2$Customization = _Digit2.Customizations) === null || _Digit2$Customization === void 0 ? void 0 : (_Digit2$Customization2 = _Digit2$Customization.WS) === null || _Digit2$Customization2 === void 0 ? void 0 : _Digit2$Customization2.customiseCreatePayloadOfWS(data, payload) : payload;
487
500
  return payload;
488
501
  };
@@ -516,7 +529,7 @@ const convertToWSUpdate = data => {
516
529
  return formdata;
517
530
  };
518
531
  const convertToEditWSUpdate = data => {
519
- var _data$WaterConnection3, _data$WaterConnection4, _data$documents2, _data$ConnectionHolde21, _data$ConnectionHolde22, _data$ConnectionHolde23, _data$ConnectionHolde24, _data$ConnectionHolde25, _data$ConnectionHolde26, _data$ConnectionHolde27, _data$ConnectionHolde28, _data$ConnectionHolde29, _data$ConnectionHolde30, _data$ConnectionHolde31, _data$ConnectionHolde32, _data$ConnectionHolde33, _data$waterConectionD, _data$waterConectionD2, _data$waterConectionD3, _data$applicationType, _data$applicationType2, _data$serviceName, _waterResult$serviceN, _data$documents3, _data$sewerageConnect, _data$sewerageConnect2, _Digit7, _Digit7$Customization, _Digit7$Customization2, _Digit8, _Digit8$Customization, _Digit8$Customization2;
532
+ var _data$WaterConnection3, _data$WaterConnection4, _data$documents2, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$ConnectionHolde8, _data$ConnectionHolde9, _data$ConnectionHolde0, _data$ConnectionHolde1, _data$ConnectionHolde10, _data$ConnectionHolde11, _data$waterConectionD, _data$waterConectionD2, _data$waterConectionD3, _data$applicationType, _data$applicationType2, _data$serviceName, _waterResult$serviceN, _data$documents3, _data$sewerageConnect, _data$sewerageConnect2, _Digit7, _Digit7$Customization, _Digit7$Customization2, _Digit8, _Digit8$Customization, _Digit8$Customization2;
520
533
  let waterResult = data === null || data === void 0 ? void 0 : (_data$WaterConnection3 = data.WaterConnectionResult) === null || _data$WaterConnection3 === void 0 ? void 0 : (_data$WaterConnection4 = _data$WaterConnection3.WaterConnection) === null || _data$WaterConnection4 === void 0 ? void 0 : _data$WaterConnection4[0];
521
534
  let formdata = {
522
535
  WaterConnection: {
@@ -551,16 +564,16 @@ const convertToEditWSUpdate = data => {
551
564
  },
552
565
  applicationType: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.applicationType : "MODIFY_WATER_CONNECTION",
553
566
  dateEffectiveFrom: convertDateToEpoch(Date.now() + 86400000),
554
- connectionHolders: data !== null && data !== void 0 && data.isEditApplication ? !(data !== null && data !== void 0 && (_data$ConnectionHolde21 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde21 !== void 0 && _data$ConnectionHolde21.isOwnerSame) ? [{
555
- correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde22 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde22 === void 0 ? void 0 : _data$ConnectionHolde22.address) || "",
556
- fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde23 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde23 === void 0 ? void 0 : _data$ConnectionHolde23.guardian) || "",
557
- gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde24 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde24 === void 0 ? void 0 : (_data$ConnectionHolde25 = _data$ConnectionHolde24.gender) === null || _data$ConnectionHolde25 === void 0 ? void 0 : _data$ConnectionHolde25.code) || "",
558
- mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde26 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde26 === void 0 ? void 0 : _data$ConnectionHolde26.mobileNumber) || "",
559
- name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde27 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde27 === void 0 ? void 0 : _data$ConnectionHolde27.name) || "",
560
- emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde28 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde28 === void 0 ? void 0 : _data$ConnectionHolde28.emailId) || "",
561
- ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde29 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde29 === void 0 ? void 0 : (_data$ConnectionHolde30 = _data$ConnectionHolde29.specialCategoryType) === null || _data$ConnectionHolde30 === void 0 ? void 0 : _data$ConnectionHolde30.code) || "",
562
- relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde31 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde31 === void 0 ? void 0 : (_data$ConnectionHolde32 = _data$ConnectionHolde31.relationship) === null || _data$ConnectionHolde32 === void 0 ? void 0 : _data$ConnectionHolde32.code) || "",
563
- sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde33 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde33 === void 0 ? void 0 : _data$ConnectionHolde33.sameAsOwnerDetails
567
+ connectionHolders: data !== null && data !== void 0 && data.isEditApplication ? !(data !== null && data !== void 0 && (_data$ConnectionHolde = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde !== void 0 && _data$ConnectionHolde.isOwnerSame) ? [{
568
+ correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde2 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde2 === void 0 ? void 0 : _data$ConnectionHolde2.address) || "",
569
+ fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde3 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde3 === void 0 ? void 0 : _data$ConnectionHolde3.guardian) || "",
570
+ gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde4 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde4 === void 0 ? void 0 : (_data$ConnectionHolde5 = _data$ConnectionHolde4.gender) === null || _data$ConnectionHolde5 === void 0 ? void 0 : _data$ConnectionHolde5.code) || "",
571
+ mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde6 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde6 === void 0 ? void 0 : _data$ConnectionHolde6.mobileNumber) || "",
572
+ name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde7 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde7 === void 0 ? void 0 : _data$ConnectionHolde7.name) || "",
573
+ emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde8 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde8 === void 0 ? void 0 : _data$ConnectionHolde8.emailId) || "",
574
+ ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde9 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde9 === void 0 ? void 0 : (_data$ConnectionHolde0 = _data$ConnectionHolde9.specialCategoryType) === null || _data$ConnectionHolde0 === void 0 ? void 0 : _data$ConnectionHolde0.code) || "",
575
+ relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde1 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde1 === void 0 ? void 0 : (_data$ConnectionHolde10 = _data$ConnectionHolde1.relationship) === null || _data$ConnectionHolde10 === void 0 ? void 0 : _data$ConnectionHolde10.code) || "",
576
+ sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde11 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde11 === void 0 ? void 0 : _data$ConnectionHolde11.sameAsOwnerDetails
564
577
  }] : null : waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionHolders,
565
578
  oldApplication: false,
566
579
  channel: "CITIZEN",
@@ -595,7 +608,7 @@ const convertToEditWSUpdate = data => {
595
608
  return formdata;
596
609
  };
597
610
  const convertToEditSWUpdate = data => {
598
- var _data$SewerageConnect, _data$SewerageConnect2, _data$documents4, _data$ConnectionHolde34, _data$ConnectionHolde35, _data$ConnectionHolde36, _data$ConnectionHolde37, _data$ConnectionHolde38, _data$ConnectionHolde39, _data$ConnectionHolde40, _data$ConnectionHolde41, _data$ConnectionHolde42, _data$ConnectionHolde43, _data$ConnectionHolde44, _data$ConnectionHolde45, _data$ConnectionHolde46, _data$waterConectionD4, _data$waterConectionD5, _data$waterConectionD6, _data$applicationType3, _data$applicationType4, _data$serviceName2, _SewerageResult$servi, _data$documents5, _data$sewerageConnect3, _data$sewerageConnect4, _Digit9, _Digit9$Customization, _Digit9$Customization2, _Digit0, _Digit0$Customization, _Digit0$Customization2;
611
+ var _data$SewerageConnect, _data$SewerageConnect2, _data$documents4, _data$ConnectionHolde12, _data$ConnectionHolde13, _data$ConnectionHolde14, _data$ConnectionHolde15, _data$ConnectionHolde16, _data$ConnectionHolde17, _data$ConnectionHolde18, _data$ConnectionHolde19, _data$ConnectionHolde20, _data$ConnectionHolde21, _data$ConnectionHolde22, _data$ConnectionHolde23, _data$ConnectionHolde24, _data$waterConectionD4, _data$waterConectionD5, _data$waterConectionD6, _data$applicationType3, _data$applicationType4, _data$serviceName2, _SewerageResult$servi, _data$documents5, _data$sewerageConnect3, _data$sewerageConnect4, _Digit9, _Digit9$Customization, _Digit9$Customization2, _Digit0, _Digit0$Customization, _Digit0$Customization2;
599
612
  let SewerageResult = data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnectionResult) === null || _data$SewerageConnect === void 0 ? void 0 : (_data$SewerageConnect2 = _data$SewerageConnect.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : _data$SewerageConnect2[0];
600
613
  let formdata = {
601
614
  SewerageConnection: {
@@ -630,16 +643,16 @@ const convertToEditSWUpdate = data => {
630
643
  },
631
644
  applicationType: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.applicationType : "MODIFY_WATER_CONNECTION",
632
645
  dateEffectiveFrom: convertDateToEpoch(Date.now() + 86400000),
633
- connectionHolders: data !== null && data !== void 0 && data.isEditApplication ? !(data !== null && data !== void 0 && (_data$ConnectionHolde34 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde34 !== void 0 && _data$ConnectionHolde34.isOwnerSame) ? [{
634
- correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde35 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde35 === void 0 ? void 0 : _data$ConnectionHolde35.address) || "",
635
- fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde36 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde36 === void 0 ? void 0 : _data$ConnectionHolde36.guardian) || "",
636
- gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde37 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde37 === void 0 ? void 0 : (_data$ConnectionHolde38 = _data$ConnectionHolde37.gender) === null || _data$ConnectionHolde38 === void 0 ? void 0 : _data$ConnectionHolde38.code) || "",
637
- mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde39 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde39 === void 0 ? void 0 : _data$ConnectionHolde39.mobileNumber) || "",
638
- name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde40 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde40 === void 0 ? void 0 : _data$ConnectionHolde40.name) || "",
639
- emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde41 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde41 === void 0 ? void 0 : _data$ConnectionHolde41.emailId) || "",
640
- ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde42 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde42 === void 0 ? void 0 : (_data$ConnectionHolde43 = _data$ConnectionHolde42.specialCategoryType) === null || _data$ConnectionHolde43 === void 0 ? void 0 : _data$ConnectionHolde43.code) || "",
641
- relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde44 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde44 === void 0 ? void 0 : (_data$ConnectionHolde45 = _data$ConnectionHolde44.relationship) === null || _data$ConnectionHolde45 === void 0 ? void 0 : _data$ConnectionHolde45.code) || "",
642
- sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde46 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde46 === void 0 ? void 0 : _data$ConnectionHolde46.sameAsOwnerDetails
646
+ connectionHolders: data !== null && data !== void 0 && data.isEditApplication ? !(data !== null && data !== void 0 && (_data$ConnectionHolde12 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde12 !== void 0 && _data$ConnectionHolde12.isOwnerSame) ? [{
647
+ correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde13 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde13 === void 0 ? void 0 : _data$ConnectionHolde13.address) || "",
648
+ fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde14 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde14 === void 0 ? void 0 : _data$ConnectionHolde14.guardian) || "",
649
+ gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde15 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde15 === void 0 ? void 0 : (_data$ConnectionHolde16 = _data$ConnectionHolde15.gender) === null || _data$ConnectionHolde16 === void 0 ? void 0 : _data$ConnectionHolde16.code) || "",
650
+ mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde17 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde17 === void 0 ? void 0 : _data$ConnectionHolde17.mobileNumber) || "",
651
+ name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde18 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde18 === void 0 ? void 0 : _data$ConnectionHolde18.name) || "",
652
+ emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde19 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde19 === void 0 ? void 0 : _data$ConnectionHolde19.emailId) || "",
653
+ ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde20 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde20 === void 0 ? void 0 : (_data$ConnectionHolde21 = _data$ConnectionHolde20.specialCategoryType) === null || _data$ConnectionHolde21 === void 0 ? void 0 : _data$ConnectionHolde21.code) || "",
654
+ relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde22 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde22 === void 0 ? void 0 : (_data$ConnectionHolde23 = _data$ConnectionHolde22.relationship) === null || _data$ConnectionHolde23 === void 0 ? void 0 : _data$ConnectionHolde23.code) || "",
655
+ sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde24 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde24 === void 0 ? void 0 : _data$ConnectionHolde24.sameAsOwnerDetails
643
656
  }] : null : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.connectionHolders,
644
657
  oldApplication: false,
645
658
  channel: "CITIZEN",
@@ -1027,7 +1040,7 @@ const getDocumentsForPDF = (app, t) => {
1027
1040
  });
1028
1041
  };
1029
1042
  const getPDFData = (application, data, tenantInfo, t) => {
1030
- var _tenantInfo$city, _data$cpt7, _data$cpt7$details, _data$cpt8, _data$cpt8$details, _data$cpt9, _data$cpt9$details, _data$cpt0, _data$cpt0$details, _data$cpt1, _data$cpt1$details, _data$cpt1$details$ad, _data$cpt10, _data$cpt10$details, _data$cpt10$details$a, _data$cpt11, _data$cpt11$details, _data$cpt11$details$a, _data$cpt12, _data$cpt12$details, _data$cpt12$details$a, _data$cpt13, _data$cpt13$details, _data$cpt13$details$a, _data$cpt14, _data$cpt14$details, _data$cpt14$details$a, _data$cpt14$details$a2, _data$cpt15, _application$plumberI, _application$plumberI2, _application$plumberI3, _application$plumberI4;
1043
+ var _tenantInfo$city, _data$cpt6, _data$cpt6$details, _data$cpt7, _data$cpt7$details, _data$cpt8, _data$cpt8$details, _data$cpt9, _data$cpt9$details, _data$cpt0, _data$cpt0$details, _data$cpt0$details$ad, _data$cpt1, _data$cpt1$details, _data$cpt1$details$ad, _data$cpt10, _data$cpt10$details, _data$cpt10$details$a, _data$cpt11, _data$cpt11$details, _data$cpt11$details$a, _data$cpt12, _data$cpt12$details, _data$cpt12$details$a, _data$cpt13, _data$cpt13$details, _data$cpt13$details$a, _data$cpt13$details$a2, _data$cpt14, _application$plumberI, _application$plumberI2, _application$plumberI3, _application$plumberI4;
1031
1044
  return {
1032
1045
  t: t,
1033
1046
  tenantId: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code,
@@ -1049,44 +1062,44 @@ const getPDFData = (application, data, tenantInfo, t) => {
1049
1062
  value: (application === null || application === void 0 ? void 0 : application.propertyId) || "N/A"
1050
1063
  }, {
1051
1064
  title: t("WS_PROPERTY_TYPE_LABEL"),
1052
- value: (data === null || data === void 0 ? void 0 : (_data$cpt7 = data.cpt) === null || _data$cpt7 === void 0 ? void 0 : (_data$cpt7$details = _data$cpt7.details) === null || _data$cpt7$details === void 0 ? void 0 : _data$cpt7$details.propertyType) || "N/A"
1065
+ value: (data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : (_data$cpt6$details = _data$cpt6.details) === null || _data$cpt6$details === void 0 ? void 0 : _data$cpt6$details.propertyType) || "N/A"
1053
1066
  }, {
1054
1067
  title: t("WS_PROPERTY_USAGE_TYPE_LABEL"),
1055
- value: (data === null || data === void 0 ? void 0 : (_data$cpt8 = data.cpt) === null || _data$cpt8 === void 0 ? void 0 : (_data$cpt8$details = _data$cpt8.details) === null || _data$cpt8$details === void 0 ? void 0 : _data$cpt8$details.usageCategory) || "N/A"
1068
+ value: (data === null || data === void 0 ? void 0 : (_data$cpt7 = data.cpt) === null || _data$cpt7 === void 0 ? void 0 : (_data$cpt7$details = _data$cpt7.details) === null || _data$cpt7$details === void 0 ? void 0 : _data$cpt7$details.usageCategory) || "N/A"
1056
1069
  }, {
1057
1070
  title: t("WS_PROPERTY_SUB_USAGE_TYPE_LABEL"),
1058
1071
  value: "N/A"
1059
1072
  }, {
1060
1073
  title: t("WS_PROP_DETAIL_PLOT_SIZE_LABEL"),
1061
- value: (data === null || data === void 0 ? void 0 : (_data$cpt9 = data.cpt) === null || _data$cpt9 === void 0 ? void 0 : (_data$cpt9$details = _data$cpt9.details) === null || _data$cpt9$details === void 0 ? void 0 : _data$cpt9$details.superBuiltUpArea) || "N/A"
1074
+ value: (data === null || data === void 0 ? void 0 : (_data$cpt8 = data.cpt) === null || _data$cpt8 === void 0 ? void 0 : (_data$cpt8$details = _data$cpt8.details) === null || _data$cpt8$details === void 0 ? void 0 : _data$cpt8$details.superBuiltUpArea) || "N/A"
1062
1075
  }, {
1063
1076
  title: t("WS_PROPERTY_NO_OF_FLOOR_LABEL"),
1064
- value: (data === null || data === void 0 ? void 0 : (_data$cpt0 = data.cpt) === null || _data$cpt0 === void 0 ? void 0 : (_data$cpt0$details = _data$cpt0.details) === null || _data$cpt0$details === void 0 ? void 0 : _data$cpt0$details.noOfFloors) || "N/A"
1077
+ value: (data === null || data === void 0 ? void 0 : (_data$cpt9 = data.cpt) === null || _data$cpt9 === void 0 ? void 0 : (_data$cpt9$details = _data$cpt9.details) === null || _data$cpt9$details === void 0 ? void 0 : _data$cpt9$details.noOfFloors) || "N/A"
1065
1078
  }, {
1066
1079
  title: t("WS_SERV_DETAIL_CONN_RAIN_WATER_HARVESTING_FAC"),
1067
- value: data === null || data === void 0 ? void 0 : (_data$cpt1 = data.cpt) === null || _data$cpt1 === void 0 ? void 0 : (_data$cpt1$details = _data$cpt1.details) === null || _data$cpt1$details === void 0 ? void 0 : (_data$cpt1$details$ad = _data$cpt1$details.additionalDetails) === null || _data$cpt1$details$ad === void 0 ? void 0 : _data$cpt1$details$ad.isRainwaterHarvesting
1080
+ value: data === null || data === void 0 ? void 0 : (_data$cpt0 = data.cpt) === null || _data$cpt0 === void 0 ? void 0 : (_data$cpt0$details = _data$cpt0.details) === null || _data$cpt0$details === void 0 ? void 0 : (_data$cpt0$details$ad = _data$cpt0$details.additionalDetails) === null || _data$cpt0$details$ad === void 0 ? void 0 : _data$cpt0$details$ad.isRainwaterHarvesting
1068
1081
  }]
1069
1082
  }, {
1070
1083
  title: t("WS_COMMON_PROP_LOC_DETAIL_HEADER"),
1071
1084
  values: [{
1072
1085
  title: t("WS_PROP_DETAIL_CITY"),
1073
- value: data === null || data === void 0 ? void 0 : (_data$cpt10 = data.cpt) === null || _data$cpt10 === void 0 ? void 0 : (_data$cpt10$details = _data$cpt10.details) === null || _data$cpt10$details === void 0 ? void 0 : (_data$cpt10$details$a = _data$cpt10$details.address) === null || _data$cpt10$details$a === void 0 ? void 0 : _data$cpt10$details$a.city
1086
+ value: data === null || data === void 0 ? void 0 : (_data$cpt1 = data.cpt) === null || _data$cpt1 === void 0 ? void 0 : (_data$cpt1$details = _data$cpt1.details) === null || _data$cpt1$details === void 0 ? void 0 : (_data$cpt1$details$ad = _data$cpt1$details.address) === null || _data$cpt1$details$ad === void 0 ? void 0 : _data$cpt1$details$ad.city
1074
1087
  }, {
1075
1088
  title: t("WS_PROP_DETAIL_DHNO"),
1076
- value: data === null || data === void 0 ? void 0 : (_data$cpt11 = data.cpt) === null || _data$cpt11 === void 0 ? void 0 : (_data$cpt11$details = _data$cpt11.details) === null || _data$cpt11$details === void 0 ? void 0 : (_data$cpt11$details$a = _data$cpt11$details.address) === null || _data$cpt11$details$a === void 0 ? void 0 : _data$cpt11$details$a.doorNo
1089
+ value: data === null || data === void 0 ? void 0 : (_data$cpt10 = data.cpt) === null || _data$cpt10 === void 0 ? void 0 : (_data$cpt10$details = _data$cpt10.details) === null || _data$cpt10$details === void 0 ? void 0 : (_data$cpt10$details$a = _data$cpt10$details.address) === null || _data$cpt10$details$a === void 0 ? void 0 : _data$cpt10$details$a.doorNo
1077
1090
  }, {
1078
1091
  title: t("WS_PROP_DETAIL_BUILD_NAME_LABEL"),
1079
- value: data === null || data === void 0 ? void 0 : (_data$cpt12 = data.cpt) === null || _data$cpt12 === void 0 ? void 0 : (_data$cpt12$details = _data$cpt12.details) === null || _data$cpt12$details === void 0 ? void 0 : (_data$cpt12$details$a = _data$cpt12$details.address) === null || _data$cpt12$details$a === void 0 ? void 0 : _data$cpt12$details$a.buildingName
1092
+ value: data === null || data === void 0 ? void 0 : (_data$cpt11 = data.cpt) === null || _data$cpt11 === void 0 ? void 0 : (_data$cpt11$details = _data$cpt11.details) === null || _data$cpt11$details === void 0 ? void 0 : (_data$cpt11$details$a = _data$cpt11$details.address) === null || _data$cpt11$details$a === void 0 ? void 0 : _data$cpt11$details$a.buildingName
1080
1093
  }, {
1081
1094
  title: t("WS_PROP_DETAIL_STREET_NAME"),
1082
- value: data === null || data === void 0 ? void 0 : (_data$cpt13 = data.cpt) === null || _data$cpt13 === void 0 ? void 0 : (_data$cpt13$details = _data$cpt13.details) === null || _data$cpt13$details === void 0 ? void 0 : (_data$cpt13$details$a = _data$cpt13$details.address) === null || _data$cpt13$details$a === void 0 ? void 0 : _data$cpt13$details$a.street
1095
+ value: data === null || data === void 0 ? void 0 : (_data$cpt12 = data.cpt) === null || _data$cpt12 === void 0 ? void 0 : (_data$cpt12$details = _data$cpt12.details) === null || _data$cpt12$details === void 0 ? void 0 : (_data$cpt12$details$a = _data$cpt12$details.address) === null || _data$cpt12$details$a === void 0 ? void 0 : _data$cpt12$details$a.street
1083
1096
  }, {
1084
1097
  title: t("WS_PROP_DETAIL_LOCALITY_MOHALLA_LABEL"),
1085
- value: data === null || data === void 0 ? void 0 : (_data$cpt14 = data.cpt) === null || _data$cpt14 === void 0 ? void 0 : (_data$cpt14$details = _data$cpt14.details) === null || _data$cpt14$details === void 0 ? void 0 : (_data$cpt14$details$a = _data$cpt14$details.address) === null || _data$cpt14$details$a === void 0 ? void 0 : (_data$cpt14$details$a2 = _data$cpt14$details$a.locality) === null || _data$cpt14$details$a2 === void 0 ? void 0 : _data$cpt14$details$a2.name
1098
+ value: data === null || data === void 0 ? void 0 : (_data$cpt13 = data.cpt) === null || _data$cpt13 === void 0 ? void 0 : (_data$cpt13$details = _data$cpt13.details) === null || _data$cpt13$details === void 0 ? void 0 : (_data$cpt13$details$a = _data$cpt13$details.address) === null || _data$cpt13$details$a === void 0 ? void 0 : (_data$cpt13$details$a2 = _data$cpt13$details$a.locality) === null || _data$cpt13$details$a2 === void 0 ? void 0 : _data$cpt13$details$a2.name
1086
1099
  }]
1087
1100
  }, {
1088
1101
  title: t("WS_TASK_PROP_OWN_HEADER"),
1089
- values: getOwnersforPDF(data === null || data === void 0 ? void 0 : (_data$cpt15 = data.cpt) === null || _data$cpt15 === void 0 ? void 0 : _data$cpt15.details, t)
1102
+ values: getOwnersforPDF(data === null || data === void 0 ? void 0 : (_data$cpt14 = data.cpt) === null || _data$cpt14 === void 0 ? void 0 : _data$cpt14.details, t)
1090
1103
  }, {
1091
1104
  ...(application !== null && application !== void 0 && application.applicationType.includes("WATER") ? {
1092
1105
  title: t("WS_COMMON_CONNECTION_DETAILS"),
@@ -1405,35 +1418,35 @@ const convertApplicationData = (data, serviceType, modify = false, editByConfig
1405
1418
  return payload;
1406
1419
  };
1407
1420
  const convertEditApplicationDetails = async (data, appData, actionData) => {
1408
- var _data$cpt16, _data$cpt16$details, _data$cpt16$details$o, _data$cpt17, _data$cpt17$details, _data$ConnectionDetai29, _data$ConnectionDetai30, _data$ConnectionDetai31, _data$ConnectionDetai32, _data$ConnectionDetai33, _data$ConnectionDetai34, _data$ConnectionDetai35, _data$ConnectionDetai36, _data$ConnectionDetai37, _data$ConnectionDetai38, _data$ConnectionDetai39, _data$ConnectionDetai40, _data$ConnectionDetai41, _data$ConnectionDetai42, _data$ConnectionDetai43, _data$ConnectionDetai44, _data$ConnectionDetai45, _data$ConnectionDetai46, _data$ConnectionHolde47, _data$ConnectionHolde48, _appData$applicationD, _appData$applicationD2, _data$ConnectionHolde49, _data$ConnectionHolde50, _data$ConnectionHolde51, _data$ConnectionHolde52, _data$ConnectionHolde53, _data$ConnectionHolde54, _data$ConnectionHolde55, _data$ConnectionHolde56, _data$ConnectionHolde57, _data$ConnectionHolde58, _data$ConnectionHolde59, _data$ConnectionHolde60, _data$ConnectionHolde61, _data$ConnectionHolde62, _data$ConnectionHolde63, _data$ConnectionHolde64, _data$ConnectionHolde65, _data$ConnectionHolde66, _data$ConnectionHolde67, _data$ConnectionHolde68, _data$ConnectionHolde69, _data$cpt18, _data$DocumentsRequir2;
1409
- data === null || data === void 0 ? void 0 : (_data$cpt16 = data.cpt) === null || _data$cpt16 === void 0 ? void 0 : (_data$cpt16$details = _data$cpt16.details) === null || _data$cpt16$details === void 0 ? void 0 : (_data$cpt16$details$o = _data$cpt16$details.owners) === null || _data$cpt16$details$o === void 0 ? void 0 : _data$cpt16$details$o.forEach(owner => {
1421
+ var _data$cpt15, _data$cpt15$details, _data$cpt15$details$o, _data$cpt16, _data$cpt16$details, _data$ConnectionDetai, _data$ConnectionDetai2, _data$ConnectionDetai3, _data$ConnectionDetai4, _data$ConnectionDetai5, _data$ConnectionDetai6, _data$ConnectionDetai7, _data$ConnectionDetai8, _data$ConnectionDetai9, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$ConnectionDetai13, _data$ConnectionDetai14, _data$ConnectionDetai15, _data$ConnectionDetai16, _data$ConnectionHolde25, _data$ConnectionHolde26, _appData$applicationD, _appData$applicationD2, _data$ConnectionHolde27, _data$ConnectionHolde28, _data$ConnectionHolde29, _data$ConnectionHolde30, _data$ConnectionHolde31, _data$ConnectionHolde32, _data$ConnectionHolde33, _data$ConnectionHolde34, _data$ConnectionHolde35, _data$ConnectionHolde36, _data$ConnectionHolde37, _data$ConnectionHolde38, _data$ConnectionHolde39, _data$ConnectionHolde40, _data$ConnectionHolde41, _data$ConnectionHolde42, _data$ConnectionHolde43, _data$ConnectionHolde44, _data$ConnectionHolde45, _data$ConnectionHolde46, _data$ConnectionHolde47, _data$cpt17, _data$DocumentsRequir;
1422
+ data === null || data === void 0 ? void 0 : (_data$cpt15 = data.cpt) === null || _data$cpt15 === void 0 ? void 0 : (_data$cpt15$details = _data$cpt15.details) === null || _data$cpt15$details === void 0 ? void 0 : (_data$cpt15$details$o = _data$cpt15$details.owners) === null || _data$cpt15$details$o === void 0 ? void 0 : _data$cpt15$details$o.forEach(owner => {
1410
1423
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
1411
1424
  });
1412
1425
  let payload = {
1413
1426
  ...appData.applicationData,
1414
- propertyId: data === null || data === void 0 ? void 0 : (_data$cpt17 = data.cpt) === null || _data$cpt17 === void 0 ? void 0 : (_data$cpt17$details = _data$cpt17.details) === null || _data$cpt17$details === void 0 ? void 0 : _data$cpt17$details.propertyId,
1415
- proposedTaps: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai29 = data.ConnectionDetails) === null || _data$ConnectionDetai29 === void 0 ? void 0 : (_data$ConnectionDetai30 = _data$ConnectionDetai29[0]) === null || _data$ConnectionDetai30 === void 0 ? void 0 : _data$ConnectionDetai30.proposedTaps) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai31 = data.ConnectionDetails) === null || _data$ConnectionDetai31 === void 0 ? void 0 : (_data$ConnectionDetai32 = _data$ConnectionDetai31[0]) === null || _data$ConnectionDetai32 === void 0 ? void 0 : _data$ConnectionDetai32.proposedTaps),
1416
- proposedPipeSize: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai33 = data.ConnectionDetails) === null || _data$ConnectionDetai33 === void 0 ? void 0 : (_data$ConnectionDetai34 = _data$ConnectionDetai33[0]) === null || _data$ConnectionDetai34 === void 0 ? void 0 : (_data$ConnectionDetai35 = _data$ConnectionDetai34.proposedPipeSize) === null || _data$ConnectionDetai35 === void 0 ? void 0 : _data$ConnectionDetai35.size) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai36 = data.ConnectionDetails) === null || _data$ConnectionDetai36 === void 0 ? void 0 : (_data$ConnectionDetai37 = _data$ConnectionDetai36[0]) === null || _data$ConnectionDetai37 === void 0 ? void 0 : (_data$ConnectionDetai38 = _data$ConnectionDetai37.proposedPipeSize) === null || _data$ConnectionDetai38 === void 0 ? void 0 : _data$ConnectionDetai38.size),
1417
- proposedWaterClosets: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai39 = data.ConnectionDetails) === null || _data$ConnectionDetai39 === void 0 ? void 0 : (_data$ConnectionDetai40 = _data$ConnectionDetai39[0]) === null || _data$ConnectionDetai40 === void 0 ? void 0 : _data$ConnectionDetai40.proposedWaterClosets) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai41 = data.ConnectionDetails) === null || _data$ConnectionDetai41 === void 0 ? void 0 : (_data$ConnectionDetai42 = _data$ConnectionDetai41[0]) === null || _data$ConnectionDetai42 === void 0 ? void 0 : _data$ConnectionDetai42.proposedWaterClosets),
1418
- proposedToilets: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai43 = data.ConnectionDetails) === null || _data$ConnectionDetai43 === void 0 ? void 0 : (_data$ConnectionDetai44 = _data$ConnectionDetai43[0]) === null || _data$ConnectionDetai44 === void 0 ? void 0 : _data$ConnectionDetai44.proposedToilets) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai45 = data.ConnectionDetails) === null || _data$ConnectionDetai45 === void 0 ? void 0 : (_data$ConnectionDetai46 = _data$ConnectionDetai45[0]) === null || _data$ConnectionDetai46 === void 0 ? void 0 : _data$ConnectionDetai46.proposedToilets),
1419
- connectionHolders: !(data !== null && data !== void 0 && (_data$ConnectionHolde47 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde47 !== void 0 && (_data$ConnectionHolde48 = _data$ConnectionHolde47[0]) !== null && _data$ConnectionHolde48 !== void 0 && _data$ConnectionHolde48.sameAsOwnerDetails) ? [{
1427
+ propertyId: data === null || data === void 0 ? void 0 : (_data$cpt16 = data.cpt) === null || _data$cpt16 === void 0 ? void 0 : (_data$cpt16$details = _data$cpt16.details) === null || _data$cpt16$details === void 0 ? void 0 : _data$cpt16$details.propertyId,
1428
+ proposedTaps: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai = data.ConnectionDetails) === null || _data$ConnectionDetai === void 0 ? void 0 : (_data$ConnectionDetai2 = _data$ConnectionDetai[0]) === null || _data$ConnectionDetai2 === void 0 ? void 0 : _data$ConnectionDetai2.proposedTaps) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai3 = data.ConnectionDetails) === null || _data$ConnectionDetai3 === void 0 ? void 0 : (_data$ConnectionDetai4 = _data$ConnectionDetai3[0]) === null || _data$ConnectionDetai4 === void 0 ? void 0 : _data$ConnectionDetai4.proposedTaps),
1429
+ proposedPipeSize: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai5 = data.ConnectionDetails) === null || _data$ConnectionDetai5 === void 0 ? void 0 : (_data$ConnectionDetai6 = _data$ConnectionDetai5[0]) === null || _data$ConnectionDetai6 === void 0 ? void 0 : (_data$ConnectionDetai7 = _data$ConnectionDetai6.proposedPipeSize) === null || _data$ConnectionDetai7 === void 0 ? void 0 : _data$ConnectionDetai7.size) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai8 = data.ConnectionDetails) === null || _data$ConnectionDetai8 === void 0 ? void 0 : (_data$ConnectionDetai9 = _data$ConnectionDetai8[0]) === null || _data$ConnectionDetai9 === void 0 ? void 0 : (_data$ConnectionDetai0 = _data$ConnectionDetai9.proposedPipeSize) === null || _data$ConnectionDetai0 === void 0 ? void 0 : _data$ConnectionDetai0.size),
1430
+ proposedWaterClosets: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai1 = data.ConnectionDetails) === null || _data$ConnectionDetai1 === void 0 ? void 0 : (_data$ConnectionDetai10 = _data$ConnectionDetai1[0]) === null || _data$ConnectionDetai10 === void 0 ? void 0 : _data$ConnectionDetai10.proposedWaterClosets) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai11 = data.ConnectionDetails) === null || _data$ConnectionDetai11 === void 0 ? void 0 : (_data$ConnectionDetai12 = _data$ConnectionDetai11[0]) === null || _data$ConnectionDetai12 === void 0 ? void 0 : _data$ConnectionDetai12.proposedWaterClosets),
1431
+ proposedToilets: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai13 = data.ConnectionDetails) === null || _data$ConnectionDetai13 === void 0 ? void 0 : (_data$ConnectionDetai14 = _data$ConnectionDetai13[0]) === null || _data$ConnectionDetai14 === void 0 ? void 0 : _data$ConnectionDetai14.proposedToilets) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai15 = data.ConnectionDetails) === null || _data$ConnectionDetai15 === void 0 ? void 0 : (_data$ConnectionDetai16 = _data$ConnectionDetai15[0]) === null || _data$ConnectionDetai16 === void 0 ? void 0 : _data$ConnectionDetai16.proposedToilets),
1432
+ connectionHolders: !(data !== null && data !== void 0 && (_data$ConnectionHolde25 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde25 !== void 0 && (_data$ConnectionHolde26 = _data$ConnectionHolde25[0]) !== null && _data$ConnectionHolde26 !== void 0 && _data$ConnectionHolde26.sameAsOwnerDetails) ? [{
1420
1433
  ...(appData === null || appData === void 0 ? void 0 : (_appData$applicationD = appData.applicationData) === null || _appData$applicationD === void 0 ? void 0 : (_appData$applicationD2 = _appData$applicationD.connectionHolders) === null || _appData$applicationD2 === void 0 ? void 0 : _appData$applicationD2[0]),
1421
- correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde49 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde49 === void 0 ? void 0 : (_data$ConnectionHolde50 = _data$ConnectionHolde49[0]) === null || _data$ConnectionHolde50 === void 0 ? void 0 : _data$ConnectionHolde50.address) || "",
1422
- fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde51 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde51 === void 0 ? void 0 : (_data$ConnectionHolde52 = _data$ConnectionHolde51[0]) === null || _data$ConnectionHolde52 === void 0 ? void 0 : _data$ConnectionHolde52.guardian) || "",
1423
- gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde53 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde53 === void 0 ? void 0 : (_data$ConnectionHolde54 = _data$ConnectionHolde53[0]) === null || _data$ConnectionHolde54 === void 0 ? void 0 : (_data$ConnectionHolde55 = _data$ConnectionHolde54.gender) === null || _data$ConnectionHolde55 === void 0 ? void 0 : _data$ConnectionHolde55.code) || "",
1424
- mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde56 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde56 === void 0 ? void 0 : (_data$ConnectionHolde57 = _data$ConnectionHolde56[0]) === null || _data$ConnectionHolde57 === void 0 ? void 0 : _data$ConnectionHolde57.mobileNumber) || "",
1425
- name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde58 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde58 === void 0 ? void 0 : (_data$ConnectionHolde59 = _data$ConnectionHolde58[0]) === null || _data$ConnectionHolde59 === void 0 ? void 0 : _data$ConnectionHolde59.name) || "",
1426
- emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde60 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde60 === void 0 ? void 0 : (_data$ConnectionHolde61 = _data$ConnectionHolde60[0]) === null || _data$ConnectionHolde61 === void 0 ? void 0 : _data$ConnectionHolde61.emailId) || "",
1427
- ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde62 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde62 === void 0 ? void 0 : (_data$ConnectionHolde63 = _data$ConnectionHolde62[0]) === null || _data$ConnectionHolde63 === void 0 ? void 0 : (_data$ConnectionHolde64 = _data$ConnectionHolde63.ownerType) === null || _data$ConnectionHolde64 === void 0 ? void 0 : _data$ConnectionHolde64.code) || "",
1428
- relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde65 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde65 === void 0 ? void 0 : (_data$ConnectionHolde66 = _data$ConnectionHolde65[0]) === null || _data$ConnectionHolde66 === void 0 ? void 0 : (_data$ConnectionHolde67 = _data$ConnectionHolde66.relationship) === null || _data$ConnectionHolde67 === void 0 ? void 0 : _data$ConnectionHolde67.code) || "",
1429
- sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde68 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde68 === void 0 ? void 0 : (_data$ConnectionHolde69 = _data$ConnectionHolde68[0]) === null || _data$ConnectionHolde69 === void 0 ? void 0 : _data$ConnectionHolde69.sameAsOwnerDetails
1434
+ correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde27 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde27 === void 0 ? void 0 : (_data$ConnectionHolde28 = _data$ConnectionHolde27[0]) === null || _data$ConnectionHolde28 === void 0 ? void 0 : _data$ConnectionHolde28.address) || "",
1435
+ fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde29 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde29 === void 0 ? void 0 : (_data$ConnectionHolde30 = _data$ConnectionHolde29[0]) === null || _data$ConnectionHolde30 === void 0 ? void 0 : _data$ConnectionHolde30.guardian) || "",
1436
+ gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde31 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde31 === void 0 ? void 0 : (_data$ConnectionHolde32 = _data$ConnectionHolde31[0]) === null || _data$ConnectionHolde32 === void 0 ? void 0 : (_data$ConnectionHolde33 = _data$ConnectionHolde32.gender) === null || _data$ConnectionHolde33 === void 0 ? void 0 : _data$ConnectionHolde33.code) || "",
1437
+ mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde34 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde34 === void 0 ? void 0 : (_data$ConnectionHolde35 = _data$ConnectionHolde34[0]) === null || _data$ConnectionHolde35 === void 0 ? void 0 : _data$ConnectionHolde35.mobileNumber) || "",
1438
+ name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde36 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde36 === void 0 ? void 0 : (_data$ConnectionHolde37 = _data$ConnectionHolde36[0]) === null || _data$ConnectionHolde37 === void 0 ? void 0 : _data$ConnectionHolde37.name) || "",
1439
+ emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde38 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde38 === void 0 ? void 0 : (_data$ConnectionHolde39 = _data$ConnectionHolde38[0]) === null || _data$ConnectionHolde39 === void 0 ? void 0 : _data$ConnectionHolde39.emailId) || "",
1440
+ ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde40 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde40 === void 0 ? void 0 : (_data$ConnectionHolde41 = _data$ConnectionHolde40[0]) === null || _data$ConnectionHolde41 === void 0 ? void 0 : (_data$ConnectionHolde42 = _data$ConnectionHolde41.ownerType) === null || _data$ConnectionHolde42 === void 0 ? void 0 : _data$ConnectionHolde42.code) || "",
1441
+ relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde43 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde43 === void 0 ? void 0 : (_data$ConnectionHolde44 = _data$ConnectionHolde43[0]) === null || _data$ConnectionHolde44 === void 0 ? void 0 : (_data$ConnectionHolde45 = _data$ConnectionHolde44.relationship) === null || _data$ConnectionHolde45 === void 0 ? void 0 : _data$ConnectionHolde45.code) || "",
1442
+ sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde46 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde46 === void 0 ? void 0 : (_data$ConnectionHolde47 = _data$ConnectionHolde46[0]) === null || _data$ConnectionHolde47 === void 0 ? void 0 : _data$ConnectionHolde47.sameAsOwnerDetails
1430
1443
  }] : null,
1431
- property: data === null || data === void 0 ? void 0 : (_data$cpt18 = data.cpt) === null || _data$cpt18 === void 0 ? void 0 : _data$cpt18.details,
1444
+ property: data === null || data === void 0 ? void 0 : (_data$cpt17 = data.cpt) === null || _data$cpt17 === void 0 ? void 0 : _data$cpt17.details,
1432
1445
  processInstance: {
1433
1446
  action: actionData ? actionData : "RESUBMIT_APPLICATION"
1434
1447
  },
1435
1448
  action: actionData ? actionData : "RESUBMIT_APPLICATION",
1436
- documents: data === null || data === void 0 ? void 0 : (_data$DocumentsRequir2 = data.DocumentsRequired) === null || _data$DocumentsRequir2 === void 0 ? void 0 : _data$DocumentsRequir2.documents
1449
+ documents: data === null || data === void 0 ? void 0 : (_data$DocumentsRequir = data.DocumentsRequired) === null || _data$DocumentsRequir === void 0 ? void 0 : _data$DocumentsRequir.documents
1437
1450
  };
1438
1451
  return payload;
1439
1452
  };
@@ -1488,7 +1501,7 @@ const convertDisonnectApplicationData = (data, serviceType, editByConfig = false
1488
1501
  return payload;
1489
1502
  };
1490
1503
  const convertDisonnectEditApplicationDetails = async (data, appData, actionData) => {
1491
- var _data$plumberDetails, _data$plumberDetails$, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _appData$applicationD5, _appData$applicationD6, _appData$applicationD7, _data$DocumentsRequir3, _data$disConnectionDe, _data$disConnectionDe2, _data$disConnectionDe3, _data$disConnectionDe4, _data$disConnectionDe5, _data$disConnectionDe6, _data$plumberDetails6, _data$plumberDetails7, _data$plumberDetails8;
1504
+ var _data$plumberDetails, _data$plumberDetails$, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _appData$applicationD5, _appData$applicationD6, _appData$applicationD7, _data$DocumentsRequir2, _data$disConnectionDe, _data$disConnectionDe2, _data$disConnectionDe3, _data$disConnectionDe4, _data$disConnectionDe5, _data$disConnectionDe6, _data$plumberDetails6, _data$plumberDetails7, _data$plumberDetails8;
1492
1505
  const docs = sessionStorage.getItem("DISCONNECTION_EDIT_DOCS");
1493
1506
  const docsData = docs ? JSON.parse(docs) : "";
1494
1507
  const documentsData = [];
@@ -1516,7 +1529,7 @@ const convertDisonnectEditApplicationDetails = async (data, appData, actionData)
1516
1529
  }];
1517
1530
  let payload = {
1518
1531
  ...appData.applicationData,
1519
- documents: (documentsData === null || documentsData === void 0 ? void 0 : documentsData.length) > 0 ? documentsData : data === null || data === void 0 ? void 0 : (_data$DocumentsRequir3 = data.DocumentsRequired) === null || _data$DocumentsRequir3 === void 0 ? void 0 : _data$DocumentsRequir3.documents,
1532
+ documents: (documentsData === null || documentsData === void 0 ? void 0 : documentsData.length) > 0 ? documentsData : data === null || data === void 0 ? void 0 : (_data$DocumentsRequir2 = data.DocumentsRequired) === null || _data$DocumentsRequir2 === void 0 ? void 0 : _data$DocumentsRequir2.documents,
1520
1533
  isDisconnectionTemporary: (data === null || data === void 0 ? void 0 : (_data$disConnectionDe = data.disConnectionDetails) === null || _data$disConnectionDe === void 0 ? void 0 : (_data$disConnectionDe2 = _data$disConnectionDe[0]) === null || _data$disConnectionDe2 === void 0 ? void 0 : _data$disConnectionDe2.disConnectionType) == "TEMPORARY" ? true : false,
1521
1534
  disconnectionReason: (data === null || data === void 0 ? void 0 : (_data$disConnectionDe3 = data.disConnectionDetails) === null || _data$disConnectionDe3 === void 0 ? void 0 : (_data$disConnectionDe4 = _data$disConnectionDe3[0]) === null || _data$disConnectionDe4 === void 0 ? void 0 : _data$disConnectionDe4.disConnectionReason) || "",
1522
1535
  dateEffectiveFrom: await getConvertedDate(data === null || data === void 0 ? void 0 : (_data$disConnectionDe5 = data.disConnectionDetails) === null || _data$disConnectionDe5 === void 0 ? void 0 : (_data$disConnectionDe6 = _data$disConnectionDe5[0]) === null || _data$disConnectionDe6 === void 0 ? void 0 : _data$disConnectionDe6.disConnectionProposeDate),
@@ -1549,14 +1562,14 @@ const getConvertedDate = async dateOfTime => {
1549
1562
  return convertedDate;
1550
1563
  };
1551
1564
  const convertModifyApplicationDetails = async (data, appData, actionData = "INITIATE") => {
1552
- var _data$cpt19, _data$cpt19$details, _data$cpt19$details$o, _data$cpt20, _data$cpt20$details, _data$cpt21, _data$cpt21$details, _data$connectionDetai, _data$connectionDetai2, _data$connectionDetai3, _data$connectionDetai4, _data$connectionDetai5, _data$connectionDetai6, _data$connectionDetai7, _data$connectionDetai8, _data$connectionDetai9, _data$connectionDetai0, _data$connectionDetai1, _data$connectionDetai10, _data$connectionDetai11, _data$connectionDetai12, _data$connectionDetai13, _data$connectionDetai14, _data$connectionDetai15, _data$connectionDetai16, _data$connectionDetai17, _data$connectionDetai18, _data$connectionDetai19, _data$connectionDetai20, _data$connectionDetai21, _data$connectionDetai22, _data$connectionDetai23, _data$connectionDetai24, _data$connectionDetai25, _data$connectionDetai26, _data$connectionDetai27, _data$connectionDetai28, _data$activationDetai, _data$activationDetai2, _data$activationDetai3, _data$activationDetai4, _data$activationDetai5, _data$activationDetai6, _data$activationDetai7, _data$activationDetai8, _data$activationDetai9, _data$activationDetai0, _data$activationDetai1, _data$activationDetai10, _data$activationDetai11, _data$activationDetai12, _data$activationDetai13, _data$activationDetai14, _data$activationDetai15, _data$activationDetai16, _data$activationDetai17, _data$activationDetai18, _data$DocumentsRequir4, _data$DocumentsRequir5, _data$DocumentsRequir6, _data$ConnectionHolde70, _data$ConnectionHolde71, _data$DocumentsRequir7, _data$cpt22;
1553
- data === null || data === void 0 ? void 0 : (_data$cpt19 = data.cpt) === null || _data$cpt19 === void 0 ? void 0 : (_data$cpt19$details = _data$cpt19.details) === null || _data$cpt19$details === void 0 ? void 0 : (_data$cpt19$details$o = _data$cpt19$details.owners) === null || _data$cpt19$details$o === void 0 ? void 0 : _data$cpt19$details$o.forEach(owner => {
1565
+ var _data$cpt18, _data$cpt18$details, _data$cpt18$details$o, _data$cpt19, _data$cpt19$details, _data$cpt20, _data$cpt20$details, _data$connectionDetai, _data$connectionDetai2, _data$connectionDetai3, _data$connectionDetai4, _data$connectionDetai5, _data$connectionDetai6, _data$connectionDetai7, _data$connectionDetai8, _data$connectionDetai9, _data$connectionDetai0, _data$connectionDetai1, _data$connectionDetai10, _data$connectionDetai11, _data$connectionDetai12, _data$connectionDetai13, _data$connectionDetai14, _data$connectionDetai15, _data$connectionDetai16, _data$connectionDetai17, _data$connectionDetai18, _data$connectionDetai19, _data$connectionDetai20, _data$connectionDetai21, _data$connectionDetai22, _data$connectionDetai23, _data$connectionDetai24, _data$connectionDetai25, _data$connectionDetai26, _data$connectionDetai27, _data$connectionDetai28, _data$activationDetai, _data$activationDetai2, _data$activationDetai3, _data$activationDetai4, _data$activationDetai5, _data$activationDetai6, _data$activationDetai7, _data$activationDetai8, _data$activationDetai9, _data$activationDetai0, _data$activationDetai1, _data$activationDetai10, _data$activationDetai11, _data$activationDetai12, _data$activationDetai13, _data$activationDetai14, _data$activationDetai15, _data$activationDetai16, _data$activationDetai17, _data$activationDetai18, _data$DocumentsRequir3, _data$DocumentsRequir4, _data$DocumentsRequir5, _data$ConnectionHolde48, _data$ConnectionHolde49, _data$DocumentsRequir6, _data$cpt21;
1566
+ data === null || data === void 0 ? void 0 : (_data$cpt18 = data.cpt) === null || _data$cpt18 === void 0 ? void 0 : (_data$cpt18$details = _data$cpt18.details) === null || _data$cpt18$details === void 0 ? void 0 : (_data$cpt18$details$o = _data$cpt18$details.owners) === null || _data$cpt18$details$o === void 0 ? void 0 : _data$cpt18$details$o.forEach(owner => {
1554
1567
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
1555
1568
  });
1556
1569
  let formData = {
1557
1570
  ...appData.applicationData
1558
1571
  };
1559
- if (data !== null && data !== void 0 && (_data$cpt20 = data.cpt) !== null && _data$cpt20 !== void 0 && (_data$cpt20$details = _data$cpt20.details) !== null && _data$cpt20$details !== void 0 && _data$cpt20$details.propertyId) formData.propertyId = data === null || data === void 0 ? void 0 : (_data$cpt21 = data.cpt) === null || _data$cpt21 === void 0 ? void 0 : (_data$cpt21$details = _data$cpt21.details) === null || _data$cpt21$details === void 0 ? void 0 : _data$cpt21$details.propertyId;
1572
+ if (data !== null && data !== void 0 && (_data$cpt19 = data.cpt) !== null && _data$cpt19 !== void 0 && (_data$cpt19$details = _data$cpt19.details) !== null && _data$cpt19$details !== void 0 && _data$cpt19$details.propertyId) formData.propertyId = data === null || data === void 0 ? void 0 : (_data$cpt20 = data.cpt) === null || _data$cpt20 === void 0 ? void 0 : (_data$cpt20$details = _data$cpt20.details) === null || _data$cpt20$details === void 0 ? void 0 : _data$cpt20$details.propertyId;
1560
1573
  if (data !== null && data !== void 0 && (_data$connectionDetai = data.connectionDetails) !== null && _data$connectionDetai !== void 0 && (_data$connectionDetai2 = _data$connectionDetai[0]) !== null && _data$connectionDetai2 !== void 0 && (_data$connectionDetai3 = _data$connectionDetai2.connectionType) !== null && _data$connectionDetai3 !== void 0 && _data$connectionDetai3.code) formData.connectionType = data === null || data === void 0 ? void 0 : (_data$connectionDetai4 = data.connectionDetails) === null || _data$connectionDetai4 === void 0 ? void 0 : (_data$connectionDetai5 = _data$connectionDetai4[0]) === null || _data$connectionDetai5 === void 0 ? void 0 : (_data$connectionDetai6 = _data$connectionDetai5.connectionType) === null || _data$connectionDetai6 === void 0 ? void 0 : _data$connectionDetai6.code;
1561
1574
  if (data !== null && data !== void 0 && (_data$connectionDetai7 = data.connectionDetails) !== null && _data$connectionDetai7 !== void 0 && (_data$connectionDetai8 = _data$connectionDetai7[0]) !== null && _data$connectionDetai8 !== void 0 && (_data$connectionDetai9 = _data$connectionDetai8.waterSource) !== null && _data$connectionDetai9 !== void 0 && _data$connectionDetai9.code) formData.waterSource = data === null || data === void 0 ? void 0 : (_data$connectionDetai0 = data.connectionDetails) === null || _data$connectionDetai0 === void 0 ? void 0 : (_data$connectionDetai1 = _data$connectionDetai0[0]) === null || _data$connectionDetai1 === void 0 ? void 0 : (_data$connectionDetai10 = _data$connectionDetai1.waterSource) === null || _data$connectionDetai10 === void 0 ? void 0 : _data$connectionDetai10.code;
1562
1575
  if (data !== null && data !== void 0 && (_data$connectionDetai11 = data.connectionDetails) !== null && _data$connectionDetai11 !== void 0 && (_data$connectionDetai12 = _data$connectionDetai11[0]) !== null && _data$connectionDetai12 !== void 0 && (_data$connectionDetai13 = _data$connectionDetai12.pipeSize) !== null && _data$connectionDetai13 !== void 0 && _data$connectionDetai13.size) formData.pipeSize = data === null || data === void 0 ? void 0 : (_data$connectionDetai14 = data.connectionDetails) === null || _data$connectionDetai14 === void 0 ? void 0 : (_data$connectionDetai15 = _data$connectionDetai14[0]) === null || _data$connectionDetai15 === void 0 ? void 0 : (_data$connectionDetai16 = _data$connectionDetai15.pipeSize) === null || _data$connectionDetai16 === void 0 ? void 0 : _data$connectionDetai16.size;
@@ -1568,20 +1581,20 @@ const convertModifyApplicationDetails = async (data, appData, actionData = "INIT
1568
1581
  if (data !== null && data !== void 0 && (_data$activationDetai9 = data.activationDetails) !== null && _data$activationDetai9 !== void 0 && (_data$activationDetai0 = _data$activationDetai9[0]) !== null && _data$activationDetai0 !== void 0 && _data$activationDetai0.meterInitialReading) formData.additionalDetails.initialMeterReading = data === null || data === void 0 ? void 0 : (_data$activationDetai1 = data.activationDetails) === null || _data$activationDetai1 === void 0 ? void 0 : (_data$activationDetai10 = _data$activationDetai1[0]) === null || _data$activationDetai10 === void 0 ? void 0 : _data$activationDetai10.meterInitialReading;
1569
1582
  if (data !== null && data !== void 0 && (_data$activationDetai11 = data.activationDetails) !== null && _data$activationDetai11 !== void 0 && (_data$activationDetai12 = _data$activationDetai11[0]) !== null && _data$activationDetai12 !== void 0 && _data$activationDetai12.connectionExecutionDate) formData.connectionExecutionDate = await getConvertedDate(data === null || data === void 0 ? void 0 : (_data$activationDetai13 = data.activationDetails) === null || _data$activationDetai13 === void 0 ? void 0 : (_data$activationDetai14 = _data$activationDetai13[0]) === null || _data$activationDetai14 === void 0 ? void 0 : _data$activationDetai14.connectionExecutionDate);
1570
1583
  if (data !== null && data !== void 0 && (_data$activationDetai15 = data.activationDetails) !== null && _data$activationDetai15 !== void 0 && (_data$activationDetai16 = _data$activationDetai15[0]) !== null && _data$activationDetai16 !== void 0 && _data$activationDetai16.dateEffectiveFrom) formData.dateEffectiveFrom = await getConvertedDate(data === null || data === void 0 ? void 0 : (_data$activationDetai17 = data.activationDetails) === null || _data$activationDetai17 === void 0 ? void 0 : (_data$activationDetai18 = _data$activationDetai17[0]) === null || _data$activationDetai18 === void 0 ? void 0 : _data$activationDetai18.dateEffectiveFrom);
1571
- if (data !== null && data !== void 0 && (_data$DocumentsRequir4 = data.DocumentsRequired) !== null && _data$DocumentsRequir4 !== void 0 && (_data$DocumentsRequir5 = _data$DocumentsRequir4.documents) !== null && _data$DocumentsRequir5 !== void 0 && _data$DocumentsRequir5.length) formData.documents = data === null || data === void 0 ? void 0 : (_data$DocumentsRequir6 = data.DocumentsRequired) === null || _data$DocumentsRequir6 === void 0 ? void 0 : _data$DocumentsRequir6.documents;else formData.documents = null;
1572
- if (!(data !== null && data !== void 0 && (_data$ConnectionHolde70 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde70 !== void 0 && (_data$ConnectionHolde71 = _data$ConnectionHolde70[0]) !== null && _data$ConnectionHolde71 !== void 0 && _data$ConnectionHolde71.sameAsOwnerDetails)) {
1573
- var _appData$applicationD8, _appData$applicationD9, _data$ConnectionHolde72, _data$ConnectionHolde73, _data$ConnectionHolde74, _data$ConnectionHolde75, _data$ConnectionHolde76, _data$ConnectionHolde77, _data$ConnectionHolde78, _data$ConnectionHolde79, _data$ConnectionHolde80, _data$ConnectionHolde81, _data$ConnectionHolde82, _data$ConnectionHolde83, _data$ConnectionHolde84, _data$ConnectionHolde85, _data$ConnectionHolde86, _data$ConnectionHolde87, _data$ConnectionHolde88, _data$ConnectionHolde89, _data$ConnectionHolde90, _data$ConnectionHolde91, _data$ConnectionHolde92;
1584
+ if (data !== null && data !== void 0 && (_data$DocumentsRequir3 = data.DocumentsRequired) !== null && _data$DocumentsRequir3 !== void 0 && (_data$DocumentsRequir4 = _data$DocumentsRequir3.documents) !== null && _data$DocumentsRequir4 !== void 0 && _data$DocumentsRequir4.length) formData.documents = data === null || data === void 0 ? void 0 : (_data$DocumentsRequir5 = data.DocumentsRequired) === null || _data$DocumentsRequir5 === void 0 ? void 0 : _data$DocumentsRequir5.documents;else formData.documents = null;
1585
+ if (!(data !== null && data !== void 0 && (_data$ConnectionHolde48 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde48 !== void 0 && (_data$ConnectionHolde49 = _data$ConnectionHolde48[0]) !== null && _data$ConnectionHolde49 !== void 0 && _data$ConnectionHolde49.sameAsOwnerDetails)) {
1586
+ var _appData$applicationD8, _appData$applicationD9, _data$ConnectionHolde50, _data$ConnectionHolde51, _data$ConnectionHolde52, _data$ConnectionHolde53, _data$ConnectionHolde54, _data$ConnectionHolde55, _data$ConnectionHolde56, _data$ConnectionHolde57, _data$ConnectionHolde58, _data$ConnectionHolde59, _data$ConnectionHolde60, _data$ConnectionHolde61, _data$ConnectionHolde62, _data$ConnectionHolde63, _data$ConnectionHolde64, _data$ConnectionHolde65, _data$ConnectionHolde66, _data$ConnectionHolde67, _data$ConnectionHolde68, _data$ConnectionHolde69, _data$ConnectionHolde70;
1574
1587
  formData.connectionHolders = [{
1575
1588
  ...(appData === null || appData === void 0 ? void 0 : (_appData$applicationD8 = appData.applicationData) === null || _appData$applicationD8 === void 0 ? void 0 : (_appData$applicationD9 = _appData$applicationD8.connectionHolders) === null || _appData$applicationD9 === void 0 ? void 0 : _appData$applicationD9[0]),
1576
- correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde72 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde72 === void 0 ? void 0 : (_data$ConnectionHolde73 = _data$ConnectionHolde72[0]) === null || _data$ConnectionHolde73 === void 0 ? void 0 : _data$ConnectionHolde73.address) || "",
1577
- fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde74 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde74 === void 0 ? void 0 : (_data$ConnectionHolde75 = _data$ConnectionHolde74[0]) === null || _data$ConnectionHolde75 === void 0 ? void 0 : _data$ConnectionHolde75.guardian) || "",
1578
- gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde76 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde76 === void 0 ? void 0 : (_data$ConnectionHolde77 = _data$ConnectionHolde76[0]) === null || _data$ConnectionHolde77 === void 0 ? void 0 : (_data$ConnectionHolde78 = _data$ConnectionHolde77.gender) === null || _data$ConnectionHolde78 === void 0 ? void 0 : _data$ConnectionHolde78.code) || "",
1579
- mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde79 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde79 === void 0 ? void 0 : (_data$ConnectionHolde80 = _data$ConnectionHolde79[0]) === null || _data$ConnectionHolde80 === void 0 ? void 0 : _data$ConnectionHolde80.mobileNumber) || "",
1580
- name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde81 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde81 === void 0 ? void 0 : (_data$ConnectionHolde82 = _data$ConnectionHolde81[0]) === null || _data$ConnectionHolde82 === void 0 ? void 0 : _data$ConnectionHolde82.name) || "",
1581
- emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde83 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde83 === void 0 ? void 0 : (_data$ConnectionHolde84 = _data$ConnectionHolde83[0]) === null || _data$ConnectionHolde84 === void 0 ? void 0 : _data$ConnectionHolde84.emailId) || "",
1582
- ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde85 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde85 === void 0 ? void 0 : (_data$ConnectionHolde86 = _data$ConnectionHolde85[0]) === null || _data$ConnectionHolde86 === void 0 ? void 0 : (_data$ConnectionHolde87 = _data$ConnectionHolde86.ownerType) === null || _data$ConnectionHolde87 === void 0 ? void 0 : _data$ConnectionHolde87.code) || "",
1583
- relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde88 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde88 === void 0 ? void 0 : (_data$ConnectionHolde89 = _data$ConnectionHolde88[0]) === null || _data$ConnectionHolde89 === void 0 ? void 0 : (_data$ConnectionHolde90 = _data$ConnectionHolde89.relationship) === null || _data$ConnectionHolde90 === void 0 ? void 0 : _data$ConnectionHolde90.code) || "",
1584
- sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde91 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde91 === void 0 ? void 0 : (_data$ConnectionHolde92 = _data$ConnectionHolde91[0]) === null || _data$ConnectionHolde92 === void 0 ? void 0 : _data$ConnectionHolde92.sameAsOwnerDetails
1589
+ correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde50 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde50 === void 0 ? void 0 : (_data$ConnectionHolde51 = _data$ConnectionHolde50[0]) === null || _data$ConnectionHolde51 === void 0 ? void 0 : _data$ConnectionHolde51.address) || "",
1590
+ fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde52 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde52 === void 0 ? void 0 : (_data$ConnectionHolde53 = _data$ConnectionHolde52[0]) === null || _data$ConnectionHolde53 === void 0 ? void 0 : _data$ConnectionHolde53.guardian) || "",
1591
+ gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde54 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde54 === void 0 ? void 0 : (_data$ConnectionHolde55 = _data$ConnectionHolde54[0]) === null || _data$ConnectionHolde55 === void 0 ? void 0 : (_data$ConnectionHolde56 = _data$ConnectionHolde55.gender) === null || _data$ConnectionHolde56 === void 0 ? void 0 : _data$ConnectionHolde56.code) || "",
1592
+ mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde57 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde57 === void 0 ? void 0 : (_data$ConnectionHolde58 = _data$ConnectionHolde57[0]) === null || _data$ConnectionHolde58 === void 0 ? void 0 : _data$ConnectionHolde58.mobileNumber) || "",
1593
+ name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde59 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde59 === void 0 ? void 0 : (_data$ConnectionHolde60 = _data$ConnectionHolde59[0]) === null || _data$ConnectionHolde60 === void 0 ? void 0 : _data$ConnectionHolde60.name) || "",
1594
+ emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde61 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde61 === void 0 ? void 0 : (_data$ConnectionHolde62 = _data$ConnectionHolde61[0]) === null || _data$ConnectionHolde62 === void 0 ? void 0 : _data$ConnectionHolde62.emailId) || "",
1595
+ ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde63 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde63 === void 0 ? void 0 : (_data$ConnectionHolde64 = _data$ConnectionHolde63[0]) === null || _data$ConnectionHolde64 === void 0 ? void 0 : (_data$ConnectionHolde65 = _data$ConnectionHolde64.ownerType) === null || _data$ConnectionHolde65 === void 0 ? void 0 : _data$ConnectionHolde65.code) || "",
1596
+ relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde66 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde66 === void 0 ? void 0 : (_data$ConnectionHolde67 = _data$ConnectionHolde66[0]) === null || _data$ConnectionHolde67 === void 0 ? void 0 : (_data$ConnectionHolde68 = _data$ConnectionHolde67.relationship) === null || _data$ConnectionHolde68 === void 0 ? void 0 : _data$ConnectionHolde68.code) || "",
1597
+ sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde69 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde69 === void 0 ? void 0 : (_data$ConnectionHolde70 = _data$ConnectionHolde69[0]) === null || _data$ConnectionHolde70 === void 0 ? void 0 : _data$ConnectionHolde70.sameAsOwnerDetails
1585
1598
  }];
1586
1599
  }
1587
1600
  formData.processInstance = {
@@ -1589,8 +1602,8 @@ const convertModifyApplicationDetails = async (data, appData, actionData = "INIT
1589
1602
  };
1590
1603
  formData.action = actionData;
1591
1604
  formData.channel = "CFC_COUNTER";
1592
- sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify((data === null || data === void 0 ? void 0 : (_data$DocumentsRequir7 = data.DocumentsRequired) === null || _data$DocumentsRequir7 === void 0 ? void 0 : _data$DocumentsRequir7.documents) || []));
1593
- sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$cpt22 = data.cpt) === null || _data$cpt22 === void 0 ? void 0 : _data$cpt22.details));
1605
+ sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify((data === null || data === void 0 ? void 0 : (_data$DocumentsRequir6 = data.DocumentsRequired) === null || _data$DocumentsRequir6 === void 0 ? void 0 : _data$DocumentsRequir6.documents) || []));
1606
+ sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$cpt21 = data.cpt) === null || _data$cpt21 === void 0 ? void 0 : _data$cpt21.details));
1594
1607
  return formData;
1595
1608
  };
1596
1609
  const downloadPdf = (blob, fileName) => {
@@ -13388,8 +13401,8 @@ var _DataView = DataView;
13388
13401
  var Promise$1 = _getNative(_root, 'Promise');
13389
13402
  var _Promise = Promise$1;
13390
13403
 
13391
- var Set = _getNative(_root, 'Set');
13392
- var _Set = Set;
13404
+ var Set$1 = _getNative(_root, 'Set');
13405
+ var _Set = Set$1;
13393
13406
 
13394
13407
  var WeakMap = _getNative(_root, 'WeakMap');
13395
13408
  var _WeakMap = WeakMap;
@@ -30888,14 +30901,113 @@ const RequiredDocuments = ({
30888
30901
  })));
30889
30902
  };
30890
30903
 
30904
+ var serviceTypes = [
30905
+ {
30906
+ code: "WATER_AND_SEWERAGE",
30907
+ name: "Water and Sewerage"
30908
+ },
30909
+ {
30910
+ code: "WATER",
30911
+ name: "Water"
30912
+ },
30913
+ {
30914
+ code: "SEWERAGE",
30915
+ name: "Sewerage"
30916
+ },
30917
+ {
30918
+ code: "REGULARIZATION",
30919
+ name: "Regularization"
30920
+ }
30921
+ ];
30922
+ var applicantTypes = [
30923
+ {
30924
+ code: "OWNER",
30925
+ name: "Owner"
30926
+ },
30927
+ {
30928
+ code: "TENANT",
30929
+ name: "Tenant"
30930
+ }
30931
+ ];
30932
+ var connectionTypes = [
30933
+ {
30934
+ code: "PERMANENT",
30935
+ name: "Permanent"
30936
+ },
30937
+ {
30938
+ code: "TEMPORARY",
30939
+ name: "Temporary"
30940
+ }
30941
+ ];
30942
+ var categoryTypes = [
30943
+ {
30944
+ code: "BULK",
30945
+ name: "Bulk"
30946
+ },
30947
+ {
30948
+ code: "NON_BULK",
30949
+ name: "Non-Bulk"
30950
+ }
30951
+ ];
30952
+ var subCategories = [
30953
+ {
30954
+ code: "DOMESTIC",
30955
+ name: "Domestic"
30956
+ },
30957
+ {
30958
+ code: "COMMERCIAL",
30959
+ name: "Commercial"
30960
+ }
30961
+ ];
30962
+ var propertyTypes = [
30963
+ {
30964
+ code: "SCHOOL",
30965
+ name: "school"
30966
+ },
30967
+ {
30968
+ code: "COLLEGE",
30969
+ name: "college"
30970
+ },
30971
+ {
30972
+ code: "INDUSTRY",
30973
+ name: "Industry"
30974
+ },
30975
+ {
30976
+ code: "MALL",
30977
+ name: "Mall"
30978
+ },
30979
+ {
30980
+ code: "HOTEL",
30981
+ name: "Hotel"
30982
+ },
30983
+ {
30984
+ code: "SHOP",
30985
+ name: "Shop"
30986
+ },
30987
+ {
30988
+ code: "OFFICE",
30989
+ name: "Office"
30990
+ },
30991
+ {
30992
+ code: "HOSPITAL",
30993
+ name: "Hospital"
30994
+ }
30995
+ ];
30996
+ var dropdownData = {
30997
+ serviceTypes: serviceTypes,
30998
+ applicantTypes: applicantTypes,
30999
+ connectionTypes: connectionTypes,
31000
+ categoryTypes: categoryTypes,
31001
+ subCategories: subCategories,
31002
+ propertyTypes: propertyTypes
31003
+ };
31004
+
30891
31005
  const FORM_STORAGE_KEY = "WS_EMPLOYEE_NEW_APPLICATION_FORM";
30892
31006
  const MAX_FILE_SIZE = 5242880;
30893
31007
  const SUPPORTED_FILE_TYPES = /(\.pdf|\.png|\.jpe?g)$/i;
30894
31008
  const NAME_PATTERN = /^[a-zA-Z\s.'-]{1,50}$/;
30895
31009
  const EMAIL_PATTERN = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/;
30896
31010
  const MOBILE_PATTERN = /^[6-9][0-9]{9}$/;
30897
- const OFFICE_PATTERN = /^[0-9]{6,12}$/;
30898
- const PINCODE_PATTERN = /^[1-9][0-9]{5}$/;
30899
31011
  const NUMBER_PATTERN = /^\d+$/;
30900
31012
  const DECIMAL_PATTERN = /^\d+(\.\d{1,2})?$/;
30901
31013
  const IFSC_PATTERN = /^[A-Z]{4}0[A-Z0-9]{6}$/;
@@ -30905,22 +31017,9 @@ const createOption = (code, name) => ({
30905
31017
  code,
30906
31018
  name
30907
31019
  });
30908
- const TYPE_OF_REQUEST_OPTIONS = [createOption("NEW_CONNECTION", "New Connection"), createOption("TEMPORARY_CONNECTION", "Temporary Connection"), createOption("CHANGE_REQUEST", "Change Request")];
30909
- const CONNECTION_TYPE_OPTIONS = [createOption("METERED", "Metered"), createOption("NON_METERED", "Non Metered")];
30910
- const LOCALITY_OPTIONS = [createOption("DWARKA", "Dwarka"), createOption("ROHINI", "Rohini"), createOption("KAROL_BAGH", "Karol Bagh")];
30911
- const SUB_LOCALITY_OPTIONS = {
30912
- DWARKA: [createOption("SECTOR_6", "Sector 6"), createOption("SECTOR_10", "Sector 10"), createOption("SECTOR_12", "Sector 12")],
30913
- ROHINI: [createOption("SECTOR_3", "Sector 3"), createOption("SECTOR_8", "Sector 8"), createOption("SECTOR_16", "Sector 16")],
30914
- KAROL_BAGH: [createOption("DEV_NAGAR", "Dev Nagar"), createOption("PAHAR_GANJ", "Pahar Ganj"), createOption("PATEL_NAGAR", "Patel Nagar")]
30915
- };
30916
- const ASSEMBLY_OPTIONS = [createOption("DWARKA_ASSEMBLY", "Dwarka Assembly"), createOption("ROHINI_ASSEMBLY", "Rohini Assembly"), createOption("KAROL_BAGH_ASSEMBLY", "Karol Bagh Assembly")];
30917
- const WARD_OPTIONS = [createOption("WARD_101", "Ward 101"), createOption("WARD_102", "Ward 102"), createOption("WARD_103", "Ward 103")];
30918
- const PROPERTY_TYPE_OPTIONS = [createOption("RESIDENTIAL", "Residential"), createOption("COMMERCIAL", "Commercial"), createOption("INDUSTRIAL", "Industrial"), createOption("INSTITUTIONAL", "Institutional"), createOption("HOSPITAL_NURSING_HOME", "Hospital / Nursing Home")];
30919
- const WATER_CONNECTION_CATEGORY_OPTIONS = [createOption("DOMESTIC", "Domestic"), createOption("NON_DOMESTIC", "Non-Domestic"), createOption("MIXED_USE", "Mixed Use")];
30920
- const WATER_CONNECTION_USED_BY_OPTIONS = [createOption("OWNER", "Owner"), createOption("TENANT", "Tenant"), createOption("AUTHORIZED_OCCUPIER", "Authorized Occupier")];
31020
+ const WATER_CONNECTION_USED_BY_OPTIONS = [createOption("5 Star Hotel", "5 Star Hotel"), createOption("4/5 Star Hotel", "4/5 Star Hotel"), createOption("Ex-Army Service", "Ex-Army Service"), createOption("General", "General"), createOption("Bank", "Bank"), createOption("Airport", "Airport"), createOption("Govt. College", "Govt. College")];
30921
31021
  const PROOF_OF_IDENTITY_OPTIONS = [createOption("AADHAAR", "Aadhaar"), createOption("PAN", "PAN"), createOption("VOTER_ID", "Voter ID"), createOption("PASSPORT", "Passport"), createOption("DRIVING_LICENSE", "Driving License")];
30922
31022
  const OWNERSHIP_STATUS_OPTIONS = [createOption("SELF_OWNED", "Self Owned"), createOption("LEASED", "Leased"), createOption("RENTED", "Rented"), createOption("GOVERNMENT_ALLOTTED", "Government Allotted")];
30923
- const SUBMITTED_BY_OPTIONS = [createOption("APPLICANT", "Applicant"), createOption("AUTHORIZED_SIGNATORY", "Authorized Signatory"), createOption("DJB_COUNTER", "DJB Counter")];
30924
31023
  const DEFAULT_SECTION_STATE = {
30925
31024
  application: true,
30926
31025
  applicant: true,
@@ -30940,7 +31039,7 @@ const DEFAULT_FORM_VALUES = {
30940
31039
  firstName: "",
30941
31040
  middleName: "",
30942
31041
  lastName: "",
30943
- fatherOrHusbandName: "",
31042
+ ParentorSpouse: "",
30944
31043
  isGovernmentOrganization: false,
30945
31044
  applicantIdProofFile: null,
30946
31045
  governmentOrganizationName: ""
@@ -30948,7 +31047,20 @@ const DEFAULT_FORM_VALUES = {
30948
31047
  contact: {
30949
31048
  emailId: "",
30950
31049
  mobileNumber: "",
30951
- officeNumber: ""
31050
+ whatsAppNumber: ""
31051
+ },
31052
+ applicationSelection: {
31053
+ serviceType: null,
31054
+ applicantType: null,
31055
+ connectionType: null,
31056
+ categoryType: null,
31057
+ subCategory: null,
31058
+ commercialType: null,
31059
+ govtOrganization: {
31060
+ organizationName: "",
31061
+ natureOfWork: "",
31062
+ organizationDocument: null
31063
+ }
30952
31064
  },
30953
31065
  djbEmployee: {
30954
31066
  isDjbEmployee: false,
@@ -30962,6 +31074,12 @@ const DEFAULT_FORM_VALUES = {
30962
31074
  pinCode: "",
30963
31075
  locality: null,
30964
31076
  subLocality: null,
31077
+ state: "",
31078
+ district: "",
31079
+ city: "",
31080
+ street: "",
31081
+ houseNo: "",
31082
+ block: "",
30965
31083
  assembly: null,
30966
31084
  ward: null
30967
31085
  },
@@ -30972,7 +31090,10 @@ const DEFAULT_FORM_VALUES = {
30972
31090
  plotArea: "",
30973
31091
  builtUpArea: "",
30974
31092
  waterConnectionCategory: null,
30975
- waterConnectionUsedBy: null
31093
+ gender: null,
31094
+ NumberofDwellingUnits: "",
31095
+ SelectYearofConstruction: null,
31096
+ WaterConnectionUsageType: null
30976
31097
  },
30977
31098
  bankDetails: {
30978
31099
  bankName: "",
@@ -30993,7 +31114,6 @@ const DEFAULT_FORM_VALUES = {
30993
31114
  declaration: {
30994
31115
  submittedBy: null,
30995
31116
  signatureFile: null,
30996
- captcha: "",
30997
31117
  agree: false
30998
31118
  },
30999
31119
  cpt: {
@@ -31020,75 +31140,194 @@ const actionBarStyle = {
31020
31140
  gap: "16px",
31021
31141
  flexWrap: "wrap"
31022
31142
  };
31023
- const captchaBoxStyle = {
31024
- background: "#F3F7F9",
31025
- border: "1px dashed #0B4B66",
31026
- borderRadius: "4px",
31027
- fontFamily: "monospace",
31028
- fontSize: "20px",
31029
- fontWeight: "700",
31030
- letterSpacing: "4px",
31031
- padding: "12px 16px"
31032
- };
31033
- const linkButtonStyle = {
31034
- background: "transparent",
31035
- border: "none",
31036
- color: "#0B4B66",
31037
- cursor: "pointer",
31038
- fontSize: "14px",
31039
- fontWeight: "600",
31040
- padding: 0,
31041
- textDecoration: "underline"
31042
- };
31043
- const getStoredFormData = () => {
31044
- if (typeof window === "undefined") return {};
31045
- try {
31046
- const savedData = window.sessionStorage.getItem(FORM_STORAGE_KEY);
31047
- return savedData ? JSON.parse(savedData) : {};
31048
- } catch (error) {
31049
- return {};
31050
- }
31143
+ const ProfileImagePreview = ({
31144
+ fileStoreId
31145
+ }) => {
31146
+ const [imageUrl, setImageUrl] = useState(null);
31147
+ useEffect(() => {
31148
+ const fetchImageUrl = async () => {
31149
+ if (fileStoreId) {
31150
+ try {
31151
+ var _response$data, _response$data$fileSt, _response$data$fileSt2;
31152
+ const tenantId = Digit.ULBService.getStateId();
31153
+ const response = await Digit.UploadServices.Filefetch([fileStoreId], tenantId);
31154
+ const url = response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$fileSt = _response$data.fileStoreIds) === null || _response$data$fileSt === void 0 ? void 0 : (_response$data$fileSt2 = _response$data$fileSt[0]) === null || _response$data$fileSt2 === void 0 ? void 0 : _response$data$fileSt2.url;
31155
+ if (url) {
31156
+ let differentFormats = (url === null || url === void 0 ? void 0 : url.split(",")) || [];
31157
+ let fileURL = "";
31158
+ differentFormats.map(link => {
31159
+ if (!link.includes("large") && !link.includes("medium") && !link.includes("small")) {
31160
+ fileURL = link;
31161
+ }
31162
+ });
31163
+ setImageUrl(fileURL || differentFormats[0]);
31164
+ }
31165
+ } catch (err) {
31166
+ console.error("Error fetching image URL:", err);
31167
+ setImageUrl(null);
31168
+ }
31169
+ }
31170
+ };
31171
+ fetchImageUrl();
31172
+ }, [fileStoreId]);
31173
+ if (!imageUrl) return null;
31174
+ return /*#__PURE__*/React.createElement("img", {
31175
+ src: imageUrl,
31176
+ alt: "Profile",
31177
+ style: {
31178
+ width: "100%",
31179
+ height: "100%",
31180
+ objectFit: "cover"
31181
+ }
31182
+ });
31183
+ };
31184
+ const ProfileImageUpload = ({
31185
+ value,
31186
+ onUpload,
31187
+ isUploading,
31188
+ error,
31189
+ t,
31190
+ label,
31191
+ required
31192
+ }) => {
31193
+ const fileInputRef = React.useRef(null);
31194
+ const fileStoreId = value === null || value === void 0 ? void 0 : value.fileStoreId;
31195
+ const [imageUrl, setImageUrl] = useState(null);
31196
+ useEffect(() => {
31197
+ const fetchImageUrl = async () => {
31198
+ if (fileStoreId) {
31199
+ try {
31200
+ var _response$data2, _response$data2$fileS, _response$data2$fileS2;
31201
+ const tenantId = Digit.ULBService.getStateId();
31202
+ const response = await Digit.UploadServices.Filefetch([fileStoreId], tenantId);
31203
+ const url = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$fileS = _response$data2.fileStoreIds) === null || _response$data2$fileS === void 0 ? void 0 : (_response$data2$fileS2 = _response$data2$fileS[0]) === null || _response$data2$fileS2 === void 0 ? void 0 : _response$data2$fileS2.url;
31204
+ if (url) {
31205
+ let differentFormats = (url === null || url === void 0 ? void 0 : url.split(",")) || [];
31206
+ let fileURL = "";
31207
+ differentFormats.map(link => {
31208
+ if (!link.includes("large") && !link.includes("medium") && !link.includes("small")) {
31209
+ fileURL = link;
31210
+ }
31211
+ });
31212
+ setImageUrl(fileURL || differentFormats[0]);
31213
+ }
31214
+ } catch (err) {
31215
+ console.error("Error fetching image URL:", err);
31216
+ setImageUrl(null);
31217
+ }
31218
+ } else {
31219
+ setImageUrl(null);
31220
+ }
31221
+ };
31222
+ fetchImageUrl();
31223
+ }, [fileStoreId]);
31224
+ const handleEditClick = () => {
31225
+ fileInputRef.current.click();
31226
+ };
31227
+ return /*#__PURE__*/React.createElement("div", {
31228
+ className: "avatar-upload-container"
31229
+ }, label && /*#__PURE__*/React.createElement(CardLabel, {
31230
+ style: {
31231
+ textAlign: "center",
31232
+ marginBottom: "16px",
31233
+ fontWeight: "700"
31234
+ }
31235
+ }, `${t(label)}${required ? "*" : ""}`), /*#__PURE__*/React.createElement("div", {
31236
+ className: "avatar-wrapper"
31237
+ }, /*#__PURE__*/React.createElement("div", {
31238
+ className: "avatar-circle",
31239
+ onClick: handleEditClick
31240
+ }, imageUrl ? /*#__PURE__*/React.createElement("img", {
31241
+ src: imageUrl,
31242
+ alt: "Profile"
31243
+ }) : /*#__PURE__*/React.createElement("div", {
31244
+ className: "avatar-placeholder"
31245
+ }, /*#__PURE__*/React.createElement("svg", {
31246
+ width: "40",
31247
+ height: "40",
31248
+ viewBox: "0 0 24 24",
31249
+ fill: "none",
31250
+ stroke: "#9CA3AF",
31251
+ strokeWidth: "1.5"
31252
+ }, /*#__PURE__*/React.createElement("path", {
31253
+ d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"
31254
+ }), /*#__PURE__*/React.createElement("circle", {
31255
+ cx: "12",
31256
+ cy: "7",
31257
+ r: "4"
31258
+ })))), /*#__PURE__*/React.createElement("div", {
31259
+ className: "avatar-edit-icon",
31260
+ onClick: handleEditClick
31261
+ }, /*#__PURE__*/React.createElement("svg", {
31262
+ width: "18",
31263
+ height: "18",
31264
+ viewBox: "0 0 24 24",
31265
+ fill: "none",
31266
+ stroke: "#0B4B66",
31267
+ strokeWidth: "2.5",
31268
+ strokeLinecap: "round",
31269
+ strokeLinejoin: "round"
31270
+ }, /*#__PURE__*/React.createElement("path", {
31271
+ d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"
31272
+ })))), /*#__PURE__*/React.createElement("input", {
31273
+ type: "file",
31274
+ ref: fileInputRef,
31275
+ style: {
31276
+ display: "none"
31277
+ },
31278
+ accept: "image/*",
31279
+ onChange: onUpload
31280
+ }), isUploading && /*#__PURE__*/React.createElement("div", {
31281
+ style: {
31282
+ fontSize: "14px",
31283
+ marginTop: "8px",
31284
+ color: "#505A5F"
31285
+ }
31286
+ }, "Uploading..."), error && /*#__PURE__*/React.createElement(CardLabelError, {
31287
+ style: {
31288
+ textAlign: "center",
31289
+ marginTop: "8px"
31290
+ }
31291
+ }, error));
31051
31292
  };
31052
- const buildDefaultValues = (savedFormData = {}) => ({
31053
- typeOfRequest: (savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.typeOfRequest) || DEFAULT_FORM_VALUES.typeOfRequest,
31054
- connectionType: (savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.connectionType) || DEFAULT_FORM_VALUES.connectionType,
31293
+ const buildDefaultValues = () => ({
31294
+ zro: {
31295
+ value: "",
31296
+ error: ""
31297
+ },
31298
+ typeOfRequest: DEFAULT_FORM_VALUES.typeOfRequest,
31299
+ connectionType: DEFAULT_FORM_VALUES.connectionType,
31055
31300
  applicant: {
31056
- ...DEFAULT_FORM_VALUES.applicant,
31057
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.applicant) || {})
31301
+ ...DEFAULT_FORM_VALUES.applicant
31058
31302
  },
31059
31303
  contact: {
31060
- ...DEFAULT_FORM_VALUES.contact,
31061
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.contact) || {})
31304
+ ...DEFAULT_FORM_VALUES.contact
31062
31305
  },
31063
31306
  djbEmployee: {
31064
- ...DEFAULT_FORM_VALUES.djbEmployee,
31065
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.djbEmployee) || {})
31307
+ ...DEFAULT_FORM_VALUES.djbEmployee
31066
31308
  },
31067
31309
  propertyAddress: {
31068
- ...DEFAULT_FORM_VALUES.propertyAddress,
31069
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.propertyAddress) || {})
31310
+ ...DEFAULT_FORM_VALUES.propertyAddress
31070
31311
  },
31071
31312
  useDetails: {
31072
- ...DEFAULT_FORM_VALUES.useDetails,
31073
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.useDetails) || {})
31313
+ ...DEFAULT_FORM_VALUES.useDetails
31074
31314
  },
31075
31315
  bankDetails: {
31076
- ...DEFAULT_FORM_VALUES.bankDetails,
31077
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.bankDetails) || {})
31316
+ ...DEFAULT_FORM_VALUES.bankDetails
31078
31317
  },
31079
31318
  rainWaterHarvesting: {
31080
- ...DEFAULT_FORM_VALUES.rainWaterHarvesting,
31081
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.rainWaterHarvesting) || {})
31319
+ ...DEFAULT_FORM_VALUES.rainWaterHarvesting
31320
+ },
31321
+ applicationSelection: {
31322
+ ...DEFAULT_FORM_VALUES.applicationSelection
31082
31323
  },
31083
31324
  documents: {
31084
- ...DEFAULT_FORM_VALUES.documents,
31085
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.documents) || {})
31325
+ ...DEFAULT_FORM_VALUES.documents
31086
31326
  },
31087
31327
  declaration: {
31088
- ...DEFAULT_FORM_VALUES.declaration,
31089
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.declaration) || {})
31328
+ ...DEFAULT_FORM_VALUES.declaration
31090
31329
  },
31091
- cpt: (savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.cpt) || {
31330
+ cpt: {
31092
31331
  id: "",
31093
31332
  details: null
31094
31333
  }
@@ -31107,14 +31346,6 @@ const getDisplayValue = value => {
31107
31346
  }
31108
31347
  return String(value);
31109
31348
  };
31110
- const generateCaptcha = () => {
31111
- const characters = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789";
31112
- let captcha = "";
31113
- for (let index = 0; index < 6; index += 1) {
31114
- captcha += characters.charAt(Math.floor(Math.random() * characters.length));
31115
- }
31116
- return captcha;
31117
- };
31118
31349
  const FieldBlock = ({
31119
31350
  label,
31120
31351
  required,
@@ -31148,14 +31379,47 @@ const SectionCard = ({
31148
31379
  title,
31149
31380
  description,
31150
31381
  isOpen: _isOpen = true,
31151
- children
31382
+ children,
31383
+ sectionRef,
31384
+ sectionKey,
31385
+ onEditClick
31152
31386
  }) => {
31153
31387
  return /*#__PURE__*/React.createElement("div", {
31154
31388
  className: "ws-new-application-collapsible",
31155
31389
  style: {
31156
- marginBottom: "16px"
31157
- }
31158
- }, /*#__PURE__*/React.createElement(CollapsibleCardPage, {
31390
+ marginBottom: "16px",
31391
+ position: "relative"
31392
+ },
31393
+ ref: sectionRef,
31394
+ "data-section": sectionKey
31395
+ }, onEditClick && /*#__PURE__*/React.createElement("div", {
31396
+ onClick: onEditClick,
31397
+ style: {
31398
+ position: "absolute",
31399
+ top: "20px",
31400
+ right: "50px",
31401
+ zIndex: 10,
31402
+ cursor: "pointer",
31403
+ display: "flex",
31404
+ alignItems: "center",
31405
+ gap: "4px",
31406
+ color: "#0B4B66",
31407
+ fontSize: "14px",
31408
+ fontWeight: "600"
31409
+ },
31410
+ title: "Edit Section"
31411
+ }, /*#__PURE__*/React.createElement("svg", {
31412
+ width: "16",
31413
+ height: "16",
31414
+ viewBox: "0 0 24 24",
31415
+ fill: "none",
31416
+ stroke: "currentColor",
31417
+ strokeWidth: "2.5",
31418
+ strokeLinecap: "round",
31419
+ strokeLinejoin: "round"
31420
+ }, /*#__PURE__*/React.createElement("path", {
31421
+ d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"
31422
+ })), "Edit"), /*#__PURE__*/React.createElement(CollapsibleCardPage, {
31159
31423
  defaultOpen: _isOpen,
31160
31424
  defaultTab: COLLAPSIBLE_CONTENT_TAB,
31161
31425
  tabs: [COLLAPSIBLE_CONTENT_TAB],
@@ -31168,11 +31432,32 @@ const SectionCard = ({
31168
31432
  className: "formcomposer-section-grid"
31169
31433
  }, children))));
31170
31434
  };
31435
+ const handleView = async (fileStoreId, tenantId) => {
31436
+ try {
31437
+ var _response$data3, _response$data3$fileS, _response$data3$fileS2;
31438
+ const response = await Digit.UploadServices.Filefetch([fileStoreId], tenantId);
31439
+ const url = response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : (_response$data3$fileS = _response$data3.fileStoreIds) === null || _response$data3$fileS === void 0 ? void 0 : (_response$data3$fileS2 = _response$data3$fileS[0]) === null || _response$data3$fileS2 === void 0 ? void 0 : _response$data3$fileS2.url;
31440
+ if (url) {
31441
+ const differentFormats = (url === null || url === void 0 ? void 0 : url.split(",")) || [];
31442
+ let fileURL = "";
31443
+ differentFormats.map(link => {
31444
+ if (!link.includes("large") && !link.includes("medium") && !link.includes("small")) {
31445
+ fileURL = link;
31446
+ }
31447
+ });
31448
+ window.open(fileURL || differentFormats[0], "_blank");
31449
+ }
31450
+ } catch (error) {
31451
+ console.error("Error fetching file URL:", error);
31452
+ }
31453
+ };
31171
31454
  const PreviewItem = ({
31172
31455
  label,
31173
31456
  value,
31174
31457
  isFullWidth
31175
31458
  }) => {
31459
+ const stateId = Digit.ULBService.getStateId();
31460
+ const isFile = value && typeof value === "object" && (value === null || value === void 0 ? void 0 : value.fileStoreId);
31176
31461
  return /*#__PURE__*/React.createElement("div", {
31177
31462
  style: {
31178
31463
  ...fieldWrapperStyle,
@@ -31185,12 +31470,42 @@ const PreviewItem = ({
31185
31470
  fontWeight: "600",
31186
31471
  marginBottom: "0px"
31187
31472
  }
31188
- }, label), /*#__PURE__*/React.createElement(CardText, {
31473
+ }, label), /*#__PURE__*/React.createElement("div", {
31474
+ style: {
31475
+ display: "flex",
31476
+ alignItems: "center",
31477
+ gap: "8px"
31478
+ }
31479
+ }, /*#__PURE__*/React.createElement(CardText, {
31189
31480
  style: {
31190
31481
  marginBottom: "0px",
31191
31482
  marginTop: "0px"
31192
31483
  }
31193
- }, getDisplayValue(value)));
31484
+ }, getDisplayValue(value)), isFile && /*#__PURE__*/React.createElement("div", {
31485
+ onClick: () => handleView(value.fileStoreId, stateId),
31486
+ style: {
31487
+ cursor: "pointer",
31488
+ display: "flex",
31489
+ alignItems: "center",
31490
+ color: "#0B4B66"
31491
+ },
31492
+ title: "View Document"
31493
+ }, /*#__PURE__*/React.createElement("svg", {
31494
+ width: "20",
31495
+ height: "20",
31496
+ viewBox: "0 0 24 24",
31497
+ fill: "none",
31498
+ stroke: "currentColor",
31499
+ strokeWidth: "2",
31500
+ strokeLinecap: "round",
31501
+ strokeLinejoin: "round"
31502
+ }, /*#__PURE__*/React.createElement("path", {
31503
+ d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
31504
+ }), /*#__PURE__*/React.createElement("circle", {
31505
+ cx: "12",
31506
+ cy: "12",
31507
+ r: "3"
31508
+ })))));
31194
31509
  };
31195
31510
  const FileUploadField = ({
31196
31511
  id,
@@ -31224,29 +31539,121 @@ const FileUploadField = ({
31224
31539
  }, isUploading ? "Uploading file..." : (value === null || value === void 0 ? void 0 : value.fileName) || "No file selected"));
31225
31540
  };
31226
31541
  const NewApplication = () => {
31227
- var _Digit$SessionStorage, _formValues$applicant, _formValues$applicant2, _formValues$applicant3, _formValues$applicant4, _formValues$applicant5, _formValues$applicant6, _formValues$applicant7, _formValues$applicant8, _formValues$contact, _formValues$contact2, _formValues$contact3, _formValues$djbEmploy, _formValues$djbEmploy2, _formValues$djbEmploy3, _formValues$djbEmploy4, _formValues$djbEmploy5, _formValues$propertyA, _formValues$propertyA2, _formValues$propertyA3, _formValues$propertyA4, _formValues$propertyA5, _formValues$propertyA6, _formValues$propertyA7, _formValues$useDetail, _formValues$useDetail2, _formValues$useDetail3, _formValues$useDetail4, _formValues$useDetail5, _formValues$useDetail6, _formValues$useDetail7, _formValues$useDetail8, _formValues$useDetail9, _formValues$bankDetai, _formValues$bankDetai2, _formValues$bankDetai3, _formValues$bankDetai4, _formValues$rainWater, _formValues$documents, _formValues$documents2, _formValues$documents3, _formValues$documents4, _formValues$documents5, _formValues$declarati, _formValues$declarati2, _formValues$declarati3, _formValues$declarati4;
31542
+ var _Digit$SessionStorage, _getFieldError, _getFieldError2, _getFieldError3, _getFieldError4, _getFieldError5, _getFieldError6, _getFieldError7, _getFieldError8, _formValues$applicati, _formValues$applicati2, _formValues$applicati3, _formValues$applicati4, _formValues$applicati5, _formValues$applicati6, _formValues$applicati7, _formValues$applicati8, _formValues$applicati9, _formValues$applicati0, _formValues$applicati1, _formValues$applicati10, _formValues$applicati11, _formValues$applicati12, _formValues$applicant, _formValues$applicant2, _formValues$applicant3, _formValues$applicant4, _formValues$applicant5, _formValues$applicant6, _formValues$applicant7, _formValues$useDetail, _formValues$applicant8, _formValues$contact, _formValues$contact2, _formValues$contact3, _formValues$documents, _formValues$djbEmploy, _formValues$djbEmploy2, _formValues$djbEmploy3, _formValues$djbEmploy4, _formValues$djbEmploy5, _formValues$propertyA, _formValues$propertyA2, _formValues$propertyA3, _formValues$propertyA4, _formValues$propertyA5, _formValues$propertyA6, _formValues$propertyA7, _formValues$propertyA8, _formValues$propertyA9, _formValues$propertyA0, _formValues$propertyA1, _formValues$useDetail2, _formValues$useDetail3, _formValues$useDetail4, _formValues$useDetail5, _formValues$useDetail6, _formValues$useDetail7, _formValues$useDetail8, _formValues$useDetail9, _formValues$useDetail0, _formValues$useDetail1, _formValues$useDetail10, _formValues$useDetail11, _formValues$bankDetai, _formValues$bankDetai2, _formValues$bankDetai3, _formValues$bankDetai4, _formValues$documents2, _formValues$documents3, _formValues$documents4, _formValues$documents5, _formValues$documents6;
31228
31543
  const {
31229
31544
  t
31230
31545
  } = useTranslation();
31231
31546
  const history = useHistory();
31232
31547
  const location = useLocation();
31548
+ const {
31549
+ data: allCities,
31550
+ isLoading
31551
+ } = Digit.Hooks.useTenants();
31233
31552
  const stateId = Digit.ULBService.getStateId();
31234
31553
  const tenantId = Digit.ULBService.getCurrentTenantId() || ((_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code);
31235
31554
  const [previewMode, setPreviewMode] = useState(false);
31236
31555
  const [currentStep, setCurrentStep] = useState(1);
31237
31556
  const [collapsedSections, setCollapsedSections] = useState(DEFAULT_SECTION_STATE);
31238
31557
  const [showToast, setShowToast] = useState(null);
31239
- const [generatedCaptcha, setGeneratedCaptcha] = useState(generateCaptcha());
31240
31558
  const [uploadingFields, setUploadingFields] = useState({});
31241
31559
  const [isEnableLoader, setIsEnableLoader] = useState(false);
31242
31560
  const [appDetails, setAppDetails] = useState({});
31243
31561
  const [waterAndSewerageBoth, setWaterAndSewerageBoth] = useState(null);
31244
31562
  const [propertyId, setPropertyId] = useState(new URLSearchParams(location.search).get("propertyId"));
31245
- const [zro, setZro] = useState({
31246
- value: "",
31247
- error: ""
31248
- });
31249
- const initialFormValues = buildDefaultValues(getStoredFormData());
31563
+ const initialFormValues = buildDefaultValues();
31564
+ const [zro, setZro] = useState(initialFormValues.zro);
31565
+ const [localFormState, setLocalFormState] = useState(false);
31566
+ const [city, setCity] = useState("");
31567
+ useEffect(() => {
31568
+ if (allCities && tenantId && !city) {
31569
+ const currentCity = allCities === null || allCities === void 0 ? void 0 : allCities.find(c => c.code === tenantId);
31570
+ if (currentCity) {
31571
+ setCity(currentCity);
31572
+ setValue("propertyAddress.city", currentCity);
31573
+ }
31574
+ }
31575
+ }, [allCities, tenantId]);
31576
+ const {
31577
+ data: egovLocationData
31578
+ } = Digit.Hooks.useCommonMDMS(tenantId, "egov-location", ["TenantBoundary"]);
31579
+ const boundaryData = useMemo(() => {
31580
+ var _egovLocationData$ego;
31581
+ const tenantBoundary = (egovLocationData === null || egovLocationData === void 0 ? void 0 : (_egovLocationData$ego = egovLocationData["egov-location"]) === null || _egovLocationData$ego === void 0 ? void 0 : _egovLocationData$ego.TenantBoundary) || [];
31582
+ const revenueData = tenantBoundary.find(item => {
31583
+ var _item$hierarchyType;
31584
+ return (item === null || item === void 0 ? void 0 : (_item$hierarchyType = item.hierarchyType) === null || _item$hierarchyType === void 0 ? void 0 : _item$hierarchyType.code) === "REVENUE";
31585
+ });
31586
+ const boundary = (revenueData === null || revenueData === void 0 ? void 0 : revenueData.boundary) || [];
31587
+ return Array.isArray(boundary) ? boundary : [boundary];
31588
+ }, [egovLocationData]);
31589
+ const structuredLocalityData = useMemo(() => {
31590
+ let localities = [];
31591
+ const boundaries = Array.isArray(boundaryData) ? boundaryData : boundaryData ? [boundaryData] : [];
31592
+ const extractLocalities = (node, zone = null, ward = null) => {
31593
+ if (!node) return;
31594
+ let currentZone = zone;
31595
+ let currentWard = ward;
31596
+ if (node.label === "Zone" || node.label === "ZONE") {
31597
+ currentZone = node.localname || node.code || node.name;
31598
+ }
31599
+ if (node.label === "Ward" || node.label === "WARD" || node.label === "Block" || node.label === "BLOCK") {
31600
+ currentWard = node.code || node.localname || node.name;
31601
+ }
31602
+ if (node.label === "Locality" || node.label === "LOCALITY") {
31603
+ localities.push({
31604
+ ...node,
31605
+ name: node.localname || node.name || node.code,
31606
+ i18nKey: node.i18nKey || `${tenantId.replace(".", "_")}_REVENUE_${node.code}`.toUpperCase(),
31607
+ zone: currentZone,
31608
+ ward: currentWard
31609
+ });
31610
+ }
31611
+ if (node.children && node.children.length > 0) {
31612
+ node.children.forEach(child => extractLocalities(child, currentZone, currentWard));
31613
+ }
31614
+ };
31615
+ boundaries.forEach(rootNode => extractLocalities(rootNode));
31616
+ return localities;
31617
+ }, [boundaryData, tenantId]);
31618
+ const fetchedPincodes = useMemo(() => {
31619
+ const pinSet = new Set();
31620
+ structuredLocalityData.forEach(loc => {
31621
+ if (loc.pincode) {
31622
+ const pins = Array.isArray(loc.pincode) ? loc.pincode : [loc.pincode];
31623
+ pins.forEach(p => {
31624
+ if (p) {
31625
+ const sanitizedPin = p.toString().split(".")[0];
31626
+ pinSet.add(sanitizedPin);
31627
+ }
31628
+ });
31629
+ }
31630
+ });
31631
+ return Array.from(pinSet).sort().map(pin => ({
31632
+ code: pin,
31633
+ name: pin,
31634
+ i18nKey: pin
31635
+ }));
31636
+ }, [structuredLocalityData]);
31637
+ const sectionRefs = {
31638
+ application: React.useRef(null),
31639
+ applicant: React.useRef(null),
31640
+ contact: React.useRef(null),
31641
+ djbEmployee: React.useRef(null),
31642
+ propertyAddress: React.useRef(null),
31643
+ useDetails: React.useRef(null),
31644
+ bankDetails: React.useRef(null),
31645
+ documents: React.useRef(null),
31646
+ declaration: React.useRef(null)
31647
+ };
31648
+ const currentYear = new Date().getFullYear();
31649
+ const yearOptions = [];
31650
+ for (let year = 1970; year <= currentYear; year++) {
31651
+ yearOptions.push({
31652
+ i18nKey: `${year}`,
31653
+ code: `${year}`,
31654
+ value: `${year}`
31655
+ });
31656
+ }
31250
31657
  const {
31251
31658
  register,
31252
31659
  control,
@@ -31258,8 +31665,7 @@ const NewApplication = () => {
31258
31665
  reset,
31259
31666
  getValues,
31260
31667
  formState: {
31261
- errors,
31262
- localFormState
31668
+ errors
31263
31669
  }
31264
31670
  } = useForm({
31265
31671
  defaultValues: initialFormValues,
@@ -31271,9 +31677,84 @@ const NewApplication = () => {
31271
31677
  const selectedPropertyType = watch("useDetails.propertyType");
31272
31678
  const selectedLocality = watch("propertyAddress.locality");
31273
31679
  const selectedSubLocality = watch("propertyAddress.subLocality");
31274
- const subLocalityOptions = selectedLocality ? SUB_LOCALITY_OPTIONS[selectedLocality.code] || [] : [];
31680
+ const pCode = watch("propertyAddress.pinCode");
31681
+ const filteredLocalities = useMemo(() => {
31682
+ if (!pCode) return structuredLocalityData;
31683
+ return structuredLocalityData.filter(loc => {
31684
+ if (!loc.pincode) return false;
31685
+ const pins = Array.isArray(loc.pincode) ? loc.pincode : [loc.pincode];
31686
+ return pins.some(p => p.toString() === pCode);
31687
+ });
31688
+ }, [structuredLocalityData, pCode]);
31689
+ const selectedSubCategory = watch("applicationSelection.subCategory");
31690
+ const selectedCommercialType = watch("applicationSelection.commercialType");
31691
+ const subCategoryIsCommercial = (selectedSubCategory === null || selectedSubCategory === void 0 ? void 0 : selectedSubCategory.code) === "COMMERCIAL";
31275
31692
  const hasPendingUpload = Object.values(uploadingFields).some(Boolean);
31276
- const isHospitalProperty = (selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code) === "HOSPITAL_NURSING_HOME";
31693
+ const isHospitalProperty = (selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code) === "HOSPITAL" || (selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code) === "HOSPITAL_NURSING_HOME";
31694
+ const timelineConfig = [{
31695
+ sectionId: "application",
31696
+ route: "application-selection",
31697
+ actions: "Application Selection"
31698
+ }, {
31699
+ sectionId: "applicant",
31700
+ route: "applicant-details",
31701
+ actions: "Details of Applicant"
31702
+ }, ...(isDjbEmployee ? [{
31703
+ sectionId: "djbEmployee",
31704
+ route: "djb-employee",
31705
+ actions: "For DJB Employee"
31706
+ }] : []), {
31707
+ sectionId: "propertyAddress",
31708
+ route: "property-address",
31709
+ actions: "Property Address"
31710
+ }, {
31711
+ sectionId: "useDetails",
31712
+ route: "use-details",
31713
+ actions: "Property & Connection Use Details"
31714
+ }, {
31715
+ sectionId: "bankDetails",
31716
+ route: "bank-details",
31717
+ actions: "Bank Details"
31718
+ }, {
31719
+ sectionId: "documents",
31720
+ route: "documents",
31721
+ actions: "Documents to be Attached"
31722
+ }, {
31723
+ sectionId: "Review",
31724
+ route: "review",
31725
+ actions: "Review Application"
31726
+ }].map((step, index) => ({
31727
+ ...step,
31728
+ timeLine: [{
31729
+ actions: step.actions,
31730
+ currentStep: index + 1
31731
+ }]
31732
+ }));
31733
+ useEffect(() => {
31734
+ if (previewMode) return;
31735
+ const observerOptions = {
31736
+ root: null,
31737
+ rootMargin: "-20% 0px -50% 0px",
31738
+ threshold: [0, 0.1, 0.5, 1.0]
31739
+ };
31740
+ const handleIntersection = entries => {
31741
+ const mostVisible = entries.reduce((prev, current) => {
31742
+ return current.intersectionRatio > (prev ? prev.intersectionRatio : 0) ? current : prev;
31743
+ }, null);
31744
+ if (mostVisible && mostVisible.isIntersecting) {
31745
+ const sectionKey = mostVisible.target.getAttribute("data-section");
31746
+ const stepIndex = timelineConfig.findIndex(c => c.sectionId === sectionKey);
31747
+ if (stepIndex !== -1) {
31748
+ setCurrentStep(stepIndex + 1);
31749
+ }
31750
+ }
31751
+ };
31752
+ const observer = new IntersectionObserver(handleIntersection, observerOptions);
31753
+ Object.values(sectionRefs).forEach(ref => {
31754
+ if (ref.current) observer.observe(ref.current);
31755
+ });
31756
+ return () => observer.disconnect();
31757
+ }, [previewMode, sectionRefs, timelineConfig]);
31277
31758
  const {
31278
31759
  data: propertyDetails,
31279
31760
  isLoading: isPropertyLoading
@@ -31301,10 +31782,6 @@ const NewApplication = () => {
31301
31782
  const {
31302
31783
  mutate: sewerageUpdateMutation
31303
31784
  } = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE");
31304
- useEffect(() => {
31305
- if (typeof window === "undefined") return;
31306
- window.sessionStorage.setItem(FORM_STORAGE_KEY, JSON.stringify(formValues));
31307
- }, [formValues]);
31308
31785
  useEffect(() => {
31309
31786
  if (!isGovernmentOrganization) {
31310
31787
  setValue("applicant.governmentOrganizationName", "");
@@ -31327,12 +31804,7 @@ const NewApplication = () => {
31327
31804
  clearErrors("useDetails.hospitalBeds");
31328
31805
  }
31329
31806
  }, [isHospitalProperty, setValue, clearErrors]);
31330
- useEffect(() => {
31331
- const isValidSubLocality = selectedSubLocality ? subLocalityOptions.some(option => option.code === selectedSubLocality.code) : true;
31332
- if (!isValidSubLocality) {
31333
- setValue("propertyAddress.subLocality", null);
31334
- }
31335
- }, [selectedLocality === null || selectedLocality === void 0 ? void 0 : selectedLocality.code, selectedSubLocality === null || selectedSubLocality === void 0 ? void 0 : selectedSubLocality.code, setValue]);
31807
+ useEffect(() => {}, [selectedLocality === null || selectedLocality === void 0 ? void 0 : selectedLocality.code, setValue]);
31336
31808
  const closeToast = () => setShowToast(null);
31337
31809
  const closeToastOfError = () => setShowToast(null);
31338
31810
  const toggleSection = sectionKey => {
@@ -31342,11 +31814,6 @@ const NewApplication = () => {
31342
31814
  }));
31343
31815
  };
31344
31816
  const getFieldError = fieldName => resolveNestedValue(errors, fieldName);
31345
- const refreshCaptcha = () => {
31346
- setGeneratedCaptcha(generateCaptcha());
31347
- setValue("declaration.captcha", "");
31348
- clearErrors("declaration.captcha");
31349
- };
31350
31817
  const uploadFile = async (event, fieldName, onChange) => {
31351
31818
  var _event$target, _event$target$files;
31352
31819
  const file = event === null || event === void 0 ? void 0 : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : (_event$target$files = _event$target.files) === null || _event$target$files === void 0 ? void 0 : _event$target$files[0];
@@ -31360,7 +31827,7 @@ const NewApplication = () => {
31360
31827
  }));
31361
31828
  clearErrors(fieldName);
31362
31829
  try {
31363
- var _response$data, _response$data$files, _response$data$files$;
31830
+ var _response$data4, _response$data4$files, _response$data4$files2;
31364
31831
  if (file.size > MAX_FILE_SIZE) {
31365
31832
  throw new Error("File size should be 5 MB or less.");
31366
31833
  }
@@ -31368,7 +31835,7 @@ const NewApplication = () => {
31368
31835
  throw new Error("Only PDF, PNG, JPG and JPEG files are supported.");
31369
31836
  }
31370
31837
  const response = await Digit.UploadServices.Filestorage("WS", file, stateId);
31371
- const fileStoreId = response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : (_response$data$files$ = _response$data$files[0]) === null || _response$data$files$ === void 0 ? void 0 : _response$data$files$.fileStoreId;
31838
+ const fileStoreId = response === null || response === void 0 ? void 0 : (_response$data4 = response.data) === null || _response$data4 === void 0 ? void 0 : (_response$data4$files = _response$data4.files) === null || _response$data4$files === void 0 ? void 0 : (_response$data4$files2 = _response$data4$files[0]) === null || _response$data4$files2 === void 0 ? void 0 : _response$data4$files2.fileStoreId;
31372
31839
  if (!fileStoreId) {
31373
31840
  throw new Error("File upload failed. Please try again.");
31374
31841
  }
@@ -31408,22 +31875,6 @@ const NewApplication = () => {
31408
31875
  });
31409
31876
  }
31410
31877
  };
31411
- const validateCaptcha = data => {
31412
- var _data$declaration, _data$declaration$cap, _data$declaration$cap2;
31413
- if ((data === null || data === void 0 ? void 0 : (_data$declaration = data.declaration) === null || _data$declaration === void 0 ? void 0 : (_data$declaration$cap = _data$declaration.captcha) === null || _data$declaration$cap === void 0 ? void 0 : (_data$declaration$cap2 = _data$declaration$cap.trim()) === null || _data$declaration$cap2 === void 0 ? void 0 : _data$declaration$cap2.toUpperCase()) !== generatedCaptcha) {
31414
- setError("declaration.captcha", {
31415
- type: "manual",
31416
- message: "Captcha does not match."
31417
- });
31418
- setShowToast({
31419
- warning: true,
31420
- message: "Captcha does not match."
31421
- });
31422
- return false;
31423
- }
31424
- clearErrors("declaration.captcha");
31425
- return true;
31426
- };
31427
31878
  const onPreview = data => {
31428
31879
  if (hasPendingUpload) {
31429
31880
  setShowToast({
@@ -31432,7 +31883,6 @@ const NewApplication = () => {
31432
31883
  });
31433
31884
  return;
31434
31885
  }
31435
- if (!validateCaptcha(data)) return;
31436
31886
  setPreviewMode(true);
31437
31887
  scrollToTop();
31438
31888
  };
@@ -31445,7 +31895,6 @@ const NewApplication = () => {
31445
31895
  });
31446
31896
  return;
31447
31897
  }
31448
- if (!validateCaptcha(data)) return;
31449
31898
  if (!(propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop = propertyDetails.Properties) !== null && _propertyDetails$Prop !== void 0 && _propertyDetails$Prop[0])) {
31450
31899
  setShowToast({
31451
31900
  key: "error",
@@ -31670,10 +32119,25 @@ const NewApplication = () => {
31670
32119
  setPreviewMode(false);
31671
32120
  scrollToTop();
31672
32121
  };
32122
+ const handleSectionEdit = sectionKey => {
32123
+ setPreviewMode(false);
32124
+ setTimeout(() => {
32125
+ var _sectionRefs$sectionK;
32126
+ const element = (_sectionRefs$sectionK = sectionRefs[sectionKey]) === null || _sectionRefs$sectionK === void 0 ? void 0 : _sectionRefs$sectionK.current;
32127
+ if (element) {
32128
+ const headerOffset = 100;
32129
+ const elementPosition = element.getBoundingClientRect().top;
32130
+ const offsetPosition = elementPosition + window.pageYOffset - headerOffset;
32131
+ window.scrollTo({
32132
+ top: offsetPosition,
32133
+ behavior: "smooth"
32134
+ });
32135
+ }
32136
+ }, 100);
32137
+ };
31673
32138
  const onReset = () => {
31674
32139
  reset(DEFAULT_FORM_VALUES);
31675
32140
  setPreviewMode(false);
31676
- setGeneratedCaptcha(generateCaptcha());
31677
32141
  setCollapsedSections(DEFAULT_SECTION_STATE);
31678
32142
  setUploadingFields({});
31679
32143
  setShowToast(null);
@@ -31710,74 +32174,82 @@ const NewApplication = () => {
31710
32174
  .ws-new-application-collapsible .collapsible-card-tab-content {
31711
32175
  padding: 0;
31712
32176
  }
31713
- `), /*#__PURE__*/React.createElement(Header, null, t("New Water / Sewerage Application")), /*#__PURE__*/React.createElement("div", {
32177
+
32178
+ .avatar-upload-container {
32179
+ display: flex;
32180
+ flex-direction: column;
32181
+ align-items: center;
32182
+ justify-content: center;
32183
+ grid-column: 1 / -1;
32184
+ }
32185
+
32186
+ .avatar-wrapper {
32187
+ position: relative;
32188
+ width: 120px;
32189
+ height: 120px;
32190
+ }
32191
+
32192
+ .avatar-circle {
32193
+ width: 100%;
32194
+ height: 100%;
32195
+ border-radius: 50%;
32196
+ border: 2px solid #E5E7EB;
32197
+ overflow: hidden;
32198
+ background-color: #F3F4F6;
32199
+ display: flex;
32200
+ justify-content: center;
32201
+ align-items: center;
32202
+ cursor: pointer;
32203
+ transition: all 0.2s ease;
32204
+ }
32205
+
32206
+ .avatar-circle:hover {
32207
+ border-color: #0B4B66;
32208
+ opacity: 0.9;
32209
+ }
32210
+
32211
+ .avatar-circle img {
32212
+ width: 100%;
32213
+ height: 100%;
32214
+ object-fit: cover;
32215
+ }
32216
+
32217
+ .avatar-placeholder {
32218
+ display: flex;
32219
+ justify-content: center;
32220
+ align-items: center;
32221
+ }
32222
+
32223
+ .avatar-edit-icon {
32224
+ position: absolute;
32225
+ bottom: 4px;
32226
+ right: 4px;
32227
+ background: white;
32228
+ width: 36px;
32229
+ height: 36px;
32230
+ border-radius: 50%;
32231
+ display: flex;
32232
+ justify-content: center;
32233
+ align-items: center;
32234
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
32235
+ border: 1px solid #E5E7EB;
32236
+ cursor: pointer;
32237
+ transition: all 0.2s ease;
32238
+ }
32239
+
32240
+ .avatar-edit-icon:hover {
32241
+ transform: scale(1.1);
32242
+ background-color: #F9FAFB;
32243
+ }
32244
+ `), /*#__PURE__*/React.createElement("div", {
31714
32245
  style: {
31715
32246
  display: "flex",
31716
32247
  alignItems: "flex-start",
31717
- gap: "24px"
32248
+ gap: "24px",
32249
+ marginBottom: "80px"
31718
32250
  }
31719
- }, /*#__PURE__*/React.createElement(VerticalTimeline, {
31720
- config: [{
31721
- route: "application-selection",
31722
- timeLine: [{
31723
- actions: "Application Selection",
31724
- currentStep: 1
31725
- }]
31726
- }, {
31727
- route: "applicant-details",
31728
- timeLine: [{
31729
- actions: "Details of Applicant",
31730
- currentStep: 2
31731
- }]
31732
- }, {
31733
- route: "contact-details",
31734
- timeLine: [{
31735
- actions: "Contact Details",
31736
- currentStep: 3
31737
- }]
31738
- }, {
31739
- route: "djb-employee",
31740
- timeLine: [{
31741
- actions: "For DJB Employee",
31742
- currentStep: 4
31743
- }]
31744
- }, {
31745
- route: "property-address",
31746
- timeLine: [{
31747
- actions: "Property Address",
31748
- currentStep: 5
31749
- }]
31750
- }, {
31751
- route: "use-details",
31752
- timeLine: [{
31753
- actions: "Property & Connection Use Details",
31754
- currentStep: 6
31755
- }]
31756
- }, {
31757
- route: "bank-details",
31758
- timeLine: [{
31759
- actions: "Bank Details",
31760
- currentStep: 7
31761
- }]
31762
- }, {
31763
- route: "rain-water-harvesting",
31764
- timeLine: [{
31765
- actions: "Rain Water Harvesting",
31766
- currentStep: 8
31767
- }]
31768
- }, {
31769
- route: "documents",
31770
- timeLine: [{
31771
- actions: "Documents to be Attached",
31772
- currentStep: 9
31773
- }]
31774
- }, {
31775
- route: "declaration",
31776
- timeLine: [{
31777
- actions: "Declaration / Undertaking",
31778
- currentStep: 10
31779
- }]
31780
- }],
32251
+ }, !previewMode && /*#__PURE__*/React.createElement(VerticalTimeline, {
32252
+ config: timelineConfig,
31781
32253
  currentActiveIndex: currentStep - 1,
31782
32254
  showFinalStep: false
31783
32255
  }), /*#__PURE__*/React.createElement("div", {
@@ -31786,11 +32258,16 @@ const NewApplication = () => {
31786
32258
  overflowY: "auto",
31787
32259
  minWidth: 0
31788
32260
  }
32261
+ }, /*#__PURE__*/React.createElement("div", {
32262
+ style: {
32263
+ display: previewMode ? "none" : "block"
32264
+ }
31789
32265
  }, /*#__PURE__*/React.createElement(SectionCard, {
31790
32266
  isOpen: collapsedSections.application,
31791
32267
  onToggle: toggleSection,
31792
32268
  sectionKey: "application",
31793
- title: "Application Selection"
32269
+ title: "Application Selection",
32270
+ sectionRef: sectionRefs.application
31794
32271
  }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
31795
32272
  className: "card-label-smaller"
31796
32273
  }, "ZRO Location"), /*#__PURE__*/React.createElement("div", {
@@ -31805,11 +32282,12 @@ const NewApplication = () => {
31805
32282
  isMandatory: true,
31806
32283
  render: props => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Dropdown, {
31807
32284
  className: "form-field",
31808
- selected: getValues("gender"),
32285
+ selected: props.value,
31809
32286
  disable: false,
31810
32287
  option: menu,
31811
32288
  errorStyle: !!getFieldError("zro"),
31812
32289
  select: e => {
32290
+ props.onChange(e);
31813
32291
  setZro(prev => ({
31814
32292
  ...prev,
31815
32293
  value: e
@@ -31821,71 +32299,219 @@ const NewApplication = () => {
31821
32299
  }))
31822
32300
  }))), localFormState && zro.error && /*#__PURE__*/React.createElement(CardLabelError, null, zro.error), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
31823
32301
  className: "card-label-smaller"
31824
- }, "Type of Request"), /*#__PURE__*/React.createElement("div", {
32302
+ }, "Service Type"), /*#__PURE__*/React.createElement("div", {
31825
32303
  className: "field"
31826
32304
  }, /*#__PURE__*/React.createElement(Controller, {
31827
32305
  control: control,
31828
- name: "zro",
31829
- defaultValue: zro,
32306
+ name: "applicationSelection.serviceType",
31830
32307
  rules: {
31831
32308
  required: t("REQUIRED_FIELD")
31832
32309
  },
31833
32310
  isMandatory: true,
31834
- render: props => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Dropdown, {
32311
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
31835
32312
  className: "form-field",
31836
- selected: getValues("gender"),
32313
+ selected: props.value,
31837
32314
  disable: false,
31838
- option: TYPE_OF_REQUEST_OPTIONS,
31839
- errorStyle: !!getFieldError("zro"),
31840
- select: e => {
31841
- setZro(prev => ({
31842
- ...prev,
31843
- value: e
31844
- }));
31845
- },
32315
+ option: dropdownData.serviceTypes,
32316
+ errorStyle: !!getFieldError("applicationSelection.serviceType"),
32317
+ select: props.onChange,
31846
32318
  optionKey: "name",
31847
32319
  onBlur: props.onBlur,
31848
32320
  t: t
31849
- }))
31850
- }))), localFormState && zro.error && /*#__PURE__*/React.createElement(CardLabelError, null, zro.error), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32321
+ })
32322
+ }))), getFieldError("applicationSelection.serviceType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError = getFieldError("applicationSelection.serviceType")) === null || _getFieldError === void 0 ? void 0 : _getFieldError.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
31851
32323
  className: "card-label-smaller"
31852
- }, "Connection Type"), /*#__PURE__*/React.createElement("div", {
32324
+ }, "Applicant Type"), /*#__PURE__*/React.createElement("div", {
31853
32325
  className: "field"
31854
32326
  }, /*#__PURE__*/React.createElement(Controller, {
31855
32327
  control: control,
31856
- name: "zro",
31857
- defaultValue: zro,
32328
+ name: "applicationSelection.applicantType",
31858
32329
  rules: {
31859
32330
  required: t("REQUIRED_FIELD")
31860
32331
  },
31861
32332
  isMandatory: true,
31862
- render: props => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Dropdown, {
32333
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
31863
32334
  className: "form-field",
31864
- selected: getValues("gender"),
32335
+ selected: props.value,
31865
32336
  disable: false,
31866
- option: CONNECTION_TYPE_OPTIONS,
31867
- errorStyle: !!getFieldError("zro"),
31868
- select: e => {
31869
- setZro(prev => ({
31870
- ...prev,
31871
- value: e
31872
- }));
31873
- },
32337
+ option: dropdownData.applicantTypes,
32338
+ errorStyle: !!getFieldError("applicationSelection.applicantType"),
32339
+ select: props.onChange,
31874
32340
  optionKey: "name",
31875
32341
  onBlur: props.onBlur,
31876
32342
  t: t
31877
- }))
31878
- }))), localFormState && zro.error && /*#__PURE__*/React.createElement(CardLabelError, null, zro.error)), /*#__PURE__*/React.createElement("div", {
31879
- style: {
31880
- display: previewMode ? "none" : "block"
32343
+ })
32344
+ }))), getFieldError("applicationSelection.applicantType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError2 = getFieldError("applicationSelection.applicantType")) === null || _getFieldError2 === void 0 ? void 0 : _getFieldError2.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32345
+ className: "card-label-smaller"
32346
+ }, "Connection Type"), /*#__PURE__*/React.createElement("div", {
32347
+ className: "field"
32348
+ }, /*#__PURE__*/React.createElement(Controller, {
32349
+ control: control,
32350
+ name: "applicationSelection.connectionType",
32351
+ rules: {
32352
+ required: t("REQUIRED_FIELD")
32353
+ },
32354
+ isMandatory: true,
32355
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
32356
+ className: "form-field",
32357
+ selected: props.value,
32358
+ disable: false,
32359
+ option: dropdownData.connectionTypes,
32360
+ errorStyle: !!getFieldError("applicationSelection.connectionType"),
32361
+ select: props.onChange,
32362
+ optionKey: "name",
32363
+ onBlur: props.onBlur,
32364
+ t: t
32365
+ })
32366
+ }))), getFieldError("applicationSelection.connectionType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError3 = getFieldError("applicationSelection.connectionType")) === null || _getFieldError3 === void 0 ? void 0 : _getFieldError3.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32367
+ className: "card-label-smaller"
32368
+ }, "Category Type"), /*#__PURE__*/React.createElement("div", {
32369
+ className: "field"
32370
+ }, /*#__PURE__*/React.createElement(Controller, {
32371
+ control: control,
32372
+ name: "applicationSelection.categoryType",
32373
+ rules: {
32374
+ required: t("REQUIRED_FIELD")
32375
+ },
32376
+ isMandatory: true,
32377
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
32378
+ className: "form-field",
32379
+ selected: props.value,
32380
+ disable: false,
32381
+ option: dropdownData.categoryTypes,
32382
+ errorStyle: !!getFieldError("applicationSelection.categoryType"),
32383
+ select: props.onChange,
32384
+ optionKey: "name",
32385
+ onBlur: props.onBlur,
32386
+ t: t
32387
+ })
32388
+ }))), getFieldError("applicationSelection.categoryType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError4 = getFieldError("applicationSelection.categoryType")) === null || _getFieldError4 === void 0 ? void 0 : _getFieldError4.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32389
+ className: "card-label-smaller"
32390
+ }, "Sub Category"), /*#__PURE__*/React.createElement("div", {
32391
+ className: "field"
32392
+ }, /*#__PURE__*/React.createElement(Controller, {
32393
+ control: control,
32394
+ name: "applicationSelection.subCategory",
32395
+ rules: {
32396
+ required: t("REQUIRED_FIELD")
32397
+ },
32398
+ isMandatory: true,
32399
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
32400
+ className: "form-field",
32401
+ selected: props.value,
32402
+ disable: false,
32403
+ option: dropdownData.subCategories,
32404
+ errorStyle: !!getFieldError("applicationSelection.subCategory"),
32405
+ select: props.onChange,
32406
+ optionKey: "name",
32407
+ onBlur: props.onBlur,
32408
+ t: t
32409
+ })
32410
+ }))), getFieldError("applicationSelection.subCategory") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError5 = getFieldError("applicationSelection.subCategory")) === null || _getFieldError5 === void 0 ? void 0 : _getFieldError5.message), subCategoryIsCommercial && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32411
+ className: "card-label-smaller"
32412
+ }, "Commercial Type"), /*#__PURE__*/React.createElement("div", {
32413
+ className: "field"
32414
+ }, /*#__PURE__*/React.createElement(Controller, {
32415
+ control: control,
32416
+ name: "applicationSelection.commercialType",
32417
+ rules: {
32418
+ required: t("REQUIRED_FIELD")
32419
+ },
32420
+ isMandatory: true,
32421
+ render: props => /*#__PURE__*/React.createElement(RadioButtons, {
32422
+ onSelect: props.onChange,
32423
+ selectedOption: props.value,
32424
+ options: [{
32425
+ code: "GOV",
32426
+ name: "Gov"
32427
+ }, {
32428
+ code: "NON_GOV",
32429
+ name: "Non-Gov"
32430
+ }],
32431
+ optionsKey: "name",
32432
+ t: t
32433
+ })
32434
+ }))), subCategoryIsCommercial && !!selectedCommercialType && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
32435
+ style: {
32436
+ gridColumn: "span 2",
32437
+ marginTop: "24px",
32438
+ marginBottom: "16px"
32439
+ }
32440
+ }, /*#__PURE__*/React.createElement(CardLabel, {
32441
+ style: {
32442
+ color: "#3B82F6",
32443
+ fontWeight: "700",
32444
+ fontSize: "18px",
32445
+ marginBottom: "0"
32446
+ }
32447
+ }, "Organization Details")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32448
+ className: "card-label-smaller"
32449
+ }, "Organization Name"), /*#__PURE__*/React.createElement("div", {
32450
+ className: "field"
32451
+ }, /*#__PURE__*/React.createElement(TextInput, {
32452
+ name: "applicationSelection.govtOrganization.organizationName",
32453
+ inputRef: register({
32454
+ required: !!selectedCommercialType ? "Organization Name is required" : false
32455
+ }),
32456
+ errorStyle: !!getFieldError("applicationSelection.govtOrganization.organizationName")
32457
+ }))), getFieldError("applicationSelection.govtOrganization.organizationName") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError6 = getFieldError("applicationSelection.govtOrganization.organizationName")) === null || _getFieldError6 === void 0 ? void 0 : _getFieldError6.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32458
+ className: "card-label-smaller"
32459
+ }, "Nature of Work"), /*#__PURE__*/React.createElement("div", {
32460
+ className: "field"
32461
+ }, /*#__PURE__*/React.createElement(TextInput, {
32462
+ name: "applicationSelection.govtOrganization.natureOfWork",
32463
+ inputRef: register({
32464
+ required: !!selectedCommercialType ? "Nature of Work is required" : false
32465
+ }),
32466
+ errorStyle: !!getFieldError("applicationSelection.govtOrganization.natureOfWork")
32467
+ }))), getFieldError("applicationSelection.govtOrganization.natureOfWork") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError7 = getFieldError("applicationSelection.govtOrganization.natureOfWork")) === null || _getFieldError7 === void 0 ? void 0 : _getFieldError7.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32468
+ className: "card-label-smaller"
32469
+ }, "Upload Document"), /*#__PURE__*/React.createElement("div", {
32470
+ className: "field"
32471
+ }, /*#__PURE__*/React.createElement(Controller, {
32472
+ control: control,
32473
+ name: "applicationSelection.govtOrganization.organizationDocument",
32474
+ rules: {
32475
+ required: !!selectedCommercialType ? "Document is required" : false
32476
+ },
32477
+ render: props => /*#__PURE__*/React.createElement(FileUploadField, {
32478
+ error: getFieldError("applicationSelection.govtOrganization.organizationDocument"),
32479
+ id: "govt-org-doc",
32480
+ isUploading: !!uploadingFields["applicationSelection.govtOrganization.organizationDocument"],
32481
+ onDelete: () => clearUploadedFile("applicationSelection.govtOrganization.organizationDocument", props.onChange),
32482
+ onUpload: event => uploadFile(event, "applicationSelection.govtOrganization.organizationDocument", props.onChange),
32483
+ value: props.value
32484
+ })
32485
+ })))), subCategoryIsCommercial && getFieldError("applicationSelection.commercialType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError8 = getFieldError("applicationSelection.commercialType")) === null || _getFieldError8 === void 0 ? void 0 : _getFieldError8.message))), /*#__PURE__*/React.createElement("div", {
32486
+ style: {
32487
+ display: previewMode ? "none" : "block"
31881
32488
  }
31882
32489
  }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionCard, {
31883
32490
  description: "Applicant name, organization details, and supporting ID proof.",
31884
32491
  isOpen: collapsedSections.applicant,
31885
32492
  onToggle: toggleSection,
31886
32493
  sectionKey: "applicant",
31887
- title: "Details of Applicant"
31888
- }, /*#__PURE__*/React.createElement(FieldBlock, {
32494
+ title: "Details of Applicant",
32495
+ sectionRef: sectionRefs.applicant
32496
+ }, /*#__PURE__*/React.createElement(Controller, {
32497
+ control: control,
32498
+ name: "applicant.UploadPicture",
32499
+ rules: {
32500
+ validate: value => !!value || "Applicant Picture is required."
32501
+ },
32502
+ render: props => {
32503
+ var _getFieldError9;
32504
+ return /*#__PURE__*/React.createElement(ProfileImageUpload, {
32505
+ error: (_getFieldError9 = getFieldError("applicant.UploadPicture")) === null || _getFieldError9 === void 0 ? void 0 : _getFieldError9.message,
32506
+ isUploading: !!uploadingFields["applicant.UploadPicture"],
32507
+ label: "Upload Picture",
32508
+ onUpload: event => uploadFile(event, "applicant.UploadPicture", props.onChange),
32509
+ required: true,
32510
+ t: t,
32511
+ value: props.value
32512
+ });
32513
+ }
32514
+ }), /*#__PURE__*/React.createElement(FieldBlock, {
31889
32515
  error: getFieldError("applicant.firstName"),
31890
32516
  label: "First Name",
31891
32517
  required: true
@@ -31926,64 +32552,43 @@ const NewApplication = () => {
31926
32552
  }),
31927
32553
  name: "applicant.lastName"
31928
32554
  })), /*#__PURE__*/React.createElement(FieldBlock, {
31929
- error: getFieldError("applicant.fatherOrHusbandName"),
31930
- label: "Father / Husband Name",
32555
+ error: getFieldError("useDetails.gender"),
32556
+ label: "Gender",
32557
+ required: true
32558
+ }, /*#__PURE__*/React.createElement(Controller, {
32559
+ control: control,
32560
+ name: "useDetails.gender",
32561
+ rules: {
32562
+ required: "Gender is required."
32563
+ },
32564
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
32565
+ option: [{
32566
+ name: "Male",
32567
+ code: "MALE"
32568
+ }, {
32569
+ name: "Female",
32570
+ code: "FEMALE"
32571
+ }],
32572
+ optionKey: "name",
32573
+ selected: props.value,
32574
+ select: props.onChange,
32575
+ t: t
32576
+ })
32577
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
32578
+ error: getFieldError("applicant.ParentorSpouse"),
32579
+ label: "Parent/ spouse",
31931
32580
  required: true
31932
32581
  }, /*#__PURE__*/React.createElement(TextInput, {
31933
- errorStyle: !!getFieldError("applicant.fatherOrHusbandName"),
32582
+ errorStyle: !!getFieldError("applicant.ParentorSpouse"),
31934
32583
  inputRef: register({
31935
32584
  pattern: {
31936
32585
  value: NAME_PATTERN,
31937
32586
  message: "Use letters only."
31938
32587
  },
31939
- required: "Father / Husband Name is required."
32588
+ required: "Parent/ spouse Name is required."
31940
32589
  }),
31941
- name: "applicant.fatherOrHusbandName"
32590
+ name: "applicant.ParentorSpouse"
31942
32591
  })), /*#__PURE__*/React.createElement(FieldBlock, {
31943
- label: "Government Organization"
31944
- }, /*#__PURE__*/React.createElement(Controller, {
31945
- control: control,
31946
- name: "applicant.isGovernmentOrganization",
31947
- render: props => /*#__PURE__*/React.createElement(CheckBox, {
31948
- checked: !!props.value,
31949
- label: "Applicant belongs to a Government Organization",
31950
- onChange: event => props.onChange(event.target.checked)
31951
- })
31952
- })), isGovernmentOrganization ? /*#__PURE__*/React.createElement(FieldBlock, {
31953
- error: getFieldError("applicant.governmentOrganizationName"),
31954
- isFullWidth: true,
31955
- label: "Name of Government Organization",
31956
- required: true
31957
- }, /*#__PURE__*/React.createElement(TextInput, {
31958
- errorStyle: !!getFieldError("applicant.governmentOrganizationName"),
31959
- inputRef: register({
31960
- required: isGovernmentOrganization ? "Government Organization Name is required." : false
31961
- }),
31962
- name: "applicant.governmentOrganizationName"
31963
- })) : null, /*#__PURE__*/React.createElement(Controller, {
31964
- control: control,
31965
- name: "applicant.applicantIdProofFile",
31966
- rules: {
31967
- validate: value => !!value || "Applicant ID Proof is required."
31968
- },
31969
- render: props => /*#__PURE__*/React.createElement(FileUploadField, {
31970
- error: getFieldError("applicant.applicantIdProofFile"),
31971
- helperText: "Max size 5 MB. Allowed types: PDF, PNG, JPG, JPEG.",
31972
- id: "applicant-id-proof",
31973
- isUploading: !!uploadingFields["applicant.applicantIdProofFile"],
31974
- label: "Upload ID Proof",
31975
- onDelete: () => clearUploadedFile("applicant.applicantIdProofFile", props.onChange),
31976
- onUpload: event => uploadFile(event, "applicant.applicantIdProofFile", props.onChange),
31977
- required: true,
31978
- value: props.value
31979
- })
31980
- })), /*#__PURE__*/React.createElement(SectionCard, {
31981
- description: "Basic communication details for the application.",
31982
- isOpen: collapsedSections.contact,
31983
- onToggle: toggleSection,
31984
- sectionKey: "contact",
31985
- title: "Contact Details"
31986
- }, /*#__PURE__*/React.createElement(FieldBlock, {
31987
32592
  error: getFieldError("contact.emailId"),
31988
32593
  label: "Email ID",
31989
32594
  required: true
@@ -32013,23 +32618,25 @@ const NewApplication = () => {
32013
32618
  maxlength: 10,
32014
32619
  name: "contact.mobileNumber"
32015
32620
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32016
- error: getFieldError("contact.officeNumber"),
32017
- label: "Office No."
32621
+ error: getFieldError("contact.whatsAppNumber"),
32622
+ label: "WhatsApp Number"
32018
32623
  }, /*#__PURE__*/React.createElement(TextInput, {
32019
- errorStyle: !!getFieldError("contact.officeNumber"),
32624
+ errorStyle: !!getFieldError("contact.whatsAppNumber"),
32020
32625
  inputRef: register({
32021
32626
  pattern: {
32022
- value: OFFICE_PATTERN,
32023
- message: "Enter a valid office number."
32627
+ value: MOBILE_PATTERN,
32628
+ message: "Enter a valid 10-digit WhatsApp number."
32024
32629
  }
32025
32630
  }),
32026
- name: "contact.officeNumber"
32631
+ maxlength: 10,
32632
+ name: "contact.whatsAppNumber"
32027
32633
  }))), /*#__PURE__*/React.createElement(SectionCard, {
32028
32634
  description: "Enable this section only when the applicant is a DJB employee.",
32029
32635
  isOpen: collapsedSections.employee,
32030
32636
  onToggle: toggleSection,
32031
- sectionKey: "employee",
32032
- title: "For DJB Employee"
32637
+ sectionKey: "djbEmployee",
32638
+ title: "For DJB Employee",
32639
+ sectionRef: sectionRefs.djbEmployee
32033
32640
  }, /*#__PURE__*/React.createElement(FieldBlock, {
32034
32641
  label: "DJB Employee"
32035
32642
  }, /*#__PURE__*/React.createElement(Controller, {
@@ -32040,7 +32647,7 @@ const NewApplication = () => {
32040
32647
  label: "Applicant is a DJB Employee",
32041
32648
  onChange: event => props.onChange(event.target.checked)
32042
32649
  })
32043
- })), /*#__PURE__*/React.createElement(FieldBlock, {
32650
+ })), isDjbEmployee && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FieldBlock, {
32044
32651
  error: getFieldError("djbEmployee.employeeId"),
32045
32652
  label: "Employee ID",
32046
32653
  required: isDjbEmployee
@@ -32078,123 +32685,165 @@ const NewApplication = () => {
32078
32685
  style: {
32079
32686
  minHeight: "96px"
32080
32687
  }
32081
- }))), /*#__PURE__*/React.createElement(SectionCard, {
32688
+ })))), /*#__PURE__*/React.createElement(SectionCard, {
32082
32689
  description: "Property location and administrative boundary details.",
32083
32690
  isOpen: collapsedSections.address,
32084
32691
  onToggle: toggleSection,
32085
- sectionKey: "address",
32086
- title: "Property Address"
32692
+ sectionKey: "propertyAddress",
32693
+ title: "Property Address",
32694
+ sectionRef: sectionRefs.propertyAddress
32087
32695
  }, /*#__PURE__*/React.createElement(FieldBlock, {
32088
- error: getFieldError("propertyAddress.address"),
32089
- isFullWidth: true,
32090
- label: "Address",
32091
- required: true
32092
- }, /*#__PURE__*/React.createElement(TextArea, {
32093
- className: getFieldError("propertyAddress.address") ? "employee-card-input-error" : "",
32094
- inputRef: register({
32095
- required: "Address is required."
32096
- }),
32097
- name: "propertyAddress.address",
32098
- style: {
32099
- minHeight: "96px"
32100
- }
32101
- })), /*#__PURE__*/React.createElement(FieldBlock, {
32102
- error: getFieldError("propertyAddress.landmark"),
32103
- label: "Landmark"
32104
- }, /*#__PURE__*/React.createElement(TextInput, {
32105
- errorStyle: !!getFieldError("propertyAddress.landmark"),
32106
- inputRef: register(),
32107
- name: "propertyAddress.landmark"
32108
- })), /*#__PURE__*/React.createElement(FieldBlock, {
32109
- error: getFieldError("propertyAddress.pinCode"),
32110
- label: "Pin Code",
32111
- required: true
32112
- }, /*#__PURE__*/React.createElement(TextInput, {
32113
- errorStyle: !!getFieldError("propertyAddress.pinCode"),
32114
- inputRef: register({
32115
- pattern: {
32116
- value: PINCODE_PATTERN,
32117
- message: "Enter a valid 6-digit pin code."
32118
- },
32119
- required: "Pin Code is required."
32120
- }),
32121
- maxlength: 6,
32122
- name: "propertyAddress.pinCode"
32123
- })), /*#__PURE__*/React.createElement(FieldBlock, {
32124
- error: getFieldError("propertyAddress.locality"),
32125
- label: "Locality",
32126
- required: true
32696
+ error: getFieldError("propertyAddress.city"),
32697
+ label: "City"
32127
32698
  }, /*#__PURE__*/React.createElement(Controller, {
32128
32699
  control: control,
32129
- name: "propertyAddress.locality",
32130
- rules: {
32131
- required: "Locality is required."
32132
- },
32700
+ name: "propertyAddress.city",
32133
32701
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32134
- option: LOCALITY_OPTIONS,
32135
- optionKey: "name",
32136
- selected: props.value,
32137
- select: props.onChange,
32138
- t: t
32702
+ className: "form-field",
32703
+ selected: props.value || city,
32704
+ select: val => {
32705
+ setCity(val);
32706
+ props.onChange(val);
32707
+ },
32708
+ option: allCities,
32709
+ optionCardStyles: {
32710
+ overflowY: "auto",
32711
+ maxHeight: "300px"
32712
+ },
32713
+ optionKey: "i18nKey",
32714
+ t: t,
32715
+ style: {
32716
+ width: "100%"
32717
+ },
32718
+ placeholder: "Select"
32139
32719
  })
32140
32720
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32141
- error: getFieldError("propertyAddress.subLocality"),
32142
- label: "Sub Locality",
32721
+ error: getFieldError("propertyAddress.pinCode"),
32722
+ label: "Pin Code",
32143
32723
  required: true
32144
32724
  }, /*#__PURE__*/React.createElement(Controller, {
32145
32725
  control: control,
32146
- name: "propertyAddress.subLocality",
32726
+ name: "propertyAddress.pinCode",
32147
32727
  rules: {
32148
- required: "Sub Locality is required."
32728
+ required: "Pin Code is required."
32149
32729
  },
32150
32730
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32151
- disable: !selectedLocality,
32152
- option: subLocalityOptions,
32153
- optionKey: "name",
32154
- selected: props.value,
32155
- select: props.onChange,
32731
+ option: fetchedPincodes,
32732
+ optionKey: "i18nKey",
32733
+ selected: (fetchedPincodes === null || fetchedPincodes === void 0 ? void 0 : fetchedPincodes.find(p => p.code === props.value)) || (props.value ? {
32734
+ code: props.value,
32735
+ name: props.value,
32736
+ i18nKey: props.value
32737
+ } : null),
32738
+ select: val => {
32739
+ const newPin = val === null || val === void 0 ? void 0 : val.code;
32740
+ if (newPin !== props.value) {
32741
+ setValue("propertyAddress.locality", null);
32742
+ setValue("propertyAddress.zone", "");
32743
+ setValue("propertyAddress.block", "");
32744
+ setValue("propertyAddress.address", "");
32745
+ }
32746
+ props.onChange(newPin);
32747
+ },
32156
32748
  t: t
32157
32749
  })
32158
32750
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32159
- error: getFieldError("propertyAddress.assembly"),
32160
- label: "Assembly",
32751
+ error: getFieldError("propertyAddress.locality"),
32752
+ label: "Locality",
32161
32753
  required: true
32162
32754
  }, /*#__PURE__*/React.createElement(Controller, {
32163
32755
  control: control,
32164
- name: "propertyAddress.assembly",
32756
+ name: "propertyAddress.locality",
32165
32757
  rules: {
32166
- required: "Assembly is required."
32758
+ required: "Locality is required."
32167
32759
  },
32168
32760
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32169
- option: ASSEMBLY_OPTIONS,
32170
- optionKey: "name",
32761
+ option: filteredLocalities,
32762
+ optionKey: "i18nKey",
32171
32763
  selected: props.value,
32172
- select: props.onChange,
32764
+ select: val => {
32765
+ props.onChange(val);
32766
+ if (val !== null && val !== void 0 && val.zone) setValue("propertyAddress.zone", val.zone);
32767
+ if (val !== null && val !== void 0 && val.ward) setValue("propertyAddress.block", val.ward);
32768
+ if (val !== null && val !== void 0 && val.localname) setValue("propertyAddress.address", val.localname);
32769
+ if (val !== null && val !== void 0 && val.pincode) {
32770
+ const p = Array.isArray(val.pincode) ? val.pincode[0] : val.pincode;
32771
+ if (p) {
32772
+ setValue("propertyAddress.pinCode", p.toString().split(".")[0]);
32773
+ }
32774
+ }
32775
+ },
32173
32776
  t: t
32174
32777
  })
32175
32778
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32176
- error: getFieldError("propertyAddress.ward"),
32177
- label: "Ward",
32178
- required: true
32179
- }, /*#__PURE__*/React.createElement(Controller, {
32180
- control: control,
32181
- name: "propertyAddress.ward",
32182
- rules: {
32183
- required: "Ward is required."
32184
- },
32185
- render: props => /*#__PURE__*/React.createElement(Dropdown, {
32186
- option: WARD_OPTIONS,
32187
- optionKey: "name",
32188
- selected: props.value,
32189
- select: props.onChange,
32190
- t: t
32191
- })
32779
+ error: getFieldError("propertyAddress.state"),
32780
+ label: "State"
32781
+ }, /*#__PURE__*/React.createElement(TextInput, {
32782
+ errorStyle: !!getFieldError("propertyAddress.state"),
32783
+ inputRef: register(),
32784
+ name: "propertyAddress.state"
32785
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
32786
+ error: getFieldError("propertyAddress.district"),
32787
+ label: "District"
32788
+ }, /*#__PURE__*/React.createElement(TextInput, {
32789
+ errorStyle: !!getFieldError("propertyAddress.district"),
32790
+ inputRef: register(),
32791
+ name: "propertyAddress.district"
32792
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
32793
+ error: getFieldError("propertyAddress.street"),
32794
+ label: "Street"
32795
+ }, /*#__PURE__*/React.createElement(TextInput, {
32796
+ errorStyle: !!getFieldError("propertyAddress.street"),
32797
+ inputRef: register(),
32798
+ name: "propertyAddress.street"
32799
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
32800
+ error: getFieldError("propertyAddress.houseNo"),
32801
+ label: "House No"
32802
+ }, /*#__PURE__*/React.createElement(TextInput, {
32803
+ errorStyle: !!getFieldError("propertyAddress.houseNo"),
32804
+ inputRef: register(),
32805
+ name: "propertyAddress.houseNo"
32806
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
32807
+ error: getFieldError("propertyAddress.block"),
32808
+ label: "Block"
32809
+ }, /*#__PURE__*/React.createElement(TextInput, {
32810
+ errorStyle: !!getFieldError("propertyAddress.block"),
32811
+ inputRef: register(),
32812
+ name: "propertyAddress.block"
32813
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
32814
+ error: getFieldError("propertyAddress.zone"),
32815
+ label: "Zone"
32816
+ }, /*#__PURE__*/React.createElement(TextInput, {
32817
+ errorStyle: !!getFieldError("propertyAddress.zone"),
32818
+ inputRef: register(),
32819
+ name: "propertyAddress.zone"
32820
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
32821
+ error: getFieldError("propertyAddress.landmark"),
32822
+ label: "Landmark"
32823
+ }, /*#__PURE__*/React.createElement(TextInput, {
32824
+ errorStyle: !!getFieldError("propertyAddress.landmark"),
32825
+ inputRef: register(),
32826
+ name: "propertyAddress.landmark"
32827
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
32828
+ error: getFieldError("propertyAddress.address"),
32829
+ isFullWidth: true,
32830
+ label: "Address"
32831
+ }, /*#__PURE__*/React.createElement(TextArea, {
32832
+ className: getFieldError("propertyAddress.address") ? "employee-card-input-error" : "",
32833
+ inputRef: register({
32834
+ required: "Address is required."
32835
+ }),
32836
+ name: "propertyAddress.address",
32837
+ style: {
32838
+ minHeight: "96px"
32839
+ }
32192
32840
  }))), /*#__PURE__*/React.createElement(SectionCard, {
32193
32841
  description: "Usage attributes for the property and the requested water connection.",
32194
32842
  isOpen: collapsedSections.usage,
32195
32843
  onToggle: toggleSection,
32196
- sectionKey: "usage",
32197
- title: "Property and Water Connection Use Details"
32844
+ sectionKey: "useDetails",
32845
+ title: "Property and Water Connection Use Details",
32846
+ sectionRef: sectionRefs.useDetails
32198
32847
  }, /*#__PURE__*/React.createElement(FieldBlock, {
32199
32848
  error: getFieldError("useDetails.propertyType"),
32200
32849
  label: "Property Type",
@@ -32206,60 +32855,60 @@ const NewApplication = () => {
32206
32855
  required: "Property Type is required."
32207
32856
  },
32208
32857
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32209
- option: PROPERTY_TYPE_OPTIONS,
32858
+ option: dropdownData.propertyTypes,
32210
32859
  optionKey: "name",
32211
32860
  selected: props.value,
32212
32861
  select: props.onChange,
32213
32862
  t: t
32214
32863
  })
32215
32864
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32216
- error: getFieldError("useDetails.noOfFloors"),
32217
- label: "No. of Floors",
32865
+ error: getFieldError("useDetails.plotArea"),
32866
+ label: "Plot Area (Sq. m.)",
32218
32867
  required: true
32219
32868
  }, /*#__PURE__*/React.createElement(TextInput, {
32220
- errorStyle: !!getFieldError("useDetails.noOfFloors"),
32869
+ errorStyle: !!getFieldError("useDetails.plotArea"),
32221
32870
  inputRef: register({
32222
32871
  pattern: {
32223
- value: NUMBER_PATTERN,
32224
- message: "Enter a valid whole number."
32872
+ value: DECIMAL_PATTERN,
32873
+ message: "Enter a valid numeric value."
32225
32874
  },
32226
- required: "No. of Floors is required."
32875
+ required: "Plot Area is required."
32227
32876
  }),
32228
- name: "useDetails.noOfFloors"
32229
- })), isHospitalProperty ? /*#__PURE__*/React.createElement(FieldBlock, {
32230
- error: getFieldError("useDetails.hospitalBeds"),
32231
- label: "No. of Beds for Hospitals & Nursing Home",
32877
+ name: "useDetails.plotArea"
32878
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
32879
+ error: getFieldError("useDetails.builtUpArea"),
32880
+ label: "Built-up Area (Sq. m.)",
32232
32881
  required: true
32233
32882
  }, /*#__PURE__*/React.createElement(TextInput, {
32234
- errorStyle: !!getFieldError("useDetails.hospitalBeds"),
32883
+ errorStyle: !!getFieldError("useDetails.builtUpArea"),
32235
32884
  inputRef: register({
32236
32885
  pattern: {
32237
- value: NUMBER_PATTERN,
32238
- message: "Enter a valid whole number."
32886
+ value: DECIMAL_PATTERN,
32887
+ message: "Enter a valid numeric value."
32239
32888
  },
32240
- required: isHospitalProperty ? "No. of Beds is required for Hospital / Nursing Home." : false
32889
+ required: "Built Up Area is required."
32241
32890
  }),
32242
- name: "useDetails.hospitalBeds"
32243
- })) : null, /*#__PURE__*/React.createElement(FieldBlock, {
32244
- error: getFieldError("useDetails.plotArea"),
32245
- label: "Plot Area in Sqm",
32891
+ name: "useDetails.builtUpArea"
32892
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
32893
+ error: getFieldError("useDetails.noOfFloors"),
32894
+ label: "Number of Floors",
32246
32895
  required: true
32247
32896
  }, /*#__PURE__*/React.createElement(TextInput, {
32248
- errorStyle: !!getFieldError("useDetails.plotArea"),
32897
+ errorStyle: !!getFieldError("useDetails.noOfFloors"),
32249
32898
  inputRef: register({
32250
32899
  pattern: {
32251
- value: DECIMAL_PATTERN,
32252
- message: "Enter a valid numeric value."
32900
+ value: NUMBER_PATTERN,
32901
+ message: "Enter a valid whole number."
32253
32902
  },
32254
- required: "Plot Area is required."
32903
+ required: "No. of Floors is required."
32255
32904
  }),
32256
- name: "useDetails.plotArea"
32905
+ name: "useDetails.noOfFloors"
32257
32906
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32258
- error: getFieldError("useDetails.builtUpArea"),
32259
- label: "Built Up Area",
32907
+ error: getFieldError("useDetails.NumberofDwellingUnits"),
32908
+ label: "Number of Dwelling Units",
32260
32909
  required: true
32261
32910
  }, /*#__PURE__*/React.createElement(TextInput, {
32262
- errorStyle: !!getFieldError("useDetails.builtUpArea"),
32911
+ errorStyle: !!getFieldError("useDetails.NumberofDwellingUnits"),
32263
32912
  inputRef: register({
32264
32913
  pattern: {
32265
32914
  value: DECIMAL_PATTERN,
@@ -32267,33 +32916,47 @@ const NewApplication = () => {
32267
32916
  },
32268
32917
  required: "Built Up Area is required."
32269
32918
  }),
32270
- name: "useDetails.builtUpArea"
32271
- })), /*#__PURE__*/React.createElement(FieldBlock, {
32272
- error: getFieldError("useDetails.waterConnectionCategory"),
32273
- label: "Water Connection Category",
32919
+ name: "useDetails.NumberofDwellingUnits"
32920
+ })), isHospitalProperty ? /*#__PURE__*/React.createElement(FieldBlock, {
32921
+ error: getFieldError("useDetails.hospitalBeds"),
32922
+ label: "Number of Beds",
32923
+ required: true
32924
+ }, /*#__PURE__*/React.createElement(TextInput, {
32925
+ errorStyle: !!getFieldError("useDetails.hospitalBeds"),
32926
+ inputRef: register({
32927
+ pattern: {
32928
+ value: NUMBER_PATTERN,
32929
+ message: "Enter a valid whole number."
32930
+ },
32931
+ required: isHospitalProperty ? "No. of Beds is required for Hospital / Nursing Home." : false
32932
+ }),
32933
+ name: "useDetails.hospitalBeds"
32934
+ })) : null, /*#__PURE__*/React.createElement(FieldBlock, {
32935
+ error: getFieldError("useDetails.SelectYearofConstruction"),
32936
+ label: "Select Year of Construction",
32274
32937
  required: true
32275
32938
  }, /*#__PURE__*/React.createElement(Controller, {
32276
32939
  control: control,
32277
- name: "useDetails.waterConnectionCategory",
32940
+ name: "useDetails.SelectYearofConstruction",
32278
32941
  rules: {
32279
- required: "Water Connection Category is required."
32942
+ required: "Select Year of Construction is required."
32280
32943
  },
32281
32944
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32282
- option: WATER_CONNECTION_CATEGORY_OPTIONS,
32283
- optionKey: "name",
32945
+ option: yearOptions,
32946
+ optionKey: "value",
32284
32947
  selected: props.value,
32285
32948
  select: props.onChange,
32286
32949
  t: t
32287
32950
  })
32288
32951
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32289
- error: getFieldError("useDetails.waterConnectionUsedBy"),
32290
- label: "Water Connection Used By",
32952
+ error: getFieldError("useDetails.WaterConnectionUsageType"),
32953
+ label: "Water Connection Usage Type",
32291
32954
  required: true
32292
32955
  }, /*#__PURE__*/React.createElement(Controller, {
32293
32956
  control: control,
32294
- name: "useDetails.waterConnectionUsedBy",
32957
+ name: "useDetails.WaterConnectionUsageType",
32295
32958
  rules: {
32296
- required: "Water Connection Used By is required."
32959
+ required: "Water Connection Usage Type is required."
32297
32960
  },
32298
32961
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32299
32962
  option: WATER_CONNECTION_USED_BY_OPTIONS,
@@ -32306,8 +32969,9 @@ const NewApplication = () => {
32306
32969
  description: "Refund or payment-linked bank account details.",
32307
32970
  isOpen: collapsedSections.bank,
32308
32971
  onToggle: toggleSection,
32309
- sectionKey: "bank",
32310
- title: "Bank Details"
32972
+ sectionKey: "bankDetails",
32973
+ title: "Bank Details",
32974
+ sectionRef: sectionRefs.bankDetails
32311
32975
  }, /*#__PURE__*/React.createElement(FieldBlock, {
32312
32976
  error: getFieldError("bankDetails.bankName"),
32313
32977
  label: "Name of the Bank",
@@ -32359,29 +33023,13 @@ const NewApplication = () => {
32359
33023
  required: "Bank Account Number is required."
32360
33024
  }),
32361
33025
  name: "bankDetails.bankAccountNumber"
32362
- }))), /*#__PURE__*/React.createElement(SectionCard, {
32363
- description: "Optional rain water harvesting certificate request.",
32364
- isOpen: collapsedSections.rainWaterHarvesting,
32365
- onToggle: toggleSection,
32366
- sectionKey: "rainWaterHarvesting",
32367
- title: "Rain Water Harvesting"
32368
- }, /*#__PURE__*/React.createElement(FieldBlock, {
32369
- isFullWidth: true,
32370
- label: "Apply for RWH Adequacy Certificate"
32371
- }, /*#__PURE__*/React.createElement(Controller, {
32372
- control: control,
32373
- name: "rainWaterHarvesting.applyForAdequacyCertificate",
32374
- render: props => /*#__PURE__*/React.createElement(CheckBox, {
32375
- checked: !!props.value,
32376
- label: "Apply for RWH Adequacy Certificate",
32377
- onChange: event => props.onChange(event.target.checked)
32378
- })
32379
33026
  }))), /*#__PURE__*/React.createElement(SectionCard, {
32380
33027
  description: "Documents to be attached. Maximum allowed file size is 5 MB.",
32381
33028
  isOpen: collapsedSections.documents,
32382
33029
  onToggle: toggleSection,
32383
33030
  sectionKey: "documents",
32384
- title: "Documents to be Attached"
33031
+ title: "Documents to be Attached",
33032
+ sectionRef: sectionRefs.documents
32385
33033
  }, /*#__PURE__*/React.createElement(FieldBlock, {
32386
33034
  error: getFieldError("documents.proofOfIdentity"),
32387
33035
  label: "Proof of Identity",
@@ -32463,151 +33111,119 @@ const NewApplication = () => {
32463
33111
  onUpload: event => uploadFile(event, "documents.otherDocumentFile", props.onChange),
32464
33112
  value: props.value
32465
33113
  })
32466
- })), /*#__PURE__*/React.createElement(SectionCard, {
32467
- description: "Final undertaking details before preview and submit.",
32468
- isOpen: collapsedSections.declaration,
32469
- onToggle: toggleSection,
32470
- sectionKey: "declaration",
32471
- title: "Declaration / Undertaking"
32472
- }, /*#__PURE__*/React.createElement(FieldBlock, {
32473
- error: getFieldError("declaration.submittedBy"),
32474
- label: "Submitted By",
32475
- required: true
32476
- }, /*#__PURE__*/React.createElement(Controller, {
32477
- control: control,
32478
- name: "declaration.submittedBy",
32479
- rules: {
32480
- required: "Submitted By is required."
32481
- },
32482
- render: props => /*#__PURE__*/React.createElement(Dropdown, {
32483
- option: SUBMITTED_BY_OPTIONS,
32484
- optionKey: "name",
32485
- selected: props.value,
32486
- select: props.onChange,
32487
- t: t
32488
- })
32489
- })), /*#__PURE__*/React.createElement(Controller, {
32490
- control: control,
32491
- name: "declaration.signatureFile",
32492
- rules: {
32493
- validate: value => !!value || "Upload Signature is required."
32494
- },
32495
- render: props => /*#__PURE__*/React.createElement(FileUploadField, {
32496
- error: getFieldError("declaration.signatureFile"),
32497
- helperText: "Max size 5 MB. Allowed types: PDF, PNG, JPG, JPEG.",
32498
- id: "signature-file",
32499
- isUploading: !!uploadingFields["declaration.signatureFile"],
32500
- label: "Upload Signature",
32501
- onDelete: () => clearUploadedFile("declaration.signatureFile", props.onChange),
32502
- onUpload: event => uploadFile(event, "declaration.signatureFile", props.onChange),
32503
- required: true,
32504
- value: props.value
32505
- })
32506
- }), /*#__PURE__*/React.createElement(FieldBlock, {
32507
- isFullWidth: true,
32508
- label: "Captcha",
32509
- required: true
32510
- }, /*#__PURE__*/React.createElement("div", {
32511
- style: {
32512
- display: "flex",
32513
- gap: "16px",
32514
- flexWrap: "wrap",
32515
- alignItems: "center"
32516
- }
32517
- }, /*#__PURE__*/React.createElement("div", {
32518
- style: captchaBoxStyle
32519
- }, generatedCaptcha), /*#__PURE__*/React.createElement("button", {
32520
- type: "button",
32521
- onClick: refreshCaptcha,
32522
- style: linkButtonStyle
32523
- }, "Refresh Captcha"))), /*#__PURE__*/React.createElement(FieldBlock, {
32524
- error: getFieldError("declaration.captcha"),
32525
- label: "Enter Captcha",
32526
- required: true
32527
- }, /*#__PURE__*/React.createElement(TextInput, {
32528
- errorStyle: !!getFieldError("declaration.captcha"),
32529
- inputRef: register({
32530
- required: "Captcha is required."
32531
- }),
32532
- name: "declaration.captcha"
32533
- })), /*#__PURE__*/React.createElement(FieldBlock, {
32534
- error: getFieldError("declaration.agree"),
32535
- isFullWidth: true,
32536
- label: "Declaration",
32537
- required: true
32538
- }, /*#__PURE__*/React.createElement(Controller, {
32539
- control: control,
32540
- name: "declaration.agree",
32541
- rules: {
32542
- validate: value => value || "Please accept the declaration to continue."
32543
- },
32544
- render: props => /*#__PURE__*/React.createElement(CheckBox, {
32545
- checked: !!props.value,
32546
- label: "I Agree",
32547
- onChange: event => props.onChange(event.target.checked)
32548
- })
32549
- }))))), previewMode && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionCard, {
33114
+ })))), previewMode && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionCard, {
32550
33115
  description: "Selected request and connection type.",
32551
33116
  isOpen: collapsedSections.application,
32552
33117
  onToggle: toggleSection,
32553
33118
  sectionKey: "application",
32554
- title: "Application Selection"
33119
+ title: "Application Selection",
33120
+ onEditClick: () => handleSectionEdit("application")
32555
33121
  }, /*#__PURE__*/React.createElement(PreviewItem, {
32556
- label: "Type of Request",
32557
- value: formValues === null || formValues === void 0 ? void 0 : formValues.typeOfRequest
33122
+ label: "ZRO Location",
33123
+ value: formValues === null || formValues === void 0 ? void 0 : formValues.zro
33124
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33125
+ label: "Service Type",
33126
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati = formValues.applicationSelection) === null || _formValues$applicati === void 0 ? void 0 : _formValues$applicati.serviceType
33127
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33128
+ label: "Applicant Type",
33129
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati2 = formValues.applicationSelection) === null || _formValues$applicati2 === void 0 ? void 0 : _formValues$applicati2.applicantType
32558
33130
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32559
33131
  label: "Connection Type",
32560
- value: formValues === null || formValues === void 0 ? void 0 : formValues.connectionType
32561
- })), /*#__PURE__*/React.createElement(SectionCard, {
33132
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati3 = formValues.applicationSelection) === null || _formValues$applicati3 === void 0 ? void 0 : _formValues$applicati3.connectionType
33133
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33134
+ label: "Category Type",
33135
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati4 = formValues.applicationSelection) === null || _formValues$applicati4 === void 0 ? void 0 : _formValues$applicati4.categoryType
33136
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33137
+ label: "Sub Category",
33138
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati5 = formValues.applicationSelection) === null || _formValues$applicati5 === void 0 ? void 0 : _formValues$applicati5.subCategory
33139
+ }), (formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati6 = formValues.applicationSelection) === null || _formValues$applicati6 === void 0 ? void 0 : (_formValues$applicati7 = _formValues$applicati6.subCategory) === null || _formValues$applicati7 === void 0 ? void 0 : _formValues$applicati7.code) === "COMMERCIAL" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PreviewItem, {
33140
+ label: "Commercial Type",
33141
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati8 = formValues.applicationSelection) === null || _formValues$applicati8 === void 0 ? void 0 : _formValues$applicati8.commercialType
33142
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33143
+ label: "Organization Name",
33144
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati9 = formValues.applicationSelection) === null || _formValues$applicati9 === void 0 ? void 0 : (_formValues$applicati0 = _formValues$applicati9.govtOrganization) === null || _formValues$applicati0 === void 0 ? void 0 : _formValues$applicati0.organizationName
33145
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33146
+ label: "Nature of Work",
33147
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati1 = formValues.applicationSelection) === null || _formValues$applicati1 === void 0 ? void 0 : (_formValues$applicati10 = _formValues$applicati1.govtOrganization) === null || _formValues$applicati10 === void 0 ? void 0 : _formValues$applicati10.natureOfWork
33148
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33149
+ label: "Organization Document",
33150
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati11 = formValues.applicationSelection) === null || _formValues$applicati11 === void 0 ? void 0 : (_formValues$applicati12 = _formValues$applicati11.govtOrganization) === null || _formValues$applicati12 === void 0 ? void 0 : _formValues$applicati12.organizationDocument
33151
+ }))), /*#__PURE__*/React.createElement(SectionCard, {
32562
33152
  description: "Applicant identity and organization information.",
32563
33153
  isOpen: collapsedSections.applicant,
32564
33154
  onToggle: toggleSection,
32565
33155
  sectionKey: "applicant",
32566
- title: "Details of Applicant"
32567
- }, /*#__PURE__*/React.createElement(PreviewItem, {
33156
+ title: "Details of Applicant",
33157
+ onEditClick: () => handleSectionEdit("applicant")
33158
+ }, /*#__PURE__*/React.createElement("div", {
33159
+ style: {
33160
+ gridColumn: "1 / -1",
33161
+ display: "flex",
33162
+ justifyContent: "center",
33163
+ marginBottom: "16px"
33164
+ }
33165
+ }, /*#__PURE__*/React.createElement("div", {
33166
+ className: "avatar-wrapper",
33167
+ style: {
33168
+ cursor: "default"
33169
+ }
33170
+ }, /*#__PURE__*/React.createElement("div", {
33171
+ className: "avatar-circle",
33172
+ style: {
33173
+ cursor: "default"
33174
+ }
33175
+ }, formValues !== null && formValues !== void 0 && (_formValues$applicant = formValues.applicant) !== null && _formValues$applicant !== void 0 && (_formValues$applicant2 = _formValues$applicant.UploadPicture) !== null && _formValues$applicant2 !== void 0 && _formValues$applicant2.fileStoreId ? /*#__PURE__*/React.createElement(ProfileImagePreview, {
33176
+ fileStoreId: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant3 = formValues.applicant) === null || _formValues$applicant3 === void 0 ? void 0 : (_formValues$applicant4 = _formValues$applicant3.UploadPicture) === null || _formValues$applicant4 === void 0 ? void 0 : _formValues$applicant4.fileStoreId
33177
+ }) : /*#__PURE__*/React.createElement("div", {
33178
+ className: "avatar-placeholder"
33179
+ }, /*#__PURE__*/React.createElement("svg", {
33180
+ width: "40",
33181
+ height: "40",
33182
+ viewBox: "0 0 24 24",
33183
+ fill: "none",
33184
+ stroke: "#9CA3AF",
33185
+ strokeWidth: "1.5"
33186
+ }, /*#__PURE__*/React.createElement("path", {
33187
+ d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"
33188
+ }), /*#__PURE__*/React.createElement("circle", {
33189
+ cx: "12",
33190
+ cy: "7",
33191
+ r: "4"
33192
+ })))))), /*#__PURE__*/React.createElement(PreviewItem, {
32568
33193
  label: "First Name",
32569
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant = formValues.applicant) === null || _formValues$applicant === void 0 ? void 0 : _formValues$applicant.firstName
33194
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant5 = formValues.applicant) === null || _formValues$applicant5 === void 0 ? void 0 : _formValues$applicant5.firstName
32570
33195
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32571
33196
  label: "Middle Name",
32572
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant2 = formValues.applicant) === null || _formValues$applicant2 === void 0 ? void 0 : _formValues$applicant2.middleName
33197
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant6 = formValues.applicant) === null || _formValues$applicant6 === void 0 ? void 0 : _formValues$applicant6.middleName
32573
33198
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32574
33199
  label: "Last Name",
32575
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant3 = formValues.applicant) === null || _formValues$applicant3 === void 0 ? void 0 : _formValues$applicant3.lastName
33200
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant7 = formValues.applicant) === null || _formValues$applicant7 === void 0 ? void 0 : _formValues$applicant7.lastName
32576
33201
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32577
- label: "Father / Husband Name",
32578
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant4 = formValues.applicant) === null || _formValues$applicant4 === void 0 ? void 0 : _formValues$applicant4.fatherOrHusbandName
33202
+ label: "Gender",
33203
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail = formValues.useDetails) === null || _formValues$useDetail === void 0 ? void 0 : _formValues$useDetail.gender
33204
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33205
+ label: "Parent/ spouse",
33206
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant8 = formValues.applicant) === null || _formValues$applicant8 === void 0 ? void 0 : _formValues$applicant8.ParentorSpouse
32579
33207
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32580
- label: "Government Organization",
32581
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant5 = formValues.applicant) === null || _formValues$applicant5 === void 0 ? void 0 : _formValues$applicant5.isGovernmentOrganization
32582
- }), formValues !== null && formValues !== void 0 && (_formValues$applicant6 = formValues.applicant) !== null && _formValues$applicant6 !== void 0 && _formValues$applicant6.isGovernmentOrganization ? /*#__PURE__*/React.createElement(PreviewItem, {
32583
- isFullWidth: true,
32584
- label: "Name of Government Organization",
32585
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant7 = formValues.applicant) === null || _formValues$applicant7 === void 0 ? void 0 : _formValues$applicant7.governmentOrganizationName
32586
- }) : null, /*#__PURE__*/React.createElement(PreviewItem, {
32587
- isFullWidth: true,
32588
- label: "Uploaded ID Proof",
32589
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant8 = formValues.applicant) === null || _formValues$applicant8 === void 0 ? void 0 : _formValues$applicant8.applicantIdProofFile
32590
- })), /*#__PURE__*/React.createElement(SectionCard, {
32591
- description: "Communication details captured in the application.",
32592
- isOpen: collapsedSections.contact,
32593
- onToggle: toggleSection,
32594
- sectionKey: "contact",
32595
- title: "Contact Details"
32596
- }, /*#__PURE__*/React.createElement(PreviewItem, {
32597
33208
  label: "Email ID",
32598
33209
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$contact = formValues.contact) === null || _formValues$contact === void 0 ? void 0 : _formValues$contact.emailId
32599
33210
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32600
33211
  label: "Mobile Number",
32601
33212
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$contact2 = formValues.contact) === null || _formValues$contact2 === void 0 ? void 0 : _formValues$contact2.mobileNumber
32602
33213
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32603
- label: "Office No.",
32604
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$contact3 = formValues.contact) === null || _formValues$contact3 === void 0 ? void 0 : _formValues$contact3.officeNumber
33214
+ label: "WhatsApp Number",
33215
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$contact3 = formValues.contact) === null || _formValues$contact3 === void 0 ? void 0 : _formValues$contact3.whatsAppNumber
33216
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33217
+ isFullWidth: true,
33218
+ label: "Uploaded ID Proof",
33219
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents = formValues.documents) === null || _formValues$documents === void 0 ? void 0 : _formValues$documents.identityProofFile
32605
33220
  })), /*#__PURE__*/React.createElement(SectionCard, {
32606
33221
  description: "DJB employee-specific information.",
32607
33222
  isOpen: collapsedSections.employee,
32608
33223
  onToggle: toggleSection,
32609
33224
  sectionKey: "employee",
32610
- title: "For DJB Employee"
33225
+ title: "For DJB Employee",
33226
+ onEditClick: () => handleSectionEdit("djbEmployee")
32611
33227
  }, /*#__PURE__*/React.createElement(PreviewItem, {
32612
33228
  label: "DJB Employee",
32613
33229
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$djbEmploy = formValues.djbEmployee) === null || _formValues$djbEmploy === void 0 ? void 0 : _formValues$djbEmploy.isDjbEmployee
@@ -32626,62 +33242,80 @@ const NewApplication = () => {
32626
33242
  isOpen: collapsedSections.address,
32627
33243
  onToggle: toggleSection,
32628
33244
  sectionKey: "address",
32629
- title: "Property Address"
33245
+ title: "Property Address",
33246
+ onEditClick: () => handleSectionEdit("propertyAddress")
32630
33247
  }, /*#__PURE__*/React.createElement(PreviewItem, {
32631
- isFullWidth: true,
32632
- label: "Address",
32633
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA = formValues.propertyAddress) === null || _formValues$propertyA === void 0 ? void 0 : _formValues$propertyA.address
33248
+ label: "Pin Code",
33249
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA = formValues.propertyAddress) === null || _formValues$propertyA === void 0 ? void 0 : _formValues$propertyA.pinCode
32634
33250
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32635
- label: "Landmark",
32636
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA2 = formValues.propertyAddress) === null || _formValues$propertyA2 === void 0 ? void 0 : _formValues$propertyA2.landmark
33251
+ label: "State",
33252
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA2 = formValues.propertyAddress) === null || _formValues$propertyA2 === void 0 ? void 0 : _formValues$propertyA2.state
32637
33253
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32638
- label: "Pin Code",
32639
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA3 = formValues.propertyAddress) === null || _formValues$propertyA3 === void 0 ? void 0 : _formValues$propertyA3.pinCode
33254
+ label: "District",
33255
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA3 = formValues.propertyAddress) === null || _formValues$propertyA3 === void 0 ? void 0 : _formValues$propertyA3.district
33256
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33257
+ label: "City",
33258
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA4 = formValues.propertyAddress) === null || _formValues$propertyA4 === void 0 ? void 0 : _formValues$propertyA4.city
32640
33259
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32641
33260
  label: "Locality",
32642
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA4 = formValues.propertyAddress) === null || _formValues$propertyA4 === void 0 ? void 0 : _formValues$propertyA4.locality
33261
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA5 = formValues.propertyAddress) === null || _formValues$propertyA5 === void 0 ? void 0 : _formValues$propertyA5.locality
33262
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33263
+ label: "Street",
33264
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA6 = formValues.propertyAddress) === null || _formValues$propertyA6 === void 0 ? void 0 : _formValues$propertyA6.street
32643
33265
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32644
- label: "Sub Locality",
32645
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA5 = formValues.propertyAddress) === null || _formValues$propertyA5 === void 0 ? void 0 : _formValues$propertyA5.subLocality
33266
+ label: "House No",
33267
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA7 = formValues.propertyAddress) === null || _formValues$propertyA7 === void 0 ? void 0 : _formValues$propertyA7.houseNo
32646
33268
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32647
- label: "Assembly",
32648
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA6 = formValues.propertyAddress) === null || _formValues$propertyA6 === void 0 ? void 0 : _formValues$propertyA6.assembly
33269
+ label: "Block",
33270
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA8 = formValues.propertyAddress) === null || _formValues$propertyA8 === void 0 ? void 0 : _formValues$propertyA8.block
32649
33271
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32650
- label: "Ward",
32651
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA7 = formValues.propertyAddress) === null || _formValues$propertyA7 === void 0 ? void 0 : _formValues$propertyA7.ward
33272
+ label: "Zone",
33273
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA9 = formValues.propertyAddress) === null || _formValues$propertyA9 === void 0 ? void 0 : _formValues$propertyA9.zone
33274
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33275
+ label: "Landmark",
33276
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA0 = formValues.propertyAddress) === null || _formValues$propertyA0 === void 0 ? void 0 : _formValues$propertyA0.landmark
33277
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33278
+ isFullWidth: true,
33279
+ label: "Address",
33280
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA1 = formValues.propertyAddress) === null || _formValues$propertyA1 === void 0 ? void 0 : _formValues$propertyA1.address
32652
33281
  })), /*#__PURE__*/React.createElement(SectionCard, {
32653
33282
  description: "Property and connection usage values.",
32654
33283
  isOpen: collapsedSections.usage,
32655
33284
  onToggle: toggleSection,
32656
33285
  sectionKey: "usage",
32657
- title: "Property and Water Connection Use Details"
33286
+ title: "Property and Water Connection Use Details",
33287
+ onEditClick: () => handleSectionEdit("useDetails")
32658
33288
  }, /*#__PURE__*/React.createElement(PreviewItem, {
32659
33289
  label: "Property Type",
32660
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail = formValues.useDetails) === null || _formValues$useDetail === void 0 ? void 0 : _formValues$useDetail.propertyType
33290
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail2 = formValues.useDetails) === null || _formValues$useDetail2 === void 0 ? void 0 : _formValues$useDetail2.propertyType
32661
33291
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32662
- label: "No. of Floors",
32663
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail2 = formValues.useDetails) === null || _formValues$useDetail2 === void 0 ? void 0 : _formValues$useDetail2.noOfFloors
32664
- }), (formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail3 = formValues.useDetails) === null || _formValues$useDetail3 === void 0 ? void 0 : (_formValues$useDetail4 = _formValues$useDetail3.propertyType) === null || _formValues$useDetail4 === void 0 ? void 0 : _formValues$useDetail4.code) === "HOSPITAL_NURSING_HOME" ? /*#__PURE__*/React.createElement(PreviewItem, {
32665
- label: "No. of Beds for Hospitals & Nursing Home",
32666
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail5 = formValues.useDetails) === null || _formValues$useDetail5 === void 0 ? void 0 : _formValues$useDetail5.hospitalBeds
32667
- }) : null, /*#__PURE__*/React.createElement(PreviewItem, {
32668
- label: "Plot Area in Sqm",
32669
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail6 = formValues.useDetails) === null || _formValues$useDetail6 === void 0 ? void 0 : _formValues$useDetail6.plotArea
33292
+ label: "Plot Area (Sq. m.)",
33293
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail3 = formValues.useDetails) === null || _formValues$useDetail3 === void 0 ? void 0 : _formValues$useDetail3.plotArea
33294
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33295
+ label: "Built-up Area (Sq. m.)",
33296
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail4 = formValues.useDetails) === null || _formValues$useDetail4 === void 0 ? void 0 : _formValues$useDetail4.builtUpArea
32670
33297
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32671
- label: "Built Up Area",
32672
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail7 = formValues.useDetails) === null || _formValues$useDetail7 === void 0 ? void 0 : _formValues$useDetail7.builtUpArea
33298
+ label: "Number of Floors",
33299
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail5 = formValues.useDetails) === null || _formValues$useDetail5 === void 0 ? void 0 : _formValues$useDetail5.noOfFloors
32673
33300
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32674
- label: "Water Connection Category",
32675
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail8 = formValues.useDetails) === null || _formValues$useDetail8 === void 0 ? void 0 : _formValues$useDetail8.waterConnectionCategory
33301
+ label: "Number of Dwelling Units",
33302
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail6 = formValues.useDetails) === null || _formValues$useDetail6 === void 0 ? void 0 : _formValues$useDetail6.NumberofDwellingUnits
33303
+ }), (formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail7 = formValues.useDetails) === null || _formValues$useDetail7 === void 0 ? void 0 : (_formValues$useDetail8 = _formValues$useDetail7.propertyType) === null || _formValues$useDetail8 === void 0 ? void 0 : _formValues$useDetail8.code) === "HOSPITAL" || (formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail9 = formValues.useDetails) === null || _formValues$useDetail9 === void 0 ? void 0 : (_formValues$useDetail0 = _formValues$useDetail9.propertyType) === null || _formValues$useDetail0 === void 0 ? void 0 : _formValues$useDetail0.code) === "HOSPITAL_NURSING_HOME" ? /*#__PURE__*/React.createElement(PreviewItem, {
33304
+ label: "No. of Beds",
33305
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail1 = formValues.useDetails) === null || _formValues$useDetail1 === void 0 ? void 0 : _formValues$useDetail1.hospitalBeds
33306
+ }) : null, /*#__PURE__*/React.createElement(PreviewItem, {
33307
+ label: "Year of Construction",
33308
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail10 = formValues.useDetails) === null || _formValues$useDetail10 === void 0 ? void 0 : _formValues$useDetail10.SelectYearofConstruction
32676
33309
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32677
- label: "Water Connection Used By",
32678
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail9 = formValues.useDetails) === null || _formValues$useDetail9 === void 0 ? void 0 : _formValues$useDetail9.waterConnectionUsedBy
33310
+ label: "Water Connection Usage Type",
33311
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail11 = formValues.useDetails) === null || _formValues$useDetail11 === void 0 ? void 0 : _formValues$useDetail11.WaterConnectionUsageType
32679
33312
  })), /*#__PURE__*/React.createElement(SectionCard, {
32680
33313
  description: "Banking information as entered in the form.",
32681
33314
  isOpen: collapsedSections.bank,
32682
33315
  onToggle: toggleSection,
32683
33316
  sectionKey: "bank",
32684
- title: "Bank Details"
33317
+ title: "Bank Details",
33318
+ onEditClick: () => handleSectionEdit("bankDetails")
32685
33319
  }, /*#__PURE__*/React.createElement(PreviewItem, {
32686
33320
  label: "Name of the Bank",
32687
33321
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$bankDetai = formValues.bankDetails) === null || _formValues$bankDetai === void 0 ? void 0 : _formValues$bankDetai.bankName
@@ -32694,55 +33328,28 @@ const NewApplication = () => {
32694
33328
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32695
33329
  label: "Bank Account No.",
32696
33330
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$bankDetai4 = formValues.bankDetails) === null || _formValues$bankDetai4 === void 0 ? void 0 : _formValues$bankDetai4.bankAccountNumber
32697
- })), /*#__PURE__*/React.createElement(SectionCard, {
32698
- description: "Rain water harvesting request status.",
32699
- isOpen: collapsedSections.rainWaterHarvesting,
32700
- onToggle: toggleSection,
32701
- sectionKey: "rainWaterHarvesting",
32702
- title: "Rain Water Harvesting"
32703
- }, /*#__PURE__*/React.createElement(PreviewItem, {
32704
- isFullWidth: true,
32705
- label: "Apply for RWH Adequacy Certificate",
32706
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$rainWater = formValues.rainWaterHarvesting) === null || _formValues$rainWater === void 0 ? void 0 : _formValues$rainWater.applyForAdequacyCertificate
32707
33331
  })), /*#__PURE__*/React.createElement(SectionCard, {
32708
33332
  description: "Uploaded supporting documents.",
32709
33333
  isOpen: collapsedSections.documents,
32710
33334
  onToggle: toggleSection,
32711
33335
  sectionKey: "documents",
32712
- title: "Documents to be Attached"
33336
+ title: "Documents to be Attached",
33337
+ onEditClick: () => handleSectionEdit("documents")
32713
33338
  }, /*#__PURE__*/React.createElement(PreviewItem, {
32714
33339
  label: "Proof of Identity",
32715
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents = formValues.documents) === null || _formValues$documents === void 0 ? void 0 : _formValues$documents.proofOfIdentity
33340
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents2 = formValues.documents) === null || _formValues$documents2 === void 0 ? void 0 : _formValues$documents2.proofOfIdentity
32716
33341
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32717
33342
  label: "Upload Identity Proof",
32718
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents2 = formValues.documents) === null || _formValues$documents2 === void 0 ? void 0 : _formValues$documents2.identityProofFile
33343
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents3 = formValues.documents) === null || _formValues$documents3 === void 0 ? void 0 : _formValues$documents3.identityProofFile
32719
33344
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32720
33345
  label: "Ownership Status",
32721
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents3 = formValues.documents) === null || _formValues$documents3 === void 0 ? void 0 : _formValues$documents3.ownershipStatus
33346
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents4 = formValues.documents) === null || _formValues$documents4 === void 0 ? void 0 : _formValues$documents4.ownershipStatus
32722
33347
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32723
33348
  label: "Upload Ownership Document",
32724
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents4 = formValues.documents) === null || _formValues$documents4 === void 0 ? void 0 : _formValues$documents4.ownershipDocumentFile
33349
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents5 = formValues.documents) === null || _formValues$documents5 === void 0 ? void 0 : _formValues$documents5.ownershipDocumentFile
32725
33350
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32726
33351
  label: "Other Document",
32727
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents5 = formValues.documents) === null || _formValues$documents5 === void 0 ? void 0 : _formValues$documents5.otherDocumentFile
32728
- })), /*#__PURE__*/React.createElement(SectionCard, {
32729
- description: "Declaration and undertaking details.",
32730
- isOpen: collapsedSections.declaration,
32731
- onToggle: toggleSection,
32732
- sectionKey: "declaration",
32733
- title: "Declaration / Undertaking"
32734
- }, /*#__PURE__*/React.createElement(PreviewItem, {
32735
- label: "Submitted By",
32736
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$declarati = formValues.declaration) === null || _formValues$declarati === void 0 ? void 0 : _formValues$declarati.submittedBy
32737
- }), /*#__PURE__*/React.createElement(PreviewItem, {
32738
- label: "Upload Signature",
32739
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$declarati2 = formValues.declaration) === null || _formValues$declarati2 === void 0 ? void 0 : _formValues$declarati2.signatureFile
32740
- }), /*#__PURE__*/React.createElement(PreviewItem, {
32741
- label: "Entered Captcha",
32742
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$declarati3 = formValues.declaration) === null || _formValues$declarati3 === void 0 ? void 0 : _formValues$declarati3.captcha
32743
- }), /*#__PURE__*/React.createElement(PreviewItem, {
32744
- label: "I Agree",
32745
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$declarati4 = formValues.declaration) === null || _formValues$declarati4 === void 0 ? void 0 : _formValues$declarati4.agree
33352
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents6 = formValues.documents) === null || _formValues$documents6 === void 0 ? void 0 : _formValues$documents6.otherDocumentFile
32746
33353
  }))))), /*#__PURE__*/React.createElement(ActionBar, {
32747
33354
  style: actionBarStyle
32748
33355
  }, !previewMode ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SubmitBar, {