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

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.
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect, useRef, useMemo, Fragment as Fragment$1, useReducer, useCallback } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { Link, useLocation, Switch, Route, useHistory, useRouteMatch, Redirect, useParams } from 'react-router-dom';
4
- import { Loader, Card, KeyNote, SubmitBar, InfoBannerIcon, Header, BackButton, PrivateRoute, Banner, CardText, ActionBar, HomeIcon, PrintBtnCommon, MultiLink, LinkButton, Toast, BreadcrumbHeader, ArrowLeft, TickMark, FormStep, CardLabel, RadioOrSelect, TextInput, CardHeader, CitizenInfoLabel, CardSubHeader, Dropdown, UploadFile, CheckBox, RadioButtons, MobileNumber, LabelFieldPair, DatePicker, CardLabelError, DeleteIcon, WrapUnMaskComponent, StatusTable, Row, CardSectionHeader, InfoIcon, TextArea, SearchField, FilterFormField, RemoveableTag, MultiSelectDropdown, InboxComposer, DropIcon, WSICon, EmployeeModuleCard, SearchAction, PopUp, DetailsCard, SearchForm, CloseSvg, CollapsibleCardPage, Table, Localities, Modal, DownloadBtnCommon, CollectionIcon, ResponseComposer, TelePhone, DisplayPhotos, CheckPoint, ConnectingCheckPoints, ActionLinks, PDFSvg, EditIcon, CardSectionSubText, DownloadIcon, CardLabelDesc, VerticalTimeline, FormComposer, MultiUploadWrapper, Close as Close$e, BreakLine, ViewsIcon, Menu, ButtonSelector, CitizenHomeCard } from '@djb25/digit-ui-react-components';
4
+ import { Loader, Card, KeyNote, SubmitBar, InfoBannerIcon, Header, BackButton, PrivateRoute, Banner, CardText, ActionBar, HomeIcon, PrintBtnCommon, MultiLink, LinkButton, Toast, ModuleHeader, ArrowLeft, TickMark, FormStep, CardLabel, RadioOrSelect, TextInput, CardHeader, CitizenInfoLabel, CardSubHeader, Dropdown, UploadFile, CheckBox, RadioButtons, MobileNumber, LabelFieldPair, DatePicker, CardLabelError, DeleteIcon, WrapUnMaskComponent, StatusTable, Row, CardSectionHeader, InfoIcon, TextArea, SearchField, FilterFormField, RemoveableTag, MultiSelectDropdown, InboxComposer, DropIcon, WSICon, EmployeeModuleCard, SearchAction, PopUp, DetailsCard, SearchForm, CloseSvg, CollapsibleCardPage, Table, Localities, Modal, DownloadBtnCommon, CollectionIcon, ResponseComposer, TelePhone, DisplayPhotos, CheckPoint, ConnectingCheckPoints, ActionLinks, PDFSvg, EditIcon, CardSectionSubText, DownloadIcon, CardLabelDesc, VerticalTimeline, FormComposer, MultiUploadWrapper, Close as Close$e, BreakLine, ViewsIcon, Menu, ButtonSelector, CitizenHomeCard } from '@djb25/digit-ui-react-components';
5
5
  import { useForm, Controller, useWatch, useFormContext } from 'react-hook-form';
6
6
  import { read, utils as utils$1 } from 'xlsx';
7
7
  import { useQueryClient } from 'react-query';
@@ -441,21 +441,36 @@ 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$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;
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;
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
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";
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 connectionDetail = (connectionDetailsArray === null || connectionDetailsArray === void 0 ? void 0 : connectionDetailsArray[0]) || (data === null || data === void 0 ? void 0 : data.ConnectionDetails) || {};
451
+ const isWater = serviceType === "WATER" || serviceType === "BOTH" || (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.water);
452
+ const isSewerage = serviceType === "SEWERAGE" || serviceType === "BOTH" || (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.sewerage);
453
+ const connectionDetailsObject = connectionDetail;
454
+ const useDetailsObject = (data === null || data === void 0 ? void 0 : data.useDetails) || connectionDetailsObject || {};
455
+ const connectionHolder = (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde = data.ConnectionHolderDetails) === null || _data$ConnectionHolde === void 0 ? void 0 : _data$ConnectionHolde[0]) || (data === null || data === void 0 ? void 0 : data.ConnectionHolderDetails);
451
456
  let payload = {
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: [{
457
+ water: !!isWater,
458
+ sewerage: !!isSewerage,
459
+ proposedTaps: ((data === null || data === void 0 ? void 0 : (_data$useDetails = data.useDetails) === null || _data$useDetails === void 0 ? void 0 : _data$useDetails.noOfTaps) || (connectionDetailsObject === null || connectionDetailsObject === void 0 ? void 0 : connectionDetailsObject.proposedTaps)) && Number((data === null || data === void 0 ? void 0 : (_data$useDetails2 = data.useDetails) === null || _data$useDetails2 === void 0 ? void 0 : _data$useDetails2.noOfTaps) || (connectionDetailsObject === null || connectionDetailsObject === void 0 ? void 0 : connectionDetailsObject.proposedTaps)),
460
+ 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) || (connectionDetailsObject === null || connectionDetailsObject === void 0 ? void 0 : (_connectionDetailsObj = connectionDetailsObject.proposedPipeSize) === null || _connectionDetailsObj === void 0 ? void 0 : _connectionDetailsObj.size) || (connectionDetailsObject === null || connectionDetailsObject === void 0 ? void 0 : (_connectionDetailsObj2 = connectionDetailsObject.proposedPipeSize) === null || _connectionDetailsObj2 === void 0 ? void 0 : _connectionDetailsObj2.code)) && 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) || (connectionDetailsObject === null || connectionDetailsObject === void 0 ? void 0 : (_connectionDetailsObj3 = connectionDetailsObject.proposedPipeSize) === null || _connectionDetailsObj3 === void 0 ? void 0 : _connectionDetailsObj3.size) || (connectionDetailsObject === null || connectionDetailsObject === void 0 ? void 0 : (_connectionDetailsObj4 = connectionDetailsObject.proposedPipeSize) === null || _connectionDetailsObj4 === void 0 ? void 0 : _connectionDetailsObj4.code)),
461
+ proposedWaterClosets: ((data === null || data === void 0 ? void 0 : (_data$useDetails5 = data.useDetails) === null || _data$useDetails5 === void 0 ? void 0 : _data$useDetails5.proposedWaterClosets) || (connectionDetailsObject === null || connectionDetailsObject === void 0 ? void 0 : connectionDetailsObject.proposedWaterClosets)) && Number((data === null || data === void 0 ? void 0 : (_data$useDetails6 = data.useDetails) === null || _data$useDetails6 === void 0 ? void 0 : _data$useDetails6.proposedWaterClosets) || (connectionDetailsObject === null || connectionDetailsObject === void 0 ? void 0 : connectionDetailsObject.proposedWaterClosets)),
462
+ proposedToilets: ((data === null || data === void 0 ? void 0 : (_data$useDetails7 = data.useDetails) === null || _data$useDetails7 === void 0 ? void 0 : _data$useDetails7.proposedToilets) || (connectionDetailsObject === null || connectionDetailsObject === void 0 ? void 0 : connectionDetailsObject.proposedToilets)) && Number((data === null || data === void 0 ? void 0 : (_data$useDetails8 = data.useDetails) === null || _data$useDetails8 === void 0 ? void 0 : _data$useDetails8.proposedToilets) || (connectionDetailsObject === null || connectionDetailsObject === void 0 ? void 0 : connectionDetailsObject.proposedToilets)),
463
+ connectionHolders: connectionHolder ? [{
464
+ correspondenceAddress: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.address) || (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.correspondenceAddress) || "",
465
+ fatherOrHusbandName: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.guardian) || (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.fatherOrHusbandName) || "",
466
+ 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
+ name: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.name) || "",
469
+ 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
+ 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",
471
+ sameAsPropertyAddress: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.sameAsOwnerDetails) || (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.sameAsPropertyAddress) || false,
472
+ emailId: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.emailId) || ""
473
+ }] : [{
459
474
  correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$propertyAddress = data.propertyAddress) === null || _data$propertyAddress === void 0 ? void 0 : _data$propertyAddress.address) || "",
460
475
  fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$applicant = data.applicant) === null || _data$applicant === void 0 ? void 0 : _data$applicant.ParentorSpouse) || "",
461
476
  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) || "",
@@ -474,14 +489,14 @@ const createPayloadOfWS = async data => {
474
489
  noOfWaterClosets: null,
475
490
  noOfToilets: null,
476
491
  additionalDetails: {
477
- ...(data === null || data === void 0 ? void 0 : data.useDetails),
492
+ ...useDetailsObject,
478
493
  ...(data === null || data === void 0 ? void 0 : data.djbEmployee),
479
494
  ...(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,
495
+ 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),
482
497
  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,
498
+ 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
+ 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),
485
500
  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
501
  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
502
  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,
@@ -497,14 +512,14 @@ const createPayloadOfWS = async data => {
497
512
  otherDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.otherDocumentNumber,
498
513
  detailsProvidedBy: ""
499
514
  },
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),
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(),
501
516
  processInstance: {
502
517
  action: "INITIATE"
503
518
  },
504
- channel: "CFC_COUNTER"
519
+ channel: (data === null || data === void 0 ? void 0 : data.channel) || "CFC_COUNTER"
505
520
  };
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));
521
+ sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify((data === null || data === void 0 ? void 0 : data.documents) || []));
522
+ 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) || {}));
508
523
  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;
509
524
  return payload;
510
525
  };
@@ -516,8 +531,8 @@ const updatePayloadOfWS = async (data, type) => {
516
531
  ...(data === null || data === void 0 ? void 0 : data.processInstance),
517
532
  action: "SUBMIT_APPLICATION"
518
533
  },
519
- documents: JSON.parse(sessionStorage.getItem("WS_DOCUMENTS_INOF")),
520
- property: JSON.parse(sessionStorage.getItem("WS_PROPERTY_INOF")),
534
+ documents: JSON.parse(sessionStorage.getItem("WS_DOCUMENTS_INOF") && sessionStorage.getItem("WS_DOCUMENTS_INOF") !== "undefined" ? sessionStorage.getItem("WS_DOCUMENTS_INOF") : "null"),
535
+ property: JSON.parse(sessionStorage.getItem("WS_PROPERTY_INOF") && sessionStorage.getItem("WS_PROPERTY_INOF") !== "undefined" ? sessionStorage.getItem("WS_PROPERTY_INOF") : "null"),
521
536
  connectionType: type === "WATER" ? data === null || data === void 0 ? void 0 : data.connectionType : "Non Metered"
522
537
  };
523
538
  payload = (_Digit3 = Digit) !== null && _Digit3 !== void 0 && (_Digit3$Customization = _Digit3.Customizations) !== null && _Digit3$Customization !== void 0 && (_Digit3$Customization2 = _Digit3$Customization.WS) !== null && _Digit3$Customization2 !== void 0 && _Digit3$Customization2.customiseUpdatePayloadOfWS ? (_Digit4 = Digit) === null || _Digit4 === void 0 ? void 0 : (_Digit4$Customization = _Digit4.Customizations) === null || _Digit4$Customization === void 0 ? void 0 : (_Digit4$Customization2 = _Digit4$Customization.WS) === null || _Digit4$Customization2 === void 0 ? void 0 : _Digit4$Customization2.customiseUpdatePayloadOfWS(data, payload, type) : payload;
@@ -538,7 +553,7 @@ const convertToWSUpdate = data => {
538
553
  return formdata;
539
554
  };
540
555
  const convertToEditWSUpdate = data => {
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;
556
+ var _data$WaterConnection3, _data$WaterConnection4, _data$documents5, _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$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;
542
557
  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];
543
558
  let formdata = {
544
559
  WaterConnection: {
@@ -573,16 +588,16 @@ const convertToEditWSUpdate = data => {
573
588
  },
574
589
  applicationType: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.applicationType : "MODIFY_WATER_CONNECTION",
575
590
  dateEffectiveFrom: convertDateToEpoch(Date.now() + 86400000),
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
591
+ connectionHolders: data !== null && data !== void 0 && data.isEditApplication ? !(data !== null && data !== void 0 && (_data$ConnectionHolde2 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde2 !== void 0 && _data$ConnectionHolde2.isOwnerSame) ? [{
592
+ correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde3 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde3 === void 0 ? void 0 : _data$ConnectionHolde3.address) || "",
593
+ fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde4 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde4 === void 0 ? void 0 : _data$ConnectionHolde4.guardian) || "",
594
+ gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde5 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde5 === void 0 ? void 0 : (_data$ConnectionHolde6 = _data$ConnectionHolde5.gender) === null || _data$ConnectionHolde6 === void 0 ? void 0 : _data$ConnectionHolde6.code) || "",
595
+ mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde7 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde7 === void 0 ? void 0 : _data$ConnectionHolde7.mobileNumber) || "",
596
+ name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde8 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde8 === void 0 ? void 0 : _data$ConnectionHolde8.name) || "",
597
+ emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde9 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde9 === void 0 ? void 0 : _data$ConnectionHolde9.emailId) || "",
598
+ ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde0 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde0 === void 0 ? void 0 : (_data$ConnectionHolde1 = _data$ConnectionHolde0.specialCategoryType) === null || _data$ConnectionHolde1 === void 0 ? void 0 : _data$ConnectionHolde1.code) || "",
599
+ relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde10 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde10 === void 0 ? void 0 : (_data$ConnectionHolde11 = _data$ConnectionHolde10.relationship) === null || _data$ConnectionHolde11 === void 0 ? void 0 : _data$ConnectionHolde11.code) || "",
600
+ sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde12 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde12 === void 0 ? void 0 : _data$ConnectionHolde12.sameAsOwnerDetails
586
601
  }] : null : waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionHolders,
587
602
  oldApplication: false,
588
603
  channel: "CITIZEN",
@@ -617,7 +632,7 @@ const convertToEditWSUpdate = data => {
617
632
  return formdata;
618
633
  };
619
634
  const convertToEditSWUpdate = data => {
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;
635
+ var _data$SewerageConnect, _data$SewerageConnect2, _data$documents7, _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$ConnectionHolde25, _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;
621
636
  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];
622
637
  let formdata = {
623
638
  SewerageConnection: {
@@ -652,16 +667,16 @@ const convertToEditSWUpdate = data => {
652
667
  },
653
668
  applicationType: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.applicationType : "MODIFY_WATER_CONNECTION",
654
669
  dateEffectiveFrom: convertDateToEpoch(Date.now() + 86400000),
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
670
+ connectionHolders: data !== null && data !== void 0 && data.isEditApplication ? !(data !== null && data !== void 0 && (_data$ConnectionHolde13 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde13 !== void 0 && _data$ConnectionHolde13.isOwnerSame) ? [{
671
+ correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde14 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde14 === void 0 ? void 0 : _data$ConnectionHolde14.address) || "",
672
+ fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde15 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde15 === void 0 ? void 0 : _data$ConnectionHolde15.guardian) || "",
673
+ gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde16 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde16 === void 0 ? void 0 : (_data$ConnectionHolde17 = _data$ConnectionHolde16.gender) === null || _data$ConnectionHolde17 === void 0 ? void 0 : _data$ConnectionHolde17.code) || "",
674
+ mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde18 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde18 === void 0 ? void 0 : _data$ConnectionHolde18.mobileNumber) || "",
675
+ name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde19 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde19 === void 0 ? void 0 : _data$ConnectionHolde19.name) || "",
676
+ emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde20 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde20 === void 0 ? void 0 : _data$ConnectionHolde20.emailId) || "",
677
+ ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde21 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde21 === void 0 ? void 0 : (_data$ConnectionHolde22 = _data$ConnectionHolde21.specialCategoryType) === null || _data$ConnectionHolde22 === void 0 ? void 0 : _data$ConnectionHolde22.code) || "",
678
+ relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde23 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde23 === void 0 ? void 0 : (_data$ConnectionHolde24 = _data$ConnectionHolde23.relationship) === null || _data$ConnectionHolde24 === void 0 ? void 0 : _data$ConnectionHolde24.code) || "",
679
+ sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde25 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde25 === void 0 ? void 0 : _data$ConnectionHolde25.sameAsOwnerDetails
665
680
  }] : null : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.connectionHolders,
666
681
  oldApplication: false,
667
682
  channel: "CITIZEN",
@@ -1049,7 +1064,7 @@ const getDocumentsForPDF = (app, t) => {
1049
1064
  });
1050
1065
  };
1051
1066
  const getPDFData = (application, data, tenantInfo, t) => {
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;
1067
+ 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;
1053
1068
  return {
1054
1069
  t: t,
1055
1070
  tenantId: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code,
@@ -1071,44 +1086,44 @@ const getPDFData = (application, data, tenantInfo, t) => {
1071
1086
  value: (application === null || application === void 0 ? void 0 : application.propertyId) || "N/A"
1072
1087
  }, {
1073
1088
  title: t("WS_PROPERTY_TYPE_LABEL"),
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"
1089
+ 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"
1075
1090
  }, {
1076
1091
  title: t("WS_PROPERTY_USAGE_TYPE_LABEL"),
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"
1092
+ 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"
1078
1093
  }, {
1079
1094
  title: t("WS_PROPERTY_SUB_USAGE_TYPE_LABEL"),
1080
1095
  value: "N/A"
1081
1096
  }, {
1082
1097
  title: t("WS_PROP_DETAIL_PLOT_SIZE_LABEL"),
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"
1098
+ 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"
1084
1099
  }, {
1085
1100
  title: t("WS_PROPERTY_NO_OF_FLOOR_LABEL"),
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"
1101
+ 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"
1087
1102
  }, {
1088
1103
  title: t("WS_SERV_DETAIL_CONN_RAIN_WATER_HARVESTING_FAC"),
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
1104
+ 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
1090
1105
  }]
1091
1106
  }, {
1092
1107
  title: t("WS_COMMON_PROP_LOC_DETAIL_HEADER"),
1093
1108
  values: [{
1094
1109
  title: t("WS_PROP_DETAIL_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
1110
+ 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
1096
1111
  }, {
1097
1112
  title: t("WS_PROP_DETAIL_DHNO"),
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
1113
+ 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
1099
1114
  }, {
1100
1115
  title: t("WS_PROP_DETAIL_BUILD_NAME_LABEL"),
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
1116
+ 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
1102
1117
  }, {
1103
1118
  title: t("WS_PROP_DETAIL_STREET_NAME"),
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
1119
+ 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
1105
1120
  }, {
1106
1121
  title: t("WS_PROP_DETAIL_LOCALITY_MOHALLA_LABEL"),
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
1122
+ 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
1108
1123
  }]
1109
1124
  }, {
1110
1125
  title: t("WS_TASK_PROP_OWN_HEADER"),
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)
1126
+ values: getOwnersforPDF(data === null || data === void 0 ? void 0 : (_data$cpt15 = data.cpt) === null || _data$cpt15 === void 0 ? void 0 : _data$cpt15.details, t)
1112
1127
  }, {
1113
1128
  ...(application !== null && application !== void 0 && application.applicationType.includes("WATER") ? {
1114
1129
  title: t("WS_COMMON_CONNECTION_DETAILS"),
@@ -1427,30 +1442,30 @@ const convertApplicationData = (data, serviceType, modify = false, editByConfig
1427
1442
  return payload;
1428
1443
  };
1429
1444
  const convertEditApplicationDetails = async (data, appData, actionData) => {
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 => {
1445
+ var _data$cpt16, _data$cpt16$details, _data$cpt16$details$o, _data$cpt17, _data$cpt17$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$ConnectionHolde26, _data$ConnectionHolde27, _appData$applicationD, _appData$applicationD2, _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$ConnectionHolde48, _data$cpt18, _data$DocumentsRequir;
1446
+ 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 => {
1432
1447
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
1433
1448
  });
1434
1449
  let payload = {
1435
1450
  ...appData.applicationData,
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,
1451
+ 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,
1437
1452
  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
1453
  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
1454
  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
1455
  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) ? [{
1456
+ connectionHolders: !(data !== null && data !== void 0 && (_data$ConnectionHolde26 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde26 !== void 0 && (_data$ConnectionHolde27 = _data$ConnectionHolde26[0]) !== null && _data$ConnectionHolde27 !== void 0 && _data$ConnectionHolde27.sameAsOwnerDetails) ? [{
1442
1457
  ...(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]),
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
1458
+ correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde28 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde28 === void 0 ? void 0 : (_data$ConnectionHolde29 = _data$ConnectionHolde28[0]) === null || _data$ConnectionHolde29 === void 0 ? void 0 : _data$ConnectionHolde29.address) || "",
1459
+ fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde30 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde30 === void 0 ? void 0 : (_data$ConnectionHolde31 = _data$ConnectionHolde30[0]) === null || _data$ConnectionHolde31 === void 0 ? void 0 : _data$ConnectionHolde31.guardian) || "",
1460
+ gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde32 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde32 === void 0 ? void 0 : (_data$ConnectionHolde33 = _data$ConnectionHolde32[0]) === null || _data$ConnectionHolde33 === void 0 ? void 0 : (_data$ConnectionHolde34 = _data$ConnectionHolde33.gender) === null || _data$ConnectionHolde34 === void 0 ? void 0 : _data$ConnectionHolde34.code) || "",
1461
+ mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde35 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde35 === void 0 ? void 0 : (_data$ConnectionHolde36 = _data$ConnectionHolde35[0]) === null || _data$ConnectionHolde36 === void 0 ? void 0 : _data$ConnectionHolde36.mobileNumber) || "",
1462
+ name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde37 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde37 === void 0 ? void 0 : (_data$ConnectionHolde38 = _data$ConnectionHolde37[0]) === null || _data$ConnectionHolde38 === void 0 ? void 0 : _data$ConnectionHolde38.name) || "",
1463
+ emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde39 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde39 === void 0 ? void 0 : (_data$ConnectionHolde40 = _data$ConnectionHolde39[0]) === null || _data$ConnectionHolde40 === void 0 ? void 0 : _data$ConnectionHolde40.emailId) || "",
1464
+ ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde41 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde41 === void 0 ? void 0 : (_data$ConnectionHolde42 = _data$ConnectionHolde41[0]) === null || _data$ConnectionHolde42 === void 0 ? void 0 : (_data$ConnectionHolde43 = _data$ConnectionHolde42.ownerType) === null || _data$ConnectionHolde43 === void 0 ? void 0 : _data$ConnectionHolde43.code) || "",
1465
+ relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde44 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde44 === void 0 ? void 0 : (_data$ConnectionHolde45 = _data$ConnectionHolde44[0]) === null || _data$ConnectionHolde45 === void 0 ? void 0 : (_data$ConnectionHolde46 = _data$ConnectionHolde45.relationship) === null || _data$ConnectionHolde46 === void 0 ? void 0 : _data$ConnectionHolde46.code) || "",
1466
+ sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde47 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde47 === void 0 ? void 0 : (_data$ConnectionHolde48 = _data$ConnectionHolde47[0]) === null || _data$ConnectionHolde48 === void 0 ? void 0 : _data$ConnectionHolde48.sameAsOwnerDetails
1452
1467
  }] : null,
1453
- property: data === null || data === void 0 ? void 0 : (_data$cpt17 = data.cpt) === null || _data$cpt17 === void 0 ? void 0 : _data$cpt17.details,
1468
+ property: data === null || data === void 0 ? void 0 : (_data$cpt18 = data.cpt) === null || _data$cpt18 === void 0 ? void 0 : _data$cpt18.details,
1454
1469
  processInstance: {
1455
1470
  action: actionData ? actionData : "RESUBMIT_APPLICATION"
1456
1471
  },
@@ -1571,14 +1586,14 @@ const getConvertedDate = async dateOfTime => {
1571
1586
  return convertedDate;
1572
1587
  };
1573
1588
  const convertModifyApplicationDetails = async (data, appData, actionData = "INITIATE") => {
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 => {
1589
+ 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$DocumentsRequir3, _data$DocumentsRequir4, _data$DocumentsRequir5, _data$ConnectionHolde49, _data$ConnectionHolde50, _data$DocumentsRequir6, _data$cpt22;
1590
+ 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 => {
1576
1591
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
1577
1592
  });
1578
1593
  let formData = {
1579
1594
  ...appData.applicationData
1580
1595
  };
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;
1596
+ 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;
1582
1597
  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;
1583
1598
  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;
1584
1599
  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;
@@ -1591,19 +1606,19 @@ const convertModifyApplicationDetails = async (data, appData, actionData = "INIT
1591
1606
  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);
1592
1607
  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);
1593
1608
  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;
1609
+ if (!(data !== null && data !== void 0 && (_data$ConnectionHolde49 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde49 !== void 0 && (_data$ConnectionHolde50 = _data$ConnectionHolde49[0]) !== null && _data$ConnectionHolde50 !== void 0 && _data$ConnectionHolde50.sameAsOwnerDetails)) {
1610
+ var _appData$applicationD8, _appData$applicationD9, _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, _data$ConnectionHolde71;
1596
1611
  formData.connectionHolders = [{
1597
1612
  ...(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]),
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
1613
+ correspondenceAddress: (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.address) || "",
1614
+ fatherOrHusbandName: (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$ConnectionHolde54.guardian) || "",
1615
+ gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde55 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde55 === void 0 ? void 0 : (_data$ConnectionHolde56 = _data$ConnectionHolde55[0]) === null || _data$ConnectionHolde56 === void 0 ? void 0 : (_data$ConnectionHolde57 = _data$ConnectionHolde56.gender) === null || _data$ConnectionHolde57 === void 0 ? void 0 : _data$ConnectionHolde57.code) || "",
1616
+ mobileNumber: (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.mobileNumber) || "",
1617
+ name: (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.name) || "",
1618
+ emailId: (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$ConnectionHolde63.emailId) || "",
1619
+ ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde64 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde64 === void 0 ? void 0 : (_data$ConnectionHolde65 = _data$ConnectionHolde64[0]) === null || _data$ConnectionHolde65 === void 0 ? void 0 : (_data$ConnectionHolde66 = _data$ConnectionHolde65.ownerType) === null || _data$ConnectionHolde66 === void 0 ? void 0 : _data$ConnectionHolde66.code) || "",
1620
+ relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde67 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde67 === void 0 ? void 0 : (_data$ConnectionHolde68 = _data$ConnectionHolde67[0]) === null || _data$ConnectionHolde68 === void 0 ? void 0 : (_data$ConnectionHolde69 = _data$ConnectionHolde68.relationship) === null || _data$ConnectionHolde69 === void 0 ? void 0 : _data$ConnectionHolde69.code) || "",
1621
+ sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde70 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde70 === void 0 ? void 0 : (_data$ConnectionHolde71 = _data$ConnectionHolde70[0]) === null || _data$ConnectionHolde71 === void 0 ? void 0 : _data$ConnectionHolde71.sameAsOwnerDetails
1607
1622
  }];
1608
1623
  }
1609
1624
  formData.processInstance = {
@@ -1612,7 +1627,7 @@ const convertModifyApplicationDetails = async (data, appData, actionData = "INIT
1612
1627
  formData.action = actionData;
1613
1628
  formData.channel = "CFC_COUNTER";
1614
1629
  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));
1630
+ 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));
1616
1631
  return formData;
1617
1632
  };
1618
1633
  const downloadPdf = (blob, fileName) => {
@@ -8972,9 +8987,10 @@ const WSDisconnectionResponse$1 = props => {
8972
8987
  };
8973
8988
 
8974
8989
  const BILLSBreadCrumbs = ({
8975
- location
8990
+ location,
8991
+ showPrint
8976
8992
  }) => {
8977
- var _applicationDetails$a, _applicationDetails$a9, _applicationDetails$a0, _applicationDetails$a1, _applicationDetails$a13, _applicationDetails$a14, _reciept_data$Payment2, _window, _window2;
8993
+ var _applicationDetails$a, _applicationDetails$a9, _applicationDetails$a0, _applicationDetails$a1, _applicationDetails$a13, _applicationDetails$a14, _reciept_data$Payment2;
8978
8994
  const {
8979
8995
  t
8980
8996
  } = useTranslation();
@@ -8987,6 +9003,8 @@ const BILLSBreadCrumbs = ({
8987
9003
  const applicationNumbercheck = new URLSearchParams(search).get("applicationNumber") || null;
8988
9004
  let isMobile = window.Digit.Utils.browser.isMobile();
8989
9005
  let requestParam = window.location.href.split("?")[1];
9006
+ const receiptKey = "consolidatedreceipt";
9007
+ const oldApplication = {};
8990
9008
  function findLastIndex(array, searchKey, searchValue) {
8991
9009
  var index = array.slice().reverse().findIndex(x => x[searchKey] === searchValue);
8992
9010
  var count = array.length - 1;
@@ -9181,11 +9199,11 @@ const BILLSBreadCrumbs = ({
9181
9199
  icon: HomeIcon
9182
9200
  }, {
9183
9201
  path: "/digit-ui/employee/module/details",
9184
- content: t("ES_TITLE_WATER_AND_SEWERAGE"),
9202
+ label: t("ES_TITLE_WATER_AND_SEWERAGE"),
9185
9203
  show: location.pathname.includes("/create-application") || location.pathname.includes("/new-application")
9186
9204
  }, {
9187
9205
  path: "/digit-ui/employee/ws/create-application",
9188
- content: t("ES_COMMON_WS_DOCUMENTS_REQUIRED"),
9206
+ label: t("ES_COMMON_WS_DOCUMENTS_REQUIRED"),
9189
9207
  show: location.pathname.includes("/create-application") || location.pathname.includes("/new-application"),
9190
9208
  rightContent: location.pathname.includes("/create-application") && /*#__PURE__*/React.createElement("div", {
9191
9209
  className: "flex-center flex-gap-1 .cursorPointer",
@@ -9199,61 +9217,61 @@ const BILLSBreadCrumbs = ({
9199
9217
  }, "Print"))
9200
9218
  }, {
9201
9219
  path: "/digit-ui/employee/water/inbox",
9202
- content: t("ES_COMMON_BILLS_WATER_INBOX_LABEL"),
9220
+ label: t("ES_COMMON_BILLS_WATER_INBOX_LABEL"),
9203
9221
  show: location.pathname.includes("/water/inbox") ? true : false
9204
9222
  }, {
9205
9223
  path: "/digit-ui/employee/ws/water/bill-amendment/inbox",
9206
- content: t("ES_COMMON_BILL_AMEND_WATER_INBOX_LABEL"),
9224
+ label: t("ES_COMMON_BILL_AMEND_WATER_INBOX_LABEL"),
9207
9225
  show: location.pathname.includes("/water/bill-amendment/inbox") ? true : false
9208
9226
  }, {
9209
9227
  path: "/digit-ui/employee/ws/sewerage/bill-amendment/inbox",
9210
- content: t("ES_COMMON_BILL_AMEND_SEWERAGE_INBOX_LABEL"),
9228
+ label: t("ES_COMMON_BILL_AMEND_SEWERAGE_INBOX_LABEL"),
9211
9229
  show: location.pathname.includes("/sewerage/bill-amendment/inbox") ? true : false
9212
9230
  }, {
9213
9231
  path: "/digit-ui/employee/ws/water/search-application",
9214
- content: fromScreen ? `${t(fromScreen)} / ${t("WS_SEARCH_APPLICATIONS")}` : t("WS_SEARCH_APPLICATIONS"),
9232
+ label: fromScreen ? `${t(fromScreen)} / ${t("WS_SEARCH_APPLICATIONS")}` : t("WS_SEARCH_APPLICATIONS"),
9215
9233
  show: location.pathname.includes("/water/search-application") ? true : false,
9216
9234
  isBack: fromScreen && true
9217
9235
  }, {
9218
9236
  path: "/digit-ui/employee/ws/water/search-connection",
9219
- content: fromScreen ? `${t(fromScreen)} / ${t("WS_SEARCH_CONNECTION")}` : t("WS_SEARCH_CONNECTION"),
9237
+ label: fromScreen ? `${t(fromScreen)} / ${t("WS_SEARCH_CONNECTION")}` : t("WS_SEARCH_CONNECTION"),
9220
9238
  show: location.pathname.includes("/water/search-connection") ? true : false,
9221
9239
  isBack: fromScreen && true
9222
9240
  }, {
9223
9241
  path: "/digit-ui/employee/ws/water/wns-search",
9224
- content: fromScreen ? `${t(fromScreen)} / ${t("WS_SEARCH_INTEGRATED_BILL")}` : t("WS_SEARCH_INTEGRATED_BILL"),
9242
+ label: fromScreen ? `${t(fromScreen)} / ${t("WS_SEARCH_INTEGRATED_BILL")}` : t("WS_SEARCH_INTEGRATED_BILL"),
9225
9243
  show: location.pathname.includes("/water/wns-search") ? true : false,
9226
9244
  isBack: fromScreen && true
9227
9245
  }, {
9228
9246
  path: "/digit-ui/employee/ws/sewerage/search-application",
9229
- content: fromScreen ? `${t(fromScreen)} / ${t("WS_SEARCH_APPLICATIONS")}` : t("WS_SEARCH_APPLICATIONS"),
9247
+ label: fromScreen ? `${t(fromScreen)} / ${t("WS_SEARCH_APPLICATIONS")}` : t("WS_SEARCH_APPLICATIONS"),
9230
9248
  show: location.pathname.includes("/sewerage/search-application") ? true : false,
9231
9249
  isBack: fromScreen && true
9232
9250
  }, {
9233
9251
  path: "/digit-ui/employee/ws/sewerage/search-connection",
9234
- content: fromScreen ? `${t(fromScreen)} / ${t("WS_SEARCH_CONNECTION")}` : t("WS_SEARCH_CONNECTION"),
9252
+ label: fromScreen ? `${t(fromScreen)} / ${t("WS_SEARCH_CONNECTION")}` : t("WS_SEARCH_CONNECTION"),
9235
9253
  show: location.pathname.includes("/sewerage/search-connection") ? true : false,
9236
9254
  isBack: fromScreen && true
9237
9255
  }, {
9238
9256
  path: "/digit-ui/employee/sewerage/inbox",
9239
- content: t("ES_COMMON_BILLS_SEWERAGE_INBOX_LABEL"),
9257
+ label: t("ES_COMMON_BILLS_SEWERAGE_INBOX_LABEL"),
9240
9258
  show: location.pathname.includes("/sewerage/inbox") ? true : false
9241
9259
  }, {
9242
9260
  path: "/digit-ui/employee/ws/new-application",
9243
- content: fromScreen ? `${t(fromScreen)} / ${t("ES_COMMON_WS_NEW_CONNECTION")}` : t("ES_COMMON_WS_NEW_CONNECTION"),
9261
+ label: fromScreen ? `${t(fromScreen)} / ${t("ES_COMMON_WS_NEW_CONNECTION")}` : t("ES_COMMON_WS_NEW_CONNECTION"),
9244
9262
  show: location.pathname.includes("/new-application") ? true : false
9245
9263
  }, {
9246
9264
  path: `${location === null || location === void 0 ? void 0 : location.pathname}${location.search}`,
9247
- content: t("ACTION_TEST_RESPONSE"),
9265
+ label: t("ACTION_TEST_RESPONSE"),
9248
9266
  show: location.pathname.includes("/ws-response") ? true : false
9249
9267
  }, {
9250
9268
  path: "/digit-ui/employee/ws/consumption-details",
9251
- content: fromScreen ? `${t(fromScreen)} / ${t("WS_VIEW_CONSUMPTION_DETAIL")}` : t("WS_VIEW_CONSUMPTION_DETAIL"),
9269
+ label: fromScreen ? `${t(fromScreen)} / ${t("WS_VIEW_CONSUMPTION_DETAIL")}` : t("WS_VIEW_CONSUMPTION_DETAIL"),
9252
9270
  show: location.pathname.includes("/consumption-details") ? true : false,
9253
9271
  isBack: fromScreen && true
9254
9272
  }, {
9255
9273
  path: sessionStorage.getItem("redirectedfromEDIT") === "true" ? applicationNumbercheck !== null && applicationNumbercheck !== void 0 && applicationNumbercheck.includes("SW_AP") ? "/digit-ui/employee/ws/sewerage/search-application" : "/digit-ui/employee/ws/water/search-application" : "/digit-ui/employee/ws/application-details",
9256
- content: fromScreen ? `${t(fromScreen)} / ${t("WS_APPLICATION_DETAILS_HEADER")}` : t("WS_APPLICATION_DETAILS_HEADER"),
9274
+ label: fromScreen ? `${t(fromScreen)} / ${t("WS_APPLICATION_DETAILS_HEADER")}` : t("WS_APPLICATION_DETAILS_HEADER"),
9257
9275
  show: location.pathname.includes("/application-details") ? true : false,
9258
9276
  isBack: sessionStorage.getItem("redirectedfromEDIT") !== "true" && fromScreen && true,
9259
9277
  rightContent: /*#__PURE__*/React.createElement("div", {
@@ -9291,87 +9309,87 @@ const BILLSBreadCrumbs = ({
9291
9309
  }))
9292
9310
  }, {
9293
9311
  path: sessionStorage.getItem("redirectedfromEDIT") === "true" ? applicationNumbercheck !== null && applicationNumbercheck !== void 0 && applicationNumbercheck.includes("SW_AP") ? "/digit-ui/employee/ws/sewerage/search-application" : "/digit-ui/employee/ws/water/search-application" : "/digit-ui/employee/ws/modify-details",
9294
- content: fromScreen ? `${t(fromScreen)} / ${t("WS_APPLICATION_DETAILS_HEADER")}` : t("WS_APPLICATION_DETAILS_HEADER"),
9312
+ label: fromScreen ? `${t(fromScreen)} / ${t("WS_APPLICATION_DETAILS_HEADER")}` : t("WS_APPLICATION_DETAILS_HEADER"),
9295
9313
  show: location.pathname.includes("/modify-details") ? true : false,
9296
9314
  isBack: sessionStorage.getItem("redirectedfromEDIT") !== "true" && fromScreen && true
9297
9315
  }, {
9298
9316
  path: "/digit-ui/employee/ws/disconnection-details",
9299
- content: fromScreen ? `${t(fromScreen)} / ${t("WS_APPLICATION_DETAILS_HEADER")}` : t("WS_APPLICATION_DETAILS_HEADER"),
9317
+ label: fromScreen ? `${t(fromScreen)} / ${t("WS_APPLICATION_DETAILS_HEADER")}` : t("WS_APPLICATION_DETAILS_HEADER"),
9300
9318
  show: location.pathname.includes("/disconnection-details") ? true : false,
9301
9319
  isBack: fromScreen && true
9302
9320
  }, {
9303
9321
  path: "/digit-ui/employee/ws/connection-details",
9304
- content: fromScreen ? `${t(fromScreen)} / ${t("WS_COMMON_CONNECTION_DETAIL")}` : t("WS_COMMON_CONNECTION_DETAIL"),
9322
+ label: fromScreen ? `${t(fromScreen)} / ${t("WS_COMMON_CONNECTION_DETAIL")}` : t("WS_COMMON_CONNECTION_DETAIL"),
9305
9323
  show: location.pathname.includes("/connection-details") ? true : false,
9306
9324
  isBack: fromScreen && true
9307
9325
  }, {
9308
9326
  path: "/digit-ui/employee/ws/edit-application",
9309
- content: `${t("WS_APPLICATION_DETAILS_HEADER")} / ${t("WS_APP_FOR_WATER_AND_SEWERAGE_EDIT_LABEL")}`,
9327
+ label: `${t("WS_APPLICATION_DETAILS_HEADER")} / ${t("WS_APP_FOR_WATER_AND_SEWERAGE_EDIT_LABEL")}`,
9310
9328
  show: location.pathname.includes("/edit-application") ? true : false,
9311
9329
  isBack: true
9312
9330
  }, {
9313
9331
  path: `${location === null || location === void 0 ? void 0 : location.pathname}${location.search}`,
9314
- content: `${t("WS_APPLICATION_DETAILS_HEADER")} / ${t("WF_EMPLOYEE_NEWSW1_ACTIVATE_CONNECTION")}`,
9332
+ label: `${t("WS_APPLICATION_DETAILS_HEADER")} / ${t("WF_EMPLOYEE_NEWSW1_ACTIVATE_CONNECTION")}`,
9315
9333
  show: location.pathname.includes("/activate-connection") ? true : false,
9316
9334
  isBack: true
9317
9335
  }, {
9318
9336
  path: `${location === null || location === void 0 ? void 0 : location.pathname}${location.search}`,
9319
- content: `${t("WS_APPLICATION_DETAILS_HEADER")} / ${t("WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL")}`,
9337
+ label: `${t("WS_APPLICATION_DETAILS_HEADER")} / ${t("WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL")}`,
9320
9338
  show: location.pathname.includes("edit-disconnection-application") ? true : false,
9321
9339
  isBack: true
9322
9340
  }, {
9323
9341
  path: `${location === null || location === void 0 ? void 0 : location.pathname}${location.search}`,
9324
- content: `${t("WS_APPLICATION_DETAILS_HEADER")} / ${t("WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL")}`,
9342
+ label: `${t("WS_APPLICATION_DETAILS_HEADER")} / ${t("WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL")}`,
9325
9343
  show: location.pathname.includes("config-by-disconnection-application") ? true : false,
9326
9344
  isBack: true
9327
9345
  }, {
9328
9346
  path: `${location === null || location === void 0 ? void 0 : location.pathname}${location.search}`,
9329
- content: `${t("WS_APPLICATION_DETAILS_HEADER")} / ${t("WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL")}`,
9347
+ label: `${t("WS_APPLICATION_DETAILS_HEADER")} / ${t("WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL")}`,
9330
9348
  show: location.pathname.includes("resubmit-disconnection-application") ? true : false,
9331
9349
  isBack: true
9332
9350
  }, {
9333
9351
  path: `/digit-ui/employee/ws/new-disconnection/docsrequired`,
9334
- content: t("WS_NEW_DISCONNECTION_DOCS_REQUIRED"),
9352
+ label: t("WS_NEW_DISCONNECTION_DOCS_REQUIRED"),
9335
9353
  show: location.pathname.includes("/new-disconnection/docsrequired") ? true : false
9336
9354
  }, {
9337
9355
  path: `/digit-ui/employee/ws/new-disconnection/application-form`,
9338
- content: isMobile ? `${t("WS_NEW_DISCONNECTION_DOCS_REQUIRED")} / ${t("WS_NEW_DISCONNECTION_APPLICATION")}` : `${t("WS_NEW_DISCONNECTION_DOCS_REQUIRED")} / ${t("WS_NEW_DISCONNECTION_APPLICATION")}`,
9356
+ label: isMobile ? `${t("WS_NEW_DISCONNECTION_DOCS_REQUIRED")} / ${t("WS_NEW_DISCONNECTION_APPLICATION")}` : `${t("WS_NEW_DISCONNECTION_DOCS_REQUIRED")} / ${t("WS_NEW_DISCONNECTION_APPLICATION")}`,
9339
9357
  show: location.pathname.includes("/new-disconnection/application-form") ? true : false,
9340
9358
  isBack: true
9341
9359
  }, {
9342
9360
  path: `${location === null || location === void 0 ? void 0 : location.pathname}${location.search}`,
9343
- content: `${t("WS_NEW_DISCONNECTION_RESPONSE")}`,
9361
+ label: `${t("WS_NEW_DISCONNECTION_RESPONSE")}`,
9344
9362
  show: location.pathname.includes("/ws-disconnection-response") ? true : false,
9345
9363
  isBack: true
9346
9364
  }, {
9347
9365
  path: `${location === null || location === void 0 ? void 0 : location.pathname}${location.search}`,
9348
- content: fromScreen ? `${t(fromScreen)} / ${t("WS_MODIFY_CONNECTION_BUTTON")}` : t("WS_MODIFY_CONNECTION_BUTTON"),
9366
+ label: fromScreen ? `${t(fromScreen)} / ${t("WS_MODIFY_CONNECTION_BUTTON")}` : t("WS_MODIFY_CONNECTION_BUTTON"),
9349
9367
  show: location.pathname.includes("ws/modify-application") ? true : false,
9350
9368
  isBack: true
9351
9369
  }, {
9352
9370
  path: "/digit-ui/employee/ws/required-documents",
9353
- content: t("ES_COMMON_WS_DOCUMENTS_REQUIRED"),
9371
+ label: t("ES_COMMON_WS_DOCUMENTS_REQUIRED"),
9354
9372
  show: location.pathname.includes("/required-documents") ? true : false
9355
9373
  }, {
9356
9374
  path: requestParam ? `/digit-ui/employee/ws/bill-amendment?${requestParam}` : "/digit-ui/employee/ws/bill-amendment",
9357
- content: t("WS_BILL_AMEND_APP"),
9375
+ label: t("WS_BILL_AMEND_APP"),
9358
9376
  show: location.pathname.includes("ws/bill-amendment") && !IsEdit ? true : false
9359
9377
  }, {
9360
9378
  path: "/digit-ui/employee/ws/bill-amendment",
9361
- content: t("WS_BILL_AMEND_EDIT_APP"),
9379
+ label: t("WS_BILL_AMEND_EDIT_APP"),
9362
9380
  show: location.pathname.includes("ws/bill-amendment") && IsEdit ? true : false
9363
9381
  }, {
9364
9382
  path: "/digit-ui/employee/ws/response",
9365
- content: t("WS_ACK_SCREEN"),
9383
+ label: t("WS_ACK_SCREEN"),
9366
9384
  show: location.pathname.includes("/employee/ws/response") ? true : false,
9367
9385
  isclickable: false
9368
9386
  }, {
9369
9387
  path: "/digit-ui/employee/ws/generate-note-bill-amendment",
9370
- content: t("CS_TITLE_GENERATE_NOTE"),
9388
+ label: t("CS_TITLE_GENERATE_NOTE"),
9371
9389
  show: location.pathname.includes("/generate-note-bill-amendment") ? true : false
9372
9390
  }, {
9373
9391
  path: "/digit-ui/employee/ws/water/bulk-bil",
9374
- content: t("CS_TITLE_BULK_BILL"),
9392
+ label: t("CS_TITLE_BULK_BILL"),
9375
9393
  show: location.pathname.includes("/ws/water/bulk-bill") ? true : false
9376
9394
  }];
9377
9395
  let lastCrumbIndex = findLastIndex(crumbs, "show", true);
@@ -9379,6 +9397,9 @@ const BILLSBreadCrumbs = ({
9379
9397
  ...crumbs[lastCrumbIndex],
9380
9398
  isclickable: false
9381
9399
  };
9400
+ const getDynamicBreadcrumbs = () => {
9401
+ return crumbs.filter(crumb => crumb.show);
9402
+ };
9382
9403
  return /*#__PURE__*/React.createElement(React.Fragment, null, showWaringToast && /*#__PURE__*/React.createElement(Toast, {
9383
9404
  style: {
9384
9405
  zIndex: "10000"
@@ -9388,21 +9409,18 @@ const BILLSBreadCrumbs = ({
9388
9409
  label: t(showWaringToast === null || showWaringToast === void 0 ? void 0 : showWaringToast.message),
9389
9410
  onClose: () => setShowWaringToast(null),
9390
9411
  isDleteBtn: true
9391
- }), /*#__PURE__*/React.createElement(BreadcrumbHeader, {
9392
- style: (_window = window) !== null && _window !== void 0 && _window.location.href.includes("/employee/ws/bill-amendment") || (_window2 = window) !== null && _window2 !== void 0 && _window2.location.href.includes("/employee/ws/response") ? {
9393
- marginLeft: "20px"
9394
- } : {},
9412
+ }), /*#__PURE__*/React.createElement(ModuleHeader, {
9395
9413
  leftContent: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ArrowLeft, {
9396
9414
  className: "icon"
9397
9415
  }), "Back"),
9398
9416
  onLeftClick: () => window.history.back(),
9399
- breadcrumbs: crumbs
9417
+ breadcrumbs: getDynamicBreadcrumbs()
9400
9418
  }));
9401
9419
  };
9402
9420
  const App$1 = ({
9403
9421
  path
9404
9422
  }) => {
9405
- var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi, _Digit3, _Digit3$ComponentRegi, _Digit4, _Digit4$ComponentRegi, _Digit5, _Digit5$ComponentRegi, _Digit6, _Digit6$ComponentRegi, _Digit7, _Digit7$ComponentRegi, _Digit8, _Digit8$ComponentRegi, _Digit9, _Digit9$ComponentRegi, _Digit0, _Digit0$ComponentRegi, _Digit1, _Digit1$ComponentRegi, _Digit10, _Digit10$ComponentReg, _Digit11, _Digit11$ComponentReg, _Digit12, _Digit12$ComponentReg, _Digit13, _Digit13$ComponentReg, _Digit14, _Digit14$ComponentReg, _Digit15, _Digit15$ComponentReg, _Digit16, _Digit16$ComponentReg, _Digit17, _Digit17$ComponentReg, _Digit18, _Digit18$ComponentReg, _Digit19, _Digit19$ComponentReg, _Digit20, _Digit20$ComponentReg, _Digit21, _Digit21$ComponentReg, _Digit22, _Digit22$ComponentReg, _Digit23, _Digit23$ComponentReg, _Digit24, _Digit24$ComponentReg, _Digit25, _Digit25$ComponentReg;
9423
+ var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi, _Digit3, _Digit3$ComponentRegi, _Digit4, _Digit4$ComponentRegi, _Digit5, _Digit5$ComponentRegi, _Digit6, _Digit6$ComponentRegi, _Digit7, _Digit7$ComponentRegi, _Digit8, _Digit8$ComponentRegi, _Digit9, _Digit9$ComponentRegi, _Digit0, _Digit0$ComponentRegi, _Digit1, _Digit1$ComponentRegi, _Digit10, _Digit10$ComponentReg, _Digit11, _Digit11$ComponentReg, _Digit12, _Digit12$ComponentReg, _Digit13, _Digit13$ComponentReg, _Digit14, _Digit14$ComponentReg, _Digit15, _Digit15$ComponentReg, _Digit16, _Digit16$ComponentReg, _Digit17, _Digit17$ComponentReg, _Digit18, _Digit18$ComponentReg, _Digit19, _Digit19$ComponentReg, _Digit20, _Digit20$ComponentReg, _Digit21, _Digit21$ComponentReg, _Digit22, _Digit22$ComponentReg, _Digit23, _Digit23$ComponentReg, _Digit24, _Digit24$ComponentReg, _Digit25, _Digit25$ComponentReg, _Digit26, _Digit26$ComponentReg;
9406
9424
  const location = useLocation();
9407
9425
  const WSDocsRequired = (_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ComponentRegis = _Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent("WSDocsRequired");
9408
9426
  const WSInbox = (_Digit2 = Digit) === null || _Digit2 === void 0 ? void 0 : (_Digit2$ComponentRegi = _Digit2.ComponentRegistryService) === null || _Digit2$ComponentRegi === void 0 ? void 0 : _Digit2$ComponentRegi.getComponent("WSInbox");
@@ -9410,27 +9428,28 @@ const App$1 = ({
9410
9428
  const WSApplicationBillAmendment = (_Digit4 = Digit) === null || _Digit4 === void 0 ? void 0 : (_Digit4$ComponentRegi = _Digit4.ComponentRegistryService) === null || _Digit4$ComponentRegi === void 0 ? void 0 : _Digit4$ComponentRegi.getComponent("WSApplicationBillAmendment");
9411
9429
  const WSRequiredDocuments = (_Digit5 = Digit) === null || _Digit5 === void 0 ? void 0 : (_Digit5$ComponentRegi = _Digit5.ComponentRegistryService) === null || _Digit5$ComponentRegi === void 0 ? void 0 : _Digit5$ComponentRegi.getComponent("WSRequiredDocuments");
9412
9430
  const WSNewApplication = (_Digit6 = Digit) === null || _Digit6 === void 0 ? void 0 : (_Digit6$ComponentRegi = _Digit6.ComponentRegistryService) === null || _Digit6$ComponentRegi === void 0 ? void 0 : _Digit6$ComponentRegi.getComponent("WSNewApplication");
9413
- const WSApplicationDetails = (_Digit7 = Digit) === null || _Digit7 === void 0 ? void 0 : (_Digit7$ComponentRegi = _Digit7.ComponentRegistryService) === null || _Digit7$ComponentRegi === void 0 ? void 0 : _Digit7$ComponentRegi.getComponent("WSApplicationDetails");
9414
- const WSGetConnectionDetails = (_Digit8 = Digit) === null || _Digit8 === void 0 ? void 0 : (_Digit8$ComponentRegi = _Digit8.ComponentRegistryService) === null || _Digit8$ComponentRegi === void 0 ? void 0 : _Digit8$ComponentRegi.getComponent("WSGetConnectionDetails");
9415
- const WSActivateConnection = (_Digit9 = Digit) === null || _Digit9 === void 0 ? void 0 : (_Digit9$ComponentRegi = _Digit9.ComponentRegistryService) === null || _Digit9$ComponentRegi === void 0 ? void 0 : _Digit9$ComponentRegi.getComponent("WSActivateConnection");
9416
- const WSApplicationDetailsBillAmendment = (_Digit0 = Digit) === null || _Digit0 === void 0 ? void 0 : (_Digit0$ComponentRegi = _Digit0.ComponentRegistryService) === null || _Digit0$ComponentRegi === void 0 ? void 0 : _Digit0$ComponentRegi.getComponent("WSApplicationDetailsBillAmendment");
9417
- const WSSearch = (_Digit1 = Digit) === null || _Digit1 === void 0 ? void 0 : (_Digit1$ComponentRegi = _Digit1.ComponentRegistryService) === null || _Digit1$ComponentRegi === void 0 ? void 0 : _Digit1$ComponentRegi.getComponent("WSSearch");
9418
- const WSSearchWater = (_Digit10 = Digit) === null || _Digit10 === void 0 ? void 0 : (_Digit10$ComponentReg = _Digit10.ComponentRegistryService) === null || _Digit10$ComponentReg === void 0 ? void 0 : _Digit10$ComponentReg.getComponent("WSSearchWater");
9419
- const WSEditApplication = (_Digit11 = Digit) === null || _Digit11 === void 0 ? void 0 : (_Digit11$ComponentReg = _Digit11.ComponentRegistryService) === null || _Digit11$ComponentReg === void 0 ? void 0 : _Digit11$ComponentReg.getComponent("WSEditApplication");
9420
- const WSConsumptionDetails = (_Digit12 = Digit) === null || _Digit12 === void 0 ? void 0 : (_Digit12$ComponentReg = _Digit12.ComponentRegistryService) === null || _Digit12$ComponentReg === void 0 ? void 0 : _Digit12$ComponentReg.getComponent("WSConsumptionDetails");
9421
- const WSModifyApplication = (_Digit13 = Digit) === null || _Digit13 === void 0 ? void 0 : (_Digit13$ComponentReg = _Digit13.ComponentRegistryService) === null || _Digit13$ComponentReg === void 0 ? void 0 : _Digit13$ComponentReg.getComponent("WSModifyApplication");
9422
- const WSEditModifyApplication = (_Digit14 = Digit) === null || _Digit14 === void 0 ? void 0 : (_Digit14$ComponentReg = _Digit14.ComponentRegistryService) === null || _Digit14$ComponentReg === void 0 ? void 0 : _Digit14$ComponentReg.getComponent("WSEditModifyApplication");
9423
- const WSDisconnectionApplication = (_Digit15 = Digit) === null || _Digit15 === void 0 ? void 0 : (_Digit15$ComponentReg = _Digit15.ComponentRegistryService) === null || _Digit15$ComponentReg === void 0 ? void 0 : _Digit15$ComponentReg.getComponent("WSDisconnectionApplication");
9424
- const WSRestorationApplication = (_Digit16 = Digit) === null || _Digit16 === void 0 ? void 0 : (_Digit16$ComponentReg = _Digit16.ComponentRegistryService) === null || _Digit16$ComponentReg === void 0 ? void 0 : _Digit16$ComponentReg.getComponent("WSRestorationApplication");
9425
- const WSEditApplicationByConfig = (_Digit17 = Digit) === null || _Digit17 === void 0 ? void 0 : (_Digit17$ComponentReg = _Digit17.ComponentRegistryService) === null || _Digit17$ComponentReg === void 0 ? void 0 : _Digit17$ComponentReg.getComponent("WSEditApplicationByConfig");
9426
- const WSBillIAmendMentInbox = (_Digit18 = Digit) === null || _Digit18 === void 0 ? void 0 : (_Digit18$ComponentReg = _Digit18.ComponentRegistryService) === null || _Digit18$ComponentReg === void 0 ? void 0 : _Digit18$ComponentReg.getComponent("WSBillIAmendMentInbox");
9427
- const WSGetDisconnectionDetails = (_Digit19 = Digit) === null || _Digit19 === void 0 ? void 0 : (_Digit19$ComponentReg = _Digit19.ComponentRegistryService) === null || _Digit19$ComponentReg === void 0 ? void 0 : _Digit19$ComponentReg.getComponent("WSGetDisconnectionDetails");
9428
- const WSModifyApplicationDetails = (_Digit20 = Digit) === null || _Digit20 === void 0 ? void 0 : (_Digit20$ComponentReg = _Digit20.ComponentRegistryService) === null || _Digit20$ComponentReg === void 0 ? void 0 : _Digit20$ComponentReg.getComponent("WSModifyApplicationDetails");
9429
- const WSEditDisconnectionApplication = (_Digit21 = Digit) === null || _Digit21 === void 0 ? void 0 : (_Digit21$ComponentReg = _Digit21.ComponentRegistryService) === null || _Digit21$ComponentReg === void 0 ? void 0 : _Digit21$ComponentReg.getComponent("WSEditDisconnectionApplication");
9430
- const WSEditDisconnectionByConfig = (_Digit22 = Digit) === null || _Digit22 === void 0 ? void 0 : (_Digit22$ComponentReg = _Digit22.ComponentRegistryService) === null || _Digit22$ComponentReg === void 0 ? void 0 : _Digit22$ComponentReg.getComponent("WSEditDisconnectionByConfig");
9431
- const WSResubmitDisconnection = (_Digit23 = Digit) === null || _Digit23 === void 0 ? void 0 : (_Digit23$ComponentReg = _Digit23.ComponentRegistryService) === null || _Digit23$ComponentReg === void 0 ? void 0 : _Digit23$ComponentReg.getComponent("WSResubmitDisconnection");
9432
- const WSSearchIntegrated = (_Digit24 = Digit) === null || _Digit24 === void 0 ? void 0 : (_Digit24$ComponentReg = _Digit24.ComponentRegistryService) === null || _Digit24$ComponentReg === void 0 ? void 0 : _Digit24$ComponentReg.getComponent("WSSearchIntegrated");
9433
- const WSBulkBillGeneration = (_Digit25 = Digit) === null || _Digit25 === void 0 ? void 0 : (_Digit25$ComponentReg = _Digit25.ComponentRegistryService) === null || _Digit25$ComponentReg === void 0 ? void 0 : _Digit25$ComponentReg.getComponent("WSBulkBillGeneration");
9431
+ const WSOLDApplication = (_Digit7 = Digit) === null || _Digit7 === void 0 ? void 0 : (_Digit7$ComponentRegi = _Digit7.ComponentRegistryService) === null || _Digit7$ComponentRegi === void 0 ? void 0 : _Digit7$ComponentRegi.getComponent("WSOLDApplication");
9432
+ const WSApplicationDetails = (_Digit8 = Digit) === null || _Digit8 === void 0 ? void 0 : (_Digit8$ComponentRegi = _Digit8.ComponentRegistryService) === null || _Digit8$ComponentRegi === void 0 ? void 0 : _Digit8$ComponentRegi.getComponent("WSApplicationDetails");
9433
+ const WSGetConnectionDetails = (_Digit9 = Digit) === null || _Digit9 === void 0 ? void 0 : (_Digit9$ComponentRegi = _Digit9.ComponentRegistryService) === null || _Digit9$ComponentRegi === void 0 ? void 0 : _Digit9$ComponentRegi.getComponent("WSGetConnectionDetails");
9434
+ const WSActivateConnection = (_Digit0 = Digit) === null || _Digit0 === void 0 ? void 0 : (_Digit0$ComponentRegi = _Digit0.ComponentRegistryService) === null || _Digit0$ComponentRegi === void 0 ? void 0 : _Digit0$ComponentRegi.getComponent("WSActivateConnection");
9435
+ const WSApplicationDetailsBillAmendment = (_Digit1 = Digit) === null || _Digit1 === void 0 ? void 0 : (_Digit1$ComponentRegi = _Digit1.ComponentRegistryService) === null || _Digit1$ComponentRegi === void 0 ? void 0 : _Digit1$ComponentRegi.getComponent("WSApplicationDetailsBillAmendment");
9436
+ const WSSearch = (_Digit10 = Digit) === null || _Digit10 === void 0 ? void 0 : (_Digit10$ComponentReg = _Digit10.ComponentRegistryService) === null || _Digit10$ComponentReg === void 0 ? void 0 : _Digit10$ComponentReg.getComponent("WSSearch");
9437
+ const WSSearchWater = (_Digit11 = Digit) === null || _Digit11 === void 0 ? void 0 : (_Digit11$ComponentReg = _Digit11.ComponentRegistryService) === null || _Digit11$ComponentReg === void 0 ? void 0 : _Digit11$ComponentReg.getComponent("WSSearchWater");
9438
+ const WSEditApplication = (_Digit12 = Digit) === null || _Digit12 === void 0 ? void 0 : (_Digit12$ComponentReg = _Digit12.ComponentRegistryService) === null || _Digit12$ComponentReg === void 0 ? void 0 : _Digit12$ComponentReg.getComponent("WSEditApplication");
9439
+ const WSConsumptionDetails = (_Digit13 = Digit) === null || _Digit13 === void 0 ? void 0 : (_Digit13$ComponentReg = _Digit13.ComponentRegistryService) === null || _Digit13$ComponentReg === void 0 ? void 0 : _Digit13$ComponentReg.getComponent("WSConsumptionDetails");
9440
+ const WSModifyApplication = (_Digit14 = Digit) === null || _Digit14 === void 0 ? void 0 : (_Digit14$ComponentReg = _Digit14.ComponentRegistryService) === null || _Digit14$ComponentReg === void 0 ? void 0 : _Digit14$ComponentReg.getComponent("WSModifyApplication");
9441
+ const WSEditModifyApplication = (_Digit15 = Digit) === null || _Digit15 === void 0 ? void 0 : (_Digit15$ComponentReg = _Digit15.ComponentRegistryService) === null || _Digit15$ComponentReg === void 0 ? void 0 : _Digit15$ComponentReg.getComponent("WSEditModifyApplication");
9442
+ const WSDisconnectionApplication = (_Digit16 = Digit) === null || _Digit16 === void 0 ? void 0 : (_Digit16$ComponentReg = _Digit16.ComponentRegistryService) === null || _Digit16$ComponentReg === void 0 ? void 0 : _Digit16$ComponentReg.getComponent("WSDisconnectionApplication");
9443
+ const WSRestorationApplication = (_Digit17 = Digit) === null || _Digit17 === void 0 ? void 0 : (_Digit17$ComponentReg = _Digit17.ComponentRegistryService) === null || _Digit17$ComponentReg === void 0 ? void 0 : _Digit17$ComponentReg.getComponent("WSRestorationApplication");
9444
+ const WSEditApplicationByConfig = (_Digit18 = Digit) === null || _Digit18 === void 0 ? void 0 : (_Digit18$ComponentReg = _Digit18.ComponentRegistryService) === null || _Digit18$ComponentReg === void 0 ? void 0 : _Digit18$ComponentReg.getComponent("WSEditApplicationByConfig");
9445
+ const WSBillIAmendMentInbox = (_Digit19 = Digit) === null || _Digit19 === void 0 ? void 0 : (_Digit19$ComponentReg = _Digit19.ComponentRegistryService) === null || _Digit19$ComponentReg === void 0 ? void 0 : _Digit19$ComponentReg.getComponent("WSBillIAmendMentInbox");
9446
+ const WSGetDisconnectionDetails = (_Digit20 = Digit) === null || _Digit20 === void 0 ? void 0 : (_Digit20$ComponentReg = _Digit20.ComponentRegistryService) === null || _Digit20$ComponentReg === void 0 ? void 0 : _Digit20$ComponentReg.getComponent("WSGetDisconnectionDetails");
9447
+ const WSModifyApplicationDetails = (_Digit21 = Digit) === null || _Digit21 === void 0 ? void 0 : (_Digit21$ComponentReg = _Digit21.ComponentRegistryService) === null || _Digit21$ComponentReg === void 0 ? void 0 : _Digit21$ComponentReg.getComponent("WSModifyApplicationDetails");
9448
+ const WSEditDisconnectionApplication = (_Digit22 = Digit) === null || _Digit22 === void 0 ? void 0 : (_Digit22$ComponentReg = _Digit22.ComponentRegistryService) === null || _Digit22$ComponentReg === void 0 ? void 0 : _Digit22$ComponentReg.getComponent("WSEditDisconnectionApplication");
9449
+ const WSEditDisconnectionByConfig = (_Digit23 = Digit) === null || _Digit23 === void 0 ? void 0 : (_Digit23$ComponentReg = _Digit23.ComponentRegistryService) === null || _Digit23$ComponentReg === void 0 ? void 0 : _Digit23$ComponentReg.getComponent("WSEditDisconnectionByConfig");
9450
+ const WSResubmitDisconnection = (_Digit24 = Digit) === null || _Digit24 === void 0 ? void 0 : (_Digit24$ComponentReg = _Digit24.ComponentRegistryService) === null || _Digit24$ComponentReg === void 0 ? void 0 : _Digit24$ComponentReg.getComponent("WSResubmitDisconnection");
9451
+ const WSSearchIntegrated = (_Digit25 = Digit) === null || _Digit25 === void 0 ? void 0 : (_Digit25$ComponentReg = _Digit25.ComponentRegistryService) === null || _Digit25$ComponentReg === void 0 ? void 0 : _Digit25$ComponentReg.getComponent("WSSearchIntegrated");
9452
+ const WSBulkBillGeneration = (_Digit26 = Digit) === null || _Digit26 === void 0 ? void 0 : (_Digit26$ComponentReg = _Digit26.ComponentRegistryService) === null || _Digit26$ComponentReg === void 0 ? void 0 : _Digit26$ComponentReg.getComponent("WSBulkBillGeneration");
9434
9453
  const locationCheck = window.location.href.includes("/employee/ws/new-application") || window.location.href.includes("/employee/ws/modify-application") || window.location.href.includes("/employee/ws/edit-application") || window.location.href.includes("/employee/ws/activate-connection") || window.location.href.includes("/employee/ws/application-details") || window.location.href.includes("/employee/ws/modify-details") || window.location.href.includes("/employee/ws/ws-response") || window.location.href.includes("/employee/ws/new-disconnection/application-form") || window.location.href.includes("/employee/ws/ws-disconnection-response") || window.location.href.includes("/employee/ws/consumption-details") || window.location.href.includes("/employee/ws/edit-disconnection-application") || window.location.href.includes("/employee/ws/config-by-disconnection-application") || window.location.href.includes("/employee/ws/resubmit-disconnection-application") || window.location.href.includes("/employee/ws/water/bulk-bill");
9435
9454
  const locationCheckReqDocs = window.location.href.includes("/employee/ws/create-application") || window.location.href.includes("/employee/ws/new-disconnection/docsrequired");
9436
9455
  return /*#__PURE__*/React.createElement("div", {
@@ -9449,6 +9468,9 @@ const App$1 = ({
9449
9468
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9450
9469
  path: `${path}/new-application`,
9451
9470
  component: WSNewApplication
9471
+ }), /*#__PURE__*/React.createElement(PrivateRoute, {
9472
+ path: `${path}/old-application`,
9473
+ component: WSOLDApplication
9452
9474
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9453
9475
  path: `${path}/edit-application`,
9454
9476
  component: WSEditApplication
@@ -10970,10 +10992,7 @@ const WSConnectionDetails = ({
10970
10992
  useEffect(() => {
10971
10993
  var _connectionDetails$, _connectionDetails$2;
10972
10994
  if (userType === "employee") {
10973
- onSelect(config.key, {
10974
- ...formData[config.key],
10975
- ...connectionDetails
10976
- });
10995
+ onSelect(config.key, connectionDetails);
10977
10996
  }
10978
10997
  if (connectionDetails !== null && connectionDetails !== void 0 && (_connectionDetails$ = connectionDetails[0]) !== null && _connectionDetails$ !== void 0 && _connectionDetails$.water) setWaterSewarageSelection({
10979
10998
  water: true,
@@ -11893,8 +11912,8 @@ const WSConnectionHolderDetails = ({
11893
11912
  const {
11894
11913
  data: Menu,
11895
11914
  isLoading: isSpecialcategoryLoading
11896
- } = Digit.Hooks.pt.usePropertyMDMS(stateId, "PropertyTax", "OwnerType");
11897
- Menu ? Menu.sort((a, b) => a.name.localeCompare(b.name)) : "";
11915
+ } = Digit.Hooks.ws.useWSConfigMDMS.OwnerType(stateId);
11916
+ Menu ? Menu.sort((a, b) => t(a.i18nKey).localeCompare(t(b.i18nKey))) : "";
11898
11917
  useEffect(() => {
11899
11918
  const data = connectionHolderDetails.map(e => {
11900
11919
  return e;
@@ -12031,7 +12050,7 @@ const ConnectionDetails$1 = _props => {
12031
12050
  trigger();
12032
12051
  }, []);
12033
12052
  useEffect(() => {
12034
- if (Object.entries(formValue).length > 0 && formValue !== null && formValue !== void 0 && formValue.name || formValue !== null && formValue !== void 0 && formValue.uuid) {
12053
+ if (Object.entries(formValue).length > 0) {
12035
12054
  const keys = Object.keys(formValue);
12036
12055
  const part = {};
12037
12056
  keys.forEach(key => part[key] = connectionHolderDetail[key]);
@@ -12077,7 +12096,7 @@ const ConnectionDetails$1 = _props => {
12077
12096
  setError(config.key, {
12078
12097
  type: errors
12079
12098
  });
12080
- } else if (!Object.keys(errors).length && formState.errors[config.key] && isErrors) {
12099
+ } else if (!Object.keys(errors).length && formState.errors[config.key]) {
12081
12100
  clearErrors(config.key);
12082
12101
  }
12083
12102
  }, [errors]);
@@ -21829,6 +21848,10 @@ const WSCard = () => {
21829
21848
  label: t("WS_APPLY_NEW_CONNECTION_HOME_CARD_LABEL"),
21830
21849
  link: `/digit-ui/employee/ws/create-application`,
21831
21850
  roles: ["WS_CEMP", "SW_CEMP"]
21851
+ }, {
21852
+ label: t("WS_APPLY_OLD_CONNECTION_HOME_CARD_LABEL"),
21853
+ link: `/digit-ui/employee/ws/old-application`,
21854
+ roles: ["WS_CEMP", "SW_CEMP"]
21832
21855
  }];
21833
21856
  links = links.filter(link => link.roles ? checkForEmployee(link.roles) : true);
21834
21857
  const propsForModuleCard = {
@@ -31094,17 +31117,20 @@ const DEFAULT_FORM_VALUES = {
31094
31117
  whatsAppNumber: ""
31095
31118
  },
31096
31119
  applicationSelection: {
31097
- serviceType: null,
31098
- applicantType: null,
31099
- connectionType: null,
31100
- categoryType: null,
31101
- subCategory: null,
31120
+ serviceType: dropdownData.serviceTypes[0],
31121
+ applicantType: dropdownData.applicantTypes[0],
31122
+ connectionType: dropdownData.connectionTypes[0],
31123
+ categoryType: dropdownData.categoryTypes[1],
31124
+ subCategory: dropdownData.subCategories[0],
31102
31125
  temporaryConnection: null,
31103
31126
  ownerAuthorizationDoc: null,
31104
31127
  ownerContactNumber: "",
31105
31128
  ownerOtp: "",
31106
31129
  isOwnerVerified: false,
31107
- domesticType: null,
31130
+ domesticType: {
31131
+ code: "INDIVIDUAL",
31132
+ name: "Individual"
31133
+ },
31108
31134
  commercialType: null
31109
31135
  },
31110
31136
  djbEmployee: {
@@ -31167,6 +31193,7 @@ const DEFAULT_FORM_VALUES = {
31167
31193
  signatureFile: null,
31168
31194
  agree: false
31169
31195
  },
31196
+ zro: null,
31170
31197
  cpt: {
31171
31198
  id: "",
31172
31199
  details: null
@@ -31352,10 +31379,7 @@ const linkButtonStyle = {
31352
31379
  textDecoration: "underline"
31353
31380
  };
31354
31381
  const buildDefaultValues = () => ({
31355
- zro: {
31356
- value: "",
31357
- error: ""
31358
- },
31382
+ zro: DEFAULT_FORM_VALUES.zro,
31359
31383
  typeOfRequest: DEFAULT_FORM_VALUES.typeOfRequest,
31360
31384
  connectionType: DEFAULT_FORM_VALUES.connectionType,
31361
31385
  applicant: {
@@ -31397,15 +31421,16 @@ const resolveNestedValue = (value, path) => path.split(".").reduce((accumulator,
31397
31421
  if (accumulator === null || accumulator === undefined) return undefined;
31398
31422
  return accumulator[currentKey];
31399
31423
  }, value);
31400
- const getDisplayValue = value => {
31401
- if (value === null || value === undefined || value === "") return "Not provided";
31402
- if (typeof value === "boolean") return value ? "Yes" : "No";
31424
+ const getDisplayValue = (value, t) => {
31425
+ if (value === null || value === undefined || value === "") return t("CS_COMMON_NOT_AVAILABLE");
31426
+ if (typeof value === "boolean") return value ? t("CS_COMMON_YES") : t("CS_COMMON_NO");
31403
31427
  if (typeof value === "object") {
31404
31428
  if (value !== null && value !== void 0 && value.fileName) return value.fileName;
31405
- if (value !== null && value !== void 0 && value.name) return value.name;
31406
- if (value !== null && value !== void 0 && value.code) return value.code;
31429
+ if (value !== null && value !== void 0 && value.i18nKey) return t(value.i18nKey);
31430
+ if (value !== null && value !== void 0 && value.name) return t(value.name);
31431
+ if (value !== null && value !== void 0 && value.code) return t(value.code);
31407
31432
  }
31408
- return String(value);
31433
+ return t(String(value));
31409
31434
  };
31410
31435
  const FieldBlock = ({
31411
31436
  label,
@@ -31517,6 +31542,9 @@ const PreviewItem = ({
31517
31542
  value,
31518
31543
  isFullWidth
31519
31544
  }) => {
31545
+ const {
31546
+ t
31547
+ } = useTranslation();
31520
31548
  const stateId = Digit.ULBService.getStateId();
31521
31549
  const isFile = value && typeof value === "object" && (value === null || value === void 0 ? void 0 : value.fileStoreId);
31522
31550
  return /*#__PURE__*/React.createElement("div", {
@@ -31531,7 +31559,7 @@ const PreviewItem = ({
31531
31559
  fontWeight: "600",
31532
31560
  marginBottom: "0px"
31533
31561
  }
31534
- }, label), /*#__PURE__*/React.createElement("div", {
31562
+ }, t(label)), /*#__PURE__*/React.createElement("div", {
31535
31563
  style: {
31536
31564
  display: "flex",
31537
31565
  alignItems: "center",
@@ -31542,7 +31570,7 @@ const PreviewItem = ({
31542
31570
  marginBottom: "0px",
31543
31571
  marginTop: "0px"
31544
31572
  }
31545
- }, getDisplayValue(value)), isFile && /*#__PURE__*/React.createElement("div", {
31573
+ }, getDisplayValue(value, t)), isFile && /*#__PURE__*/React.createElement("div", {
31546
31574
  onClick: () => handleView(value.fileStoreId, stateId),
31547
31575
  style: {
31548
31576
  cursor: "pointer",
@@ -31550,7 +31578,7 @@ const PreviewItem = ({
31550
31578
  alignItems: "center",
31551
31579
  color: "#0B4B66"
31552
31580
  },
31553
- title: "View Document"
31581
+ title: t("CS_COMMON_VIEW_DOCUMENT")
31554
31582
  }, /*#__PURE__*/React.createElement("svg", {
31555
31583
  width: "20",
31556
31584
  height: "20",
@@ -31600,7 +31628,7 @@ const FileUploadField = ({
31600
31628
  }, isUploading ? "Uploading file..." : (value === null || value === void 0 ? void 0 : value.fileName) || "No file selected"));
31601
31629
  };
31602
31630
  const NewApplication = () => {
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;
31631
+ var _Digit$SessionStorage, _getFieldError, _getFieldError2, _getFieldError3, _getFieldError4, _getFieldError5, _getFieldError6, _getFieldError7, _getFieldError8, _getFieldError9, _getFieldError0, _getFieldError1, _getFieldError10, _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;
31604
31632
  const {
31605
31633
  t
31606
31634
  } = useTranslation();
@@ -31624,9 +31652,19 @@ const NewApplication = () => {
31624
31652
  const [waterAndSewerageBoth, setWaterAndSewerageBoth] = useState(null);
31625
31653
  const [propertyId, setPropertyId] = useState(new URLSearchParams(location.search).get("propertyId"));
31626
31654
  const initialFormValues = buildDefaultValues();
31627
- const [zro, setZro] = useState(initialFormValues.zro);
31628
- const [localFormState, setLocalFormState] = useState(false);
31629
31655
  const [city, setCity] = useState("");
31656
+ const {
31657
+ data: ZROLocation
31658
+ } = Digit.Hooks.ws.useWSConfigMDMS.ZROLocation(tenantId);
31659
+ const {
31660
+ data: ConnectionType
31661
+ } = Digit.Hooks.ws.useWSConfigMDMS.ConnectionCategory(tenantId);
31662
+ const mappedZROLocation = useMemo(() => {
31663
+ return ZROLocation === null || ZROLocation === void 0 ? void 0 : ZROLocation.map(item => ({
31664
+ ...item,
31665
+ i18nKey: (item === null || item === void 0 ? void 0 : item.i18nKey) || (item === null || item === void 0 ? void 0 : item.name) || (item === null || item === void 0 ? void 0 : item.code)
31666
+ }));
31667
+ }, [ZROLocation]);
31630
31668
  useEffect(() => {
31631
31669
  if (allCities && tenantId && !city) {
31632
31670
  const currentCity = allCities === null || allCities === void 0 ? void 0 : allCities.find(c => c.code === tenantId);
@@ -31761,7 +31799,7 @@ const NewApplication = () => {
31761
31799
  const isOwnerVerified = watch("applicationSelection.isOwnerVerified");
31762
31800
  const subCategoryIsDomestic = (selectedSubCategory === null || selectedSubCategory === void 0 ? void 0 : selectedSubCategory.code) === "DOMESTIC";
31763
31801
  const selectedConnectionType = watch("applicationSelection.connectionType");
31764
- const connectionTypeIsTemporary = (selectedConnectionType === null || selectedConnectionType === void 0 ? void 0 : selectedConnectionType.code) === "TEMPORARY";
31802
+ const connectionTypeIsTemporary = (selectedConnectionType === null || selectedConnectionType === void 0 ? void 0 : selectedConnectionType.code) === "Temporary";
31765
31803
  const selectedDomesticType = watch("applicationSelection.domesticType");
31766
31804
  const activeType = (selectedSubCategory === null || selectedSubCategory === void 0 ? void 0 : selectedSubCategory.code) === "DOMESTIC" ? selectedDomesticType : selectedCommercialType;
31767
31805
  const applicantSectionTitle = useMemo(() => {
@@ -32269,23 +32307,6 @@ const NewApplication = () => {
32269
32307
  if (isEnableLoader || isPropertyLoading) {
32270
32308
  return /*#__PURE__*/React.createElement(Loader, null);
32271
32309
  }
32272
- const menu = [{
32273
- i18nKey: "ASHOK VIHAR",
32274
- code: "ASHOK VIHAR",
32275
- value: "ASHOK VIHAR"
32276
- }, {
32277
- i18nKey: "BURARI",
32278
- code: "BURARI",
32279
- value: "BURARI"
32280
- }, {
32281
- i18nKey: "DWARKA",
32282
- code: "DWARKA",
32283
- value: "DWARKA"
32284
- }, {
32285
- i18nKey: "OKHLA",
32286
- code: "OKHLA",
32287
- value: "OKHLA"
32288
- }];
32289
32310
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("style", null, `
32290
32311
  .ws-new-application-collapsible .collapsible-card-tabs {
32291
32312
  display: none;
@@ -32362,12 +32383,7 @@ const NewApplication = () => {
32362
32383
  background-color: #F9FAFB;
32363
32384
  }
32364
32385
  `), /*#__PURE__*/React.createElement("div", {
32365
- style: {
32366
- display: "flex",
32367
- alignItems: "flex-start",
32368
- gap: "24px",
32369
- marginBottom: "80px"
32370
- }
32386
+ className: "employee-form-section-wrapper"
32371
32387
  }, !previewMode && /*#__PURE__*/React.createElement(VerticalTimeline, {
32372
32388
  config: timelineConfig,
32373
32389
  currentActiveIndex: currentStep - 1,
@@ -32386,16 +32402,15 @@ const NewApplication = () => {
32386
32402
  isOpen: collapsedSections.application,
32387
32403
  onToggle: toggleSection,
32388
32404
  sectionKey: "application",
32389
- title: "Application Selection",
32405
+ title: t("WS_APPLICATION_SELECTION"),
32390
32406
  sectionRef: sectionRefs.application
32391
32407
  }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32392
32408
  className: "card-label-smaller"
32393
- }, "ZRO Location"), /*#__PURE__*/React.createElement("div", {
32409
+ }, t("WS_ZRO_LOCATION")), /*#__PURE__*/React.createElement("div", {
32394
32410
  className: "field"
32395
32411
  }, /*#__PURE__*/React.createElement(Controller, {
32396
32412
  control: control,
32397
32413
  name: "zro",
32398
- defaultValue: zro,
32399
32414
  rules: {
32400
32415
  required: t("REQUIRED_FIELD")
32401
32416
  },
@@ -32404,22 +32419,16 @@ const NewApplication = () => {
32404
32419
  className: "form-field",
32405
32420
  selected: props.value,
32406
32421
  disable: false,
32407
- option: menu,
32422
+ option: mappedZROLocation,
32408
32423
  errorStyle: !!getFieldError("zro"),
32409
- select: e => {
32410
- props.onChange(e);
32411
- setZro(prev => ({
32412
- ...prev,
32413
- value: e
32414
- }));
32415
- },
32424
+ select: props.onChange,
32416
32425
  optionKey: "i18nKey",
32417
32426
  onBlur: props.onBlur,
32418
32427
  t: t
32419
32428
  }))
32420
- }))), localFormState && zro.error && /*#__PURE__*/React.createElement(CardLabelError, null, zro.error), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32429
+ }))), getFieldError("zro") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError = getFieldError("zro")) === null || _getFieldError === void 0 ? void 0 : _getFieldError.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32421
32430
  className: "card-label-smaller"
32422
- }, "Service Type"), /*#__PURE__*/React.createElement("div", {
32431
+ }, t("WS_SERVICE_TYPE")), /*#__PURE__*/React.createElement("div", {
32423
32432
  className: "field"
32424
32433
  }, /*#__PURE__*/React.createElement(Controller, {
32425
32434
  control: control,
@@ -32439,9 +32448,9 @@ const NewApplication = () => {
32439
32448
  onBlur: props.onBlur,
32440
32449
  t: t
32441
32450
  })
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, {
32451
+ }))), getFieldError("applicationSelection.serviceType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError2 = getFieldError("applicationSelection.serviceType")) === null || _getFieldError2 === void 0 ? void 0 : _getFieldError2.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32443
32452
  className: "card-label-smaller"
32444
- }, "Applicant Type"), /*#__PURE__*/React.createElement("div", {
32453
+ }, t("WS_APPLICANT_TYPE")), /*#__PURE__*/React.createElement("div", {
32445
32454
  className: "field"
32446
32455
  }, /*#__PURE__*/React.createElement(Controller, {
32447
32456
  control: control,
@@ -32461,9 +32470,9 @@ const NewApplication = () => {
32461
32470
  onBlur: props.onBlur,
32462
32471
  t: t
32463
32472
  })
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, {
32473
+ }))), getFieldError("applicationSelection.applicantType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError3 = getFieldError("applicationSelection.applicantType")) === null || _getFieldError3 === void 0 ? void 0 : _getFieldError3.message), isTenantOrRelative && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32465
32474
  className: "card-label-smaller"
32466
- }, "Owner Authorization"), /*#__PURE__*/React.createElement("div", {
32475
+ }, t("WS_OWNER_AUTHORIZATION")), /*#__PURE__*/React.createElement("div", {
32467
32476
  className: "field"
32468
32477
  }, /*#__PURE__*/React.createElement(Controller, {
32469
32478
  control: control,
@@ -32481,7 +32490,7 @@ const NewApplication = () => {
32481
32490
  })
32482
32491
  }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32483
32492
  className: "card-label-smaller"
32484
- }, "Owner Contact Number"), /*#__PURE__*/React.createElement("div", {
32493
+ }, t("WS_OWNER_CONTACT_NUMBER")), /*#__PURE__*/React.createElement("div", {
32485
32494
  className: "field",
32486
32495
  style: {
32487
32496
  display: "flex",
@@ -32519,15 +32528,15 @@ const NewApplication = () => {
32519
32528
  });
32520
32529
  }
32521
32530
  }
32522
- }, isOtpSent ? "Resend OTP" : "Verify"), isOwnerVerified && /*#__PURE__*/React.createElement("span", {
32531
+ }, isOtpSent ? t("WS_RESEND_OTP") : t("WS_VERIFY")), isOwnerVerified && /*#__PURE__*/React.createElement("span", {
32523
32532
  style: {
32524
32533
  color: "green",
32525
32534
  fontSize: "14px",
32526
32535
  fontWeight: "600"
32527
32536
  }
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, {
32537
+ }, t("WS_VERIFIED"), " \u2713"))), getFieldError("applicationSelection.ownerContactNumber") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError4 = getFieldError("applicationSelection.ownerContactNumber")) === null || _getFieldError4 === void 0 ? void 0 : _getFieldError4.message), isOtpSent && !isOwnerVerified && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32529
32538
  className: "card-label-smaller"
32530
- }, "OTP Verification"), /*#__PURE__*/React.createElement("div", {
32539
+ }, t("WS_OTP_VERIFICATION")), /*#__PURE__*/React.createElement("div", {
32531
32540
  className: "field",
32532
32541
  style: {
32533
32542
  display: "flex",
@@ -32559,9 +32568,9 @@ const NewApplication = () => {
32559
32568
  setOtpError("Enter 6 digit OTP");
32560
32569
  }
32561
32570
  }
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, {
32571
+ }, t("WS_CONFIRM")))), (getFieldError("applicationSelection.ownerOtp") || otpError) && /*#__PURE__*/React.createElement(CardLabelError, null, ((_getFieldError5 = getFieldError("applicationSelection.ownerOtp")) === null || _getFieldError5 === void 0 ? void 0 : _getFieldError5.message) || otpError)), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32563
32572
  className: "card-label-smaller"
32564
- }, "Connection Type"), /*#__PURE__*/React.createElement("div", {
32573
+ }, t("WS_CONNECTION_TYPE")), /*#__PURE__*/React.createElement("div", {
32565
32574
  className: "field"
32566
32575
  }, /*#__PURE__*/React.createElement(Controller, {
32567
32576
  control: control,
@@ -32574,16 +32583,16 @@ const NewApplication = () => {
32574
32583
  className: "form-field",
32575
32584
  selected: props.value,
32576
32585
  disable: false,
32577
- option: dropdownData.connectionTypes,
32586
+ option: ConnectionType,
32578
32587
  errorStyle: !!getFieldError("applicationSelection.connectionType"),
32579
32588
  select: props.onChange,
32580
32589
  optionKey: "name",
32581
32590
  onBlur: props.onBlur,
32582
32591
  t: t
32583
32592
  })
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, {
32593
+ }))), getFieldError("applicationSelection.connectionType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError6 = getFieldError("applicationSelection.connectionType")) === null || _getFieldError6 === void 0 ? void 0 : _getFieldError6.message), connectionTypeIsTemporary && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32585
32594
  className: "card-label-smaller"
32586
- }, "Temporary Connection"), /*#__PURE__*/React.createElement("div", {
32595
+ }, t("WS_TEMPORARY_CONNECTION")), /*#__PURE__*/React.createElement("div", {
32587
32596
  className: "field"
32588
32597
  }, /*#__PURE__*/React.createElement(Controller, {
32589
32598
  control: control,
@@ -32603,9 +32612,9 @@ const NewApplication = () => {
32603
32612
  onBlur: props.onBlur,
32604
32613
  t: t
32605
32614
  })
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, {
32615
+ }))), connectionTypeIsTemporary && getFieldError("applicationSelection.temporaryConnection") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError7 = getFieldError("applicationSelection.temporaryConnection")) === null || _getFieldError7 === void 0 ? void 0 : _getFieldError7.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32607
32616
  className: "card-label-smaller"
32608
- }, "Category Type"), /*#__PURE__*/React.createElement("div", {
32617
+ }, t("WS_CATEGORY_TYPE")), /*#__PURE__*/React.createElement("div", {
32609
32618
  className: "field"
32610
32619
  }, /*#__PURE__*/React.createElement(Controller, {
32611
32620
  control: control,
@@ -32625,9 +32634,9 @@ const NewApplication = () => {
32625
32634
  onBlur: props.onBlur,
32626
32635
  t: t
32627
32636
  })
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, {
32637
+ }))), getFieldError("applicationSelection.subCategory") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError8 = getFieldError("applicationSelection.subCategory")) === null || _getFieldError8 === void 0 ? void 0 : _getFieldError8.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32629
32638
  className: "card-label-smaller"
32630
- }, "Water Demand Type"), /*#__PURE__*/React.createElement("div", {
32639
+ }, t("WS_WATER_DEMAND_TYPE")), /*#__PURE__*/React.createElement("div", {
32631
32640
  className: "field"
32632
32641
  }, /*#__PURE__*/React.createElement(Controller, {
32633
32642
  control: control,
@@ -32647,9 +32656,9 @@ const NewApplication = () => {
32647
32656
  onBlur: props.onBlur,
32648
32657
  t: t
32649
32658
  })
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, {
32659
+ }))), getFieldError("applicationSelection.categoryType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError9 = getFieldError("applicationSelection.categoryType")) === null || _getFieldError9 === void 0 ? void 0 : _getFieldError9.message), subCategoryIsDomestic && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32651
32660
  className: "card-label-smaller"
32652
- }, "Domestic Type"), /*#__PURE__*/React.createElement("div", {
32661
+ }, t("WS_DOMESTIC_TYPE")), /*#__PURE__*/React.createElement("div", {
32653
32662
  className: "field"
32654
32663
  }, /*#__PURE__*/React.createElement(Controller, {
32655
32664
  control: control,
@@ -32667,11 +32676,12 @@ const NewApplication = () => {
32667
32676
  }, {
32668
32677
  code: "ORGANIZATION",
32669
32678
  name: "Organization"
32670
- }]
32679
+ }],
32680
+ t: t
32671
32681
  })
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, {
32682
+ }))), subCategoryIsDomestic && getFieldError("applicationSelection.domesticType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError0 = getFieldError("applicationSelection.domesticType")) === null || _getFieldError0 === void 0 ? void 0 : _getFieldError0.message), subCategoryIsCommercial && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32673
32683
  className: "card-label-smaller"
32674
- }, "Commercial Type"), /*#__PURE__*/React.createElement("div", {
32684
+ }, t("WS_COMMERCIAL_TYPE")), /*#__PURE__*/React.createElement("div", {
32675
32685
  className: "field"
32676
32686
  }, /*#__PURE__*/React.createElement(Controller, {
32677
32687
  control: control,
@@ -32694,25 +32704,25 @@ const NewApplication = () => {
32694
32704
  t: t
32695
32705
  })
32696
32706
  }))))), /*#__PURE__*/React.createElement(SectionCard, {
32697
- description: "Enable this section only when the applicant is a Government Connection.",
32707
+ description: t("WS_GOVT_CONNECTION_DESC"),
32698
32708
  isOpen: collapsedSections.governmentEmployee,
32699
32709
  onToggle: toggleSection,
32700
32710
  sectionKey: "governmentEmployee",
32701
- title: "Government Connection",
32711
+ title: t("WS_GOVERNMENT_CONNECTION"),
32702
32712
  sectionRef: sectionRefs.governmentEmployee
32703
32713
  }, /*#__PURE__*/React.createElement(FieldBlock, {
32704
- label: "Government Connection"
32714
+ label: t("WS_GOVERNMENT_CONNECTION")
32705
32715
  }, /*#__PURE__*/React.createElement(Controller, {
32706
32716
  control: control,
32707
32717
  name: "governmentEmployee.isGovernmentEmployee",
32708
32718
  render: props => /*#__PURE__*/React.createElement(CheckBox, {
32709
32719
  checked: !!props.value,
32710
- label: "Applicant is a Government Connection",
32720
+ label: t("WS_APPLICANT_IS_GOVT_CONNECTION"),
32711
32721
  onChange: event => props.onChange(event.target.checked)
32712
32722
  })
32713
32723
  })), isGovernmentEmployee && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32714
32724
  className: "card-label-smaller"
32715
- }, "Organization Name"), /*#__PURE__*/React.createElement("div", {
32725
+ }, t("WS_ORGANIZATION_NAME")), /*#__PURE__*/React.createElement("div", {
32716
32726
  className: "field"
32717
32727
  }, /*#__PURE__*/React.createElement(TextInput, {
32718
32728
  name: "governmentEmployee.organizationName",
@@ -32720,9 +32730,9 @@ const NewApplication = () => {
32720
32730
  required: isGovernmentEmployee ? "Organization Name is required" : false
32721
32731
  }),
32722
32732
  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, {
32733
+ }))), getFieldError("governmentEmployee.organizationName") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError1 = getFieldError("governmentEmployee.organizationName")) === null || _getFieldError1 === void 0 ? void 0 : _getFieldError1.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32724
32734
  className: "card-label-smaller"
32725
- }, "Nature of Work"), /*#__PURE__*/React.createElement("div", {
32735
+ }, t("WS_NATURE_OF_WORK")), /*#__PURE__*/React.createElement("div", {
32726
32736
  className: "field"
32727
32737
  }, /*#__PURE__*/React.createElement(TextInput, {
32728
32738
  name: "governmentEmployee.natureOfWork",
@@ -32730,9 +32740,9 @@ const NewApplication = () => {
32730
32740
  required: isGovernmentEmployee ? "Nature of Work is required" : false
32731
32741
  }),
32732
32742
  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, {
32743
+ }))), getFieldError("governmentEmployee.natureOfWork") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError10 = getFieldError("governmentEmployee.natureOfWork")) === null || _getFieldError10 === void 0 ? void 0 : _getFieldError10.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32734
32744
  className: "card-label-smaller"
32735
- }, "Upload Document"), /*#__PURE__*/React.createElement("div", {
32745
+ }, t("WS_UPLOAD_DOCUMENT")), /*#__PURE__*/React.createElement("div", {
32736
32746
  className: "field"
32737
32747
  }, /*#__PURE__*/React.createElement(Controller, {
32738
32748
  control: control,
@@ -32753,11 +32763,11 @@ const NewApplication = () => {
32753
32763
  display: previewMode ? "none" : "block"
32754
32764
  }
32755
32765
  }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionCard, {
32756
- description: "Applicant name, organization details, and supporting ID proof.",
32766
+ description: t("WS_APPLICANT_DETAILS_DESC"),
32757
32767
  isOpen: collapsedSections.applicant,
32758
32768
  onToggle: toggleSection,
32759
32769
  sectionKey: "applicant",
32760
- title: applicantSectionTitle,
32770
+ title: t(applicantSectionTitle),
32761
32771
  sectionRef: sectionRefs.applicant
32762
32772
  }, /*#__PURE__*/React.createElement(Controller, {
32763
32773
  control: control,
@@ -32766,11 +32776,11 @@ const NewApplication = () => {
32766
32776
  validate: value => !!value || "Applicant Picture is required."
32767
32777
  },
32768
32778
  render: props => {
32769
- var _getFieldError10;
32779
+ var _getFieldError11;
32770
32780
  return /*#__PURE__*/React.createElement(ProfileImageUpload, {
32771
- error: (_getFieldError10 = getFieldError("applicant.UploadPicture")) === null || _getFieldError10 === void 0 ? void 0 : _getFieldError10.message,
32781
+ error: (_getFieldError11 = getFieldError("applicant.UploadPicture")) === null || _getFieldError11 === void 0 ? void 0 : _getFieldError11.message,
32772
32782
  isUploading: !!uploadingFields["applicant.UploadPicture"],
32773
- label: "Upload Picture",
32783
+ label: "WS_UPLOAD_PICTURE",
32774
32784
  onUpload: event => uploadFile(event, "applicant.UploadPicture", props.onChange),
32775
32785
  required: true,
32776
32786
  t: t,
@@ -32779,7 +32789,7 @@ const NewApplication = () => {
32779
32789
  }
32780
32790
  }), /*#__PURE__*/React.createElement(FieldBlock, {
32781
32791
  error: getFieldError("applicant.firstName"),
32782
- label: "First Name",
32792
+ label: t("WS_FIRST_NAME"),
32783
32793
  required: true
32784
32794
  }, /*#__PURE__*/React.createElement(TextInput, {
32785
32795
  errorStyle: !!getFieldError("applicant.firstName"),
@@ -32793,7 +32803,7 @@ const NewApplication = () => {
32793
32803
  name: "applicant.firstName"
32794
32804
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32795
32805
  error: getFieldError("applicant.middleName"),
32796
- label: "Middle Name"
32806
+ label: t("WS_MIDDLE_NAME")
32797
32807
  }, /*#__PURE__*/React.createElement(TextInput, {
32798
32808
  errorStyle: !!getFieldError("applicant.middleName"),
32799
32809
  inputRef: register({
@@ -32805,7 +32815,7 @@ const NewApplication = () => {
32805
32815
  name: "applicant.middleName"
32806
32816
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32807
32817
  error: getFieldError("applicant.lastName"),
32808
- label: "Last Name",
32818
+ label: t("WS_LAST_NAME"),
32809
32819
  required: true
32810
32820
  }, /*#__PURE__*/React.createElement(TextInput, {
32811
32821
  errorStyle: !!getFieldError("applicant.lastName"),
@@ -32819,7 +32829,7 @@ const NewApplication = () => {
32819
32829
  name: "applicant.lastName"
32820
32830
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32821
32831
  error: getFieldError("useDetails.gender"),
32822
- label: "Gender",
32832
+ label: t("WS_GENDER"),
32823
32833
  required: true
32824
32834
  }, /*#__PURE__*/React.createElement(Controller, {
32825
32835
  control: control,
@@ -32830,19 +32840,21 @@ const NewApplication = () => {
32830
32840
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32831
32841
  option: [{
32832
32842
  name: "Male",
32833
- code: "MALE"
32843
+ code: "MALE",
32844
+ i18nKey: "MALE"
32834
32845
  }, {
32835
32846
  name: "Female",
32836
- code: "FEMALE"
32847
+ code: "FEMALE",
32848
+ i18nKey: "FEMALE"
32837
32849
  }],
32838
- optionKey: "name",
32850
+ optionKey: "i18nKey",
32839
32851
  selected: props.value,
32840
32852
  select: props.onChange,
32841
32853
  t: t
32842
32854
  })
32843
32855
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32844
32856
  error: getFieldError("applicant.ParentorSpouse"),
32845
- label: "Parent/ spouse",
32857
+ label: t("WS_PARENT_OR_SPOUSE"),
32846
32858
  required: true
32847
32859
  }, /*#__PURE__*/React.createElement(TextInput, {
32848
32860
  errorStyle: !!getFieldError("applicant.ParentorSpouse"),
@@ -32856,7 +32868,7 @@ const NewApplication = () => {
32856
32868
  name: "applicant.ParentorSpouse"
32857
32869
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32858
32870
  error: getFieldError("contact.emailId"),
32859
- label: "Email ID",
32871
+ label: t("WS_EMAIL_ID"),
32860
32872
  required: true
32861
32873
  }, /*#__PURE__*/React.createElement(TextInput, {
32862
32874
  errorStyle: !!getFieldError("contact.emailId"),
@@ -32870,7 +32882,7 @@ const NewApplication = () => {
32870
32882
  name: "contact.emailId"
32871
32883
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32872
32884
  error: getFieldError("contact.mobileNumber"),
32873
- label: "Mobile Number",
32885
+ label: t("WS_MOBILE_NUMBER"),
32874
32886
  required: true
32875
32887
  }, /*#__PURE__*/React.createElement(TextInput, {
32876
32888
  errorStyle: !!getFieldError("contact.mobileNumber"),
@@ -32885,7 +32897,7 @@ const NewApplication = () => {
32885
32897
  name: "contact.mobileNumber"
32886
32898
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32887
32899
  error: getFieldError("contact.whatsAppNumber"),
32888
- label: "WhatsApp Number"
32900
+ label: t("WS_WHATS_APP_NUMBER")
32889
32901
  }, /*#__PURE__*/React.createElement(TextInput, {
32890
32902
  errorStyle: !!getFieldError("contact.whatsAppNumber"),
32891
32903
  inputRef: register({
@@ -32897,25 +32909,25 @@ const NewApplication = () => {
32897
32909
  maxlength: 10,
32898
32910
  name: "contact.whatsAppNumber"
32899
32911
  }))), /*#__PURE__*/React.createElement(SectionCard, {
32900
- description: "Enable this section only when the applicant is a DJB employee.",
32912
+ description: t("WS_DJB_EMPLOYEE_DESC"),
32901
32913
  isOpen: collapsedSections.employee,
32902
32914
  onToggle: toggleSection,
32903
32915
  sectionKey: "djbEmployee",
32904
- title: "DJB Employee",
32916
+ title: t("WS_DJB_EMPLOYEE"),
32905
32917
  sectionRef: sectionRefs.djbEmployee
32906
32918
  }, /*#__PURE__*/React.createElement(FieldBlock, {
32907
- label: "DJB Employee"
32919
+ label: t("WS_DJB_EMPLOYEE")
32908
32920
  }, /*#__PURE__*/React.createElement(Controller, {
32909
32921
  control: control,
32910
32922
  name: "djbEmployee.isDjbEmployee",
32911
32923
  render: props => /*#__PURE__*/React.createElement(CheckBox, {
32912
32924
  checked: !!props.value,
32913
- label: "Applicant is a DJB Employee",
32925
+ label: t("WS_APPLICANT_IS_DJB_EMPLOYEE"),
32914
32926
  onChange: event => props.onChange(event.target.checked)
32915
32927
  })
32916
32928
  })), isDjbEmployee && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FieldBlock, {
32917
32929
  error: getFieldError("djbEmployee.employeeId"),
32918
- label: "Employee ID",
32930
+ label: t("WS_EMPLOYEE_ID"),
32919
32931
  required: isDjbEmployee
32920
32932
  }, /*#__PURE__*/React.createElement(TextInput, {
32921
32933
  errorStyle: !!getFieldError("djbEmployee.employeeId"),
@@ -32925,7 +32937,7 @@ const NewApplication = () => {
32925
32937
  name: "djbEmployee.employeeId"
32926
32938
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32927
32939
  error: getFieldError("djbEmployee.retirementDate"),
32928
- label: "Date of Retirement",
32940
+ label: t("WS_DATE_OF_RETIREMENT"),
32929
32941
  required: isDjbEmployee
32930
32942
  }, /*#__PURE__*/React.createElement(Controller, {
32931
32943
  control: control,
@@ -32940,7 +32952,7 @@ const NewApplication = () => {
32940
32952
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32941
32953
  error: getFieldError("djbEmployee.officeNameAndAddress"),
32942
32954
  isFullWidth: true,
32943
- label: "Office Name & Address",
32955
+ label: t("WS_OFFICE_NAME_AND_ADDRESS"),
32944
32956
  required: isDjbEmployee
32945
32957
  }, /*#__PURE__*/React.createElement(TextArea, {
32946
32958
  className: getFieldError("djbEmployee.officeNameAndAddress") ? "employee-card-input-error" : "",
@@ -32952,40 +32964,15 @@ const NewApplication = () => {
32952
32964
  minHeight: "96px"
32953
32965
  }
32954
32966
  })))), /*#__PURE__*/React.createElement(SectionCard, {
32955
- description: "Property location and administrative boundary details.",
32967
+ description: t("WS_PROPERTY_ADDRESS_DESC"),
32956
32968
  isOpen: collapsedSections.address,
32957
32969
  onToggle: toggleSection,
32958
32970
  sectionKey: "propertyAddress",
32959
- title: "Property Address",
32971
+ title: t("WS_PROPERTY_ADDRESS"),
32960
32972
  sectionRef: sectionRefs.propertyAddress
32961
32973
  }, /*#__PURE__*/React.createElement(FieldBlock, {
32962
- error: getFieldError("propertyAddress.city"),
32963
- label: "City"
32964
- }, /*#__PURE__*/React.createElement(Controller, {
32965
- control: control,
32966
- name: "propertyAddress.city",
32967
- render: props => /*#__PURE__*/React.createElement(Dropdown, {
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"
32985
- })
32986
- })), /*#__PURE__*/React.createElement(FieldBlock, {
32987
32974
  error: getFieldError("propertyAddress.pinCode"),
32988
- label: "Pin Code",
32975
+ label: t("WS_PIN_CODE"),
32989
32976
  required: true
32990
32977
  }, /*#__PURE__*/React.createElement(Controller, {
32991
32978
  control: control,
@@ -33015,7 +33002,7 @@ const NewApplication = () => {
33015
33002
  })
33016
33003
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33017
33004
  error: getFieldError("propertyAddress.locality"),
33018
- label: "Locality",
33005
+ label: t("WS_LOCALITY"),
33019
33006
  required: true
33020
33007
  }, /*#__PURE__*/React.createElement(Controller, {
33021
33008
  control: control,
@@ -33043,42 +33030,60 @@ const NewApplication = () => {
33043
33030
  })
33044
33031
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33045
33032
  error: getFieldError("propertyAddress.state"),
33046
- label: "State"
33047
- }, /*#__PURE__*/React.createElement(TextInput, {
33048
- errorStyle: !!getFieldError("propertyAddress.state"),
33049
- inputRef: register(),
33050
- name: "propertyAddress.state"
33033
+ label: t("WS_STATE")
33034
+ }, /*#__PURE__*/React.createElement(Controller, {
33035
+ control: control,
33036
+ name: "propertyAddress.city",
33037
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
33038
+ className: "form-field",
33039
+ selected: props.value || city,
33040
+ select: val => {
33041
+ setCity(val);
33042
+ props.onChange(val);
33043
+ },
33044
+ option: allCities,
33045
+ optionCardStyles: {
33046
+ overflowY: "auto",
33047
+ maxHeight: "300px"
33048
+ },
33049
+ optionKey: "i18nKey",
33050
+ t: t,
33051
+ style: {
33052
+ width: "100%"
33053
+ },
33054
+ placeholder: t("WS_SELECT")
33055
+ })
33051
33056
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33052
33057
  error: getFieldError("propertyAddress.street"),
33053
- label: "Street"
33058
+ label: t("WS_STREET")
33054
33059
  }, /*#__PURE__*/React.createElement(TextInput, {
33055
33060
  errorStyle: !!getFieldError("propertyAddress.street"),
33056
33061
  inputRef: register(),
33057
33062
  name: "propertyAddress.street"
33058
33063
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33059
33064
  error: getFieldError("propertyAddress.houseNo"),
33060
- label: "House No"
33065
+ label: t("WS_HOUSE_NO")
33061
33066
  }, /*#__PURE__*/React.createElement(TextInput, {
33062
33067
  errorStyle: !!getFieldError("propertyAddress.houseNo"),
33063
33068
  inputRef: register(),
33064
33069
  name: "propertyAddress.houseNo"
33065
33070
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33066
33071
  error: getFieldError("propertyAddress.block"),
33067
- label: "Block"
33072
+ label: t("WS_BLOCK")
33068
33073
  }, /*#__PURE__*/React.createElement(TextInput, {
33069
33074
  errorStyle: !!getFieldError("propertyAddress.block"),
33070
33075
  inputRef: register(),
33071
33076
  name: "propertyAddress.block"
33072
33077
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33073
33078
  error: getFieldError("propertyAddress.zone"),
33074
- label: "Zone"
33079
+ label: t("WS_ZONE")
33075
33080
  }, /*#__PURE__*/React.createElement(TextInput, {
33076
33081
  errorStyle: !!getFieldError("propertyAddress.zone"),
33077
33082
  inputRef: register(),
33078
33083
  name: "propertyAddress.zone"
33079
33084
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33080
33085
  error: getFieldError("propertyAddress.landmark"),
33081
- label: "Landmark"
33086
+ label: t("WS_LANDMARK")
33082
33087
  }, /*#__PURE__*/React.createElement(TextInput, {
33083
33088
  errorStyle: !!getFieldError("propertyAddress.landmark"),
33084
33089
  inputRef: register(),
@@ -33086,7 +33091,7 @@ const NewApplication = () => {
33086
33091
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33087
33092
  error: getFieldError("propertyAddress.address"),
33088
33093
  isFullWidth: true,
33089
- label: "Address"
33094
+ label: t("WS_ADDRESS")
33090
33095
  }, /*#__PURE__*/React.createElement(TextArea, {
33091
33096
  className: getFieldError("propertyAddress.address") ? "employee-card-input-error" : "",
33092
33097
  inputRef: register({
@@ -33097,15 +33102,15 @@ const NewApplication = () => {
33097
33102
  minHeight: "96px"
33098
33103
  }
33099
33104
  }))), /*#__PURE__*/React.createElement(SectionCard, {
33100
- description: "Usage attributes for the property and the requested water connection.",
33105
+ description: t("WS_USE_DETAILS_DESC"),
33101
33106
  isOpen: collapsedSections.usage,
33102
33107
  onToggle: toggleSection,
33103
33108
  sectionKey: "useDetails",
33104
- title: "Property and Water Connection Use Details",
33109
+ title: t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS"),
33105
33110
  sectionRef: sectionRefs.useDetails
33106
33111
  }, /*#__PURE__*/React.createElement(FieldBlock, {
33107
33112
  error: getFieldError("useDetails.propertyType"),
33108
- label: "Property Type",
33113
+ label: t("WS_PROPERTY_TYPE"),
33109
33114
  required: true
33110
33115
  }, /*#__PURE__*/React.createElement(Controller, {
33111
33116
  control: control,
@@ -33122,7 +33127,7 @@ const NewApplication = () => {
33122
33127
  })
33123
33128
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33124
33129
  error: getFieldError("useDetails.plotArea"),
33125
- label: "Plot Area (Sq. m.)",
33130
+ label: t("WS_PLOT_AREA"),
33126
33131
  required: true
33127
33132
  }, /*#__PURE__*/React.createElement(TextInput, {
33128
33133
  errorStyle: !!getFieldError("useDetails.plotArea"),
@@ -33136,7 +33141,7 @@ const NewApplication = () => {
33136
33141
  name: "useDetails.plotArea"
33137
33142
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33138
33143
  error: getFieldError("useDetails.builtUpArea"),
33139
- label: "Built-up Area (Sq. m.)",
33144
+ label: t("WS_BUILT_UP_AREA"),
33140
33145
  required: true
33141
33146
  }, /*#__PURE__*/React.createElement(TextInput, {
33142
33147
  errorStyle: !!getFieldError("useDetails.builtUpArea"),
@@ -33150,7 +33155,7 @@ const NewApplication = () => {
33150
33155
  name: "useDetails.builtUpArea"
33151
33156
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33152
33157
  error: getFieldError("useDetails.noOfFloors"),
33153
- label: "Number of Floors",
33158
+ label: t("WS_NUMBER_OF_FLOORS"),
33154
33159
  required: true
33155
33160
  }, /*#__PURE__*/React.createElement(TextInput, {
33156
33161
  errorStyle: !!getFieldError("useDetails.noOfFloors"),
@@ -33164,7 +33169,7 @@ const NewApplication = () => {
33164
33169
  name: "useDetails.noOfFloors"
33165
33170
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33166
33171
  error: getFieldError("useDetails.NumberofDwellingUnits"),
33167
- label: "Number of Dwelling Units",
33172
+ label: t("WS_NUMBER_OF_DWELLING_UNITS"),
33168
33173
  required: true
33169
33174
  }, /*#__PURE__*/React.createElement(TextInput, {
33170
33175
  errorStyle: !!getFieldError("useDetails.NumberofDwellingUnits"),
@@ -33178,7 +33183,7 @@ const NewApplication = () => {
33178
33183
  name: "useDetails.NumberofDwellingUnits"
33179
33184
  })), isHospitalProperty ? /*#__PURE__*/React.createElement(FieldBlock, {
33180
33185
  error: getFieldError("useDetails.hospitalBeds"),
33181
- label: "Number of Beds",
33186
+ label: t("WS_NUMBER_OF_BEDS"),
33182
33187
  required: true
33183
33188
  }, /*#__PURE__*/React.createElement(TextInput, {
33184
33189
  errorStyle: !!getFieldError("useDetails.hospitalBeds"),
@@ -33192,7 +33197,7 @@ const NewApplication = () => {
33192
33197
  name: "useDetails.hospitalBeds"
33193
33198
  })) : null, /*#__PURE__*/React.createElement(FieldBlock, {
33194
33199
  error: getFieldError("useDetails.SelectYearofConstruction"),
33195
- label: "Select Year of Construction",
33200
+ label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
33196
33201
  required: true
33197
33202
  }, /*#__PURE__*/React.createElement(Controller, {
33198
33203
  control: control,
@@ -33209,7 +33214,7 @@ const NewApplication = () => {
33209
33214
  })
33210
33215
  })), /*#__PURE__*/React.createElement(FieldBlock, {
33211
33216
  error: getFieldError("useDetails.WaterConnectionUsageType"),
33212
- label: "Water Connection Usage Type",
33217
+ label: t("WS_WATER_CONNECTION_USAGE_TYPE"),
33213
33218
  required: true
33214
33219
  }, /*#__PURE__*/React.createElement(Controller, {
33215
33220
  control: control,
@@ -33428,7 +33433,7 @@ const NewApplication = () => {
33428
33433
  error: getFieldError("propertyAddress.otherDocument")
33429
33434
  }), /*#__PURE__*/React.createElement(FieldBlock, {
33430
33435
  error: getFieldError("declaration.submittedBy"),
33431
- label: "Submitted By *",
33436
+ label: "Submitted By",
33432
33437
  required: true
33433
33438
  }, /*#__PURE__*/React.createElement(Controller, {
33434
33439
  control: control,
@@ -44821,6 +44826,320 @@ const BulkBillGeneration = ({
44821
44826
  }));
44822
44827
  };
44823
44828
 
44829
+ const OLDApplication = () => {
44830
+ const {
44831
+ t
44832
+ } = useTranslation();
44833
+ const {
44834
+ state
44835
+ } = useLocation();
44836
+ const history = useHistory();
44837
+ let filters = getQueryStringParams(location.search);
44838
+ const [canSubmit, setSubmitValve] = useState(false);
44839
+ const [isEnableLoader, setIsEnableLoader] = useState(false);
44840
+ const [showToast, setShowToast] = useState(null);
44841
+ const [appDetails, setAppDetails] = useState({});
44842
+ const [waterAndSewerageBoth, setWaterAndSewerageBoth] = useState(null);
44843
+ const [config, setConfig] = useState({
44844
+ head: "",
44845
+ body: []
44846
+ });
44847
+ let tenantId = Digit.ULBService.getCurrentTenantId();
44848
+ if (!tenantId) {
44849
+ var _Digit$SessionStorage;
44850
+ tenantId = (_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code;
44851
+ }
44852
+ const stateId = Digit.ULBService.getStateId();
44853
+ let {
44854
+ data: newConfig,
44855
+ isLoading
44856
+ } = Digit.Hooks.ws.useWSConfigMDMS.WSCreateConfig(stateId, {});
44857
+ const [propertyId, setPropertyId] = useState(new URLSearchParams(useLocation().search).get("propertyId"));
44858
+ const [sessionFormData, setSessionFormData, clearSessionFormData] = Digit.Hooks.useSessionStorage("PT_CREATE_EMP_WS_NEW_FORM", {});
44859
+ const {
44860
+ data: propertyDetails
44861
+ } = Digit.Hooks.pt.usePropertySearch({
44862
+ filters: {
44863
+ propertyIds: propertyId
44864
+ },
44865
+ tenantId: tenantId
44866
+ }, {
44867
+ filters: {
44868
+ propertyIds: propertyId
44869
+ },
44870
+ tenantId: tenantId,
44871
+ enabled: propertyId && propertyId != "" ? true : false
44872
+ });
44873
+ useEffect(() => {
44874
+ sessionStorage.removeItem("FORMSTATE_ERRORS");
44875
+ }, []);
44876
+ useEffect(() => {
44877
+ console.log("[WS] useEffect newConfig triggered", {
44878
+ isLoading,
44879
+ newConfig
44880
+ });
44881
+ if (!isLoading && newConfig) {
44882
+ const config = newConfig.find(conf => conf.hideInCitizen && conf.isCreate);
44883
+ console.log("[WS] found config", config);
44884
+ if (config) {
44885
+ var _config$body;
44886
+ config.head = "WS_APP_FOR_WATER_AND_SEWERAGE_LABEL";
44887
+ 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)) || [];
44888
+ console.log("[WS] allCreateSections", allCreateSections);
44889
+ const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionHolderDetails", "WSConnectionDetails", "WSDocumentsEmployee"];
44890
+ const reorderedBody = [];
44891
+ desiredComponentOrder.forEach(compName => {
44892
+ const section = allCreateSections.find(s => {
44893
+ var _s$body, _s$body$;
44894
+ return ((_s$body = s.body) === null || _s$body === void 0 ? void 0 : (_s$body$ = _s$body[0]) === null || _s$body$ === void 0 ? void 0 : _s$body$.component) === compName;
44895
+ });
44896
+ if (section) {
44897
+ if (compName === "CPTPropertySearchNSummary") section.head = "WS_COMMON_PROPERTY_DETAILS";
44898
+ if (compName === "WSConnectionHolderDetails") section.head = "WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER";
44899
+ if (compName === "WSConnectionDetails") section.head = "WS_COMMON_CONNECTION_DETAIL";
44900
+ if (compName === "WSDocumentsEmployee") section.head = "WS_COMMON_DOCS";
44901
+ reorderedBody.push(section);
44902
+ }
44903
+ });
44904
+ allCreateSections.forEach(section => {
44905
+ var _section$body, _section$body$;
44906
+ const compName = (_section$body = section.body) === null || _section$body === void 0 ? void 0 : (_section$body$ = _section$body[0]) === null || _section$body$ === void 0 ? void 0 : _section$body$.component;
44907
+ if (!reorderedBody.find(r => {
44908
+ var _r$body, _r$body$;
44909
+ return ((_r$body = r.body) === null || _r$body === void 0 ? void 0 : (_r$body$ = _r$body[0]) === null || _r$body$ === void 0 ? void 0 : _r$body$.component) === compName;
44910
+ })) {
44911
+ reorderedBody.push(section);
44912
+ }
44913
+ });
44914
+ console.log("[WS] reorderedBody", reorderedBody);
44915
+ config.body = reorderedBody;
44916
+ setConfig(config);
44917
+ }
44918
+ }
44919
+ }, [newConfig, isLoading]);
44920
+ useEffect(() => {
44921
+ var _sessionFormData$cpt, _sessionFormData$cpt$, _sessionFormData$cpt2, _sessionFormData$cpt3;
44922
+ !propertyId && (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$cpt = sessionFormData.cpt) === null || _sessionFormData$cpt === void 0 ? void 0 : (_sessionFormData$cpt$ = _sessionFormData$cpt.details) === null || _sessionFormData$cpt$ === void 0 ? void 0 : _sessionFormData$cpt$.propertyId) && setPropertyId(sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$cpt2 = sessionFormData.cpt) === null || _sessionFormData$cpt2 === void 0 ? void 0 : (_sessionFormData$cpt3 = _sessionFormData$cpt2.details) === null || _sessionFormData$cpt3 === void 0 ? void 0 : _sessionFormData$cpt3.propertyId);
44923
+ }, [sessionFormData === null || sessionFormData === void 0 ? void 0 : sessionFormData.cpt]);
44924
+ useEffect(() => {
44925
+ var _propertyDetails$Prop;
44926
+ setSessionFormData({
44927
+ ...sessionFormData,
44928
+ cpt: {
44929
+ details: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop = propertyDetails.Properties) === null || _propertyDetails$Prop === void 0 ? void 0 : _propertyDetails$Prop[0]
44930
+ }
44931
+ });
44932
+ }, [propertyDetails]);
44933
+ const {
44934
+ isLoading: creatingWaterApplicationLoading,
44935
+ isError: createWaterApplicationError,
44936
+ data: createWaterResponse,
44937
+ error: createWaterError,
44938
+ mutate: waterMutation
44939
+ } = Digit.Hooks.ws.useWaterCreateAPI("WATER");
44940
+ const {
44941
+ isLoading: updatingWaterApplicationLoading,
44942
+ isError: updateWaterApplicationError,
44943
+ data: updateWaterResponse,
44944
+ error: updateWaterError,
44945
+ mutate: waterUpdateMutation
44946
+ } = Digit.Hooks.ws.useWSApplicationActions("WATER");
44947
+ const {
44948
+ isLoading: creatingSewerageApplicationLoading,
44949
+ isError: createSewerageApplicationError,
44950
+ data: createSewerageResponse,
44951
+ error: createSewerageError,
44952
+ mutate: sewerageMutation
44953
+ } = Digit.Hooks.ws.useWaterCreateAPI("SEWERAGE");
44954
+ const {
44955
+ isLoading: updatingSewerageApplicationLoading,
44956
+ isError: updateSewerageApplicationError,
44957
+ data: updateSewerageResponse,
44958
+ error: updateSewerageError,
44959
+ mutate: sewerageUpdateMutation
44960
+ } = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE");
44961
+ const onFormValueChange = (setValue, formData, formState) => {
44962
+ var _formState$errors, _formState$errors$Con, _Object$keys, _formState$errors2, _formState$errors2$Co;
44963
+ if (!lodash.isEqual(sessionFormData, formData)) {
44964
+ setSessionFormData({
44965
+ ...sessionFormData,
44966
+ ...formData
44967
+ });
44968
+ sessionStorage.setItem("FORMSTATE_ERRORS", JSON.stringify(formState === null || formState === void 0 ? void 0 : formState.errors));
44969
+ }
44970
+ if (Object.keys(formState.errors).length > 0 && Object.keys(formState.errors).length == 1 && formState !== null && formState !== void 0 && (_formState$errors = formState.errors) !== null && _formState$errors !== void 0 && (_formState$errors$Con = _formState$errors["ConnectionHolderDetails"]) !== null && _formState$errors$Con !== void 0 && _formState$errors$Con.type && ((_Object$keys = Object.keys(formState === null || formState === void 0 ? void 0 : (_formState$errors2 = formState.errors) === null || _formState$errors2 === void 0 ? void 0 : (_formState$errors2$Co = _formState$errors2["ConnectionHolderDetails"]) === null || _formState$errors2$Co === void 0 ? void 0 : _formState$errors2$Co.type)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) == 1 && formState.errors["ConnectionHolderDetails"] && Object.values(formState.errors["ConnectionHolderDetails"].type).filter(ob => {
44971
+ var _ob$ref;
44972
+ return ob.type === "required" && (ob === null || ob === void 0 ? void 0 : (_ob$ref = ob.ref) === null || _ob$ref === void 0 ? void 0 : _ob$ref.value) !== "";
44973
+ }).length > 0) setSubmitValve(true);else setSubmitValve(!Object.keys(formState.errors).length);
44974
+ };
44975
+ const closeToastOfError = () => {
44976
+ setShowToast(null);
44977
+ };
44978
+ const onSubmit = async data => {
44979
+ var _data$cpt, _propertyDetails$Prop2, _formStateErros$Conne, _Object$keys2, _formStateErros$Conne2, _data$cpt3, _data$ConnectionDetai, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _propertyDetails$Prop4, _propertyDetails$Prop5, _propertyDetails$Prop6, _propertyDetails$Prop7, _data$ConnectionDetai2;
44980
+ console.log("[WS] onSubmit triggered", {
44981
+ data,
44982
+ propertyId,
44983
+ propertyDetails
44984
+ });
44985
+ if (!(data !== null && data !== void 0 && (_data$cpt = data.cpt) !== null && _data$cpt !== void 0 && _data$cpt.id) && !(propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop2 = propertyDetails.Properties) !== null && _propertyDetails$Prop2 !== void 0 && _propertyDetails$Prop2[0])) {
44986
+ var _data$cpt2;
44987
+ if (!(data !== null && data !== void 0 && (_data$cpt2 = data.cpt) !== null && _data$cpt2 !== void 0 && _data$cpt2.details) || !propertyDetails) {
44988
+ console.warn("[WS] onSubmit EXIT: invalid property", {
44989
+ cpt: data === null || data === void 0 ? void 0 : data.cpt,
44990
+ propertyDetails
44991
+ });
44992
+ setShowToast({
44993
+ key: "error",
44994
+ message: "ERR_INVALID_PROPERTY_ID"
44995
+ });
44996
+ return;
44997
+ }
44998
+ }
44999
+ const errors = sessionStorage.getItem("FORMSTATE_ERRORS");
45000
+ console.log("[WS] FORMSTATE_ERRORS from sessionStorage:", errors);
45001
+ const formStateErros = typeof errors === "string" && errors !== "null" ? JSON.parse(errors) : {};
45002
+ if (Object.keys(formStateErros).length > 0 && !(Object.keys(formStateErros).length == 1 && formStateErros !== null && formStateErros !== void 0 && (_formStateErros$Conne = formStateErros["ConnectionHolderDetails"]) !== null && _formStateErros$Conne !== void 0 && _formStateErros$Conne.type && ((_Object$keys2 = Object.keys(formStateErros === null || formStateErros === void 0 ? void 0 : (_formStateErros$Conne2 = formStateErros["ConnectionHolderDetails"]) === null || _formStateErros$Conne2 === void 0 ? void 0 : _formStateErros$Conne2.type)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.length) == 1 && formStateErros["ConnectionHolderDetails"] && Object.values(formStateErros["ConnectionHolderDetails"].type).filter(ob => {
45003
+ var _ob$ref2;
45004
+ return ob.type === "required" && (ob === null || ob === void 0 ? void 0 : (_ob$ref2 = ob.ref) === null || _ob$ref2 === void 0 ? void 0 : _ob$ref2.value) !== "";
45005
+ }).length > 0)) {
45006
+ console.warn("[WS] onSubmit EXIT: formState errors blocking submit", formStateErros);
45007
+ setShowToast({
45008
+ warning: true,
45009
+ message: "PLEASE_FILL_MANDATORY_DETAILS"
45010
+ });
45011
+ return;
45012
+ }
45013
+ if (!(data !== null && data !== void 0 && (_data$cpt3 = data.cpt) !== null && _data$cpt3 !== void 0 && _data$cpt3.details)) {
45014
+ var _propertyDetails$Prop3;
45015
+ data.cpt = {
45016
+ details: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop3 = propertyDetails.Properties) === null || _propertyDetails$Prop3 === void 0 ? void 0 : _propertyDetails$Prop3[0]
45017
+ };
45018
+ }
45019
+ data.channel = "CITIZEN";
45020
+ const connDetail = (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai = data.ConnectionDetails) === null || _data$ConnectionDetai === void 0 ? void 0 : _data$ConnectionDetai[0]) || {};
45021
+ data.applicationSelection = {
45022
+ serviceType: {
45023
+ code: "WATER"
45024
+ },
45025
+ connectionType: {
45026
+ code: (connDetail === null || connDetail === void 0 ? void 0 : connDetail.connectionType) || "Metered"
45027
+ },
45028
+ applicantType: {
45029
+ code: "NONPTPRESSURE"
45030
+ },
45031
+ categoryType: {
45032
+ code: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde = data.ConnectionHolderDetails) === null || _data$ConnectionHolde === void 0 ? void 0 : (_data$ConnectionHolde2 = _data$ConnectionHolde[0]) === null || _data$ConnectionHolde2 === void 0 ? void 0 : (_data$ConnectionHolde3 = _data$ConnectionHolde2.ownerType) === null || _data$ConnectionHolde3 === void 0 ? void 0 : _data$ConnectionHolde3.code) || (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde4 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde4 === void 0 ? void 0 : (_data$ConnectionHolde5 = _data$ConnectionHolde4[0]) === null || _data$ConnectionHolde5 === void 0 ? void 0 : _data$ConnectionHolde5.ownerType) || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop4 = propertyDetails.Properties) === null || _propertyDetails$Prop4 === void 0 ? void 0 : (_propertyDetails$Prop5 = _propertyDetails$Prop4[0]) === null || _propertyDetails$Prop5 === void 0 ? void 0 : (_propertyDetails$Prop6 = _propertyDetails$Prop5.owners) === null || _propertyDetails$Prop6 === void 0 ? void 0 : (_propertyDetails$Prop7 = _propertyDetails$Prop6[0]) === null || _propertyDetails$Prop7 === void 0 ? void 0 : _propertyDetails$Prop7.ownerType) || "NONE"
45033
+ }
45034
+ };
45035
+ if (data !== null && data !== void 0 && (_data$ConnectionDetai2 = data.ConnectionDetails) !== null && _data$ConnectionDetai2 !== void 0 && _data$ConnectionDetai2[0]) {
45036
+ data.ConnectionDetails[0].water = true;
45037
+ data.ConnectionDetails[0].sewerage = false;
45038
+ data.ConnectionDetails[0].service = "Water";
45039
+ }
45040
+ const allDetails = cloneDeep_1(data);
45041
+ const payload = await createPayloadOfWS(data);
45042
+ console.log("[WS] createPayloadOfWS result:", payload);
45043
+ if (!(payload !== null && payload !== void 0 && payload.water) && !(payload !== null && payload !== void 0 && payload.sewerage)) {
45044
+ console.error("[WS] onSubmit EXIT: payload has neither water nor sewerage", payload);
45045
+ setShowToast({
45046
+ key: "error",
45047
+ message: "ERR_CONNECTION_TYPE_MISSING"
45048
+ });
45049
+ return;
45050
+ }
45051
+ let waterAndSewerageLoader = false;
45052
+ if (payload !== null && payload !== void 0 && payload.water && payload !== null && payload !== void 0 && payload.sewerage) waterAndSewerageLoader = true;
45053
+ let waterConnection = {
45054
+ WaterConnection: payload,
45055
+ disconnectRequest: false,
45056
+ reconnectRequest: false
45057
+ };
45058
+ if (waterAndSewerageLoader) {
45059
+ setWaterAndSewerageBoth(true);
45060
+ sessionStorage.setItem("setWaterAndSewerageBoth", JSON.stringify(true));
45061
+ } else {
45062
+ sessionStorage.setItem("setWaterAndSewerageBoth", JSON.stringify(false));
45063
+ }
45064
+ if (payload !== null && payload !== void 0 && payload.water) {
45065
+ if (waterMutation) {
45066
+ setIsEnableLoader(true);
45067
+ await waterMutation(waterConnection, {
45068
+ onError: error => {
45069
+ var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
45070
+ setIsEnableLoader(false);
45071
+ console.error("[WS] waterMutation error", error);
45072
+ setShowToast({
45073
+ key: "error",
45074
+ message: (error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : (_error$response$data$ = _error$response$data.Errors) === null || _error$response$data$ === void 0 ? void 0 : (_error$response$data$2 = _error$response$data$[0]) === null || _error$response$data$2 === void 0 ? void 0 : _error$response$data$2.message) || (error === null || error === void 0 ? void 0 : error.message) || "ERR_UNKNOWN"
45075
+ });
45076
+ setTimeout(closeToastOfError, 5000);
45077
+ },
45078
+ onSuccess: async data => {
45079
+ var _data$WaterConnection;
45080
+ console.log("[WS] waterMutation success", data);
45081
+ let response = await updatePayloadOfWS(data === null || data === void 0 ? void 0 : (_data$WaterConnection = data.WaterConnection) === null || _data$WaterConnection === void 0 ? void 0 : _data$WaterConnection[0], "WATER");
45082
+ let waterConnectionUpdate = {
45083
+ WaterConnection: response
45084
+ };
45085
+ waterUpdateMutation(waterConnectionUpdate, {
45086
+ onError: error => {
45087
+ var _error$response2, _error$response2$data, _error$response2$data2, _error$response2$data3;
45088
+ setIsEnableLoader(false);
45089
+ console.error("[WS] waterUpdateMutation error", error);
45090
+ setShowToast({
45091
+ key: "error",
45092
+ message: (error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : (_error$response2$data2 = _error$response2$data.Errors) === null || _error$response2$data2 === void 0 ? void 0 : (_error$response2$data3 = _error$response2$data2[0]) === null || _error$response2$data3 === void 0 ? void 0 : _error$response2$data3.message) || (error === null || error === void 0 ? void 0 : error.message) || "ERR_UNKNOWN"
45093
+ });
45094
+ setTimeout(closeToastOfError, 5000);
45095
+ },
45096
+ onSuccess: data => {
45097
+ var _data$WaterConnection3, _data$WaterConnection4;
45098
+ console.log("[WS] waterUpdateMutation success", data);
45099
+ setAppDetails(prev => {
45100
+ var _data$WaterConnection2;
45101
+ return {
45102
+ ...prev,
45103
+ waterConnection: data === null || data === void 0 ? void 0 : (_data$WaterConnection2 = data.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : _data$WaterConnection2[0]
45104
+ };
45105
+ });
45106
+ clearSessionFormData();
45107
+ history.push(`/digit-ui/employee/ws/ws-response?applicationNumber=${data === null || data === void 0 ? void 0 : (_data$WaterConnection3 = data.WaterConnection) === null || _data$WaterConnection3 === void 0 ? void 0 : (_data$WaterConnection4 = _data$WaterConnection3[0]) === null || _data$WaterConnection4 === void 0 ? void 0 : _data$WaterConnection4.applicationNo}`);
45108
+ }
45109
+ });
45110
+ }
45111
+ });
45112
+ }
45113
+ }
45114
+ };
45115
+ const closeToast = () => {
45116
+ setShowToast(null);
45117
+ };
45118
+ if (isEnableLoader || isLoading) {
45119
+ return /*#__PURE__*/React.createElement(Loader, null);
45120
+ }
45121
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
45122
+ style: {
45123
+ marginLeft: "15px"
45124
+ }
45125
+ }, /*#__PURE__*/React.createElement(Header, null, t(config.head))), /*#__PURE__*/React.createElement(FormComposer, {
45126
+ config: config.body,
45127
+ userType: "employee",
45128
+ onFormValueChange: onFormValueChange,
45129
+ label: creatingWaterApplicationLoading || creatingSewerageApplicationLoading || updatingWaterApplicationLoading || updatingSewerageApplicationLoading ? t("CS_COMMON_SUBMITTING") : t("CS_COMMON_SUBMIT"),
45130
+ onSubmit: onSubmit,
45131
+ defaultValues: sessionFormData,
45132
+ cardFormWrapperClassName: "new-application-card"
45133
+ }), showToast && /*#__PURE__*/React.createElement(Toast, {
45134
+ isDleteBtn: true,
45135
+ error: (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? true : false,
45136
+ warning: showToast === null || showToast === void 0 ? void 0 : showToast.warning,
45137
+ label: t(showToast === null || showToast === void 0 ? void 0 : showToast.message),
45138
+ onClose: closeToast,
45139
+ isWarning: showToast === null || showToast === void 0 ? void 0 : showToast.isWarning
45140
+ }));
45141
+ };
45142
+
44824
45143
  const WSModule = ({
44825
45144
  stateCode,
44826
45145
  userType,
@@ -44978,7 +45297,8 @@ const componentsToRegister = {
44978
45297
  WSSearchWaterConnectionIntegrated: SearchWaterConnectionIntegrated,
44979
45298
  WSSearchIntegrated: SearchIntegrated,
44980
45299
  WSSearchWaterConnectionViewIntegrated: SearchWaterConnectionViewIntegrated,
44981
- WSBulkBillGeneration: BulkBillGeneration
45300
+ WSBulkBillGeneration: BulkBillGeneration,
45301
+ WSOLDApplication: OLDApplication
44982
45302
  };
44983
45303
  const initWSComponents = () => {
44984
45304
  Object.entries(componentsToRegister).forEach(([key, value]) => {