@djb25/digit-ui-module-ws 1.0.21 → 1.0.22

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,12 +441,13 @@ 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$applicationSele, _data$applicationSele2, _data$ConnectionHolde, _data$useDetails, _data$useDetails2, _data$useDetails3, _data$useDetails3$pro, _connectionDetailsObj, _connectionDetailsObj2, _data$useDetails4, _data$useDetails4$pro, _connectionDetailsObj3, _connectionDetailsObj4, _data$useDetails5, _data$useDetails6, _data$useDetails7, _data$useDetails8, _connectionHolder$gen, _connectionHolder$own, _connectionHolder$rel, _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$cpt4, _data$cpt4$details, _data$cpt4$details$ad, _data$cpt4$details$ad2, _data$applicationSele5, _data$applicationSele6, _data$applicationSele7, _data$applicationSele8, _connectionDetailsObj5, _data$applicationSele9, _data$applicationSele0, _connectionHolder$own2, _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$cpt5, _data$cpt5$details, _data$cpt5$details$te, _data$propertyAddress4, _data$propertyAddress5, _data$propertyAddress6, _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$ConnectionHolde, _data$useDetails, _data$useDetails2, _data$useDetails3, _data$useDetails3$pro, _connectionDetailsObj, _connectionDetailsObj2, _data$useDetails4, _data$useDetails4$pro, _connectionDetailsObj3, _connectionDetailsObj4, _data$useDetails5, _data$useDetails6, _data$useDetails7, _data$useDetails8, _connectionHolder$gen, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2, _connectionHolder$own, _connectionHolder$rel, _data$propertyAddress, _data$applicant, _data$useDetails9, _data$useDetails9$gen, _data$contact, _data$applicant2, _data$applicant3, _data$applicant4, _data$applicationSele3, _data$applicationSele4, _data$contact2, _data$cpt3, _data$cpt4, _data$cpt4$details, _data$roadCuttingDeta, _data$plumberDetails, _data$zro, _data$propertyAddress2, _data$propertyAddress3, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$cpt5$details$ad2, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _data$plumberDetails6, _data$applicationSele5, _data$applicationSele6, _data$applicationSele7, _data$applicationSele8, _connectionDetailsObj5, _data$applicationSele9, _data$applicationSele0, _connectionHolder$own2, _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$cpt6, _Digit, _Digit$Customizations, _Digit$Customizations2, _Digit2, _Digit2$Customization, _Digit2$Customization2;
445
+ console.log(data, "yuyu");
445
446
  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
447
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
447
448
  });
448
449
  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 connectionDetailsArray = Array.isArray(data === null || data === void 0 ? void 0 : data.ConnectionDetails) ? data.ConnectionDetails : data !== null && data !== void 0 && data.ConnectionDetails ? Object.values(data.ConnectionDetails).filter(i => typeof i === 'object') : [];
450
+ const connectionDetailsArray = Array.isArray(data === null || data === void 0 ? void 0 : data.ConnectionDetails) ? data.ConnectionDetails : data !== null && data !== void 0 && data.ConnectionDetails ? Object.values(data.ConnectionDetails).filter(i => typeof i === "object") : [];
450
451
  const connectionDetail = (connectionDetailsArray === null || connectionDetailsArray === void 0 ? void 0 : connectionDetailsArray[0]) || (data === null || data === void 0 ? void 0 : data.ConnectionDetails) || {};
451
452
  const isWater = serviceType === "WATER" || serviceType === "BOTH" || (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.water);
452
453
  const isSewerage = serviceType === "SEWERAGE" || serviceType === "BOTH" || (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.sewerage);
@@ -464,7 +465,7 @@ const createPayloadOfWS = async data => {
464
465
  correspondenceAddress: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.address) || (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.correspondenceAddress) || "",
465
466
  fatherOrHusbandName: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.guardian) || (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.fatherOrHusbandName) || "",
466
467
  gender: (connectionHolder === null || connectionHolder === void 0 ? void 0 : (_connectionHolder$gen = connectionHolder.gender) === null || _connectionHolder$gen === void 0 ? void 0 : _connectionHolder$gen.code) || (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.gender) || "",
467
- mobileNumber: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.mobileNumber) || "",
468
+ mobileNumber: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.mobileNumber) || (data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : (_data$cpt2$details = _data$cpt2.details) === null || _data$cpt2$details === void 0 ? void 0 : (_data$cpt2$details$ow = _data$cpt2$details.owners) === null || _data$cpt2$details$ow === void 0 ? void 0 : (_data$cpt2$details$ow2 = _data$cpt2$details$ow[0]) === null || _data$cpt2$details$ow2 === void 0 ? void 0 : _data$cpt2$details$ow2.mobileNumber) || "",
468
469
  name: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.name) || "",
469
470
  ownerType: (connectionHolder === null || connectionHolder === void 0 ? void 0 : (_connectionHolder$own = connectionHolder.ownerType) === null || _connectionHolder$own === void 0 ? void 0 : _connectionHolder$own.code) || (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.ownerType) || "",
470
471
  relationship: (connectionHolder === null || connectionHolder === void 0 ? void 0 : (_connectionHolder$rel = connectionHolder.relationship) === null || _connectionHolder$rel === void 0 ? void 0 : _connectionHolder$rel.code) || (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.relationship) || "OTHERS",
@@ -482,18 +483,42 @@ const createPayloadOfWS = async data => {
482
483
  emailId: (data === null || data === void 0 ? void 0 : (_data$contact2 = data.contact) === null || _data$contact2 === void 0 ? void 0 : _data$contact2.emailId) || ""
483
484
  }],
484
485
  service: isWater && !isSewerage ? "Water" : !isWater && isSewerage ? "Sewerage" : "Water And Sewerage",
485
- property: data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : _data$cpt2.details,
486
- 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,
486
+ property: data === null || data === void 0 ? void 0 : (_data$cpt3 = data.cpt) === null || _data$cpt3 === void 0 ? void 0 : _data$cpt3.details,
487
+ propertyId: 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.propertyId,
488
+ roadCuttingInfo: data === null || data === void 0 ? void 0 : (_data$roadCuttingDeta = data.roadCuttingDetails) === null || _data$roadCuttingDeta === void 0 ? void 0 : _data$roadCuttingDeta.filter(o => {
489
+ var _o$roadType;
490
+ return (o === null || o === void 0 ? void 0 : (_o$roadType = o.roadType) === null || _o$roadType === void 0 ? void 0 : _o$roadType.code) !== "";
491
+ }).map(details => {
492
+ var _details$roadType, _details$roadType2;
493
+ return details !== null && details !== void 0 && details.id && (details === null || details === void 0 ? void 0 : details.id) !== null ? {
494
+ id: details === null || details === void 0 ? void 0 : details.id,
495
+ roadType: details === null || details === void 0 ? void 0 : (_details$roadType = details.roadType) === null || _details$roadType === void 0 ? void 0 : _details$roadType.code,
496
+ roadCuttingArea: details === null || details === void 0 ? void 0 : details.area,
497
+ status: details === null || details === void 0 ? void 0 : details.status
498
+ } : {
499
+ roadType: details === null || details === void 0 ? void 0 : (_details$roadType2 = details.roadType) === null || _details$roadType2 === void 0 ? void 0 : _details$roadType2.code,
500
+ roadCuttingArea: details === null || details === void 0 ? void 0 : details.area
501
+ };
502
+ }),
487
503
  roadCuttingArea: null,
488
504
  noOfTaps: null,
489
505
  noOfWaterClosets: null,
490
506
  noOfToilets: null,
507
+ plumberInfo: data === null || data === void 0 ? void 0 : (_data$plumberDetails = data.plumberDetails) === null || _data$plumberDetails === void 0 ? void 0 : _data$plumberDetails.filter(o => {
508
+ var _o$detailsProvidedBy;
509
+ return (o === null || o === void 0 ? void 0 : (_o$detailsProvidedBy = o.detailsProvidedBy) === null || _o$detailsProvidedBy === void 0 ? void 0 : _o$detailsProvidedBy.code) === "ULB" || (o === null || o === void 0 ? void 0 : o.detailsProvidedBy) === "ULB";
510
+ }).map(details => ({
511
+ licenseNo: details === null || details === void 0 ? void 0 : details.plumberLicenseNo,
512
+ name: details === null || details === void 0 ? void 0 : details.plumberName,
513
+ mobileNumber: details === null || details === void 0 ? void 0 : details.plumberMobileNo
514
+ })),
491
515
  additionalDetails: {
492
516
  ...useDetailsObject,
493
517
  ...(data === null || data === void 0 ? void 0 : data.djbEmployee),
494
518
  ...(data === null || data === void 0 ? void 0 : data.bankDetails),
495
519
  zro: (data === null || data === void 0 ? void 0 : (_data$zro = data.zro) === null || _data$zro === void 0 ? void 0 : _data$zro.code) || (data === null || data === void 0 ? void 0 : data.zro),
496
- 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) || (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),
520
+ 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) || (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$ad2 = _data$cpt5$details$ad.locality) === null || _data$cpt5$details$ad2 === void 0 ? void 0 : _data$cpt5$details$ad2.code),
521
+ detailsProvidedBy: (data === null || data === void 0 ? void 0 : (_data$plumberDetails2 = data.plumberDetails) === null || _data$plumberDetails2 === void 0 ? void 0 : (_data$plumberDetails3 = _data$plumberDetails2[0]) === null || _data$plumberDetails3 === void 0 ? void 0 : (_data$plumberDetails4 = _data$plumberDetails3.detailsProvidedBy) === null || _data$plumberDetails4 === void 0 ? void 0 : _data$plumberDetails4.code) || (data === null || data === void 0 ? void 0 : (_data$plumberDetails5 = data.plumberDetails) === null || _data$plumberDetails5 === void 0 ? void 0 : (_data$plumberDetails6 = _data$plumberDetails5[0]) === null || _data$plumberDetails6 === void 0 ? void 0 : _data$plumberDetails6.detailsProvidedBy) || "",
497
522
  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,
498
523
  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) || (connectionDetailsObject === null || connectionDetailsObject === void 0 ? void 0 : (_connectionDetailsObj5 = connectionDetailsObject.connectionType) === null || _connectionDetailsObj5 === void 0 ? void 0 : _connectionDetailsObj5.code) || (connectionDetailsObject === null || connectionDetailsObject === void 0 ? void 0 : connectionDetailsObject.connectionType) || "Metered",
499
524
  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) || (connectionHolder === null || connectionHolder === void 0 ? void 0 : (_connectionHolder$own2 = connectionHolder.ownerType) === null || _connectionHolder$own2 === void 0 ? void 0 : _connectionHolder$own2.code) || (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.ownerType),
@@ -512,11 +537,11 @@ const createPayloadOfWS = async data => {
512
537
  otherDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.otherDocumentNumber,
513
538
  detailsProvidedBy: ""
514
539
  },
515
- 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$te = _data$cpt5$details.tenantId) === null || _data$cpt5$details$te === void 0 ? void 0 : _data$cpt5$details$te.split(".")[0]) || (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$propertyAddress6 = _data$propertyAddress5.code) === null || _data$propertyAddress6 === void 0 ? void 0 : _data$propertyAddress6.split(".")[0]) || Digit.ULBService.getStateId(),
540
+ tenantId: Digit.ULBService.getCurrentTenantId(),
516
541
  processInstance: {
517
542
  action: "INITIATE"
518
543
  },
519
- channel: (data === null || data === void 0 ? void 0 : data.channel) || "CFC_COUNTER"
544
+ channel: Digit.UserService.getType() === "CITIZEN" ? "CITIZEN" : "CFC_COUNTER"
520
545
  };
521
546
  sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify((data === null || data === void 0 ? void 0 : data.documents) || []));
522
547
  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) || {}));
@@ -600,7 +625,7 @@ const convertToEditWSUpdate = data => {
600
625
  sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde12 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde12 === void 0 ? void 0 : _data$ConnectionHolde12.sameAsOwnerDetails
601
626
  }] : null : waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionHolders,
602
627
  oldApplication: false,
603
- channel: "CITIZEN",
628
+ channel: Digit.UserService.getType() === "CITIZEN" ? "CITIZEN" : "CFC_COUNTER",
604
629
  waterSource: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.waterSource : waterResult === null || waterResult === void 0 ? void 0 : waterResult.waterSource) || null,
605
630
  meterId: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.meterId : waterResult === null || waterResult === void 0 ? void 0 : waterResult.meterId) || null,
606
631
  meterInstallationDate: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.meterInstallationDate : waterResult === null || waterResult === void 0 ? void 0 : waterResult.meterInstallationDate) || null,
@@ -679,7 +704,7 @@ const convertToEditSWUpdate = data => {
679
704
  sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde25 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde25 === void 0 ? void 0 : _data$ConnectionHolde25.sameAsOwnerDetails
680
705
  }] : null : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.connectionHolders,
681
706
  oldApplication: false,
682
- channel: "CITIZEN",
707
+ channel: Digit.UserService.getType() === "CITIZEN" ? "CITIZEN" : "CFC_COUNTER",
683
708
  waterSource: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.waterSource : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.waterSource) || null,
684
709
  meterId: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.meterId : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.meterId) || null,
685
710
  meterInstallationDate: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.meterInstallationDate : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.meterInstallationDate) || null,
@@ -1525,7 +1550,7 @@ const convertDisonnectApplicationData = (data, serviceType, editByConfig = false
1525
1550
  return payload;
1526
1551
  };
1527
1552
  const convertDisonnectEditApplicationDetails = async (data, appData, actionData) => {
1528
- 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;
1553
+ var _data$plumberDetails7, _data$plumberDetails8, _data$plumberDetails9, _data$plumberDetails0, _data$plumberDetails1, _data$plumberDetails10, _appData$applicationD5, _appData$applicationD6, _appData$applicationD7, _data$DocumentsRequir2, _data$disConnectionDe, _data$disConnectionDe2, _data$disConnectionDe3, _data$disConnectionDe4, _data$disConnectionDe5, _data$disConnectionDe6, _data$plumberDetails11, _data$plumberDetails12, _data$plumberDetails13;
1529
1554
  const docs = sessionStorage.getItem("DISCONNECTION_EDIT_DOCS");
1530
1555
  const docsData = docs ? JSON.parse(docs) : "";
1531
1556
  const documentsData = [];
@@ -1546,9 +1571,9 @@ const convertDisonnectEditApplicationDetails = async (data, appData, actionData)
1546
1571
  documentsData.push(document);
1547
1572
  });
1548
1573
  const plumberInfo = [{
1549
- licenseNo: data === null || data === void 0 ? void 0 : (_data$plumberDetails = data.plumberDetails) === null || _data$plumberDetails === void 0 ? void 0 : (_data$plumberDetails$ = _data$plumberDetails[0]) === null || _data$plumberDetails$ === void 0 ? void 0 : _data$plumberDetails$.plumberLicenseNo,
1550
- mobileNumber: data === null || data === void 0 ? void 0 : (_data$plumberDetails2 = data.plumberDetails) === null || _data$plumberDetails2 === void 0 ? void 0 : (_data$plumberDetails3 = _data$plumberDetails2[0]) === null || _data$plumberDetails3 === void 0 ? void 0 : _data$plumberDetails3.plumberMobileNo,
1551
- name: data === null || data === void 0 ? void 0 : (_data$plumberDetails4 = data.plumberDetails) === null || _data$plumberDetails4 === void 0 ? void 0 : (_data$plumberDetails5 = _data$plumberDetails4[0]) === null || _data$plumberDetails5 === void 0 ? void 0 : _data$plumberDetails5.plumberName,
1574
+ licenseNo: data === null || data === void 0 ? void 0 : (_data$plumberDetails7 = data.plumberDetails) === null || _data$plumberDetails7 === void 0 ? void 0 : (_data$plumberDetails8 = _data$plumberDetails7[0]) === null || _data$plumberDetails8 === void 0 ? void 0 : _data$plumberDetails8.plumberLicenseNo,
1575
+ mobileNumber: data === null || data === void 0 ? void 0 : (_data$plumberDetails9 = data.plumberDetails) === null || _data$plumberDetails9 === void 0 ? void 0 : (_data$plumberDetails0 = _data$plumberDetails9[0]) === null || _data$plumberDetails0 === void 0 ? void 0 : _data$plumberDetails0.plumberMobileNo,
1576
+ name: data === null || data === void 0 ? void 0 : (_data$plumberDetails1 = data.plumberDetails) === null || _data$plumberDetails1 === void 0 ? void 0 : (_data$plumberDetails10 = _data$plumberDetails1[0]) === null || _data$plumberDetails10 === void 0 ? void 0 : _data$plumberDetails10.plumberName,
1552
1577
  id: appData === null || appData === void 0 ? void 0 : (_appData$applicationD5 = appData.applicationData) === null || _appData$applicationD5 === void 0 ? void 0 : (_appData$applicationD6 = _appData$applicationD5.plumberInfo) === null || _appData$applicationD6 === void 0 ? void 0 : (_appData$applicationD7 = _appData$applicationD6[0]) === null || _appData$applicationD7 === void 0 ? void 0 : _appData$applicationD7.id
1553
1578
  }];
1554
1579
  let payload = {
@@ -1562,10 +1587,10 @@ const convertDisonnectEditApplicationDetails = async (data, appData, actionData)
1562
1587
  },
1563
1588
  action: actionData ? actionData : "RESUBMIT_APPLICATION"
1564
1589
  };
1565
- if (data !== null && data !== void 0 && (_data$plumberDetails6 = data.plumberDetails) !== null && _data$plumberDetails6 !== void 0 && (_data$plumberDetails7 = _data$plumberDetails6[0]) !== null && _data$plumberDetails7 !== void 0 && (_data$plumberDetails8 = _data$plumberDetails7.detailsProvidedBy) !== null && _data$plumberDetails8 !== void 0 && _data$plumberDetails8.code) {
1566
- var _data$plumberDetails9, _data$plumberDetails0, _data$plumberDetails1, _data$plumberDetails10, _data$plumberDetails11, _data$plumberDetails12;
1567
- payload.additionalDetails.detailsProvidedBy = data === null || data === void 0 ? void 0 : (_data$plumberDetails9 = data.plumberDetails) === null || _data$plumberDetails9 === void 0 ? void 0 : (_data$plumberDetails0 = _data$plumberDetails9[0]) === null || _data$plumberDetails0 === void 0 ? void 0 : (_data$plumberDetails1 = _data$plumberDetails0.detailsProvidedBy) === null || _data$plumberDetails1 === void 0 ? void 0 : _data$plumberDetails1.code;
1568
- if ((data === null || data === void 0 ? void 0 : (_data$plumberDetails10 = data.plumberDetails) === null || _data$plumberDetails10 === void 0 ? void 0 : (_data$plumberDetails11 = _data$plumberDetails10[0]) === null || _data$plumberDetails11 === void 0 ? void 0 : (_data$plumberDetails12 = _data$plumberDetails11.detailsProvidedBy) === null || _data$plumberDetails12 === void 0 ? void 0 : _data$plumberDetails12.code) == "ULB") {
1590
+ if (data !== null && data !== void 0 && (_data$plumberDetails11 = data.plumberDetails) !== null && _data$plumberDetails11 !== void 0 && (_data$plumberDetails12 = _data$plumberDetails11[0]) !== null && _data$plumberDetails12 !== void 0 && (_data$plumberDetails13 = _data$plumberDetails12.detailsProvidedBy) !== null && _data$plumberDetails13 !== void 0 && _data$plumberDetails13.code) {
1591
+ var _data$plumberDetails14, _data$plumberDetails15, _data$plumberDetails16, _data$plumberDetails17, _data$plumberDetails18, _data$plumberDetails19;
1592
+ payload.additionalDetails.detailsProvidedBy = data === null || data === void 0 ? void 0 : (_data$plumberDetails14 = data.plumberDetails) === null || _data$plumberDetails14 === void 0 ? void 0 : (_data$plumberDetails15 = _data$plumberDetails14[0]) === null || _data$plumberDetails15 === void 0 ? void 0 : (_data$plumberDetails16 = _data$plumberDetails15.detailsProvidedBy) === null || _data$plumberDetails16 === void 0 ? void 0 : _data$plumberDetails16.code;
1593
+ if ((data === null || data === void 0 ? void 0 : (_data$plumberDetails17 = data.plumberDetails) === null || _data$plumberDetails17 === void 0 ? void 0 : (_data$plumberDetails18 = _data$plumberDetails17[0]) === null || _data$plumberDetails18 === void 0 ? void 0 : (_data$plumberDetails19 = _data$plumberDetails18.detailsProvidedBy) === null || _data$plumberDetails19 === void 0 ? void 0 : _data$plumberDetails19.code) == "ULB") {
1569
1594
  payload.plumberInfo = plumberInfo;
1570
1595
  }
1571
1596
  }
@@ -9724,7 +9749,7 @@ const WSWaterConnectionDetails = ({
9724
9749
  formData
9725
9750
  }) => {
9726
9751
  var _formData$waterConect, _formData$waterConect2;
9727
- const tenantId = Digit.ULBService.getStateId();
9752
+ const tenantId = Digit.ULBService.getCurrentTenantId();
9728
9753
  const [proposedTaps, setProposedTaps] = useState((formData === null || formData === void 0 ? void 0 : (_formData$waterConect = formData.waterConectionDetails) === null || _formData$waterConect === void 0 ? void 0 : _formData$waterConect.proposedTaps) || "");
9729
9754
  const [proposedPipeSize, setProposedPipeSize] = useState((formData === null || formData === void 0 ? void 0 : (_formData$waterConect2 = formData.waterConectionDetails) === null || _formData$waterConect2 === void 0 ? void 0 : _formData$waterConect2.proposedPipeSize) || "");
9730
9755
  const [isDisableForNext, setIsDisableForNext] = useState(false);
@@ -10967,6 +10992,7 @@ const WSConnectionDetails = ({
10967
10992
  type: ""
10968
10993
  });
10969
10994
  const stateCode = Digit.ULBService.getStateId();
10995
+ const tenantId = Digit.ULBService.getCurrentTenantId();
10970
10996
  const [isErrors, setIsErrors] = useState(false);
10971
10997
  const [waterSewarageSelection, setWaterSewarageSelection] = useState({
10972
10998
  water: true,
@@ -10976,7 +11002,7 @@ const WSConnectionDetails = ({
10976
11002
  const {
10977
11003
  isWSServicesCalculationLoading,
10978
11004
  data: wsServicesCalculationData
10979
- } = Digit.Hooks.ws.useMDMS(stateCode, "ws-services-calculation", ["PipeSize"]);
11005
+ } = Digit.Hooks.ws.useMDMS(tenantId, "ws-services-calculation", ["PipeSize"]);
10980
11006
  useEffect(() => {
10981
11007
  const data = connectionDetails.map(e => {
10982
11008
  return e;
@@ -13768,11 +13794,11 @@ const WSActivationConnectionDetails = ({
13768
13794
  const {
13769
13795
  isMdmsLoading,
13770
13796
  data: mdmsData
13771
- } = Digit.Hooks.ws.useMDMS(stateCode, "ws-services-masters", ["connectionType", "waterSource"]);
13797
+ } = Digit.Hooks.ws.useMDMS(tenantId, "ws-services-masters", ["connectionType", "waterSource"]);
13772
13798
  const {
13773
13799
  isWSServicesCalculationLoading,
13774
13800
  data: wsServicesCalculationData
13775
- } = Digit.Hooks.ws.useMDMS(stateCode, "ws-services-calculation", ["PipeSize"]);
13801
+ } = Digit.Hooks.ws.useMDMS(tenantId, "ws-services-calculation", ["PipeSize"]);
13776
13802
  useEffect(() => {
13777
13803
  const data = (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.length) && connectionDetails.map(e => {
13778
13804
  return e;
@@ -13823,14 +13849,6 @@ const WSActivationConnectionDetails = ({
13823
13849
  setWaterSubSourceList(listOfSubSource);
13824
13850
  }
13825
13851
  }, [mdmsData, wsServicesCalculationData]);
13826
- useEffect(() => {
13827
- if (userType === "employee") {
13828
- onSelect(config.key, {
13829
- ...formData[config.key],
13830
- ...connectionDetails
13831
- });
13832
- }
13833
- }, [connectionDetails]);
13834
13852
  if (isMdmsLoading || isWSServicesCalculationLoading) return /*#__PURE__*/React.createElement(Loader, null);
13835
13853
  const commonProps = {
13836
13854
  focusIndex,
@@ -14244,12 +14262,12 @@ const ConnectionDetails$2 = _props => {
14244
14262
  }, " ", errors === null || errors === void 0 ? void 0 : (_errors$noOfToilets2 = errors.noOfToilets) === null || _errors$noOfToilets2 === void 0 ? void 0 : _errors$noOfToilets2.message) : null)));
14245
14263
  };
14246
14264
 
14247
- const createPlumberDetails = () => [{
14265
+ const createPlumberDetails = () => ({
14248
14266
  plumberName: "",
14249
14267
  plumberMobileNo: "",
14250
14268
  plumberLicenseNo: "",
14251
14269
  detailsProvidedBy: ""
14252
- }];
14270
+ });
14253
14271
  const WSActivationPlumberDetails = ({
14254
14272
  config,
14255
14273
  onSelect,
@@ -14259,12 +14277,12 @@ const WSActivationPlumberDetails = ({
14259
14277
  formState,
14260
14278
  clearErrors
14261
14279
  }) => {
14262
- var _formData$connectionD, _formData$connectionD2;
14280
+ var _formData$plumberDeta, _formData$connectionD, _formData$connectionD2;
14263
14281
  const {
14264
14282
  t
14265
14283
  } = useTranslation();
14266
14284
  const filters = getQueryStringParams(location.search);
14267
- const [plumberDetails, setPlumberDetails] = useState((formData === null || formData === void 0 ? void 0 : formData.plumberDetails) || [createPlumberDetails()]);
14285
+ const [plumberDetails, setPlumberDetails] = useState((formData === null || formData === void 0 ? void 0 : (_formData$plumberDeta = formData.plumberDetails) === null || _formData$plumberDeta === void 0 ? void 0 : _formData$plumberDeta.length) > 0 ? formData === null || formData === void 0 ? void 0 : formData.plumberDetails : [createPlumberDetails()]);
14268
14286
  const [focusIndex, setFocusIndex] = useState({
14269
14287
  index: -1,
14270
14288
  type: ""
@@ -22866,6 +22884,7 @@ const newConfig = [{
22866
22884
  }, {
22867
22885
  head: "WS_COMMON_PLUMBER_DETAILS",
22868
22886
  isEditByConfigConnection: true,
22887
+ isCreateConnection: true,
22869
22888
  body: [{
22870
22889
  type: "component",
22871
22890
  key: "plumberDetails",
@@ -22875,6 +22894,7 @@ const newConfig = [{
22875
22894
  }, {
22876
22895
  head: "WS_COMMON_ROAD_CUTTING_DETAILS",
22877
22896
  isEditByConfigConnection: true,
22897
+ isCreateConnection: true,
22878
22898
  body: [{
22879
22899
  type: "component",
22880
22900
  key: "roadCuttingDetails",
@@ -22930,7 +22950,7 @@ const newConfig = [{
22930
22950
  isModifyConnection: true,
22931
22951
  isEditByConfigConnection: true,
22932
22952
  body: [{
22933
- component: "CPTPropertySearchNSummary",
22953
+ component: "WSPropertySearchNSummary",
22934
22954
  withoutLabel: true,
22935
22955
  key: "cpt",
22936
22956
  type: "component",
@@ -22992,6 +23012,7 @@ const newConfig = [{
22992
23012
  }, {
22993
23013
  head: "WS_COMMON_PLUMBER_DETAILS",
22994
23014
  isEditByConfigConnection: true,
23015
+ isCreateConnection: true,
22995
23016
  body: [{
22996
23017
  type: "component",
22997
23018
  key: "plumberDetails",
@@ -23001,6 +23022,7 @@ const newConfig = [{
23001
23022
  }, {
23002
23023
  head: "WS_COMMON_ROAD_CUTTING_DETAILS",
23003
23024
  isEditByConfigConnection: true,
23025
+ isCreateConnection: true,
23004
23026
  body: [{
23005
23027
  type: "component",
23006
23028
  key: "roadCuttingDetails",
@@ -23056,7 +23078,7 @@ const newConfig = [{
23056
23078
  isModifyConnection: true,
23057
23079
  isEditByConfigConnection: true,
23058
23080
  body: [{
23059
- component: "CPTPropertySearchNSummary",
23081
+ component: "WSPropertySearchNSummary",
23060
23082
  withoutLabel: true,
23061
23083
  key: "cpt",
23062
23084
  type: "component",
@@ -23118,6 +23140,7 @@ const newConfig = [{
23118
23140
  }, {
23119
23141
  head: "WS_COMMON_PLUMBER_DETAILS",
23120
23142
  isEditByConfigConnection: true,
23143
+ isCreateConnection: true,
23121
23144
  body: [{
23122
23145
  type: "component",
23123
23146
  key: "plumberDetails",
@@ -23127,6 +23150,7 @@ const newConfig = [{
23127
23150
  }, {
23128
23151
  head: "WS_COMMON_ROAD_CUTTING_DETAILS",
23129
23152
  isEditByConfigConnection: true,
23153
+ isCreateConnection: true,
23130
23154
  body: [{
23131
23155
  type: "component",
23132
23156
  key: "roadCuttingDetails",
@@ -23182,7 +23206,7 @@ const newConfig = [{
23182
23206
  isModifyConnection: true,
23183
23207
  isEditByConfigConnection: true,
23184
23208
  body: [{
23185
- component: "CPTPropertySearchNSummary",
23209
+ component: "WSPropertySearchNSummary",
23186
23210
  withoutLabel: true,
23187
23211
  key: "cpt",
23188
23212
  type: "component",
@@ -23244,6 +23268,7 @@ const newConfig = [{
23244
23268
  }, {
23245
23269
  head: "WS_COMMON_PLUMBER_DETAILS",
23246
23270
  isEditByConfigConnection: true,
23271
+ isCreateConnection: true,
23247
23272
  body: [{
23248
23273
  type: "component",
23249
23274
  key: "plumberDetails",
@@ -23253,6 +23278,7 @@ const newConfig = [{
23253
23278
  }, {
23254
23279
  head: "WS_COMMON_ROAD_CUTTING_DETAILS",
23255
23280
  isEditByConfigConnection: true,
23281
+ isCreateConnection: true,
23256
23282
  body: [{
23257
23283
  type: "component",
23258
23284
  key: "roadCuttingDetails",
@@ -25834,12 +25860,10 @@ const ChallanSearchResults = ({
25834
25860
  if (locality !== "undefined") filters.locality = locality;
25835
25861
  if (doorNumber) filters.doorNo = doorNumber;
25836
25862
  if (consumerName) filters.ownerName = consumerName;
25837
- if (locality || searchQuery && searchQuery.locality) {
25838
- filters.limit = filter1.limit;
25839
- filters.sortOrder = filter1.sortOrder;
25840
- filters.sortBy = filter1.sortBy;
25841
- filters.offset = filter1.offset;
25842
- }
25863
+ filters.limit = filter1.limit;
25864
+ filters.sortOrder = filter1.sortOrder;
25865
+ filters.sortBy = filter1.sortBy;
25866
+ filters.offset = filter1.offset;
25843
25867
  filters = {
25844
25868
  ...filters,
25845
25869
  searchType: "CONNECTION"
@@ -25895,7 +25919,7 @@ const ChallanSearchResults = ({
25895
25919
  marginLeft: "16px",
25896
25920
  marginTop: "16px"
25897
25921
  }
25898
- }, t("WS_NO_APP_FOUND_MSG")), (searchResults === null || searchResults === void 0 ? void 0 : searchResults.length) !== 0 && ((searchResults === null || searchResults === void 0 ? void 0 : searchResults.length) == 5 || (searchResults === null || searchResults === void 0 ? void 0 : searchResults.length) == 50) && (locality || searchQuery && searchQuery.locality) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
25922
+ }, t("WS_NO_APP_FOUND_MSG")), (searchResults === null || searchResults === void 0 ? void 0 : searchResults.length) !== 0 && ((searchResults === null || searchResults === void 0 ? void 0 : searchResults.length) == 5 || (searchResults === null || searchResults === void 0 ? void 0 : searchResults.length) == 50) && locality && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
25899
25923
  style: {
25900
25924
  marginLeft: "16px",
25901
25925
  marginTop: "16px"
@@ -40667,8 +40691,8 @@ const ApplicationDetails$1 = () => {
40667
40691
  const menuRef = useRef();
40668
40692
  sessionStorage.removeItem("Digit.PT_CREATE_EMP_WS_NEW_FORM");
40669
40693
  sessionStorage.removeItem("IsDetailsExists");
40670
- const [setSessionFormData, clearSessionFormData] = Digit.Hooks.useSessionStorage("ADHOC_ADD_REBATE_DATA", {});
40671
- const [setSessionBillFormData, clearBillSessionFormData] = Digit.Hooks.useSessionStorage("ADHOC_BILL_ADD_REBATE_DATA", {});
40694
+ const [sessionFormData, setSessionFormData, clearSessionFormData] = Digit.Hooks.useSessionStorage("ADHOC_ADD_REBATE_DATA", {});
40695
+ const [sessionBillFormData, setSessionBillFormData, clearBillSessionFormData] = Digit.Hooks.useSessionStorage("ADHOC_BILL_ADD_REBATE_DATA", {});
40672
40696
  const {
40673
40697
  isBillingServiceLoading
40674
40698
  } = Digit.Hooks.obps.useMDMS(stateCode, "BillingService", ["BusinessService"]);
@@ -43331,6 +43355,7 @@ const WSEditApplicationByConfig = () => {
43331
43355
  const [isAppDetailsPage, setIsAppDetailsPage] = useState(false);
43332
43356
  let tenantId = Digit.ULBService.getCurrentTenantId();
43333
43357
  tenantId ? tenantId : (_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code;
43358
+ const applicationNumber = filters === null || filters === void 0 ? void 0 : filters.applicationNumber;
43334
43359
  const editApplicationDetails = JSON.parse(sessionStorage.getItem("WS_EDIT_APPLICATION_DETAILS"));
43335
43360
  const serviceType = (filters === null || filters === void 0 ? void 0 : filters.service) || (editApplicationDetails === null || editApplicationDetails === void 0 ? void 0 : (_editApplicationDetai = editApplicationDetails.applicationData) === null || _editApplicationDetai === void 0 ? void 0 : _editApplicationDetai.serviceType);
43336
43361
  const stateId = Digit.ULBService.getStateId();
@@ -43367,7 +43392,6 @@ const WSEditApplicationByConfig = () => {
43367
43392
  enabled: propertyId && propertyId != "" ? true : false,
43368
43393
  privacy: Digit.Utils.getPrivacyObject()
43369
43394
  });
43370
- console.log(propertyDetails, "y78u");
43371
43395
  useEffect(() => {
43372
43396
  if (!isConfigLoading) {
43373
43397
  var _config$body;
@@ -43390,7 +43414,7 @@ const WSEditApplicationByConfig = () => {
43390
43414
  const IsDetailsExists = sessionStorage.getItem("IsDetailsExists") ? JSON.parse(sessionStorage.getItem("IsDetailsExists")) : false;
43391
43415
  if ((_details3 = details) !== null && _details3 !== void 0 && (_details3$application = _details3.applicationData) !== null && _details3$application !== void 0 && _details3$application.id && !IsDetailsExists) {
43392
43416
  sessionStorage.setItem("appData", JSON.stringify(appData));
43393
- const convertAppData = await convertApplicationData(details, serviceType, false, false, t);
43417
+ const convertAppData = await convertApplicationData(details, serviceType, false, true, t);
43394
43418
  setSessionFormData({
43395
43419
  ...sessionFormData,
43396
43420
  ...convertAppData
@@ -43466,7 +43490,7 @@ const WSEditApplicationByConfig = () => {
43466
43490
  setSubmitValve(false);
43467
43491
  sessionStorage.setItem("redirectedfromEDIT", true);
43468
43492
  sessionStorage.setItem("WS_SESSION_APPLICATION_DETAILS", JSON.stringify(convertAppData));
43469
- window.location.assign(`${window.location.origin}${(_state3 = state) === null || _state3 === void 0 ? void 0 : _state3.url}`);
43493
+ window.location.assign(`${window.location.origin}${((_state3 = state) === null || _state3 === void 0 ? void 0 : _state3.url) || `/digit-ui/employee/ws/application-details?applicationNumber=${applicationNumber}&service=${serviceType}`}`);
43470
43494
  }
43471
43495
  };
43472
43496
  if (enabledLoader || isConfigLoading) {
@@ -44887,7 +44911,7 @@ const OLDApplication = () => {
44887
44911
  config.head = "WS_APP_FOR_WATER_AND_SEWERAGE_LABEL";
44888
44912
  const allCreateSections = (config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.filter(section => section === null || section === void 0 ? void 0 : section.isCreateConnection)) || [];
44889
44913
  console.log("[WS] allCreateSections", allCreateSections);
44890
- const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionHolderDetails", "WSConnectionDetails", "WSDocumentsEmployee"];
44914
+ const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionHolderDetails", "WSConnectionDetails", "WSActivationPlumberDetails", "WSRoadCuttingDetails", "WSDocumentsEmployee"];
44891
44915
  const reorderedBody = [];
44892
44916
  desiredComponentOrder.forEach(compName => {
44893
44917
  const section = allCreateSections.find(s => {