@djb25/digit-ui-module-ws 1.0.18 → 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$contact3, _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,28 +489,37 @@ 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
- commercialType: data === null || data === void 0 ? void 0 : (_data$applicationSele11 = data.applicationSelection) === null || _data$applicationSele11 === void 0 ? void 0 : (_data$applicationSele12 = _data$applicationSele11.commercialType) === null || _data$applicationSele12 === void 0 ? void 0 : _data$applicationSele12.code,
487
- govtOrganization: data === null || data === void 0 ? void 0 : (_data$applicationSele13 = data.applicationSelection) === null || _data$applicationSele13 === void 0 ? void 0 : _data$applicationSele13.govtOrganization,
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,
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,
503
+ ownerAuthorizationDoc: data === null || data === void 0 ? void 0 : (_data$applicationSele15 = data.applicationSelection) === null || _data$applicationSele15 === void 0 ? void 0 : (_data$applicationSele16 = _data$applicationSele15.ownerAuthorizationDoc) === null || _data$applicationSele16 === void 0 ? void 0 : (_data$applicationSele17 = _data$applicationSele16[0]) === null || _data$applicationSele17 === void 0 ? void 0 : (_data$applicationSele18 = _data$applicationSele17[1]) === null || _data$applicationSele18 === void 0 ? void 0 : _data$applicationSele18.fileStoreId,
504
+ ownerContactNumber: data === null || data === void 0 ? void 0 : (_data$applicationSele19 = data.applicationSelection) === null || _data$applicationSele19 === void 0 ? void 0 : _data$applicationSele19.ownerContactNumber,
505
+ isOwnerVerified: data === null || data === void 0 ? void 0 : (_data$applicationSele20 = data.applicationSelection) === null || _data$applicationSele20 === void 0 ? void 0 : _data$applicationSele20.isOwnerVerified,
506
+ commercialType: data === null || data === void 0 ? void 0 : (_data$applicationSele21 = data.applicationSelection) === null || _data$applicationSele21 === void 0 ? void 0 : (_data$applicationSele22 = _data$applicationSele21.commercialType) === null || _data$applicationSele22 === void 0 ? void 0 : _data$applicationSele22.code,
507
+ govtOrganization: data === null || data === void 0 ? void 0 : (_data$applicationSele23 = data.applicationSelection) === null || _data$applicationSele23 === void 0 ? void 0 : _data$applicationSele23.govtOrganization,
508
+ governmentEmployee: data === null || data === void 0 ? void 0 : data.governmentEmployee,
488
509
  whatsAppNumber: data === null || data === void 0 ? void 0 : (_data$contact3 = data.contact) === null || _data$contact3 === void 0 ? void 0 : _data$contact3.whatsAppNumber,
510
+ identityProofNumber: data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : _data$documents.identityProofNumber,
511
+ ownershipDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents2 = data.documents) === null || _data$documents2 === void 0 ? void 0 : _data$documents2.ownershipDocumentNumber,
512
+ otherDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.otherDocumentNumber,
489
513
  detailsProvidedBy: ""
490
514
  },
491
- tenantId: (data === null || data === void 0 ? void 0 : (_data$cpt4 = data.cpt) === null || _data$cpt4 === void 0 ? void 0 : (_data$cpt4$details = _data$cpt4.details) === null || _data$cpt4$details === void 0 ? void 0 : _data$cpt4$details.tenantId) || (data === null || data === void 0 ? void 0 : (_data$propertyAddress4 = data.propertyAddress) === null || _data$propertyAddress4 === void 0 ? void 0 : (_data$propertyAddress5 = _data$propertyAddress4.city) === null || _data$propertyAddress5 === void 0 ? void 0 : _data$propertyAddress5.code),
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(),
492
516
  processInstance: {
493
517
  action: "INITIATE"
494
518
  },
495
- channel: "CFC_COUNTER"
519
+ channel: (data === null || data === void 0 ? void 0 : data.channel) || "CFC_COUNTER"
496
520
  };
497
- sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : data.documents));
498
- sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$cpt5 = data.cpt) === null || _data$cpt5 === void 0 ? void 0 : _data$cpt5.details));
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) || {}));
499
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;
500
524
  return payload;
501
525
  };
@@ -507,19 +531,19 @@ const updatePayloadOfWS = async (data, type) => {
507
531
  ...(data === null || data === void 0 ? void 0 : data.processInstance),
508
532
  action: "SUBMIT_APPLICATION"
509
533
  },
510
- documents: JSON.parse(sessionStorage.getItem("WS_DOCUMENTS_INOF")),
511
- 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"),
512
536
  connectionType: type === "WATER" ? data === null || data === void 0 ? void 0 : data.connectionType : "Non Metered"
513
537
  };
514
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;
515
539
  return payload;
516
540
  };
517
541
  const convertToWSUpdate = data => {
518
- var _data$WaterConnection, _data$WaterConnection2, _data$documents, _Digit5, _Digit5$Customization, _Digit5$Customization2, _Digit6, _Digit6$Customization, _Digit6$Customization2;
542
+ var _data$WaterConnection, _data$WaterConnection2, _data$documents4, _Digit5, _Digit5$Customization, _Digit5$Customization2, _Digit6, _Digit6$Customization, _Digit6$Customization2;
519
543
  let formdata = {
520
544
  WaterConnection: {
521
545
  ...(data === null || data === void 0 ? void 0 : (_data$WaterConnection = data.WaterConnectionResult) === null || _data$WaterConnection === void 0 ? void 0 : (_data$WaterConnection2 = _data$WaterConnection.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : _data$WaterConnection2[0]),
522
- documents: [...(data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : _data$documents.documents)],
546
+ documents: [...(data === null || data === void 0 ? void 0 : (_data$documents4 = data.documents) === null || _data$documents4 === void 0 ? void 0 : _data$documents4.documents)],
523
547
  processInstance: {
524
548
  action: "SUBMIT_APPLICATION"
525
549
  }
@@ -529,7 +553,7 @@ const convertToWSUpdate = data => {
529
553
  return formdata;
530
554
  };
531
555
  const convertToEditWSUpdate = data => {
532
- var _data$WaterConnection3, _data$WaterConnection4, _data$documents2, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$ConnectionHolde8, _data$ConnectionHolde9, _data$ConnectionHolde0, _data$ConnectionHolde1, _data$ConnectionHolde10, _data$ConnectionHolde11, _data$waterConectionD, _data$waterConectionD2, _data$waterConectionD3, _data$applicationType, _data$applicationType2, _data$serviceName, _waterResult$serviceN, _data$documents3, _data$sewerageConnect, _data$sewerageConnect2, _Digit7, _Digit7$Customization, _Digit7$Customization2, _Digit8, _Digit8$Customization, _Digit8$Customization2;
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;
533
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];
534
558
  let formdata = {
535
559
  WaterConnection: {
@@ -541,7 +565,7 @@ const convertToEditWSUpdate = data => {
541
565
  status: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.status : waterResult === null || waterResult === void 0 ? void 0 : waterResult.status,
542
566
  connectionNo: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.connectionNo : waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionNo) || null,
543
567
  oldConnectionNo: null,
544
- documents: [...(data === null || data === void 0 ? void 0 : (_data$documents2 = data.documents) === null || _data$documents2 === void 0 ? void 0 : _data$documents2.documents)],
568
+ documents: [...(data === null || data === void 0 ? void 0 : (_data$documents5 = data.documents) === null || _data$documents5 === void 0 ? void 0 : _data$documents5.documents)],
545
569
  plumberInfo: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.plumberInfo : (waterResult === null || waterResult === void 0 ? void 0 : waterResult.plumberInfo) || [],
546
570
  roadType: null,
547
571
  roadCuttingArea: null,
@@ -564,16 +588,16 @@ const convertToEditWSUpdate = data => {
564
588
  },
565
589
  applicationType: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.applicationType : "MODIFY_WATER_CONNECTION",
566
590
  dateEffectiveFrom: convertDateToEpoch(Date.now() + 86400000),
567
- connectionHolders: data !== null && data !== void 0 && data.isEditApplication ? !(data !== null && data !== void 0 && (_data$ConnectionHolde = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde !== void 0 && _data$ConnectionHolde.isOwnerSame) ? [{
568
- correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde2 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde2 === void 0 ? void 0 : _data$ConnectionHolde2.address) || "",
569
- fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde3 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde3 === void 0 ? void 0 : _data$ConnectionHolde3.guardian) || "",
570
- gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde4 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde4 === void 0 ? void 0 : (_data$ConnectionHolde5 = _data$ConnectionHolde4.gender) === null || _data$ConnectionHolde5 === void 0 ? void 0 : _data$ConnectionHolde5.code) || "",
571
- mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde6 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde6 === void 0 ? void 0 : _data$ConnectionHolde6.mobileNumber) || "",
572
- name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde7 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde7 === void 0 ? void 0 : _data$ConnectionHolde7.name) || "",
573
- emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde8 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde8 === void 0 ? void 0 : _data$ConnectionHolde8.emailId) || "",
574
- ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde9 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde9 === void 0 ? void 0 : (_data$ConnectionHolde0 = _data$ConnectionHolde9.specialCategoryType) === null || _data$ConnectionHolde0 === void 0 ? void 0 : _data$ConnectionHolde0.code) || "",
575
- relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde1 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde1 === void 0 ? void 0 : (_data$ConnectionHolde10 = _data$ConnectionHolde1.relationship) === null || _data$ConnectionHolde10 === void 0 ? void 0 : _data$ConnectionHolde10.code) || "",
576
- sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde11 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde11 === void 0 ? void 0 : _data$ConnectionHolde11.sameAsOwnerDetails
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
577
601
  }] : null : waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionHolders,
578
602
  oldApplication: false,
579
603
  channel: "CITIZEN",
@@ -594,7 +618,7 @@ const convertToEditWSUpdate = data => {
594
618
  water: data !== null && data !== void 0 && (_data$applicationType = data.applicationType) !== null && _data$applicationType !== void 0 && _data$applicationType.includes("WATER") ? true : false,
595
619
  sewerage: data !== null && data !== void 0 && (_data$applicationType2 = data.applicationType) !== null && _data$applicationType2 !== void 0 && _data$applicationType2.includes("WATER") ? true : false,
596
620
  service: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$serviceName = data.serviceName) === null || _data$serviceName === void 0 ? void 0 : _data$serviceName.code : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$serviceN = waterResult.serviceName) === null || _waterResult$serviceN === void 0 ? void 0 : _waterResult$serviceN.code,
597
- reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.documents)],
621
+ reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$documents6 = data.documents) === null || _data$documents6 === void 0 ? void 0 : _data$documents6.documents)],
598
622
  proposedWaterClosets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect = data.sewerageConnectionDetails) === null || _data$sewerageConnect === void 0 ? void 0 : _data$sewerageConnect.proposedWaterClosets,
599
623
  proposedToilets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect2 = data.sewerageConnectionDetails) === null || _data$sewerageConnect2 === void 0 ? void 0 : _data$sewerageConnect2.proposedToilets,
600
624
  comment: "",
@@ -608,7 +632,7 @@ const convertToEditWSUpdate = data => {
608
632
  return formdata;
609
633
  };
610
634
  const convertToEditSWUpdate = data => {
611
- var _data$SewerageConnect, _data$SewerageConnect2, _data$documents4, _data$ConnectionHolde12, _data$ConnectionHolde13, _data$ConnectionHolde14, _data$ConnectionHolde15, _data$ConnectionHolde16, _data$ConnectionHolde17, _data$ConnectionHolde18, _data$ConnectionHolde19, _data$ConnectionHolde20, _data$ConnectionHolde21, _data$ConnectionHolde22, _data$ConnectionHolde23, _data$ConnectionHolde24, _data$waterConectionD4, _data$waterConectionD5, _data$waterConectionD6, _data$applicationType3, _data$applicationType4, _data$serviceName2, _SewerageResult$servi, _data$documents5, _data$sewerageConnect3, _data$sewerageConnect4, _Digit9, _Digit9$Customization, _Digit9$Customization2, _Digit0, _Digit0$Customization, _Digit0$Customization2;
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;
612
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];
613
637
  let formdata = {
614
638
  SewerageConnection: {
@@ -620,7 +644,7 @@ const convertToEditSWUpdate = data => {
620
644
  status: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.status : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.status,
621
645
  connectionNo: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.connectionNo : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.connectionNo) || null,
622
646
  oldConnectionNo: null,
623
- documents: [...(data === null || data === void 0 ? void 0 : (_data$documents4 = data.documents) === null || _data$documents4 === void 0 ? void 0 : _data$documents4.documents)],
647
+ documents: [...(data === null || data === void 0 ? void 0 : (_data$documents7 = data.documents) === null || _data$documents7 === void 0 ? void 0 : _data$documents7.documents)],
624
648
  plumberInfo: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.plumberInfo : (SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.plumberInfo) || [],
625
649
  roadType: null,
626
650
  roadCuttingArea: null,
@@ -643,16 +667,16 @@ const convertToEditSWUpdate = data => {
643
667
  },
644
668
  applicationType: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.applicationType : "MODIFY_WATER_CONNECTION",
645
669
  dateEffectiveFrom: convertDateToEpoch(Date.now() + 86400000),
646
- connectionHolders: data !== null && data !== void 0 && data.isEditApplication ? !(data !== null && data !== void 0 && (_data$ConnectionHolde12 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde12 !== void 0 && _data$ConnectionHolde12.isOwnerSame) ? [{
647
- correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde13 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde13 === void 0 ? void 0 : _data$ConnectionHolde13.address) || "",
648
- fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde14 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde14 === void 0 ? void 0 : _data$ConnectionHolde14.guardian) || "",
649
- gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde15 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde15 === void 0 ? void 0 : (_data$ConnectionHolde16 = _data$ConnectionHolde15.gender) === null || _data$ConnectionHolde16 === void 0 ? void 0 : _data$ConnectionHolde16.code) || "",
650
- mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde17 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde17 === void 0 ? void 0 : _data$ConnectionHolde17.mobileNumber) || "",
651
- name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde18 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde18 === void 0 ? void 0 : _data$ConnectionHolde18.name) || "",
652
- emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde19 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde19 === void 0 ? void 0 : _data$ConnectionHolde19.emailId) || "",
653
- ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde20 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde20 === void 0 ? void 0 : (_data$ConnectionHolde21 = _data$ConnectionHolde20.specialCategoryType) === null || _data$ConnectionHolde21 === void 0 ? void 0 : _data$ConnectionHolde21.code) || "",
654
- relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde22 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde22 === void 0 ? void 0 : (_data$ConnectionHolde23 = _data$ConnectionHolde22.relationship) === null || _data$ConnectionHolde23 === void 0 ? void 0 : _data$ConnectionHolde23.code) || "",
655
- sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde24 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde24 === void 0 ? void 0 : _data$ConnectionHolde24.sameAsOwnerDetails
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
656
680
  }] : null : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.connectionHolders,
657
681
  oldApplication: false,
658
682
  channel: "CITIZEN",
@@ -673,7 +697,7 @@ const convertToEditSWUpdate = data => {
673
697
  water: data !== null && data !== void 0 && (_data$applicationType3 = data.applicationType) !== null && _data$applicationType3 !== void 0 && _data$applicationType3.includes("WATER") ? true : false,
674
698
  sewerage: data !== null && data !== void 0 && (_data$applicationType4 = data.applicationType) !== null && _data$applicationType4 !== void 0 && _data$applicationType4.includes("WATER") ? true : false,
675
699
  service: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$serviceName2 = data.serviceName) === null || _data$serviceName2 === void 0 ? void 0 : _data$serviceName2.code : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$servi = SewerageResult.serviceName) === null || _SewerageResult$servi === void 0 ? void 0 : _SewerageResult$servi.code,
676
- reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$documents5 = data.documents) === null || _data$documents5 === void 0 ? void 0 : _data$documents5.documents)],
700
+ reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$documents8 = data.documents) === null || _data$documents8 === void 0 ? void 0 : _data$documents8.documents)],
677
701
  proposedWaterClosets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect3 = data.sewerageConnectionDetails) === null || _data$sewerageConnect3 === void 0 ? void 0 : _data$sewerageConnect3.proposedWaterClosets,
678
702
  proposedToilets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect4 = data.sewerageConnectionDetails) === null || _data$sewerageConnect4 === void 0 ? void 0 : _data$sewerageConnect4.proposedToilets,
679
703
  comment: "",
@@ -687,12 +711,12 @@ const convertToEditSWUpdate = data => {
687
711
  return formdata;
688
712
  };
689
713
  const convertToSWUpdate = data => {
690
- var _data$SewerageConnect3, _data$SewerageConnect4, _data$documents6, _Digit1, _Digit1$Customization, _Digit1$Customization2, _Digit10, _Digit10$Customizatio, _Digit10$Customizatio2;
714
+ var _data$SewerageConnect3, _data$SewerageConnect4, _data$documents9, _Digit1, _Digit1$Customization, _Digit1$Customization2, _Digit10, _Digit10$Customizatio, _Digit10$Customizatio2;
691
715
  let formdata = {
692
716
  SewerageConnection: {
693
717
  ...(data === null || data === void 0 ? void 0 : (_data$SewerageConnect3 = data.SewerageConnectionResult) === null || _data$SewerageConnect3 === void 0 ? void 0 : (_data$SewerageConnect4 = _data$SewerageConnect3.SewerageConnections) === null || _data$SewerageConnect4 === void 0 ? void 0 : _data$SewerageConnect4[0]),
694
718
  connectionType: "Non Metered",
695
- documents: [...(data === null || data === void 0 ? void 0 : (_data$documents6 = data.documents) === null || _data$documents6 === void 0 ? void 0 : _data$documents6.documents)],
719
+ documents: [...(data === null || data === void 0 ? void 0 : (_data$documents9 = data.documents) === null || _data$documents9 === void 0 ? void 0 : _data$documents9.documents)],
696
720
  processInstance: {
697
721
  action: "SUBMIT_APPLICATION"
698
722
  }
@@ -1040,7 +1064,7 @@ const getDocumentsForPDF = (app, t) => {
1040
1064
  });
1041
1065
  };
1042
1066
  const getPDFData = (application, data, tenantInfo, t) => {
1043
- var _tenantInfo$city, _data$cpt6, _data$cpt6$details, _data$cpt7, _data$cpt7$details, _data$cpt8, _data$cpt8$details, _data$cpt9, _data$cpt9$details, _data$cpt0, _data$cpt0$details, _data$cpt0$details$ad, _data$cpt1, _data$cpt1$details, _data$cpt1$details$ad, _data$cpt10, _data$cpt10$details, _data$cpt10$details$a, _data$cpt11, _data$cpt11$details, _data$cpt11$details$a, _data$cpt12, _data$cpt12$details, _data$cpt12$details$a, _data$cpt13, _data$cpt13$details, _data$cpt13$details$a, _data$cpt13$details$a2, _data$cpt14, _application$plumberI, _application$plumberI2, _application$plumberI3, _application$plumberI4;
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;
1044
1068
  return {
1045
1069
  t: t,
1046
1070
  tenantId: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code,
@@ -1062,44 +1086,44 @@ const getPDFData = (application, data, tenantInfo, t) => {
1062
1086
  value: (application === null || application === void 0 ? void 0 : application.propertyId) || "N/A"
1063
1087
  }, {
1064
1088
  title: t("WS_PROPERTY_TYPE_LABEL"),
1065
- value: (data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : (_data$cpt6$details = _data$cpt6.details) === null || _data$cpt6$details === void 0 ? void 0 : _data$cpt6$details.propertyType) || "N/A"
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"
1066
1090
  }, {
1067
1091
  title: t("WS_PROPERTY_USAGE_TYPE_LABEL"),
1068
- value: (data === null || data === void 0 ? void 0 : (_data$cpt7 = data.cpt) === null || _data$cpt7 === void 0 ? void 0 : (_data$cpt7$details = _data$cpt7.details) === null || _data$cpt7$details === void 0 ? void 0 : _data$cpt7$details.usageCategory) || "N/A"
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"
1069
1093
  }, {
1070
1094
  title: t("WS_PROPERTY_SUB_USAGE_TYPE_LABEL"),
1071
1095
  value: "N/A"
1072
1096
  }, {
1073
1097
  title: t("WS_PROP_DETAIL_PLOT_SIZE_LABEL"),
1074
- value: (data === null || data === void 0 ? void 0 : (_data$cpt8 = data.cpt) === null || _data$cpt8 === void 0 ? void 0 : (_data$cpt8$details = _data$cpt8.details) === null || _data$cpt8$details === void 0 ? void 0 : _data$cpt8$details.superBuiltUpArea) || "N/A"
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"
1075
1099
  }, {
1076
1100
  title: t("WS_PROPERTY_NO_OF_FLOOR_LABEL"),
1077
- value: (data === null || data === void 0 ? void 0 : (_data$cpt9 = data.cpt) === null || _data$cpt9 === void 0 ? void 0 : (_data$cpt9$details = _data$cpt9.details) === null || _data$cpt9$details === void 0 ? void 0 : _data$cpt9$details.noOfFloors) || "N/A"
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"
1078
1102
  }, {
1079
1103
  title: t("WS_SERV_DETAIL_CONN_RAIN_WATER_HARVESTING_FAC"),
1080
- value: data === null || data === void 0 ? void 0 : (_data$cpt0 = data.cpt) === null || _data$cpt0 === void 0 ? void 0 : (_data$cpt0$details = _data$cpt0.details) === null || _data$cpt0$details === void 0 ? void 0 : (_data$cpt0$details$ad = _data$cpt0$details.additionalDetails) === null || _data$cpt0$details$ad === void 0 ? void 0 : _data$cpt0$details$ad.isRainwaterHarvesting
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
1081
1105
  }]
1082
1106
  }, {
1083
1107
  title: t("WS_COMMON_PROP_LOC_DETAIL_HEADER"),
1084
1108
  values: [{
1085
1109
  title: t("WS_PROP_DETAIL_CITY"),
1086
- value: data === null || data === void 0 ? void 0 : (_data$cpt1 = data.cpt) === null || _data$cpt1 === void 0 ? void 0 : (_data$cpt1$details = _data$cpt1.details) === null || _data$cpt1$details === void 0 ? void 0 : (_data$cpt1$details$ad = _data$cpt1$details.address) === null || _data$cpt1$details$ad === void 0 ? void 0 : _data$cpt1$details$ad.city
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
1087
1111
  }, {
1088
1112
  title: t("WS_PROP_DETAIL_DHNO"),
1089
- value: data === null || data === void 0 ? void 0 : (_data$cpt10 = data.cpt) === null || _data$cpt10 === void 0 ? void 0 : (_data$cpt10$details = _data$cpt10.details) === null || _data$cpt10$details === void 0 ? void 0 : (_data$cpt10$details$a = _data$cpt10$details.address) === null || _data$cpt10$details$a === void 0 ? void 0 : _data$cpt10$details$a.doorNo
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
1090
1114
  }, {
1091
1115
  title: t("WS_PROP_DETAIL_BUILD_NAME_LABEL"),
1092
- value: data === null || data === void 0 ? void 0 : (_data$cpt11 = data.cpt) === null || _data$cpt11 === void 0 ? void 0 : (_data$cpt11$details = _data$cpt11.details) === null || _data$cpt11$details === void 0 ? void 0 : (_data$cpt11$details$a = _data$cpt11$details.address) === null || _data$cpt11$details$a === void 0 ? void 0 : _data$cpt11$details$a.buildingName
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
1093
1117
  }, {
1094
1118
  title: t("WS_PROP_DETAIL_STREET_NAME"),
1095
- value: data === null || data === void 0 ? void 0 : (_data$cpt12 = data.cpt) === null || _data$cpt12 === void 0 ? void 0 : (_data$cpt12$details = _data$cpt12.details) === null || _data$cpt12$details === void 0 ? void 0 : (_data$cpt12$details$a = _data$cpt12$details.address) === null || _data$cpt12$details$a === void 0 ? void 0 : _data$cpt12$details$a.street
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
1096
1120
  }, {
1097
1121
  title: t("WS_PROP_DETAIL_LOCALITY_MOHALLA_LABEL"),
1098
- value: data === null || data === void 0 ? void 0 : (_data$cpt13 = data.cpt) === null || _data$cpt13 === void 0 ? void 0 : (_data$cpt13$details = _data$cpt13.details) === null || _data$cpt13$details === void 0 ? void 0 : (_data$cpt13$details$a = _data$cpt13$details.address) === null || _data$cpt13$details$a === void 0 ? void 0 : (_data$cpt13$details$a2 = _data$cpt13$details$a.locality) === null || _data$cpt13$details$a2 === void 0 ? void 0 : _data$cpt13$details$a2.name
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
1099
1123
  }]
1100
1124
  }, {
1101
1125
  title: t("WS_TASK_PROP_OWN_HEADER"),
1102
- values: getOwnersforPDF(data === null || data === void 0 ? void 0 : (_data$cpt14 = data.cpt) === null || _data$cpt14 === void 0 ? void 0 : _data$cpt14.details, t)
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)
1103
1127
  }, {
1104
1128
  ...(application !== null && application !== void 0 && application.applicationType.includes("WATER") ? {
1105
1129
  title: t("WS_COMMON_CONNECTION_DETAILS"),
@@ -1418,30 +1442,30 @@ const convertApplicationData = (data, serviceType, modify = false, editByConfig
1418
1442
  return payload;
1419
1443
  };
1420
1444
  const convertEditApplicationDetails = async (data, appData, actionData) => {
1421
- var _data$cpt15, _data$cpt15$details, _data$cpt15$details$o, _data$cpt16, _data$cpt16$details, _data$ConnectionDetai, _data$ConnectionDetai2, _data$ConnectionDetai3, _data$ConnectionDetai4, _data$ConnectionDetai5, _data$ConnectionDetai6, _data$ConnectionDetai7, _data$ConnectionDetai8, _data$ConnectionDetai9, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$ConnectionDetai13, _data$ConnectionDetai14, _data$ConnectionDetai15, _data$ConnectionDetai16, _data$ConnectionHolde25, _data$ConnectionHolde26, _appData$applicationD, _appData$applicationD2, _data$ConnectionHolde27, _data$ConnectionHolde28, _data$ConnectionHolde29, _data$ConnectionHolde30, _data$ConnectionHolde31, _data$ConnectionHolde32, _data$ConnectionHolde33, _data$ConnectionHolde34, _data$ConnectionHolde35, _data$ConnectionHolde36, _data$ConnectionHolde37, _data$ConnectionHolde38, _data$ConnectionHolde39, _data$ConnectionHolde40, _data$ConnectionHolde41, _data$ConnectionHolde42, _data$ConnectionHolde43, _data$ConnectionHolde44, _data$ConnectionHolde45, _data$ConnectionHolde46, _data$ConnectionHolde47, _data$cpt17, _data$DocumentsRequir;
1422
- data === null || data === void 0 ? void 0 : (_data$cpt15 = data.cpt) === null || _data$cpt15 === void 0 ? void 0 : (_data$cpt15$details = _data$cpt15.details) === null || _data$cpt15$details === void 0 ? void 0 : (_data$cpt15$details$o = _data$cpt15$details.owners) === null || _data$cpt15$details$o === void 0 ? void 0 : _data$cpt15$details$o.forEach(owner => {
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 => {
1423
1447
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
1424
1448
  });
1425
1449
  let payload = {
1426
1450
  ...appData.applicationData,
1427
- propertyId: data === null || data === void 0 ? void 0 : (_data$cpt16 = data.cpt) === null || _data$cpt16 === void 0 ? void 0 : (_data$cpt16$details = _data$cpt16.details) === null || _data$cpt16$details === void 0 ? void 0 : _data$cpt16$details.propertyId,
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,
1428
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),
1429
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),
1430
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),
1431
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),
1432
- connectionHolders: !(data !== null && data !== void 0 && (_data$ConnectionHolde25 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde25 !== void 0 && (_data$ConnectionHolde26 = _data$ConnectionHolde25[0]) !== null && _data$ConnectionHolde26 !== void 0 && _data$ConnectionHolde26.sameAsOwnerDetails) ? [{
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) ? [{
1433
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]),
1434
- correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde27 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde27 === void 0 ? void 0 : (_data$ConnectionHolde28 = _data$ConnectionHolde27[0]) === null || _data$ConnectionHolde28 === void 0 ? void 0 : _data$ConnectionHolde28.address) || "",
1435
- fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde29 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde29 === void 0 ? void 0 : (_data$ConnectionHolde30 = _data$ConnectionHolde29[0]) === null || _data$ConnectionHolde30 === void 0 ? void 0 : _data$ConnectionHolde30.guardian) || "",
1436
- gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde31 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde31 === void 0 ? void 0 : (_data$ConnectionHolde32 = _data$ConnectionHolde31[0]) === null || _data$ConnectionHolde32 === void 0 ? void 0 : (_data$ConnectionHolde33 = _data$ConnectionHolde32.gender) === null || _data$ConnectionHolde33 === void 0 ? void 0 : _data$ConnectionHolde33.code) || "",
1437
- mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde34 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde34 === void 0 ? void 0 : (_data$ConnectionHolde35 = _data$ConnectionHolde34[0]) === null || _data$ConnectionHolde35 === void 0 ? void 0 : _data$ConnectionHolde35.mobileNumber) || "",
1438
- name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde36 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde36 === void 0 ? void 0 : (_data$ConnectionHolde37 = _data$ConnectionHolde36[0]) === null || _data$ConnectionHolde37 === void 0 ? void 0 : _data$ConnectionHolde37.name) || "",
1439
- emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde38 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde38 === void 0 ? void 0 : (_data$ConnectionHolde39 = _data$ConnectionHolde38[0]) === null || _data$ConnectionHolde39 === void 0 ? void 0 : _data$ConnectionHolde39.emailId) || "",
1440
- ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde40 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde40 === void 0 ? void 0 : (_data$ConnectionHolde41 = _data$ConnectionHolde40[0]) === null || _data$ConnectionHolde41 === void 0 ? void 0 : (_data$ConnectionHolde42 = _data$ConnectionHolde41.ownerType) === null || _data$ConnectionHolde42 === void 0 ? void 0 : _data$ConnectionHolde42.code) || "",
1441
- relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde43 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde43 === void 0 ? void 0 : (_data$ConnectionHolde44 = _data$ConnectionHolde43[0]) === null || _data$ConnectionHolde44 === void 0 ? void 0 : (_data$ConnectionHolde45 = _data$ConnectionHolde44.relationship) === null || _data$ConnectionHolde45 === void 0 ? void 0 : _data$ConnectionHolde45.code) || "",
1442
- sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde46 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde46 === void 0 ? void 0 : (_data$ConnectionHolde47 = _data$ConnectionHolde46[0]) === null || _data$ConnectionHolde47 === void 0 ? void 0 : _data$ConnectionHolde47.sameAsOwnerDetails
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
1443
1467
  }] : null,
1444
- 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,
1445
1469
  processInstance: {
1446
1470
  action: actionData ? actionData : "RESUBMIT_APPLICATION"
1447
1471
  },
@@ -1562,14 +1586,14 @@ const getConvertedDate = async dateOfTime => {
1562
1586
  return convertedDate;
1563
1587
  };
1564
1588
  const convertModifyApplicationDetails = async (data, appData, actionData = "INITIATE") => {
1565
- var _data$cpt18, _data$cpt18$details, _data$cpt18$details$o, _data$cpt19, _data$cpt19$details, _data$cpt20, _data$cpt20$details, _data$connectionDetai, _data$connectionDetai2, _data$connectionDetai3, _data$connectionDetai4, _data$connectionDetai5, _data$connectionDetai6, _data$connectionDetai7, _data$connectionDetai8, _data$connectionDetai9, _data$connectionDetai0, _data$connectionDetai1, _data$connectionDetai10, _data$connectionDetai11, _data$connectionDetai12, _data$connectionDetai13, _data$connectionDetai14, _data$connectionDetai15, _data$connectionDetai16, _data$connectionDetai17, _data$connectionDetai18, _data$connectionDetai19, _data$connectionDetai20, _data$connectionDetai21, _data$connectionDetai22, _data$connectionDetai23, _data$connectionDetai24, _data$connectionDetai25, _data$connectionDetai26, _data$connectionDetai27, _data$connectionDetai28, _data$activationDetai, _data$activationDetai2, _data$activationDetai3, _data$activationDetai4, _data$activationDetai5, _data$activationDetai6, _data$activationDetai7, _data$activationDetai8, _data$activationDetai9, _data$activationDetai0, _data$activationDetai1, _data$activationDetai10, _data$activationDetai11, _data$activationDetai12, _data$activationDetai13, _data$activationDetai14, _data$activationDetai15, _data$activationDetai16, _data$activationDetai17, _data$activationDetai18, _data$DocumentsRequir3, _data$DocumentsRequir4, _data$DocumentsRequir5, _data$ConnectionHolde48, _data$ConnectionHolde49, _data$DocumentsRequir6, _data$cpt21;
1566
- data === null || data === void 0 ? void 0 : (_data$cpt18 = data.cpt) === null || _data$cpt18 === void 0 ? void 0 : (_data$cpt18$details = _data$cpt18.details) === null || _data$cpt18$details === void 0 ? void 0 : (_data$cpt18$details$o = _data$cpt18$details.owners) === null || _data$cpt18$details$o === void 0 ? void 0 : _data$cpt18$details$o.forEach(owner => {
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 => {
1567
1591
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
1568
1592
  });
1569
1593
  let formData = {
1570
1594
  ...appData.applicationData
1571
1595
  };
1572
- if (data !== null && data !== void 0 && (_data$cpt19 = data.cpt) !== null && _data$cpt19 !== void 0 && (_data$cpt19$details = _data$cpt19.details) !== null && _data$cpt19$details !== void 0 && _data$cpt19$details.propertyId) formData.propertyId = data === null || data === void 0 ? void 0 : (_data$cpt20 = data.cpt) === null || _data$cpt20 === void 0 ? void 0 : (_data$cpt20$details = _data$cpt20.details) === null || _data$cpt20$details === void 0 ? void 0 : _data$cpt20$details.propertyId;
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;
1573
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;
1574
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;
1575
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;
@@ -1582,19 +1606,19 @@ const convertModifyApplicationDetails = async (data, appData, actionData = "INIT
1582
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);
1583
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);
1584
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;
1585
- if (!(data !== null && data !== void 0 && (_data$ConnectionHolde48 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde48 !== void 0 && (_data$ConnectionHolde49 = _data$ConnectionHolde48[0]) !== null && _data$ConnectionHolde49 !== void 0 && _data$ConnectionHolde49.sameAsOwnerDetails)) {
1586
- var _appData$applicationD8, _appData$applicationD9, _data$ConnectionHolde50, _data$ConnectionHolde51, _data$ConnectionHolde52, _data$ConnectionHolde53, _data$ConnectionHolde54, _data$ConnectionHolde55, _data$ConnectionHolde56, _data$ConnectionHolde57, _data$ConnectionHolde58, _data$ConnectionHolde59, _data$ConnectionHolde60, _data$ConnectionHolde61, _data$ConnectionHolde62, _data$ConnectionHolde63, _data$ConnectionHolde64, _data$ConnectionHolde65, _data$ConnectionHolde66, _data$ConnectionHolde67, _data$ConnectionHolde68, _data$ConnectionHolde69, _data$ConnectionHolde70;
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;
1587
1611
  formData.connectionHolders = [{
1588
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]),
1589
- correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde50 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde50 === void 0 ? void 0 : (_data$ConnectionHolde51 = _data$ConnectionHolde50[0]) === null || _data$ConnectionHolde51 === void 0 ? void 0 : _data$ConnectionHolde51.address) || "",
1590
- fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde52 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde52 === void 0 ? void 0 : (_data$ConnectionHolde53 = _data$ConnectionHolde52[0]) === null || _data$ConnectionHolde53 === void 0 ? void 0 : _data$ConnectionHolde53.guardian) || "",
1591
- gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde54 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde54 === void 0 ? void 0 : (_data$ConnectionHolde55 = _data$ConnectionHolde54[0]) === null || _data$ConnectionHolde55 === void 0 ? void 0 : (_data$ConnectionHolde56 = _data$ConnectionHolde55.gender) === null || _data$ConnectionHolde56 === void 0 ? void 0 : _data$ConnectionHolde56.code) || "",
1592
- mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde57 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde57 === void 0 ? void 0 : (_data$ConnectionHolde58 = _data$ConnectionHolde57[0]) === null || _data$ConnectionHolde58 === void 0 ? void 0 : _data$ConnectionHolde58.mobileNumber) || "",
1593
- name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde59 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde59 === void 0 ? void 0 : (_data$ConnectionHolde60 = _data$ConnectionHolde59[0]) === null || _data$ConnectionHolde60 === void 0 ? void 0 : _data$ConnectionHolde60.name) || "",
1594
- emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde61 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde61 === void 0 ? void 0 : (_data$ConnectionHolde62 = _data$ConnectionHolde61[0]) === null || _data$ConnectionHolde62 === void 0 ? void 0 : _data$ConnectionHolde62.emailId) || "",
1595
- ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde63 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde63 === void 0 ? void 0 : (_data$ConnectionHolde64 = _data$ConnectionHolde63[0]) === null || _data$ConnectionHolde64 === void 0 ? void 0 : (_data$ConnectionHolde65 = _data$ConnectionHolde64.ownerType) === null || _data$ConnectionHolde65 === void 0 ? void 0 : _data$ConnectionHolde65.code) || "",
1596
- relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde66 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde66 === void 0 ? void 0 : (_data$ConnectionHolde67 = _data$ConnectionHolde66[0]) === null || _data$ConnectionHolde67 === void 0 ? void 0 : (_data$ConnectionHolde68 = _data$ConnectionHolde67.relationship) === null || _data$ConnectionHolde68 === void 0 ? void 0 : _data$ConnectionHolde68.code) || "",
1597
- sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde69 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde69 === void 0 ? void 0 : (_data$ConnectionHolde70 = _data$ConnectionHolde69[0]) === null || _data$ConnectionHolde70 === void 0 ? void 0 : _data$ConnectionHolde70.sameAsOwnerDetails
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
1598
1622
  }];
1599
1623
  }
1600
1624
  formData.processInstance = {
@@ -1603,7 +1627,7 @@ const convertModifyApplicationDetails = async (data, appData, actionData = "INIT
1603
1627
  formData.action = actionData;
1604
1628
  formData.channel = "CFC_COUNTER";
1605
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) || []));
1606
- sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$cpt21 = data.cpt) === null || _data$cpt21 === void 0 ? void 0 : _data$cpt21.details));
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));
1607
1631
  return formData;
1608
1632
  };
1609
1633
  const downloadPdf = (blob, fileName) => {
@@ -8963,9 +8987,10 @@ const WSDisconnectionResponse$1 = props => {
8963
8987
  };
8964
8988
 
8965
8989
  const BILLSBreadCrumbs = ({
8966
- location
8990
+ location,
8991
+ showPrint
8967
8992
  }) => {
8968
- 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;
8969
8994
  const {
8970
8995
  t
8971
8996
  } = useTranslation();
@@ -8978,6 +9003,8 @@ const BILLSBreadCrumbs = ({
8978
9003
  const applicationNumbercheck = new URLSearchParams(search).get("applicationNumber") || null;
8979
9004
  let isMobile = window.Digit.Utils.browser.isMobile();
8980
9005
  let requestParam = window.location.href.split("?")[1];
9006
+ const receiptKey = "consolidatedreceipt";
9007
+ const oldApplication = {};
8981
9008
  function findLastIndex(array, searchKey, searchValue) {
8982
9009
  var index = array.slice().reverse().findIndex(x => x[searchKey] === searchValue);
8983
9010
  var count = array.length - 1;
@@ -9172,11 +9199,11 @@ const BILLSBreadCrumbs = ({
9172
9199
  icon: HomeIcon
9173
9200
  }, {
9174
9201
  path: "/digit-ui/employee/module/details",
9175
- content: t("ES_TITLE_WATER_AND_SEWERAGE"),
9202
+ label: t("ES_TITLE_WATER_AND_SEWERAGE"),
9176
9203
  show: location.pathname.includes("/create-application") || location.pathname.includes("/new-application")
9177
9204
  }, {
9178
9205
  path: "/digit-ui/employee/ws/create-application",
9179
- content: t("ES_COMMON_WS_DOCUMENTS_REQUIRED"),
9206
+ label: t("ES_COMMON_WS_DOCUMENTS_REQUIRED"),
9180
9207
  show: location.pathname.includes("/create-application") || location.pathname.includes("/new-application"),
9181
9208
  rightContent: location.pathname.includes("/create-application") && /*#__PURE__*/React.createElement("div", {
9182
9209
  className: "flex-center flex-gap-1 .cursorPointer",
@@ -9190,61 +9217,61 @@ const BILLSBreadCrumbs = ({
9190
9217
  }, "Print"))
9191
9218
  }, {
9192
9219
  path: "/digit-ui/employee/water/inbox",
9193
- content: t("ES_COMMON_BILLS_WATER_INBOX_LABEL"),
9220
+ label: t("ES_COMMON_BILLS_WATER_INBOX_LABEL"),
9194
9221
  show: location.pathname.includes("/water/inbox") ? true : false
9195
9222
  }, {
9196
9223
  path: "/digit-ui/employee/ws/water/bill-amendment/inbox",
9197
- content: t("ES_COMMON_BILL_AMEND_WATER_INBOX_LABEL"),
9224
+ label: t("ES_COMMON_BILL_AMEND_WATER_INBOX_LABEL"),
9198
9225
  show: location.pathname.includes("/water/bill-amendment/inbox") ? true : false
9199
9226
  }, {
9200
9227
  path: "/digit-ui/employee/ws/sewerage/bill-amendment/inbox",
9201
- content: t("ES_COMMON_BILL_AMEND_SEWERAGE_INBOX_LABEL"),
9228
+ label: t("ES_COMMON_BILL_AMEND_SEWERAGE_INBOX_LABEL"),
9202
9229
  show: location.pathname.includes("/sewerage/bill-amendment/inbox") ? true : false
9203
9230
  }, {
9204
9231
  path: "/digit-ui/employee/ws/water/search-application",
9205
- 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"),
9206
9233
  show: location.pathname.includes("/water/search-application") ? true : false,
9207
9234
  isBack: fromScreen && true
9208
9235
  }, {
9209
9236
  path: "/digit-ui/employee/ws/water/search-connection",
9210
- 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"),
9211
9238
  show: location.pathname.includes("/water/search-connection") ? true : false,
9212
9239
  isBack: fromScreen && true
9213
9240
  }, {
9214
9241
  path: "/digit-ui/employee/ws/water/wns-search",
9215
- 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"),
9216
9243
  show: location.pathname.includes("/water/wns-search") ? true : false,
9217
9244
  isBack: fromScreen && true
9218
9245
  }, {
9219
9246
  path: "/digit-ui/employee/ws/sewerage/search-application",
9220
- 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"),
9221
9248
  show: location.pathname.includes("/sewerage/search-application") ? true : false,
9222
9249
  isBack: fromScreen && true
9223
9250
  }, {
9224
9251
  path: "/digit-ui/employee/ws/sewerage/search-connection",
9225
- 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"),
9226
9253
  show: location.pathname.includes("/sewerage/search-connection") ? true : false,
9227
9254
  isBack: fromScreen && true
9228
9255
  }, {
9229
9256
  path: "/digit-ui/employee/sewerage/inbox",
9230
- content: t("ES_COMMON_BILLS_SEWERAGE_INBOX_LABEL"),
9257
+ label: t("ES_COMMON_BILLS_SEWERAGE_INBOX_LABEL"),
9231
9258
  show: location.pathname.includes("/sewerage/inbox") ? true : false
9232
9259
  }, {
9233
9260
  path: "/digit-ui/employee/ws/new-application",
9234
- 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"),
9235
9262
  show: location.pathname.includes("/new-application") ? true : false
9236
9263
  }, {
9237
9264
  path: `${location === null || location === void 0 ? void 0 : location.pathname}${location.search}`,
9238
- content: t("ACTION_TEST_RESPONSE"),
9265
+ label: t("ACTION_TEST_RESPONSE"),
9239
9266
  show: location.pathname.includes("/ws-response") ? true : false
9240
9267
  }, {
9241
9268
  path: "/digit-ui/employee/ws/consumption-details",
9242
- 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"),
9243
9270
  show: location.pathname.includes("/consumption-details") ? true : false,
9244
9271
  isBack: fromScreen && true
9245
9272
  }, {
9246
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",
9247
- 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"),
9248
9275
  show: location.pathname.includes("/application-details") ? true : false,
9249
9276
  isBack: sessionStorage.getItem("redirectedfromEDIT") !== "true" && fromScreen && true,
9250
9277
  rightContent: /*#__PURE__*/React.createElement("div", {
@@ -9282,87 +9309,87 @@ const BILLSBreadCrumbs = ({
9282
9309
  }))
9283
9310
  }, {
9284
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",
9285
- 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"),
9286
9313
  show: location.pathname.includes("/modify-details") ? true : false,
9287
9314
  isBack: sessionStorage.getItem("redirectedfromEDIT") !== "true" && fromScreen && true
9288
9315
  }, {
9289
9316
  path: "/digit-ui/employee/ws/disconnection-details",
9290
- 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"),
9291
9318
  show: location.pathname.includes("/disconnection-details") ? true : false,
9292
9319
  isBack: fromScreen && true
9293
9320
  }, {
9294
9321
  path: "/digit-ui/employee/ws/connection-details",
9295
- 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"),
9296
9323
  show: location.pathname.includes("/connection-details") ? true : false,
9297
9324
  isBack: fromScreen && true
9298
9325
  }, {
9299
9326
  path: "/digit-ui/employee/ws/edit-application",
9300
- 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")}`,
9301
9328
  show: location.pathname.includes("/edit-application") ? true : false,
9302
9329
  isBack: true
9303
9330
  }, {
9304
9331
  path: `${location === null || location === void 0 ? void 0 : location.pathname}${location.search}`,
9305
- 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")}`,
9306
9333
  show: location.pathname.includes("/activate-connection") ? true : false,
9307
9334
  isBack: true
9308
9335
  }, {
9309
9336
  path: `${location === null || location === void 0 ? void 0 : location.pathname}${location.search}`,
9310
- 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")}`,
9311
9338
  show: location.pathname.includes("edit-disconnection-application") ? true : false,
9312
9339
  isBack: true
9313
9340
  }, {
9314
9341
  path: `${location === null || location === void 0 ? void 0 : location.pathname}${location.search}`,
9315
- 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")}`,
9316
9343
  show: location.pathname.includes("config-by-disconnection-application") ? true : false,
9317
9344
  isBack: true
9318
9345
  }, {
9319
9346
  path: `${location === null || location === void 0 ? void 0 : location.pathname}${location.search}`,
9320
- 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")}`,
9321
9348
  show: location.pathname.includes("resubmit-disconnection-application") ? true : false,
9322
9349
  isBack: true
9323
9350
  }, {
9324
9351
  path: `/digit-ui/employee/ws/new-disconnection/docsrequired`,
9325
- content: t("WS_NEW_DISCONNECTION_DOCS_REQUIRED"),
9352
+ label: t("WS_NEW_DISCONNECTION_DOCS_REQUIRED"),
9326
9353
  show: location.pathname.includes("/new-disconnection/docsrequired") ? true : false
9327
9354
  }, {
9328
9355
  path: `/digit-ui/employee/ws/new-disconnection/application-form`,
9329
- 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")}`,
9330
9357
  show: location.pathname.includes("/new-disconnection/application-form") ? true : false,
9331
9358
  isBack: true
9332
9359
  }, {
9333
9360
  path: `${location === null || location === void 0 ? void 0 : location.pathname}${location.search}`,
9334
- content: `${t("WS_NEW_DISCONNECTION_RESPONSE")}`,
9361
+ label: `${t("WS_NEW_DISCONNECTION_RESPONSE")}`,
9335
9362
  show: location.pathname.includes("/ws-disconnection-response") ? true : false,
9336
9363
  isBack: true
9337
9364
  }, {
9338
9365
  path: `${location === null || location === void 0 ? void 0 : location.pathname}${location.search}`,
9339
- 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"),
9340
9367
  show: location.pathname.includes("ws/modify-application") ? true : false,
9341
9368
  isBack: true
9342
9369
  }, {
9343
9370
  path: "/digit-ui/employee/ws/required-documents",
9344
- content: t("ES_COMMON_WS_DOCUMENTS_REQUIRED"),
9371
+ label: t("ES_COMMON_WS_DOCUMENTS_REQUIRED"),
9345
9372
  show: location.pathname.includes("/required-documents") ? true : false
9346
9373
  }, {
9347
9374
  path: requestParam ? `/digit-ui/employee/ws/bill-amendment?${requestParam}` : "/digit-ui/employee/ws/bill-amendment",
9348
- content: t("WS_BILL_AMEND_APP"),
9375
+ label: t("WS_BILL_AMEND_APP"),
9349
9376
  show: location.pathname.includes("ws/bill-amendment") && !IsEdit ? true : false
9350
9377
  }, {
9351
9378
  path: "/digit-ui/employee/ws/bill-amendment",
9352
- content: t("WS_BILL_AMEND_EDIT_APP"),
9379
+ label: t("WS_BILL_AMEND_EDIT_APP"),
9353
9380
  show: location.pathname.includes("ws/bill-amendment") && IsEdit ? true : false
9354
9381
  }, {
9355
9382
  path: "/digit-ui/employee/ws/response",
9356
- content: t("WS_ACK_SCREEN"),
9383
+ label: t("WS_ACK_SCREEN"),
9357
9384
  show: location.pathname.includes("/employee/ws/response") ? true : false,
9358
9385
  isclickable: false
9359
9386
  }, {
9360
9387
  path: "/digit-ui/employee/ws/generate-note-bill-amendment",
9361
- content: t("CS_TITLE_GENERATE_NOTE"),
9388
+ label: t("CS_TITLE_GENERATE_NOTE"),
9362
9389
  show: location.pathname.includes("/generate-note-bill-amendment") ? true : false
9363
9390
  }, {
9364
9391
  path: "/digit-ui/employee/ws/water/bulk-bil",
9365
- content: t("CS_TITLE_BULK_BILL"),
9392
+ label: t("CS_TITLE_BULK_BILL"),
9366
9393
  show: location.pathname.includes("/ws/water/bulk-bill") ? true : false
9367
9394
  }];
9368
9395
  let lastCrumbIndex = findLastIndex(crumbs, "show", true);
@@ -9370,6 +9397,9 @@ const BILLSBreadCrumbs = ({
9370
9397
  ...crumbs[lastCrumbIndex],
9371
9398
  isclickable: false
9372
9399
  };
9400
+ const getDynamicBreadcrumbs = () => {
9401
+ return crumbs.filter(crumb => crumb.show);
9402
+ };
9373
9403
  return /*#__PURE__*/React.createElement(React.Fragment, null, showWaringToast && /*#__PURE__*/React.createElement(Toast, {
9374
9404
  style: {
9375
9405
  zIndex: "10000"
@@ -9379,21 +9409,18 @@ const BILLSBreadCrumbs = ({
9379
9409
  label: t(showWaringToast === null || showWaringToast === void 0 ? void 0 : showWaringToast.message),
9380
9410
  onClose: () => setShowWaringToast(null),
9381
9411
  isDleteBtn: true
9382
- }), /*#__PURE__*/React.createElement(BreadcrumbHeader, {
9383
- 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") ? {
9384
- marginLeft: "20px"
9385
- } : {},
9412
+ }), /*#__PURE__*/React.createElement(ModuleHeader, {
9386
9413
  leftContent: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ArrowLeft, {
9387
9414
  className: "icon"
9388
9415
  }), "Back"),
9389
9416
  onLeftClick: () => window.history.back(),
9390
- breadcrumbs: crumbs
9417
+ breadcrumbs: getDynamicBreadcrumbs()
9391
9418
  }));
9392
9419
  };
9393
9420
  const App$1 = ({
9394
9421
  path
9395
9422
  }) => {
9396
- 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;
9397
9424
  const location = useLocation();
9398
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");
9399
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");
@@ -9401,27 +9428,28 @@ const App$1 = ({
9401
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");
9402
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");
9403
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");
9404
- 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");
9405
- 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");
9406
- 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");
9407
- 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");
9408
- 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");
9409
- 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");
9410
- 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");
9411
- 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");
9412
- 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");
9413
- 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");
9414
- 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");
9415
- 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");
9416
- 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");
9417
- 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");
9418
- 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");
9419
- 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");
9420
- 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");
9421
- 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");
9422
- 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");
9423
- 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");
9424
- 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");
9425
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");
9426
9454
  const locationCheckReqDocs = window.location.href.includes("/employee/ws/create-application") || window.location.href.includes("/employee/ws/new-disconnection/docsrequired");
9427
9455
  return /*#__PURE__*/React.createElement("div", {
@@ -9440,6 +9468,9 @@ const App$1 = ({
9440
9468
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9441
9469
  path: `${path}/new-application`,
9442
9470
  component: WSNewApplication
9471
+ }), /*#__PURE__*/React.createElement(PrivateRoute, {
9472
+ path: `${path}/old-application`,
9473
+ component: WSOLDApplication
9443
9474
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9444
9475
  path: `${path}/edit-application`,
9445
9476
  component: WSEditApplication
@@ -10961,10 +10992,7 @@ const WSConnectionDetails = ({
10961
10992
  useEffect(() => {
10962
10993
  var _connectionDetails$, _connectionDetails$2;
10963
10994
  if (userType === "employee") {
10964
- onSelect(config.key, {
10965
- ...formData[config.key],
10966
- ...connectionDetails
10967
- });
10995
+ onSelect(config.key, connectionDetails);
10968
10996
  }
10969
10997
  if (connectionDetails !== null && connectionDetails !== void 0 && (_connectionDetails$ = connectionDetails[0]) !== null && _connectionDetails$ !== void 0 && _connectionDetails$.water) setWaterSewarageSelection({
10970
10998
  water: true,
@@ -11884,8 +11912,8 @@ const WSConnectionHolderDetails = ({
11884
11912
  const {
11885
11913
  data: Menu,
11886
11914
  isLoading: isSpecialcategoryLoading
11887
- } = Digit.Hooks.pt.usePropertyMDMS(stateId, "PropertyTax", "OwnerType");
11888
- 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))) : "";
11889
11917
  useEffect(() => {
11890
11918
  const data = connectionHolderDetails.map(e => {
11891
11919
  return e;
@@ -12022,7 +12050,7 @@ const ConnectionDetails$1 = _props => {
12022
12050
  trigger();
12023
12051
  }, []);
12024
12052
  useEffect(() => {
12025
- 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) {
12026
12054
  const keys = Object.keys(formValue);
12027
12055
  const part = {};
12028
12056
  keys.forEach(key => part[key] = connectionHolderDetail[key]);
@@ -12068,7 +12096,7 @@ const ConnectionDetails$1 = _props => {
12068
12096
  setError(config.key, {
12069
12097
  type: errors
12070
12098
  });
12071
- } else if (!Object.keys(errors).length && formState.errors[config.key] && isErrors) {
12099
+ } else if (!Object.keys(errors).length && formState.errors[config.key]) {
12072
12100
  clearErrors(config.key);
12073
12101
  }
12074
12102
  }, [errors]);
@@ -21820,6 +21848,10 @@ const WSCard = () => {
21820
21848
  label: t("WS_APPLY_NEW_CONNECTION_HOME_CARD_LABEL"),
21821
21849
  link: `/digit-ui/employee/ws/create-application`,
21822
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"]
21823
21855
  }];
21824
21856
  links = links.filter(link => link.roles ? checkForEmployee(link.roles) : true);
21825
21857
  const propsForModuleCard = {
@@ -30927,6 +30959,10 @@ var applicantTypes = [
30927
30959
  {
30928
30960
  code: "TENANT",
30929
30961
  name: "Tenant"
30962
+ },
30963
+ {
30964
+ code: "RELATIVE",
30965
+ name: "Relative"
30930
30966
  }
30931
30967
  ];
30932
30968
  var connectionTypes = [
@@ -30993,18 +31029,50 @@ var propertyTypes = [
30993
31029
  name: "Hospital"
30994
31030
  }
30995
31031
  ];
31032
+ var temporaryConnectionTypes = [
31033
+ {
31034
+ code: "EXHIBITION",
31035
+ name: "Exhibition"
31036
+ },
31037
+ {
31038
+ code: "OFFICIAL_FUNCTION",
31039
+ name: "Official Function"
31040
+ },
31041
+ {
31042
+ code: "RELIGIOUS_FUNCTION",
31043
+ name: "Religious Function"
31044
+ },
31045
+ {
31046
+ code: "CIRCUS",
31047
+ name: "Circus"
31048
+ },
31049
+ {
31050
+ code: "CONSTRUCTION",
31051
+ name: "Construction"
31052
+ },
31053
+ {
31054
+ code: "AS_PER_COURT_ORDERS",
31055
+ name: "as per Court Orders"
31056
+ },
31057
+ {
31058
+ code: "SOCIAL_FAMILY_FUNCTION",
31059
+ name: "Social/Family Function"
31060
+ }
31061
+ ];
30996
31062
  var dropdownData = {
30997
31063
  serviceTypes: serviceTypes,
30998
31064
  applicantTypes: applicantTypes,
30999
31065
  connectionTypes: connectionTypes,
31000
31066
  categoryTypes: categoryTypes,
31001
31067
  subCategories: subCategories,
31002
- propertyTypes: propertyTypes
31068
+ propertyTypes: propertyTypes,
31069
+ temporaryConnectionTypes: temporaryConnectionTypes
31003
31070
  };
31004
31071
 
31005
31072
  const FORM_STORAGE_KEY = "WS_EMPLOYEE_NEW_APPLICATION_FORM";
31006
31073
  const MAX_FILE_SIZE = 5242880;
31007
31074
  const SUPPORTED_FILE_TYPES = /(\.pdf|\.png|\.jpe?g)$/i;
31075
+ const DECLARATION_POINTS = ["I understand that sanction of connection does not acknowledge or confer any title, ownership or occupancy right in favour of the applicant.", "I declare that there is no dispute on property and there is no stay from any court of law against obtaining water/ sewerage connection.", "The Property on which connection is being applied is not booked/unauthorized/encroachment of Govt.Land/misuse etc.", "I further undertake that in case of any dispute about the ownership of the property I will absolve DJB from any legal battle in the court of law as the water connection applied for is related to supply of potable water and not to decide the ownership of property.", "I further undertake to pay the charges as and when demanded by DJB, and in the event of non-payment, DJB will be at liberty to disconnect the services being provided by DJB.", "I further undertake that I have not taken 'DJB Employee Rebate' against any other Premise/Connection.", "In case of variation in plot size as per document submitted by the undersigned and on actual measurement by DJB representative, difference of Infrastructure charge/any other charge on actual measurement will be paid by me.", "In case connection is found non-feasible on technical ground as per any prevalent policy of DJB the water connection may be denied or if sanctioned inadvertently, the said sanction may be withdrawn and may be disconnected without any notice.", "I hereby undertake that all the facts and documents submitted are true and correct, in case of any misrepresentation or wrong facts etc., sanction of connection may be disconnected without any notice.."];
31008
31076
  const NAME_PATTERN = /^[a-zA-Z\s.'-]{1,50}$/;
31009
31077
  const EMAIL_PATTERN = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/;
31010
31078
  const MOBILE_PATTERN = /^[6-9][0-9]{9}$/;
@@ -31024,7 +31092,8 @@ const DEFAULT_SECTION_STATE = {
31024
31092
  application: true,
31025
31093
  applicant: true,
31026
31094
  contact: true,
31027
- employee: true,
31095
+ djbEmployee: true,
31096
+ governmentEmployee: true,
31028
31097
  address: true,
31029
31098
  usage: true,
31030
31099
  bank: true,
@@ -31040,9 +31109,7 @@ const DEFAULT_FORM_VALUES = {
31040
31109
  middleName: "",
31041
31110
  lastName: "",
31042
31111
  ParentorSpouse: "",
31043
- isGovernmentOrganization: false,
31044
- applicantIdProofFile: null,
31045
- governmentOrganizationName: ""
31112
+ applicantIdProofFile: null
31046
31113
  },
31047
31114
  contact: {
31048
31115
  emailId: "",
@@ -31050,17 +31117,21 @@ const DEFAULT_FORM_VALUES = {
31050
31117
  whatsAppNumber: ""
31051
31118
  },
31052
31119
  applicationSelection: {
31053
- serviceType: null,
31054
- applicantType: null,
31055
- connectionType: null,
31056
- categoryType: null,
31057
- subCategory: null,
31058
- commercialType: null,
31059
- govtOrganization: {
31060
- organizationName: "",
31061
- natureOfWork: "",
31062
- organizationDocument: null
31063
- }
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],
31125
+ temporaryConnection: null,
31126
+ ownerAuthorizationDoc: null,
31127
+ ownerContactNumber: "",
31128
+ ownerOtp: "",
31129
+ isOwnerVerified: false,
31130
+ domesticType: {
31131
+ code: "INDIVIDUAL",
31132
+ name: "Individual"
31133
+ },
31134
+ commercialType: null
31064
31135
  },
31065
31136
  djbEmployee: {
31066
31137
  isDjbEmployee: false,
@@ -31068,6 +31139,12 @@ const DEFAULT_FORM_VALUES = {
31068
31139
  retirementDate: "",
31069
31140
  officeNameAndAddress: ""
31070
31141
  },
31142
+ governmentEmployee: {
31143
+ isGovernmentEmployee: false,
31144
+ organizationName: "",
31145
+ natureOfWork: "",
31146
+ organizationDocument: null
31147
+ },
31071
31148
  propertyAddress: {
31072
31149
  address: "",
31073
31150
  landmark: "",
@@ -31116,6 +31193,7 @@ const DEFAULT_FORM_VALUES = {
31116
31193
  signatureFile: null,
31117
31194
  agree: false
31118
31195
  },
31196
+ zro: null,
31119
31197
  cpt: {
31120
31198
  id: "",
31121
31199
  details: null
@@ -31290,11 +31368,18 @@ const ProfileImageUpload = ({
31290
31368
  }
31291
31369
  }, error));
31292
31370
  };
31371
+ const linkButtonStyle = {
31372
+ background: "transparent",
31373
+ border: "none",
31374
+ color: "#0B4B66",
31375
+ cursor: "pointer",
31376
+ fontSize: "14px",
31377
+ fontWeight: "600",
31378
+ padding: 0,
31379
+ textDecoration: "underline"
31380
+ };
31293
31381
  const buildDefaultValues = () => ({
31294
- zro: {
31295
- value: "",
31296
- error: ""
31297
- },
31382
+ zro: DEFAULT_FORM_VALUES.zro,
31298
31383
  typeOfRequest: DEFAULT_FORM_VALUES.typeOfRequest,
31299
31384
  connectionType: DEFAULT_FORM_VALUES.connectionType,
31300
31385
  applicant: {
@@ -31336,15 +31421,16 @@ const resolveNestedValue = (value, path) => path.split(".").reduce((accumulator,
31336
31421
  if (accumulator === null || accumulator === undefined) return undefined;
31337
31422
  return accumulator[currentKey];
31338
31423
  }, value);
31339
- const getDisplayValue = value => {
31340
- if (value === null || value === undefined || value === "") return "Not provided";
31341
- 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");
31342
31427
  if (typeof value === "object") {
31343
31428
  if (value !== null && value !== void 0 && value.fileName) return value.fileName;
31344
- if (value !== null && value !== void 0 && value.name) return value.name;
31345
- 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);
31346
31432
  }
31347
- return String(value);
31433
+ return t(String(value));
31348
31434
  };
31349
31435
  const FieldBlock = ({
31350
31436
  label,
@@ -31456,6 +31542,9 @@ const PreviewItem = ({
31456
31542
  value,
31457
31543
  isFullWidth
31458
31544
  }) => {
31545
+ const {
31546
+ t
31547
+ } = useTranslation();
31459
31548
  const stateId = Digit.ULBService.getStateId();
31460
31549
  const isFile = value && typeof value === "object" && (value === null || value === void 0 ? void 0 : value.fileStoreId);
31461
31550
  return /*#__PURE__*/React.createElement("div", {
@@ -31470,7 +31559,7 @@ const PreviewItem = ({
31470
31559
  fontWeight: "600",
31471
31560
  marginBottom: "0px"
31472
31561
  }
31473
- }, label), /*#__PURE__*/React.createElement("div", {
31562
+ }, t(label)), /*#__PURE__*/React.createElement("div", {
31474
31563
  style: {
31475
31564
  display: "flex",
31476
31565
  alignItems: "center",
@@ -31481,7 +31570,7 @@ const PreviewItem = ({
31481
31570
  marginBottom: "0px",
31482
31571
  marginTop: "0px"
31483
31572
  }
31484
- }, getDisplayValue(value)), isFile && /*#__PURE__*/React.createElement("div", {
31573
+ }, getDisplayValue(value, t)), isFile && /*#__PURE__*/React.createElement("div", {
31485
31574
  onClick: () => handleView(value.fileStoreId, stateId),
31486
31575
  style: {
31487
31576
  cursor: "pointer",
@@ -31489,7 +31578,7 @@ const PreviewItem = ({
31489
31578
  alignItems: "center",
31490
31579
  color: "#0B4B66"
31491
31580
  },
31492
- title: "View Document"
31581
+ title: t("CS_COMMON_VIEW_DOCUMENT")
31493
31582
  }, /*#__PURE__*/React.createElement("svg", {
31494
31583
  width: "20",
31495
31584
  height: "20",
@@ -31539,7 +31628,7 @@ const FileUploadField = ({
31539
31628
  }, isUploading ? "Uploading file..." : (value === null || value === void 0 ? void 0 : value.fileName) || "No file selected"));
31540
31629
  };
31541
31630
  const NewApplication = () => {
31542
- var _Digit$SessionStorage, _getFieldError, _getFieldError2, _getFieldError3, _getFieldError4, _getFieldError5, _getFieldError6, _getFieldError7, _getFieldError8, _formValues$applicati, _formValues$applicati2, _formValues$applicati3, _formValues$applicati4, _formValues$applicati5, _formValues$applicati6, _formValues$applicati7, _formValues$applicati8, _formValues$applicati9, _formValues$applicati0, _formValues$applicati1, _formValues$applicati10, _formValues$applicati11, _formValues$applicati12, _formValues$applicant, _formValues$applicant2, _formValues$applicant3, _formValues$applicant4, _formValues$applicant5, _formValues$applicant6, _formValues$applicant7, _formValues$useDetail, _formValues$applicant8, _formValues$contact, _formValues$contact2, _formValues$contact3, _formValues$documents, _formValues$djbEmploy, _formValues$djbEmploy2, _formValues$djbEmploy3, _formValues$djbEmploy4, _formValues$djbEmploy5, _formValues$propertyA, _formValues$propertyA2, _formValues$propertyA3, _formValues$propertyA4, _formValues$propertyA5, _formValues$propertyA6, _formValues$propertyA7, _formValues$propertyA8, _formValues$propertyA9, _formValues$propertyA0, _formValues$propertyA1, _formValues$useDetail2, _formValues$useDetail3, _formValues$useDetail4, _formValues$useDetail5, _formValues$useDetail6, _formValues$useDetail7, _formValues$useDetail8, _formValues$useDetail9, _formValues$useDetail0, _formValues$useDetail1, _formValues$useDetail10, _formValues$useDetail11, _formValues$bankDetai, _formValues$bankDetai2, _formValues$bankDetai3, _formValues$bankDetai4, _formValues$documents2, _formValues$documents3, _formValues$documents4, _formValues$documents5, _formValues$documents6;
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;
31543
31632
  const {
31544
31633
  t
31545
31634
  } = useTranslation();
@@ -31556,14 +31645,26 @@ const NewApplication = () => {
31556
31645
  const [collapsedSections, setCollapsedSections] = useState(DEFAULT_SECTION_STATE);
31557
31646
  const [showToast, setShowToast] = useState(null);
31558
31647
  const [uploadingFields, setUploadingFields] = useState({});
31648
+ const [isOtpSent, setIsOtpSent] = useState(false);
31649
+ const [otpError, setOtpError] = useState(null);
31559
31650
  const [isEnableLoader, setIsEnableLoader] = useState(false);
31560
31651
  const [appDetails, setAppDetails] = useState({});
31561
31652
  const [waterAndSewerageBoth, setWaterAndSewerageBoth] = useState(null);
31562
31653
  const [propertyId, setPropertyId] = useState(new URLSearchParams(location.search).get("propertyId"));
31563
31654
  const initialFormValues = buildDefaultValues();
31564
- const [zro, setZro] = useState(initialFormValues.zro);
31565
- const [localFormState, setLocalFormState] = useState(false);
31566
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]);
31567
31668
  useEffect(() => {
31568
31669
  if (allCities && tenantId && !city) {
31569
31670
  const currentCity = allCities === null || allCities === void 0 ? void 0 : allCities.find(c => c.code === tenantId);
@@ -31639,6 +31740,7 @@ const NewApplication = () => {
31639
31740
  applicant: React.useRef(null),
31640
31741
  contact: React.useRef(null),
31641
31742
  djbEmployee: React.useRef(null),
31743
+ governmentEmployee: React.useRef(null),
31642
31744
  propertyAddress: React.useRef(null),
31643
31745
  useDetails: React.useRef(null),
31644
31746
  bankDetails: React.useRef(null),
@@ -31674,6 +31776,7 @@ const NewApplication = () => {
31674
31776
  const formValues = watch();
31675
31777
  const isGovernmentOrganization = watch("applicant.isGovernmentOrganization");
31676
31778
  const isDjbEmployee = watch("djbEmployee.isDjbEmployee");
31779
+ const isGovernmentEmployee = watch("governmentEmployee.isGovernmentEmployee");
31677
31780
  const selectedPropertyType = watch("useDetails.propertyType");
31678
31781
  const selectedLocality = watch("propertyAddress.locality");
31679
31782
  const selectedSubLocality = watch("propertyAddress.subLocality");
@@ -31691,6 +31794,19 @@ const NewApplication = () => {
31691
31794
  const subCategoryIsCommercial = (selectedSubCategory === null || selectedSubCategory === void 0 ? void 0 : selectedSubCategory.code) === "COMMERCIAL";
31692
31795
  const hasPendingUpload = Object.values(uploadingFields).some(Boolean);
31693
31796
  const isHospitalProperty = (selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code) === "HOSPITAL" || (selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code) === "HOSPITAL_NURSING_HOME";
31797
+ const selectedApplicantType = watch("applicationSelection.applicantType");
31798
+ const isTenantOrRelative = (selectedApplicantType === null || selectedApplicantType === void 0 ? void 0 : selectedApplicantType.code) === "TENANT" || (selectedApplicantType === null || selectedApplicantType === void 0 ? void 0 : selectedApplicantType.code) === "RELATIVE";
31799
+ const isOwnerVerified = watch("applicationSelection.isOwnerVerified");
31800
+ const subCategoryIsDomestic = (selectedSubCategory === null || selectedSubCategory === void 0 ? void 0 : selectedSubCategory.code) === "DOMESTIC";
31801
+ const selectedConnectionType = watch("applicationSelection.connectionType");
31802
+ const connectionTypeIsTemporary = (selectedConnectionType === null || selectedConnectionType === void 0 ? void 0 : selectedConnectionType.code) === "Temporary";
31803
+ const selectedDomesticType = watch("applicationSelection.domesticType");
31804
+ const activeType = (selectedSubCategory === null || selectedSubCategory === void 0 ? void 0 : selectedSubCategory.code) === "DOMESTIC" ? selectedDomesticType : selectedCommercialType;
31805
+ const applicantSectionTitle = useMemo(() => {
31806
+ if ((activeType === null || activeType === void 0 ? void 0 : activeType.code) === "INDIVIDUAL") return "Applicant Details";
31807
+ if ((activeType === null || activeType === void 0 ? void 0 : activeType.code) === "ORGANIZATION") return "Authorized Person Details";
31808
+ return "Details of Applicant";
31809
+ }, [activeType]);
31694
31810
  const timelineConfig = [{
31695
31811
  sectionId: "application",
31696
31812
  route: "application-selection",
@@ -31698,11 +31814,15 @@ const NewApplication = () => {
31698
31814
  }, {
31699
31815
  sectionId: "applicant",
31700
31816
  route: "applicant-details",
31701
- actions: "Details of Applicant"
31817
+ actions: applicantSectionTitle
31702
31818
  }, ...(isDjbEmployee ? [{
31703
31819
  sectionId: "djbEmployee",
31704
31820
  route: "djb-employee",
31705
31821
  actions: "For DJB Employee"
31822
+ }] : []), ...(isGovernmentEmployee ? [{
31823
+ sectionId: "governmentEmployee",
31824
+ route: "government-employee",
31825
+ actions: "For Government Employee"
31706
31826
  }] : []), {
31707
31827
  sectionId: "propertyAddress",
31708
31828
  route: "property-address",
@@ -31719,6 +31839,10 @@ const NewApplication = () => {
31719
31839
  sectionId: "documents",
31720
31840
  route: "documents",
31721
31841
  actions: "Documents to be Attached"
31842
+ }, {
31843
+ sectionId: "declaration",
31844
+ route: "declaration",
31845
+ actions: "Declaration/Undertaking"
31722
31846
  }, {
31723
31847
  sectionId: "Review",
31724
31848
  route: "review",
@@ -31798,12 +31922,46 @@ const NewApplication = () => {
31798
31922
  clearErrors("djbEmployee.officeNameAndAddress");
31799
31923
  }
31800
31924
  }, [isDjbEmployee, setValue, clearErrors]);
31925
+ useEffect(() => {
31926
+ if (!isGovernmentEmployee) {
31927
+ setValue("governmentEmployee.organizationName", "");
31928
+ setValue("governmentEmployee.natureOfWork", "");
31929
+ setValue("governmentEmployee.organizationDocument", null);
31930
+ clearErrors("governmentEmployee.organizationName");
31931
+ clearErrors("governmentEmployee.natureOfWork");
31932
+ clearErrors("governmentEmployee.organizationDocument");
31933
+ }
31934
+ }, [isGovernmentEmployee, setValue, clearErrors]);
31801
31935
  useEffect(() => {
31802
31936
  if (!isHospitalProperty) {
31803
31937
  setValue("useDetails.hospitalBeds", "");
31804
31938
  clearErrors("useDetails.hospitalBeds");
31805
31939
  }
31806
31940
  }, [isHospitalProperty, setValue, clearErrors]);
31941
+ useEffect(() => {
31942
+ if (!isTenantOrRelative) {
31943
+ setValue("applicationSelection.ownerAuthorizationDoc", null);
31944
+ setValue("applicationSelection.ownerContactNumber", "");
31945
+ setValue("applicationSelection.ownerOtp", "");
31946
+ setValue("applicationSelection.isOwnerVerified", false);
31947
+ setIsOtpSent(false);
31948
+ clearErrors("applicationSelection.ownerAuthorizationDoc");
31949
+ clearErrors("applicationSelection.ownerContactNumber");
31950
+ clearErrors("applicationSelection.ownerOtp");
31951
+ }
31952
+ }, [isTenantOrRelative, setValue, clearErrors]);
31953
+ useEffect(() => {
31954
+ if (!subCategoryIsDomestic) {
31955
+ setValue("applicationSelection.domesticType", null);
31956
+ clearErrors("applicationSelection.domesticType");
31957
+ }
31958
+ }, [subCategoryIsDomestic, setValue, clearErrors]);
31959
+ useEffect(() => {
31960
+ if (!connectionTypeIsTemporary) {
31961
+ setValue("applicationSelection.temporaryConnection", null);
31962
+ clearErrors("applicationSelection.temporaryConnection");
31963
+ }
31964
+ }, [connectionTypeIsTemporary, setValue, clearErrors]);
31807
31965
  useEffect(() => {}, [selectedLocality === null || selectedLocality === void 0 ? void 0 : selectedLocality.code, setValue]);
31808
31966
  const closeToast = () => setShowToast(null);
31809
31967
  const closeToastOfError = () => setShowToast(null);
@@ -32149,23 +32307,6 @@ const NewApplication = () => {
32149
32307
  if (isEnableLoader || isPropertyLoading) {
32150
32308
  return /*#__PURE__*/React.createElement(Loader, null);
32151
32309
  }
32152
- const menu = [{
32153
- i18nKey: "ASHOK VIHAR",
32154
- code: "ASHOK VIHAR",
32155
- value: "ASHOK VIHAR"
32156
- }, {
32157
- i18nKey: "BURARI",
32158
- code: "BURARI",
32159
- value: "BURARI"
32160
- }, {
32161
- i18nKey: "DWARKA",
32162
- code: "DWARKA",
32163
- value: "DWARKA"
32164
- }, {
32165
- i18nKey: "OKHLA",
32166
- code: "OKHLA",
32167
- value: "OKHLA"
32168
- }];
32169
32310
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("style", null, `
32170
32311
  .ws-new-application-collapsible .collapsible-card-tabs {
32171
32312
  display: none;
@@ -32242,12 +32383,7 @@ const NewApplication = () => {
32242
32383
  background-color: #F9FAFB;
32243
32384
  }
32244
32385
  `), /*#__PURE__*/React.createElement("div", {
32245
- style: {
32246
- display: "flex",
32247
- alignItems: "flex-start",
32248
- gap: "24px",
32249
- marginBottom: "80px"
32250
- }
32386
+ className: "employee-form-section-wrapper"
32251
32387
  }, !previewMode && /*#__PURE__*/React.createElement(VerticalTimeline, {
32252
32388
  config: timelineConfig,
32253
32389
  currentActiveIndex: currentStep - 1,
@@ -32266,16 +32402,15 @@ const NewApplication = () => {
32266
32402
  isOpen: collapsedSections.application,
32267
32403
  onToggle: toggleSection,
32268
32404
  sectionKey: "application",
32269
- title: "Application Selection",
32405
+ title: t("WS_APPLICATION_SELECTION"),
32270
32406
  sectionRef: sectionRefs.application
32271
32407
  }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32272
32408
  className: "card-label-smaller"
32273
- }, "ZRO Location"), /*#__PURE__*/React.createElement("div", {
32409
+ }, t("WS_ZRO_LOCATION")), /*#__PURE__*/React.createElement("div", {
32274
32410
  className: "field"
32275
32411
  }, /*#__PURE__*/React.createElement(Controller, {
32276
32412
  control: control,
32277
32413
  name: "zro",
32278
- defaultValue: zro,
32279
32414
  rules: {
32280
32415
  required: t("REQUIRED_FIELD")
32281
32416
  },
@@ -32284,22 +32419,16 @@ const NewApplication = () => {
32284
32419
  className: "form-field",
32285
32420
  selected: props.value,
32286
32421
  disable: false,
32287
- option: menu,
32422
+ option: mappedZROLocation,
32288
32423
  errorStyle: !!getFieldError("zro"),
32289
- select: e => {
32290
- props.onChange(e);
32291
- setZro(prev => ({
32292
- ...prev,
32293
- value: e
32294
- }));
32295
- },
32424
+ select: props.onChange,
32296
32425
  optionKey: "i18nKey",
32297
32426
  onBlur: props.onBlur,
32298
32427
  t: t
32299
32428
  }))
32300
- }))), 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, {
32301
32430
  className: "card-label-smaller"
32302
- }, "Service Type"), /*#__PURE__*/React.createElement("div", {
32431
+ }, t("WS_SERVICE_TYPE")), /*#__PURE__*/React.createElement("div", {
32303
32432
  className: "field"
32304
32433
  }, /*#__PURE__*/React.createElement(Controller, {
32305
32434
  control: control,
@@ -32319,9 +32448,9 @@ const NewApplication = () => {
32319
32448
  onBlur: props.onBlur,
32320
32449
  t: t
32321
32450
  })
32322
- }))), getFieldError("applicationSelection.serviceType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError = getFieldError("applicationSelection.serviceType")) === null || _getFieldError === void 0 ? void 0 : _getFieldError.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
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, {
32323
32452
  className: "card-label-smaller"
32324
- }, "Applicant Type"), /*#__PURE__*/React.createElement("div", {
32453
+ }, t("WS_APPLICANT_TYPE")), /*#__PURE__*/React.createElement("div", {
32325
32454
  className: "field"
32326
32455
  }, /*#__PURE__*/React.createElement(Controller, {
32327
32456
  control: control,
@@ -32341,9 +32470,107 @@ const NewApplication = () => {
32341
32470
  onBlur: props.onBlur,
32342
32471
  t: t
32343
32472
  })
32344
- }))), getFieldError("applicationSelection.applicantType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError2 = getFieldError("applicationSelection.applicantType")) === null || _getFieldError2 === void 0 ? void 0 : _getFieldError2.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
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, {
32345
32474
  className: "card-label-smaller"
32346
- }, "Connection Type"), /*#__PURE__*/React.createElement("div", {
32475
+ }, t("WS_OWNER_AUTHORIZATION")), /*#__PURE__*/React.createElement("div", {
32476
+ className: "field"
32477
+ }, /*#__PURE__*/React.createElement(Controller, {
32478
+ control: control,
32479
+ name: "applicationSelection.ownerAuthorizationDoc",
32480
+ rules: {
32481
+ required: isTenantOrRelative ? "Owner Authorization is required" : false
32482
+ },
32483
+ render: props => /*#__PURE__*/React.createElement(FileUploadField, {
32484
+ error: getFieldError("applicationSelection.ownerAuthorizationDoc"),
32485
+ id: "owner-auth-doc",
32486
+ isUploading: !!uploadingFields["applicationSelection.ownerAuthorizationDoc"],
32487
+ onDelete: () => clearUploadedFile("applicationSelection.ownerAuthorizationDoc", props.onChange),
32488
+ onUpload: event => uploadFile(event, "applicationSelection.ownerAuthorizationDoc", props.onChange),
32489
+ value: props.value
32490
+ })
32491
+ }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32492
+ className: "card-label-smaller"
32493
+ }, t("WS_OWNER_CONTACT_NUMBER")), /*#__PURE__*/React.createElement("div", {
32494
+ className: "field",
32495
+ style: {
32496
+ display: "flex",
32497
+ alignItems: "center",
32498
+ gap: "10px"
32499
+ }
32500
+ }, /*#__PURE__*/React.createElement("div", {
32501
+ style: {
32502
+ flex: 1
32503
+ }
32504
+ }, /*#__PURE__*/React.createElement(TextInput, {
32505
+ name: "applicationSelection.ownerContactNumber",
32506
+ inputRef: register({
32507
+ required: isTenantOrRelative ? "Owner Contact Number is required" : false,
32508
+ pattern: {
32509
+ value: MOBILE_PATTERN,
32510
+ message: "Enter a valid 10-digit mobile number."
32511
+ }
32512
+ }),
32513
+ errorStyle: !!getFieldError("applicationSelection.ownerContactNumber"),
32514
+ maxlength: 10,
32515
+ disable: isOwnerVerified
32516
+ })), !isOwnerVerified && /*#__PURE__*/React.createElement("button", {
32517
+ type: "button",
32518
+ style: linkButtonStyle,
32519
+ onClick: () => {
32520
+ const mobile = watch("applicationSelection.ownerContactNumber");
32521
+ if (MOBILE_PATTERN.test(mobile)) {
32522
+ setIsOtpSent(true);
32523
+ setOtpError(null);
32524
+ } else {
32525
+ setError("applicationSelection.ownerContactNumber", {
32526
+ type: "manual",
32527
+ message: "Enter a valid mobile number first."
32528
+ });
32529
+ }
32530
+ }
32531
+ }, isOtpSent ? t("WS_RESEND_OTP") : t("WS_VERIFY")), isOwnerVerified && /*#__PURE__*/React.createElement("span", {
32532
+ style: {
32533
+ color: "green",
32534
+ fontSize: "14px",
32535
+ fontWeight: "600"
32536
+ }
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, {
32538
+ className: "card-label-smaller"
32539
+ }, t("WS_OTP_VERIFICATION")), /*#__PURE__*/React.createElement("div", {
32540
+ className: "field",
32541
+ style: {
32542
+ display: "flex",
32543
+ alignItems: "center",
32544
+ gap: "10px"
32545
+ }
32546
+ }, /*#__PURE__*/React.createElement("div", {
32547
+ style: {
32548
+ flex: 1
32549
+ }
32550
+ }, /*#__PURE__*/React.createElement(TextInput, {
32551
+ name: "applicationSelection.ownerOtp",
32552
+ inputRef: register({
32553
+ required: isOtpSent ? "OTP is required" : false
32554
+ }),
32555
+ errorStyle: !!getFieldError("applicationSelection.ownerOtp") || !!otpError,
32556
+ maxlength: 6
32557
+ })), /*#__PURE__*/React.createElement("button", {
32558
+ type: "button",
32559
+ style: linkButtonStyle,
32560
+ onClick: () => {
32561
+ const otp = watch("applicationSelection.ownerOtp");
32562
+ if (otp && otp.length === 6) {
32563
+ setValue("applicationSelection.isOwnerVerified", true);
32564
+ setIsOtpSent(false);
32565
+ setOtpError(null);
32566
+ clearErrors("applicationSelection.ownerOtp");
32567
+ } else {
32568
+ setOtpError("Enter 6 digit OTP");
32569
+ }
32570
+ }
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, {
32572
+ className: "card-label-smaller"
32573
+ }, t("WS_CONNECTION_TYPE")), /*#__PURE__*/React.createElement("div", {
32347
32574
  className: "field"
32348
32575
  }, /*#__PURE__*/React.createElement(Controller, {
32349
32576
  control: control,
@@ -32356,38 +32583,38 @@ const NewApplication = () => {
32356
32583
  className: "form-field",
32357
32584
  selected: props.value,
32358
32585
  disable: false,
32359
- option: dropdownData.connectionTypes,
32586
+ option: ConnectionType,
32360
32587
  errorStyle: !!getFieldError("applicationSelection.connectionType"),
32361
32588
  select: props.onChange,
32362
32589
  optionKey: "name",
32363
32590
  onBlur: props.onBlur,
32364
32591
  t: t
32365
32592
  })
32366
- }))), getFieldError("applicationSelection.connectionType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError3 = getFieldError("applicationSelection.connectionType")) === null || _getFieldError3 === void 0 ? void 0 : _getFieldError3.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
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, {
32367
32594
  className: "card-label-smaller"
32368
- }, "Category Type"), /*#__PURE__*/React.createElement("div", {
32595
+ }, t("WS_TEMPORARY_CONNECTION")), /*#__PURE__*/React.createElement("div", {
32369
32596
  className: "field"
32370
32597
  }, /*#__PURE__*/React.createElement(Controller, {
32371
32598
  control: control,
32372
- name: "applicationSelection.categoryType",
32599
+ name: "applicationSelection.temporaryConnection",
32373
32600
  rules: {
32374
- required: t("REQUIRED_FIELD")
32601
+ required: connectionTypeIsTemporary ? t("REQUIRED_FIELD") : false
32375
32602
  },
32376
32603
  isMandatory: true,
32377
32604
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32378
32605
  className: "form-field",
32379
32606
  selected: props.value,
32380
32607
  disable: false,
32381
- option: dropdownData.categoryTypes,
32382
- errorStyle: !!getFieldError("applicationSelection.categoryType"),
32608
+ option: dropdownData.temporaryConnectionTypes,
32609
+ errorStyle: !!getFieldError("applicationSelection.temporaryConnection"),
32383
32610
  select: props.onChange,
32384
32611
  optionKey: "name",
32385
32612
  onBlur: props.onBlur,
32386
32613
  t: t
32387
32614
  })
32388
- }))), getFieldError("applicationSelection.categoryType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError4 = getFieldError("applicationSelection.categoryType")) === null || _getFieldError4 === void 0 ? void 0 : _getFieldError4.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
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, {
32389
32616
  className: "card-label-smaller"
32390
- }, "Sub Category"), /*#__PURE__*/React.createElement("div", {
32617
+ }, t("WS_CATEGORY_TYPE")), /*#__PURE__*/React.createElement("div", {
32391
32618
  className: "field"
32392
32619
  }, /*#__PURE__*/React.createElement(Controller, {
32393
32620
  control: control,
@@ -32407,9 +32634,54 @@ const NewApplication = () => {
32407
32634
  onBlur: props.onBlur,
32408
32635
  t: t
32409
32636
  })
32410
- }))), getFieldError("applicationSelection.subCategory") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError5 = getFieldError("applicationSelection.subCategory")) === null || _getFieldError5 === void 0 ? void 0 : _getFieldError5.message), subCategoryIsCommercial && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
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, {
32638
+ className: "card-label-smaller"
32639
+ }, t("WS_WATER_DEMAND_TYPE")), /*#__PURE__*/React.createElement("div", {
32640
+ className: "field"
32641
+ }, /*#__PURE__*/React.createElement(Controller, {
32642
+ control: control,
32643
+ name: "applicationSelection.categoryType",
32644
+ rules: {
32645
+ required: t("REQUIRED_FIELD")
32646
+ },
32647
+ isMandatory: true,
32648
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
32649
+ className: "form-field",
32650
+ selected: props.value,
32651
+ disable: false,
32652
+ option: dropdownData.categoryTypes,
32653
+ errorStyle: !!getFieldError("applicationSelection.categoryType"),
32654
+ select: props.onChange,
32655
+ optionKey: "name",
32656
+ onBlur: props.onBlur,
32657
+ t: t
32658
+ })
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, {
32660
+ className: "card-label-smaller"
32661
+ }, t("WS_DOMESTIC_TYPE")), /*#__PURE__*/React.createElement("div", {
32662
+ className: "field"
32663
+ }, /*#__PURE__*/React.createElement(Controller, {
32664
+ control: control,
32665
+ name: "applicationSelection.domesticType",
32666
+ rules: {
32667
+ required: subCategoryIsDomestic ? t("REQUIRED_FIELD") : false
32668
+ },
32669
+ render: props => /*#__PURE__*/React.createElement(RadioButtons, {
32670
+ onSelect: props.onChange,
32671
+ selectedOption: props.value,
32672
+ optionsKey: "name",
32673
+ options: [{
32674
+ code: "INDIVIDUAL",
32675
+ name: "Individual"
32676
+ }, {
32677
+ code: "ORGANIZATION",
32678
+ name: "Organization"
32679
+ }],
32680
+ t: t
32681
+ })
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, {
32411
32683
  className: "card-label-smaller"
32412
- }, "Commercial Type"), /*#__PURE__*/React.createElement("div", {
32684
+ }, t("WS_COMMERCIAL_TYPE")), /*#__PURE__*/React.createElement("div", {
32413
32685
  className: "field"
32414
32686
  }, /*#__PURE__*/React.createElement(Controller, {
32415
32687
  control: control,
@@ -32422,76 +32694,80 @@ const NewApplication = () => {
32422
32694
  onSelect: props.onChange,
32423
32695
  selectedOption: props.value,
32424
32696
  options: [{
32425
- code: "GOV",
32426
- name: "Gov"
32697
+ code: "INDIVIDUAL",
32698
+ name: "Individual"
32427
32699
  }, {
32428
- code: "NON_GOV",
32429
- name: "Non-Gov"
32700
+ code: "ORGANIZATION",
32701
+ name: "Organization"
32430
32702
  }],
32431
32703
  optionsKey: "name",
32432
32704
  t: t
32433
32705
  })
32434
- }))), subCategoryIsCommercial && !!selectedCommercialType && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
32435
- style: {
32436
- gridColumn: "span 2",
32437
- marginTop: "24px",
32438
- marginBottom: "16px"
32439
- }
32440
- }, /*#__PURE__*/React.createElement(CardLabel, {
32441
- style: {
32442
- color: "#3B82F6",
32443
- fontWeight: "700",
32444
- fontSize: "18px",
32445
- marginBottom: "0"
32446
- }
32447
- }, "Organization Details")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32706
+ }))))), /*#__PURE__*/React.createElement(SectionCard, {
32707
+ description: t("WS_GOVT_CONNECTION_DESC"),
32708
+ isOpen: collapsedSections.governmentEmployee,
32709
+ onToggle: toggleSection,
32710
+ sectionKey: "governmentEmployee",
32711
+ title: t("WS_GOVERNMENT_CONNECTION"),
32712
+ sectionRef: sectionRefs.governmentEmployee
32713
+ }, /*#__PURE__*/React.createElement(FieldBlock, {
32714
+ label: t("WS_GOVERNMENT_CONNECTION")
32715
+ }, /*#__PURE__*/React.createElement(Controller, {
32716
+ control: control,
32717
+ name: "governmentEmployee.isGovernmentEmployee",
32718
+ render: props => /*#__PURE__*/React.createElement(CheckBox, {
32719
+ checked: !!props.value,
32720
+ label: t("WS_APPLICANT_IS_GOVT_CONNECTION"),
32721
+ onChange: event => props.onChange(event.target.checked)
32722
+ })
32723
+ })), isGovernmentEmployee && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32448
32724
  className: "card-label-smaller"
32449
- }, "Organization Name"), /*#__PURE__*/React.createElement("div", {
32725
+ }, t("WS_ORGANIZATION_NAME")), /*#__PURE__*/React.createElement("div", {
32450
32726
  className: "field"
32451
32727
  }, /*#__PURE__*/React.createElement(TextInput, {
32452
- name: "applicationSelection.govtOrganization.organizationName",
32728
+ name: "governmentEmployee.organizationName",
32453
32729
  inputRef: register({
32454
- required: !!selectedCommercialType ? "Organization Name is required" : false
32730
+ required: isGovernmentEmployee ? "Organization Name is required" : false
32455
32731
  }),
32456
- errorStyle: !!getFieldError("applicationSelection.govtOrganization.organizationName")
32457
- }))), getFieldError("applicationSelection.govtOrganization.organizationName") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError6 = getFieldError("applicationSelection.govtOrganization.organizationName")) === null || _getFieldError6 === void 0 ? void 0 : _getFieldError6.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32732
+ errorStyle: !!getFieldError("governmentEmployee.organizationName")
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, {
32458
32734
  className: "card-label-smaller"
32459
- }, "Nature of Work"), /*#__PURE__*/React.createElement("div", {
32735
+ }, t("WS_NATURE_OF_WORK")), /*#__PURE__*/React.createElement("div", {
32460
32736
  className: "field"
32461
32737
  }, /*#__PURE__*/React.createElement(TextInput, {
32462
- name: "applicationSelection.govtOrganization.natureOfWork",
32738
+ name: "governmentEmployee.natureOfWork",
32463
32739
  inputRef: register({
32464
- required: !!selectedCommercialType ? "Nature of Work is required" : false
32740
+ required: isGovernmentEmployee ? "Nature of Work is required" : false
32465
32741
  }),
32466
- errorStyle: !!getFieldError("applicationSelection.govtOrganization.natureOfWork")
32467
- }))), getFieldError("applicationSelection.govtOrganization.natureOfWork") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError7 = getFieldError("applicationSelection.govtOrganization.natureOfWork")) === null || _getFieldError7 === void 0 ? void 0 : _getFieldError7.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
32742
+ errorStyle: !!getFieldError("governmentEmployee.natureOfWork")
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, {
32468
32744
  className: "card-label-smaller"
32469
- }, "Upload Document"), /*#__PURE__*/React.createElement("div", {
32745
+ }, t("WS_UPLOAD_DOCUMENT")), /*#__PURE__*/React.createElement("div", {
32470
32746
  className: "field"
32471
32747
  }, /*#__PURE__*/React.createElement(Controller, {
32472
32748
  control: control,
32473
- name: "applicationSelection.govtOrganization.organizationDocument",
32749
+ name: "governmentEmployee.organizationDocument",
32474
32750
  rules: {
32475
- required: !!selectedCommercialType ? "Document is required" : false
32751
+ required: isGovernmentEmployee ? "Document is required" : false
32476
32752
  },
32477
32753
  render: props => /*#__PURE__*/React.createElement(FileUploadField, {
32478
- error: getFieldError("applicationSelection.govtOrganization.organizationDocument"),
32754
+ error: getFieldError("governmentEmployee.organizationDocument"),
32479
32755
  id: "govt-org-doc",
32480
- isUploading: !!uploadingFields["applicationSelection.govtOrganization.organizationDocument"],
32481
- onDelete: () => clearUploadedFile("applicationSelection.govtOrganization.organizationDocument", props.onChange),
32482
- onUpload: event => uploadFile(event, "applicationSelection.govtOrganization.organizationDocument", props.onChange),
32756
+ isUploading: !!uploadingFields["governmentEmployee.organizationDocument"],
32757
+ onDelete: () => clearUploadedFile("governmentEmployee.organizationDocument", props.onChange),
32758
+ onUpload: event => uploadFile(event, "governmentEmployee.organizationDocument", props.onChange),
32483
32759
  value: props.value
32484
32760
  })
32485
- })))), subCategoryIsCommercial && getFieldError("applicationSelection.commercialType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError8 = getFieldError("applicationSelection.commercialType")) === null || _getFieldError8 === void 0 ? void 0 : _getFieldError8.message))), /*#__PURE__*/React.createElement("div", {
32761
+ }))))), /*#__PURE__*/React.createElement("div", {
32486
32762
  style: {
32487
32763
  display: previewMode ? "none" : "block"
32488
32764
  }
32489
32765
  }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionCard, {
32490
- description: "Applicant name, organization details, and supporting ID proof.",
32766
+ description: t("WS_APPLICANT_DETAILS_DESC"),
32491
32767
  isOpen: collapsedSections.applicant,
32492
32768
  onToggle: toggleSection,
32493
32769
  sectionKey: "applicant",
32494
- title: "Details of Applicant",
32770
+ title: t(applicantSectionTitle),
32495
32771
  sectionRef: sectionRefs.applicant
32496
32772
  }, /*#__PURE__*/React.createElement(Controller, {
32497
32773
  control: control,
@@ -32500,11 +32776,11 @@ const NewApplication = () => {
32500
32776
  validate: value => !!value || "Applicant Picture is required."
32501
32777
  },
32502
32778
  render: props => {
32503
- var _getFieldError9;
32779
+ var _getFieldError11;
32504
32780
  return /*#__PURE__*/React.createElement(ProfileImageUpload, {
32505
- error: (_getFieldError9 = getFieldError("applicant.UploadPicture")) === null || _getFieldError9 === void 0 ? void 0 : _getFieldError9.message,
32781
+ error: (_getFieldError11 = getFieldError("applicant.UploadPicture")) === null || _getFieldError11 === void 0 ? void 0 : _getFieldError11.message,
32506
32782
  isUploading: !!uploadingFields["applicant.UploadPicture"],
32507
- label: "Upload Picture",
32783
+ label: "WS_UPLOAD_PICTURE",
32508
32784
  onUpload: event => uploadFile(event, "applicant.UploadPicture", props.onChange),
32509
32785
  required: true,
32510
32786
  t: t,
@@ -32513,7 +32789,7 @@ const NewApplication = () => {
32513
32789
  }
32514
32790
  }), /*#__PURE__*/React.createElement(FieldBlock, {
32515
32791
  error: getFieldError("applicant.firstName"),
32516
- label: "First Name",
32792
+ label: t("WS_FIRST_NAME"),
32517
32793
  required: true
32518
32794
  }, /*#__PURE__*/React.createElement(TextInput, {
32519
32795
  errorStyle: !!getFieldError("applicant.firstName"),
@@ -32527,7 +32803,7 @@ const NewApplication = () => {
32527
32803
  name: "applicant.firstName"
32528
32804
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32529
32805
  error: getFieldError("applicant.middleName"),
32530
- label: "Middle Name"
32806
+ label: t("WS_MIDDLE_NAME")
32531
32807
  }, /*#__PURE__*/React.createElement(TextInput, {
32532
32808
  errorStyle: !!getFieldError("applicant.middleName"),
32533
32809
  inputRef: register({
@@ -32539,7 +32815,7 @@ const NewApplication = () => {
32539
32815
  name: "applicant.middleName"
32540
32816
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32541
32817
  error: getFieldError("applicant.lastName"),
32542
- label: "Last Name",
32818
+ label: t("WS_LAST_NAME"),
32543
32819
  required: true
32544
32820
  }, /*#__PURE__*/React.createElement(TextInput, {
32545
32821
  errorStyle: !!getFieldError("applicant.lastName"),
@@ -32553,7 +32829,7 @@ const NewApplication = () => {
32553
32829
  name: "applicant.lastName"
32554
32830
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32555
32831
  error: getFieldError("useDetails.gender"),
32556
- label: "Gender",
32832
+ label: t("WS_GENDER"),
32557
32833
  required: true
32558
32834
  }, /*#__PURE__*/React.createElement(Controller, {
32559
32835
  control: control,
@@ -32564,19 +32840,21 @@ const NewApplication = () => {
32564
32840
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
32565
32841
  option: [{
32566
32842
  name: "Male",
32567
- code: "MALE"
32843
+ code: "MALE",
32844
+ i18nKey: "MALE"
32568
32845
  }, {
32569
32846
  name: "Female",
32570
- code: "FEMALE"
32847
+ code: "FEMALE",
32848
+ i18nKey: "FEMALE"
32571
32849
  }],
32572
- optionKey: "name",
32850
+ optionKey: "i18nKey",
32573
32851
  selected: props.value,
32574
32852
  select: props.onChange,
32575
32853
  t: t
32576
32854
  })
32577
32855
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32578
32856
  error: getFieldError("applicant.ParentorSpouse"),
32579
- label: "Parent/ spouse",
32857
+ label: t("WS_PARENT_OR_SPOUSE"),
32580
32858
  required: true
32581
32859
  }, /*#__PURE__*/React.createElement(TextInput, {
32582
32860
  errorStyle: !!getFieldError("applicant.ParentorSpouse"),
@@ -32590,7 +32868,7 @@ const NewApplication = () => {
32590
32868
  name: "applicant.ParentorSpouse"
32591
32869
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32592
32870
  error: getFieldError("contact.emailId"),
32593
- label: "Email ID",
32871
+ label: t("WS_EMAIL_ID"),
32594
32872
  required: true
32595
32873
  }, /*#__PURE__*/React.createElement(TextInput, {
32596
32874
  errorStyle: !!getFieldError("contact.emailId"),
@@ -32604,7 +32882,7 @@ const NewApplication = () => {
32604
32882
  name: "contact.emailId"
32605
32883
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32606
32884
  error: getFieldError("contact.mobileNumber"),
32607
- label: "Mobile Number",
32885
+ label: t("WS_MOBILE_NUMBER"),
32608
32886
  required: true
32609
32887
  }, /*#__PURE__*/React.createElement(TextInput, {
32610
32888
  errorStyle: !!getFieldError("contact.mobileNumber"),
@@ -32619,7 +32897,7 @@ const NewApplication = () => {
32619
32897
  name: "contact.mobileNumber"
32620
32898
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32621
32899
  error: getFieldError("contact.whatsAppNumber"),
32622
- label: "WhatsApp Number"
32900
+ label: t("WS_WHATS_APP_NUMBER")
32623
32901
  }, /*#__PURE__*/React.createElement(TextInput, {
32624
32902
  errorStyle: !!getFieldError("contact.whatsAppNumber"),
32625
32903
  inputRef: register({
@@ -32631,25 +32909,25 @@ const NewApplication = () => {
32631
32909
  maxlength: 10,
32632
32910
  name: "contact.whatsAppNumber"
32633
32911
  }))), /*#__PURE__*/React.createElement(SectionCard, {
32634
- description: "Enable this section only when the applicant is a DJB employee.",
32912
+ description: t("WS_DJB_EMPLOYEE_DESC"),
32635
32913
  isOpen: collapsedSections.employee,
32636
32914
  onToggle: toggleSection,
32637
32915
  sectionKey: "djbEmployee",
32638
- title: "For DJB Employee",
32916
+ title: t("WS_DJB_EMPLOYEE"),
32639
32917
  sectionRef: sectionRefs.djbEmployee
32640
32918
  }, /*#__PURE__*/React.createElement(FieldBlock, {
32641
- label: "DJB Employee"
32919
+ label: t("WS_DJB_EMPLOYEE")
32642
32920
  }, /*#__PURE__*/React.createElement(Controller, {
32643
32921
  control: control,
32644
32922
  name: "djbEmployee.isDjbEmployee",
32645
32923
  render: props => /*#__PURE__*/React.createElement(CheckBox, {
32646
32924
  checked: !!props.value,
32647
- label: "Applicant is a DJB Employee",
32925
+ label: t("WS_APPLICANT_IS_DJB_EMPLOYEE"),
32648
32926
  onChange: event => props.onChange(event.target.checked)
32649
32927
  })
32650
32928
  })), isDjbEmployee && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FieldBlock, {
32651
32929
  error: getFieldError("djbEmployee.employeeId"),
32652
- label: "Employee ID",
32930
+ label: t("WS_EMPLOYEE_ID"),
32653
32931
  required: isDjbEmployee
32654
32932
  }, /*#__PURE__*/React.createElement(TextInput, {
32655
32933
  errorStyle: !!getFieldError("djbEmployee.employeeId"),
@@ -32659,7 +32937,7 @@ const NewApplication = () => {
32659
32937
  name: "djbEmployee.employeeId"
32660
32938
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32661
32939
  error: getFieldError("djbEmployee.retirementDate"),
32662
- label: "Date of Retirement",
32940
+ label: t("WS_DATE_OF_RETIREMENT"),
32663
32941
  required: isDjbEmployee
32664
32942
  }, /*#__PURE__*/React.createElement(Controller, {
32665
32943
  control: control,
@@ -32674,7 +32952,7 @@ const NewApplication = () => {
32674
32952
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32675
32953
  error: getFieldError("djbEmployee.officeNameAndAddress"),
32676
32954
  isFullWidth: true,
32677
- label: "Office Name & Address",
32955
+ label: t("WS_OFFICE_NAME_AND_ADDRESS"),
32678
32956
  required: isDjbEmployee
32679
32957
  }, /*#__PURE__*/React.createElement(TextArea, {
32680
32958
  className: getFieldError("djbEmployee.officeNameAndAddress") ? "employee-card-input-error" : "",
@@ -32686,40 +32964,15 @@ const NewApplication = () => {
32686
32964
  minHeight: "96px"
32687
32965
  }
32688
32966
  })))), /*#__PURE__*/React.createElement(SectionCard, {
32689
- description: "Property location and administrative boundary details.",
32967
+ description: t("WS_PROPERTY_ADDRESS_DESC"),
32690
32968
  isOpen: collapsedSections.address,
32691
32969
  onToggle: toggleSection,
32692
32970
  sectionKey: "propertyAddress",
32693
- title: "Property Address",
32971
+ title: t("WS_PROPERTY_ADDRESS"),
32694
32972
  sectionRef: sectionRefs.propertyAddress
32695
32973
  }, /*#__PURE__*/React.createElement(FieldBlock, {
32696
- error: getFieldError("propertyAddress.city"),
32697
- label: "City"
32698
- }, /*#__PURE__*/React.createElement(Controller, {
32699
- control: control,
32700
- name: "propertyAddress.city",
32701
- render: props => /*#__PURE__*/React.createElement(Dropdown, {
32702
- className: "form-field",
32703
- selected: props.value || city,
32704
- select: val => {
32705
- setCity(val);
32706
- props.onChange(val);
32707
- },
32708
- option: allCities,
32709
- optionCardStyles: {
32710
- overflowY: "auto",
32711
- maxHeight: "300px"
32712
- },
32713
- optionKey: "i18nKey",
32714
- t: t,
32715
- style: {
32716
- width: "100%"
32717
- },
32718
- placeholder: "Select"
32719
- })
32720
- })), /*#__PURE__*/React.createElement(FieldBlock, {
32721
32974
  error: getFieldError("propertyAddress.pinCode"),
32722
- label: "Pin Code",
32975
+ label: t("WS_PIN_CODE"),
32723
32976
  required: true
32724
32977
  }, /*#__PURE__*/React.createElement(Controller, {
32725
32978
  control: control,
@@ -32749,7 +33002,7 @@ const NewApplication = () => {
32749
33002
  })
32750
33003
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32751
33004
  error: getFieldError("propertyAddress.locality"),
32752
- label: "Locality",
33005
+ label: t("WS_LOCALITY"),
32753
33006
  required: true
32754
33007
  }, /*#__PURE__*/React.createElement(Controller, {
32755
33008
  control: control,
@@ -32777,49 +33030,60 @@ const NewApplication = () => {
32777
33030
  })
32778
33031
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32779
33032
  error: getFieldError("propertyAddress.state"),
32780
- label: "State"
32781
- }, /*#__PURE__*/React.createElement(TextInput, {
32782
- errorStyle: !!getFieldError("propertyAddress.state"),
32783
- inputRef: register(),
32784
- name: "propertyAddress.state"
32785
- })), /*#__PURE__*/React.createElement(FieldBlock, {
32786
- error: getFieldError("propertyAddress.district"),
32787
- label: "District"
32788
- }, /*#__PURE__*/React.createElement(TextInput, {
32789
- errorStyle: !!getFieldError("propertyAddress.district"),
32790
- inputRef: register(),
32791
- name: "propertyAddress.district"
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
+ })
32792
33056
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32793
33057
  error: getFieldError("propertyAddress.street"),
32794
- label: "Street"
33058
+ label: t("WS_STREET")
32795
33059
  }, /*#__PURE__*/React.createElement(TextInput, {
32796
33060
  errorStyle: !!getFieldError("propertyAddress.street"),
32797
33061
  inputRef: register(),
32798
33062
  name: "propertyAddress.street"
32799
33063
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32800
33064
  error: getFieldError("propertyAddress.houseNo"),
32801
- label: "House No"
33065
+ label: t("WS_HOUSE_NO")
32802
33066
  }, /*#__PURE__*/React.createElement(TextInput, {
32803
33067
  errorStyle: !!getFieldError("propertyAddress.houseNo"),
32804
33068
  inputRef: register(),
32805
33069
  name: "propertyAddress.houseNo"
32806
33070
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32807
33071
  error: getFieldError("propertyAddress.block"),
32808
- label: "Block"
33072
+ label: t("WS_BLOCK")
32809
33073
  }, /*#__PURE__*/React.createElement(TextInput, {
32810
33074
  errorStyle: !!getFieldError("propertyAddress.block"),
32811
33075
  inputRef: register(),
32812
33076
  name: "propertyAddress.block"
32813
33077
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32814
33078
  error: getFieldError("propertyAddress.zone"),
32815
- label: "Zone"
33079
+ label: t("WS_ZONE")
32816
33080
  }, /*#__PURE__*/React.createElement(TextInput, {
32817
33081
  errorStyle: !!getFieldError("propertyAddress.zone"),
32818
33082
  inputRef: register(),
32819
33083
  name: "propertyAddress.zone"
32820
33084
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32821
33085
  error: getFieldError("propertyAddress.landmark"),
32822
- label: "Landmark"
33086
+ label: t("WS_LANDMARK")
32823
33087
  }, /*#__PURE__*/React.createElement(TextInput, {
32824
33088
  errorStyle: !!getFieldError("propertyAddress.landmark"),
32825
33089
  inputRef: register(),
@@ -32827,7 +33091,7 @@ const NewApplication = () => {
32827
33091
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32828
33092
  error: getFieldError("propertyAddress.address"),
32829
33093
  isFullWidth: true,
32830
- label: "Address"
33094
+ label: t("WS_ADDRESS")
32831
33095
  }, /*#__PURE__*/React.createElement(TextArea, {
32832
33096
  className: getFieldError("propertyAddress.address") ? "employee-card-input-error" : "",
32833
33097
  inputRef: register({
@@ -32838,15 +33102,15 @@ const NewApplication = () => {
32838
33102
  minHeight: "96px"
32839
33103
  }
32840
33104
  }))), /*#__PURE__*/React.createElement(SectionCard, {
32841
- description: "Usage attributes for the property and the requested water connection.",
33105
+ description: t("WS_USE_DETAILS_DESC"),
32842
33106
  isOpen: collapsedSections.usage,
32843
33107
  onToggle: toggleSection,
32844
33108
  sectionKey: "useDetails",
32845
- title: "Property and Water Connection Use Details",
33109
+ title: t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS"),
32846
33110
  sectionRef: sectionRefs.useDetails
32847
33111
  }, /*#__PURE__*/React.createElement(FieldBlock, {
32848
33112
  error: getFieldError("useDetails.propertyType"),
32849
- label: "Property Type",
33113
+ label: t("WS_PROPERTY_TYPE"),
32850
33114
  required: true
32851
33115
  }, /*#__PURE__*/React.createElement(Controller, {
32852
33116
  control: control,
@@ -32863,7 +33127,7 @@ const NewApplication = () => {
32863
33127
  })
32864
33128
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32865
33129
  error: getFieldError("useDetails.plotArea"),
32866
- label: "Plot Area (Sq. m.)",
33130
+ label: t("WS_PLOT_AREA"),
32867
33131
  required: true
32868
33132
  }, /*#__PURE__*/React.createElement(TextInput, {
32869
33133
  errorStyle: !!getFieldError("useDetails.plotArea"),
@@ -32877,7 +33141,7 @@ const NewApplication = () => {
32877
33141
  name: "useDetails.plotArea"
32878
33142
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32879
33143
  error: getFieldError("useDetails.builtUpArea"),
32880
- label: "Built-up Area (Sq. m.)",
33144
+ label: t("WS_BUILT_UP_AREA"),
32881
33145
  required: true
32882
33146
  }, /*#__PURE__*/React.createElement(TextInput, {
32883
33147
  errorStyle: !!getFieldError("useDetails.builtUpArea"),
@@ -32891,7 +33155,7 @@ const NewApplication = () => {
32891
33155
  name: "useDetails.builtUpArea"
32892
33156
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32893
33157
  error: getFieldError("useDetails.noOfFloors"),
32894
- label: "Number of Floors",
33158
+ label: t("WS_NUMBER_OF_FLOORS"),
32895
33159
  required: true
32896
33160
  }, /*#__PURE__*/React.createElement(TextInput, {
32897
33161
  errorStyle: !!getFieldError("useDetails.noOfFloors"),
@@ -32905,7 +33169,7 @@ const NewApplication = () => {
32905
33169
  name: "useDetails.noOfFloors"
32906
33170
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32907
33171
  error: getFieldError("useDetails.NumberofDwellingUnits"),
32908
- label: "Number of Dwelling Units",
33172
+ label: t("WS_NUMBER_OF_DWELLING_UNITS"),
32909
33173
  required: true
32910
33174
  }, /*#__PURE__*/React.createElement(TextInput, {
32911
33175
  errorStyle: !!getFieldError("useDetails.NumberofDwellingUnits"),
@@ -32919,7 +33183,7 @@ const NewApplication = () => {
32919
33183
  name: "useDetails.NumberofDwellingUnits"
32920
33184
  })), isHospitalProperty ? /*#__PURE__*/React.createElement(FieldBlock, {
32921
33185
  error: getFieldError("useDetails.hospitalBeds"),
32922
- label: "Number of Beds",
33186
+ label: t("WS_NUMBER_OF_BEDS"),
32923
33187
  required: true
32924
33188
  }, /*#__PURE__*/React.createElement(TextInput, {
32925
33189
  errorStyle: !!getFieldError("useDetails.hospitalBeds"),
@@ -32933,7 +33197,7 @@ const NewApplication = () => {
32933
33197
  name: "useDetails.hospitalBeds"
32934
33198
  })) : null, /*#__PURE__*/React.createElement(FieldBlock, {
32935
33199
  error: getFieldError("useDetails.SelectYearofConstruction"),
32936
- label: "Select Year of Construction",
33200
+ label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
32937
33201
  required: true
32938
33202
  }, /*#__PURE__*/React.createElement(Controller, {
32939
33203
  control: control,
@@ -32950,7 +33214,7 @@ const NewApplication = () => {
32950
33214
  })
32951
33215
  })), /*#__PURE__*/React.createElement(FieldBlock, {
32952
33216
  error: getFieldError("useDetails.WaterConnectionUsageType"),
32953
- label: "Water Connection Usage Type",
33217
+ label: t("WS_WATER_CONNECTION_USAGE_TYPE"),
32954
33218
  required: true
32955
33219
  }, /*#__PURE__*/React.createElement(Controller, {
32956
33220
  control: control,
@@ -33047,6 +33311,14 @@ const NewApplication = () => {
33047
33311
  select: props.onChange,
33048
33312
  t: t
33049
33313
  })
33314
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33315
+ error: getFieldError("propertyAddress.proofOfIdentity"),
33316
+ label: "Proof of Identity Document",
33317
+ required: true
33318
+ }, /*#__PURE__*/React.createElement(TextInput, {
33319
+ errorStyle: !!getFieldError("propertyAddress.proofOfIdentity"),
33320
+ inputRef: register(),
33321
+ name: "propertyAddress.proofOfIdentity"
33050
33322
  })), /*#__PURE__*/React.createElement(Controller, {
33051
33323
  control: control,
33052
33324
  name: "documents.identityProofFile",
@@ -33064,9 +33336,11 @@ const NewApplication = () => {
33064
33336
  required: true,
33065
33337
  value: props.value
33066
33338
  })
33339
+ }), /*#__PURE__*/React.createElement(FieldBlock, {
33340
+ error: getFieldError("propertyAddress.otherDocument")
33067
33341
  }), /*#__PURE__*/React.createElement(FieldBlock, {
33068
33342
  error: getFieldError("documents.ownershipStatus"),
33069
- label: "Ownership Status",
33343
+ label: "Ownership Proof",
33070
33344
  required: true
33071
33345
  }, /*#__PURE__*/React.createElement(Controller, {
33072
33346
  control: control,
@@ -33081,6 +33355,14 @@ const NewApplication = () => {
33081
33355
  select: props.onChange,
33082
33356
  t: t
33083
33357
  })
33358
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33359
+ error: getFieldError("propertyAddress.ownershipStatus"),
33360
+ label: "Proof of Identity Ownership Document",
33361
+ required: true
33362
+ }, /*#__PURE__*/React.createElement(TextInput, {
33363
+ errorStyle: !!getFieldError("propertyAddress.ownershipStatus"),
33364
+ inputRef: register(),
33365
+ name: "propertyAddress.ownershipStatus"
33084
33366
  })), /*#__PURE__*/React.createElement(Controller, {
33085
33367
  control: control,
33086
33368
  name: "documents.ownershipDocumentFile",
@@ -33098,7 +33380,34 @@ const NewApplication = () => {
33098
33380
  required: true,
33099
33381
  value: props.value
33100
33382
  })
33101
- }), /*#__PURE__*/React.createElement(Controller, {
33383
+ }), /*#__PURE__*/React.createElement(FieldBlock, {
33384
+ error: getFieldError("propertyAddress.otherDocument")
33385
+ }), /*#__PURE__*/React.createElement(FieldBlock, {
33386
+ error: getFieldError("documents.otherDocument"),
33387
+ label: "Other Document",
33388
+ required: true
33389
+ }, /*#__PURE__*/React.createElement(Controller, {
33390
+ control: control,
33391
+ name: "documents.otherDocument",
33392
+ rules: {
33393
+ required: "Other Document is required."
33394
+ },
33395
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
33396
+ option: OWNERSHIP_STATUS_OPTIONS,
33397
+ optionKey: "name",
33398
+ selected: props.value,
33399
+ select: props.onChange,
33400
+ t: t
33401
+ })
33402
+ })), /*#__PURE__*/React.createElement(FieldBlock, {
33403
+ error: getFieldError("propertyAddress.otherDocument"),
33404
+ label: "Other Document",
33405
+ required: true
33406
+ }, /*#__PURE__*/React.createElement(TextInput, {
33407
+ errorStyle: !!getFieldError("propertyAddress.otherDocument"),
33408
+ inputRef: register(),
33409
+ name: "propertyAddress.otherDocument"
33410
+ })), /*#__PURE__*/React.createElement(Controller, {
33102
33411
  control: control,
33103
33412
  name: "documents.otherDocumentFile",
33104
33413
  render: props => /*#__PURE__*/React.createElement(FileUploadField, {
@@ -33111,6 +33420,56 @@ const NewApplication = () => {
33111
33420
  onUpload: event => uploadFile(event, "documents.otherDocumentFile", props.onChange),
33112
33421
  value: props.value
33113
33422
  })
33423
+ })), /*#__PURE__*/React.createElement(SectionCard, {
33424
+ description: "Declaration and undertaking to be signed by the applicant.",
33425
+ isOpen: collapsedSections.declaration,
33426
+ onToggle: toggleSection,
33427
+ sectionKey: "declaration",
33428
+ title: "Declaration/Undertaking",
33429
+ sectionRef: sectionRefs.declaration
33430
+ }, DECLARATION_POINTS.map((point, index) => /*#__PURE__*/React.createElement("p", {
33431
+ key: index
33432
+ }, /*#__PURE__*/React.createElement("span", null, String(index + 1), "."), /*#__PURE__*/React.createElement("span", null, point))), /*#__PURE__*/React.createElement(FieldBlock, {
33433
+ error: getFieldError("propertyAddress.otherDocument")
33434
+ }), /*#__PURE__*/React.createElement(FieldBlock, {
33435
+ error: getFieldError("declaration.submittedBy"),
33436
+ label: "Submitted By",
33437
+ required: true
33438
+ }, /*#__PURE__*/React.createElement(Controller, {
33439
+ control: control,
33440
+ name: "declaration.submittedBy",
33441
+ rules: {
33442
+ required: "Submission type is required."
33443
+ },
33444
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
33445
+ option: [{
33446
+ code: "SELF",
33447
+ name: "SELF"
33448
+ }, {
33449
+ code: "RELATIVE",
33450
+ name: "Relative"
33451
+ }],
33452
+ optionKey: "name",
33453
+ selected: props.value,
33454
+ select: props.onChange,
33455
+ t: t
33456
+ })
33457
+ })), /*#__PURE__*/React.createElement(Controller, {
33458
+ control: control,
33459
+ name: "declaration.signatureFile",
33460
+ rules: {
33461
+ validate: value => !!value || "Signature upload is required."
33462
+ },
33463
+ render: props => /*#__PURE__*/React.createElement(FileUploadField, {
33464
+ error: getFieldError("declaration.signatureFile"),
33465
+ id: "signature-file",
33466
+ isUploading: !!uploadingFields["declaration.signatureFile"],
33467
+ label: "Upload Signature",
33468
+ onDelete: () => clearUploadedFile("declaration.signatureFile", props.onChange),
33469
+ onUpload: event => uploadFile(event, "declaration.signatureFile", props.onChange),
33470
+ required: true,
33471
+ value: props.value
33472
+ })
33114
33473
  })))), previewMode && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionCard, {
33115
33474
  description: "Selected request and connection type.",
33116
33475
  isOpen: collapsedSections.application,
@@ -33130,30 +33489,42 @@ const NewApplication = () => {
33130
33489
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33131
33490
  label: "Connection Type",
33132
33491
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati3 = formValues.applicationSelection) === null || _formValues$applicati3 === void 0 ? void 0 : _formValues$applicati3.connectionType
33492
+ }), (formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati4 = formValues.applicationSelection) === null || _formValues$applicati4 === void 0 ? void 0 : (_formValues$applicati5 = _formValues$applicati4.connectionType) === null || _formValues$applicati5 === void 0 ? void 0 : _formValues$applicati5.code) === "TEMPORARY" && /*#__PURE__*/React.createElement(PreviewItem, {
33493
+ label: "Temporary Connection",
33494
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati6 = formValues.applicationSelection) === null || _formValues$applicati6 === void 0 ? void 0 : _formValues$applicati6.temporaryConnection
33495
+ }), isTenantOrRelative && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PreviewItem, {
33496
+ label: "Owner Authorization",
33497
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati7 = formValues.applicationSelection) === null || _formValues$applicati7 === void 0 ? void 0 : _formValues$applicati7.ownerAuthorizationDoc
33133
33498
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33499
+ label: "Owner Contact Number",
33500
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati8 = formValues.applicationSelection) === null || _formValues$applicati8 === void 0 ? void 0 : _formValues$applicati8.ownerContactNumber
33501
+ })), /*#__PURE__*/React.createElement(PreviewItem, {
33134
33502
  label: "Category Type",
33135
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati4 = formValues.applicationSelection) === null || _formValues$applicati4 === void 0 ? void 0 : _formValues$applicati4.categoryType
33503
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati9 = formValues.applicationSelection) === null || _formValues$applicati9 === void 0 ? void 0 : _formValues$applicati9.categoryType
33136
33504
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33137
33505
  label: "Sub Category",
33138
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati5 = formValues.applicationSelection) === null || _formValues$applicati5 === void 0 ? void 0 : _formValues$applicati5.subCategory
33139
- }), (formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati6 = formValues.applicationSelection) === null || _formValues$applicati6 === void 0 ? void 0 : (_formValues$applicati7 = _formValues$applicati6.subCategory) === null || _formValues$applicati7 === void 0 ? void 0 : _formValues$applicati7.code) === "COMMERCIAL" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PreviewItem, {
33506
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati0 = formValues.applicationSelection) === null || _formValues$applicati0 === void 0 ? void 0 : _formValues$applicati0.subCategory
33507
+ }), (formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati1 = formValues.applicationSelection) === null || _formValues$applicati1 === void 0 ? void 0 : (_formValues$applicati10 = _formValues$applicati1.subCategory) === null || _formValues$applicati10 === void 0 ? void 0 : _formValues$applicati10.code) === "DOMESTIC" && /*#__PURE__*/React.createElement(PreviewItem, {
33508
+ label: "Domestic Type",
33509
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati11 = formValues.applicationSelection) === null || _formValues$applicati11 === void 0 ? void 0 : _formValues$applicati11.domesticType
33510
+ }), (formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati12 = formValues.applicationSelection) === null || _formValues$applicati12 === void 0 ? void 0 : (_formValues$applicati13 = _formValues$applicati12.subCategory) === null || _formValues$applicati13 === void 0 ? void 0 : _formValues$applicati13.code) === "COMMERCIAL" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PreviewItem, {
33140
33511
  label: "Commercial Type",
33141
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati8 = formValues.applicationSelection) === null || _formValues$applicati8 === void 0 ? void 0 : _formValues$applicati8.commercialType
33512
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati14 = formValues.applicationSelection) === null || _formValues$applicati14 === void 0 ? void 0 : _formValues$applicati14.commercialType
33142
33513
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33143
33514
  label: "Organization Name",
33144
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati9 = formValues.applicationSelection) === null || _formValues$applicati9 === void 0 ? void 0 : (_formValues$applicati0 = _formValues$applicati9.govtOrganization) === null || _formValues$applicati0 === void 0 ? void 0 : _formValues$applicati0.organizationName
33515
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati15 = formValues.applicationSelection) === null || _formValues$applicati15 === void 0 ? void 0 : (_formValues$applicati16 = _formValues$applicati15.govtOrganization) === null || _formValues$applicati16 === void 0 ? void 0 : _formValues$applicati16.organizationName
33145
33516
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33146
33517
  label: "Nature of Work",
33147
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati1 = formValues.applicationSelection) === null || _formValues$applicati1 === void 0 ? void 0 : (_formValues$applicati10 = _formValues$applicati1.govtOrganization) === null || _formValues$applicati10 === void 0 ? void 0 : _formValues$applicati10.natureOfWork
33518
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati17 = formValues.applicationSelection) === null || _formValues$applicati17 === void 0 ? void 0 : (_formValues$applicati18 = _formValues$applicati17.govtOrganization) === null || _formValues$applicati18 === void 0 ? void 0 : _formValues$applicati18.natureOfWork
33148
33519
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33149
33520
  label: "Organization Document",
33150
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati11 = formValues.applicationSelection) === null || _formValues$applicati11 === void 0 ? void 0 : (_formValues$applicati12 = _formValues$applicati11.govtOrganization) === null || _formValues$applicati12 === void 0 ? void 0 : _formValues$applicati12.organizationDocument
33521
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati19 = formValues.applicationSelection) === null || _formValues$applicati19 === void 0 ? void 0 : (_formValues$applicati20 = _formValues$applicati19.govtOrganization) === null || _formValues$applicati20 === void 0 ? void 0 : _formValues$applicati20.organizationDocument
33151
33522
  }))), /*#__PURE__*/React.createElement(SectionCard, {
33152
33523
  description: "Applicant identity and organization information.",
33153
33524
  isOpen: collapsedSections.applicant,
33154
33525
  onToggle: toggleSection,
33155
33526
  sectionKey: "applicant",
33156
- title: "Details of Applicant",
33527
+ title: applicantSectionTitle,
33157
33528
  onEditClick: () => handleSectionEdit("applicant")
33158
33529
  }, /*#__PURE__*/React.createElement("div", {
33159
33530
  style: {
@@ -33219,9 +33590,9 @@ const NewApplication = () => {
33219
33590
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents = formValues.documents) === null || _formValues$documents === void 0 ? void 0 : _formValues$documents.identityProofFile
33220
33591
  })), /*#__PURE__*/React.createElement(SectionCard, {
33221
33592
  description: "DJB employee-specific information.",
33222
- isOpen: collapsedSections.employee,
33593
+ isOpen: collapsedSections.djbEmployee,
33223
33594
  onToggle: toggleSection,
33224
- sectionKey: "employee",
33595
+ sectionKey: "djbEmployee",
33225
33596
  title: "For DJB Employee",
33226
33597
  onEditClick: () => handleSectionEdit("djbEmployee")
33227
33598
  }, /*#__PURE__*/React.createElement(PreviewItem, {
@@ -33237,7 +33608,23 @@ const NewApplication = () => {
33237
33608
  isFullWidth: true,
33238
33609
  label: "Office Name & Address",
33239
33610
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$djbEmploy5 = formValues.djbEmployee) === null || _formValues$djbEmploy5 === void 0 ? void 0 : _formValues$djbEmploy5.officeNameAndAddress
33240
- })) : null), /*#__PURE__*/React.createElement(SectionCard, {
33611
+ })) : null), (formValues === null || formValues === void 0 ? void 0 : (_formValues$governmen = formValues.governmentEmployee) === null || _formValues$governmen === void 0 ? void 0 : _formValues$governmen.isGovernmentEmployee) && /*#__PURE__*/React.createElement(SectionCard, {
33612
+ description: "Government employee organization details.",
33613
+ isOpen: collapsedSections.governmentEmployee,
33614
+ onToggle: toggleSection,
33615
+ sectionKey: "governmentEmployee",
33616
+ title: "For Government Employee",
33617
+ onEditClick: () => handleSectionEdit("governmentEmployee")
33618
+ }, /*#__PURE__*/React.createElement(PreviewItem, {
33619
+ label: "Organization Name",
33620
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$governmen2 = formValues.governmentEmployee) === null || _formValues$governmen2 === void 0 ? void 0 : _formValues$governmen2.organizationName
33621
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33622
+ label: "Nature of Work",
33623
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$governmen3 = formValues.governmentEmployee) === null || _formValues$governmen3 === void 0 ? void 0 : _formValues$governmen3.natureOfWork
33624
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33625
+ label: "Organization Document",
33626
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$governmen4 = formValues.governmentEmployee) === null || _formValues$governmen4 === void 0 ? void 0 : _formValues$governmen4.organizationDocument
33627
+ })), /*#__PURE__*/React.createElement(SectionCard, {
33241
33628
  description: "Property address and administrative boundary values.",
33242
33629
  isOpen: collapsedSections.address,
33243
33630
  onToggle: toggleSection,
@@ -33350,6 +33737,23 @@ const NewApplication = () => {
33350
33737
  }), /*#__PURE__*/React.createElement(PreviewItem, {
33351
33738
  label: "Other Document",
33352
33739
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents6 = formValues.documents) === null || _formValues$documents6 === void 0 ? void 0 : _formValues$documents6.otherDocumentFile
33740
+ })), /*#__PURE__*/React.createElement(SectionCard, {
33741
+ description: "Applicant declaration details.",
33742
+ isOpen: collapsedSections.declaration,
33743
+ onToggle: toggleSection,
33744
+ sectionKey: "declaration",
33745
+ title: "Declaration/Undertaking",
33746
+ onEditClick: () => handleSectionEdit("declaration")
33747
+ }, /*#__PURE__*/React.createElement(PreviewItem, {
33748
+ label: "Submitted By",
33749
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$declarati = formValues.declaration) === null || _formValues$declarati === void 0 ? void 0 : _formValues$declarati.submittedBy
33750
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33751
+ isFullWidth: true,
33752
+ label: "Signature",
33753
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$declarati2 = formValues.declaration) === null || _formValues$declarati2 === void 0 ? void 0 : _formValues$declarati2.signatureFile
33754
+ }), /*#__PURE__*/React.createElement(PreviewItem, {
33755
+ label: "Agreed",
33756
+ value: formValues !== null && formValues !== void 0 && (_formValues$declarati3 = formValues.declaration) !== null && _formValues$declarati3 !== void 0 && _formValues$declarati3.agree ? "Yes" : "No"
33353
33757
  }))))), /*#__PURE__*/React.createElement(ActionBar, {
33354
33758
  style: actionBarStyle
33355
33759
  }, !previewMode ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SubmitBar, {
@@ -44422,6 +44826,320 @@ const BulkBillGeneration = ({
44422
44826
  }));
44423
44827
  };
44424
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
+
44425
45143
  const WSModule = ({
44426
45144
  stateCode,
44427
45145
  userType,
@@ -44579,7 +45297,8 @@ const componentsToRegister = {
44579
45297
  WSSearchWaterConnectionIntegrated: SearchWaterConnectionIntegrated,
44580
45298
  WSSearchIntegrated: SearchIntegrated,
44581
45299
  WSSearchWaterConnectionViewIntegrated: SearchWaterConnectionViewIntegrated,
44582
- WSBulkBillGeneration: BulkBillGeneration
45300
+ WSBulkBillGeneration: BulkBillGeneration,
45301
+ WSOLDApplication: OLDApplication
44583
45302
  };
44584
45303
  const initWSComponents = () => {
44585
45304
  Object.entries(componentsToRegister).forEach(([key, value]) => {