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

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$applicationSele14, _data$applicationSele15, _data$applicationSele16, _data$applicationSele17, _data$applicationSele18, _data$applicationSele19, _data$applicationSele20, _data$applicationSele21, _data$applicationSele22, _data$applicationSele23, _data$contact3, _data$documents, _data$documents2, _data$documents3, _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,37 @@ 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
+ domesticType: data === null || data === void 0 ? void 0 : (_data$applicationSele11 = data.applicationSelection) === null || _data$applicationSele11 === void 0 ? void 0 : (_data$applicationSele12 = _data$applicationSele11.domesticType) === null || _data$applicationSele12 === void 0 ? void 0 : _data$applicationSele12.code,
487
+ temporaryConnection: data === null || data === void 0 ? void 0 : (_data$applicationSele13 = data.applicationSelection) === null || _data$applicationSele13 === void 0 ? void 0 : (_data$applicationSele14 = _data$applicationSele13.temporaryConnection) === null || _data$applicationSele14 === void 0 ? void 0 : _data$applicationSele14.code,
488
+ ownerAuthorizationDoc: data === null || data === void 0 ? void 0 : (_data$applicationSele15 = data.applicationSelection) === null || _data$applicationSele15 === void 0 ? void 0 : (_data$applicationSele16 = _data$applicationSele15.ownerAuthorizationDoc) === null || _data$applicationSele16 === void 0 ? void 0 : (_data$applicationSele17 = _data$applicationSele16[0]) === null || _data$applicationSele17 === void 0 ? void 0 : (_data$applicationSele18 = _data$applicationSele17[1]) === null || _data$applicationSele18 === void 0 ? void 0 : _data$applicationSele18.fileStoreId,
489
+ ownerContactNumber: data === null || data === void 0 ? void 0 : (_data$applicationSele19 = data.applicationSelection) === null || _data$applicationSele19 === void 0 ? void 0 : _data$applicationSele19.ownerContactNumber,
490
+ isOwnerVerified: data === null || data === void 0 ? void 0 : (_data$applicationSele20 = data.applicationSelection) === null || _data$applicationSele20 === void 0 ? void 0 : _data$applicationSele20.isOwnerVerified,
491
+ commercialType: data === null || data === void 0 ? void 0 : (_data$applicationSele21 = data.applicationSelection) === null || _data$applicationSele21 === void 0 ? void 0 : (_data$applicationSele22 = _data$applicationSele21.commercialType) === null || _data$applicationSele22 === void 0 ? void 0 : _data$applicationSele22.code,
492
+ govtOrganization: data === null || data === void 0 ? void 0 : (_data$applicationSele23 = data.applicationSelection) === null || _data$applicationSele23 === void 0 ? void 0 : _data$applicationSele23.govtOrganization,
493
+ governmentEmployee: data === null || data === void 0 ? void 0 : data.governmentEmployee,
494
+ whatsAppNumber: data === null || data === void 0 ? void 0 : (_data$contact3 = data.contact) === null || _data$contact3 === void 0 ? void 0 : _data$contact3.whatsAppNumber,
495
+ identityProofNumber: data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : _data$documents.identityProofNumber,
496
+ ownershipDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents2 = data.documents) === null || _data$documents2 === void 0 ? void 0 : _data$documents2.ownershipDocumentNumber,
497
+ otherDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.otherDocumentNumber,
498
+ detailsProvidedBy: ""
499
+ },
500
+ 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
501
  processInstance: {
480
502
  action: "INITIATE"
481
503
  },
482
504
  channel: "CFC_COUNTER"
483
505
  };
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));
506
+ sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : data.documents));
507
+ 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
508
  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
509
  return payload;
488
510
  };
@@ -502,11 +524,11 @@ const updatePayloadOfWS = async (data, type) => {
502
524
  return payload;
503
525
  };
504
526
  const convertToWSUpdate = data => {
505
- var _data$WaterConnection, _data$WaterConnection2, _data$documents, _Digit5, _Digit5$Customization, _Digit5$Customization2, _Digit6, _Digit6$Customization, _Digit6$Customization2;
527
+ var _data$WaterConnection, _data$WaterConnection2, _data$documents4, _Digit5, _Digit5$Customization, _Digit5$Customization2, _Digit6, _Digit6$Customization, _Digit6$Customization2;
506
528
  let formdata = {
507
529
  WaterConnection: {
508
530
  ...(data === null || data === void 0 ? void 0 : (_data$WaterConnection = data.WaterConnectionResult) === null || _data$WaterConnection === void 0 ? void 0 : (_data$WaterConnection2 = _data$WaterConnection.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : _data$WaterConnection2[0]),
509
- documents: [...(data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : _data$documents.documents)],
531
+ documents: [...(data === null || data === void 0 ? void 0 : (_data$documents4 = data.documents) === null || _data$documents4 === void 0 ? void 0 : _data$documents4.documents)],
510
532
  processInstance: {
511
533
  action: "SUBMIT_APPLICATION"
512
534
  }
@@ -516,7 +538,7 @@ const convertToWSUpdate = data => {
516
538
  return formdata;
517
539
  };
518
540
  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;
541
+ var _data$WaterConnection3, _data$WaterConnection4, _data$documents5, _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$documents6, _data$sewerageConnect, _data$sewerageConnect2, _Digit7, _Digit7$Customization, _Digit7$Customization2, _Digit8, _Digit8$Customization, _Digit8$Customization2;
520
542
  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
543
  let formdata = {
522
544
  WaterConnection: {
@@ -528,7 +550,7 @@ const convertToEditWSUpdate = data => {
528
550
  status: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.status : waterResult === null || waterResult === void 0 ? void 0 : waterResult.status,
529
551
  connectionNo: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.connectionNo : waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionNo) || null,
530
552
  oldConnectionNo: null,
531
- documents: [...(data === null || data === void 0 ? void 0 : (_data$documents2 = data.documents) === null || _data$documents2 === void 0 ? void 0 : _data$documents2.documents)],
553
+ documents: [...(data === null || data === void 0 ? void 0 : (_data$documents5 = data.documents) === null || _data$documents5 === void 0 ? void 0 : _data$documents5.documents)],
532
554
  plumberInfo: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.plumberInfo : (waterResult === null || waterResult === void 0 ? void 0 : waterResult.plumberInfo) || [],
533
555
  roadType: null,
534
556
  roadCuttingArea: null,
@@ -551,16 +573,16 @@ const convertToEditWSUpdate = data => {
551
573
  },
552
574
  applicationType: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.applicationType : "MODIFY_WATER_CONNECTION",
553
575
  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
576
+ 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) ? [{
577
+ correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde2 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde2 === void 0 ? void 0 : _data$ConnectionHolde2.address) || "",
578
+ fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde3 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde3 === void 0 ? void 0 : _data$ConnectionHolde3.guardian) || "",
579
+ 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) || "",
580
+ mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde6 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde6 === void 0 ? void 0 : _data$ConnectionHolde6.mobileNumber) || "",
581
+ name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde7 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde7 === void 0 ? void 0 : _data$ConnectionHolde7.name) || "",
582
+ emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde8 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde8 === void 0 ? void 0 : _data$ConnectionHolde8.emailId) || "",
583
+ 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) || "",
584
+ 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) || "",
585
+ sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde11 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde11 === void 0 ? void 0 : _data$ConnectionHolde11.sameAsOwnerDetails
564
586
  }] : null : waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionHolders,
565
587
  oldApplication: false,
566
588
  channel: "CITIZEN",
@@ -581,7 +603,7 @@ const convertToEditWSUpdate = data => {
581
603
  water: data !== null && data !== void 0 && (_data$applicationType = data.applicationType) !== null && _data$applicationType !== void 0 && _data$applicationType.includes("WATER") ? true : false,
582
604
  sewerage: data !== null && data !== void 0 && (_data$applicationType2 = data.applicationType) !== null && _data$applicationType2 !== void 0 && _data$applicationType2.includes("WATER") ? true : false,
583
605
  service: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$serviceName = data.serviceName) === null || _data$serviceName === void 0 ? void 0 : _data$serviceName.code : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$serviceN = waterResult.serviceName) === null || _waterResult$serviceN === void 0 ? void 0 : _waterResult$serviceN.code,
584
- reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.documents)],
606
+ reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$documents6 = data.documents) === null || _data$documents6 === void 0 ? void 0 : _data$documents6.documents)],
585
607
  proposedWaterClosets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect = data.sewerageConnectionDetails) === null || _data$sewerageConnect === void 0 ? void 0 : _data$sewerageConnect.proposedWaterClosets,
586
608
  proposedToilets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect2 = data.sewerageConnectionDetails) === null || _data$sewerageConnect2 === void 0 ? void 0 : _data$sewerageConnect2.proposedToilets,
587
609
  comment: "",
@@ -595,7 +617,7 @@ const convertToEditWSUpdate = data => {
595
617
  return formdata;
596
618
  };
597
619
  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;
620
+ var _data$SewerageConnect, _data$SewerageConnect2, _data$documents7, _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$documents8, _data$sewerageConnect3, _data$sewerageConnect4, _Digit9, _Digit9$Customization, _Digit9$Customization2, _Digit0, _Digit0$Customization, _Digit0$Customization2;
599
621
  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
622
  let formdata = {
601
623
  SewerageConnection: {
@@ -607,7 +629,7 @@ const convertToEditSWUpdate = data => {
607
629
  status: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.status : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.status,
608
630
  connectionNo: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.connectionNo : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.connectionNo) || null,
609
631
  oldConnectionNo: null,
610
- documents: [...(data === null || data === void 0 ? void 0 : (_data$documents4 = data.documents) === null || _data$documents4 === void 0 ? void 0 : _data$documents4.documents)],
632
+ documents: [...(data === null || data === void 0 ? void 0 : (_data$documents7 = data.documents) === null || _data$documents7 === void 0 ? void 0 : _data$documents7.documents)],
611
633
  plumberInfo: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.plumberInfo : (SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.plumberInfo) || [],
612
634
  roadType: null,
613
635
  roadCuttingArea: null,
@@ -630,16 +652,16 @@ const convertToEditSWUpdate = data => {
630
652
  },
631
653
  applicationType: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.applicationType : "MODIFY_WATER_CONNECTION",
632
654
  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
655
+ 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) ? [{
656
+ correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde13 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde13 === void 0 ? void 0 : _data$ConnectionHolde13.address) || "",
657
+ fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde14 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde14 === void 0 ? void 0 : _data$ConnectionHolde14.guardian) || "",
658
+ 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) || "",
659
+ mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde17 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde17 === void 0 ? void 0 : _data$ConnectionHolde17.mobileNumber) || "",
660
+ name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde18 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde18 === void 0 ? void 0 : _data$ConnectionHolde18.name) || "",
661
+ emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde19 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde19 === void 0 ? void 0 : _data$ConnectionHolde19.emailId) || "",
662
+ 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) || "",
663
+ 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) || "",
664
+ sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde24 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde24 === void 0 ? void 0 : _data$ConnectionHolde24.sameAsOwnerDetails
643
665
  }] : null : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.connectionHolders,
644
666
  oldApplication: false,
645
667
  channel: "CITIZEN",
@@ -660,7 +682,7 @@ const convertToEditSWUpdate = data => {
660
682
  water: data !== null && data !== void 0 && (_data$applicationType3 = data.applicationType) !== null && _data$applicationType3 !== void 0 && _data$applicationType3.includes("WATER") ? true : false,
661
683
  sewerage: data !== null && data !== void 0 && (_data$applicationType4 = data.applicationType) !== null && _data$applicationType4 !== void 0 && _data$applicationType4.includes("WATER") ? true : false,
662
684
  service: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$serviceName2 = data.serviceName) === null || _data$serviceName2 === void 0 ? void 0 : _data$serviceName2.code : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$servi = SewerageResult.serviceName) === null || _SewerageResult$servi === void 0 ? void 0 : _SewerageResult$servi.code,
663
- reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$documents5 = data.documents) === null || _data$documents5 === void 0 ? void 0 : _data$documents5.documents)],
685
+ reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$documents8 = data.documents) === null || _data$documents8 === void 0 ? void 0 : _data$documents8.documents)],
664
686
  proposedWaterClosets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect3 = data.sewerageConnectionDetails) === null || _data$sewerageConnect3 === void 0 ? void 0 : _data$sewerageConnect3.proposedWaterClosets,
665
687
  proposedToilets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect4 = data.sewerageConnectionDetails) === null || _data$sewerageConnect4 === void 0 ? void 0 : _data$sewerageConnect4.proposedToilets,
666
688
  comment: "",
@@ -674,12 +696,12 @@ const convertToEditSWUpdate = data => {
674
696
  return formdata;
675
697
  };
676
698
  const convertToSWUpdate = data => {
677
- var _data$SewerageConnect3, _data$SewerageConnect4, _data$documents6, _Digit1, _Digit1$Customization, _Digit1$Customization2, _Digit10, _Digit10$Customizatio, _Digit10$Customizatio2;
699
+ var _data$SewerageConnect3, _data$SewerageConnect4, _data$documents9, _Digit1, _Digit1$Customization, _Digit1$Customization2, _Digit10, _Digit10$Customizatio, _Digit10$Customizatio2;
678
700
  let formdata = {
679
701
  SewerageConnection: {
680
702
  ...(data === null || data === void 0 ? void 0 : (_data$SewerageConnect3 = data.SewerageConnectionResult) === null || _data$SewerageConnect3 === void 0 ? void 0 : (_data$SewerageConnect4 = _data$SewerageConnect3.SewerageConnections) === null || _data$SewerageConnect4 === void 0 ? void 0 : _data$SewerageConnect4[0]),
681
703
  connectionType: "Non Metered",
682
- documents: [...(data === null || data === void 0 ? void 0 : (_data$documents6 = data.documents) === null || _data$documents6 === void 0 ? void 0 : _data$documents6.documents)],
704
+ documents: [...(data === null || data === void 0 ? void 0 : (_data$documents9 = data.documents) === null || _data$documents9 === void 0 ? void 0 : _data$documents9.documents)],
683
705
  processInstance: {
684
706
  action: "SUBMIT_APPLICATION"
685
707
  }
@@ -1027,7 +1049,7 @@ const getDocumentsForPDF = (app, t) => {
1027
1049
  });
1028
1050
  };
1029
1051
  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;
1052
+ 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
1053
  return {
1032
1054
  t: t,
1033
1055
  tenantId: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code,
@@ -1049,44 +1071,44 @@ const getPDFData = (application, data, tenantInfo, t) => {
1049
1071
  value: (application === null || application === void 0 ? void 0 : application.propertyId) || "N/A"
1050
1072
  }, {
1051
1073
  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"
1074
+ 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
1075
  }, {
1054
1076
  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"
1077
+ 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
1078
  }, {
1057
1079
  title: t("WS_PROPERTY_SUB_USAGE_TYPE_LABEL"),
1058
1080
  value: "N/A"
1059
1081
  }, {
1060
1082
  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"
1083
+ 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
1084
  }, {
1063
1085
  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"
1086
+ 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
1087
  }, {
1066
1088
  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
1089
+ 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
1090
  }]
1069
1091
  }, {
1070
1092
  title: t("WS_COMMON_PROP_LOC_DETAIL_HEADER"),
1071
1093
  values: [{
1072
1094
  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
1095
+ 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
1096
  }, {
1075
1097
  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
1098
+ 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
1099
  }, {
1078
1100
  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
1101
+ 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
1102
  }, {
1081
1103
  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
1104
+ 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
1105
  }, {
1084
1106
  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
1107
+ 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
1108
  }]
1087
1109
  }, {
1088
1110
  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)
1111
+ 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
1112
  }, {
1091
1113
  ...(application !== null && application !== void 0 && application.applicationType.includes("WATER") ? {
1092
1114
  title: t("WS_COMMON_CONNECTION_DETAILS"),
@@ -1405,35 +1427,35 @@ const convertApplicationData = (data, serviceType, modify = false, editByConfig
1405
1427
  return payload;
1406
1428
  };
1407
1429
  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 => {
1430
+ 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;
1431
+ 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
1432
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
1411
1433
  });
1412
1434
  let payload = {
1413
1435
  ...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) ? [{
1436
+ 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,
1437
+ 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),
1438
+ 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),
1439
+ 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),
1440
+ 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),
1441
+ 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
1442
  ...(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
1443
+ 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) || "",
1444
+ 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) || "",
1445
+ 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) || "",
1446
+ 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) || "",
1447
+ 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) || "",
1448
+ 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) || "",
1449
+ 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) || "",
1450
+ 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) || "",
1451
+ 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
1452
  }] : null,
1431
- property: data === null || data === void 0 ? void 0 : (_data$cpt18 = data.cpt) === null || _data$cpt18 === void 0 ? void 0 : _data$cpt18.details,
1453
+ property: data === null || data === void 0 ? void 0 : (_data$cpt17 = data.cpt) === null || _data$cpt17 === void 0 ? void 0 : _data$cpt17.details,
1432
1454
  processInstance: {
1433
1455
  action: actionData ? actionData : "RESUBMIT_APPLICATION"
1434
1456
  },
1435
1457
  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
1458
+ documents: data === null || data === void 0 ? void 0 : (_data$DocumentsRequir = data.DocumentsRequired) === null || _data$DocumentsRequir === void 0 ? void 0 : _data$DocumentsRequir.documents
1437
1459
  };
1438
1460
  return payload;
1439
1461
  };
@@ -1488,7 +1510,7 @@ const convertDisonnectApplicationData = (data, serviceType, editByConfig = false
1488
1510
  return payload;
1489
1511
  };
1490
1512
  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;
1513
+ 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
1514
  const docs = sessionStorage.getItem("DISCONNECTION_EDIT_DOCS");
1493
1515
  const docsData = docs ? JSON.parse(docs) : "";
1494
1516
  const documentsData = [];
@@ -1516,7 +1538,7 @@ const convertDisonnectEditApplicationDetails = async (data, appData, actionData)
1516
1538
  }];
1517
1539
  let payload = {
1518
1540
  ...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,
1541
+ 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
1542
  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
1543
  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
1544
  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 +1571,14 @@ const getConvertedDate = async dateOfTime => {
1549
1571
  return convertedDate;
1550
1572
  };
1551
1573
  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 => {
1574
+ 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;
1575
+ 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
1576
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
1555
1577
  });
1556
1578
  let formData = {
1557
1579
  ...appData.applicationData
1558
1580
  };
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;
1581
+ 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
1582
  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
1583
  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
1584
  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 +1590,20 @@ const convertModifyApplicationDetails = async (data, appData, actionData = "INIT
1568
1590
  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
1591
  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
1592
  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;
1593
+ 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;
1594
+ 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)) {
1595
+ 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
1596
  formData.connectionHolders = [{
1575
1597
  ...(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
1598
+ 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) || "",
1599
+ 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) || "",
1600
+ 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) || "",
1601
+ 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) || "",
1602
+ 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) || "",
1603
+ 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) || "",
1604
+ 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) || "",
1605
+ 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) || "",
1606
+ 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
1607
  }];
1586
1608
  }
1587
1609
  formData.processInstance = {
@@ -1589,8 +1611,8 @@ const convertModifyApplicationDetails = async (data, appData, actionData = "INIT
1589
1611
  };
1590
1612
  formData.action = actionData;
1591
1613
  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));
1614
+ 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) || []));
1615
+ 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
1616
  return formData;
1595
1617
  };
1596
1618
  const downloadPdf = (blob, fileName) => {
@@ -13388,8 +13410,8 @@ var _DataView = DataView;
13388
13410
  var Promise$1 = _getNative(_root, 'Promise');
13389
13411
  var _Promise = Promise$1;
13390
13412
 
13391
- var Set = _getNative(_root, 'Set');
13392
- var _Set = Set;
13413
+ var Set$1 = _getNative(_root, 'Set');
13414
+ var _Set = Set$1;
13393
13415
 
13394
13416
  var WeakMap = _getNative(_root, 'WeakMap');
13395
13417
  var _WeakMap = WeakMap;
@@ -30888,14 +30910,149 @@ const RequiredDocuments = ({
30888
30910
  })));
30889
30911
  };
30890
30912
 
30913
+ var serviceTypes = [
30914
+ {
30915
+ code: "WATER_AND_SEWERAGE",
30916
+ name: "Water and Sewerage"
30917
+ },
30918
+ {
30919
+ code: "WATER",
30920
+ name: "Water"
30921
+ },
30922
+ {
30923
+ code: "SEWERAGE",
30924
+ name: "Sewerage"
30925
+ },
30926
+ {
30927
+ code: "REGULARIZATION",
30928
+ name: "Regularization"
30929
+ }
30930
+ ];
30931
+ var applicantTypes = [
30932
+ {
30933
+ code: "OWNER",
30934
+ name: "Owner"
30935
+ },
30936
+ {
30937
+ code: "TENANT",
30938
+ name: "Tenant"
30939
+ },
30940
+ {
30941
+ code: "RELATIVE",
30942
+ name: "Relative"
30943
+ }
30944
+ ];
30945
+ var connectionTypes = [
30946
+ {
30947
+ code: "PERMANENT",
30948
+ name: "Permanent"
30949
+ },
30950
+ {
30951
+ code: "TEMPORARY",
30952
+ name: "Temporary"
30953
+ }
30954
+ ];
30955
+ var categoryTypes = [
30956
+ {
30957
+ code: "BULK",
30958
+ name: "Bulk"
30959
+ },
30960
+ {
30961
+ code: "NON_BULK",
30962
+ name: "Non-Bulk"
30963
+ }
30964
+ ];
30965
+ var subCategories = [
30966
+ {
30967
+ code: "DOMESTIC",
30968
+ name: "Domestic"
30969
+ },
30970
+ {
30971
+ code: "COMMERCIAL",
30972
+ name: "Commercial"
30973
+ }
30974
+ ];
30975
+ var propertyTypes = [
30976
+ {
30977
+ code: "SCHOOL",
30978
+ name: "school"
30979
+ },
30980
+ {
30981
+ code: "COLLEGE",
30982
+ name: "college"
30983
+ },
30984
+ {
30985
+ code: "INDUSTRY",
30986
+ name: "Industry"
30987
+ },
30988
+ {
30989
+ code: "MALL",
30990
+ name: "Mall"
30991
+ },
30992
+ {
30993
+ code: "HOTEL",
30994
+ name: "Hotel"
30995
+ },
30996
+ {
30997
+ code: "SHOP",
30998
+ name: "Shop"
30999
+ },
31000
+ {
31001
+ code: "OFFICE",
31002
+ name: "Office"
31003
+ },
31004
+ {
31005
+ code: "HOSPITAL",
31006
+ name: "Hospital"
31007
+ }
31008
+ ];
31009
+ var temporaryConnectionTypes = [
31010
+ {
31011
+ code: "EXHIBITION",
31012
+ name: "Exhibition"
31013
+ },
31014
+ {
31015
+ code: "OFFICIAL_FUNCTION",
31016
+ name: "Official Function"
31017
+ },
31018
+ {
31019
+ code: "RELIGIOUS_FUNCTION",
31020
+ name: "Religious Function"
31021
+ },
31022
+ {
31023
+ code: "CIRCUS",
31024
+ name: "Circus"
31025
+ },
31026
+ {
31027
+ code: "CONSTRUCTION",
31028
+ name: "Construction"
31029
+ },
31030
+ {
31031
+ code: "AS_PER_COURT_ORDERS",
31032
+ name: "as per Court Orders"
31033
+ },
31034
+ {
31035
+ code: "SOCIAL_FAMILY_FUNCTION",
31036
+ name: "Social/Family Function"
31037
+ }
31038
+ ];
31039
+ var dropdownData = {
31040
+ serviceTypes: serviceTypes,
31041
+ applicantTypes: applicantTypes,
31042
+ connectionTypes: connectionTypes,
31043
+ categoryTypes: categoryTypes,
31044
+ subCategories: subCategories,
31045
+ propertyTypes: propertyTypes,
31046
+ temporaryConnectionTypes: temporaryConnectionTypes
31047
+ };
31048
+
30891
31049
  const FORM_STORAGE_KEY = "WS_EMPLOYEE_NEW_APPLICATION_FORM";
30892
31050
  const MAX_FILE_SIZE = 5242880;
30893
31051
  const SUPPORTED_FILE_TYPES = /(\.pdf|\.png|\.jpe?g)$/i;
31052
+ const DECLARATION_POINTS = ["I understand that sanction of connection does not acknowledge or confer any title, ownership or occupancy right in favour of the applicant.", "I declare that there is no dispute on property and there is no stay from any court of law against obtaining water/ sewerage connection.", "The Property on which connection is being applied is not booked/unauthorized/encroachment of Govt.Land/misuse etc.", "I further undertake that in case of any dispute about the ownership of the property I will absolve DJB from any legal battle in the court of law as the water connection applied for is related to supply of potable water and not to decide the ownership of property.", "I further undertake to pay the charges as and when demanded by DJB, and in the event of non-payment, DJB will be at liberty to disconnect the services being provided by DJB.", "I further undertake that I have not taken 'DJB Employee Rebate' against any other Premise/Connection.", "In case of variation in plot size as per document submitted by the undersigned and on actual measurement by DJB representative, difference of Infrastructure charge/any other charge on actual measurement will be paid by me.", "In case connection is found non-feasible on technical ground as per any prevalent policy of DJB the water connection may be denied or if sanctioned inadvertently, the said sanction may be withdrawn and may be disconnected without any notice.", "I hereby undertake that all the facts and documents submitted are true and correct, in case of any misrepresentation or wrong facts etc., sanction of connection may be disconnected without any notice.."];
30894
31053
  const NAME_PATTERN = /^[a-zA-Z\s.'-]{1,50}$/;
30895
31054
  const EMAIL_PATTERN = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/;
30896
31055
  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
31056
  const NUMBER_PATTERN = /^\d+$/;
30900
31057
  const DECIMAL_PATTERN = /^\d+(\.\d{1,2})?$/;
30901
31058
  const IFSC_PATTERN = /^[A-Z]{4}0[A-Z0-9]{6}$/;
@@ -30905,27 +31062,15 @@ const createOption = (code, name) => ({
30905
31062
  code,
30906
31063
  name
30907
31064
  });
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")];
31065
+ 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
31066
  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
31067
  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
31068
  const DEFAULT_SECTION_STATE = {
30925
31069
  application: true,
30926
31070
  applicant: true,
30927
31071
  contact: true,
30928
- employee: true,
31072
+ djbEmployee: true,
31073
+ governmentEmployee: true,
30929
31074
  address: true,
30930
31075
  usage: true,
30931
31076
  bank: true,
@@ -30940,15 +31085,27 @@ const DEFAULT_FORM_VALUES = {
30940
31085
  firstName: "",
30941
31086
  middleName: "",
30942
31087
  lastName: "",
30943
- fatherOrHusbandName: "",
30944
- isGovernmentOrganization: false,
30945
- applicantIdProofFile: null,
30946
- governmentOrganizationName: ""
31088
+ ParentorSpouse: "",
31089
+ applicantIdProofFile: null
30947
31090
  },
30948
31091
  contact: {
30949
31092
  emailId: "",
30950
31093
  mobileNumber: "",
30951
- officeNumber: ""
31094
+ whatsAppNumber: ""
31095
+ },
31096
+ applicationSelection: {
31097
+ serviceType: null,
31098
+ applicantType: null,
31099
+ connectionType: null,
31100
+ categoryType: null,
31101
+ subCategory: null,
31102
+ temporaryConnection: null,
31103
+ ownerAuthorizationDoc: null,
31104
+ ownerContactNumber: "",
31105
+ ownerOtp: "",
31106
+ isOwnerVerified: false,
31107
+ domesticType: null,
31108
+ commercialType: null
30952
31109
  },
30953
31110
  djbEmployee: {
30954
31111
  isDjbEmployee: false,
@@ -30956,12 +31113,24 @@ const DEFAULT_FORM_VALUES = {
30956
31113
  retirementDate: "",
30957
31114
  officeNameAndAddress: ""
30958
31115
  },
31116
+ governmentEmployee: {
31117
+ isGovernmentEmployee: false,
31118
+ organizationName: "",
31119
+ natureOfWork: "",
31120
+ organizationDocument: null
31121
+ },
30959
31122
  propertyAddress: {
30960
31123
  address: "",
30961
31124
  landmark: "",
30962
31125
  pinCode: "",
30963
31126
  locality: null,
30964
31127
  subLocality: null,
31128
+ state: "",
31129
+ district: "",
31130
+ city: "",
31131
+ street: "",
31132
+ houseNo: "",
31133
+ block: "",
30965
31134
  assembly: null,
30966
31135
  ward: null
30967
31136
  },
@@ -30972,7 +31141,10 @@ const DEFAULT_FORM_VALUES = {
30972
31141
  plotArea: "",
30973
31142
  builtUpArea: "",
30974
31143
  waterConnectionCategory: null,
30975
- waterConnectionUsedBy: null
31144
+ gender: null,
31145
+ NumberofDwellingUnits: "",
31146
+ SelectYearofConstruction: null,
31147
+ WaterConnectionUsageType: null
30976
31148
  },
30977
31149
  bankDetails: {
30978
31150
  bankName: "",
@@ -30993,7 +31165,6 @@ const DEFAULT_FORM_VALUES = {
30993
31165
  declaration: {
30994
31166
  submittedBy: null,
30995
31167
  signatureFile: null,
30996
- captcha: "",
30997
31168
  agree: false
30998
31169
  },
30999
31170
  cpt: {
@@ -31020,15 +31191,155 @@ const actionBarStyle = {
31020
31191
  gap: "16px",
31021
31192
  flexWrap: "wrap"
31022
31193
  };
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"
31194
+ const ProfileImagePreview = ({
31195
+ fileStoreId
31196
+ }) => {
31197
+ const [imageUrl, setImageUrl] = useState(null);
31198
+ useEffect(() => {
31199
+ const fetchImageUrl = async () => {
31200
+ if (fileStoreId) {
31201
+ try {
31202
+ var _response$data, _response$data$fileSt, _response$data$fileSt2;
31203
+ const tenantId = Digit.ULBService.getStateId();
31204
+ const response = await Digit.UploadServices.Filefetch([fileStoreId], tenantId);
31205
+ 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;
31206
+ if (url) {
31207
+ let differentFormats = (url === null || url === void 0 ? void 0 : url.split(",")) || [];
31208
+ let fileURL = "";
31209
+ differentFormats.map(link => {
31210
+ if (!link.includes("large") && !link.includes("medium") && !link.includes("small")) {
31211
+ fileURL = link;
31212
+ }
31213
+ });
31214
+ setImageUrl(fileURL || differentFormats[0]);
31215
+ }
31216
+ } catch (err) {
31217
+ console.error("Error fetching image URL:", err);
31218
+ setImageUrl(null);
31219
+ }
31220
+ }
31221
+ };
31222
+ fetchImageUrl();
31223
+ }, [fileStoreId]);
31224
+ if (!imageUrl) return null;
31225
+ return /*#__PURE__*/React.createElement("img", {
31226
+ src: imageUrl,
31227
+ alt: "Profile",
31228
+ style: {
31229
+ width: "100%",
31230
+ height: "100%",
31231
+ objectFit: "cover"
31232
+ }
31233
+ });
31234
+ };
31235
+ const ProfileImageUpload = ({
31236
+ value,
31237
+ onUpload,
31238
+ isUploading,
31239
+ error,
31240
+ t,
31241
+ label,
31242
+ required
31243
+ }) => {
31244
+ const fileInputRef = React.useRef(null);
31245
+ const fileStoreId = value === null || value === void 0 ? void 0 : value.fileStoreId;
31246
+ const [imageUrl, setImageUrl] = useState(null);
31247
+ useEffect(() => {
31248
+ const fetchImageUrl = async () => {
31249
+ if (fileStoreId) {
31250
+ try {
31251
+ var _response$data2, _response$data2$fileS, _response$data2$fileS2;
31252
+ const tenantId = Digit.ULBService.getStateId();
31253
+ const response = await Digit.UploadServices.Filefetch([fileStoreId], tenantId);
31254
+ 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;
31255
+ if (url) {
31256
+ let differentFormats = (url === null || url === void 0 ? void 0 : url.split(",")) || [];
31257
+ let fileURL = "";
31258
+ differentFormats.map(link => {
31259
+ if (!link.includes("large") && !link.includes("medium") && !link.includes("small")) {
31260
+ fileURL = link;
31261
+ }
31262
+ });
31263
+ setImageUrl(fileURL || differentFormats[0]);
31264
+ }
31265
+ } catch (err) {
31266
+ console.error("Error fetching image URL:", err);
31267
+ setImageUrl(null);
31268
+ }
31269
+ } else {
31270
+ setImageUrl(null);
31271
+ }
31272
+ };
31273
+ fetchImageUrl();
31274
+ }, [fileStoreId]);
31275
+ const handleEditClick = () => {
31276
+ fileInputRef.current.click();
31277
+ };
31278
+ return /*#__PURE__*/React.createElement("div", {
31279
+ className: "avatar-upload-container"
31280
+ }, label && /*#__PURE__*/React.createElement(CardLabel, {
31281
+ style: {
31282
+ textAlign: "center",
31283
+ marginBottom: "16px",
31284
+ fontWeight: "700"
31285
+ }
31286
+ }, `${t(label)}${required ? "*" : ""}`), /*#__PURE__*/React.createElement("div", {
31287
+ className: "avatar-wrapper"
31288
+ }, /*#__PURE__*/React.createElement("div", {
31289
+ className: "avatar-circle",
31290
+ onClick: handleEditClick
31291
+ }, imageUrl ? /*#__PURE__*/React.createElement("img", {
31292
+ src: imageUrl,
31293
+ alt: "Profile"
31294
+ }) : /*#__PURE__*/React.createElement("div", {
31295
+ className: "avatar-placeholder"
31296
+ }, /*#__PURE__*/React.createElement("svg", {
31297
+ width: "40",
31298
+ height: "40",
31299
+ viewBox: "0 0 24 24",
31300
+ fill: "none",
31301
+ stroke: "#9CA3AF",
31302
+ strokeWidth: "1.5"
31303
+ }, /*#__PURE__*/React.createElement("path", {
31304
+ d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"
31305
+ }), /*#__PURE__*/React.createElement("circle", {
31306
+ cx: "12",
31307
+ cy: "7",
31308
+ r: "4"
31309
+ })))), /*#__PURE__*/React.createElement("div", {
31310
+ className: "avatar-edit-icon",
31311
+ onClick: handleEditClick
31312
+ }, /*#__PURE__*/React.createElement("svg", {
31313
+ width: "18",
31314
+ height: "18",
31315
+ viewBox: "0 0 24 24",
31316
+ fill: "none",
31317
+ stroke: "#0B4B66",
31318
+ strokeWidth: "2.5",
31319
+ strokeLinecap: "round",
31320
+ strokeLinejoin: "round"
31321
+ }, /*#__PURE__*/React.createElement("path", {
31322
+ d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"
31323
+ })))), /*#__PURE__*/React.createElement("input", {
31324
+ type: "file",
31325
+ ref: fileInputRef,
31326
+ style: {
31327
+ display: "none"
31328
+ },
31329
+ accept: "image/*",
31330
+ onChange: onUpload
31331
+ }), isUploading && /*#__PURE__*/React.createElement("div", {
31332
+ style: {
31333
+ fontSize: "14px",
31334
+ marginTop: "8px",
31335
+ color: "#505A5F"
31336
+ }
31337
+ }, "Uploading..."), error && /*#__PURE__*/React.createElement(CardLabelError, {
31338
+ style: {
31339
+ textAlign: "center",
31340
+ marginTop: "8px"
31341
+ }
31342
+ }, error));
31032
31343
  };
31033
31344
  const linkButtonStyle = {
31034
31345
  background: "transparent",
@@ -31040,55 +31351,44 @@ const linkButtonStyle = {
31040
31351
  padding: 0,
31041
31352
  textDecoration: "underline"
31042
31353
  };
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
- }
31051
- };
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,
31354
+ const buildDefaultValues = () => ({
31355
+ zro: {
31356
+ value: "",
31357
+ error: ""
31358
+ },
31359
+ typeOfRequest: DEFAULT_FORM_VALUES.typeOfRequest,
31360
+ connectionType: DEFAULT_FORM_VALUES.connectionType,
31055
31361
  applicant: {
31056
- ...DEFAULT_FORM_VALUES.applicant,
31057
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.applicant) || {})
31362
+ ...DEFAULT_FORM_VALUES.applicant
31058
31363
  },
31059
31364
  contact: {
31060
- ...DEFAULT_FORM_VALUES.contact,
31061
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.contact) || {})
31365
+ ...DEFAULT_FORM_VALUES.contact
31062
31366
  },
31063
31367
  djbEmployee: {
31064
- ...DEFAULT_FORM_VALUES.djbEmployee,
31065
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.djbEmployee) || {})
31368
+ ...DEFAULT_FORM_VALUES.djbEmployee
31066
31369
  },
31067
31370
  propertyAddress: {
31068
- ...DEFAULT_FORM_VALUES.propertyAddress,
31069
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.propertyAddress) || {})
31371
+ ...DEFAULT_FORM_VALUES.propertyAddress
31070
31372
  },
31071
31373
  useDetails: {
31072
- ...DEFAULT_FORM_VALUES.useDetails,
31073
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.useDetails) || {})
31374
+ ...DEFAULT_FORM_VALUES.useDetails
31074
31375
  },
31075
31376
  bankDetails: {
31076
- ...DEFAULT_FORM_VALUES.bankDetails,
31077
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.bankDetails) || {})
31377
+ ...DEFAULT_FORM_VALUES.bankDetails
31078
31378
  },
31079
31379
  rainWaterHarvesting: {
31080
- ...DEFAULT_FORM_VALUES.rainWaterHarvesting,
31081
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.rainWaterHarvesting) || {})
31380
+ ...DEFAULT_FORM_VALUES.rainWaterHarvesting
31381
+ },
31382
+ applicationSelection: {
31383
+ ...DEFAULT_FORM_VALUES.applicationSelection
31082
31384
  },
31083
31385
  documents: {
31084
- ...DEFAULT_FORM_VALUES.documents,
31085
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.documents) || {})
31386
+ ...DEFAULT_FORM_VALUES.documents
31086
31387
  },
31087
31388
  declaration: {
31088
- ...DEFAULT_FORM_VALUES.declaration,
31089
- ...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.declaration) || {})
31389
+ ...DEFAULT_FORM_VALUES.declaration
31090
31390
  },
31091
- cpt: (savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.cpt) || {
31391
+ cpt: {
31092
31392
  id: "",
31093
31393
  details: null
31094
31394
  }
@@ -31107,14 +31407,6 @@ const getDisplayValue = value => {
31107
31407
  }
31108
31408
  return String(value);
31109
31409
  };
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
31410
  const FieldBlock = ({
31119
31411
  label,
31120
31412
  required,
@@ -31148,14 +31440,47 @@ const SectionCard = ({
31148
31440
  title,
31149
31441
  description,
31150
31442
  isOpen: _isOpen = true,
31151
- children
31443
+ children,
31444
+ sectionRef,
31445
+ sectionKey,
31446
+ onEditClick
31152
31447
  }) => {
31153
31448
  return /*#__PURE__*/React.createElement("div", {
31154
31449
  className: "ws-new-application-collapsible",
31155
31450
  style: {
31156
- marginBottom: "16px"
31157
- }
31158
- }, /*#__PURE__*/React.createElement(CollapsibleCardPage, {
31451
+ marginBottom: "16px",
31452
+ position: "relative"
31453
+ },
31454
+ ref: sectionRef,
31455
+ "data-section": sectionKey
31456
+ }, onEditClick && /*#__PURE__*/React.createElement("div", {
31457
+ onClick: onEditClick,
31458
+ style: {
31459
+ position: "absolute",
31460
+ top: "20px",
31461
+ right: "50px",
31462
+ zIndex: 10,
31463
+ cursor: "pointer",
31464
+ display: "flex",
31465
+ alignItems: "center",
31466
+ gap: "4px",
31467
+ color: "#0B4B66",
31468
+ fontSize: "14px",
31469
+ fontWeight: "600"
31470
+ },
31471
+ title: "Edit Section"
31472
+ }, /*#__PURE__*/React.createElement("svg", {
31473
+ width: "16",
31474
+ height: "16",
31475
+ viewBox: "0 0 24 24",
31476
+ fill: "none",
31477
+ stroke: "currentColor",
31478
+ strokeWidth: "2.5",
31479
+ strokeLinecap: "round",
31480
+ strokeLinejoin: "round"
31481
+ }, /*#__PURE__*/React.createElement("path", {
31482
+ d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"
31483
+ })), "Edit"), /*#__PURE__*/React.createElement(CollapsibleCardPage, {
31159
31484
  defaultOpen: _isOpen,
31160
31485
  defaultTab: COLLAPSIBLE_CONTENT_TAB,
31161
31486
  tabs: [COLLAPSIBLE_CONTENT_TAB],
@@ -31168,11 +31493,32 @@ const SectionCard = ({
31168
31493
  className: "formcomposer-section-grid"
31169
31494
  }, children))));
31170
31495
  };
31496
+ const handleView = async (fileStoreId, tenantId) => {
31497
+ try {
31498
+ var _response$data3, _response$data3$fileS, _response$data3$fileS2;
31499
+ const response = await Digit.UploadServices.Filefetch([fileStoreId], tenantId);
31500
+ 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;
31501
+ if (url) {
31502
+ const differentFormats = (url === null || url === void 0 ? void 0 : url.split(",")) || [];
31503
+ let fileURL = "";
31504
+ differentFormats.map(link => {
31505
+ if (!link.includes("large") && !link.includes("medium") && !link.includes("small")) {
31506
+ fileURL = link;
31507
+ }
31508
+ });
31509
+ window.open(fileURL || differentFormats[0], "_blank");
31510
+ }
31511
+ } catch (error) {
31512
+ console.error("Error fetching file URL:", error);
31513
+ }
31514
+ };
31171
31515
  const PreviewItem = ({
31172
31516
  label,
31173
31517
  value,
31174
31518
  isFullWidth
31175
31519
  }) => {
31520
+ const stateId = Digit.ULBService.getStateId();
31521
+ const isFile = value && typeof value === "object" && (value === null || value === void 0 ? void 0 : value.fileStoreId);
31176
31522
  return /*#__PURE__*/React.createElement("div", {
31177
31523
  style: {
31178
31524
  ...fieldWrapperStyle,
@@ -31185,12 +31531,42 @@ const PreviewItem = ({
31185
31531
  fontWeight: "600",
31186
31532
  marginBottom: "0px"
31187
31533
  }
31188
- }, label), /*#__PURE__*/React.createElement(CardText, {
31534
+ }, label), /*#__PURE__*/React.createElement("div", {
31535
+ style: {
31536
+ display: "flex",
31537
+ alignItems: "center",
31538
+ gap: "8px"
31539
+ }
31540
+ }, /*#__PURE__*/React.createElement(CardText, {
31189
31541
  style: {
31190
31542
  marginBottom: "0px",
31191
31543
  marginTop: "0px"
31192
31544
  }
31193
- }, getDisplayValue(value)));
31545
+ }, getDisplayValue(value)), isFile && /*#__PURE__*/React.createElement("div", {
31546
+ onClick: () => handleView(value.fileStoreId, stateId),
31547
+ style: {
31548
+ cursor: "pointer",
31549
+ display: "flex",
31550
+ alignItems: "center",
31551
+ color: "#0B4B66"
31552
+ },
31553
+ title: "View Document"
31554
+ }, /*#__PURE__*/React.createElement("svg", {
31555
+ width: "20",
31556
+ height: "20",
31557
+ viewBox: "0 0 24 24",
31558
+ fill: "none",
31559
+ stroke: "currentColor",
31560
+ strokeWidth: "2",
31561
+ strokeLinecap: "round",
31562
+ strokeLinejoin: "round"
31563
+ }, /*#__PURE__*/React.createElement("path", {
31564
+ d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
31565
+ }), /*#__PURE__*/React.createElement("circle", {
31566
+ cx: "12",
31567
+ cy: "12",
31568
+ r: "3"
31569
+ })))));
31194
31570
  };
31195
31571
  const FileUploadField = ({
31196
31572
  id,
@@ -31224,29 +31600,124 @@ const FileUploadField = ({
31224
31600
  }, isUploading ? "Uploading file..." : (value === null || value === void 0 ? void 0 : value.fileName) || "No file selected"));
31225
31601
  };
31226
31602
  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;
31603
+ var _Digit$SessionStorage, _getFieldError, _getFieldError2, _getFieldError3, _getFieldError4, _getFieldError5, _getFieldError6, _getFieldError7, _getFieldError8, _getFieldError9, _getFieldError0, _getFieldError1, _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$applicati13, _formValues$applicati14, _formValues$applicati15, _formValues$applicati16, _formValues$applicati17, _formValues$applicati18, _formValues$applicati19, _formValues$applicati20, _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$governmen, _formValues$governmen2, _formValues$governmen3, _formValues$governmen4, _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, _formValues$declarati, _formValues$declarati2, _formValues$declarati3;
31228
31604
  const {
31229
31605
  t
31230
31606
  } = useTranslation();
31231
31607
  const history = useHistory();
31232
31608
  const location = useLocation();
31609
+ const {
31610
+ data: allCities,
31611
+ isLoading
31612
+ } = Digit.Hooks.useTenants();
31233
31613
  const stateId = Digit.ULBService.getStateId();
31234
31614
  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
31615
  const [previewMode, setPreviewMode] = useState(false);
31236
31616
  const [currentStep, setCurrentStep] = useState(1);
31237
31617
  const [collapsedSections, setCollapsedSections] = useState(DEFAULT_SECTION_STATE);
31238
31618
  const [showToast, setShowToast] = useState(null);
31239
- const [generatedCaptcha, setGeneratedCaptcha] = useState(generateCaptcha());
31240
31619
  const [uploadingFields, setUploadingFields] = useState({});
31620
+ const [isOtpSent, setIsOtpSent] = useState(false);
31621
+ const [otpError, setOtpError] = useState(null);
31241
31622
  const [isEnableLoader, setIsEnableLoader] = useState(false);
31242
31623
  const [appDetails, setAppDetails] = useState({});
31243
31624
  const [waterAndSewerageBoth, setWaterAndSewerageBoth] = useState(null);
31244
31625
  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());
31626
+ const initialFormValues = buildDefaultValues();
31627
+ const [zro, setZro] = useState(initialFormValues.zro);
31628
+ const [localFormState, setLocalFormState] = useState(false);
31629
+ const [city, setCity] = useState("");
31630
+ useEffect(() => {
31631
+ if (allCities && tenantId && !city) {
31632
+ const currentCity = allCities === null || allCities === void 0 ? void 0 : allCities.find(c => c.code === tenantId);
31633
+ if (currentCity) {
31634
+ setCity(currentCity);
31635
+ setValue("propertyAddress.city", currentCity);
31636
+ }
31637
+ }
31638
+ }, [allCities, tenantId]);
31639
+ const {
31640
+ data: egovLocationData
31641
+ } = Digit.Hooks.useCommonMDMS(tenantId, "egov-location", ["TenantBoundary"]);
31642
+ const boundaryData = useMemo(() => {
31643
+ var _egovLocationData$ego;
31644
+ const tenantBoundary = (egovLocationData === null || egovLocationData === void 0 ? void 0 : (_egovLocationData$ego = egovLocationData["egov-location"]) === null || _egovLocationData$ego === void 0 ? void 0 : _egovLocationData$ego.TenantBoundary) || [];
31645
+ const revenueData = tenantBoundary.find(item => {
31646
+ var _item$hierarchyType;
31647
+ return (item === null || item === void 0 ? void 0 : (_item$hierarchyType = item.hierarchyType) === null || _item$hierarchyType === void 0 ? void 0 : _item$hierarchyType.code) === "REVENUE";
31648
+ });
31649
+ const boundary = (revenueData === null || revenueData === void 0 ? void 0 : revenueData.boundary) || [];
31650
+ return Array.isArray(boundary) ? boundary : [boundary];
31651
+ }, [egovLocationData]);
31652
+ const structuredLocalityData = useMemo(() => {
31653
+ let localities = [];
31654
+ const boundaries = Array.isArray(boundaryData) ? boundaryData : boundaryData ? [boundaryData] : [];
31655
+ const extractLocalities = (node, zone = null, ward = null) => {
31656
+ if (!node) return;
31657
+ let currentZone = zone;
31658
+ let currentWard = ward;
31659
+ if (node.label === "Zone" || node.label === "ZONE") {
31660
+ currentZone = node.localname || node.code || node.name;
31661
+ }
31662
+ if (node.label === "Ward" || node.label === "WARD" || node.label === "Block" || node.label === "BLOCK") {
31663
+ currentWard = node.code || node.localname || node.name;
31664
+ }
31665
+ if (node.label === "Locality" || node.label === "LOCALITY") {
31666
+ localities.push({
31667
+ ...node,
31668
+ name: node.localname || node.name || node.code,
31669
+ i18nKey: node.i18nKey || `${tenantId.replace(".", "_")}_REVENUE_${node.code}`.toUpperCase(),
31670
+ zone: currentZone,
31671
+ ward: currentWard
31672
+ });
31673
+ }
31674
+ if (node.children && node.children.length > 0) {
31675
+ node.children.forEach(child => extractLocalities(child, currentZone, currentWard));
31676
+ }
31677
+ };
31678
+ boundaries.forEach(rootNode => extractLocalities(rootNode));
31679
+ return localities;
31680
+ }, [boundaryData, tenantId]);
31681
+ const fetchedPincodes = useMemo(() => {
31682
+ const pinSet = new Set();
31683
+ structuredLocalityData.forEach(loc => {
31684
+ if (loc.pincode) {
31685
+ const pins = Array.isArray(loc.pincode) ? loc.pincode : [loc.pincode];
31686
+ pins.forEach(p => {
31687
+ if (p) {
31688
+ const sanitizedPin = p.toString().split(".")[0];
31689
+ pinSet.add(sanitizedPin);
31690
+ }
31691
+ });
31692
+ }
31693
+ });
31694
+ return Array.from(pinSet).sort().map(pin => ({
31695
+ code: pin,
31696
+ name: pin,
31697
+ i18nKey: pin
31698
+ }));
31699
+ }, [structuredLocalityData]);
31700
+ const sectionRefs = {
31701
+ application: React.useRef(null),
31702
+ applicant: React.useRef(null),
31703
+ contact: React.useRef(null),
31704
+ djbEmployee: React.useRef(null),
31705
+ governmentEmployee: React.useRef(null),
31706
+ propertyAddress: React.useRef(null),
31707
+ useDetails: React.useRef(null),
31708
+ bankDetails: React.useRef(null),
31709
+ documents: React.useRef(null),
31710
+ declaration: React.useRef(null)
31711
+ };
31712
+ const currentYear = new Date().getFullYear();
31713
+ const yearOptions = [];
31714
+ for (let year = 1970; year <= currentYear; year++) {
31715
+ yearOptions.push({
31716
+ i18nKey: `${year}`,
31717
+ code: `${year}`,
31718
+ value: `${year}`
31719
+ });
31720
+ }
31250
31721
  const {
31251
31722
  register,
31252
31723
  control,
@@ -31258,8 +31729,7 @@ const NewApplication = () => {
31258
31729
  reset,
31259
31730
  getValues,
31260
31731
  formState: {
31261
- errors,
31262
- localFormState
31732
+ errors
31263
31733
  }
31264
31734
  } = useForm({
31265
31735
  defaultValues: initialFormValues,
@@ -31268,12 +31738,109 @@ const NewApplication = () => {
31268
31738
  const formValues = watch();
31269
31739
  const isGovernmentOrganization = watch("applicant.isGovernmentOrganization");
31270
31740
  const isDjbEmployee = watch("djbEmployee.isDjbEmployee");
31741
+ const isGovernmentEmployee = watch("governmentEmployee.isGovernmentEmployee");
31271
31742
  const selectedPropertyType = watch("useDetails.propertyType");
31272
31743
  const selectedLocality = watch("propertyAddress.locality");
31273
31744
  const selectedSubLocality = watch("propertyAddress.subLocality");
31274
- const subLocalityOptions = selectedLocality ? SUB_LOCALITY_OPTIONS[selectedLocality.code] || [] : [];
31745
+ const pCode = watch("propertyAddress.pinCode");
31746
+ const filteredLocalities = useMemo(() => {
31747
+ if (!pCode) return structuredLocalityData;
31748
+ return structuredLocalityData.filter(loc => {
31749
+ if (!loc.pincode) return false;
31750
+ const pins = Array.isArray(loc.pincode) ? loc.pincode : [loc.pincode];
31751
+ return pins.some(p => p.toString() === pCode);
31752
+ });
31753
+ }, [structuredLocalityData, pCode]);
31754
+ const selectedSubCategory = watch("applicationSelection.subCategory");
31755
+ const selectedCommercialType = watch("applicationSelection.commercialType");
31756
+ const subCategoryIsCommercial = (selectedSubCategory === null || selectedSubCategory === void 0 ? void 0 : selectedSubCategory.code) === "COMMERCIAL";
31275
31757
  const hasPendingUpload = Object.values(uploadingFields).some(Boolean);
31276
- const isHospitalProperty = (selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code) === "HOSPITAL_NURSING_HOME";
31758
+ const isHospitalProperty = (selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code) === "HOSPITAL" || (selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code) === "HOSPITAL_NURSING_HOME";
31759
+ const selectedApplicantType = watch("applicationSelection.applicantType");
31760
+ const isTenantOrRelative = (selectedApplicantType === null || selectedApplicantType === void 0 ? void 0 : selectedApplicantType.code) === "TENANT" || (selectedApplicantType === null || selectedApplicantType === void 0 ? void 0 : selectedApplicantType.code) === "RELATIVE";
31761
+ const isOwnerVerified = watch("applicationSelection.isOwnerVerified");
31762
+ const subCategoryIsDomestic = (selectedSubCategory === null || selectedSubCategory === void 0 ? void 0 : selectedSubCategory.code) === "DOMESTIC";
31763
+ const selectedConnectionType = watch("applicationSelection.connectionType");
31764
+ const connectionTypeIsTemporary = (selectedConnectionType === null || selectedConnectionType === void 0 ? void 0 : selectedConnectionType.code) === "TEMPORARY";
31765
+ const selectedDomesticType = watch("applicationSelection.domesticType");
31766
+ const activeType = (selectedSubCategory === null || selectedSubCategory === void 0 ? void 0 : selectedSubCategory.code) === "DOMESTIC" ? selectedDomesticType : selectedCommercialType;
31767
+ const applicantSectionTitle = useMemo(() => {
31768
+ if ((activeType === null || activeType === void 0 ? void 0 : activeType.code) === "INDIVIDUAL") return "Applicant Details";
31769
+ if ((activeType === null || activeType === void 0 ? void 0 : activeType.code) === "ORGANIZATION") return "Authorized Person Details";
31770
+ return "Details of Applicant";
31771
+ }, [activeType]);
31772
+ const timelineConfig = [{
31773
+ sectionId: "application",
31774
+ route: "application-selection",
31775
+ actions: "Application Selection"
31776
+ }, {
31777
+ sectionId: "applicant",
31778
+ route: "applicant-details",
31779
+ actions: applicantSectionTitle
31780
+ }, ...(isDjbEmployee ? [{
31781
+ sectionId: "djbEmployee",
31782
+ route: "djb-employee",
31783
+ actions: "For DJB Employee"
31784
+ }] : []), ...(isGovernmentEmployee ? [{
31785
+ sectionId: "governmentEmployee",
31786
+ route: "government-employee",
31787
+ actions: "For Government Employee"
31788
+ }] : []), {
31789
+ sectionId: "propertyAddress",
31790
+ route: "property-address",
31791
+ actions: "Property Address"
31792
+ }, {
31793
+ sectionId: "useDetails",
31794
+ route: "use-details",
31795
+ actions: "Property & Connection Use Details"
31796
+ }, {
31797
+ sectionId: "bankDetails",
31798
+ route: "bank-details",
31799
+ actions: "Bank Details"
31800
+ }, {
31801
+ sectionId: "documents",
31802
+ route: "documents",
31803
+ actions: "Documents to be Attached"
31804
+ }, {
31805
+ sectionId: "declaration",
31806
+ route: "declaration",
31807
+ actions: "Declaration/Undertaking"
31808
+ }, {
31809
+ sectionId: "Review",
31810
+ route: "review",
31811
+ actions: "Review Application"
31812
+ }].map((step, index) => ({
31813
+ ...step,
31814
+ timeLine: [{
31815
+ actions: step.actions,
31816
+ currentStep: index + 1
31817
+ }]
31818
+ }));
31819
+ useEffect(() => {
31820
+ if (previewMode) return;
31821
+ const observerOptions = {
31822
+ root: null,
31823
+ rootMargin: "-20% 0px -50% 0px",
31824
+ threshold: [0, 0.1, 0.5, 1.0]
31825
+ };
31826
+ const handleIntersection = entries => {
31827
+ const mostVisible = entries.reduce((prev, current) => {
31828
+ return current.intersectionRatio > (prev ? prev.intersectionRatio : 0) ? current : prev;
31829
+ }, null);
31830
+ if (mostVisible && mostVisible.isIntersecting) {
31831
+ const sectionKey = mostVisible.target.getAttribute("data-section");
31832
+ const stepIndex = timelineConfig.findIndex(c => c.sectionId === sectionKey);
31833
+ if (stepIndex !== -1) {
31834
+ setCurrentStep(stepIndex + 1);
31835
+ }
31836
+ }
31837
+ };
31838
+ const observer = new IntersectionObserver(handleIntersection, observerOptions);
31839
+ Object.values(sectionRefs).forEach(ref => {
31840
+ if (ref.current) observer.observe(ref.current);
31841
+ });
31842
+ return () => observer.disconnect();
31843
+ }, [previewMode, sectionRefs, timelineConfig]);
31277
31844
  const {
31278
31845
  data: propertyDetails,
31279
31846
  isLoading: isPropertyLoading
@@ -31301,10 +31868,6 @@ const NewApplication = () => {
31301
31868
  const {
31302
31869
  mutate: sewerageUpdateMutation
31303
31870
  } = 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
31871
  useEffect(() => {
31309
31872
  if (!isGovernmentOrganization) {
31310
31873
  setValue("applicant.governmentOrganizationName", "");
@@ -31321,6 +31884,16 @@ const NewApplication = () => {
31321
31884
  clearErrors("djbEmployee.officeNameAndAddress");
31322
31885
  }
31323
31886
  }, [isDjbEmployee, setValue, clearErrors]);
31887
+ useEffect(() => {
31888
+ if (!isGovernmentEmployee) {
31889
+ setValue("governmentEmployee.organizationName", "");
31890
+ setValue("governmentEmployee.natureOfWork", "");
31891
+ setValue("governmentEmployee.organizationDocument", null);
31892
+ clearErrors("governmentEmployee.organizationName");
31893
+ clearErrors("governmentEmployee.natureOfWork");
31894
+ clearErrors("governmentEmployee.organizationDocument");
31895
+ }
31896
+ }, [isGovernmentEmployee, setValue, clearErrors]);
31324
31897
  useEffect(() => {
31325
31898
  if (!isHospitalProperty) {
31326
31899
  setValue("useDetails.hospitalBeds", "");
@@ -31328,11 +31901,30 @@ const NewApplication = () => {
31328
31901
  }
31329
31902
  }, [isHospitalProperty, setValue, clearErrors]);
31330
31903
  useEffect(() => {
31331
- const isValidSubLocality = selectedSubLocality ? subLocalityOptions.some(option => option.code === selectedSubLocality.code) : true;
31332
- if (!isValidSubLocality) {
31333
- setValue("propertyAddress.subLocality", null);
31904
+ if (!isTenantOrRelative) {
31905
+ setValue("applicationSelection.ownerAuthorizationDoc", null);
31906
+ setValue("applicationSelection.ownerContactNumber", "");
31907
+ setValue("applicationSelection.ownerOtp", "");
31908
+ setValue("applicationSelection.isOwnerVerified", false);
31909
+ setIsOtpSent(false);
31910
+ clearErrors("applicationSelection.ownerAuthorizationDoc");
31911
+ clearErrors("applicationSelection.ownerContactNumber");
31912
+ clearErrors("applicationSelection.ownerOtp");
31913
+ }
31914
+ }, [isTenantOrRelative, setValue, clearErrors]);
31915
+ useEffect(() => {
31916
+ if (!subCategoryIsDomestic) {
31917
+ setValue("applicationSelection.domesticType", null);
31918
+ clearErrors("applicationSelection.domesticType");
31919
+ }
31920
+ }, [subCategoryIsDomestic, setValue, clearErrors]);
31921
+ useEffect(() => {
31922
+ if (!connectionTypeIsTemporary) {
31923
+ setValue("applicationSelection.temporaryConnection", null);
31924
+ clearErrors("applicationSelection.temporaryConnection");
31334
31925
  }
31335
- }, [selectedLocality === null || selectedLocality === void 0 ? void 0 : selectedLocality.code, selectedSubLocality === null || selectedSubLocality === void 0 ? void 0 : selectedSubLocality.code, setValue]);
31926
+ }, [connectionTypeIsTemporary, setValue, clearErrors]);
31927
+ useEffect(() => {}, [selectedLocality === null || selectedLocality === void 0 ? void 0 : selectedLocality.code, setValue]);
31336
31928
  const closeToast = () => setShowToast(null);
31337
31929
  const closeToastOfError = () => setShowToast(null);
31338
31930
  const toggleSection = sectionKey => {
@@ -31342,11 +31934,6 @@ const NewApplication = () => {
31342
31934
  }));
31343
31935
  };
31344
31936
  const getFieldError = fieldName => resolveNestedValue(errors, fieldName);
31345
- const refreshCaptcha = () => {
31346
- setGeneratedCaptcha(generateCaptcha());
31347
- setValue("declaration.captcha", "");
31348
- clearErrors("declaration.captcha");
31349
- };
31350
31937
  const uploadFile = async (event, fieldName, onChange) => {
31351
31938
  var _event$target, _event$target$files;
31352
31939
  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 +31947,7 @@ const NewApplication = () => {
31360
31947
  }));
31361
31948
  clearErrors(fieldName);
31362
31949
  try {
31363
- var _response$data, _response$data$files, _response$data$files$;
31950
+ var _response$data4, _response$data4$files, _response$data4$files2;
31364
31951
  if (file.size > MAX_FILE_SIZE) {
31365
31952
  throw new Error("File size should be 5 MB or less.");
31366
31953
  }
@@ -31368,7 +31955,7 @@ const NewApplication = () => {
31368
31955
  throw new Error("Only PDF, PNG, JPG and JPEG files are supported.");
31369
31956
  }
31370
31957
  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;
31958
+ 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
31959
  if (!fileStoreId) {
31373
31960
  throw new Error("File upload failed. Please try again.");
31374
31961
  }
@@ -31408,22 +31995,6 @@ const NewApplication = () => {
31408
31995
  });
31409
31996
  }
31410
31997
  };
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
31998
  const onPreview = data => {
31428
31999
  if (hasPendingUpload) {
31429
32000
  setShowToast({
@@ -31432,7 +32003,6 @@ const NewApplication = () => {
31432
32003
  });
31433
32004
  return;
31434
32005
  }
31435
- if (!validateCaptcha(data)) return;
31436
32006
  setPreviewMode(true);
31437
32007
  scrollToTop();
31438
32008
  };
@@ -31445,7 +32015,6 @@ const NewApplication = () => {
31445
32015
  });
31446
32016
  return;
31447
32017
  }
31448
- if (!validateCaptcha(data)) return;
31449
32018
  if (!(propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop = propertyDetails.Properties) !== null && _propertyDetails$Prop !== void 0 && _propertyDetails$Prop[0])) {
31450
32019
  setShowToast({
31451
32020
  key: "error",
@@ -31670,10 +32239,25 @@ const NewApplication = () => {
31670
32239
  setPreviewMode(false);
31671
32240
  scrollToTop();
31672
32241
  };
32242
+ const handleSectionEdit = sectionKey => {
32243
+ setPreviewMode(false);
32244
+ setTimeout(() => {
32245
+ var _sectionRefs$sectionK;
32246
+ const element = (_sectionRefs$sectionK = sectionRefs[sectionKey]) === null || _sectionRefs$sectionK === void 0 ? void 0 : _sectionRefs$sectionK.current;
32247
+ if (element) {
32248
+ const headerOffset = 100;
32249
+ const elementPosition = element.getBoundingClientRect().top;
32250
+ const offsetPosition = elementPosition + window.pageYOffset - headerOffset;
32251
+ window.scrollTo({
32252
+ top: offsetPosition,
32253
+ behavior: "smooth"
32254
+ });
32255
+ }
32256
+ }, 100);
32257
+ };
31673
32258
  const onReset = () => {
31674
32259
  reset(DEFAULT_FORM_VALUES);
31675
32260
  setPreviewMode(false);
31676
- setGeneratedCaptcha(generateCaptcha());
31677
32261
  setCollapsedSections(DEFAULT_SECTION_STATE);
31678
32262
  setUploadingFields({});
31679
32263
  setShowToast(null);
@@ -31710,74 +32294,82 @@ const NewApplication = () => {
31710
32294
  .ws-new-application-collapsible .collapsible-card-tab-content {
31711
32295
  padding: 0;
31712
32296
  }
31713
- `), /*#__PURE__*/React.createElement(Header, null, t("New Water / Sewerage Application")), /*#__PURE__*/React.createElement("div", {
32297
+
32298
+ .avatar-upload-container {
32299
+ display: flex;
32300
+ flex-direction: column;
32301
+ align-items: center;
32302
+ justify-content: center;
32303
+ grid-column: 1 / -1;
32304
+ }
32305
+
32306
+ .avatar-wrapper {
32307
+ position: relative;
32308
+ width: 120px;
32309
+ height: 120px;
32310
+ }
32311
+
32312
+ .avatar-circle {
32313
+ width: 100%;
32314
+ height: 100%;
32315
+ border-radius: 50%;
32316
+ border: 2px solid #E5E7EB;
32317
+ overflow: hidden;
32318
+ background-color: #F3F4F6;
32319
+ display: flex;
32320
+ justify-content: center;
32321
+ align-items: center;
32322
+ cursor: pointer;
32323
+ transition: all 0.2s ease;
32324
+ }
32325
+
32326
+ .avatar-circle:hover {
32327
+ border-color: #0B4B66;
32328
+ opacity: 0.9;
32329
+ }
32330
+
32331
+ .avatar-circle img {
32332
+ width: 100%;
32333
+ height: 100%;
32334
+ object-fit: cover;
32335
+ }
32336
+
32337
+ .avatar-placeholder {
32338
+ display: flex;
32339
+ justify-content: center;
32340
+ align-items: center;
32341
+ }
32342
+
32343
+ .avatar-edit-icon {
32344
+ position: absolute;
32345
+ bottom: 4px;
32346
+ right: 4px;
32347
+ background: white;
32348
+ width: 36px;
32349
+ height: 36px;
32350
+ border-radius: 50%;
32351
+ display: flex;
32352
+ justify-content: center;
32353
+ align-items: center;
32354
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
32355
+ border: 1px solid #E5E7EB;
32356
+ cursor: pointer;
32357
+ transition: all 0.2s ease;
32358
+ }
32359
+
32360
+ .avatar-edit-icon:hover {
32361
+ transform: scale(1.1);
32362
+ background-color: #F9FAFB;
32363
+ }
32364
+ `), /*#__PURE__*/React.createElement("div", {
31714
32365
  style: {
31715
32366
  display: "flex",
31716
32367
  alignItems: "flex-start",
31717
- gap: "24px"
32368
+ gap: "24px",
32369
+ marginBottom: "80px"
31718
32370
  }
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
- }],
32371
+ }, !previewMode && /*#__PURE__*/React.createElement(VerticalTimeline, {
32372
+ config: timelineConfig,
31781
32373
  currentActiveIndex: currentStep - 1,
31782
32374
  showFinalStep: false
31783
32375
  }), /*#__PURE__*/React.createElement("div", {
@@ -31786,11 +32378,16 @@ const NewApplication = () => {
31786
32378
  overflowY: "auto",
31787
32379
  minWidth: 0
31788
32380
  }
32381
+ }, /*#__PURE__*/React.createElement("div", {
32382
+ style: {
32383
+ display: previewMode ? "none" : "block"
32384
+ }
31789
32385
  }, /*#__PURE__*/React.createElement(SectionCard, {
31790
32386
  isOpen: collapsedSections.application,
31791
32387
  onToggle: toggleSection,
31792
32388
  sectionKey: "application",
31793
- title: "Application Selection"
32389
+ title: "Application Selection",
32390
+ sectionRef: sectionRefs.application
31794
32391
  }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
31795
32392
  className: "card-label-smaller"
31796
32393
  }, "ZRO Location"), /*#__PURE__*/React.createElement("div", {
@@ -31805,11 +32402,12 @@ const NewApplication = () => {
31805
32402
  isMandatory: true,
31806
32403
  render: props => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Dropdown, {
31807
32404
  className: "form-field",
31808
- selected: getValues("gender"),
32405
+ selected: props.value,
31809
32406
  disable: false,
31810
32407
  option: menu,
31811
32408
  errorStyle: !!getFieldError("zro"),
31812
32409
  select: e => {
32410
+ props.onChange(e);
31813
32411
  setZro(prev => ({
31814
32412
  ...prev,
31815
32413
  value: e
@@ -31821,61 +32419,336 @@ const NewApplication = () => {
31821
32419
  }))
31822
32420
  }))), localFormState && zro.error && /*#__PURE__*/React.createElement(CardLabelError, null, zro.error), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
31823
32421
  className: "card-label-smaller"
31824
- }, "Type of Request"), /*#__PURE__*/React.createElement("div", {
32422
+ }, "Service Type"), /*#__PURE__*/React.createElement("div", {
31825
32423
  className: "field"
31826
32424
  }, /*#__PURE__*/React.createElement(Controller, {
31827
32425
  control: control,
31828
- name: "zro",
31829
- defaultValue: zro,
32426
+ name: "applicationSelection.serviceType",
31830
32427
  rules: {
31831
32428
  required: t("REQUIRED_FIELD")
31832
32429
  },
31833
32430
  isMandatory: true,
31834
- render: props => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Dropdown, {
32431
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
31835
32432
  className: "form-field",
31836
- selected: getValues("gender"),
32433
+ selected: props.value,
31837
32434
  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
- },
32435
+ option: dropdownData.serviceTypes,
32436
+ errorStyle: !!getFieldError("applicationSelection.serviceType"),
32437
+ select: props.onChange,
31846
32438
  optionKey: "name",
31847
32439
  onBlur: props.onBlur,
31848
32440
  t: t
31849
- }))
31850
- }))), localFormState && zro.error && /*#__PURE__*/React.createElement(CardLabelError, null, zro.error), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32441
+ })
32442
+ }))), 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
32443
  className: "card-label-smaller"
31852
- }, "Connection Type"), /*#__PURE__*/React.createElement("div", {
32444
+ }, "Applicant Type"), /*#__PURE__*/React.createElement("div", {
31853
32445
  className: "field"
31854
32446
  }, /*#__PURE__*/React.createElement(Controller, {
31855
32447
  control: control,
31856
- name: "zro",
31857
- defaultValue: zro,
32448
+ name: "applicationSelection.applicantType",
31858
32449
  rules: {
31859
32450
  required: t("REQUIRED_FIELD")
31860
32451
  },
31861
32452
  isMandatory: true,
31862
- render: props => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Dropdown, {
32453
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
31863
32454
  className: "form-field",
31864
- selected: getValues("gender"),
32455
+ selected: props.value,
31865
32456
  disable: false,
31866
- option: CONNECTION_TYPE_OPTIONS,
31867
- errorStyle: !!getFieldError("zro"),
31868
- select: e => {
31869
- setZro(prev => ({
31870
- ...prev,
31871
- value: e
31872
- }));
31873
- },
32457
+ option: dropdownData.applicantTypes,
32458
+ errorStyle: !!getFieldError("applicationSelection.applicantType"),
32459
+ select: props.onChange,
31874
32460
  optionKey: "name",
31875
32461
  onBlur: props.onBlur,
31876
32462
  t: t
31877
- }))
31878
- }))), localFormState && zro.error && /*#__PURE__*/React.createElement(CardLabelError, null, zro.error)), /*#__PURE__*/React.createElement("div", {
32463
+ })
32464
+ }))), getFieldError("applicationSelection.applicantType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError2 = getFieldError("applicationSelection.applicantType")) === null || _getFieldError2 === void 0 ? void 0 : _getFieldError2.message), isTenantOrRelative && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32465
+ className: "card-label-smaller"
32466
+ }, "Owner Authorization"), /*#__PURE__*/React.createElement("div", {
32467
+ className: "field"
32468
+ }, /*#__PURE__*/React.createElement(Controller, {
32469
+ control: control,
32470
+ name: "applicationSelection.ownerAuthorizationDoc",
32471
+ rules: {
32472
+ required: isTenantOrRelative ? "Owner Authorization is required" : false
32473
+ },
32474
+ render: props => /*#__PURE__*/React.createElement(FileUploadField, {
32475
+ error: getFieldError("applicationSelection.ownerAuthorizationDoc"),
32476
+ id: "owner-auth-doc",
32477
+ isUploading: !!uploadingFields["applicationSelection.ownerAuthorizationDoc"],
32478
+ onDelete: () => clearUploadedFile("applicationSelection.ownerAuthorizationDoc", props.onChange),
32479
+ onUpload: event => uploadFile(event, "applicationSelection.ownerAuthorizationDoc", props.onChange),
32480
+ value: props.value
32481
+ })
32482
+ }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32483
+ className: "card-label-smaller"
32484
+ }, "Owner Contact Number"), /*#__PURE__*/React.createElement("div", {
32485
+ className: "field",
32486
+ style: {
32487
+ display: "flex",
32488
+ alignItems: "center",
32489
+ gap: "10px"
32490
+ }
32491
+ }, /*#__PURE__*/React.createElement("div", {
32492
+ style: {
32493
+ flex: 1
32494
+ }
32495
+ }, /*#__PURE__*/React.createElement(TextInput, {
32496
+ name: "applicationSelection.ownerContactNumber",
32497
+ inputRef: register({
32498
+ required: isTenantOrRelative ? "Owner Contact Number is required" : false,
32499
+ pattern: {
32500
+ value: MOBILE_PATTERN,
32501
+ message: "Enter a valid 10-digit mobile number."
32502
+ }
32503
+ }),
32504
+ errorStyle: !!getFieldError("applicationSelection.ownerContactNumber"),
32505
+ maxlength: 10,
32506
+ disable: isOwnerVerified
32507
+ })), !isOwnerVerified && /*#__PURE__*/React.createElement("button", {
32508
+ type: "button",
32509
+ style: linkButtonStyle,
32510
+ onClick: () => {
32511
+ const mobile = watch("applicationSelection.ownerContactNumber");
32512
+ if (MOBILE_PATTERN.test(mobile)) {
32513
+ setIsOtpSent(true);
32514
+ setOtpError(null);
32515
+ } else {
32516
+ setError("applicationSelection.ownerContactNumber", {
32517
+ type: "manual",
32518
+ message: "Enter a valid mobile number first."
32519
+ });
32520
+ }
32521
+ }
32522
+ }, isOtpSent ? "Resend OTP" : "Verify"), isOwnerVerified && /*#__PURE__*/React.createElement("span", {
32523
+ style: {
32524
+ color: "green",
32525
+ fontSize: "14px",
32526
+ fontWeight: "600"
32527
+ }
32528
+ }, "Verified \u2713"))), getFieldError("applicationSelection.ownerContactNumber") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError3 = getFieldError("applicationSelection.ownerContactNumber")) === null || _getFieldError3 === void 0 ? void 0 : _getFieldError3.message), isOtpSent && !isOwnerVerified && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32529
+ className: "card-label-smaller"
32530
+ }, "OTP Verification"), /*#__PURE__*/React.createElement("div", {
32531
+ className: "field",
32532
+ style: {
32533
+ display: "flex",
32534
+ alignItems: "center",
32535
+ gap: "10px"
32536
+ }
32537
+ }, /*#__PURE__*/React.createElement("div", {
32538
+ style: {
32539
+ flex: 1
32540
+ }
32541
+ }, /*#__PURE__*/React.createElement(TextInput, {
32542
+ name: "applicationSelection.ownerOtp",
32543
+ inputRef: register({
32544
+ required: isOtpSent ? "OTP is required" : false
32545
+ }),
32546
+ errorStyle: !!getFieldError("applicationSelection.ownerOtp") || !!otpError,
32547
+ maxlength: 6
32548
+ })), /*#__PURE__*/React.createElement("button", {
32549
+ type: "button",
32550
+ style: linkButtonStyle,
32551
+ onClick: () => {
32552
+ const otp = watch("applicationSelection.ownerOtp");
32553
+ if (otp && otp.length === 6) {
32554
+ setValue("applicationSelection.isOwnerVerified", true);
32555
+ setIsOtpSent(false);
32556
+ setOtpError(null);
32557
+ clearErrors("applicationSelection.ownerOtp");
32558
+ } else {
32559
+ setOtpError("Enter 6 digit OTP");
32560
+ }
32561
+ }
32562
+ }, "Confirm"))), (getFieldError("applicationSelection.ownerOtp") || otpError) && /*#__PURE__*/React.createElement(CardLabelError, null, ((_getFieldError4 = getFieldError("applicationSelection.ownerOtp")) === null || _getFieldError4 === void 0 ? void 0 : _getFieldError4.message) || otpError)), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32563
+ className: "card-label-smaller"
32564
+ }, "Connection Type"), /*#__PURE__*/React.createElement("div", {
32565
+ className: "field"
32566
+ }, /*#__PURE__*/React.createElement(Controller, {
32567
+ control: control,
32568
+ name: "applicationSelection.connectionType",
32569
+ rules: {
32570
+ required: t("REQUIRED_FIELD")
32571
+ },
32572
+ isMandatory: true,
32573
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
32574
+ className: "form-field",
32575
+ selected: props.value,
32576
+ disable: false,
32577
+ option: dropdownData.connectionTypes,
32578
+ errorStyle: !!getFieldError("applicationSelection.connectionType"),
32579
+ select: props.onChange,
32580
+ optionKey: "name",
32581
+ onBlur: props.onBlur,
32582
+ t: t
32583
+ })
32584
+ }))), getFieldError("applicationSelection.connectionType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError5 = getFieldError("applicationSelection.connectionType")) === null || _getFieldError5 === void 0 ? void 0 : _getFieldError5.message), connectionTypeIsTemporary && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32585
+ className: "card-label-smaller"
32586
+ }, "Temporary Connection"), /*#__PURE__*/React.createElement("div", {
32587
+ className: "field"
32588
+ }, /*#__PURE__*/React.createElement(Controller, {
32589
+ control: control,
32590
+ name: "applicationSelection.temporaryConnection",
32591
+ rules: {
32592
+ required: connectionTypeIsTemporary ? t("REQUIRED_FIELD") : false
32593
+ },
32594
+ isMandatory: true,
32595
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
32596
+ className: "form-field",
32597
+ selected: props.value,
32598
+ disable: false,
32599
+ option: dropdownData.temporaryConnectionTypes,
32600
+ errorStyle: !!getFieldError("applicationSelection.temporaryConnection"),
32601
+ select: props.onChange,
32602
+ optionKey: "name",
32603
+ onBlur: props.onBlur,
32604
+ t: t
32605
+ })
32606
+ }))), connectionTypeIsTemporary && getFieldError("applicationSelection.temporaryConnection") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError6 = getFieldError("applicationSelection.temporaryConnection")) === null || _getFieldError6 === void 0 ? void 0 : _getFieldError6.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32607
+ className: "card-label-smaller"
32608
+ }, "Category Type"), /*#__PURE__*/React.createElement("div", {
32609
+ className: "field"
32610
+ }, /*#__PURE__*/React.createElement(Controller, {
32611
+ control: control,
32612
+ name: "applicationSelection.subCategory",
32613
+ rules: {
32614
+ required: t("REQUIRED_FIELD")
32615
+ },
32616
+ isMandatory: true,
32617
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
32618
+ className: "form-field",
32619
+ selected: props.value,
32620
+ disable: false,
32621
+ option: dropdownData.subCategories,
32622
+ errorStyle: !!getFieldError("applicationSelection.subCategory"),
32623
+ select: props.onChange,
32624
+ optionKey: "name",
32625
+ onBlur: props.onBlur,
32626
+ t: t
32627
+ })
32628
+ }))), getFieldError("applicationSelection.subCategory") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError7 = getFieldError("applicationSelection.subCategory")) === null || _getFieldError7 === void 0 ? void 0 : _getFieldError7.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32629
+ className: "card-label-smaller"
32630
+ }, "Water Demand Type"), /*#__PURE__*/React.createElement("div", {
32631
+ className: "field"
32632
+ }, /*#__PURE__*/React.createElement(Controller, {
32633
+ control: control,
32634
+ name: "applicationSelection.categoryType",
32635
+ rules: {
32636
+ required: t("REQUIRED_FIELD")
32637
+ },
32638
+ isMandatory: true,
32639
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
32640
+ className: "form-field",
32641
+ selected: props.value,
32642
+ disable: false,
32643
+ option: dropdownData.categoryTypes,
32644
+ errorStyle: !!getFieldError("applicationSelection.categoryType"),
32645
+ select: props.onChange,
32646
+ optionKey: "name",
32647
+ onBlur: props.onBlur,
32648
+ t: t
32649
+ })
32650
+ }))), getFieldError("applicationSelection.categoryType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError8 = getFieldError("applicationSelection.categoryType")) === null || _getFieldError8 === void 0 ? void 0 : _getFieldError8.message), subCategoryIsDomestic && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32651
+ className: "card-label-smaller"
32652
+ }, "Domestic Type"), /*#__PURE__*/React.createElement("div", {
32653
+ className: "field"
32654
+ }, /*#__PURE__*/React.createElement(Controller, {
32655
+ control: control,
32656
+ name: "applicationSelection.domesticType",
32657
+ rules: {
32658
+ required: subCategoryIsDomestic ? t("REQUIRED_FIELD") : false
32659
+ },
32660
+ render: props => /*#__PURE__*/React.createElement(RadioButtons, {
32661
+ onSelect: props.onChange,
32662
+ selectedOption: props.value,
32663
+ optionsKey: "name",
32664
+ options: [{
32665
+ code: "INDIVIDUAL",
32666
+ name: "Individual"
32667
+ }, {
32668
+ code: "ORGANIZATION",
32669
+ name: "Organization"
32670
+ }]
32671
+ })
32672
+ }))), subCategoryIsDomestic && getFieldError("applicationSelection.domesticType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError9 = getFieldError("applicationSelection.domesticType")) === null || _getFieldError9 === void 0 ? void 0 : _getFieldError9.message), subCategoryIsCommercial && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32673
+ className: "card-label-smaller"
32674
+ }, "Commercial Type"), /*#__PURE__*/React.createElement("div", {
32675
+ className: "field"
32676
+ }, /*#__PURE__*/React.createElement(Controller, {
32677
+ control: control,
32678
+ name: "applicationSelection.commercialType",
32679
+ rules: {
32680
+ required: t("REQUIRED_FIELD")
32681
+ },
32682
+ isMandatory: true,
32683
+ render: props => /*#__PURE__*/React.createElement(RadioButtons, {
32684
+ onSelect: props.onChange,
32685
+ selectedOption: props.value,
32686
+ options: [{
32687
+ code: "INDIVIDUAL",
32688
+ name: "Individual"
32689
+ }, {
32690
+ code: "ORGANIZATION",
32691
+ name: "Organization"
32692
+ }],
32693
+ optionsKey: "name",
32694
+ t: t
32695
+ })
32696
+ }))))), /*#__PURE__*/React.createElement(SectionCard, {
32697
+ description: "Enable this section only when the applicant is a Government Connection.",
32698
+ isOpen: collapsedSections.governmentEmployee,
32699
+ onToggle: toggleSection,
32700
+ sectionKey: "governmentEmployee",
32701
+ title: "Government Connection",
32702
+ sectionRef: sectionRefs.governmentEmployee
32703
+ }, /*#__PURE__*/React.createElement(FieldBlock, {
32704
+ label: "Government Connection"
32705
+ }, /*#__PURE__*/React.createElement(Controller, {
32706
+ control: control,
32707
+ name: "governmentEmployee.isGovernmentEmployee",
32708
+ render: props => /*#__PURE__*/React.createElement(CheckBox, {
32709
+ checked: !!props.value,
32710
+ label: "Applicant is a Government Connection",
32711
+ onChange: event => props.onChange(event.target.checked)
32712
+ })
32713
+ })), isGovernmentEmployee && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32714
+ className: "card-label-smaller"
32715
+ }, "Organization Name"), /*#__PURE__*/React.createElement("div", {
32716
+ className: "field"
32717
+ }, /*#__PURE__*/React.createElement(TextInput, {
32718
+ name: "governmentEmployee.organizationName",
32719
+ inputRef: register({
32720
+ required: isGovernmentEmployee ? "Organization Name is required" : false
32721
+ }),
32722
+ errorStyle: !!getFieldError("governmentEmployee.organizationName")
32723
+ }))), getFieldError("governmentEmployee.organizationName") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError0 = getFieldError("governmentEmployee.organizationName")) === null || _getFieldError0 === void 0 ? void 0 : _getFieldError0.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32724
+ className: "card-label-smaller"
32725
+ }, "Nature of Work"), /*#__PURE__*/React.createElement("div", {
32726
+ className: "field"
32727
+ }, /*#__PURE__*/React.createElement(TextInput, {
32728
+ name: "governmentEmployee.natureOfWork",
32729
+ inputRef: register({
32730
+ required: isGovernmentEmployee ? "Nature of Work is required" : false
32731
+ }),
32732
+ errorStyle: !!getFieldError("governmentEmployee.natureOfWork")
32733
+ }))), getFieldError("governmentEmployee.natureOfWork") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError1 = getFieldError("governmentEmployee.natureOfWork")) === null || _getFieldError1 === void 0 ? void 0 : _getFieldError1.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32734
+ className: "card-label-smaller"
32735
+ }, "Upload Document"), /*#__PURE__*/React.createElement("div", {
32736
+ className: "field"
32737
+ }, /*#__PURE__*/React.createElement(Controller, {
32738
+ control: control,
32739
+ name: "governmentEmployee.organizationDocument",
32740
+ rules: {
32741
+ required: isGovernmentEmployee ? "Document is required" : false
32742
+ },
32743
+ render: props => /*#__PURE__*/React.createElement(FileUploadField, {
32744
+ error: getFieldError("governmentEmployee.organizationDocument"),
32745
+ id: "govt-org-doc",
32746
+ isUploading: !!uploadingFields["governmentEmployee.organizationDocument"],
32747
+ onDelete: () => clearUploadedFile("governmentEmployee.organizationDocument", props.onChange),
32748
+ onUpload: event => uploadFile(event, "governmentEmployee.organizationDocument", props.onChange),
32749
+ value: props.value
32750
+ })
32751
+ }))))), /*#__PURE__*/React.createElement("div", {
31879
32752
  style: {
31880
32753
  display: previewMode ? "none" : "block"
31881
32754
  }
@@ -31884,8 +32757,27 @@ const NewApplication = () => {
31884
32757
  isOpen: collapsedSections.applicant,
31885
32758
  onToggle: toggleSection,
31886
32759
  sectionKey: "applicant",
31887
- title: "Details of Applicant"
31888
- }, /*#__PURE__*/React.createElement(FieldBlock, {
32760
+ title: applicantSectionTitle,
32761
+ sectionRef: sectionRefs.applicant
32762
+ }, /*#__PURE__*/React.createElement(Controller, {
32763
+ control: control,
32764
+ name: "applicant.UploadPicture",
32765
+ rules: {
32766
+ validate: value => !!value || "Applicant Picture is required."
32767
+ },
32768
+ render: props => {
32769
+ var _getFieldError10;
32770
+ return /*#__PURE__*/React.createElement(ProfileImageUpload, {
32771
+ error: (_getFieldError10 = getFieldError("applicant.UploadPicture")) === null || _getFieldError10 === void 0 ? void 0 : _getFieldError10.message,
32772
+ isUploading: !!uploadingFields["applicant.UploadPicture"],
32773
+ label: "Upload Picture",
32774
+ onUpload: event => uploadFile(event, "applicant.UploadPicture", props.onChange),
32775
+ required: true,
32776
+ t: t,
32777
+ value: props.value
32778
+ });
32779
+ }
32780
+ }), /*#__PURE__*/React.createElement(FieldBlock, {
31889
32781
  error: getFieldError("applicant.firstName"),
31890
32782
  label: "First Name",
31891
32783
  required: true
@@ -31926,64 +32818,43 @@ const NewApplication = () => {
31926
32818
  }),
31927
32819
  name: "applicant.lastName"
31928
32820
  })), /*#__PURE__*/React.createElement(FieldBlock, {
31929
- error: getFieldError("applicant.fatherOrHusbandName"),
31930
- label: "Father / Husband Name",
32821
+ error: getFieldError("useDetails.gender"),
32822
+ label: "Gender",
32823
+ required: true
32824
+ }, /*#__PURE__*/React.createElement(Controller, {
32825
+ control: control,
32826
+ name: "useDetails.gender",
32827
+ rules: {
32828
+ required: "Gender is required."
32829
+ },
32830
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
32831
+ option: [{
32832
+ name: "Male",
32833
+ code: "MALE"
32834
+ }, {
32835
+ name: "Female",
32836
+ code: "FEMALE"
32837
+ }],
32838
+ optionKey: "name",
32839
+ selected: props.value,
32840
+ select: props.onChange,
32841
+ t: t
32842
+ })
32843
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
32844
+ error: getFieldError("applicant.ParentorSpouse"),
32845
+ label: "Parent/ spouse",
31931
32846
  required: true
31932
32847
  }, /*#__PURE__*/React.createElement(TextInput, {
31933
- errorStyle: !!getFieldError("applicant.fatherOrHusbandName"),
32848
+ errorStyle: !!getFieldError("applicant.ParentorSpouse"),
31934
32849
  inputRef: register({
31935
32850
  pattern: {
31936
32851
  value: NAME_PATTERN,
31937
32852
  message: "Use letters only."
31938
32853
  },
31939
- required: "Father / Husband Name is required."
32854
+ required: "Parent/ spouse Name is required."
31940
32855
  }),
31941
- name: "applicant.fatherOrHusbandName"
32856
+ name: "applicant.ParentorSpouse"
31942
32857
  })), /*#__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
32858
  error: getFieldError("contact.emailId"),
31988
32859
  label: "Email ID",
31989
32860
  required: true
@@ -32013,23 +32884,25 @@ const NewApplication = () => {
32013
32884
  maxlength: 10,
32014
32885
  name: "contact.mobileNumber"
32015
32886
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32016
- error: getFieldError("contact.officeNumber"),
32017
- label: "Office No."
32887
+ error: getFieldError("contact.whatsAppNumber"),
32888
+ label: "WhatsApp Number"
32018
32889
  }, /*#__PURE__*/React.createElement(TextInput, {
32019
- errorStyle: !!getFieldError("contact.officeNumber"),
32890
+ errorStyle: !!getFieldError("contact.whatsAppNumber"),
32020
32891
  inputRef: register({
32021
32892
  pattern: {
32022
- value: OFFICE_PATTERN,
32023
- message: "Enter a valid office number."
32893
+ value: MOBILE_PATTERN,
32894
+ message: "Enter a valid 10-digit WhatsApp number."
32024
32895
  }
32025
32896
  }),
32026
- name: "contact.officeNumber"
32897
+ maxlength: 10,
32898
+ name: "contact.whatsAppNumber"
32027
32899
  }))), /*#__PURE__*/React.createElement(SectionCard, {
32028
32900
  description: "Enable this section only when the applicant is a DJB employee.",
32029
32901
  isOpen: collapsedSections.employee,
32030
32902
  onToggle: toggleSection,
32031
- sectionKey: "employee",
32032
- title: "For DJB Employee"
32903
+ sectionKey: "djbEmployee",
32904
+ title: "DJB Employee",
32905
+ sectionRef: sectionRefs.djbEmployee
32033
32906
  }, /*#__PURE__*/React.createElement(FieldBlock, {
32034
32907
  label: "DJB Employee"
32035
32908
  }, /*#__PURE__*/React.createElement(Controller, {
@@ -32040,7 +32913,7 @@ const NewApplication = () => {
32040
32913
  label: "Applicant is a DJB Employee",
32041
32914
  onChange: event => props.onChange(event.target.checked)
32042
32915
  })
32043
- })), /*#__PURE__*/React.createElement(FieldBlock, {
32916
+ })), isDjbEmployee && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FieldBlock, {
32044
32917
  error: getFieldError("djbEmployee.employeeId"),
32045
32918
  label: "Employee ID",
32046
32919
  required: isDjbEmployee
@@ -32078,123 +32951,158 @@ const NewApplication = () => {
32078
32951
  style: {
32079
32952
  minHeight: "96px"
32080
32953
  }
32081
- }))), /*#__PURE__*/React.createElement(SectionCard, {
32954
+ })))), /*#__PURE__*/React.createElement(SectionCard, {
32082
32955
  description: "Property location and administrative boundary details.",
32083
32956
  isOpen: collapsedSections.address,
32084
32957
  onToggle: toggleSection,
32085
- sectionKey: "address",
32086
- title: "Property Address"
32958
+ sectionKey: "propertyAddress",
32959
+ title: "Property Address",
32960
+ sectionRef: sectionRefs.propertyAddress
32087
32961
  }, /*#__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
32962
+ error: getFieldError("propertyAddress.city"),
32963
+ label: "City"
32127
32964
  }, /*#__PURE__*/React.createElement(Controller, {
32128
32965
  control: control,
32129
- name: "propertyAddress.locality",
32130
- rules: {
32131
- required: "Locality is required."
32132
- },
32966
+ name: "propertyAddress.city",
32133
32967
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32134
- option: LOCALITY_OPTIONS,
32135
- optionKey: "name",
32136
- selected: props.value,
32137
- select: props.onChange,
32138
- t: t
32139
- })
32140
- })), /*#__PURE__*/React.createElement(FieldBlock, {
32141
- error: getFieldError("propertyAddress.subLocality"),
32142
- label: "Sub Locality",
32143
- required: true
32144
- }, /*#__PURE__*/React.createElement(Controller, {
32145
- control: control,
32146
- name: "propertyAddress.subLocality",
32147
- rules: {
32148
- required: "Sub Locality is required."
32149
- },
32150
- render: props => /*#__PURE__*/React.createElement(Dropdown, {
32151
- disable: !selectedLocality,
32152
- option: subLocalityOptions,
32153
- optionKey: "name",
32154
- selected: props.value,
32155
- select: props.onChange,
32156
- t: t
32968
+ className: "form-field",
32969
+ selected: props.value || city,
32970
+ select: val => {
32971
+ setCity(val);
32972
+ props.onChange(val);
32973
+ },
32974
+ option: allCities,
32975
+ optionCardStyles: {
32976
+ overflowY: "auto",
32977
+ maxHeight: "300px"
32978
+ },
32979
+ optionKey: "i18nKey",
32980
+ t: t,
32981
+ style: {
32982
+ width: "100%"
32983
+ },
32984
+ placeholder: "Select"
32157
32985
  })
32158
32986
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32159
- error: getFieldError("propertyAddress.assembly"),
32160
- label: "Assembly",
32987
+ error: getFieldError("propertyAddress.pinCode"),
32988
+ label: "Pin Code",
32161
32989
  required: true
32162
32990
  }, /*#__PURE__*/React.createElement(Controller, {
32163
32991
  control: control,
32164
- name: "propertyAddress.assembly",
32992
+ name: "propertyAddress.pinCode",
32165
32993
  rules: {
32166
- required: "Assembly is required."
32994
+ required: "Pin Code is required."
32167
32995
  },
32168
32996
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32169
- option: ASSEMBLY_OPTIONS,
32170
- optionKey: "name",
32171
- selected: props.value,
32172
- select: props.onChange,
32997
+ option: fetchedPincodes,
32998
+ optionKey: "i18nKey",
32999
+ selected: (fetchedPincodes === null || fetchedPincodes === void 0 ? void 0 : fetchedPincodes.find(p => p.code === props.value)) || (props.value ? {
33000
+ code: props.value,
33001
+ name: props.value,
33002
+ i18nKey: props.value
33003
+ } : null),
33004
+ select: val => {
33005
+ const newPin = val === null || val === void 0 ? void 0 : val.code;
33006
+ if (newPin !== props.value) {
33007
+ setValue("propertyAddress.locality", null);
33008
+ setValue("propertyAddress.zone", "");
33009
+ setValue("propertyAddress.block", "");
33010
+ setValue("propertyAddress.address", "");
33011
+ }
33012
+ props.onChange(newPin);
33013
+ },
32173
33014
  t: t
32174
33015
  })
32175
33016
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32176
- error: getFieldError("propertyAddress.ward"),
32177
- label: "Ward",
33017
+ error: getFieldError("propertyAddress.locality"),
33018
+ label: "Locality",
32178
33019
  required: true
32179
33020
  }, /*#__PURE__*/React.createElement(Controller, {
32180
33021
  control: control,
32181
- name: "propertyAddress.ward",
33022
+ name: "propertyAddress.locality",
32182
33023
  rules: {
32183
- required: "Ward is required."
33024
+ required: "Locality is required."
32184
33025
  },
32185
33026
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32186
- option: WARD_OPTIONS,
32187
- optionKey: "name",
33027
+ option: filteredLocalities,
33028
+ optionKey: "i18nKey",
32188
33029
  selected: props.value,
32189
- select: props.onChange,
33030
+ select: val => {
33031
+ props.onChange(val);
33032
+ if (val !== null && val !== void 0 && val.zone) setValue("propertyAddress.zone", val.zone);
33033
+ if (val !== null && val !== void 0 && val.ward) setValue("propertyAddress.block", val.ward);
33034
+ if (val !== null && val !== void 0 && val.localname) setValue("propertyAddress.address", val.localname);
33035
+ if (val !== null && val !== void 0 && val.pincode) {
33036
+ const p = Array.isArray(val.pincode) ? val.pincode[0] : val.pincode;
33037
+ if (p) {
33038
+ setValue("propertyAddress.pinCode", p.toString().split(".")[0]);
33039
+ }
33040
+ }
33041
+ },
32190
33042
  t: t
32191
33043
  })
33044
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33045
+ error: getFieldError("propertyAddress.state"),
33046
+ label: "State"
33047
+ }, /*#__PURE__*/React.createElement(TextInput, {
33048
+ errorStyle: !!getFieldError("propertyAddress.state"),
33049
+ inputRef: register(),
33050
+ name: "propertyAddress.state"
33051
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33052
+ error: getFieldError("propertyAddress.street"),
33053
+ label: "Street"
33054
+ }, /*#__PURE__*/React.createElement(TextInput, {
33055
+ errorStyle: !!getFieldError("propertyAddress.street"),
33056
+ inputRef: register(),
33057
+ name: "propertyAddress.street"
33058
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33059
+ error: getFieldError("propertyAddress.houseNo"),
33060
+ label: "House No"
33061
+ }, /*#__PURE__*/React.createElement(TextInput, {
33062
+ errorStyle: !!getFieldError("propertyAddress.houseNo"),
33063
+ inputRef: register(),
33064
+ name: "propertyAddress.houseNo"
33065
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33066
+ error: getFieldError("propertyAddress.block"),
33067
+ label: "Block"
33068
+ }, /*#__PURE__*/React.createElement(TextInput, {
33069
+ errorStyle: !!getFieldError("propertyAddress.block"),
33070
+ inputRef: register(),
33071
+ name: "propertyAddress.block"
33072
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33073
+ error: getFieldError("propertyAddress.zone"),
33074
+ label: "Zone"
33075
+ }, /*#__PURE__*/React.createElement(TextInput, {
33076
+ errorStyle: !!getFieldError("propertyAddress.zone"),
33077
+ inputRef: register(),
33078
+ name: "propertyAddress.zone"
33079
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33080
+ error: getFieldError("propertyAddress.landmark"),
33081
+ label: "Landmark"
33082
+ }, /*#__PURE__*/React.createElement(TextInput, {
33083
+ errorStyle: !!getFieldError("propertyAddress.landmark"),
33084
+ inputRef: register(),
33085
+ name: "propertyAddress.landmark"
33086
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33087
+ error: getFieldError("propertyAddress.address"),
33088
+ isFullWidth: true,
33089
+ label: "Address"
33090
+ }, /*#__PURE__*/React.createElement(TextArea, {
33091
+ className: getFieldError("propertyAddress.address") ? "employee-card-input-error" : "",
33092
+ inputRef: register({
33093
+ required: "Address is required."
33094
+ }),
33095
+ name: "propertyAddress.address",
33096
+ style: {
33097
+ minHeight: "96px"
33098
+ }
32192
33099
  }))), /*#__PURE__*/React.createElement(SectionCard, {
32193
33100
  description: "Usage attributes for the property and the requested water connection.",
32194
33101
  isOpen: collapsedSections.usage,
32195
33102
  onToggle: toggleSection,
32196
- sectionKey: "usage",
32197
- title: "Property and Water Connection Use Details"
33103
+ sectionKey: "useDetails",
33104
+ title: "Property and Water Connection Use Details",
33105
+ sectionRef: sectionRefs.useDetails
32198
33106
  }, /*#__PURE__*/React.createElement(FieldBlock, {
32199
33107
  error: getFieldError("useDetails.propertyType"),
32200
33108
  label: "Property Type",
@@ -32206,60 +33114,60 @@ const NewApplication = () => {
32206
33114
  required: "Property Type is required."
32207
33115
  },
32208
33116
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32209
- option: PROPERTY_TYPE_OPTIONS,
33117
+ option: dropdownData.propertyTypes,
32210
33118
  optionKey: "name",
32211
33119
  selected: props.value,
32212
33120
  select: props.onChange,
32213
33121
  t: t
32214
33122
  })
32215
33123
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32216
- error: getFieldError("useDetails.noOfFloors"),
32217
- label: "No. of Floors",
33124
+ error: getFieldError("useDetails.plotArea"),
33125
+ label: "Plot Area (Sq. m.)",
32218
33126
  required: true
32219
33127
  }, /*#__PURE__*/React.createElement(TextInput, {
32220
- errorStyle: !!getFieldError("useDetails.noOfFloors"),
33128
+ errorStyle: !!getFieldError("useDetails.plotArea"),
32221
33129
  inputRef: register({
32222
33130
  pattern: {
32223
- value: NUMBER_PATTERN,
32224
- message: "Enter a valid whole number."
33131
+ value: DECIMAL_PATTERN,
33132
+ message: "Enter a valid numeric value."
32225
33133
  },
32226
- required: "No. of Floors is required."
33134
+ required: "Plot Area is required."
32227
33135
  }),
32228
- name: "useDetails.noOfFloors"
32229
- })), isHospitalProperty ? /*#__PURE__*/React.createElement(FieldBlock, {
32230
- error: getFieldError("useDetails.hospitalBeds"),
32231
- label: "No. of Beds for Hospitals & Nursing Home",
33136
+ name: "useDetails.plotArea"
33137
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33138
+ error: getFieldError("useDetails.builtUpArea"),
33139
+ label: "Built-up Area (Sq. m.)",
32232
33140
  required: true
32233
33141
  }, /*#__PURE__*/React.createElement(TextInput, {
32234
- errorStyle: !!getFieldError("useDetails.hospitalBeds"),
33142
+ errorStyle: !!getFieldError("useDetails.builtUpArea"),
32235
33143
  inputRef: register({
32236
33144
  pattern: {
32237
- value: NUMBER_PATTERN,
32238
- message: "Enter a valid whole number."
33145
+ value: DECIMAL_PATTERN,
33146
+ message: "Enter a valid numeric value."
32239
33147
  },
32240
- required: isHospitalProperty ? "No. of Beds is required for Hospital / Nursing Home." : false
33148
+ required: "Built Up Area is required."
32241
33149
  }),
32242
- name: "useDetails.hospitalBeds"
32243
- })) : null, /*#__PURE__*/React.createElement(FieldBlock, {
32244
- error: getFieldError("useDetails.plotArea"),
32245
- label: "Plot Area in Sqm",
33150
+ name: "useDetails.builtUpArea"
33151
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33152
+ error: getFieldError("useDetails.noOfFloors"),
33153
+ label: "Number of Floors",
32246
33154
  required: true
32247
33155
  }, /*#__PURE__*/React.createElement(TextInput, {
32248
- errorStyle: !!getFieldError("useDetails.plotArea"),
33156
+ errorStyle: !!getFieldError("useDetails.noOfFloors"),
32249
33157
  inputRef: register({
32250
33158
  pattern: {
32251
- value: DECIMAL_PATTERN,
32252
- message: "Enter a valid numeric value."
33159
+ value: NUMBER_PATTERN,
33160
+ message: "Enter a valid whole number."
32253
33161
  },
32254
- required: "Plot Area is required."
33162
+ required: "No. of Floors is required."
32255
33163
  }),
32256
- name: "useDetails.plotArea"
33164
+ name: "useDetails.noOfFloors"
32257
33165
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32258
- error: getFieldError("useDetails.builtUpArea"),
32259
- label: "Built Up Area",
33166
+ error: getFieldError("useDetails.NumberofDwellingUnits"),
33167
+ label: "Number of Dwelling Units",
32260
33168
  required: true
32261
33169
  }, /*#__PURE__*/React.createElement(TextInput, {
32262
- errorStyle: !!getFieldError("useDetails.builtUpArea"),
33170
+ errorStyle: !!getFieldError("useDetails.NumberofDwellingUnits"),
32263
33171
  inputRef: register({
32264
33172
  pattern: {
32265
33173
  value: DECIMAL_PATTERN,
@@ -32267,33 +33175,47 @@ const NewApplication = () => {
32267
33175
  },
32268
33176
  required: "Built Up Area is required."
32269
33177
  }),
32270
- name: "useDetails.builtUpArea"
32271
- })), /*#__PURE__*/React.createElement(FieldBlock, {
32272
- error: getFieldError("useDetails.waterConnectionCategory"),
32273
- label: "Water Connection Category",
33178
+ name: "useDetails.NumberofDwellingUnits"
33179
+ })), isHospitalProperty ? /*#__PURE__*/React.createElement(FieldBlock, {
33180
+ error: getFieldError("useDetails.hospitalBeds"),
33181
+ label: "Number of Beds",
33182
+ required: true
33183
+ }, /*#__PURE__*/React.createElement(TextInput, {
33184
+ errorStyle: !!getFieldError("useDetails.hospitalBeds"),
33185
+ inputRef: register({
33186
+ pattern: {
33187
+ value: NUMBER_PATTERN,
33188
+ message: "Enter a valid whole number."
33189
+ },
33190
+ required: isHospitalProperty ? "No. of Beds is required for Hospital / Nursing Home." : false
33191
+ }),
33192
+ name: "useDetails.hospitalBeds"
33193
+ })) : null, /*#__PURE__*/React.createElement(FieldBlock, {
33194
+ error: getFieldError("useDetails.SelectYearofConstruction"),
33195
+ label: "Select Year of Construction",
32274
33196
  required: true
32275
33197
  }, /*#__PURE__*/React.createElement(Controller, {
32276
33198
  control: control,
32277
- name: "useDetails.waterConnectionCategory",
33199
+ name: "useDetails.SelectYearofConstruction",
32278
33200
  rules: {
32279
- required: "Water Connection Category is required."
33201
+ required: "Select Year of Construction is required."
32280
33202
  },
32281
33203
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32282
- option: WATER_CONNECTION_CATEGORY_OPTIONS,
32283
- optionKey: "name",
33204
+ option: yearOptions,
33205
+ optionKey: "value",
32284
33206
  selected: props.value,
32285
33207
  select: props.onChange,
32286
33208
  t: t
32287
33209
  })
32288
33210
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32289
- error: getFieldError("useDetails.waterConnectionUsedBy"),
32290
- label: "Water Connection Used By",
33211
+ error: getFieldError("useDetails.WaterConnectionUsageType"),
33212
+ label: "Water Connection Usage Type",
32291
33213
  required: true
32292
33214
  }, /*#__PURE__*/React.createElement(Controller, {
32293
33215
  control: control,
32294
- name: "useDetails.waterConnectionUsedBy",
33216
+ name: "useDetails.WaterConnectionUsageType",
32295
33217
  rules: {
32296
- required: "Water Connection Used By is required."
33218
+ required: "Water Connection Usage Type is required."
32297
33219
  },
32298
33220
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32299
33221
  option: WATER_CONNECTION_USED_BY_OPTIONS,
@@ -32306,8 +33228,9 @@ const NewApplication = () => {
32306
33228
  description: "Refund or payment-linked bank account details.",
32307
33229
  isOpen: collapsedSections.bank,
32308
33230
  onToggle: toggleSection,
32309
- sectionKey: "bank",
32310
- title: "Bank Details"
33231
+ sectionKey: "bankDetails",
33232
+ title: "Bank Details",
33233
+ sectionRef: sectionRefs.bankDetails
32311
33234
  }, /*#__PURE__*/React.createElement(FieldBlock, {
32312
33235
  error: getFieldError("bankDetails.bankName"),
32313
33236
  label: "Name of the Bank",
@@ -32359,29 +33282,13 @@ const NewApplication = () => {
32359
33282
  required: "Bank Account Number is required."
32360
33283
  }),
32361
33284
  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
33285
  }))), /*#__PURE__*/React.createElement(SectionCard, {
32380
33286
  description: "Documents to be attached. Maximum allowed file size is 5 MB.",
32381
33287
  isOpen: collapsedSections.documents,
32382
33288
  onToggle: toggleSection,
32383
33289
  sectionKey: "documents",
32384
- title: "Documents to be Attached"
33290
+ title: "Documents to be Attached",
33291
+ sectionRef: sectionRefs.documents
32385
33292
  }, /*#__PURE__*/React.createElement(FieldBlock, {
32386
33293
  error: getFieldError("documents.proofOfIdentity"),
32387
33294
  label: "Proof of Identity",
@@ -32399,6 +33306,14 @@ const NewApplication = () => {
32399
33306
  select: props.onChange,
32400
33307
  t: t
32401
33308
  })
33309
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33310
+ error: getFieldError("propertyAddress.proofOfIdentity"),
33311
+ label: "Proof of Identity Document",
33312
+ required: true
33313
+ }, /*#__PURE__*/React.createElement(TextInput, {
33314
+ errorStyle: !!getFieldError("propertyAddress.proofOfIdentity"),
33315
+ inputRef: register(),
33316
+ name: "propertyAddress.proofOfIdentity"
32402
33317
  })), /*#__PURE__*/React.createElement(Controller, {
32403
33318
  control: control,
32404
33319
  name: "documents.identityProofFile",
@@ -32416,9 +33331,11 @@ const NewApplication = () => {
32416
33331
  required: true,
32417
33332
  value: props.value
32418
33333
  })
33334
+ }), /*#__PURE__*/React.createElement(FieldBlock, {
33335
+ error: getFieldError("propertyAddress.otherDocument")
32419
33336
  }), /*#__PURE__*/React.createElement(FieldBlock, {
32420
33337
  error: getFieldError("documents.ownershipStatus"),
32421
- label: "Ownership Status",
33338
+ label: "Ownership Proof",
32422
33339
  required: true
32423
33340
  }, /*#__PURE__*/React.createElement(Controller, {
32424
33341
  control: control,
@@ -32433,6 +33350,14 @@ const NewApplication = () => {
32433
33350
  select: props.onChange,
32434
33351
  t: t
32435
33352
  })
33353
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33354
+ error: getFieldError("propertyAddress.ownershipStatus"),
33355
+ label: "Proof of Identity Ownership Document",
33356
+ required: true
33357
+ }, /*#__PURE__*/React.createElement(TextInput, {
33358
+ errorStyle: !!getFieldError("propertyAddress.ownershipStatus"),
33359
+ inputRef: register(),
33360
+ name: "propertyAddress.ownershipStatus"
32436
33361
  })), /*#__PURE__*/React.createElement(Controller, {
32437
33362
  control: control,
32438
33363
  name: "documents.ownershipDocumentFile",
@@ -32450,7 +33375,34 @@ const NewApplication = () => {
32450
33375
  required: true,
32451
33376
  value: props.value
32452
33377
  })
32453
- }), /*#__PURE__*/React.createElement(Controller, {
33378
+ }), /*#__PURE__*/React.createElement(FieldBlock, {
33379
+ error: getFieldError("propertyAddress.otherDocument")
33380
+ }), /*#__PURE__*/React.createElement(FieldBlock, {
33381
+ error: getFieldError("documents.otherDocument"),
33382
+ label: "Other Document",
33383
+ required: true
33384
+ }, /*#__PURE__*/React.createElement(Controller, {
33385
+ control: control,
33386
+ name: "documents.otherDocument",
33387
+ rules: {
33388
+ required: "Other Document is required."
33389
+ },
33390
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
33391
+ option: OWNERSHIP_STATUS_OPTIONS,
33392
+ optionKey: "name",
33393
+ selected: props.value,
33394
+ select: props.onChange,
33395
+ t: t
33396
+ })
33397
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33398
+ error: getFieldError("propertyAddress.otherDocument"),
33399
+ label: "Other Document",
33400
+ required: true
33401
+ }, /*#__PURE__*/React.createElement(TextInput, {
33402
+ errorStyle: !!getFieldError("propertyAddress.otherDocument"),
33403
+ inputRef: register(),
33404
+ name: "propertyAddress.otherDocument"
33405
+ })), /*#__PURE__*/React.createElement(Controller, {
32454
33406
  control: control,
32455
33407
  name: "documents.otherDocumentFile",
32456
33408
  render: props => /*#__PURE__*/React.createElement(FileUploadField, {
@@ -32464,23 +33416,34 @@ const NewApplication = () => {
32464
33416
  value: props.value
32465
33417
  })
32466
33418
  })), /*#__PURE__*/React.createElement(SectionCard, {
32467
- description: "Final undertaking details before preview and submit.",
33419
+ description: "Declaration and undertaking to be signed by the applicant.",
32468
33420
  isOpen: collapsedSections.declaration,
32469
33421
  onToggle: toggleSection,
32470
33422
  sectionKey: "declaration",
32471
- title: "Declaration / Undertaking"
32472
- }, /*#__PURE__*/React.createElement(FieldBlock, {
33423
+ title: "Declaration/Undertaking",
33424
+ sectionRef: sectionRefs.declaration
33425
+ }, DECLARATION_POINTS.map((point, index) => /*#__PURE__*/React.createElement("p", {
33426
+ key: index
33427
+ }, /*#__PURE__*/React.createElement("span", null, String(index + 1), "."), /*#__PURE__*/React.createElement("span", null, point))), /*#__PURE__*/React.createElement(FieldBlock, {
33428
+ error: getFieldError("propertyAddress.otherDocument")
33429
+ }), /*#__PURE__*/React.createElement(FieldBlock, {
32473
33430
  error: getFieldError("declaration.submittedBy"),
32474
- label: "Submitted By",
33431
+ label: "Submitted By *",
32475
33432
  required: true
32476
33433
  }, /*#__PURE__*/React.createElement(Controller, {
32477
33434
  control: control,
32478
33435
  name: "declaration.submittedBy",
32479
33436
  rules: {
32480
- required: "Submitted By is required."
33437
+ required: "Submission type is required."
32481
33438
  },
32482
33439
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32483
- option: SUBMITTED_BY_OPTIONS,
33440
+ option: [{
33441
+ code: "SELF",
33442
+ name: "SELF"
33443
+ }, {
33444
+ code: "RELATIVE",
33445
+ name: "Relative"
33446
+ }],
32484
33447
  optionKey: "name",
32485
33448
  selected: props.value,
32486
33449
  select: props.onChange,
@@ -32490,11 +33453,10 @@ const NewApplication = () => {
32490
33453
  control: control,
32491
33454
  name: "declaration.signatureFile",
32492
33455
  rules: {
32493
- validate: value => !!value || "Upload Signature is required."
33456
+ validate: value => !!value || "Signature upload is required."
32494
33457
  },
32495
33458
  render: props => /*#__PURE__*/React.createElement(FileUploadField, {
32496
33459
  error: getFieldError("declaration.signatureFile"),
32497
- helperText: "Max size 5 MB. Allowed types: PDF, PNG, JPG, JPEG.",
32498
33460
  id: "signature-file",
32499
33461
  isUploading: !!uploadingFields["declaration.signatureFile"],
32500
33462
  label: "Upload Signature",
@@ -32503,111 +33465,131 @@ const NewApplication = () => {
32503
33465
  required: true,
32504
33466
  value: props.value
32505
33467
  })
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, {
33468
+ })))), previewMode && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionCard, {
32550
33469
  description: "Selected request and connection type.",
32551
33470
  isOpen: collapsedSections.application,
32552
33471
  onToggle: toggleSection,
32553
33472
  sectionKey: "application",
32554
- title: "Application Selection"
33473
+ title: "Application Selection",
33474
+ onEditClick: () => handleSectionEdit("application")
32555
33475
  }, /*#__PURE__*/React.createElement(PreviewItem, {
32556
- label: "Type of Request",
32557
- value: formValues === null || formValues === void 0 ? void 0 : formValues.typeOfRequest
33476
+ label: "ZRO Location",
33477
+ value: formValues === null || formValues === void 0 ? void 0 : formValues.zro
33478
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33479
+ label: "Service Type",
33480
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati = formValues.applicationSelection) === null || _formValues$applicati === void 0 ? void 0 : _formValues$applicati.serviceType
33481
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33482
+ label: "Applicant Type",
33483
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati2 = formValues.applicationSelection) === null || _formValues$applicati2 === void 0 ? void 0 : _formValues$applicati2.applicantType
32558
33484
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32559
33485
  label: "Connection Type",
32560
- value: formValues === null || formValues === void 0 ? void 0 : formValues.connectionType
32561
- })), /*#__PURE__*/React.createElement(SectionCard, {
33486
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati3 = formValues.applicationSelection) === null || _formValues$applicati3 === void 0 ? void 0 : _formValues$applicati3.connectionType
33487
+ }), (formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati4 = formValues.applicationSelection) === null || _formValues$applicati4 === void 0 ? void 0 : (_formValues$applicati5 = _formValues$applicati4.connectionType) === null || _formValues$applicati5 === void 0 ? void 0 : _formValues$applicati5.code) === "TEMPORARY" && /*#__PURE__*/React.createElement(PreviewItem, {
33488
+ label: "Temporary Connection",
33489
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati6 = formValues.applicationSelection) === null || _formValues$applicati6 === void 0 ? void 0 : _formValues$applicati6.temporaryConnection
33490
+ }), isTenantOrRelative && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PreviewItem, {
33491
+ label: "Owner Authorization",
33492
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati7 = formValues.applicationSelection) === null || _formValues$applicati7 === void 0 ? void 0 : _formValues$applicati7.ownerAuthorizationDoc
33493
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33494
+ label: "Owner Contact Number",
33495
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati8 = formValues.applicationSelection) === null || _formValues$applicati8 === void 0 ? void 0 : _formValues$applicati8.ownerContactNumber
33496
+ })), /*#__PURE__*/React.createElement(PreviewItem, {
33497
+ label: "Category Type",
33498
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati9 = formValues.applicationSelection) === null || _formValues$applicati9 === void 0 ? void 0 : _formValues$applicati9.categoryType
33499
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33500
+ label: "Sub Category",
33501
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati0 = formValues.applicationSelection) === null || _formValues$applicati0 === void 0 ? void 0 : _formValues$applicati0.subCategory
33502
+ }), (formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati1 = formValues.applicationSelection) === null || _formValues$applicati1 === void 0 ? void 0 : (_formValues$applicati10 = _formValues$applicati1.subCategory) === null || _formValues$applicati10 === void 0 ? void 0 : _formValues$applicati10.code) === "DOMESTIC" && /*#__PURE__*/React.createElement(PreviewItem, {
33503
+ label: "Domestic Type",
33504
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati11 = formValues.applicationSelection) === null || _formValues$applicati11 === void 0 ? void 0 : _formValues$applicati11.domesticType
33505
+ }), (formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati12 = formValues.applicationSelection) === null || _formValues$applicati12 === void 0 ? void 0 : (_formValues$applicati13 = _formValues$applicati12.subCategory) === null || _formValues$applicati13 === void 0 ? void 0 : _formValues$applicati13.code) === "COMMERCIAL" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PreviewItem, {
33506
+ label: "Commercial Type",
33507
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati14 = formValues.applicationSelection) === null || _formValues$applicati14 === void 0 ? void 0 : _formValues$applicati14.commercialType
33508
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33509
+ label: "Organization Name",
33510
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati15 = formValues.applicationSelection) === null || _formValues$applicati15 === void 0 ? void 0 : (_formValues$applicati16 = _formValues$applicati15.govtOrganization) === null || _formValues$applicati16 === void 0 ? void 0 : _formValues$applicati16.organizationName
33511
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33512
+ label: "Nature of Work",
33513
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati17 = formValues.applicationSelection) === null || _formValues$applicati17 === void 0 ? void 0 : (_formValues$applicati18 = _formValues$applicati17.govtOrganization) === null || _formValues$applicati18 === void 0 ? void 0 : _formValues$applicati18.natureOfWork
33514
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33515
+ label: "Organization Document",
33516
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati19 = formValues.applicationSelection) === null || _formValues$applicati19 === void 0 ? void 0 : (_formValues$applicati20 = _formValues$applicati19.govtOrganization) === null || _formValues$applicati20 === void 0 ? void 0 : _formValues$applicati20.organizationDocument
33517
+ }))), /*#__PURE__*/React.createElement(SectionCard, {
32562
33518
  description: "Applicant identity and organization information.",
32563
33519
  isOpen: collapsedSections.applicant,
32564
33520
  onToggle: toggleSection,
32565
33521
  sectionKey: "applicant",
32566
- title: "Details of Applicant"
32567
- }, /*#__PURE__*/React.createElement(PreviewItem, {
33522
+ title: applicantSectionTitle,
33523
+ onEditClick: () => handleSectionEdit("applicant")
33524
+ }, /*#__PURE__*/React.createElement("div", {
33525
+ style: {
33526
+ gridColumn: "1 / -1",
33527
+ display: "flex",
33528
+ justifyContent: "center",
33529
+ marginBottom: "16px"
33530
+ }
33531
+ }, /*#__PURE__*/React.createElement("div", {
33532
+ className: "avatar-wrapper",
33533
+ style: {
33534
+ cursor: "default"
33535
+ }
33536
+ }, /*#__PURE__*/React.createElement("div", {
33537
+ className: "avatar-circle",
33538
+ style: {
33539
+ cursor: "default"
33540
+ }
33541
+ }, 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, {
33542
+ 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
33543
+ }) : /*#__PURE__*/React.createElement("div", {
33544
+ className: "avatar-placeholder"
33545
+ }, /*#__PURE__*/React.createElement("svg", {
33546
+ width: "40",
33547
+ height: "40",
33548
+ viewBox: "0 0 24 24",
33549
+ fill: "none",
33550
+ stroke: "#9CA3AF",
33551
+ strokeWidth: "1.5"
33552
+ }, /*#__PURE__*/React.createElement("path", {
33553
+ d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"
33554
+ }), /*#__PURE__*/React.createElement("circle", {
33555
+ cx: "12",
33556
+ cy: "7",
33557
+ r: "4"
33558
+ })))))), /*#__PURE__*/React.createElement(PreviewItem, {
32568
33559
  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
33560
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant5 = formValues.applicant) === null || _formValues$applicant5 === void 0 ? void 0 : _formValues$applicant5.firstName
32570
33561
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32571
33562
  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
33563
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant6 = formValues.applicant) === null || _formValues$applicant6 === void 0 ? void 0 : _formValues$applicant6.middleName
32573
33564
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32574
33565
  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
33566
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant7 = formValues.applicant) === null || _formValues$applicant7 === void 0 ? void 0 : _formValues$applicant7.lastName
32576
33567
  }), /*#__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
33568
+ label: "Gender",
33569
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail = formValues.useDetails) === null || _formValues$useDetail === void 0 ? void 0 : _formValues$useDetail.gender
33570
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33571
+ label: "Parent/ spouse",
33572
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant8 = formValues.applicant) === null || _formValues$applicant8 === void 0 ? void 0 : _formValues$applicant8.ParentorSpouse
32579
33573
  }), /*#__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
33574
  label: "Email ID",
32598
33575
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$contact = formValues.contact) === null || _formValues$contact === void 0 ? void 0 : _formValues$contact.emailId
32599
33576
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32600
33577
  label: "Mobile Number",
32601
33578
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$contact2 = formValues.contact) === null || _formValues$contact2 === void 0 ? void 0 : _formValues$contact2.mobileNumber
32602
33579
  }), /*#__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
33580
+ label: "WhatsApp Number",
33581
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$contact3 = formValues.contact) === null || _formValues$contact3 === void 0 ? void 0 : _formValues$contact3.whatsAppNumber
33582
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33583
+ isFullWidth: true,
33584
+ label: "Uploaded ID Proof",
33585
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents = formValues.documents) === null || _formValues$documents === void 0 ? void 0 : _formValues$documents.identityProofFile
32605
33586
  })), /*#__PURE__*/React.createElement(SectionCard, {
32606
33587
  description: "DJB employee-specific information.",
32607
- isOpen: collapsedSections.employee,
33588
+ isOpen: collapsedSections.djbEmployee,
32608
33589
  onToggle: toggleSection,
32609
- sectionKey: "employee",
32610
- title: "For DJB Employee"
33590
+ sectionKey: "djbEmployee",
33591
+ title: "For DJB Employee",
33592
+ onEditClick: () => handleSectionEdit("djbEmployee")
32611
33593
  }, /*#__PURE__*/React.createElement(PreviewItem, {
32612
33594
  label: "DJB Employee",
32613
33595
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$djbEmploy = formValues.djbEmployee) === null || _formValues$djbEmploy === void 0 ? void 0 : _formValues$djbEmploy.isDjbEmployee
@@ -32621,67 +33603,101 @@ const NewApplication = () => {
32621
33603
  isFullWidth: true,
32622
33604
  label: "Office Name & Address",
32623
33605
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$djbEmploy5 = formValues.djbEmployee) === null || _formValues$djbEmploy5 === void 0 ? void 0 : _formValues$djbEmploy5.officeNameAndAddress
32624
- })) : null), /*#__PURE__*/React.createElement(SectionCard, {
33606
+ })) : null), (formValues === null || formValues === void 0 ? void 0 : (_formValues$governmen = formValues.governmentEmployee) === null || _formValues$governmen === void 0 ? void 0 : _formValues$governmen.isGovernmentEmployee) && /*#__PURE__*/React.createElement(SectionCard, {
33607
+ description: "Government employee organization details.",
33608
+ isOpen: collapsedSections.governmentEmployee,
33609
+ onToggle: toggleSection,
33610
+ sectionKey: "governmentEmployee",
33611
+ title: "For Government Employee",
33612
+ onEditClick: () => handleSectionEdit("governmentEmployee")
33613
+ }, /*#__PURE__*/React.createElement(PreviewItem, {
33614
+ label: "Organization Name",
33615
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$governmen2 = formValues.governmentEmployee) === null || _formValues$governmen2 === void 0 ? void 0 : _formValues$governmen2.organizationName
33616
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33617
+ label: "Nature of Work",
33618
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$governmen3 = formValues.governmentEmployee) === null || _formValues$governmen3 === void 0 ? void 0 : _formValues$governmen3.natureOfWork
33619
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33620
+ label: "Organization Document",
33621
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$governmen4 = formValues.governmentEmployee) === null || _formValues$governmen4 === void 0 ? void 0 : _formValues$governmen4.organizationDocument
33622
+ })), /*#__PURE__*/React.createElement(SectionCard, {
32625
33623
  description: "Property address and administrative boundary values.",
32626
33624
  isOpen: collapsedSections.address,
32627
33625
  onToggle: toggleSection,
32628
33626
  sectionKey: "address",
32629
- title: "Property Address"
33627
+ title: "Property Address",
33628
+ onEditClick: () => handleSectionEdit("propertyAddress")
32630
33629
  }, /*#__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
33630
+ label: "Pin Code",
33631
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA = formValues.propertyAddress) === null || _formValues$propertyA === void 0 ? void 0 : _formValues$propertyA.pinCode
32634
33632
  }), /*#__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
33633
+ label: "State",
33634
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA2 = formValues.propertyAddress) === null || _formValues$propertyA2 === void 0 ? void 0 : _formValues$propertyA2.state
32637
33635
  }), /*#__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
33636
+ label: "District",
33637
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA3 = formValues.propertyAddress) === null || _formValues$propertyA3 === void 0 ? void 0 : _formValues$propertyA3.district
33638
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33639
+ label: "City",
33640
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA4 = formValues.propertyAddress) === null || _formValues$propertyA4 === void 0 ? void 0 : _formValues$propertyA4.city
32640
33641
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32641
33642
  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
33643
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA5 = formValues.propertyAddress) === null || _formValues$propertyA5 === void 0 ? void 0 : _formValues$propertyA5.locality
33644
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33645
+ label: "Street",
33646
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA6 = formValues.propertyAddress) === null || _formValues$propertyA6 === void 0 ? void 0 : _formValues$propertyA6.street
33647
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33648
+ label: "House No",
33649
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA7 = formValues.propertyAddress) === null || _formValues$propertyA7 === void 0 ? void 0 : _formValues$propertyA7.houseNo
33650
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33651
+ label: "Block",
33652
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA8 = formValues.propertyAddress) === null || _formValues$propertyA8 === void 0 ? void 0 : _formValues$propertyA8.block
32643
33653
  }), /*#__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
33654
+ label: "Zone",
33655
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA9 = formValues.propertyAddress) === null || _formValues$propertyA9 === void 0 ? void 0 : _formValues$propertyA9.zone
32646
33656
  }), /*#__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
33657
+ label: "Landmark",
33658
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA0 = formValues.propertyAddress) === null || _formValues$propertyA0 === void 0 ? void 0 : _formValues$propertyA0.landmark
32649
33659
  }), /*#__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
33660
+ isFullWidth: true,
33661
+ label: "Address",
33662
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA1 = formValues.propertyAddress) === null || _formValues$propertyA1 === void 0 ? void 0 : _formValues$propertyA1.address
32652
33663
  })), /*#__PURE__*/React.createElement(SectionCard, {
32653
33664
  description: "Property and connection usage values.",
32654
33665
  isOpen: collapsedSections.usage,
32655
33666
  onToggle: toggleSection,
32656
33667
  sectionKey: "usage",
32657
- title: "Property and Water Connection Use Details"
33668
+ title: "Property and Water Connection Use Details",
33669
+ onEditClick: () => handleSectionEdit("useDetails")
32658
33670
  }, /*#__PURE__*/React.createElement(PreviewItem, {
32659
33671
  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
33672
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail2 = formValues.useDetails) === null || _formValues$useDetail2 === void 0 ? void 0 : _formValues$useDetail2.propertyType
32661
33673
  }), /*#__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
33674
+ label: "Plot Area (Sq. m.)",
33675
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail3 = formValues.useDetails) === null || _formValues$useDetail3 === void 0 ? void 0 : _formValues$useDetail3.plotArea
32670
33676
  }), /*#__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
33677
+ label: "Built-up Area (Sq. m.)",
33678
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail4 = formValues.useDetails) === null || _formValues$useDetail4 === void 0 ? void 0 : _formValues$useDetail4.builtUpArea
32673
33679
  }), /*#__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
33680
+ label: "Number of Floors",
33681
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail5 = formValues.useDetails) === null || _formValues$useDetail5 === void 0 ? void 0 : _formValues$useDetail5.noOfFloors
32676
33682
  }), /*#__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
33683
+ label: "Number of Dwelling Units",
33684
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail6 = formValues.useDetails) === null || _formValues$useDetail6 === void 0 ? void 0 : _formValues$useDetail6.NumberofDwellingUnits
33685
+ }), (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, {
33686
+ label: "No. of Beds",
33687
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail1 = formValues.useDetails) === null || _formValues$useDetail1 === void 0 ? void 0 : _formValues$useDetail1.hospitalBeds
33688
+ }) : null, /*#__PURE__*/React.createElement(PreviewItem, {
33689
+ label: "Year of Construction",
33690
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail10 = formValues.useDetails) === null || _formValues$useDetail10 === void 0 ? void 0 : _formValues$useDetail10.SelectYearofConstruction
33691
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33692
+ label: "Water Connection Usage Type",
33693
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail11 = formValues.useDetails) === null || _formValues$useDetail11 === void 0 ? void 0 : _formValues$useDetail11.WaterConnectionUsageType
32679
33694
  })), /*#__PURE__*/React.createElement(SectionCard, {
32680
33695
  description: "Banking information as entered in the form.",
32681
33696
  isOpen: collapsedSections.bank,
32682
33697
  onToggle: toggleSection,
32683
33698
  sectionKey: "bank",
32684
- title: "Bank Details"
33699
+ title: "Bank Details",
33700
+ onEditClick: () => handleSectionEdit("bankDetails")
32685
33701
  }, /*#__PURE__*/React.createElement(PreviewItem, {
32686
33702
  label: "Name of the Bank",
32687
33703
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$bankDetai = formValues.bankDetails) === null || _formValues$bankDetai === void 0 ? void 0 : _formValues$bankDetai.bankName
@@ -32694,55 +33710,45 @@ const NewApplication = () => {
32694
33710
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32695
33711
  label: "Bank Account No.",
32696
33712
  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
33713
  })), /*#__PURE__*/React.createElement(SectionCard, {
32708
33714
  description: "Uploaded supporting documents.",
32709
33715
  isOpen: collapsedSections.documents,
32710
33716
  onToggle: toggleSection,
32711
33717
  sectionKey: "documents",
32712
- title: "Documents to be Attached"
33718
+ title: "Documents to be Attached",
33719
+ onEditClick: () => handleSectionEdit("documents")
32713
33720
  }, /*#__PURE__*/React.createElement(PreviewItem, {
32714
33721
  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
33722
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents2 = formValues.documents) === null || _formValues$documents2 === void 0 ? void 0 : _formValues$documents2.proofOfIdentity
32716
33723
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32717
33724
  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
33725
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents3 = formValues.documents) === null || _formValues$documents3 === void 0 ? void 0 : _formValues$documents3.identityProofFile
32719
33726
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32720
33727
  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
33728
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents4 = formValues.documents) === null || _formValues$documents4 === void 0 ? void 0 : _formValues$documents4.ownershipStatus
32722
33729
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32723
33730
  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
33731
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents5 = formValues.documents) === null || _formValues$documents5 === void 0 ? void 0 : _formValues$documents5.ownershipDocumentFile
32725
33732
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32726
33733
  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
33734
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents6 = formValues.documents) === null || _formValues$documents6 === void 0 ? void 0 : _formValues$documents6.otherDocumentFile
32728
33735
  })), /*#__PURE__*/React.createElement(SectionCard, {
32729
- description: "Declaration and undertaking details.",
33736
+ description: "Applicant declaration details.",
32730
33737
  isOpen: collapsedSections.declaration,
32731
33738
  onToggle: toggleSection,
32732
33739
  sectionKey: "declaration",
32733
- title: "Declaration / Undertaking"
33740
+ title: "Declaration/Undertaking",
33741
+ onEditClick: () => handleSectionEdit("declaration")
32734
33742
  }, /*#__PURE__*/React.createElement(PreviewItem, {
32735
33743
  label: "Submitted By",
32736
33744
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$declarati = formValues.declaration) === null || _formValues$declarati === void 0 ? void 0 : _formValues$declarati.submittedBy
32737
33745
  }), /*#__PURE__*/React.createElement(PreviewItem, {
32738
- label: "Upload Signature",
33746
+ isFullWidth: true,
33747
+ label: "Signature",
32739
33748
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$declarati2 = formValues.declaration) === null || _formValues$declarati2 === void 0 ? void 0 : _formValues$declarati2.signatureFile
32740
33749
  }), /*#__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
33750
+ label: "Agreed",
33751
+ value: formValues !== null && formValues !== void 0 && (_formValues$declarati3 = formValues.declaration) !== null && _formValues$declarati3 !== void 0 && _formValues$declarati3.agree ? "Yes" : "No"
32746
33752
  }))))), /*#__PURE__*/React.createElement(ActionBar, {
32747
33753
  style: actionBarStyle
32748
33754
  }, !previewMode ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SubmitBar, {