@djb25/digit-ui-module-ws 1.0.24 → 1.0.26
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.
- package/dist/index.css +332 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +2423 -675
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -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, ModuleHeader, ArrowLeft, TickMark, FormStep, CardLabel, RadioOrSelect, TextInput, CardHeader, CitizenInfoLabel, CardSubHeader, Dropdown, UploadFile, CheckBox, RadioButtons, MobileNumber, LabelFieldPair, DatePicker,
|
|
4
|
+
import { Loader, Card, KeyNote, SubmitBar, InfoBannerIcon, Header, BackButton, PrivateRoute, Banner, CardText, ActionBar, LayoutWrapper, HomeIcon, PrintBtnCommon, MultiLink, LinkButton, Toast, ModuleHeader, ArrowLeft, TickMark, FormStep, CardLabel, RadioOrSelect, TextInput, CardHeader, CitizenInfoLabel, CardSubHeader, Dropdown, UploadFile, CheckBox, RadioButtons, MobileNumber, LabelFieldPair, DatePicker, CollapsibleCardPage, ViewsIcon, Modal, DeleteIcon, CardLabelError, WrapUnMaskComponent, StatusTable, Row, CardSectionHeader, InfoIcon, TextArea, SearchField, FilterFormField, RemoveableTag, MultiSelectDropdown, InboxComposer, DropIcon, WSICon, EmployeeModuleCard, SearchAction, PopUp, DetailsCard, SearchForm, CloseSvg, Table, Localities, DownloadBtnCommon, CollectionIcon, ResponseComposer, TelePhone, DisplayPhotos, CheckPoint, ConnectingCheckPoints, ActionLinks, PDFSvg, EditIcon, CardSectionSubText, DownloadIcon, CardLabelDesc, VerticalTimeline, FormComposer, MultiUploadWrapper, Close as Close$e, BreakLine, 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,15 +441,16 @@ 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$
|
|
444
|
+
var _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$applicationSele, _data$ConnectionDetai, _data$ConnectionDetai2, _ref, _data$ConnectionHolde, _data$useDetails, _data$useDetails2, _data$useDetails3, _data$useDetails3$pro, _connectionDetailsObj, _connectionDetailsObj2, _data$useDetails4, _data$useDetails4$pro, _connectionDetailsObj3, _connectionDetailsObj4, _data$useDetails5, _data$useDetails6, _data$useDetails7, _data$useDetails8, _connectionHolder$gen, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2, _connectionHolder$own, _connectionHolder$rel, _data$propertyAddress, _data$applicant, _data$useDetails9, _data$useDetails9$gen, _data$contact, _data$applicant2, _data$applicant3, _data$applicant4, _data$contact2, _data$contact3, _data$applicationSele2, _data$applicationSele3, _data$contact4, _data$cpt3, _data$cpt4, _data$cpt4$details, _data$propertyAddress2, _data$propertyAddress3, _data$propertyAddress4, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$propertyAddress5, _data$cpt6, _data$cpt6$details, _data$cpt6$details$ad, _data$propertyAddress6, _data$cpt7, _data$cpt7$details, _data$cpt7$details$ad, _data$propertyAddress7, _data$cpt8, _data$cpt8$details, _data$cpt8$details$ad, _data$propertyAddress8, _data$cpt9, _data$cpt9$details, _data$cpt9$details$ad, _data$propertyAddress9, _data$cpt0, _data$cpt0$details, _data$cpt0$details$ad, _data$propertyAddress0, _data$cpt1, _data$cpt1$details, _data$cpt1$details$ad, _data$propertyAddress1, _data$cpt10, _data$cpt10$details, _data$cpt10$details$a, _data$propertyAddress10, _data$cpt11, _data$cpt11$details, _data$cpt11$details$a, _data$cpt12, _data$cpt12$details, _data$cpt12$details$a, _data$propertyAddress11, _data$cpt13, _data$cpt13$details, _data$cpt13$details$a, _data$cpt13$details$a2, _data$propertyAddress12, _data$cpt14, _data$cpt14$details, _data$cpt14$details$a, _data$cpt14$details$a2, _data$propertyAddress13, _data$cpt15, _data$cpt15$details, _data$cpt15$details$a, _data$cpt15$details$a2, _data$cpt16, _data$cpt16$details, _data$roadCuttingDeta, _data$plumberDetails, _data$zro, _data$propertyAddress14, _data$propertyAddress15, _data$cpt17, _data$cpt17$details, _data$cpt17$details$a, _data$cpt17$details$a2, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _data$plumberDetails6, _data$applicationSele4, _data$applicationSele5, _data$applicationSele6, _data$applicationSele7, _connectionDetailsObj5, _data$applicationSele8, _data$applicationSele9, _connectionHolder$own2, _data$applicationSele0, _data$applicationSele1, _data$applicationSele10, _data$applicationSele11, _data$applicationSele12, _data$applicationSele13, _data$applicationSele14, _data$applicationSele15, _data$applicationSele16, _data$applicationSele17, _data$applicationSele18, _data$applicationSele19, _data$applicationSele20, _data$applicationSele21, _data$applicationSele22, _data$applicationSele23, _data$applicationSele24, _data$contact5, _data$documents, _data$documents2, _data$documents3, _data$documents4, _data$cpt18, _Digit, _Digit$Customizations, _Digit$Customizations2, _Digit2, _Digit2$Customization, _Digit2$Customization2;
|
|
445
445
|
data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : (_data$cpt$details = _data$cpt.details) === null || _data$cpt$details === void 0 ? void 0 : (_data$cpt$details$own = _data$cpt$details.owners) === null || _data$cpt$details$own === void 0 ? void 0 : _data$cpt$details$own.forEach(owner => {
|
|
446
446
|
if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
|
|
447
447
|
});
|
|
448
|
-
const
|
|
448
|
+
const srvObj = (data === null || data === void 0 ? void 0 : (_data$applicationSele = data.applicationSelection) === null || _data$applicationSele === void 0 ? void 0 : _data$applicationSele.serviceType) || (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.serviceType);
|
|
449
|
+
const serviceType = ((_ref = typeof srvObj === "object" ? srvObj === null || srvObj === void 0 ? void 0 : srvObj.code : srvObj) === null || _ref === void 0 ? void 0 : _ref.toUpperCase()) || "WATER";
|
|
449
450
|
const connectionDetailsArray = Array.isArray(data === null || data === void 0 ? void 0 : data.ConnectionDetails) ? data.ConnectionDetails : data !== null && data !== void 0 && data.ConnectionDetails ? Object.values(data.ConnectionDetails).filter(i => typeof i === "object") : [];
|
|
450
451
|
const connectionDetail = (connectionDetailsArray === null || connectionDetailsArray === void 0 ? void 0 : connectionDetailsArray[0]) || (data === null || data === void 0 ? void 0 : data.ConnectionDetails) || {};
|
|
451
|
-
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);
|
|
452
|
+
const isWater = (serviceType === null || serviceType === void 0 ? void 0 : serviceType.includes("WATER")) || serviceType === "BOTH" || (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.water);
|
|
453
|
+
const isSewerage = (serviceType === null || serviceType === void 0 ? void 0 : serviceType.includes("SEWERAGE")) || serviceType === "BOTH" || (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.sewerage);
|
|
453
454
|
const connectionDetailsObject = connectionDetail;
|
|
454
455
|
const useDetailsObject = (data === null || data === void 0 ? void 0 : data.useDetails) || connectionDetailsObject || {};
|
|
455
456
|
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);
|
|
@@ -466,24 +467,50 @@ const createPayloadOfWS = async data => {
|
|
|
466
467
|
gender: (connectionHolder === null || connectionHolder === void 0 ? void 0 : (_connectionHolder$gen = connectionHolder.gender) === null || _connectionHolder$gen === void 0 ? void 0 : _connectionHolder$gen.code) || (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.gender) || "",
|
|
467
468
|
mobileNumber: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.mobileNumber) || (data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : (_data$cpt2$details = _data$cpt2.details) === null || _data$cpt2$details === void 0 ? void 0 : (_data$cpt2$details$ow = _data$cpt2$details.owners) === null || _data$cpt2$details$ow === void 0 ? void 0 : (_data$cpt2$details$ow2 = _data$cpt2$details$ow[0]) === null || _data$cpt2$details$ow2 === void 0 ? void 0 : _data$cpt2$details$ow2.mobileNumber) || "",
|
|
468
469
|
name: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.name) || "",
|
|
470
|
+
middleName: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.middleName) || "",
|
|
471
|
+
lastName: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.lastName) || "",
|
|
472
|
+
emailId: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.emailId) || "",
|
|
473
|
+
watsAppMobileNumber: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.watsAppMobileNumber) || "",
|
|
474
|
+
isWatsappSameAsMobile: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.isWatsappSameAsMobile) || false,
|
|
469
475
|
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
476
|
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) || ""
|
|
477
|
+
sameAsPropertyAddress: (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.sameAsOwnerDetails) || (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.sameAsPropertyAddress) || false
|
|
473
478
|
}] : [{
|
|
474
479
|
correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$propertyAddress = data.propertyAddress) === null || _data$propertyAddress === void 0 ? void 0 : _data$propertyAddress.address) || "",
|
|
475
480
|
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$applicant = data.applicant) === null || _data$applicant === void 0 ? void 0 : _data$applicant.ParentorSpouse) || "",
|
|
476
481
|
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) || "",
|
|
477
482
|
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$contact = data.contact) === null || _data$contact === void 0 ? void 0 : _data$contact.mobileNumber) || "",
|
|
478
483
|
name: `${data === null || data === void 0 ? void 0 : (_data$applicant2 = data.applicant) === null || _data$applicant2 === void 0 ? void 0 : _data$applicant2.firstName} ${(data === null || data === void 0 ? void 0 : (_data$applicant3 = data.applicant) === null || _data$applicant3 === void 0 ? void 0 : _data$applicant3.middleName) || ""} ${data === null || data === void 0 ? void 0 : (_data$applicant4 = data.applicant) === null || _data$applicant4 === void 0 ? void 0 : _data$applicant4.lastName}`.replace(/\s+/g, " ").trim(),
|
|
479
|
-
|
|
484
|
+
watsAppMobileNumber: (data === null || data === void 0 ? void 0 : (_data$contact2 = data.contact) === null || _data$contact2 === void 0 ? void 0 : _data$contact2.watsAppMobileNumber) || "",
|
|
485
|
+
isWatsappSameAsMobile: (data === null || data === void 0 ? void 0 : (_data$contact3 = data.contact) === null || _data$contact3 === void 0 ? void 0 : _data$contact3.isWatsappSameAsMobile) || false,
|
|
486
|
+
ownerType: (data === null || data === void 0 ? void 0 : (_data$applicationSele2 = data.applicationSelection) === null || _data$applicationSele2 === void 0 ? void 0 : (_data$applicationSele3 = _data$applicationSele2.categoryType) === null || _data$applicationSele3 === void 0 ? void 0 : _data$applicationSele3.code) || "",
|
|
480
487
|
relationship: "OTHERS",
|
|
481
488
|
sameAsPropertyAddress: true,
|
|
482
|
-
emailId: (data === null || data === void 0 ? void 0 : (_data$
|
|
489
|
+
emailId: (data === null || data === void 0 ? void 0 : (_data$contact4 = data.contact) === null || _data$contact4 === void 0 ? void 0 : _data$contact4.emailId) || ""
|
|
483
490
|
}],
|
|
484
491
|
service: isWater && !isSewerage ? "Water" : !isWater && isSewerage ? "Sewerage" : "Water And Sewerage",
|
|
485
|
-
property:
|
|
486
|
-
|
|
492
|
+
property: {
|
|
493
|
+
...(data === null || data === void 0 ? void 0 : (_data$cpt3 = data.cpt) === null || _data$cpt3 === void 0 ? void 0 : _data$cpt3.details),
|
|
494
|
+
address: {
|
|
495
|
+
...(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.address),
|
|
496
|
+
city: (data === null || data === void 0 ? void 0 : (_data$propertyAddress2 = data.propertyAddress) === null || _data$propertyAddress2 === void 0 ? void 0 : (_data$propertyAddress3 = _data$propertyAddress2.city) === null || _data$propertyAddress3 === void 0 ? void 0 : _data$propertyAddress3.code) || (data === null || data === void 0 ? void 0 : (_data$propertyAddress4 = data.propertyAddress) === null || _data$propertyAddress4 === void 0 ? void 0 : _data$propertyAddress4.city) || (data === null || data === void 0 ? void 0 : (_data$cpt5 = data.cpt) === null || _data$cpt5 === void 0 ? void 0 : (_data$cpt5$details = _data$cpt5.details) === null || _data$cpt5$details === void 0 ? void 0 : (_data$cpt5$details$ad = _data$cpt5$details.address) === null || _data$cpt5$details$ad === void 0 ? void 0 : _data$cpt5$details$ad.city),
|
|
497
|
+
locality: (data === null || data === void 0 ? void 0 : (_data$propertyAddress5 = data.propertyAddress) === null || _data$propertyAddress5 === void 0 ? void 0 : _data$propertyAddress5.locality) || (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$ad = _data$cpt6$details.address) === null || _data$cpt6$details$ad === void 0 ? void 0 : _data$cpt6$details$ad.locality),
|
|
498
|
+
pincode: (data === null || data === void 0 ? void 0 : (_data$propertyAddress6 = data.propertyAddress) === null || _data$propertyAddress6 === void 0 ? void 0 : _data$propertyAddress6.pinCode) || (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$ad = _data$cpt7$details.address) === null || _data$cpt7$details$ad === void 0 ? void 0 : _data$cpt7$details$ad.pincode),
|
|
499
|
+
doorNo: (data === null || data === void 0 ? void 0 : (_data$propertyAddress7 = data.propertyAddress) === null || _data$propertyAddress7 === void 0 ? void 0 : _data$propertyAddress7.houseNo) || (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$ad = _data$cpt8$details.address) === null || _data$cpt8$details$ad === void 0 ? void 0 : _data$cpt8$details$ad.doorNo),
|
|
500
|
+
street: (data === null || data === void 0 ? void 0 : (_data$propertyAddress8 = data.propertyAddress) === null || _data$propertyAddress8 === void 0 ? void 0 : _data$propertyAddress8.street) || (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$ad = _data$cpt9$details.address) === null || _data$cpt9$details$ad === void 0 ? void 0 : _data$cpt9$details$ad.street),
|
|
501
|
+
landmark: (data === null || data === void 0 ? void 0 : (_data$propertyAddress9 = data.propertyAddress) === null || _data$propertyAddress9 === void 0 ? void 0 : _data$propertyAddress9.landmark) || (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.address) === null || _data$cpt0$details$ad === void 0 ? void 0 : _data$cpt0$details$ad.landmark),
|
|
502
|
+
latitude: (data === null || data === void 0 ? void 0 : (_data$propertyAddress0 = data.propertyAddress) === null || _data$propertyAddress0 === void 0 ? void 0 : _data$propertyAddress0.Latitude) || (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.latitude),
|
|
503
|
+
longitude: (data === null || data === void 0 ? void 0 : (_data$propertyAddress1 = data.propertyAddress) === null || _data$propertyAddress1 === void 0 ? void 0 : _data$propertyAddress1.Longitude) || (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.longitude),
|
|
504
|
+
buildingName: (data === null || data === void 0 ? void 0 : (_data$propertyAddress10 = data.propertyAddress) === null || _data$propertyAddress10 === void 0 ? void 0 : _data$propertyAddress10.address) || (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),
|
|
505
|
+
additionalDetails: {
|
|
506
|
+
...(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.additionalDetails),
|
|
507
|
+
assembly: (data === null || data === void 0 ? void 0 : (_data$propertyAddress11 = data.propertyAddress) === null || _data$propertyAddress11 === void 0 ? void 0 : _data$propertyAddress11.Assembly) || (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.additionalDetails) === null || _data$cpt13$details$a2 === void 0 ? void 0 : _data$cpt13$details$a2.assembly),
|
|
508
|
+
block: (data === null || data === void 0 ? void 0 : (_data$propertyAddress12 = data.propertyAddress) === null || _data$propertyAddress12 === void 0 ? void 0 : _data$propertyAddress12.block) || (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.additionalDetails) === null || _data$cpt14$details$a2 === void 0 ? void 0 : _data$cpt14$details$a2.block),
|
|
509
|
+
zone: (data === null || data === void 0 ? void 0 : (_data$propertyAddress13 = data.propertyAddress) === null || _data$propertyAddress13 === void 0 ? void 0 : _data$propertyAddress13.zone) || (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$a = _data$cpt15$details.address) === null || _data$cpt15$details$a === void 0 ? void 0 : (_data$cpt15$details$a2 = _data$cpt15$details$a.additionalDetails) === null || _data$cpt15$details$a2 === void 0 ? void 0 : _data$cpt15$details$a2.zone)
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
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,
|
|
487
514
|
roadCuttingInfo: data === null || data === void 0 ? void 0 : (_data$roadCuttingDeta = data.roadCuttingDetails) === null || _data$roadCuttingDeta === void 0 ? void 0 : _data$roadCuttingDeta.filter(o => {
|
|
488
515
|
var _o$roadType;
|
|
489
516
|
return (o === null || o === void 0 ? void 0 : (_o$roadType = o.roadType) === null || _o$roadType === void 0 ? void 0 : _o$roadType.code) !== "";
|
|
@@ -515,22 +542,25 @@ const createPayloadOfWS = async data => {
|
|
|
515
542
|
...useDetailsObject,
|
|
516
543
|
...(data === null || data === void 0 ? void 0 : data.djbEmployee),
|
|
517
544
|
...(data === null || data === void 0 ? void 0 : data.bankDetails),
|
|
545
|
+
...(data === null || data === void 0 ? void 0 : data.declarationData),
|
|
546
|
+
...(data === null || data === void 0 ? void 0 : data.declaration),
|
|
518
547
|
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),
|
|
519
|
-
locality: (data === null || data === void 0 ? void 0 : (_data$
|
|
548
|
+
locality: (data === null || data === void 0 ? void 0 : (_data$propertyAddress14 = data.propertyAddress) === null || _data$propertyAddress14 === void 0 ? void 0 : (_data$propertyAddress15 = _data$propertyAddress14.locality) === null || _data$propertyAddress15 === void 0 ? void 0 : _data$propertyAddress15.code) || (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$a = _data$cpt17$details.address) === null || _data$cpt17$details$a === void 0 ? void 0 : (_data$cpt17$details$a2 = _data$cpt17$details$a.locality) === null || _data$cpt17$details$a2 === void 0 ? void 0 : _data$cpt17$details$a2.code),
|
|
520
549
|
detailsProvidedBy: (data === null || data === void 0 ? void 0 : (_data$plumberDetails2 = data.plumberDetails) === null || _data$plumberDetails2 === void 0 ? void 0 : (_data$plumberDetails3 = _data$plumberDetails2[0]) === null || _data$plumberDetails3 === void 0 ? void 0 : (_data$plumberDetails4 = _data$plumberDetails3.detailsProvidedBy) === null || _data$plumberDetails4 === void 0 ? void 0 : _data$plumberDetails4.code) || (data === null || data === void 0 ? void 0 : (_data$plumberDetails5 = data.plumberDetails) === null || _data$plumberDetails5 === void 0 ? void 0 : (_data$plumberDetails6 = _data$plumberDetails5[0]) === null || _data$plumberDetails6 === void 0 ? void 0 : _data$plumberDetails6.detailsProvidedBy) || "",
|
|
521
|
-
applicantType: data === null || data === void 0 ? void 0 : (_data$
|
|
522
|
-
connectionType: (data === null || data === void 0 ? void 0 : (_data$
|
|
523
|
-
categoryType: (data === null || data === void 0 ? void 0 : (_data$
|
|
524
|
-
subCategory: data === null || data === void 0 ? void 0 : (_data$
|
|
525
|
-
domesticType: data === null || data === void 0 ? void 0 : (_data$
|
|
526
|
-
temporaryConnection: data === null || data === void 0 ? void 0 : (_data$
|
|
527
|
-
ownerAuthorizationDoc: data === null || data === void 0 ? void 0 : (_data$
|
|
528
|
-
ownerContactNumber: data === null || data === void 0 ? void 0 : (_data$
|
|
529
|
-
isOwnerVerified: data === null || data === void 0 ? void 0 : (_data$
|
|
530
|
-
commercialType: data === null || data === void 0 ? void 0 : (_data$
|
|
531
|
-
govtOrganization: data === null || data === void 0 ? void 0 : (_data$
|
|
550
|
+
applicantType: data === null || data === void 0 ? void 0 : (_data$applicationSele4 = data.applicationSelection) === null || _data$applicationSele4 === void 0 ? void 0 : (_data$applicationSele5 = _data$applicationSele4.applicantType) === null || _data$applicationSele5 === void 0 ? void 0 : _data$applicationSele5.code,
|
|
551
|
+
connectionType: (data === null || data === void 0 ? void 0 : (_data$applicationSele6 = data.applicationSelection) === null || _data$applicationSele6 === void 0 ? void 0 : (_data$applicationSele7 = _data$applicationSele6.connectionType) === null || _data$applicationSele7 === void 0 ? void 0 : _data$applicationSele7.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",
|
|
552
|
+
categoryType: (data === null || data === void 0 ? void 0 : (_data$applicationSele8 = data.applicationSelection) === null || _data$applicationSele8 === void 0 ? void 0 : (_data$applicationSele9 = _data$applicationSele8.categoryType) === null || _data$applicationSele9 === void 0 ? void 0 : _data$applicationSele9.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),
|
|
553
|
+
subCategory: data === null || data === void 0 ? void 0 : (_data$applicationSele0 = data.applicationSelection) === null || _data$applicationSele0 === void 0 ? void 0 : (_data$applicationSele1 = _data$applicationSele0.subCategory) === null || _data$applicationSele1 === void 0 ? void 0 : _data$applicationSele1.code,
|
|
554
|
+
domesticType: data === null || data === void 0 ? void 0 : (_data$applicationSele10 = data.applicationSelection) === null || _data$applicationSele10 === void 0 ? void 0 : (_data$applicationSele11 = _data$applicationSele10.domesticType) === null || _data$applicationSele11 === void 0 ? void 0 : _data$applicationSele11.code,
|
|
555
|
+
temporaryConnection: data === null || data === void 0 ? void 0 : (_data$applicationSele12 = data.applicationSelection) === null || _data$applicationSele12 === void 0 ? void 0 : (_data$applicationSele13 = _data$applicationSele12.temporaryConnection) === null || _data$applicationSele13 === void 0 ? void 0 : _data$applicationSele13.code,
|
|
556
|
+
ownerAuthorizationDoc: data === null || data === void 0 ? void 0 : (_data$applicationSele14 = data.applicationSelection) === null || _data$applicationSele14 === void 0 ? void 0 : (_data$applicationSele15 = _data$applicationSele14.ownerAuthorizationDoc) === null || _data$applicationSele15 === void 0 ? void 0 : (_data$applicationSele16 = _data$applicationSele15[0]) === null || _data$applicationSele16 === void 0 ? void 0 : (_data$applicationSele17 = _data$applicationSele16[1]) === null || _data$applicationSele17 === void 0 ? void 0 : _data$applicationSele17.fileStoreId,
|
|
557
|
+
ownerContactNumber: data === null || data === void 0 ? void 0 : (_data$applicationSele18 = data.applicationSelection) === null || _data$applicationSele18 === void 0 ? void 0 : _data$applicationSele18.ownerContactNumber,
|
|
558
|
+
isOwnerVerified: data === null || data === void 0 ? void 0 : (_data$applicationSele19 = data.applicationSelection) === null || _data$applicationSele19 === void 0 ? void 0 : _data$applicationSele19.isOwnerVerified,
|
|
559
|
+
commercialType: data === null || data === void 0 ? void 0 : (_data$applicationSele20 = data.applicationSelection) === null || _data$applicationSele20 === void 0 ? void 0 : (_data$applicationSele21 = _data$applicationSele20.commercialType) === null || _data$applicationSele21 === void 0 ? void 0 : _data$applicationSele21.code,
|
|
560
|
+
govtOrganization: data === null || data === void 0 ? void 0 : (_data$applicationSele22 = data.applicationSelection) === null || _data$applicationSele22 === void 0 ? void 0 : _data$applicationSele22.govtOrganization,
|
|
561
|
+
departmentType: data === null || data === void 0 ? void 0 : (_data$applicationSele23 = data.applicationSelection) === null || _data$applicationSele23 === void 0 ? void 0 : (_data$applicationSele24 = _data$applicationSele23.departmentType) === null || _data$applicationSele24 === void 0 ? void 0 : _data$applicationSele24.code,
|
|
532
562
|
governmentEmployee: data === null || data === void 0 ? void 0 : data.governmentEmployee,
|
|
533
|
-
whatsAppNumber: data === null || data === void 0 ? void 0 : (_data$
|
|
563
|
+
whatsAppNumber: data === null || data === void 0 ? void 0 : (_data$contact5 = data.contact) === null || _data$contact5 === void 0 ? void 0 : _data$contact5.whatsAppNumber,
|
|
534
564
|
identityProofNumber: data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : _data$documents.identityProofNumber,
|
|
535
565
|
ownershipDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents2 = data.documents) === null || _data$documents2 === void 0 ? void 0 : _data$documents2.ownershipDocumentNumber,
|
|
536
566
|
otherDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.otherDocumentNumber,
|
|
@@ -542,8 +572,8 @@ const createPayloadOfWS = async data => {
|
|
|
542
572
|
},
|
|
543
573
|
channel: Digit.UserService.getType() === "CITIZEN" ? "CITIZEN" : "CFC_COUNTER"
|
|
544
574
|
};
|
|
545
|
-
sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify((data === null || data === void 0 ? void 0 : data.documents) || []));
|
|
546
|
-
sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify((data === null || data === void 0 ? void 0 : (_data$
|
|
575
|
+
sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify((data === null || data === void 0 ? void 0 : (_data$documents4 = data.documents) === null || _data$documents4 === void 0 ? void 0 : _data$documents4.documents) || (data === null || data === void 0 ? void 0 : data.documents) || []));
|
|
576
|
+
sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify((data === null || data === void 0 ? void 0 : (_data$cpt18 = data.cpt) === null || _data$cpt18 === void 0 ? void 0 : _data$cpt18.details) || {}));
|
|
547
577
|
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;
|
|
548
578
|
return payload;
|
|
549
579
|
};
|
|
@@ -563,11 +593,11 @@ const updatePayloadOfWS = async (data, type) => {
|
|
|
563
593
|
return payload;
|
|
564
594
|
};
|
|
565
595
|
const convertToWSUpdate = data => {
|
|
566
|
-
var _data$WaterConnection, _data$WaterConnection2, _data$
|
|
596
|
+
var _data$WaterConnection, _data$WaterConnection2, _data$documents5, _Digit5, _Digit5$Customization, _Digit5$Customization2, _Digit6, _Digit6$Customization, _Digit6$Customization2;
|
|
567
597
|
let formdata = {
|
|
568
598
|
WaterConnection: {
|
|
569
599
|
...(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]),
|
|
570
|
-
documents: [...(data === null || data === void 0 ? void 0 : (_data$
|
|
600
|
+
documents: [...(data === null || data === void 0 ? void 0 : (_data$documents5 = data.documents) === null || _data$documents5 === void 0 ? void 0 : _data$documents5.documents)],
|
|
571
601
|
processInstance: {
|
|
572
602
|
action: "SUBMIT_APPLICATION"
|
|
573
603
|
}
|
|
@@ -577,7 +607,7 @@ const convertToWSUpdate = data => {
|
|
|
577
607
|
return formdata;
|
|
578
608
|
};
|
|
579
609
|
const convertToEditWSUpdate = data => {
|
|
580
|
-
var _data$WaterConnection3, _data$WaterConnection4, _data$
|
|
610
|
+
var _data$WaterConnection3, _data$WaterConnection4, _data$documents6, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$ConnectionHolde8, _data$ConnectionHolde9, _data$ConnectionHolde0, _data$ConnectionHolde1, _data$ConnectionHolde10, _data$ConnectionHolde11, _data$ConnectionHolde12, _data$ConnectionHolde13, _data$ConnectionHolde14, _data$ConnectionHolde15, _data$waterConectionD, _data$waterConectionD2, _data$waterConectionD3, _data$applicationType, _data$applicationType2, _data$serviceName, _waterResult$serviceN, _data$documents7, _data$sewerageConnect, _data$sewerageConnect2, _Digit7, _Digit7$Customization, _Digit7$Customization2, _Digit8, _Digit8$Customization, _Digit8$Customization2;
|
|
581
611
|
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];
|
|
582
612
|
let formdata = {
|
|
583
613
|
WaterConnection: {
|
|
@@ -589,7 +619,7 @@ const convertToEditWSUpdate = data => {
|
|
|
589
619
|
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,
|
|
590
620
|
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,
|
|
591
621
|
oldConnectionNo: null,
|
|
592
|
-
documents: [...(data === null || data === void 0 ? void 0 : (_data$
|
|
622
|
+
documents: [...(data === null || data === void 0 ? void 0 : (_data$documents6 = data.documents) === null || _data$documents6 === void 0 ? void 0 : _data$documents6.documents)],
|
|
593
623
|
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) || [],
|
|
594
624
|
roadType: null,
|
|
595
625
|
roadCuttingArea: null,
|
|
@@ -618,10 +648,13 @@ const convertToEditWSUpdate = data => {
|
|
|
618
648
|
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) || "",
|
|
619
649
|
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde7 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde7 === void 0 ? void 0 : _data$ConnectionHolde7.mobileNumber) || "",
|
|
620
650
|
name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde8 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde8 === void 0 ? void 0 : _data$ConnectionHolde8.name) || "",
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
651
|
+
middleName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde9 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde9 === void 0 ? void 0 : _data$ConnectionHolde9.middleName) || "",
|
|
652
|
+
lastName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde0 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde0 === void 0 ? void 0 : _data$ConnectionHolde0.lastName) || "",
|
|
653
|
+
emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde1 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde1 === void 0 ? void 0 : _data$ConnectionHolde1.emailId) || "",
|
|
654
|
+
watsAppMobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde10 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde10 === void 0 ? void 0 : _data$ConnectionHolde10.watsAppMobileNumber) || "",
|
|
655
|
+
ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde11 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde11 === void 0 ? void 0 : (_data$ConnectionHolde12 = _data$ConnectionHolde11.specialCategoryType) === null || _data$ConnectionHolde12 === void 0 ? void 0 : _data$ConnectionHolde12.code) || "",
|
|
656
|
+
relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde13 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde13 === void 0 ? void 0 : (_data$ConnectionHolde14 = _data$ConnectionHolde13.relationship) === null || _data$ConnectionHolde14 === void 0 ? void 0 : _data$ConnectionHolde14.code) || "",
|
|
657
|
+
sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde15 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde15 === void 0 ? void 0 : _data$ConnectionHolde15.sameAsOwnerDetails
|
|
625
658
|
}] : null : waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionHolders,
|
|
626
659
|
oldApplication: false,
|
|
627
660
|
channel: Digit.UserService.getType() === "CITIZEN" ? "CITIZEN" : "CFC_COUNTER",
|
|
@@ -642,7 +675,7 @@ const convertToEditWSUpdate = data => {
|
|
|
642
675
|
water: data !== null && data !== void 0 && (_data$applicationType = data.applicationType) !== null && _data$applicationType !== void 0 && _data$applicationType.includes("WATER") ? true : false,
|
|
643
676
|
sewerage: data !== null && data !== void 0 && (_data$applicationType2 = data.applicationType) !== null && _data$applicationType2 !== void 0 && _data$applicationType2.includes("WATER") ? true : false,
|
|
644
677
|
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,
|
|
645
|
-
reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$
|
|
678
|
+
reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$documents7 = data.documents) === null || _data$documents7 === void 0 ? void 0 : _data$documents7.documents)],
|
|
646
679
|
proposedWaterClosets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect = data.sewerageConnectionDetails) === null || _data$sewerageConnect === void 0 ? void 0 : _data$sewerageConnect.proposedWaterClosets,
|
|
647
680
|
proposedToilets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect2 = data.sewerageConnectionDetails) === null || _data$sewerageConnect2 === void 0 ? void 0 : _data$sewerageConnect2.proposedToilets,
|
|
648
681
|
comment: "",
|
|
@@ -656,7 +689,7 @@ const convertToEditWSUpdate = data => {
|
|
|
656
689
|
return formdata;
|
|
657
690
|
};
|
|
658
691
|
const convertToEditSWUpdate = data => {
|
|
659
|
-
var _data$SewerageConnect, _data$SewerageConnect2, _data$
|
|
692
|
+
var _data$SewerageConnect, _data$SewerageConnect2, _data$documents8, _data$ConnectionHolde16, _data$ConnectionHolde17, _data$ConnectionHolde18, _data$ConnectionHolde19, _data$ConnectionHolde20, _data$ConnectionHolde21, _data$ConnectionHolde22, _data$ConnectionHolde23, _data$ConnectionHolde24, _data$ConnectionHolde25, _data$ConnectionHolde26, _data$ConnectionHolde27, _data$ConnectionHolde28, _data$ConnectionHolde29, _data$ConnectionHolde30, _data$ConnectionHolde31, _data$waterConectionD4, _data$waterConectionD5, _data$waterConectionD6, _data$applicationType3, _data$applicationType4, _data$serviceName2, _SewerageResult$servi, _data$documents9, _data$sewerageConnect3, _data$sewerageConnect4, _Digit9, _Digit9$Customization, _Digit9$Customization2, _Digit0, _Digit0$Customization, _Digit0$Customization2;
|
|
660
693
|
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];
|
|
661
694
|
let formdata = {
|
|
662
695
|
SewerageConnection: {
|
|
@@ -668,7 +701,7 @@ const convertToEditSWUpdate = data => {
|
|
|
668
701
|
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,
|
|
669
702
|
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,
|
|
670
703
|
oldConnectionNo: null,
|
|
671
|
-
documents: [...(data === null || data === void 0 ? void 0 : (_data$
|
|
704
|
+
documents: [...(data === null || data === void 0 ? void 0 : (_data$documents8 = data.documents) === null || _data$documents8 === void 0 ? void 0 : _data$documents8.documents)],
|
|
672
705
|
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) || [],
|
|
673
706
|
roadType: null,
|
|
674
707
|
roadCuttingArea: null,
|
|
@@ -691,16 +724,19 @@ const convertToEditSWUpdate = data => {
|
|
|
691
724
|
},
|
|
692
725
|
applicationType: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.applicationType : "MODIFY_WATER_CONNECTION",
|
|
693
726
|
dateEffectiveFrom: convertDateToEpoch(Date.now() + 86400000),
|
|
694
|
-
connectionHolders: data !== null && data !== void 0 && data.isEditApplication ? !(data !== null && data !== void 0 && (_data$
|
|
695
|
-
correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$
|
|
696
|
-
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$
|
|
697
|
-
gender: (data === null || data === void 0 ? void 0 : (_data$
|
|
698
|
-
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$
|
|
699
|
-
name: (data === null || data === void 0 ? void 0 : (_data$
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
727
|
+
connectionHolders: data !== null && data !== void 0 && data.isEditApplication ? !(data !== null && data !== void 0 && (_data$ConnectionHolde16 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde16 !== void 0 && _data$ConnectionHolde16.isOwnerSame) ? [{
|
|
728
|
+
correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde17 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde17 === void 0 ? void 0 : _data$ConnectionHolde17.address) || "",
|
|
729
|
+
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde18 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde18 === void 0 ? void 0 : _data$ConnectionHolde18.guardian) || "",
|
|
730
|
+
gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde19 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde19 === void 0 ? void 0 : (_data$ConnectionHolde20 = _data$ConnectionHolde19.gender) === null || _data$ConnectionHolde20 === void 0 ? void 0 : _data$ConnectionHolde20.code) || "",
|
|
731
|
+
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde21 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde21 === void 0 ? void 0 : _data$ConnectionHolde21.mobileNumber) || "",
|
|
732
|
+
name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde22 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde22 === void 0 ? void 0 : _data$ConnectionHolde22.name) || "",
|
|
733
|
+
middleName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde23 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde23 === void 0 ? void 0 : _data$ConnectionHolde23.middleName) || "",
|
|
734
|
+
lastName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde24 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde24 === void 0 ? void 0 : _data$ConnectionHolde24.lastName) || "",
|
|
735
|
+
emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde25 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde25 === void 0 ? void 0 : _data$ConnectionHolde25.emailId) || "",
|
|
736
|
+
watsAppMobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde26 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde26 === void 0 ? void 0 : _data$ConnectionHolde26.watsAppMobileNumber) || "",
|
|
737
|
+
ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde27 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde27 === void 0 ? void 0 : (_data$ConnectionHolde28 = _data$ConnectionHolde27.specialCategoryType) === null || _data$ConnectionHolde28 === void 0 ? void 0 : _data$ConnectionHolde28.code) || "",
|
|
738
|
+
relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde29 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde29 === void 0 ? void 0 : (_data$ConnectionHolde30 = _data$ConnectionHolde29.relationship) === null || _data$ConnectionHolde30 === void 0 ? void 0 : _data$ConnectionHolde30.code) || "",
|
|
739
|
+
sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde31 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde31 === void 0 ? void 0 : _data$ConnectionHolde31.sameAsOwnerDetails
|
|
704
740
|
}] : null : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.connectionHolders,
|
|
705
741
|
oldApplication: false,
|
|
706
742
|
channel: Digit.UserService.getType() === "CITIZEN" ? "CITIZEN" : "CFC_COUNTER",
|
|
@@ -721,7 +757,7 @@ const convertToEditSWUpdate = data => {
|
|
|
721
757
|
water: data !== null && data !== void 0 && (_data$applicationType3 = data.applicationType) !== null && _data$applicationType3 !== void 0 && _data$applicationType3.includes("WATER") ? true : false,
|
|
722
758
|
sewerage: data !== null && data !== void 0 && (_data$applicationType4 = data.applicationType) !== null && _data$applicationType4 !== void 0 && _data$applicationType4.includes("WATER") ? true : false,
|
|
723
759
|
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,
|
|
724
|
-
reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$
|
|
760
|
+
reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$documents9 = data.documents) === null || _data$documents9 === void 0 ? void 0 : _data$documents9.documents)],
|
|
725
761
|
proposedWaterClosets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect3 = data.sewerageConnectionDetails) === null || _data$sewerageConnect3 === void 0 ? void 0 : _data$sewerageConnect3.proposedWaterClosets,
|
|
726
762
|
proposedToilets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect4 = data.sewerageConnectionDetails) === null || _data$sewerageConnect4 === void 0 ? void 0 : _data$sewerageConnect4.proposedToilets,
|
|
727
763
|
comment: "",
|
|
@@ -735,12 +771,12 @@ const convertToEditSWUpdate = data => {
|
|
|
735
771
|
return formdata;
|
|
736
772
|
};
|
|
737
773
|
const convertToSWUpdate = data => {
|
|
738
|
-
var _data$SewerageConnect3, _data$SewerageConnect4, _data$
|
|
774
|
+
var _data$SewerageConnect3, _data$SewerageConnect4, _data$documents0, _Digit1, _Digit1$Customization, _Digit1$Customization2, _Digit10, _Digit10$Customizatio, _Digit10$Customizatio2;
|
|
739
775
|
let formdata = {
|
|
740
776
|
SewerageConnection: {
|
|
741
777
|
...(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]),
|
|
742
778
|
connectionType: "Non Metered",
|
|
743
|
-
documents: [...(data === null || data === void 0 ? void 0 : (_data$
|
|
779
|
+
documents: [...(data === null || data === void 0 ? void 0 : (_data$documents0 = data.documents) === null || _data$documents0 === void 0 ? void 0 : _data$documents0.documents)],
|
|
744
780
|
processInstance: {
|
|
745
781
|
action: "SUBMIT_APPLICATION"
|
|
746
782
|
}
|
|
@@ -1088,7 +1124,7 @@ const getDocumentsForPDF = (app, t) => {
|
|
|
1088
1124
|
});
|
|
1089
1125
|
};
|
|
1090
1126
|
const getPDFData = (application, data, tenantInfo, t) => {
|
|
1091
|
-
var _tenantInfo$city, _data$
|
|
1127
|
+
var _tenantInfo$city, _data$cpt19, _data$cpt19$details, _data$cpt20, _data$cpt20$details, _data$cpt21, _data$cpt21$details, _data$cpt22, _data$cpt22$details, _data$cpt23, _data$cpt23$details, _data$cpt23$details$a, _data$cpt24, _data$cpt24$details, _data$cpt24$details$a, _data$cpt25, _data$cpt25$details, _data$cpt25$details$a, _data$cpt26, _data$cpt26$details, _data$cpt26$details$a, _data$cpt27, _data$cpt27$details, _data$cpt27$details$a, _data$cpt28, _data$cpt28$details, _data$cpt28$details$a, _data$cpt28$details$a2, _data$cpt29, _application$plumberI, _application$plumberI2, _application$plumberI3, _application$plumberI4;
|
|
1092
1128
|
return {
|
|
1093
1129
|
t: t,
|
|
1094
1130
|
tenantId: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code,
|
|
@@ -1110,44 +1146,44 @@ const getPDFData = (application, data, tenantInfo, t) => {
|
|
|
1110
1146
|
value: (application === null || application === void 0 ? void 0 : application.propertyId) || "N/A"
|
|
1111
1147
|
}, {
|
|
1112
1148
|
title: t("WS_PROPERTY_TYPE_LABEL"),
|
|
1113
|
-
value: (data === null || data === void 0 ? void 0 : (_data$
|
|
1149
|
+
value: (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.propertyType) || "N/A"
|
|
1114
1150
|
}, {
|
|
1115
1151
|
title: t("WS_PROPERTY_USAGE_TYPE_LABEL"),
|
|
1116
|
-
value: (data === null || data === void 0 ? void 0 : (_data$
|
|
1152
|
+
value: (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.usageCategory) || "N/A"
|
|
1117
1153
|
}, {
|
|
1118
1154
|
title: t("WS_PROPERTY_SUB_USAGE_TYPE_LABEL"),
|
|
1119
1155
|
value: "N/A"
|
|
1120
1156
|
}, {
|
|
1121
1157
|
title: t("WS_PROP_DETAIL_PLOT_SIZE_LABEL"),
|
|
1122
|
-
value: (data === null || data === void 0 ? void 0 : (_data$
|
|
1158
|
+
value: (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.superBuiltUpArea) || "N/A"
|
|
1123
1159
|
}, {
|
|
1124
1160
|
title: t("WS_PROPERTY_NO_OF_FLOOR_LABEL"),
|
|
1125
|
-
value: (data === null || data === void 0 ? void 0 : (_data$
|
|
1161
|
+
value: (data === null || data === void 0 ? void 0 : (_data$cpt22 = data.cpt) === null || _data$cpt22 === void 0 ? void 0 : (_data$cpt22$details = _data$cpt22.details) === null || _data$cpt22$details === void 0 ? void 0 : _data$cpt22$details.noOfFloors) || "N/A"
|
|
1126
1162
|
}, {
|
|
1127
1163
|
title: t("WS_SERV_DETAIL_CONN_RAIN_WATER_HARVESTING_FAC"),
|
|
1128
|
-
value: data === null || data === void 0 ? void 0 : (_data$
|
|
1164
|
+
value: data === null || data === void 0 ? void 0 : (_data$cpt23 = data.cpt) === null || _data$cpt23 === void 0 ? void 0 : (_data$cpt23$details = _data$cpt23.details) === null || _data$cpt23$details === void 0 ? void 0 : (_data$cpt23$details$a = _data$cpt23$details.additionalDetails) === null || _data$cpt23$details$a === void 0 ? void 0 : _data$cpt23$details$a.isRainwaterHarvesting
|
|
1129
1165
|
}]
|
|
1130
1166
|
}, {
|
|
1131
1167
|
title: t("WS_COMMON_PROP_LOC_DETAIL_HEADER"),
|
|
1132
1168
|
values: [{
|
|
1133
1169
|
title: t("WS_PROP_DETAIL_CITY"),
|
|
1134
|
-
value: data === null || data === void 0 ? void 0 : (_data$
|
|
1170
|
+
value: data === null || data === void 0 ? void 0 : (_data$cpt24 = data.cpt) === null || _data$cpt24 === void 0 ? void 0 : (_data$cpt24$details = _data$cpt24.details) === null || _data$cpt24$details === void 0 ? void 0 : (_data$cpt24$details$a = _data$cpt24$details.address) === null || _data$cpt24$details$a === void 0 ? void 0 : _data$cpt24$details$a.city
|
|
1135
1171
|
}, {
|
|
1136
1172
|
title: t("WS_PROP_DETAIL_DHNO"),
|
|
1137
|
-
value: data === null || data === void 0 ? void 0 : (_data$
|
|
1173
|
+
value: data === null || data === void 0 ? void 0 : (_data$cpt25 = data.cpt) === null || _data$cpt25 === void 0 ? void 0 : (_data$cpt25$details = _data$cpt25.details) === null || _data$cpt25$details === void 0 ? void 0 : (_data$cpt25$details$a = _data$cpt25$details.address) === null || _data$cpt25$details$a === void 0 ? void 0 : _data$cpt25$details$a.doorNo
|
|
1138
1174
|
}, {
|
|
1139
1175
|
title: t("WS_PROP_DETAIL_BUILD_NAME_LABEL"),
|
|
1140
|
-
value: data === null || data === void 0 ? void 0 : (_data$
|
|
1176
|
+
value: data === null || data === void 0 ? void 0 : (_data$cpt26 = data.cpt) === null || _data$cpt26 === void 0 ? void 0 : (_data$cpt26$details = _data$cpt26.details) === null || _data$cpt26$details === void 0 ? void 0 : (_data$cpt26$details$a = _data$cpt26$details.address) === null || _data$cpt26$details$a === void 0 ? void 0 : _data$cpt26$details$a.buildingName
|
|
1141
1177
|
}, {
|
|
1142
1178
|
title: t("WS_PROP_DETAIL_STREET_NAME"),
|
|
1143
|
-
value: data === null || data === void 0 ? void 0 : (_data$
|
|
1179
|
+
value: data === null || data === void 0 ? void 0 : (_data$cpt27 = data.cpt) === null || _data$cpt27 === void 0 ? void 0 : (_data$cpt27$details = _data$cpt27.details) === null || _data$cpt27$details === void 0 ? void 0 : (_data$cpt27$details$a = _data$cpt27$details.address) === null || _data$cpt27$details$a === void 0 ? void 0 : _data$cpt27$details$a.street
|
|
1144
1180
|
}, {
|
|
1145
1181
|
title: t("WS_PROP_DETAIL_LOCALITY_MOHALLA_LABEL"),
|
|
1146
|
-
value: data === null || data === void 0 ? void 0 : (_data$
|
|
1182
|
+
value: data === null || data === void 0 ? void 0 : (_data$cpt28 = data.cpt) === null || _data$cpt28 === void 0 ? void 0 : (_data$cpt28$details = _data$cpt28.details) === null || _data$cpt28$details === void 0 ? void 0 : (_data$cpt28$details$a = _data$cpt28$details.address) === null || _data$cpt28$details$a === void 0 ? void 0 : (_data$cpt28$details$a2 = _data$cpt28$details$a.locality) === null || _data$cpt28$details$a2 === void 0 ? void 0 : _data$cpt28$details$a2.name
|
|
1147
1183
|
}]
|
|
1148
1184
|
}, {
|
|
1149
1185
|
title: t("WS_TASK_PROP_OWN_HEADER"),
|
|
1150
|
-
values: getOwnersforPDF(data === null || data === void 0 ? void 0 : (_data$
|
|
1186
|
+
values: getOwnersforPDF(data === null || data === void 0 ? void 0 : (_data$cpt29 = data.cpt) === null || _data$cpt29 === void 0 ? void 0 : _data$cpt29.details, t)
|
|
1151
1187
|
}, {
|
|
1152
1188
|
...(application !== null && application !== void 0 && application.applicationType.includes("WATER") ? {
|
|
1153
1189
|
title: t("WS_COMMON_CONNECTION_DETAILS"),
|
|
@@ -1256,7 +1292,7 @@ const getBusinessService = data => {
|
|
|
1256
1292
|
if ((data === null || data === void 0 ? void 0 : data.service) == "WATER") return "WS.ONE_TIME_FEE";else return "SW.ONE_TIME_FEE";
|
|
1257
1293
|
};
|
|
1258
1294
|
const convertApplicationData = (data, serviceType, modify = false, editByConfig = false, t) => {
|
|
1259
|
-
var _data$propertyDetails, _data$propertyDetails2, _data$applicationData, _data$applicationData2, _data$applicationData3, _data$applicationData4, _data$applicationData5, _data$applicationData6, _data$applicationData7, _data$applicationData8, _data$applicationData9, _data$applicationData0, _data$applicationData1, _data$applicationData10, _data$applicationData11, _data$applicationData12, _data$applicationData13, _data$applicationData14, _data$applicationData15, _data$applicationData16, _data$applicationData17, _data$applicationData18, _data$applicationData19, _data$applicationData20, _data$applicationData21, _data$applicationData22, _data$applicationData23, _data$applicationData24, _data$applicationData25, _data$applicationData26, _data$applicationData27, _data$applicationData28, _data$applicationData29, _data$applicationData30, _data$applicationData31, _data$applicationData32, _data$applicationData33, _data$applicationData34, _data$applicationData35, _data$applicationData36, _data$applicationData37, _data$applicationData38, _data$applicationData39, _data$applicationData40, _data$applicationData41, _data$applicationData42, _data$applicationData43, _data$applicationData44, _data$applicationData45, _data$applicationData46, _data$applicationData47, _data$applicationData48, _data$applicationData49, _data$applicationData50, _data$applicationData51, _data$applicationData52, _data$applicationData53, _data$applicationData54, _data$applicationData55, _data$applicationData56, _data$applicationData57, _data$applicationData58, _data$applicationData59, _data$applicationData60, _data$applicationData61, _data$applicationData62, _data$applicationData63, _data$applicationData64, _data$applicationData65, _data$applicationData66, _data$applicationData67, _data$applicationData68, _data$applicationData69, _data$applicationData70, _data$applicationData71, _data$applicationData72, _data$applicationData73, _data$applicationData74, _data$applicationData75;
|
|
1295
|
+
var _data$propertyDetails, _data$propertyDetails2, _data$applicationData, _data$applicationData2, _data$applicationData3, _data$applicationData4, _data$applicationData5, _data$applicationData6, _data$applicationData7, _data$applicationData8, _data$applicationData9, _data$applicationData0, _data$applicationData1, _data$applicationData10, _data$applicationData11, _data$applicationData12, _data$applicationData13, _data$applicationData14, _data$applicationData15, _data$applicationData16, _data$applicationData17, _data$applicationData18, _data$applicationData19, _data$applicationData20, _data$applicationData21, _data$applicationData22, _data$applicationData23, _data$applicationData24, _data$applicationData25, _data$applicationData26, _data$applicationData27, _data$applicationData28, _data$applicationData29, _data$applicationData30, _data$applicationData31, _data$applicationData32, _data$applicationData33, _data$applicationData34, _data$applicationData35, _data$applicationData36, _data$applicationData37, _data$applicationData38, _data$applicationData39, _data$applicationData40, _data$applicationData41, _data$applicationData42, _data$applicationData43, _data$applicationData44, _data$applicationData45, _data$applicationData46, _data$applicationData47, _data$applicationData48, _data$applicationData49, _data$applicationData50, _data$applicationData51, _data$applicationData52, _data$applicationData53, _data$applicationData54, _data$applicationData55, _data$applicationData56, _data$applicationData57, _data$applicationData58, _data$applicationData59, _data$applicationData60, _data$applicationData61, _data$applicationData62, _data$applicationData63, _data$applicationData64, _data$applicationData65, _data$applicationData66, _data$applicationData67, _data$applicationData68, _data$applicationData69, _data$applicationData70, _data$applicationData71, _data$applicationData72, _data$applicationData73, _data$applicationData74, _data$applicationData75, _data$applicationData76, _data$applicationData77, _data$applicationData78, _data$applicationData79, _data$applicationData80, _data$applicationData81, _data$applicationData82, _data$applicationData83, _data$applicationData84, _data$applicationData85, _data$applicationData86, _data$applicationData87, _data$applicationData88, _data$applicationData89, _data$applicationData90, _data$applicationData91, _data$applicationData92, _data$applicationData93;
|
|
1260
1296
|
data === null || data === void 0 ? void 0 : (_data$propertyDetails = data.propertyDetails) === null || _data$propertyDetails === void 0 ? void 0 : (_data$propertyDetails2 = _data$propertyDetails.owners) === null || _data$propertyDetails2 === void 0 ? void 0 : _data$propertyDetails2.forEach(owner => {
|
|
1261
1297
|
if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
|
|
1262
1298
|
});
|
|
@@ -1278,21 +1314,25 @@ const convertApplicationData = (data, serviceType, modify = false, editByConfig
|
|
|
1278
1314
|
sameAsOwnerDetails: false,
|
|
1279
1315
|
uuid: data === null || data === void 0 ? void 0 : (_data$applicationData1 = data.applicationData) === null || _data$applicationData1 === void 0 ? void 0 : (_data$applicationData10 = _data$applicationData1.connectionHolders) === null || _data$applicationData10 === void 0 ? void 0 : (_data$applicationData11 = _data$applicationData10[0]) === null || _data$applicationData11 === void 0 ? void 0 : _data$applicationData11.uuid,
|
|
1280
1316
|
name: (data === null || data === void 0 ? void 0 : (_data$applicationData12 = data.applicationData) === null || _data$applicationData12 === void 0 ? void 0 : (_data$applicationData13 = _data$applicationData12.connectionHolders) === null || _data$applicationData13 === void 0 ? void 0 : (_data$applicationData14 = _data$applicationData13[0]) === null || _data$applicationData14 === void 0 ? void 0 : _data$applicationData14.name) || "",
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1317
|
+
middleName: (data === null || data === void 0 ? void 0 : (_data$applicationData15 = data.applicationData) === null || _data$applicationData15 === void 0 ? void 0 : (_data$applicationData16 = _data$applicationData15.connectionHolders) === null || _data$applicationData16 === void 0 ? void 0 : (_data$applicationData17 = _data$applicationData16[0]) === null || _data$applicationData17 === void 0 ? void 0 : _data$applicationData17.middleName) || "",
|
|
1318
|
+
lastName: (data === null || data === void 0 ? void 0 : (_data$applicationData18 = data.applicationData) === null || _data$applicationData18 === void 0 ? void 0 : (_data$applicationData19 = _data$applicationData18.connectionHolders) === null || _data$applicationData19 === void 0 ? void 0 : (_data$applicationData20 = _data$applicationData19[0]) === null || _data$applicationData20 === void 0 ? void 0 : _data$applicationData20.lastName) || "",
|
|
1319
|
+
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$applicationData21 = data.applicationData) === null || _data$applicationData21 === void 0 ? void 0 : (_data$applicationData22 = _data$applicationData21.connectionHolders) === null || _data$applicationData22 === void 0 ? void 0 : (_data$applicationData23 = _data$applicationData22[0]) === null || _data$applicationData23 === void 0 ? void 0 : _data$applicationData23.mobileNumber) || "",
|
|
1320
|
+
emailId: (data === null || data === void 0 ? void 0 : (_data$applicationData24 = data.applicationData) === null || _data$applicationData24 === void 0 ? void 0 : (_data$applicationData25 = _data$applicationData24.connectionHolders) === null || _data$applicationData25 === void 0 ? void 0 : (_data$applicationData26 = _data$applicationData25[0]) === null || _data$applicationData26 === void 0 ? void 0 : _data$applicationData26.emailId) || "",
|
|
1321
|
+
watsAppMobileNumber: (data === null || data === void 0 ? void 0 : (_data$applicationData27 = data.applicationData) === null || _data$applicationData27 === void 0 ? void 0 : (_data$applicationData28 = _data$applicationData27.connectionHolders) === null || _data$applicationData28 === void 0 ? void 0 : (_data$applicationData29 = _data$applicationData28[0]) === null || _data$applicationData29 === void 0 ? void 0 : _data$applicationData29.watsAppMobileNumber) || "",
|
|
1322
|
+
isWatsappSameAsMobile: data !== null && data !== void 0 && (_data$applicationData30 = data.applicationData) !== null && _data$applicationData30 !== void 0 && (_data$applicationData31 = _data$applicationData30.connectionHolders) !== null && _data$applicationData31 !== void 0 && (_data$applicationData32 = _data$applicationData31[0]) !== null && _data$applicationData32 !== void 0 && _data$applicationData32.mobileNumber && (data === null || data === void 0 ? void 0 : (_data$applicationData33 = data.applicationData) === null || _data$applicationData33 === void 0 ? void 0 : (_data$applicationData34 = _data$applicationData33.connectionHolders) === null || _data$applicationData34 === void 0 ? void 0 : (_data$applicationData35 = _data$applicationData34[0]) === null || _data$applicationData35 === void 0 ? void 0 : _data$applicationData35.mobileNumber) === (data === null || data === void 0 ? void 0 : (_data$applicationData36 = data.applicationData) === null || _data$applicationData36 === void 0 ? void 0 : (_data$applicationData37 = _data$applicationData36.connectionHolders) === null || _data$applicationData37 === void 0 ? void 0 : (_data$applicationData38 = _data$applicationData37[0]) === null || _data$applicationData38 === void 0 ? void 0 : _data$applicationData38.watsAppMobileNumber) ? true : false,
|
|
1323
|
+
guardian: (data === null || data === void 0 ? void 0 : (_data$applicationData39 = data.applicationData) === null || _data$applicationData39 === void 0 ? void 0 : (_data$applicationData40 = _data$applicationData39.connectionHolders) === null || _data$applicationData40 === void 0 ? void 0 : (_data$applicationData41 = _data$applicationData40[0]) === null || _data$applicationData41 === void 0 ? void 0 : _data$applicationData41.fatherOrHusbandName) || "",
|
|
1324
|
+
address: (data === null || data === void 0 ? void 0 : (_data$applicationData42 = data.applicationData) === null || _data$applicationData42 === void 0 ? void 0 : (_data$applicationData43 = _data$applicationData42.connectionHolders) === null || _data$applicationData43 === void 0 ? void 0 : (_data$applicationData44 = _data$applicationData43[0]) === null || _data$applicationData44 === void 0 ? void 0 : _data$applicationData44.correspondenceAddress) || "",
|
|
1325
|
+
gender: data !== null && data !== void 0 && (_data$applicationData45 = data.applicationData) !== null && _data$applicationData45 !== void 0 && (_data$applicationData46 = _data$applicationData45.connectionHolders) !== null && _data$applicationData46 !== void 0 && (_data$applicationData47 = _data$applicationData46[0]) !== null && _data$applicationData47 !== void 0 && _data$applicationData47.gender ? {
|
|
1326
|
+
code: data === null || data === void 0 ? void 0 : (_data$applicationData48 = data.applicationData) === null || _data$applicationData48 === void 0 ? void 0 : (_data$applicationData49 = _data$applicationData48.connectionHolders) === null || _data$applicationData49 === void 0 ? void 0 : (_data$applicationData50 = _data$applicationData49[0]) === null || _data$applicationData50 === void 0 ? void 0 : _data$applicationData50.gender,
|
|
1327
|
+
i18nKey: data === null || data === void 0 ? void 0 : (_data$applicationData51 = data.applicationData) === null || _data$applicationData51 === void 0 ? void 0 : (_data$applicationData52 = _data$applicationData51.connectionHolders) === null || _data$applicationData52 === void 0 ? void 0 : (_data$applicationData53 = _data$applicationData52[0]) === null || _data$applicationData53 === void 0 ? void 0 : _data$applicationData53.gender
|
|
1288
1328
|
} : "",
|
|
1289
|
-
relationship: data !== null && data !== void 0 && (_data$
|
|
1290
|
-
code: data === null || data === void 0 ? void 0 : (_data$
|
|
1291
|
-
i18nKey: data === null || data === void 0 ? void 0 : (_data$
|
|
1329
|
+
relationship: data !== null && data !== void 0 && (_data$applicationData54 = data.applicationData) !== null && _data$applicationData54 !== void 0 && (_data$applicationData55 = _data$applicationData54.connectionHolders) !== null && _data$applicationData55 !== void 0 && (_data$applicationData56 = _data$applicationData55[0]) !== null && _data$applicationData56 !== void 0 && _data$applicationData56.relationship ? {
|
|
1330
|
+
code: data === null || data === void 0 ? void 0 : (_data$applicationData57 = data.applicationData) === null || _data$applicationData57 === void 0 ? void 0 : (_data$applicationData58 = _data$applicationData57.connectionHolders) === null || _data$applicationData58 === void 0 ? void 0 : (_data$applicationData59 = _data$applicationData58[0]) === null || _data$applicationData59 === void 0 ? void 0 : _data$applicationData59.relationship,
|
|
1331
|
+
i18nKey: data === null || data === void 0 ? void 0 : (_data$applicationData60 = data.applicationData) === null || _data$applicationData60 === void 0 ? void 0 : (_data$applicationData61 = _data$applicationData60.connectionHolders) === null || _data$applicationData61 === void 0 ? void 0 : (_data$applicationData62 = _data$applicationData61[0]) === null || _data$applicationData62 === void 0 ? void 0 : _data$applicationData62.relationship
|
|
1292
1332
|
} : "",
|
|
1293
|
-
ownerType: data !== null && data !== void 0 && (_data$
|
|
1294
|
-
code: data === null || data === void 0 ? void 0 : (_data$
|
|
1295
|
-
i18nKey: data === null || data === void 0 ? void 0 : (_data$
|
|
1333
|
+
ownerType: data !== null && data !== void 0 && (_data$applicationData63 = data.applicationData) !== null && _data$applicationData63 !== void 0 && (_data$applicationData64 = _data$applicationData63.connectionHolders) !== null && _data$applicationData64 !== void 0 && (_data$applicationData65 = _data$applicationData64[0]) !== null && _data$applicationData65 !== void 0 && _data$applicationData65.ownerType ? {
|
|
1334
|
+
code: data === null || data === void 0 ? void 0 : (_data$applicationData66 = data.applicationData) === null || _data$applicationData66 === void 0 ? void 0 : (_data$applicationData67 = _data$applicationData66.connectionHolders) === null || _data$applicationData67 === void 0 ? void 0 : (_data$applicationData68 = _data$applicationData67[0]) === null || _data$applicationData68 === void 0 ? void 0 : _data$applicationData68.ownerType,
|
|
1335
|
+
i18nKey: data === null || data === void 0 ? void 0 : (_data$applicationData69 = data.applicationData) === null || _data$applicationData69 === void 0 ? void 0 : (_data$applicationData70 = _data$applicationData69.connectionHolders) === null || _data$applicationData70 === void 0 ? void 0 : (_data$applicationData71 = _data$applicationData70[0]) === null || _data$applicationData71 === void 0 ? void 0 : _data$applicationData71.ownerType
|
|
1296
1336
|
} : "",
|
|
1297
1337
|
documentId: "",
|
|
1298
1338
|
documentType: "",
|
|
@@ -1300,6 +1340,8 @@ const convertApplicationData = (data, serviceType, modify = false, editByConfig
|
|
|
1300
1340
|
}] : [{
|
|
1301
1341
|
sameAsOwnerDetails: true,
|
|
1302
1342
|
name: "",
|
|
1343
|
+
middleName: "",
|
|
1344
|
+
lastName: "",
|
|
1303
1345
|
gender: "",
|
|
1304
1346
|
mobileNumber: "",
|
|
1305
1347
|
guardian: "",
|
|
@@ -1311,7 +1353,7 @@ const convertApplicationData = (data, serviceType, modify = false, editByConfig
|
|
|
1311
1353
|
file: ""
|
|
1312
1354
|
}];
|
|
1313
1355
|
let documents = [];
|
|
1314
|
-
if (data !== null && data !== void 0 && (_data$
|
|
1356
|
+
if (data !== null && data !== void 0 && (_data$applicationData72 = data.applicationData) !== null && _data$applicationData72 !== void 0 && _data$applicationData72.documents) {
|
|
1315
1357
|
data.applicationData.documents.forEach(data => {
|
|
1316
1358
|
var _data$documentType;
|
|
1317
1359
|
documents.push({
|
|
@@ -1331,63 +1373,63 @@ const convertApplicationData = (data, serviceType, modify = false, editByConfig
|
|
|
1331
1373
|
let cpt = {};
|
|
1332
1374
|
cpt["details"] = (data === null || data === void 0 ? void 0 : data.propertyDetails) || {};
|
|
1333
1375
|
let payload = {};
|
|
1334
|
-
const sourceSubDataValue = data !== null && data !== void 0 && (_data$
|
|
1376
|
+
const sourceSubDataValue = data !== null && data !== void 0 && (_data$applicationData73 = data.applicationData) !== null && _data$applicationData73 !== void 0 && _data$applicationData73.waterSource ? stringReplaceAll(data === null || data === void 0 ? void 0 : (_data$applicationData74 = data.applicationData) === null || _data$applicationData74 === void 0 ? void 0 : (_data$applicationData75 = _data$applicationData74.waterSource) === null || _data$applicationData75 === void 0 ? void 0 : _data$applicationData75.toUpperCase(), " ", "_") : "";
|
|
1335
1377
|
const sourceSubDataFilter = sourceSubDataValue ? stringReplaceAll(sourceSubDataValue === null || sourceSubDataValue === void 0 ? void 0 : sourceSubDataValue.toUpperCase(), ".", "_") : "";
|
|
1336
1378
|
const connectionDetails = serviceType === "WATER" ? {
|
|
1337
|
-
connectionType: data !== null && data !== void 0 && (_data$
|
|
1338
|
-
code: data === null || data === void 0 ? void 0 : (_data$
|
|
1339
|
-
i18nKey: t(`WS_CONNECTIONTYPE_${stringReplaceAll(data === null || data === void 0 ? void 0 : (_data$
|
|
1379
|
+
connectionType: data !== null && data !== void 0 && (_data$applicationData76 = data.applicationData) !== null && _data$applicationData76 !== void 0 && _data$applicationData76.connectionType ? {
|
|
1380
|
+
code: data === null || data === void 0 ? void 0 : (_data$applicationData77 = data.applicationData) === null || _data$applicationData77 === void 0 ? void 0 : _data$applicationData77.connectionType,
|
|
1381
|
+
i18nKey: t(`WS_CONNECTIONTYPE_${stringReplaceAll(data === null || data === void 0 ? void 0 : (_data$applicationData78 = data.applicationData) === null || _data$applicationData78 === void 0 ? void 0 : (_data$applicationData79 = _data$applicationData78.connectionType) === null || _data$applicationData79 === void 0 ? void 0 : _data$applicationData79.toUpperCase(), " ", "_")}`)
|
|
1340
1382
|
} : "",
|
|
1341
|
-
waterSource: data !== null && data !== void 0 && (_data$
|
|
1342
|
-
code: data === null || data === void 0 ? void 0 : (_data$
|
|
1343
|
-
i18nKey: t(`WS_SERVICES_MASTERS_WATERSOURCE_${stringReplaceAll(data === null || data === void 0 ? void 0 : (_data$
|
|
1383
|
+
waterSource: data !== null && data !== void 0 && (_data$applicationData80 = data.applicationData) !== null && _data$applicationData80 !== void 0 && _data$applicationData80.waterSource ? {
|
|
1384
|
+
code: data === null || data === void 0 ? void 0 : (_data$applicationData81 = data.applicationData) === null || _data$applicationData81 === void 0 ? void 0 : _data$applicationData81.waterSource,
|
|
1385
|
+
i18nKey: t(`WS_SERVICES_MASTERS_WATERSOURCE_${stringReplaceAll(data === null || data === void 0 ? void 0 : (_data$applicationData82 = data.applicationData) === null || _data$applicationData82 === void 0 ? void 0 : (_data$applicationData83 = _data$applicationData82.waterSource) === null || _data$applicationData83 === void 0 ? void 0 : (_data$applicationData84 = _data$applicationData83.split(".")[0]) === null || _data$applicationData84 === void 0 ? void 0 : _data$applicationData84.toUpperCase(), " ", "_")}`)
|
|
1344
1386
|
} : "",
|
|
1345
|
-
sourceSubData: data !== null && data !== void 0 && (_data$
|
|
1346
|
-
code: data === null || data === void 0 ? void 0 : (_data$
|
|
1387
|
+
sourceSubData: data !== null && data !== void 0 && (_data$applicationData85 = data.applicationData) !== null && _data$applicationData85 !== void 0 && _data$applicationData85.waterSource ? {
|
|
1388
|
+
code: data === null || data === void 0 ? void 0 : (_data$applicationData86 = data.applicationData) === null || _data$applicationData86 === void 0 ? void 0 : _data$applicationData86.waterSource,
|
|
1347
1389
|
i18nKey: t(`WS_SERVICES_MASTERS_WATERSOURCE_${sourceSubDataFilter}`)
|
|
1348
1390
|
} : "",
|
|
1349
|
-
pipeSize: data !== null && data !== void 0 && (_data$
|
|
1350
|
-
code: data === null || data === void 0 ? void 0 : (_data$
|
|
1351
|
-
i18nKey: data === null || data === void 0 ? void 0 : (_data$
|
|
1352
|
-
size: data === null || data === void 0 ? void 0 : (_data$
|
|
1391
|
+
pipeSize: data !== null && data !== void 0 && (_data$applicationData87 = data.applicationData) !== null && _data$applicationData87 !== void 0 && _data$applicationData87.pipeSize ? {
|
|
1392
|
+
code: data === null || data === void 0 ? void 0 : (_data$applicationData88 = data.applicationData) === null || _data$applicationData88 === void 0 ? void 0 : _data$applicationData88.pipeSize,
|
|
1393
|
+
i18nKey: data === null || data === void 0 ? void 0 : (_data$applicationData89 = data.applicationData) === null || _data$applicationData89 === void 0 ? void 0 : _data$applicationData89.pipeSize,
|
|
1394
|
+
size: data === null || data === void 0 ? void 0 : (_data$applicationData90 = data.applicationData) === null || _data$applicationData90 === void 0 ? void 0 : _data$applicationData90.pipeSize
|
|
1353
1395
|
} : "",
|
|
1354
|
-
noOfTaps: (data === null || data === void 0 ? void 0 : (_data$
|
|
1396
|
+
noOfTaps: (data === null || data === void 0 ? void 0 : (_data$applicationData91 = data.applicationData) === null || _data$applicationData91 === void 0 ? void 0 : _data$applicationData91.noOfTaps) || ""
|
|
1355
1397
|
} : {
|
|
1356
|
-
noOfWaterClosets: (data === null || data === void 0 ? void 0 : (_data$
|
|
1357
|
-
noOfToilets: (data === null || data === void 0 ? void 0 : (_data$
|
|
1398
|
+
noOfWaterClosets: (data === null || data === void 0 ? void 0 : (_data$applicationData92 = data.applicationData) === null || _data$applicationData92 === void 0 ? void 0 : _data$applicationData92.noOfWaterClosets) || "",
|
|
1399
|
+
noOfToilets: (data === null || data === void 0 ? void 0 : (_data$applicationData93 = data.applicationData) === null || _data$applicationData93 === void 0 ? void 0 : _data$applicationData93.noOfToilets) || ""
|
|
1358
1400
|
};
|
|
1359
1401
|
if (modify) {
|
|
1360
|
-
var _data$
|
|
1402
|
+
var _data$applicationData94, _data$applicationData95, _data$applicationData96, _data$applicationData97, _data$applicationData98, _data$applicationData99, _data$applicationData100, _data$applicationData101, _data$applicationData102, _data$applicationData103, _data$applicationData104, _data$applicationData105, _data$applicationData106, _data$applicationData107, _data$applicationData108, _data$applicationData109, _data$applicationData110, _data$applicationData111, _data$applicationData112, _data$applicationData113, _data$applicationData114, _data$applicationData115, _data$applicationData116, _data$applicationData117, _data$applicationData118, _data$applicationData119, _data$applicationData120, _data$applicationData121, _data$applicationData122, _data$applicationData123, _data$applicationData124, _data$applicationData125;
|
|
1361
1403
|
const activationDetails = [{
|
|
1362
|
-
meterId: data !== null && data !== void 0 && (_data$
|
|
1363
|
-
meterInstallationDate: data !== null && data !== void 0 && (_data$
|
|
1364
|
-
meterInitialReading: data !== null && data !== void 0 && (_data$
|
|
1365
|
-
connectionExecutionDate: data !== null && data !== void 0 && (_data$
|
|
1404
|
+
meterId: data !== null && data !== void 0 && (_data$applicationData94 = data.applicationData) !== null && _data$applicationData94 !== void 0 && _data$applicationData94.meterId ? Number(data === null || data === void 0 ? void 0 : (_data$applicationData95 = data.applicationData) === null || _data$applicationData95 === void 0 ? void 0 : _data$applicationData95.meterId) : "",
|
|
1405
|
+
meterInstallationDate: data !== null && data !== void 0 && (_data$applicationData96 = data.applicationData) !== null && _data$applicationData96 !== void 0 && _data$applicationData96.meterInstallationDate ? convertEpochToDateDMY(data === null || data === void 0 ? void 0 : (_data$applicationData97 = data.applicationData) === null || _data$applicationData97 === void 0 ? void 0 : _data$applicationData97.meterInstallationDate, true) : null,
|
|
1406
|
+
meterInitialReading: data !== null && data !== void 0 && (_data$applicationData98 = data.applicationData) !== null && _data$applicationData98 !== void 0 && (_data$applicationData99 = _data$applicationData98.additionalDetails) !== null && _data$applicationData99 !== void 0 && _data$applicationData99.initialMeterReading ? Number(data === null || data === void 0 ? void 0 : (_data$applicationData100 = data.applicationData) === null || _data$applicationData100 === void 0 ? void 0 : (_data$applicationData101 = _data$applicationData100.additionalDetails) === null || _data$applicationData101 === void 0 ? void 0 : _data$applicationData101.initialMeterReading) : "",
|
|
1407
|
+
connectionExecutionDate: data !== null && data !== void 0 && (_data$applicationData102 = data.applicationData) !== null && _data$applicationData102 !== void 0 && _data$applicationData102.connectionExecutionDate ? convertEpochToDateDMY(data === null || data === void 0 ? void 0 : (_data$applicationData103 = data.applicationData) === null || _data$applicationData103 === void 0 ? void 0 : _data$applicationData103.connectionExecutionDate, true) : null
|
|
1366
1408
|
}];
|
|
1367
|
-
if (window.location.href.includes("modify-application-edit")) activationDetails[0].dateEffectiveFrom = data !== null && data !== void 0 && (_data$
|
|
1368
|
-
const _sourceSubDataValue = data !== null && data !== void 0 && (_data$
|
|
1409
|
+
if (window.location.href.includes("modify-application-edit")) activationDetails[0].dateEffectiveFrom = data !== null && data !== void 0 && (_data$applicationData104 = data.applicationData) !== null && _data$applicationData104 !== void 0 && _data$applicationData104.dateEffectiveFrom ? convertEpochToDateDMY(data === null || data === void 0 ? void 0 : (_data$applicationData105 = data.applicationData) === null || _data$applicationData105 === void 0 ? void 0 : _data$applicationData105.dateEffectiveFrom, true) : null;
|
|
1410
|
+
const _sourceSubDataValue = data !== null && data !== void 0 && (_data$applicationData106 = data.applicationData) !== null && _data$applicationData106 !== void 0 && _data$applicationData106.waterSource ? stringReplaceAll(data === null || data === void 0 ? void 0 : (_data$applicationData107 = data.applicationData) === null || _data$applicationData107 === void 0 ? void 0 : (_data$applicationData108 = _data$applicationData107.waterSource) === null || _data$applicationData108 === void 0 ? void 0 : _data$applicationData108.toUpperCase(), " ", "_") : "";
|
|
1369
1411
|
const _sourceSubDataFilter = _sourceSubDataValue ? stringReplaceAll(_sourceSubDataValue === null || _sourceSubDataValue === void 0 ? void 0 : _sourceSubDataValue.toUpperCase(), ".", "_") : "";
|
|
1370
1412
|
const _connectionDetails = serviceType === "WATER" ? {
|
|
1371
|
-
connectionType: data !== null && data !== void 0 && (_data$
|
|
1372
|
-
code: data === null || data === void 0 ? void 0 : (_data$
|
|
1373
|
-
i18nKey: t(`WS_CONNECTIONTYPE_${stringReplaceAll(data === null || data === void 0 ? void 0 : (_data$
|
|
1413
|
+
connectionType: data !== null && data !== void 0 && (_data$applicationData109 = data.applicationData) !== null && _data$applicationData109 !== void 0 && _data$applicationData109.connectionType ? {
|
|
1414
|
+
code: data === null || data === void 0 ? void 0 : (_data$applicationData110 = data.applicationData) === null || _data$applicationData110 === void 0 ? void 0 : _data$applicationData110.connectionType,
|
|
1415
|
+
i18nKey: t(`WS_CONNECTIONTYPE_${stringReplaceAll(data === null || data === void 0 ? void 0 : (_data$applicationData111 = data.applicationData) === null || _data$applicationData111 === void 0 ? void 0 : (_data$applicationData112 = _data$applicationData111.connectionType) === null || _data$applicationData112 === void 0 ? void 0 : _data$applicationData112.toUpperCase(), " ", "_")}`)
|
|
1374
1416
|
} : "",
|
|
1375
|
-
waterSource: data !== null && data !== void 0 && (_data$
|
|
1376
|
-
code: data === null || data === void 0 ? void 0 : (_data$
|
|
1377
|
-
i18nKey: t(`WS_SERVICES_MASTERS_WATERSOURCE_${stringReplaceAll(data === null || data === void 0 ? void 0 : (_data$
|
|
1417
|
+
waterSource: data !== null && data !== void 0 && (_data$applicationData113 = data.applicationData) !== null && _data$applicationData113 !== void 0 && _data$applicationData113.waterSource ? {
|
|
1418
|
+
code: data === null || data === void 0 ? void 0 : (_data$applicationData114 = data.applicationData) === null || _data$applicationData114 === void 0 ? void 0 : _data$applicationData114.waterSource,
|
|
1419
|
+
i18nKey: t(`WS_SERVICES_MASTERS_WATERSOURCE_${stringReplaceAll(data === null || data === void 0 ? void 0 : (_data$applicationData115 = data.applicationData) === null || _data$applicationData115 === void 0 ? void 0 : (_data$applicationData116 = _data$applicationData115.waterSource) === null || _data$applicationData116 === void 0 ? void 0 : (_data$applicationData117 = _data$applicationData116.split(".")[0]) === null || _data$applicationData117 === void 0 ? void 0 : _data$applicationData117.toUpperCase(), " ", "_")}`)
|
|
1378
1420
|
} : "",
|
|
1379
|
-
sourceSubData: data !== null && data !== void 0 && (_data$
|
|
1380
|
-
code: data === null || data === void 0 ? void 0 : (_data$
|
|
1421
|
+
sourceSubData: data !== null && data !== void 0 && (_data$applicationData118 = data.applicationData) !== null && _data$applicationData118 !== void 0 && _data$applicationData118.waterSource ? {
|
|
1422
|
+
code: data === null || data === void 0 ? void 0 : (_data$applicationData119 = data.applicationData) === null || _data$applicationData119 === void 0 ? void 0 : _data$applicationData119.waterSource,
|
|
1381
1423
|
i18nKey: t(`WS_SERVICES_MASTERS_WATERSOURCE_${_sourceSubDataFilter}`)
|
|
1382
1424
|
} : "",
|
|
1383
|
-
pipeSize: data !== null && data !== void 0 && (_data$
|
|
1384
|
-
code: data === null || data === void 0 ? void 0 : (_data$
|
|
1385
|
-
i18nKey: data === null || data === void 0 ? void 0 : (_data$
|
|
1425
|
+
pipeSize: data !== null && data !== void 0 && (_data$applicationData120 = data.applicationData) !== null && _data$applicationData120 !== void 0 && _data$applicationData120.pipeSize ? {
|
|
1426
|
+
code: data === null || data === void 0 ? void 0 : (_data$applicationData121 = data.applicationData) === null || _data$applicationData121 === void 0 ? void 0 : _data$applicationData121.pipeSize,
|
|
1427
|
+
i18nKey: data === null || data === void 0 ? void 0 : (_data$applicationData122 = data.applicationData) === null || _data$applicationData122 === void 0 ? void 0 : _data$applicationData122.pipeSize
|
|
1386
1428
|
} : "",
|
|
1387
|
-
noOfTaps: (data === null || data === void 0 ? void 0 : (_data$
|
|
1429
|
+
noOfTaps: (data === null || data === void 0 ? void 0 : (_data$applicationData123 = data.applicationData) === null || _data$applicationData123 === void 0 ? void 0 : _data$applicationData123.noOfTaps) || ""
|
|
1388
1430
|
} : {
|
|
1389
|
-
noOfWaterClosets: (data === null || data === void 0 ? void 0 : (_data$
|
|
1390
|
-
noOfToilets: (data === null || data === void 0 ? void 0 : (_data$
|
|
1431
|
+
noOfWaterClosets: (data === null || data === void 0 ? void 0 : (_data$applicationData124 = data.applicationData) === null || _data$applicationData124 === void 0 ? void 0 : _data$applicationData124.noOfWaterClosets) || "",
|
|
1432
|
+
noOfToilets: (data === null || data === void 0 ? void 0 : (_data$applicationData125 = data.applicationData) === null || _data$applicationData125 === void 0 ? void 0 : _data$applicationData125.noOfToilets) || ""
|
|
1391
1433
|
};
|
|
1392
1434
|
if (window.location.href.includes("modify-application-edit")) {
|
|
1393
1435
|
DocumentsRequired = {
|
|
@@ -1408,7 +1450,7 @@ const convertApplicationData = (data, serviceType, modify = false, editByConfig
|
|
|
1408
1450
|
InfoLabel: "InfoLabel"
|
|
1409
1451
|
};
|
|
1410
1452
|
} else {
|
|
1411
|
-
var _data$
|
|
1453
|
+
var _data$applicationData126, _data$applicationData127, _data$applicationData128, _data$applicationData129, _data$applicationData130, _data$applicationData131, _data$applicationData132, _data$applicationData133, _data$applicationData134, _data$applicationData135, _data$applicationData136, _data$applicationData137, _data$applicationData138, _data$applicationData139, _data$applicationData140, _data$applicationData141, _data$applicationData142;
|
|
1412
1454
|
payload = {
|
|
1413
1455
|
ConnectionDetails: ConnectionDetails,
|
|
1414
1456
|
ConnectionHolderDetails: ConnectionHolderDetails,
|
|
@@ -1417,16 +1459,16 @@ const convertApplicationData = (data, serviceType, modify = false, editByConfig
|
|
|
1417
1459
|
InfoLabel: "InfoLabel"
|
|
1418
1460
|
};
|
|
1419
1461
|
let plumberDetails = [{
|
|
1420
|
-
detailsProvidedBy: data !== null && data !== void 0 && (_data$
|
|
1421
|
-
i18nKey: data === null || data === void 0 ? void 0 : (_data$
|
|
1422
|
-
code: data === null || data === void 0 ? void 0 : (_data$
|
|
1423
|
-
size: data === null || data === void 0 ? void 0 : (_data$
|
|
1462
|
+
detailsProvidedBy: data !== null && data !== void 0 && (_data$applicationData126 = data.applicationData) !== null && _data$applicationData126 !== void 0 && (_data$applicationData127 = _data$applicationData126.additionalDetails) !== null && _data$applicationData127 !== void 0 && _data$applicationData127.detailsProvidedBy ? {
|
|
1463
|
+
i18nKey: data === null || data === void 0 ? void 0 : (_data$applicationData128 = data.applicationData) === null || _data$applicationData128 === void 0 ? void 0 : (_data$applicationData129 = _data$applicationData128.additionalDetails) === null || _data$applicationData129 === void 0 ? void 0 : _data$applicationData129.detailsProvidedBy,
|
|
1464
|
+
code: data === null || data === void 0 ? void 0 : (_data$applicationData130 = data.applicationData) === null || _data$applicationData130 === void 0 ? void 0 : (_data$applicationData131 = _data$applicationData130.additionalDetails) === null || _data$applicationData131 === void 0 ? void 0 : _data$applicationData131.detailsProvidedBy,
|
|
1465
|
+
size: data === null || data === void 0 ? void 0 : (_data$applicationData132 = data.applicationData) === null || _data$applicationData132 === void 0 ? void 0 : (_data$applicationData133 = _data$applicationData132.additionalDetails) === null || _data$applicationData133 === void 0 ? void 0 : _data$applicationData133.detailsProvidedBy
|
|
1424
1466
|
} : "",
|
|
1425
|
-
plumberName: data === null || data === void 0 ? void 0 : (_data$
|
|
1426
|
-
plumberMobileNo: data === null || data === void 0 ? void 0 : (_data$
|
|
1427
|
-
plumberLicenseNo: data === null || data === void 0 ? void 0 : (_data$
|
|
1467
|
+
plumberName: data === null || data === void 0 ? void 0 : (_data$applicationData134 = data.applicationData) === null || _data$applicationData134 === void 0 ? void 0 : (_data$applicationData135 = _data$applicationData134.plumberInfo) === null || _data$applicationData135 === void 0 ? void 0 : _data$applicationData135[0].name,
|
|
1468
|
+
plumberMobileNo: data === null || data === void 0 ? void 0 : (_data$applicationData136 = data.applicationData) === null || _data$applicationData136 === void 0 ? void 0 : (_data$applicationData137 = _data$applicationData136.plumberInfo) === null || _data$applicationData137 === void 0 ? void 0 : _data$applicationData137[0].mobileNumber,
|
|
1469
|
+
plumberLicenseNo: data === null || data === void 0 ? void 0 : (_data$applicationData138 = data.applicationData) === null || _data$applicationData138 === void 0 ? void 0 : (_data$applicationData139 = _data$applicationData138.plumberInfo) === null || _data$applicationData139 === void 0 ? void 0 : _data$applicationData139[0].licenseNo
|
|
1428
1470
|
}];
|
|
1429
|
-
let roadCuttingDetails = data !== null && data !== void 0 && (_data$
|
|
1471
|
+
let roadCuttingDetails = data !== null && data !== void 0 && (_data$applicationData140 = data.applicationData) !== null && _data$applicationData140 !== void 0 && _data$applicationData140.roadCuttingInfo ? data === null || data === void 0 ? void 0 : (_data$applicationData141 = data.applicationData) === null || _data$applicationData141 === void 0 ? void 0 : (_data$applicationData142 = _data$applicationData141.roadCuttingInfo) === null || _data$applicationData142 === void 0 ? void 0 : _data$applicationData142.map((rc, index) => {
|
|
1430
1472
|
return rc.id ? {
|
|
1431
1473
|
key: index + "_" + Date.now(),
|
|
1432
1474
|
id: rc === null || rc === void 0 ? void 0 : rc.id,
|
|
@@ -1466,30 +1508,33 @@ const convertApplicationData = (data, serviceType, modify = false, editByConfig
|
|
|
1466
1508
|
return payload;
|
|
1467
1509
|
};
|
|
1468
1510
|
const convertEditApplicationDetails = async (data, appData, actionData) => {
|
|
1469
|
-
var _data$
|
|
1470
|
-
data === null || data === void 0 ? void 0 : (_data$
|
|
1511
|
+
var _data$cpt30, _data$cpt30$details, _data$cpt30$details$o, _data$cpt31, _data$cpt31$details, _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$ConnectionHolde32, _data$ConnectionHolde33, _appData$applicationD, _appData$applicationD2, _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$ConnectionHolde49, _data$ConnectionHolde50, _data$ConnectionHolde51, _data$ConnectionHolde52, _data$ConnectionHolde53, _data$ConnectionHolde54, _data$ConnectionHolde55, _data$ConnectionHolde56, _data$ConnectionHolde57, _data$ConnectionHolde58, _data$ConnectionHolde59, _data$ConnectionHolde60, _data$cpt32, _data$DocumentsRequir;
|
|
1512
|
+
data === null || data === void 0 ? void 0 : (_data$cpt30 = data.cpt) === null || _data$cpt30 === void 0 ? void 0 : (_data$cpt30$details = _data$cpt30.details) === null || _data$cpt30$details === void 0 ? void 0 : (_data$cpt30$details$o = _data$cpt30$details.owners) === null || _data$cpt30$details$o === void 0 ? void 0 : _data$cpt30$details$o.forEach(owner => {
|
|
1471
1513
|
if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
|
|
1472
1514
|
});
|
|
1473
1515
|
let payload = {
|
|
1474
1516
|
...appData.applicationData,
|
|
1475
|
-
propertyId: data === null || data === void 0 ? void 0 : (_data$
|
|
1476
|
-
proposedTaps: (data === null || data === void 0 ? void 0 : (_data$
|
|
1477
|
-
proposedPipeSize: (data === null || data === void 0 ? void 0 : (_data$
|
|
1478
|
-
proposedWaterClosets: (data === null || data === void 0 ? void 0 : (_data$
|
|
1479
|
-
proposedToilets: (data === null || data === void 0 ? void 0 : (_data$
|
|
1480
|
-
connectionHolders: !(data !== null && data !== void 0 && (_data$
|
|
1517
|
+
propertyId: data === null || data === void 0 ? void 0 : (_data$cpt31 = data.cpt) === null || _data$cpt31 === void 0 ? void 0 : (_data$cpt31$details = _data$cpt31.details) === null || _data$cpt31$details === void 0 ? void 0 : _data$cpt31$details.propertyId,
|
|
1518
|
+
proposedTaps: (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) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai5 = data.ConnectionDetails) === null || _data$ConnectionDetai5 === void 0 ? void 0 : (_data$ConnectionDetai6 = _data$ConnectionDetai5[0]) === null || _data$ConnectionDetai6 === void 0 ? void 0 : _data$ConnectionDetai6.proposedTaps),
|
|
1519
|
+
proposedPipeSize: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai7 = data.ConnectionDetails) === null || _data$ConnectionDetai7 === void 0 ? void 0 : (_data$ConnectionDetai8 = _data$ConnectionDetai7[0]) === null || _data$ConnectionDetai8 === void 0 ? void 0 : (_data$ConnectionDetai9 = _data$ConnectionDetai8.proposedPipeSize) === null || _data$ConnectionDetai9 === void 0 ? void 0 : _data$ConnectionDetai9.size) && Number(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.proposedPipeSize) === null || _data$ConnectionDetai10 === void 0 ? void 0 : _data$ConnectionDetai10.size),
|
|
1520
|
+
proposedWaterClosets: (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) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai13 = data.ConnectionDetails) === null || _data$ConnectionDetai13 === void 0 ? void 0 : (_data$ConnectionDetai14 = _data$ConnectionDetai13[0]) === null || _data$ConnectionDetai14 === void 0 ? void 0 : _data$ConnectionDetai14.proposedWaterClosets),
|
|
1521
|
+
proposedToilets: (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) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai17 = data.ConnectionDetails) === null || _data$ConnectionDetai17 === void 0 ? void 0 : (_data$ConnectionDetai18 = _data$ConnectionDetai17[0]) === null || _data$ConnectionDetai18 === void 0 ? void 0 : _data$ConnectionDetai18.proposedToilets),
|
|
1522
|
+
connectionHolders: !(data !== null && data !== void 0 && (_data$ConnectionHolde32 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde32 !== void 0 && (_data$ConnectionHolde33 = _data$ConnectionHolde32[0]) !== null && _data$ConnectionHolde33 !== void 0 && _data$ConnectionHolde33.sameAsOwnerDetails) ? [{
|
|
1481
1523
|
...(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]),
|
|
1482
|
-
correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$
|
|
1483
|
-
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$
|
|
1484
|
-
gender: (data === null || data === void 0 ? void 0 : (_data$
|
|
1485
|
-
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$
|
|
1486
|
-
name: (data === null || data === void 0 ? void 0 : (_data$
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1524
|
+
correspondenceAddress: (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.address) || "",
|
|
1525
|
+
fatherOrHusbandName: (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.guardian) || "",
|
|
1526
|
+
gender: (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$ConnectionHolde40 = _data$ConnectionHolde39.gender) === null || _data$ConnectionHolde40 === void 0 ? void 0 : _data$ConnectionHolde40.code) || "",
|
|
1527
|
+
mobileNumber: (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$ConnectionHolde42.mobileNumber) || "",
|
|
1528
|
+
name: (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$ConnectionHolde44.name) || "",
|
|
1529
|
+
middleName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde45 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde45 === void 0 ? void 0 : (_data$ConnectionHolde46 = _data$ConnectionHolde45[0]) === null || _data$ConnectionHolde46 === void 0 ? void 0 : _data$ConnectionHolde46.middleName) || "",
|
|
1530
|
+
lastName: (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.lastName) || "",
|
|
1531
|
+
emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde49 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde49 === void 0 ? void 0 : (_data$ConnectionHolde50 = _data$ConnectionHolde49[0]) === null || _data$ConnectionHolde50 === void 0 ? void 0 : _data$ConnectionHolde50.emailId) || "",
|
|
1532
|
+
watsAppMobileNumber: (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.watsAppMobileNumber) || "",
|
|
1533
|
+
ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde53 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde53 === void 0 ? void 0 : (_data$ConnectionHolde54 = _data$ConnectionHolde53[0]) === null || _data$ConnectionHolde54 === void 0 ? void 0 : (_data$ConnectionHolde55 = _data$ConnectionHolde54.ownerType) === null || _data$ConnectionHolde55 === void 0 ? void 0 : _data$ConnectionHolde55.code) || "",
|
|
1534
|
+
relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde56 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde56 === void 0 ? void 0 : (_data$ConnectionHolde57 = _data$ConnectionHolde56[0]) === null || _data$ConnectionHolde57 === void 0 ? void 0 : (_data$ConnectionHolde58 = _data$ConnectionHolde57.relationship) === null || _data$ConnectionHolde58 === void 0 ? void 0 : _data$ConnectionHolde58.code) || "",
|
|
1535
|
+
sameAsPropertyAddress: 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.sameAsOwnerDetails
|
|
1491
1536
|
}] : null,
|
|
1492
|
-
property: data === null || data === void 0 ? void 0 : (_data$
|
|
1537
|
+
property: data === null || data === void 0 ? void 0 : (_data$cpt32 = data.cpt) === null || _data$cpt32 === void 0 ? void 0 : _data$cpt32.details,
|
|
1493
1538
|
processInstance: {
|
|
1494
1539
|
action: actionData ? actionData : "RESUBMIT_APPLICATION"
|
|
1495
1540
|
},
|
|
@@ -1499,17 +1544,17 @@ const convertEditApplicationDetails = async (data, appData, actionData) => {
|
|
|
1499
1544
|
return payload;
|
|
1500
1545
|
};
|
|
1501
1546
|
const convertDisonnectApplicationData = (data, serviceType, editByConfig = false, t) => {
|
|
1502
|
-
var _data$
|
|
1547
|
+
var _data$applicationData143, _data$applicationData144, _data$applicationData145, _data$applicationData146, _data$applicationData147, _data$applicationData148;
|
|
1503
1548
|
const temp = "TEMPORARY",
|
|
1504
1549
|
perm = "PERMANENT";
|
|
1505
1550
|
let disConnectionDetails = [{
|
|
1506
|
-
consumerNumber: data === null || data === void 0 ? void 0 : (_data$
|
|
1507
|
-
disConnectionType: data !== null && data !== void 0 && (_data$
|
|
1508
|
-
disConnectionReason: (data === null || data === void 0 ? void 0 : (_data$
|
|
1509
|
-
disConnectionProposeDate: data !== null && data !== void 0 && (_data$
|
|
1551
|
+
consumerNumber: data === null || data === void 0 ? void 0 : (_data$applicationData143 = data.applicationData) === null || _data$applicationData143 === void 0 ? void 0 : _data$applicationData143.applicationNo,
|
|
1552
|
+
disConnectionType: data !== null && data !== void 0 && (_data$applicationData144 = data.applicationData) !== null && _data$applicationData144 !== void 0 && _data$applicationData144.isDisconnectionTemporary ? temp : perm,
|
|
1553
|
+
disConnectionReason: (data === null || data === void 0 ? void 0 : (_data$applicationData145 = data.applicationData) === null || _data$applicationData145 === void 0 ? void 0 : _data$applicationData145.disconnectionReason) || "",
|
|
1554
|
+
disConnectionProposeDate: data !== null && data !== void 0 && (_data$applicationData146 = data.applicationData) !== null && _data$applicationData146 !== void 0 && _data$applicationData146.dateEffectiveFrom ? convertEpochToDateDMY(data === null || data === void 0 ? void 0 : (_data$applicationData147 = data.applicationData) === null || _data$applicationData147 === void 0 ? void 0 : _data$applicationData147.dateEffectiveFrom, true) : null
|
|
1510
1555
|
}];
|
|
1511
1556
|
let documents = [];
|
|
1512
|
-
if (data !== null && data !== void 0 && (_data$
|
|
1557
|
+
if (data !== null && data !== void 0 && (_data$applicationData148 = data.applicationData) !== null && _data$applicationData148 !== void 0 && _data$applicationData148.documents) {
|
|
1513
1558
|
data.applicationData.documents.forEach(data => {
|
|
1514
1559
|
var _data$documentType2;
|
|
1515
1560
|
documents.push({
|
|
@@ -1530,17 +1575,17 @@ const convertDisonnectApplicationData = (data, serviceType, editByConfig = false
|
|
|
1530
1575
|
payload.disConnectionDetails = disConnectionDetails;
|
|
1531
1576
|
payload.DocumentsRequired = DocumentsRequired;
|
|
1532
1577
|
if (editByConfig) {
|
|
1533
|
-
var _data$
|
|
1578
|
+
var _data$applicationData149, _data$applicationData150, _data$applicationData151, _data$applicationData152, _data$applicationData153, _data$applicationData154, _data$applicationData155, _data$applicationData156, _data$applicationData157, _data$applicationData158, _data$applicationData159, _data$applicationData160, _data$applicationData161, _data$applicationData162, _data$applicationData163;
|
|
1534
1579
|
let plumberDetails = [{
|
|
1535
|
-
detailsProvidedBy: data !== null && data !== void 0 && (_data$
|
|
1536
|
-
i18nKey: data === null || data === void 0 ? void 0 : (_data$
|
|
1537
|
-
code: data === null || data === void 0 ? void 0 : (_data$
|
|
1538
|
-
size: data === null || data === void 0 ? void 0 : (_data$
|
|
1580
|
+
detailsProvidedBy: data !== null && data !== void 0 && (_data$applicationData149 = data.applicationData) !== null && _data$applicationData149 !== void 0 && (_data$applicationData150 = _data$applicationData149.additionalDetails) !== null && _data$applicationData150 !== void 0 && _data$applicationData150.detailsProvidedBy ? {
|
|
1581
|
+
i18nKey: data === null || data === void 0 ? void 0 : (_data$applicationData151 = data.applicationData) === null || _data$applicationData151 === void 0 ? void 0 : (_data$applicationData152 = _data$applicationData151.additionalDetails) === null || _data$applicationData152 === void 0 ? void 0 : _data$applicationData152.detailsProvidedBy,
|
|
1582
|
+
code: data === null || data === void 0 ? void 0 : (_data$applicationData153 = data.applicationData) === null || _data$applicationData153 === void 0 ? void 0 : (_data$applicationData154 = _data$applicationData153.additionalDetails) === null || _data$applicationData154 === void 0 ? void 0 : _data$applicationData154.detailsProvidedBy,
|
|
1583
|
+
size: data === null || data === void 0 ? void 0 : (_data$applicationData155 = data.applicationData) === null || _data$applicationData155 === void 0 ? void 0 : (_data$applicationData156 = _data$applicationData155.additionalDetails) === null || _data$applicationData156 === void 0 ? void 0 : _data$applicationData156.detailsProvidedBy
|
|
1539
1584
|
} : "",
|
|
1540
|
-
plumberName: data === null || data === void 0 ? void 0 : (_data$
|
|
1541
|
-
plumberMobileNo: data === null || data === void 0 ? void 0 : (_data$
|
|
1542
|
-
plumberLicenseNo: data === null || data === void 0 ? void 0 : (_data$
|
|
1543
|
-
applicationNo: data === null || data === void 0 ? void 0 : (_data$
|
|
1585
|
+
plumberName: data === null || data === void 0 ? void 0 : (_data$applicationData157 = data.applicationData) === null || _data$applicationData157 === void 0 ? void 0 : (_data$applicationData158 = _data$applicationData157.plumberInfo) === null || _data$applicationData158 === void 0 ? void 0 : _data$applicationData158[0].name,
|
|
1586
|
+
plumberMobileNo: data === null || data === void 0 ? void 0 : (_data$applicationData159 = data.applicationData) === null || _data$applicationData159 === void 0 ? void 0 : (_data$applicationData160 = _data$applicationData159.plumberInfo) === null || _data$applicationData160 === void 0 ? void 0 : _data$applicationData160[0].mobileNumber,
|
|
1587
|
+
plumberLicenseNo: data === null || data === void 0 ? void 0 : (_data$applicationData161 = data.applicationData) === null || _data$applicationData161 === void 0 ? void 0 : (_data$applicationData162 = _data$applicationData161.plumberInfo) === null || _data$applicationData162 === void 0 ? void 0 : _data$applicationData162[0].licenseNo,
|
|
1588
|
+
applicationNo: data === null || data === void 0 ? void 0 : (_data$applicationData163 = data.applicationData) === null || _data$applicationData163 === void 0 ? void 0 : _data$applicationData163.applicationNo
|
|
1544
1589
|
}];
|
|
1545
1590
|
payload.plumberDetails = plumberDetails;
|
|
1546
1591
|
}
|
|
@@ -1610,14 +1655,14 @@ const getConvertedDate = async dateOfTime => {
|
|
|
1610
1655
|
return convertedDate;
|
|
1611
1656
|
};
|
|
1612
1657
|
const convertModifyApplicationDetails = async (data, appData, actionData = "INITIATE") => {
|
|
1613
|
-
var _data$
|
|
1614
|
-
data === null || data === void 0 ? void 0 : (_data$
|
|
1658
|
+
var _data$cpt33, _data$cpt33$details, _data$cpt33$details$o, _data$cpt34, _data$cpt34$details, _data$cpt35, _data$cpt35$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$ConnectionHolde61, _data$ConnectionHolde62, _data$DocumentsRequir6, _data$cpt36;
|
|
1659
|
+
data === null || data === void 0 ? void 0 : (_data$cpt33 = data.cpt) === null || _data$cpt33 === void 0 ? void 0 : (_data$cpt33$details = _data$cpt33.details) === null || _data$cpt33$details === void 0 ? void 0 : (_data$cpt33$details$o = _data$cpt33$details.owners) === null || _data$cpt33$details$o === void 0 ? void 0 : _data$cpt33$details$o.forEach(owner => {
|
|
1615
1660
|
if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
|
|
1616
1661
|
});
|
|
1617
1662
|
let formData = {
|
|
1618
1663
|
...appData.applicationData
|
|
1619
1664
|
};
|
|
1620
|
-
if (data !== null && data !== void 0 && (_data$
|
|
1665
|
+
if (data !== null && data !== void 0 && (_data$cpt34 = data.cpt) !== null && _data$cpt34 !== void 0 && (_data$cpt34$details = _data$cpt34.details) !== null && _data$cpt34$details !== void 0 && _data$cpt34$details.propertyId) formData.propertyId = data === null || data === void 0 ? void 0 : (_data$cpt35 = data.cpt) === null || _data$cpt35 === void 0 ? void 0 : (_data$cpt35$details = _data$cpt35.details) === null || _data$cpt35$details === void 0 ? void 0 : _data$cpt35$details.propertyId;
|
|
1621
1666
|
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;
|
|
1622
1667
|
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;
|
|
1623
1668
|
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;
|
|
@@ -1630,19 +1675,22 @@ const convertModifyApplicationDetails = async (data, appData, actionData = "INIT
|
|
|
1630
1675
|
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);
|
|
1631
1676
|
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);
|
|
1632
1677
|
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;
|
|
1633
|
-
if (!(data !== null && data !== void 0 && (_data$
|
|
1634
|
-
var _appData$applicationD8, _appData$applicationD9, _data$
|
|
1678
|
+
if (!(data !== null && data !== void 0 && (_data$ConnectionHolde61 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde61 !== void 0 && (_data$ConnectionHolde62 = _data$ConnectionHolde61[0]) !== null && _data$ConnectionHolde62 !== void 0 && _data$ConnectionHolde62.sameAsOwnerDetails)) {
|
|
1679
|
+
var _appData$applicationD8, _appData$applicationD9, _data$ConnectionHolde63, _data$ConnectionHolde64, _data$ConnectionHolde65, _data$ConnectionHolde66, _data$ConnectionHolde67, _data$ConnectionHolde68, _data$ConnectionHolde69, _data$ConnectionHolde70, _data$ConnectionHolde71, _data$ConnectionHolde72, _data$ConnectionHolde73, _data$ConnectionHolde74, _data$ConnectionHolde75, _data$ConnectionHolde76, _data$ConnectionHolde77, _data$ConnectionHolde78, _data$ConnectionHolde79, _data$ConnectionHolde80, _data$ConnectionHolde81, _data$ConnectionHolde82, _data$ConnectionHolde83, _data$ConnectionHolde84, _data$ConnectionHolde85, _data$ConnectionHolde86, _data$ConnectionHolde87, _data$ConnectionHolde88, _data$ConnectionHolde89;
|
|
1635
1680
|
formData.connectionHolders = [{
|
|
1636
1681
|
...(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]),
|
|
1637
|
-
correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$
|
|
1638
|
-
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$
|
|
1639
|
-
gender: (data === null || data === void 0 ? void 0 : (_data$
|
|
1640
|
-
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$
|
|
1641
|
-
name: (data === null || data === void 0 ? void 0 : (_data$
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1682
|
+
correspondenceAddress: (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$ConnectionHolde64.address) || "",
|
|
1683
|
+
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde65 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde65 === void 0 ? void 0 : (_data$ConnectionHolde66 = _data$ConnectionHolde65[0]) === null || _data$ConnectionHolde66 === void 0 ? void 0 : _data$ConnectionHolde66.guardian) || "",
|
|
1684
|
+
gender: (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.gender) === null || _data$ConnectionHolde69 === void 0 ? void 0 : _data$ConnectionHolde69.code) || "",
|
|
1685
|
+
mobileNumber: (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.mobileNumber) || "",
|
|
1686
|
+
name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde72 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde72 === void 0 ? void 0 : (_data$ConnectionHolde73 = _data$ConnectionHolde72[0]) === null || _data$ConnectionHolde73 === void 0 ? void 0 : _data$ConnectionHolde73.name) || "",
|
|
1687
|
+
middleName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde74 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde74 === void 0 ? void 0 : (_data$ConnectionHolde75 = _data$ConnectionHolde74[0]) === null || _data$ConnectionHolde75 === void 0 ? void 0 : _data$ConnectionHolde75.middleName) || "",
|
|
1688
|
+
lastName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde76 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde76 === void 0 ? void 0 : (_data$ConnectionHolde77 = _data$ConnectionHolde76[0]) === null || _data$ConnectionHolde77 === void 0 ? void 0 : _data$ConnectionHolde77.lastName) || "",
|
|
1689
|
+
emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde78 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde78 === void 0 ? void 0 : (_data$ConnectionHolde79 = _data$ConnectionHolde78[0]) === null || _data$ConnectionHolde79 === void 0 ? void 0 : _data$ConnectionHolde79.emailId) || "",
|
|
1690
|
+
watsAppMobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde80 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde80 === void 0 ? void 0 : (_data$ConnectionHolde81 = _data$ConnectionHolde80[0]) === null || _data$ConnectionHolde81 === void 0 ? void 0 : _data$ConnectionHolde81.watsAppMobileNumber) || "",
|
|
1691
|
+
ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde82 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde82 === void 0 ? void 0 : (_data$ConnectionHolde83 = _data$ConnectionHolde82[0]) === null || _data$ConnectionHolde83 === void 0 ? void 0 : (_data$ConnectionHolde84 = _data$ConnectionHolde83.ownerType) === null || _data$ConnectionHolde84 === void 0 ? void 0 : _data$ConnectionHolde84.code) || "",
|
|
1692
|
+
relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde85 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde85 === void 0 ? void 0 : (_data$ConnectionHolde86 = _data$ConnectionHolde85[0]) === null || _data$ConnectionHolde86 === void 0 ? void 0 : (_data$ConnectionHolde87 = _data$ConnectionHolde86.relationship) === null || _data$ConnectionHolde87 === void 0 ? void 0 : _data$ConnectionHolde87.code) || "",
|
|
1693
|
+
sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde88 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde88 === void 0 ? void 0 : (_data$ConnectionHolde89 = _data$ConnectionHolde88[0]) === null || _data$ConnectionHolde89 === void 0 ? void 0 : _data$ConnectionHolde89.sameAsOwnerDetails
|
|
1646
1694
|
}];
|
|
1647
1695
|
}
|
|
1648
1696
|
formData.processInstance = {
|
|
@@ -1651,7 +1699,7 @@ const convertModifyApplicationDetails = async (data, appData, actionData = "INIT
|
|
|
1651
1699
|
formData.action = actionData;
|
|
1652
1700
|
formData.channel = "CFC_COUNTER";
|
|
1653
1701
|
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) || []));
|
|
1654
|
-
sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$
|
|
1702
|
+
sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$cpt36 = data.cpt) === null || _data$cpt36 === void 0 ? void 0 : _data$cpt36.details));
|
|
1655
1703
|
return formData;
|
|
1656
1704
|
};
|
|
1657
1705
|
const downloadPdf = (blob, fileName) => {
|
|
@@ -9224,11 +9272,11 @@ const BILLSBreadCrumbs = ({
|
|
|
9224
9272
|
}, {
|
|
9225
9273
|
path: "/digit-ui/employee/module/details",
|
|
9226
9274
|
label: t("ES_TITLE_WATER_AND_SEWERAGE"),
|
|
9227
|
-
show: location.pathname.includes("/create-application") || location.pathname.includes("/new-application")
|
|
9275
|
+
show: location.pathname.includes("/create-application") || location.pathname.includes("/new-application") || location.pathname.includes("/old-application")
|
|
9228
9276
|
}, {
|
|
9229
9277
|
path: "/digit-ui/employee/ws/create-application",
|
|
9230
9278
|
label: t("ES_COMMON_WS_DOCUMENTS_REQUIRED"),
|
|
9231
|
-
show: location.pathname.includes("/create-application") || location.pathname.includes("/new-application"),
|
|
9279
|
+
show: location.pathname.includes("/create-application") || location.pathname.includes("/new-application") || location.pathname.includes("/old-application"),
|
|
9232
9280
|
rightContent: location.pathname.includes("/create-application") && /*#__PURE__*/React.createElement("div", {
|
|
9233
9281
|
className: "flex-center flex-gap-1 .cursorPointer",
|
|
9234
9282
|
onClick: printDiv
|
|
@@ -9284,6 +9332,10 @@ const BILLSBreadCrumbs = ({
|
|
|
9284
9332
|
path: "/digit-ui/employee/ws/new-application",
|
|
9285
9333
|
label: fromScreen ? `${t(fromScreen)} / ${t("ES_COMMON_WS_NEW_CONNECTION")}` : t("ES_COMMON_WS_NEW_CONNECTION"),
|
|
9286
9334
|
show: location.pathname.includes("/new-application") ? true : false
|
|
9335
|
+
}, {
|
|
9336
|
+
path: "/digit-ui/employee/ws/old-application",
|
|
9337
|
+
label: fromScreen ? `${t(fromScreen)} / ${t("ES_COMMON_WS_OLD_CONNECTION")}` : t("ES_COMMON_WS_OLD_CONNECTION"),
|
|
9338
|
+
show: location.pathname.includes("/old-application") ? true : false
|
|
9287
9339
|
}, {
|
|
9288
9340
|
path: `${location === null || location === void 0 ? void 0 : location.pathname}${location.search}`,
|
|
9289
9341
|
label: t("ACTION_TEST_RESPONSE"),
|
|
@@ -9444,7 +9496,7 @@ const BILLSBreadCrumbs = ({
|
|
|
9444
9496
|
const App$1 = ({
|
|
9445
9497
|
path
|
|
9446
9498
|
}) => {
|
|
9447
|
-
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;
|
|
9499
|
+
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, _Digit27, _Digit27$ComponentReg, _Digit28, _Digit28$ComponentReg;
|
|
9448
9500
|
const location = useLocation();
|
|
9449
9501
|
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");
|
|
9450
9502
|
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");
|
|
@@ -9474,6 +9526,8 @@ const App$1 = ({
|
|
|
9474
9526
|
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");
|
|
9475
9527
|
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");
|
|
9476
9528
|
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");
|
|
9529
|
+
const CPTCreateProperty = (_Digit27 = Digit) === null || _Digit27 === void 0 ? void 0 : (_Digit27$ComponentReg = _Digit27.ComponentRegistryService) === null || _Digit27$ComponentReg === void 0 ? void 0 : _Digit27$ComponentReg.getComponent("CPTCreateProperty");
|
|
9530
|
+
const CPTAcknowledgement = (_Digit28 = Digit) === null || _Digit28 === void 0 ? void 0 : (_Digit28$ComponentReg = _Digit28.ComponentRegistryService) === null || _Digit28$ComponentReg === void 0 ? void 0 : _Digit28$ComponentReg.getComponent("CPTAcknowledgement");
|
|
9477
9531
|
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");
|
|
9478
9532
|
const locationCheckReqDocs = window.location.href.includes("/employee/ws/create-application") || window.location.href.includes("/employee/ws/new-disconnection/docsrequired");
|
|
9479
9533
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -9487,6 +9541,24 @@ const App$1 = ({
|
|
|
9487
9541
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9488
9542
|
className: "employee-form-content"
|
|
9489
9543
|
}, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
9544
|
+
path: `${path}/create-application/create-property/save-property`,
|
|
9545
|
+
component: props => {
|
|
9546
|
+
const redirectUrl = new URLSearchParams(props.location.search).get("redirectToUrl");
|
|
9547
|
+
return /*#__PURE__*/React.createElement(CPTAcknowledgement, Object.assign({}, props, {
|
|
9548
|
+
redirectUrl: redirectUrl
|
|
9549
|
+
}));
|
|
9550
|
+
}
|
|
9551
|
+
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
9552
|
+
path: `${path}/create-application/create-property`,
|
|
9553
|
+
component: props => {
|
|
9554
|
+
const redirectUrl = new URLSearchParams(props.location.search).get("redirectToUrl");
|
|
9555
|
+
return /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
9556
|
+
layoutClass: "action"
|
|
9557
|
+
}, /*#__PURE__*/React.createElement(CPTCreateProperty, Object.assign({}, props, {
|
|
9558
|
+
redirectUrl: redirectUrl
|
|
9559
|
+
})));
|
|
9560
|
+
}
|
|
9561
|
+
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
9490
9562
|
path: `${path}/create-application`,
|
|
9491
9563
|
component: WSDocsRequired
|
|
9492
9564
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
@@ -9494,7 +9566,11 @@ const App$1 = ({
|
|
|
9494
9566
|
component: WSNewApplication
|
|
9495
9567
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
9496
9568
|
path: `${path}/old-application`,
|
|
9497
|
-
component:
|
|
9569
|
+
component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
9570
|
+
layoutClass: "action"
|
|
9571
|
+
}, /*#__PURE__*/React.createElement(WSOLDApplication, {
|
|
9572
|
+
path
|
|
9573
|
+
}))
|
|
9498
9574
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
9499
9575
|
path: `${path}/edit-application`,
|
|
9500
9576
|
component: WSEditApplication
|
|
@@ -10967,7 +11043,42 @@ const createConnectionDetails = () => ({
|
|
|
10967
11043
|
proposedPipeSize: "",
|
|
10968
11044
|
proposedTaps: "",
|
|
10969
11045
|
proposedToilets: "",
|
|
10970
|
-
proposedWaterClosets: ""
|
|
11046
|
+
proposedWaterClosets: "",
|
|
11047
|
+
serviceType: {
|
|
11048
|
+
code: "WATER",
|
|
11049
|
+
i18nKey: "WS_APPLICATION_TYPE_WATER"
|
|
11050
|
+
},
|
|
11051
|
+
categoryType: {
|
|
11052
|
+
code: "DOMESTIC",
|
|
11053
|
+
i18nKey: "WS_CATEGORY_DOMESTIC"
|
|
11054
|
+
},
|
|
11055
|
+
connectionType: {
|
|
11056
|
+
code: "Permanent",
|
|
11057
|
+
i18nKey: "WS_CONNECTION_Permanent"
|
|
11058
|
+
},
|
|
11059
|
+
temporaryType: {
|
|
11060
|
+
code: "Exhibition",
|
|
11061
|
+
i18nKey: "Exhibition"
|
|
11062
|
+
},
|
|
11063
|
+
waterDemandType: {
|
|
11064
|
+
code: "BULK",
|
|
11065
|
+
i18nKey: "WS_WATER_DEMAND_BULK"
|
|
11066
|
+
},
|
|
11067
|
+
applicantType: {
|
|
11068
|
+
code: "OWNER",
|
|
11069
|
+
i18nKey: "WS_APPLICANT_OWNER"
|
|
11070
|
+
},
|
|
11071
|
+
domesticType: {
|
|
11072
|
+
i18nKey: "WS_DOMESTIC_TYPE_DOMESTIC",
|
|
11073
|
+
code: "INDIVIDUAL"
|
|
11074
|
+
},
|
|
11075
|
+
departmentType: {
|
|
11076
|
+
i18nKey: "WS_DEPARTMENT_TYPE_GOVERNMENT",
|
|
11077
|
+
code: "GOVERNMENT"
|
|
11078
|
+
},
|
|
11079
|
+
institutionName: "",
|
|
11080
|
+
natureOfWork: "",
|
|
11081
|
+
orgDeptDocument: ""
|
|
10971
11082
|
});
|
|
10972
11083
|
const WSConnectionDetails = ({
|
|
10973
11084
|
config,
|
|
@@ -10997,11 +11108,20 @@ const WSConnectionDetails = ({
|
|
|
10997
11108
|
water: true,
|
|
10998
11109
|
sewerage: false
|
|
10999
11110
|
});
|
|
11000
|
-
const [
|
|
11111
|
+
const [applicationTypeList, setApplicationTypeList] = useState([]);
|
|
11112
|
+
const [categoryTypeList, setCategoryTypeList] = useState([]);
|
|
11113
|
+
const [connectionTypeList, setConnectionTypeList] = useState([]);
|
|
11114
|
+
const [waterDemandTypeList, setWaterDemandTypeList] = useState([]);
|
|
11115
|
+
const [applicantTypeList, setApplicantTypeList] = useState([]);
|
|
11116
|
+
const [temporaryTypeList, setTemporaryTypeList] = useState([]);
|
|
11117
|
+
const [institutionTypeList, setInstitutionTypeList] = useState([]);
|
|
11001
11118
|
const {
|
|
11002
|
-
|
|
11003
|
-
data:
|
|
11004
|
-
} = Digit.Hooks.ws.useMDMS(tenantId, "ws-services-
|
|
11119
|
+
isWSServicesMastersLoading,
|
|
11120
|
+
data: wsServicesMastersData
|
|
11121
|
+
} = Digit.Hooks.ws.useMDMS(tenantId, "ws-services-masters", ["ApplicationType", "WsCategoryType", "connectionCategory", "WSWaterDemandType", "ApplicantType", "TemporaryConnectionType"]);
|
|
11122
|
+
const {
|
|
11123
|
+
data: commonMastersData
|
|
11124
|
+
} = Digit.Hooks.ws.useMDMS(tenantId, "common-masters", ["InstitutionType"]);
|
|
11005
11125
|
useEffect(() => {
|
|
11006
11126
|
const data = connectionDetails.map(e => {
|
|
11007
11127
|
return e;
|
|
@@ -11009,11 +11129,33 @@ const WSConnectionDetails = ({
|
|
|
11009
11129
|
onSelect(config === null || config === void 0 ? void 0 : config.key, data);
|
|
11010
11130
|
}, [connectionDetails]);
|
|
11011
11131
|
useEffect(() => {
|
|
11012
|
-
var
|
|
11013
|
-
|
|
11014
|
-
list === null ||
|
|
11015
|
-
|
|
11016
|
-
|
|
11132
|
+
var _wsServicesMastersDat, _list, _wsServicesMastersDat2, _wsServicesMastersDat3, _wsServicesMastersDat4, _wsServicesMastersDat5, _wsServicesMastersDat6;
|
|
11133
|
+
let list = (wsServicesMastersData === null || wsServicesMastersData === void 0 ? void 0 : (_wsServicesMastersDat = wsServicesMastersData["ws-services-masters"]) === null || _wsServicesMastersDat === void 0 ? void 0 : _wsServicesMastersDat.ApplicationType) || [];
|
|
11134
|
+
list = list.filter(data => (data === null || data === void 0 ? void 0 : data.active) !== false && (data === null || data === void 0 ? void 0 : data.active) !== "false");
|
|
11135
|
+
(_list = list) === null || _list === void 0 ? void 0 : _list.forEach(data => data.i18nKey = `WS_APPLICATION_TYPE_${data.code}`);
|
|
11136
|
+
setApplicationTypeList(list);
|
|
11137
|
+
const categories = (wsServicesMastersData === null || wsServicesMastersData === void 0 ? void 0 : (_wsServicesMastersDat2 = wsServicesMastersData["ws-services-masters"]) === null || _wsServicesMastersDat2 === void 0 ? void 0 : _wsServicesMastersDat2.WsCategoryType) || [];
|
|
11138
|
+
categories.forEach(data => data.i18nKey = data.i18nKey || `WS_CATEGORY_${data.code}`);
|
|
11139
|
+
setCategoryTypeList(categories);
|
|
11140
|
+
const connections = (wsServicesMastersData === null || wsServicesMastersData === void 0 ? void 0 : (_wsServicesMastersDat3 = wsServicesMastersData["ws-services-masters"]) === null || _wsServicesMastersDat3 === void 0 ? void 0 : _wsServicesMastersDat3.connectionCategory) || [];
|
|
11141
|
+
connections.forEach(data => data.i18nKey = data.i18nKey || `WS_CONNECTION_${data.code}`);
|
|
11142
|
+
setConnectionTypeList(connections);
|
|
11143
|
+
const demands = (wsServicesMastersData === null || wsServicesMastersData === void 0 ? void 0 : (_wsServicesMastersDat4 = wsServicesMastersData["ws-services-masters"]) === null || _wsServicesMastersDat4 === void 0 ? void 0 : _wsServicesMastersDat4.WSWaterDemandType) || [];
|
|
11144
|
+
demands.forEach(data => data.i18nKey = data.i18nKey || `WS_WATER_DEMAND_${data.code}`);
|
|
11145
|
+
setWaterDemandTypeList(demands);
|
|
11146
|
+
const applicants = (wsServicesMastersData === null || wsServicesMastersData === void 0 ? void 0 : (_wsServicesMastersDat5 = wsServicesMastersData["ws-services-masters"]) === null || _wsServicesMastersDat5 === void 0 ? void 0 : _wsServicesMastersDat5.ApplicantType) || [];
|
|
11147
|
+
applicants.forEach(data => data.i18nKey = data.i18nKey || `WS_APPLICANT_${data.code}`);
|
|
11148
|
+
setApplicantTypeList(applicants);
|
|
11149
|
+
const tempTypes = (wsServicesMastersData === null || wsServicesMastersData === void 0 ? void 0 : (_wsServicesMastersDat6 = wsServicesMastersData["ws-services-masters"]) === null || _wsServicesMastersDat6 === void 0 ? void 0 : _wsServicesMastersDat6.TemporaryConnectionType) || [];
|
|
11150
|
+
tempTypes.forEach(data => data.i18nKey = data.name || data.code);
|
|
11151
|
+
setTemporaryTypeList(tempTypes);
|
|
11152
|
+
}, [wsServicesMastersData]);
|
|
11153
|
+
useEffect(() => {
|
|
11154
|
+
var _commonMastersData$co;
|
|
11155
|
+
const instTypes = (commonMastersData === null || commonMastersData === void 0 ? void 0 : (_commonMastersData$co = commonMastersData["common-masters"]) === null || _commonMastersData$co === void 0 ? void 0 : _commonMastersData$co.InstitutionType) || [];
|
|
11156
|
+
instTypes.forEach(data => data.i18nKey = `COMMON_MASTERS_INSTITUTION_${data.code}`);
|
|
11157
|
+
setInstitutionTypeList(instTypes);
|
|
11158
|
+
}, [commonMastersData]);
|
|
11017
11159
|
useEffect(() => {
|
|
11018
11160
|
var _connectionDetails$, _connectionDetails$2;
|
|
11019
11161
|
if (userType === "employee") {
|
|
@@ -11033,7 +11175,6 @@ const WSConnectionDetails = ({
|
|
|
11033
11175
|
setConnectionDetails([createConnectionDetails()]);
|
|
11034
11176
|
}
|
|
11035
11177
|
}, [formData === null || formData === void 0 ? void 0 : formData.ConnectionDetails]);
|
|
11036
|
-
if (isWSServicesCalculationLoading) return /*#__PURE__*/React.createElement(Loader, null);
|
|
11037
11178
|
const commonProps = {
|
|
11038
11179
|
focusIndex,
|
|
11039
11180
|
connectionDetails,
|
|
@@ -11047,9 +11188,14 @@ const WSConnectionDetails = ({
|
|
|
11047
11188
|
setConnectionDetails,
|
|
11048
11189
|
setIsErrors,
|
|
11049
11190
|
isErrors,
|
|
11050
|
-
pipeSizeList,
|
|
11051
|
-
wsServicesCalculationData,
|
|
11052
11191
|
waterSewarageSelection,
|
|
11192
|
+
applicationTypeList,
|
|
11193
|
+
categoryTypeList,
|
|
11194
|
+
connectionTypeList,
|
|
11195
|
+
waterDemandTypeList,
|
|
11196
|
+
applicantTypeList,
|
|
11197
|
+
temporaryTypeList,
|
|
11198
|
+
institutionTypeList,
|
|
11053
11199
|
formData
|
|
11054
11200
|
};
|
|
11055
11201
|
return /*#__PURE__*/React.createElement(React.Fragment, null, connectionDetails.map((connectionDetail, index) => connectionDetail && /*#__PURE__*/React.createElement(ConnectionDetails, Object.assign({
|
|
@@ -11059,7 +11205,7 @@ const WSConnectionDetails = ({
|
|
|
11059
11205
|
}, commonProps))));
|
|
11060
11206
|
};
|
|
11061
11207
|
const ConnectionDetails = _props => {
|
|
11062
|
-
var _formData$DocumentsRe,
|
|
11208
|
+
var _formData$DocumentsRe, _formValue$connection, _formValue$categoryTy, _formValue$categoryTy2, _formValue$domesticTy;
|
|
11063
11209
|
const {
|
|
11064
11210
|
connectionDetail,
|
|
11065
11211
|
focusIndex,
|
|
@@ -11073,10 +11219,14 @@ const ConnectionDetails = _props => {
|
|
|
11073
11219
|
isErrors,
|
|
11074
11220
|
connectionTypeList,
|
|
11075
11221
|
setConnectionDetails,
|
|
11076
|
-
wsServicesCalculationData,
|
|
11077
|
-
pipeSizeList,
|
|
11078
11222
|
connectionDetails,
|
|
11079
11223
|
waterSewarageSelection,
|
|
11224
|
+
applicationTypeList,
|
|
11225
|
+
categoryTypeList,
|
|
11226
|
+
waterDemandTypeList,
|
|
11227
|
+
applicantTypeList,
|
|
11228
|
+
temporaryTypeList,
|
|
11229
|
+
institutionTypeList,
|
|
11080
11230
|
formData
|
|
11081
11231
|
} = _props;
|
|
11082
11232
|
const {
|
|
@@ -11088,11 +11238,110 @@ const ConnectionDetails = _props => {
|
|
|
11088
11238
|
setValue,
|
|
11089
11239
|
trigger,
|
|
11090
11240
|
getValues
|
|
11091
|
-
} = useForm(
|
|
11241
|
+
} = useForm({
|
|
11242
|
+
defaultValues: {
|
|
11243
|
+
serviceType: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.serviceType) || {
|
|
11244
|
+
code: "WATER",
|
|
11245
|
+
i18nKey: "WS_APPLICATION_TYPE_WATER"
|
|
11246
|
+
},
|
|
11247
|
+
categoryType: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.categoryType) || {
|
|
11248
|
+
code: "DOMESTIC",
|
|
11249
|
+
i18nKey: "WS_CATEGORY_DOMESTIC"
|
|
11250
|
+
},
|
|
11251
|
+
connectionType: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.connectionType) || {
|
|
11252
|
+
code: "Permanent",
|
|
11253
|
+
i18nKey: "WS_CONNECTION_Permanent"
|
|
11254
|
+
},
|
|
11255
|
+
temporaryType: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.temporaryType) || {
|
|
11256
|
+
code: "Exhibition",
|
|
11257
|
+
i18nKey: "Exhibition"
|
|
11258
|
+
},
|
|
11259
|
+
waterDemandType: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.waterDemandType) || {
|
|
11260
|
+
code: "BULK",
|
|
11261
|
+
i18nKey: "WS_WATER_DEMAND_BULK"
|
|
11262
|
+
},
|
|
11263
|
+
applicantType: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.applicantType) || {
|
|
11264
|
+
code: "OWNER",
|
|
11265
|
+
i18nKey: "WS_APPLICANT_OWNER"
|
|
11266
|
+
},
|
|
11267
|
+
domesticType: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.domesticType) || {
|
|
11268
|
+
i18nKey: "WS_DOMESTIC_TYPE_DOMESTIC",
|
|
11269
|
+
code: "INDIVIDUAL"
|
|
11270
|
+
},
|
|
11271
|
+
departmentType: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.departmentType) || {
|
|
11272
|
+
i18nKey: "WS_DEPARTMENT_TYPE_GOVERNMENT",
|
|
11273
|
+
code: "GOVERNMENT"
|
|
11274
|
+
},
|
|
11275
|
+
institutionName: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.institutionName) || "",
|
|
11276
|
+
natureOfWork: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.natureOfWork) || "",
|
|
11277
|
+
orgDeptDocument: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocument) || ""
|
|
11278
|
+
}
|
|
11279
|
+
});
|
|
11092
11280
|
const formValue = watch();
|
|
11093
11281
|
const {
|
|
11094
11282
|
errors
|
|
11095
11283
|
} = localFormState;
|
|
11284
|
+
const [uploadedFile, setUploadedFile] = useState((connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocument) || null);
|
|
11285
|
+
const [file, setFile] = useState(null);
|
|
11286
|
+
const [fileUploadError, setFileUploadError] = useState(null);
|
|
11287
|
+
const [showDocModal, setShowDocModal] = useState(false);
|
|
11288
|
+
const [docFileUrl, setDocFileUrl] = useState("");
|
|
11289
|
+
const [docFileType, setDocFileType] = useState("");
|
|
11290
|
+
const handleSelectFile = e => {
|
|
11291
|
+
var _e$target$files;
|
|
11292
|
+
const selectedFile = (_e$target$files = e.target.files) === null || _e$target$files === void 0 ? void 0 : _e$target$files[0];
|
|
11293
|
+
if (selectedFile) {
|
|
11294
|
+
if (selectedFile.size >= 5242880) {
|
|
11295
|
+
setFileUploadError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED") || "Maximum file size exceeded (5MB)");
|
|
11296
|
+
} else {
|
|
11297
|
+
setFile(selectedFile);
|
|
11298
|
+
setFileUploadError(null);
|
|
11299
|
+
}
|
|
11300
|
+
}
|
|
11301
|
+
};
|
|
11302
|
+
useEffect(() => {
|
|
11303
|
+
(async () => {
|
|
11304
|
+
if (file) {
|
|
11305
|
+
try {
|
|
11306
|
+
var _response$data, _response$data$files;
|
|
11307
|
+
const response = await Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId());
|
|
11308
|
+
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
11309
|
+
var _response$data2, _response$data2$files;
|
|
11310
|
+
const fsId = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId;
|
|
11311
|
+
setUploadedFile(fsId);
|
|
11312
|
+
setValue("orgDeptDocument", fsId);
|
|
11313
|
+
} else {
|
|
11314
|
+
setFileUploadError(t("CS_FILE_UPLOAD_ERROR") || "File Upload Error");
|
|
11315
|
+
}
|
|
11316
|
+
} catch (err) {
|
|
11317
|
+
setFileUploadError(t("CS_FILE_UPLOAD_ERROR") || "File Upload Error");
|
|
11318
|
+
}
|
|
11319
|
+
}
|
|
11320
|
+
})();
|
|
11321
|
+
}, [file]);
|
|
11322
|
+
const viewDocument = async () => {
|
|
11323
|
+
if (uploadedFile) {
|
|
11324
|
+
try {
|
|
11325
|
+
const res = await Digit.UploadServices.FileFetchbyid(uploadedFile, Digit.ULBService.getStateId());
|
|
11326
|
+
if (res !== null && res !== void 0 && res.data) {
|
|
11327
|
+
const blob = res.data instanceof Blob ? res.data : new Blob([res.data], {
|
|
11328
|
+
type: res.headers["content-type"] || res.headers["Content-Type"] || "image/jpeg"
|
|
11329
|
+
});
|
|
11330
|
+
const fileURL = URL.createObjectURL(blob);
|
|
11331
|
+
setDocFileUrl(fileURL);
|
|
11332
|
+
const contentType = res.headers["content-type"] || res.headers["Content-Type"] || "";
|
|
11333
|
+
if (contentType.toLowerCase().includes("pdf")) {
|
|
11334
|
+
setDocFileType("pdf");
|
|
11335
|
+
} else {
|
|
11336
|
+
setDocFileType("image");
|
|
11337
|
+
}
|
|
11338
|
+
setShowDocModal(true);
|
|
11339
|
+
}
|
|
11340
|
+
} catch (err) {
|
|
11341
|
+
console.error("Failed to fetch file URL via FileFetchbyid", err);
|
|
11342
|
+
}
|
|
11343
|
+
}
|
|
11344
|
+
};
|
|
11096
11345
|
useEffect(() => {
|
|
11097
11346
|
trigger();
|
|
11098
11347
|
}, []);
|
|
@@ -11111,6 +11360,7 @@ const ConnectionDetails = _props => {
|
|
|
11111
11360
|
});
|
|
11112
11361
|
if (isErrorsFound) setIsErrors(true);
|
|
11113
11362
|
let ob = [{
|
|
11363
|
+
...connectionDetail,
|
|
11114
11364
|
...formValue
|
|
11115
11365
|
}];
|
|
11116
11366
|
setConnectionDetails(ob);
|
|
@@ -11155,154 +11405,149 @@ const ConnectionDetails = _props => {
|
|
|
11155
11405
|
clearErrors(config.key);
|
|
11156
11406
|
}
|
|
11157
11407
|
}, [errors]);
|
|
11158
|
-
const errorStyle = {
|
|
11159
|
-
width: "70%",
|
|
11160
|
-
marginLeft: "30%",
|
|
11161
|
-
fontSize: "12px",
|
|
11162
|
-
marginTop: "-21px"
|
|
11163
|
-
};
|
|
11164
11408
|
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
11165
11409
|
const isEmployee = window.location.href.includes("/employee");
|
|
11166
|
-
return /*#__PURE__*/React.createElement(
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11410
|
+
return /*#__PURE__*/React.createElement(CollapsibleCardPage, {
|
|
11411
|
+
title: t("WS_CONNECTION_DETAILS"),
|
|
11412
|
+
defaultOpen: true
|
|
11413
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11170
11414
|
className: "formcomposer-section-grid"
|
|
11171
|
-
}, /*#__PURE__*/React.createElement(
|
|
11172
|
-
style: {
|
|
11173
|
-
fontWeight: "700"
|
|
11174
|
-
}
|
|
11175
|
-
}, `${t("WS_APPLY_FOR")}*`), /*#__PURE__*/React.createElement("div", {
|
|
11176
|
-
style: {
|
|
11177
|
-
display: "flex",
|
|
11178
|
-
gap: "0 3rem"
|
|
11179
|
-
}
|
|
11180
|
-
}, /*#__PURE__*/React.createElement(Controller, {
|
|
11415
|
+
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_SERVICE_TYPE")}*`), /*#__PURE__*/React.createElement(Controller, {
|
|
11181
11416
|
control: control,
|
|
11182
|
-
name: "
|
|
11183
|
-
defaultValue: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.
|
|
11417
|
+
name: "serviceType",
|
|
11418
|
+
defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.serviceType) || "",
|
|
11419
|
+
rules: {
|
|
11420
|
+
required: t("REQUIRED_FIELD")
|
|
11421
|
+
},
|
|
11184
11422
|
isMandatory: true,
|
|
11185
11423
|
render: props => {
|
|
11186
|
-
var _errors$
|
|
11187
|
-
return /*#__PURE__*/React.createElement(
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
|
|
11194
|
-
|
|
11195
|
-
setFocusIndex({
|
|
11196
|
-
index: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.key,
|
|
11197
|
-
type: "water"
|
|
11198
|
-
});
|
|
11199
|
-
}
|
|
11200
|
-
},
|
|
11201
|
-
checked: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.water,
|
|
11202
|
-
style: {
|
|
11203
|
-
paddingBottom: "10px",
|
|
11204
|
-
paddingTop: "3px"
|
|
11424
|
+
var _errors$serviceType;
|
|
11425
|
+
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
11426
|
+
className: "form-field",
|
|
11427
|
+
selected: getValues("serviceType"),
|
|
11428
|
+
disable: false,
|
|
11429
|
+
option: applicationTypeList,
|
|
11430
|
+
errorStyle: localFormState.touched.serviceType && errors !== null && errors !== void 0 && (_errors$serviceType = errors.serviceType) !== null && _errors$serviceType !== void 0 && _errors$serviceType.message ? true : false,
|
|
11431
|
+
select: e => {
|
|
11432
|
+
props.onChange(e);
|
|
11205
11433
|
},
|
|
11206
|
-
|
|
11434
|
+
optionKey: "i18nKey",
|
|
11435
|
+
onBlur: props.onBlur,
|
|
11436
|
+
t: t
|
|
11207
11437
|
});
|
|
11208
11438
|
}
|
|
11209
|
-
}), /*#__PURE__*/React.createElement(Controller, {
|
|
11439
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_CATEGORY_TYPE")}*`), /*#__PURE__*/React.createElement(Controller, {
|
|
11210
11440
|
control: control,
|
|
11211
|
-
name: "
|
|
11212
|
-
defaultValue: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.
|
|
11213
|
-
|
|
11441
|
+
name: "categoryType",
|
|
11442
|
+
defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.categoryType) || "",
|
|
11443
|
+
rules: {
|
|
11444
|
+
required: t("REQUIRED_FIELD")
|
|
11445
|
+
},
|
|
11214
11446
|
isMandatory: true,
|
|
11215
11447
|
render: props => {
|
|
11216
|
-
var _errors$
|
|
11217
|
-
return /*#__PURE__*/React.createElement(
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
|
|
11225
|
-
setFocusIndex({
|
|
11226
|
-
index: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.key,
|
|
11227
|
-
type: "sewerage"
|
|
11228
|
-
});
|
|
11229
|
-
}
|
|
11230
|
-
},
|
|
11231
|
-
checked: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.sewerage,
|
|
11232
|
-
style: {
|
|
11233
|
-
paddingBottom: "10px",
|
|
11234
|
-
paddingTop: "3px"
|
|
11448
|
+
var _errors$categoryType;
|
|
11449
|
+
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
11450
|
+
className: "form-field",
|
|
11451
|
+
selected: getValues("categoryType"),
|
|
11452
|
+
disable: false,
|
|
11453
|
+
option: categoryTypeList,
|
|
11454
|
+
errorStyle: localFormState.touched.categoryType && errors !== null && errors !== void 0 && (_errors$categoryType = errors.categoryType) !== null && _errors$categoryType !== void 0 && _errors$categoryType.message ? true : false,
|
|
11455
|
+
select: e => {
|
|
11456
|
+
props.onChange(e);
|
|
11235
11457
|
},
|
|
11236
|
-
|
|
11458
|
+
optionKey: "i18nKey",
|
|
11459
|
+
onBlur: props.onBlur,
|
|
11460
|
+
t: t
|
|
11237
11461
|
});
|
|
11238
11462
|
}
|
|
11239
|
-
}))
|
|
11240
|
-
style: isMobile && isEmployee ? {
|
|
11241
|
-
fontWeight: "700",
|
|
11242
|
-
width: "100%"
|
|
11243
|
-
} : {
|
|
11244
|
-
fontWeight: "700"
|
|
11245
|
-
},
|
|
11246
|
-
className: "card-label-smaller"
|
|
11247
|
-
}, `${t("WS_NO_OF_PROPOSED_TAPS_LABEL")}*`), /*#__PURE__*/React.createElement("div", {
|
|
11248
|
-
className: "field"
|
|
11249
|
-
}, /*#__PURE__*/React.createElement(Controller, {
|
|
11463
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_CONNECTION_TYPE")}*`), /*#__PURE__*/React.createElement(Controller, {
|
|
11250
11464
|
control: control,
|
|
11251
|
-
name: "
|
|
11252
|
-
defaultValue: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.
|
|
11465
|
+
name: "connectionType",
|
|
11466
|
+
defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.connectionType) || "",
|
|
11253
11467
|
rules: {
|
|
11254
|
-
validate: e => parseInt(e) > 0 && e && getPattern("WSOnlyNumbers").test(e) || !e ? true : t("ERR_DEFAULT_INPUT_FIELD_MSG"),
|
|
11255
11468
|
required: t("REQUIRED_FIELD")
|
|
11256
11469
|
},
|
|
11257
|
-
type: "number",
|
|
11258
11470
|
isMandatory: true,
|
|
11259
11471
|
render: props => {
|
|
11260
|
-
var _errors$
|
|
11261
|
-
return /*#__PURE__*/React.createElement(
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
|
|
11268
|
-
|
|
11269
|
-
index: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.key,
|
|
11270
|
-
type: "proposedTaps"
|
|
11271
|
-
});
|
|
11472
|
+
var _errors$connectionTyp;
|
|
11473
|
+
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
11474
|
+
className: "form-field",
|
|
11475
|
+
selected: getValues("connectionType"),
|
|
11476
|
+
disable: false,
|
|
11477
|
+
option: connectionTypeList,
|
|
11478
|
+
errorStyle: localFormState.touched.connectionType && errors !== null && errors !== void 0 && (_errors$connectionTyp = errors.connectionType) !== null && _errors$connectionTyp !== void 0 && _errors$connectionTyp.message ? true : false,
|
|
11479
|
+
select: e => {
|
|
11480
|
+
props.onChange(e);
|
|
11272
11481
|
},
|
|
11273
|
-
|
|
11274
|
-
|
|
11482
|
+
optionKey: "i18nKey",
|
|
11483
|
+
onBlur: props.onBlur,
|
|
11484
|
+
t: t
|
|
11485
|
+
});
|
|
11486
|
+
}
|
|
11487
|
+
})), (formValue === null || formValue === void 0 ? void 0 : (_formValue$connection = formValue.connectionType) === null || _formValue$connection === void 0 ? void 0 : _formValue$connection.code) === "Temporary" && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_TEMPORARY_TYPE")}*`), /*#__PURE__*/React.createElement(Controller, {
|
|
11488
|
+
control: control,
|
|
11489
|
+
name: "temporaryType",
|
|
11490
|
+
defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.temporaryType) || "",
|
|
11491
|
+
rules: {
|
|
11492
|
+
required: t("REQUIRED_FIELD")
|
|
11493
|
+
},
|
|
11494
|
+
isMandatory: true,
|
|
11495
|
+
render: props => {
|
|
11496
|
+
var _errors$temporaryType;
|
|
11497
|
+
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
11498
|
+
className: "form-field",
|
|
11499
|
+
selected: getValues("temporaryType"),
|
|
11500
|
+
disable: false,
|
|
11501
|
+
option: temporaryTypeList,
|
|
11502
|
+
errorStyle: localFormState.touched.temporaryType && errors !== null && errors !== void 0 && (_errors$temporaryType = errors.temporaryType) !== null && _errors$temporaryType !== void 0 && _errors$temporaryType.message ? true : false,
|
|
11503
|
+
select: e => {
|
|
11504
|
+
props.onChange(e);
|
|
11275
11505
|
},
|
|
11276
|
-
|
|
11506
|
+
optionKey: "i18nKey",
|
|
11507
|
+
onBlur: props.onBlur,
|
|
11508
|
+
t: t
|
|
11277
11509
|
});
|
|
11278
11510
|
}
|
|
11279
|
-
}))
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
paddingTop: "10px"
|
|
11286
|
-
} : {
|
|
11287
|
-
fontWeight: "700"
|
|
11511
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_WATER_DEMAND_TYPE")}*`), /*#__PURE__*/React.createElement(Controller, {
|
|
11512
|
+
control: control,
|
|
11513
|
+
name: "waterDemandType",
|
|
11514
|
+
defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.waterDemandType) || "",
|
|
11515
|
+
rules: {
|
|
11516
|
+
required: t("REQUIRED_FIELD")
|
|
11288
11517
|
},
|
|
11289
|
-
|
|
11290
|
-
|
|
11518
|
+
isMandatory: true,
|
|
11519
|
+
render: props => {
|
|
11520
|
+
var _errors$waterDemandTy;
|
|
11521
|
+
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
11522
|
+
className: "form-field",
|
|
11523
|
+
selected: getValues("waterDemandType"),
|
|
11524
|
+
disable: false,
|
|
11525
|
+
option: waterDemandTypeList,
|
|
11526
|
+
errorStyle: localFormState.touched.waterDemandType && errors !== null && errors !== void 0 && (_errors$waterDemandTy = errors.waterDemandType) !== null && _errors$waterDemandTy !== void 0 && _errors$waterDemandTy.message ? true : false,
|
|
11527
|
+
select: e => {
|
|
11528
|
+
props.onChange(e);
|
|
11529
|
+
},
|
|
11530
|
+
optionKey: "i18nKey",
|
|
11531
|
+
onBlur: props.onBlur,
|
|
11532
|
+
t: t
|
|
11533
|
+
});
|
|
11534
|
+
}
|
|
11535
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_APPLICANT_TYPE")}*`), /*#__PURE__*/React.createElement(Controller, {
|
|
11291
11536
|
control: control,
|
|
11292
|
-
name: "
|
|
11293
|
-
defaultValue: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.
|
|
11537
|
+
name: "applicantType",
|
|
11538
|
+
defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.applicantType) || "",
|
|
11294
11539
|
rules: {
|
|
11295
11540
|
required: t("REQUIRED_FIELD")
|
|
11296
11541
|
},
|
|
11297
11542
|
isMandatory: true,
|
|
11298
11543
|
render: props => {
|
|
11299
|
-
var _errors$
|
|
11544
|
+
var _errors$applicantType;
|
|
11300
11545
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
11301
11546
|
className: "form-field",
|
|
11302
|
-
selected: getValues("
|
|
11547
|
+
selected: getValues("applicantType"),
|
|
11303
11548
|
disable: false,
|
|
11304
|
-
option:
|
|
11305
|
-
errorStyle: localFormState.touched.
|
|
11549
|
+
option: applicantTypeList,
|
|
11550
|
+
errorStyle: localFormState.touched.applicantType && errors !== null && errors !== void 0 && (_errors$applicantType = errors.applicantType) !== null && _errors$applicantType !== void 0 && _errors$applicantType.message ? true : false,
|
|
11306
11551
|
select: e => {
|
|
11307
11552
|
props.onChange(e);
|
|
11308
11553
|
},
|
|
@@ -11311,93 +11556,230 @@ const ConnectionDetails = _props => {
|
|
|
11311
11556
|
t: t
|
|
11312
11557
|
});
|
|
11313
11558
|
}
|
|
11314
|
-
})),
|
|
11315
|
-
|
|
11316
|
-
},
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
|
|
11320
|
-
|
|
11321
|
-
|
|
11559
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${(formValue === null || formValue === void 0 ? void 0 : (_formValue$categoryTy = formValue.categoryType) === null || _formValue$categoryTy === void 0 ? void 0 : _formValue$categoryTy.code) === "NON_DOMESTIC" || (formValue === null || formValue === void 0 ? void 0 : (_formValue$categoryTy2 = formValue.categoryType) === null || _formValue$categoryTy2 === void 0 ? void 0 : _formValue$categoryTy2.name) === "Non-Domestic" ? t("WS_NON_DOMESTIC_TYPE") : t("WS_DOMESTIC_TYPE")}*`), /*#__PURE__*/React.createElement("div", {
|
|
11560
|
+
className: "field"
|
|
11561
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
11562
|
+
control: control,
|
|
11563
|
+
name: "domesticType",
|
|
11564
|
+
defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.domesticType) || "",
|
|
11565
|
+
rules: {
|
|
11566
|
+
required: t("REQUIRED_FIELD")
|
|
11322
11567
|
},
|
|
11323
|
-
|
|
11324
|
-
|
|
11568
|
+
isMandatory: true,
|
|
11569
|
+
render: props => /*#__PURE__*/React.createElement(RadioButtons, {
|
|
11570
|
+
className: "form-field",
|
|
11571
|
+
style: {
|
|
11572
|
+
display: "flex",
|
|
11573
|
+
gap: "2rem",
|
|
11574
|
+
alignItems: "center"
|
|
11575
|
+
},
|
|
11576
|
+
options: [{
|
|
11577
|
+
i18nKey: "WS_DOMESTIC_TYPE_DOMESTIC",
|
|
11578
|
+
code: "INDIVIDUAL"
|
|
11579
|
+
}, {
|
|
11580
|
+
i18nKey: "WS_DOMESTIC_TYPE_NON_DOMESTIC",
|
|
11581
|
+
code: "ORGANIZATION"
|
|
11582
|
+
}],
|
|
11583
|
+
optionsKey: "i18nKey",
|
|
11584
|
+
selectedOption: getValues("domesticType"),
|
|
11585
|
+
onSelect: e => {
|
|
11586
|
+
props.onChange(e);
|
|
11587
|
+
},
|
|
11588
|
+
t: t,
|
|
11589
|
+
isDependent: true
|
|
11590
|
+
})
|
|
11591
|
+
}))), (formValue === null || formValue === void 0 ? void 0 : (_formValue$domesticTy = formValue.domesticType) === null || _formValue$domesticTy === void 0 ? void 0 : _formValue$domesticTy.code) === "ORGANIZATION" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_DEPARTMENT_TYPE")}*`), /*#__PURE__*/React.createElement("div", {
|
|
11325
11592
|
className: "field"
|
|
11326
11593
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
11327
11594
|
control: control,
|
|
11328
|
-
name: "
|
|
11329
|
-
defaultValue: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.
|
|
11595
|
+
name: "departmentType",
|
|
11596
|
+
defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.departmentType) || {
|
|
11597
|
+
i18nKey: "WS_DEPARTMENT_TYPE_GOVERNMENT",
|
|
11598
|
+
code: "GOVERNMENT"
|
|
11599
|
+
},
|
|
11600
|
+
rules: {
|
|
11601
|
+
required: t("REQUIRED_FIELD")
|
|
11602
|
+
},
|
|
11603
|
+
isMandatory: true,
|
|
11604
|
+
render: props => /*#__PURE__*/React.createElement(RadioButtons, {
|
|
11605
|
+
className: "form-field",
|
|
11606
|
+
style: {
|
|
11607
|
+
display: "flex",
|
|
11608
|
+
gap: "2rem",
|
|
11609
|
+
alignItems: "center"
|
|
11610
|
+
},
|
|
11611
|
+
options: [{
|
|
11612
|
+
i18nKey: "WS_DEPARTMENT_TYPE_GOVERNMENT",
|
|
11613
|
+
code: "GOVERNMENT"
|
|
11614
|
+
}, {
|
|
11615
|
+
i18nKey: "WS_DEPARTMENT_TYPE_NON_GOVERNMENT",
|
|
11616
|
+
code: "NON_GOVERNMENT"
|
|
11617
|
+
}],
|
|
11618
|
+
optionsKey: "i18nKey",
|
|
11619
|
+
selectedOption: getValues("departmentType"),
|
|
11620
|
+
onSelect: e => {
|
|
11621
|
+
props.onChange(e);
|
|
11622
|
+
},
|
|
11623
|
+
t: t,
|
|
11624
|
+
isDependent: true
|
|
11625
|
+
})
|
|
11626
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
11627
|
+
style: {
|
|
11628
|
+
color: "#3257F2",
|
|
11629
|
+
fontWeight: "700",
|
|
11630
|
+
fontSize: "1.5rem",
|
|
11631
|
+
gridColumn: "span 2"
|
|
11632
|
+
}
|
|
11633
|
+
}, t("WS_DEPARTMENT_ORGANIZATION_DETAILS")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_ORGANIZATION_DEPARTMENT_NAME")}*`), /*#__PURE__*/React.createElement("div", {
|
|
11634
|
+
className: "field"
|
|
11635
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
11636
|
+
control: control,
|
|
11637
|
+
name: "institutionName",
|
|
11638
|
+
defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.institutionName) || "",
|
|
11330
11639
|
rules: {
|
|
11331
|
-
validate: e => parseInt(e) > 0 && e && getPattern("WSOnlyNumbers").test(e) || !e ? true : t("ERR_DEFAULT_INPUT_FIELD_MSG"),
|
|
11332
11640
|
required: t("REQUIRED_FIELD")
|
|
11333
11641
|
},
|
|
11334
|
-
type: "number",
|
|
11335
11642
|
isMandatory: true,
|
|
11336
11643
|
render: props => {
|
|
11337
|
-
var _errors$
|
|
11644
|
+
var _errors$institutionNa;
|
|
11338
11645
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
11339
|
-
type: "number",
|
|
11340
11646
|
value: props.value,
|
|
11341
|
-
|
|
11342
|
-
|
|
11647
|
+
placeholder: t("WS_ORGANIZATION_DEPARTMENT_NAME_PLACEHOLDER"),
|
|
11648
|
+
autoFocus: focusIndex.index === (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.key) && focusIndex.type === "institutionName",
|
|
11649
|
+
errorStyle: localFormState.touched.institutionName && errors !== null && errors !== void 0 && (_errors$institutionNa = errors.institutionName) !== null && _errors$institutionNa !== void 0 && _errors$institutionNa.message ? true : false,
|
|
11343
11650
|
onChange: e => {
|
|
11344
11651
|
props.onChange(e.target.value);
|
|
11345
11652
|
setFocusIndex({
|
|
11346
11653
|
index: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.key,
|
|
11347
|
-
type: "
|
|
11654
|
+
type: "institutionName"
|
|
11348
11655
|
});
|
|
11349
11656
|
},
|
|
11350
|
-
labelStyle: {
|
|
11351
|
-
marginTop: "unset"
|
|
11352
|
-
},
|
|
11353
11657
|
onBlur: props.onBlur
|
|
11354
11658
|
});
|
|
11355
11659
|
}
|
|
11356
|
-
}))), /*#__PURE__*/React.createElement(
|
|
11357
|
-
style: errorStyle
|
|
11358
|
-
}, localFormState.touched.proposedWaterClosets ? errors === null || errors === void 0 ? void 0 : (_errors$proposedWater2 = errors.proposedWaterClosets) === null || _errors$proposedWater2 === void 0 ? void 0 : _errors$proposedWater2.message : ""), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
11359
|
-
style: isMobile && isEmployee ? {
|
|
11360
|
-
fontWeight: "700",
|
|
11361
|
-
width: "100%"
|
|
11362
|
-
} : {
|
|
11363
|
-
fontWeight: "700"
|
|
11364
|
-
},
|
|
11365
|
-
className: "card-label-smaller"
|
|
11366
|
-
}, `${t("WS_PROPOSED_WATER_TOILETS_LABEL")}*`), /*#__PURE__*/React.createElement("div", {
|
|
11660
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_NATURE_OF_WORK")}*`), /*#__PURE__*/React.createElement("div", {
|
|
11367
11661
|
className: "field"
|
|
11368
11662
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
11369
11663
|
control: control,
|
|
11370
|
-
name: "
|
|
11371
|
-
defaultValue: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.
|
|
11664
|
+
name: "natureOfWork",
|
|
11665
|
+
defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.natureOfWork) || "",
|
|
11372
11666
|
rules: {
|
|
11373
|
-
validate: e => parseInt(e) > 0 && e && getPattern("WSOnlyNumbers").test(e) || !e ? true : t("ERR_DEFAULT_INPUT_FIELD_MSG"),
|
|
11374
11667
|
required: t("REQUIRED_FIELD")
|
|
11375
11668
|
},
|
|
11376
|
-
type: "number",
|
|
11377
11669
|
isMandatory: true,
|
|
11378
11670
|
render: props => {
|
|
11379
|
-
var _errors$
|
|
11671
|
+
var _errors$natureOfWork;
|
|
11380
11672
|
return /*#__PURE__*/React.createElement(TextInput, {
|
|
11381
|
-
type: "number",
|
|
11382
11673
|
value: props.value,
|
|
11383
|
-
|
|
11384
|
-
|
|
11674
|
+
placeholder: t("WS_NATURE_OF_WORK_PLACEHOLDER"),
|
|
11675
|
+
autoFocus: focusIndex.index === (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.key) && focusIndex.type === "natureOfWork",
|
|
11676
|
+
errorStyle: localFormState.touched.natureOfWork && errors !== null && errors !== void 0 && (_errors$natureOfWork = errors.natureOfWork) !== null && _errors$natureOfWork !== void 0 && _errors$natureOfWork.message ? true : false,
|
|
11385
11677
|
onChange: e => {
|
|
11386
11678
|
props.onChange(e.target.value);
|
|
11387
11679
|
setFocusIndex({
|
|
11388
11680
|
index: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.key,
|
|
11389
|
-
type: "
|
|
11681
|
+
type: "natureOfWork"
|
|
11390
11682
|
});
|
|
11391
11683
|
},
|
|
11392
|
-
labelStyle: {
|
|
11393
|
-
marginTop: "unset"
|
|
11394
|
-
},
|
|
11395
11684
|
onBlur: props.onBlur
|
|
11396
11685
|
});
|
|
11397
11686
|
}
|
|
11398
|
-
}))), /*#__PURE__*/React.createElement(
|
|
11399
|
-
|
|
11400
|
-
|
|
11687
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_ORG_DEPT_DOCUMENT")}*`), /*#__PURE__*/React.createElement("div", {
|
|
11688
|
+
className: "field",
|
|
11689
|
+
style: {
|
|
11690
|
+
display: "flex",
|
|
11691
|
+
gap: "10px",
|
|
11692
|
+
alignItems: "center"
|
|
11693
|
+
}
|
|
11694
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11695
|
+
style: {
|
|
11696
|
+
flex: 1
|
|
11697
|
+
}
|
|
11698
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
11699
|
+
control: control,
|
|
11700
|
+
name: "orgDeptDocument",
|
|
11701
|
+
defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocument) || "",
|
|
11702
|
+
rules: {
|
|
11703
|
+
required: t("REQUIRED_FIELD")
|
|
11704
|
+
},
|
|
11705
|
+
isMandatory: true,
|
|
11706
|
+
render: props => /*#__PURE__*/React.createElement(UploadFile, {
|
|
11707
|
+
id: "orgDeptDocument",
|
|
11708
|
+
onUpload: handleSelectFile,
|
|
11709
|
+
onDelete: () => {
|
|
11710
|
+
setUploadedFile(null);
|
|
11711
|
+
setFile(null);
|
|
11712
|
+
props.onChange(null);
|
|
11713
|
+
},
|
|
11714
|
+
message: uploadedFile ? `1 ${t("WS_ACTION_FILEUPLOADED")}` : t("WS_ACTION_NO_FILEUPLOADED"),
|
|
11715
|
+
accept: "image/*, .pdf"
|
|
11716
|
+
})
|
|
11717
|
+
})), uploadedFile && /*#__PURE__*/React.createElement("div", {
|
|
11718
|
+
onClick: viewDocument,
|
|
11719
|
+
style: {
|
|
11720
|
+
cursor: "pointer"
|
|
11721
|
+
}
|
|
11722
|
+
}, /*#__PURE__*/React.createElement(ViewsIcon, null)))), fileUploadError && /*#__PURE__*/React.createElement("div", {
|
|
11723
|
+
style: {
|
|
11724
|
+
color: "red",
|
|
11725
|
+
fontSize: "12px",
|
|
11726
|
+
marginTop: "4px"
|
|
11727
|
+
}
|
|
11728
|
+
}, fileUploadError))), showDocModal && /*#__PURE__*/React.createElement(Modal, {
|
|
11729
|
+
open: showDocModal,
|
|
11730
|
+
headerBarMain: t("WS_VIEW_DOCUMENT") || "View Document",
|
|
11731
|
+
headerBarEnd: /*#__PURE__*/React.createElement("div", {
|
|
11732
|
+
className: "icon-bg-secondary",
|
|
11733
|
+
onClick: () => setShowDocModal(false),
|
|
11734
|
+
style: {
|
|
11735
|
+
cursor: "pointer",
|
|
11736
|
+
padding: "5px"
|
|
11737
|
+
}
|
|
11738
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
11739
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11740
|
+
viewBox: "0 0 24 24",
|
|
11741
|
+
fill: "#FFFFFF",
|
|
11742
|
+
width: "24",
|
|
11743
|
+
height: "24"
|
|
11744
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
11745
|
+
d: "M0 0h24v24H0V0z",
|
|
11746
|
+
fill: "none"
|
|
11747
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
11748
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
11749
|
+
}))),
|
|
11750
|
+
center: true,
|
|
11751
|
+
actionCancelOnSubmit: () => setShowDocModal(false),
|
|
11752
|
+
actionCancelLabel: t("CS_COMMON_CLOSE") || "Close",
|
|
11753
|
+
popupStyles: {
|
|
11754
|
+
width: "80%",
|
|
11755
|
+
maxWidth: "800px"
|
|
11756
|
+
}
|
|
11757
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11758
|
+
style: {
|
|
11759
|
+
display: "flex",
|
|
11760
|
+
justifyContent: "center",
|
|
11761
|
+
alignItems: "center",
|
|
11762
|
+
padding: "20px",
|
|
11763
|
+
minHeight: "300px"
|
|
11764
|
+
}
|
|
11765
|
+
}, docFileType === "pdf" ? /*#__PURE__*/React.createElement("iframe", {
|
|
11766
|
+
src: docFileUrl,
|
|
11767
|
+
title: "Document Preview",
|
|
11768
|
+
width: "100%",
|
|
11769
|
+
height: "500px",
|
|
11770
|
+
style: {
|
|
11771
|
+
border: "none"
|
|
11772
|
+
}
|
|
11773
|
+
}) : /*#__PURE__*/React.createElement("img", {
|
|
11774
|
+
src: docFileUrl,
|
|
11775
|
+
alt: "Document Preview",
|
|
11776
|
+
style: {
|
|
11777
|
+
maxWidth: "100%",
|
|
11778
|
+
maxHeight: "500px",
|
|
11779
|
+
objectFit: "contain",
|
|
11780
|
+
borderRadius: "4px"
|
|
11781
|
+
}
|
|
11782
|
+
}))));
|
|
11401
11783
|
};
|
|
11402
11784
|
|
|
11403
11785
|
const WSDocumentsRequired = () => {
|
|
@@ -11749,7 +12131,6 @@ const WSPropertyDetails = ({
|
|
|
11749
12131
|
clearErrors
|
|
11750
12132
|
}) => {
|
|
11751
12133
|
var _Digit$SessionStorage, _formData$cptId, _formData$cptId2, _propertyDetails$Prop2, _propertyDetails$Prop3, _propertyDetails$Prop4;
|
|
11752
|
-
const redirectBackUrl = `/digit-ui/${userType}/ws/new-application`;
|
|
11753
12134
|
const [propertyId, setPropertyId] = React.useState("");
|
|
11754
12135
|
const tenantId = (_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code;
|
|
11755
12136
|
const {
|
|
@@ -11811,7 +12192,7 @@ const WSPropertyDetails = ({
|
|
|
11811
12192
|
type: "button",
|
|
11812
12193
|
onClick: () => setPropertyId(propertyId)
|
|
11813
12194
|
}, `${t("PT_SEARCH")}`))), /*#__PURE__*/React.createElement(Link, {
|
|
11814
|
-
to: `/digit-ui/${userType}/commonpt/search
|
|
12195
|
+
to: `/digit-ui/${userType}/commonpt/search`
|
|
11815
12196
|
}, /*#__PURE__*/React.createElement(LinkButton, {
|
|
11816
12197
|
label: t("CPT_SEARCH_PROPERTY"),
|
|
11817
12198
|
style: {
|
|
@@ -11819,20 +12200,14 @@ const WSPropertyDetails = ({
|
|
|
11819
12200
|
display: "inline-block"
|
|
11820
12201
|
}
|
|
11821
12202
|
})), "\xA0 | \xA0", /*#__PURE__*/React.createElement(Link, {
|
|
11822
|
-
to: `/digit-ui/${userType}/commonpt/new-application
|
|
12203
|
+
to: `/digit-ui/${userType}/commonpt/new-application`
|
|
11823
12204
|
}, /*#__PURE__*/React.createElement(LinkButton, {
|
|
11824
12205
|
label: t("CPT_CREATE_PROPERTY"),
|
|
11825
12206
|
style: {
|
|
11826
12207
|
color: "#a82227",
|
|
11827
12208
|
display: "inline-block"
|
|
11828
12209
|
}
|
|
11829
|
-
})), propertyDetails && (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties.length) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
11830
|
-
className: "card-section-header",
|
|
11831
|
-
style: {
|
|
11832
|
-
marginBottom: 0,
|
|
11833
|
-
marginTop: "20px"
|
|
11834
|
-
}
|
|
11835
|
-
}, t("PT_DETAILS")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12210
|
+
})), propertyDetails && (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties.length) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
11836
12211
|
className: "card-label-smaller"
|
|
11837
12212
|
}, `${t(`PROPERTY_ID`)}`), /*#__PURE__*/React.createElement("div", {
|
|
11838
12213
|
className: "field"
|
|
@@ -11857,6 +12232,8 @@ const WSPropertyDetails = ({
|
|
|
11857
12232
|
const createConnectionHolderDetails = () => ({
|
|
11858
12233
|
sameAsOwnerDetails: true,
|
|
11859
12234
|
name: "",
|
|
12235
|
+
middleName: "",
|
|
12236
|
+
lastName: "",
|
|
11860
12237
|
gender: "",
|
|
11861
12238
|
mobileNumber: "",
|
|
11862
12239
|
guardian: "",
|
|
@@ -11866,7 +12243,9 @@ const createConnectionHolderDetails = () => ({
|
|
|
11866
12243
|
documentId: "",
|
|
11867
12244
|
documentType: "",
|
|
11868
12245
|
file: "",
|
|
11869
|
-
emailId: ""
|
|
12246
|
+
emailId: "",
|
|
12247
|
+
watsAppMobileNumber: "",
|
|
12248
|
+
isWatsappSameAsMobile: false
|
|
11870
12249
|
});
|
|
11871
12250
|
const WSConnectionHolderDetails = ({
|
|
11872
12251
|
config,
|
|
@@ -12007,7 +12386,7 @@ const WSConnectionHolderDetails = ({
|
|
|
12007
12386
|
}, commonProps))));
|
|
12008
12387
|
};
|
|
12009
12388
|
const ConnectionDetails$1 = _props => {
|
|
12010
|
-
var _errors$name2, _errors$name3, _errors$
|
|
12389
|
+
var _errors$name2, _errors$name3, _errors$middleName2, _errors$middleName3, _errors$lastName2, _errors$lastName3, _errors$gender2, _errors$gender3, _errors$guardian2, _errors$guardian3, _errors$relationship2, _errors$relationship3, _errors$mobileNumber2, _errors$mobileNumber3, _errors$watsAppMobile2, _errors$watsAppMobile3, _errors$emailId2, _errors$emailId3;
|
|
12011
12390
|
const {
|
|
12012
12391
|
connectionHolderDetail,
|
|
12013
12392
|
focusIndex,
|
|
@@ -12037,6 +12416,8 @@ const ConnectionDetails$1 = _props => {
|
|
|
12037
12416
|
getValues
|
|
12038
12417
|
} = useForm();
|
|
12039
12418
|
const [name, setName] = useState(connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.name);
|
|
12419
|
+
const [middleName, setMiddleName] = useState(connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.middleName);
|
|
12420
|
+
const [lastName, setLastName] = useState(connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.lastName);
|
|
12040
12421
|
const [gender, setGender] = useState(connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.gender);
|
|
12041
12422
|
const [mobileNumber, setMobileNumber] = useState(connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.mobileNumber);
|
|
12042
12423
|
const [guardian, setGuardian] = useState(connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.guardian);
|
|
@@ -12046,8 +12427,12 @@ const ConnectionDetails$1 = _props => {
|
|
|
12046
12427
|
const [sameAsOwnerDetails, setSameAsOwnerDetails] = useState(connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.sameAsOwnerDetails);
|
|
12047
12428
|
const [uuid, setuuid] = useState(connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.uuid);
|
|
12048
12429
|
const [emailId, setEmailId] = useState(connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.emailId);
|
|
12430
|
+
const [watsAppMobileNumber, setWatsAppMobileNumber] = useState(connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.watsAppMobileNumber);
|
|
12431
|
+
const [isWatsappSameAsMobile, setIsWatsappSameAsMobile] = useState((connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.isWatsappSameAsMobile) || false);
|
|
12049
12432
|
const formValue = {
|
|
12050
12433
|
name,
|
|
12434
|
+
middleName,
|
|
12435
|
+
lastName,
|
|
12051
12436
|
gender,
|
|
12052
12437
|
mobileNumber,
|
|
12053
12438
|
guardian,
|
|
@@ -12056,7 +12441,9 @@ const ConnectionDetails$1 = _props => {
|
|
|
12056
12441
|
sameAsOwnerDetails,
|
|
12057
12442
|
address,
|
|
12058
12443
|
uuid,
|
|
12059
|
-
emailId
|
|
12444
|
+
emailId,
|
|
12445
|
+
watsAppMobileNumber,
|
|
12446
|
+
isWatsappSameAsMobile
|
|
12060
12447
|
};
|
|
12061
12448
|
const {
|
|
12062
12449
|
errors
|
|
@@ -12175,37 +12562,12 @@ const ConnectionDetails$1 = _props => {
|
|
|
12175
12562
|
fontSize: "12px",
|
|
12176
12563
|
marginTop: "-21px"
|
|
12177
12564
|
};
|
|
12178
|
-
return /*#__PURE__*/React.createElement(
|
|
12179
|
-
|
|
12180
|
-
|
|
12181
|
-
|
|
12182
|
-
name: "sameAsOwnerDetails",
|
|
12183
|
-
defaultValue: sameAsOwnerDetails,
|
|
12184
|
-
isMandatory: true,
|
|
12185
|
-
render: props => {
|
|
12186
|
-
var _errors$sameAsOwnerDe;
|
|
12187
|
-
return /*#__PURE__*/React.createElement(CheckBox, {
|
|
12188
|
-
label: t("WS_SAME_AS_PROPERTY_OWNERS"),
|
|
12189
|
-
name: "sameAsOwnerDetails",
|
|
12190
|
-
autoFocus: focusIndex.index === (connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key) && focusIndex.type === "sameAsOwnerDetails",
|
|
12191
|
-
errorStyle: localFormState.touched.sameAsOwnerDetails && errors !== null && errors !== void 0 && (_errors$sameAsOwnerDe = errors.sameAsOwnerDetails) !== null && _errors$sameAsOwnerDe !== void 0 && _errors$sameAsOwnerDe.message ? true : false,
|
|
12192
|
-
onChange: e => {
|
|
12193
|
-
setSameAsOwnerDetails(e.target.checked);
|
|
12194
|
-
props.onChange(e.target.checked);
|
|
12195
|
-
setFocusIndex({
|
|
12196
|
-
index: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key,
|
|
12197
|
-
type: "sameAsOwnerDetails"
|
|
12198
|
-
});
|
|
12199
|
-
},
|
|
12200
|
-
checked: sameAsOwnerDetails,
|
|
12201
|
-
onBlur: props.onBlur
|
|
12202
|
-
});
|
|
12203
|
-
}
|
|
12204
|
-
})), !sameAsOwnerDetails ? /*#__PURE__*/React.createElement("div", {
|
|
12565
|
+
return /*#__PURE__*/React.createElement(CollapsibleCardPage, {
|
|
12566
|
+
title: t("WS_CONNECTION_HOLDER_DETAILS"),
|
|
12567
|
+
defaultOpen: true
|
|
12568
|
+
}, !sameAsOwnerDetails ? /*#__PURE__*/React.createElement("div", {
|
|
12205
12569
|
className: "formcomposer-section-grid"
|
|
12206
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12207
|
-
className: "card-label-smaller"
|
|
12208
|
-
}, `${t("WS_OWN_DETAIL_NAME")}*`), /*#__PURE__*/React.createElement(Controller, {
|
|
12570
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_OWN_DETAIL_NAME")}*`), /*#__PURE__*/React.createElement(Controller, {
|
|
12209
12571
|
control: control,
|
|
12210
12572
|
name: "name",
|
|
12211
12573
|
defaultValue: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.name,
|
|
@@ -12257,9 +12619,59 @@ const ConnectionDetails$1 = _props => {
|
|
|
12257
12619
|
}
|
|
12258
12620
|
})), localFormState.touched.name && (errors === null || errors === void 0 ? void 0 : (_errors$name2 = errors.name) === null || _errors$name2 === void 0 ? void 0 : _errors$name2.message) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
12259
12621
|
style: errorStyle
|
|
12260
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$name3 = errors.name) === null || _errors$name3 === void 0 ? void 0 : _errors$name3.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12261
|
-
|
|
12262
|
-
|
|
12622
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$name3 = errors.name) === null || _errors$name3 === void 0 ? void 0 : _errors$name3.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_OWN_DETAIL_MIDDLE_NAME")}`), /*#__PURE__*/React.createElement(Controller, {
|
|
12623
|
+
control: control,
|
|
12624
|
+
name: "middleName",
|
|
12625
|
+
defaultValue: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.middleName,
|
|
12626
|
+
render: props => {
|
|
12627
|
+
var _errors$middleName;
|
|
12628
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TextInput, {
|
|
12629
|
+
value: getValues("middleName"),
|
|
12630
|
+
autoFocus: focusIndex.index === (connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key) && focusIndex.type === "middleName",
|
|
12631
|
+
errorStyle: localFormState.touched.middleName && errors !== null && errors !== void 0 && (_errors$middleName = errors.middleName) !== null && _errors$middleName !== void 0 && _errors$middleName.message ? true : false,
|
|
12632
|
+
onChange: e => {
|
|
12633
|
+
setMiddleName(e.target.value);
|
|
12634
|
+
props.onChange(e.target.value);
|
|
12635
|
+
setFocusIndex({
|
|
12636
|
+
index: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key,
|
|
12637
|
+
type: "middleName"
|
|
12638
|
+
});
|
|
12639
|
+
},
|
|
12640
|
+
labelStyle: {
|
|
12641
|
+
marginTop: "unset"
|
|
12642
|
+
},
|
|
12643
|
+
onBlur: props.onBlur
|
|
12644
|
+
}));
|
|
12645
|
+
}
|
|
12646
|
+
})), localFormState.touched.middleName && (errors === null || errors === void 0 ? void 0 : (_errors$middleName2 = errors.middleName) === null || _errors$middleName2 === void 0 ? void 0 : _errors$middleName2.message) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
12647
|
+
style: errorStyle
|
|
12648
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$middleName3 = errors.middleName) === null || _errors$middleName3 === void 0 ? void 0 : _errors$middleName3.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_OWN_DETAIL_LAST_NAME")}`), /*#__PURE__*/React.createElement(Controller, {
|
|
12649
|
+
control: control,
|
|
12650
|
+
name: "lastName",
|
|
12651
|
+
defaultValue: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.lastName,
|
|
12652
|
+
render: props => {
|
|
12653
|
+
var _errors$lastName;
|
|
12654
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TextInput, {
|
|
12655
|
+
value: getValues("lastName"),
|
|
12656
|
+
autoFocus: focusIndex.index === (connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key) && focusIndex.type === "lastName",
|
|
12657
|
+
errorStyle: localFormState.touched.lastName && errors !== null && errors !== void 0 && (_errors$lastName = errors.lastName) !== null && _errors$lastName !== void 0 && _errors$lastName.message ? true : false,
|
|
12658
|
+
onChange: e => {
|
|
12659
|
+
setLastName(e.target.value);
|
|
12660
|
+
props.onChange(e.target.value);
|
|
12661
|
+
setFocusIndex({
|
|
12662
|
+
index: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key,
|
|
12663
|
+
type: "lastName"
|
|
12664
|
+
});
|
|
12665
|
+
},
|
|
12666
|
+
labelStyle: {
|
|
12667
|
+
marginTop: "unset"
|
|
12668
|
+
},
|
|
12669
|
+
onBlur: props.onBlur
|
|
12670
|
+
}));
|
|
12671
|
+
}
|
|
12672
|
+
})), localFormState.touched.lastName && (errors === null || errors === void 0 ? void 0 : (_errors$lastName2 = errors.lastName) === null || _errors$lastName2 === void 0 ? void 0 : _errors$lastName2.message) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
12673
|
+
style: errorStyle
|
|
12674
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$lastName3 = errors.lastName) === null || _errors$lastName3 === void 0 ? void 0 : _errors$lastName3.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_CONN_HOLDER_OWN_DETAIL_GENDER_LABEL")}*`), /*#__PURE__*/React.createElement("div", {
|
|
12263
12675
|
className: "field"
|
|
12264
12676
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12265
12677
|
control: control,
|
|
@@ -12314,65 +12726,7 @@ const ConnectionDetails$1 = _props => {
|
|
|
12314
12726
|
}
|
|
12315
12727
|
}))), localFormState.touched.gender && (errors === null || errors === void 0 ? void 0 : (_errors$gender2 = errors.gender) === null || _errors$gender2 === void 0 ? void 0 : _errors$gender2.message) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
12316
12728
|
style: errorStyle
|
|
12317
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$gender3 = errors.gender) === null || _errors$gender3 === void 0 ? void 0 : _errors$gender3.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12318
|
-
className: "card-label-smaller"
|
|
12319
|
-
}, `${t("CORE_COMMON_MOBILE_NUMBER")}*`), /*#__PURE__*/React.createElement("div", {
|
|
12320
|
-
className: "field"
|
|
12321
|
-
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12322
|
-
control: control,
|
|
12323
|
-
name: "mobileNumber",
|
|
12324
|
-
defaultValue: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.mobileNumber,
|
|
12325
|
-
rules: {
|
|
12326
|
-
validate: e => e && getPattern("MobileNoWithPrivacy").test(e) || !e || e.includes("*") ? true : t("ERR_DEFAULT_INPUT_FIELD_MSG"),
|
|
12327
|
-
required: t("REQUIRED_FIELD")
|
|
12328
|
-
},
|
|
12329
|
-
isMandatory: true,
|
|
12330
|
-
render: props => {
|
|
12331
|
-
var _errors$mobileNumber, _formData$ConnectionD11, _formData$ConnectionD12, _formData$cpt3, _formData$cpt3$detail, _formData$ConnectionD13, _formData$ConnectionD14, _formData$ConnectionD15, _formData$ConnectionD16;
|
|
12332
|
-
const mobileValue = getValues("mobileNumber");
|
|
12333
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(MobileNumber, {
|
|
12334
|
-
name: "mobileNumber",
|
|
12335
|
-
value: mobileValue,
|
|
12336
|
-
autoFocus: focusIndex.index === (connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key) && focusIndex.type === "mobileNumber",
|
|
12337
|
-
errorStyle: localFormState.touched.mobileNumber && (errors === null || errors === void 0 ? void 0 : (_errors$mobileNumber = errors.mobileNumber) === null || _errors$mobileNumber === void 0 ? void 0 : _errors$mobileNumber.message),
|
|
12338
|
-
onChange: val => {
|
|
12339
|
-
setMobileNumber(val);
|
|
12340
|
-
props.onChange(val);
|
|
12341
|
-
setFocusIndex({
|
|
12342
|
-
index: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key,
|
|
12343
|
-
type: "mobileNumber"
|
|
12344
|
-
});
|
|
12345
|
-
},
|
|
12346
|
-
onBlur: props.onBlur,
|
|
12347
|
-
hideSpan: false
|
|
12348
|
-
}), checkifPrivacyValid() && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(WrapUnMaskComponent, {
|
|
12349
|
-
value: mobileValue,
|
|
12350
|
-
unmaskField: e => {
|
|
12351
|
-
props.onChange(e);
|
|
12352
|
-
},
|
|
12353
|
-
iseyevisible: mobileValue === null || mobileValue === void 0 ? void 0 : mobileValue.includes("*"),
|
|
12354
|
-
privacy: {
|
|
12355
|
-
uuid: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.uuid,
|
|
12356
|
-
fieldName: "connectionHoldersMobileNumber",
|
|
12357
|
-
model: "WnSConnectionOwner",
|
|
12358
|
-
loadData: {
|
|
12359
|
-
serviceName: formData !== null && formData !== void 0 && (_formData$ConnectionD11 = formData.ConnectionDetails) !== null && _formData$ConnectionD11 !== void 0 && (_formData$ConnectionD12 = _formData$ConnectionD11[0]) !== null && _formData$ConnectionD12 !== void 0 && _formData$ConnectionD12.water ? "/ws-services/wc/_search" : "/sw-services/swc/_search",
|
|
12360
|
-
requestBody: {},
|
|
12361
|
-
requestParam: {
|
|
12362
|
-
tenantId: formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : (_formData$cpt3$detail = _formData$cpt3.details) === null || _formData$cpt3$detail === void 0 ? void 0 : _formData$cpt3$detail.tenantId,
|
|
12363
|
-
applicationNumber: formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD13 = formData.ConnectionDetails) === null || _formData$ConnectionD13 === void 0 ? void 0 : (_formData$ConnectionD14 = _formData$ConnectionD13[0]) === null || _formData$ConnectionD14 === void 0 ? void 0 : _formData$ConnectionD14.applicationNo
|
|
12364
|
-
},
|
|
12365
|
-
jsonPath: formData !== null && formData !== void 0 && (_formData$ConnectionD15 = formData.ConnectionDetails) !== null && _formData$ConnectionD15 !== void 0 && (_formData$ConnectionD16 = _formData$ConnectionD15[0]) !== null && _formData$ConnectionD16 !== void 0 && _formData$ConnectionD16.water ? "WaterConnection[0].connectionHolders[0].mobileNumber" : "SewerageConnections[0].connectionHolders[0].mobileNumber",
|
|
12366
|
-
isArray: false
|
|
12367
|
-
}
|
|
12368
|
-
}
|
|
12369
|
-
})));
|
|
12370
|
-
}
|
|
12371
|
-
}))), localFormState.touched.mobileNumber && (errors === null || errors === void 0 ? void 0 : (_errors$mobileNumber2 = errors.mobileNumber) === null || _errors$mobileNumber2 === void 0 ? void 0 : _errors$mobileNumber2.message) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
12372
|
-
style: errorStyle
|
|
12373
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$mobileNumber3 = errors.mobileNumber) === null || _errors$mobileNumber3 === void 0 ? void 0 : _errors$mobileNumber3.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12374
|
-
className: "card-label-smaller"
|
|
12375
|
-
}, `${t("WS_OWN_DETAIL_GUARDIAN_LABEL")}*`), /*#__PURE__*/React.createElement("div", {
|
|
12729
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$gender3 = errors.gender) === null || _errors$gender3 === void 0 ? void 0 : _errors$gender3.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_OWN_DETAIL_GUARDIAN_LABEL")}*`), /*#__PURE__*/React.createElement("div", {
|
|
12376
12730
|
className: "field"
|
|
12377
12731
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12378
12732
|
control: control,
|
|
@@ -12384,7 +12738,7 @@ const ConnectionDetails$1 = _props => {
|
|
|
12384
12738
|
},
|
|
12385
12739
|
isMandatory: true,
|
|
12386
12740
|
render: props => {
|
|
12387
|
-
var _errors$guardian, _getValues2, _formData$
|
|
12741
|
+
var _errors$guardian, _getValues2, _formData$ConnectionD11, _formData$ConnectionD12, _formData$cpt3, _formData$cpt3$detail, _formData$ConnectionD13, _formData$ConnectionD14, _formData$ConnectionD15, _formData$ConnectionD16;
|
|
12388
12742
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TextInput, {
|
|
12389
12743
|
value: getValues("guardian"),
|
|
12390
12744
|
autoFocus: focusIndex.index === (connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key) && focusIndex.type === "guardian",
|
|
@@ -12412,13 +12766,13 @@ const ConnectionDetails$1 = _props => {
|
|
|
12412
12766
|
fieldName: "fatherOrHusbandName",
|
|
12413
12767
|
model: "WnSConnectionOwner",
|
|
12414
12768
|
loadData: {
|
|
12415
|
-
serviceName: formData !== null && formData !== void 0 && (_formData$
|
|
12769
|
+
serviceName: formData !== null && formData !== void 0 && (_formData$ConnectionD11 = formData.ConnectionDetails) !== null && _formData$ConnectionD11 !== void 0 && (_formData$ConnectionD12 = _formData$ConnectionD11[0]) !== null && _formData$ConnectionD12 !== void 0 && _formData$ConnectionD12.water ? "/ws-services/wc/_search" : "/sw-services/swc/_search",
|
|
12416
12770
|
requestBody: {},
|
|
12417
12771
|
requestParam: {
|
|
12418
|
-
tenantId: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12419
|
-
applicationNumber: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12772
|
+
tenantId: formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : (_formData$cpt3$detail = _formData$cpt3.details) === null || _formData$cpt3$detail === void 0 ? void 0 : _formData$cpt3$detail.tenantId,
|
|
12773
|
+
applicationNumber: formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD13 = formData.ConnectionDetails) === null || _formData$ConnectionD13 === void 0 ? void 0 : (_formData$ConnectionD14 = _formData$ConnectionD13[0]) === null || _formData$ConnectionD14 === void 0 ? void 0 : _formData$ConnectionD14.applicationNo
|
|
12420
12774
|
},
|
|
12421
|
-
jsonPath: formData !== null && formData !== void 0 && (_formData$
|
|
12775
|
+
jsonPath: formData !== null && formData !== void 0 && (_formData$ConnectionD15 = formData.ConnectionDetails) !== null && _formData$ConnectionD15 !== void 0 && (_formData$ConnectionD16 = _formData$ConnectionD15[0]) !== null && _formData$ConnectionD16 !== void 0 && _formData$ConnectionD16.water ? "WaterConnection[0].connectionHolders[0].fatherOrHusbandName" : "SewerageConnections[0].connectionHolders[0].fatherOrHusbandName",
|
|
12422
12776
|
isArray: false
|
|
12423
12777
|
}
|
|
12424
12778
|
}
|
|
@@ -12426,9 +12780,7 @@ const ConnectionDetails$1 = _props => {
|
|
|
12426
12780
|
}
|
|
12427
12781
|
}))), localFormState.touched.guardian && (errors === null || errors === void 0 ? void 0 : (_errors$guardian2 = errors.guardian) === null || _errors$guardian2 === void 0 ? void 0 : _errors$guardian2.message) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
12428
12782
|
style: errorStyle
|
|
12429
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$guardian3 = errors.guardian) === null || _errors$guardian3 === void 0 ? void 0 : _errors$guardian3.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12430
|
-
className: "card-label-smaller"
|
|
12431
|
-
}, `${t("WS_CONN_HOLDER_OWN_DETAIL_RELATION_LABEL")}*`), /*#__PURE__*/React.createElement("div", {
|
|
12783
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$guardian3 = errors.guardian) === null || _errors$guardian3 === void 0 ? void 0 : _errors$guardian3.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_CONN_HOLDER_OWN_DETAIL_RELATION_LABEL")}*`), /*#__PURE__*/React.createElement("div", {
|
|
12432
12784
|
className: "field"
|
|
12433
12785
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12434
12786
|
control: control,
|
|
@@ -12439,7 +12791,7 @@ const ConnectionDetails$1 = _props => {
|
|
|
12439
12791
|
},
|
|
12440
12792
|
isMandatory: true,
|
|
12441
12793
|
render: props => {
|
|
12442
|
-
var _errors$relationship, _relationship$i18nKey, _formData$
|
|
12794
|
+
var _errors$relationship, _relationship$i18nKey, _formData$ConnectionD17, _formData$ConnectionD18, _formData$cpt4, _formData$cpt4$detail, _formData$ConnectionD19, _formData$ConnectionD20, _formData$ConnectionD21, _formData$ConnectionD22;
|
|
12443
12795
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
12444
12796
|
className: "form-field",
|
|
12445
12797
|
selected: getValues("relationship"),
|
|
@@ -12469,13 +12821,13 @@ const ConnectionDetails$1 = _props => {
|
|
|
12469
12821
|
fieldName: "relationship",
|
|
12470
12822
|
model: "WnSConnection",
|
|
12471
12823
|
loadData: {
|
|
12472
|
-
serviceName: formData !== null && formData !== void 0 && (_formData$
|
|
12824
|
+
serviceName: formData !== null && formData !== void 0 && (_formData$ConnectionD17 = formData.ConnectionDetails) !== null && _formData$ConnectionD17 !== void 0 && (_formData$ConnectionD18 = _formData$ConnectionD17[0]) !== null && _formData$ConnectionD18 !== void 0 && _formData$ConnectionD18.water ? "/ws-services/wc/_search" : "/sw-services/swc/_search",
|
|
12473
12825
|
requestBody: {},
|
|
12474
12826
|
requestParam: {
|
|
12475
|
-
tenantId: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12476
|
-
applicationNumber: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12827
|
+
tenantId: formData === null || formData === void 0 ? void 0 : (_formData$cpt4 = formData.cpt) === null || _formData$cpt4 === void 0 ? void 0 : (_formData$cpt4$detail = _formData$cpt4.details) === null || _formData$cpt4$detail === void 0 ? void 0 : _formData$cpt4$detail.tenantId,
|
|
12828
|
+
applicationNumber: formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD19 = formData.ConnectionDetails) === null || _formData$ConnectionD19 === void 0 ? void 0 : (_formData$ConnectionD20 = _formData$ConnectionD19[0]) === null || _formData$ConnectionD20 === void 0 ? void 0 : _formData$ConnectionD20.applicationNo
|
|
12477
12829
|
},
|
|
12478
|
-
jsonPath: formData !== null && formData !== void 0 && (_formData$
|
|
12830
|
+
jsonPath: formData !== null && formData !== void 0 && (_formData$ConnectionD21 = formData.ConnectionDetails) !== null && _formData$ConnectionD21 !== void 0 && (_formData$ConnectionD22 = _formData$ConnectionD21[0]) !== null && _formData$ConnectionD22 !== void 0 && _formData$ConnectionD22.water ? "WaterConnection[0].connectionHolders[0].relationship" : "SewerageConnections[0].connectionHolders[0].relationship",
|
|
12479
12831
|
isArray: false
|
|
12480
12832
|
}
|
|
12481
12833
|
}
|
|
@@ -12483,121 +12835,153 @@ const ConnectionDetails$1 = _props => {
|
|
|
12483
12835
|
}
|
|
12484
12836
|
}))), localFormState.touched.relationship && (errors === null || errors === void 0 ? void 0 : (_errors$relationship2 = errors.relationship) === null || _errors$relationship2 === void 0 ? void 0 : _errors$relationship2.message) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
12485
12837
|
style: errorStyle
|
|
12486
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$relationship3 = errors.relationship) === null || _errors$relationship3 === void 0 ? void 0 : _errors$relationship3.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12487
|
-
className: "card-label-smaller"
|
|
12488
|
-
}, `${t("WS_CORRESPONDANCE_ADDRESS_LABEL")}*`), /*#__PURE__*/React.createElement("div", {
|
|
12838
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$relationship3 = errors.relationship) === null || _errors$relationship3 === void 0 ? void 0 : _errors$relationship3.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("CORE_COMMON_MOBILE_NUMBER")}*`), /*#__PURE__*/React.createElement("div", {
|
|
12489
12839
|
className: "field"
|
|
12490
12840
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12491
12841
|
control: control,
|
|
12492
|
-
name: "
|
|
12493
|
-
defaultValue: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.
|
|
12842
|
+
name: "mobileNumber",
|
|
12843
|
+
defaultValue: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.mobileNumber,
|
|
12494
12844
|
rules: {
|
|
12495
|
-
validate: e => e && getPattern("
|
|
12845
|
+
validate: e => e && getPattern("MobileNoWithPrivacy").test(e) || !e || e.includes("*") ? true : t("ERR_DEFAULT_INPUT_FIELD_MSG"),
|
|
12496
12846
|
required: t("REQUIRED_FIELD")
|
|
12497
12847
|
},
|
|
12498
12848
|
isMandatory: true,
|
|
12499
12849
|
render: props => {
|
|
12500
|
-
var _errors$
|
|
12501
|
-
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12850
|
+
var _errors$mobileNumber, _formData$ConnectionD23, _formData$ConnectionD24, _formData$cpt5, _formData$cpt5$detail, _formData$ConnectionD25, _formData$ConnectionD26, _formData$ConnectionD27, _formData$ConnectionD28;
|
|
12851
|
+
const mobileValue = getValues("mobileNumber");
|
|
12852
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(MobileNumber, {
|
|
12853
|
+
name: "mobileNumber",
|
|
12854
|
+
value: mobileValue,
|
|
12855
|
+
autoFocus: focusIndex.index === (connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key) && focusIndex.type === "mobileNumber",
|
|
12856
|
+
errorStyle: localFormState.touched.mobileNumber && (errors === null || errors === void 0 ? void 0 : (_errors$mobileNumber = errors.mobileNumber) === null || _errors$mobileNumber === void 0 ? void 0 : _errors$mobileNumber.message),
|
|
12857
|
+
onChange: val => {
|
|
12858
|
+
setMobileNumber(val);
|
|
12859
|
+
props.onChange(val);
|
|
12508
12860
|
setFocusIndex({
|
|
12509
12861
|
index: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key,
|
|
12510
|
-
type: "
|
|
12862
|
+
type: "mobileNumber"
|
|
12511
12863
|
});
|
|
12864
|
+
if (isWatsappSameAsMobile) {
|
|
12865
|
+
setWatsAppMobileNumber(val);
|
|
12866
|
+
setValue("watsAppMobileNumber", val);
|
|
12867
|
+
}
|
|
12512
12868
|
},
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
},
|
|
12516
|
-
onBlur: props.onBlur
|
|
12869
|
+
onBlur: props.onBlur,
|
|
12870
|
+
hideSpan: false
|
|
12517
12871
|
}), checkifPrivacyValid() && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(WrapUnMaskComponent, {
|
|
12872
|
+
value: mobileValue,
|
|
12518
12873
|
unmaskField: e => {
|
|
12519
|
-
setAddress(e);
|
|
12520
12874
|
props.onChange(e);
|
|
12521
12875
|
},
|
|
12522
|
-
iseyevisible:
|
|
12876
|
+
iseyevisible: mobileValue === null || mobileValue === void 0 ? void 0 : mobileValue.includes("*"),
|
|
12523
12877
|
privacy: {
|
|
12524
12878
|
uuid: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.uuid,
|
|
12525
|
-
fieldName: "
|
|
12879
|
+
fieldName: "connectionHoldersMobileNumber",
|
|
12526
12880
|
model: "WnSConnectionOwner",
|
|
12527
12881
|
loadData: {
|
|
12528
|
-
serviceName: formData !== null && formData !== void 0 && (_formData$
|
|
12882
|
+
serviceName: formData !== null && formData !== void 0 && (_formData$ConnectionD23 = formData.ConnectionDetails) !== null && _formData$ConnectionD23 !== void 0 && (_formData$ConnectionD24 = _formData$ConnectionD23[0]) !== null && _formData$ConnectionD24 !== void 0 && _formData$ConnectionD24.water ? "/ws-services/wc/_search" : "/sw-services/swc/_search",
|
|
12529
12883
|
requestBody: {},
|
|
12530
12884
|
requestParam: {
|
|
12531
|
-
tenantId: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12532
|
-
applicationNumber: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12885
|
+
tenantId: formData === null || formData === void 0 ? void 0 : (_formData$cpt5 = formData.cpt) === null || _formData$cpt5 === void 0 ? void 0 : (_formData$cpt5$detail = _formData$cpt5.details) === null || _formData$cpt5$detail === void 0 ? void 0 : _formData$cpt5$detail.tenantId,
|
|
12886
|
+
applicationNumber: formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD25 = formData.ConnectionDetails) === null || _formData$ConnectionD25 === void 0 ? void 0 : (_formData$ConnectionD26 = _formData$ConnectionD25[0]) === null || _formData$ConnectionD26 === void 0 ? void 0 : _formData$ConnectionD26.applicationNo
|
|
12533
12887
|
},
|
|
12534
|
-
jsonPath: formData !== null && formData !== void 0 && (_formData$
|
|
12888
|
+
jsonPath: formData !== null && formData !== void 0 && (_formData$ConnectionD27 = formData.ConnectionDetails) !== null && _formData$ConnectionD27 !== void 0 && (_formData$ConnectionD28 = _formData$ConnectionD27[0]) !== null && _formData$ConnectionD28 !== void 0 && _formData$ConnectionD28.water ? "WaterConnection[0].connectionHolders[0].mobileNumber" : "SewerageConnections[0].connectionHolders[0].mobileNumber",
|
|
12535
12889
|
isArray: false
|
|
12536
12890
|
}
|
|
12537
12891
|
}
|
|
12538
12892
|
})));
|
|
12539
12893
|
}
|
|
12540
|
-
}))), localFormState.touched.
|
|
12894
|
+
}))), localFormState.touched.mobileNumber && (errors === null || errors === void 0 ? void 0 : (_errors$mobileNumber2 = errors.mobileNumber) === null || _errors$mobileNumber2 === void 0 ? void 0 : _errors$mobileNumber2.message) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
12541
12895
|
style: errorStyle
|
|
12542
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$
|
|
12543
|
-
className: "card-label-smaller"
|
|
12544
|
-
}, `${t("WS_OWNER_SPECIAL_CATEGORY")}*`), /*#__PURE__*/React.createElement("div", {
|
|
12896
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$mobileNumber3 = errors.mobileNumber) === null || _errors$mobileNumber3 === void 0 ? void 0 : _errors$mobileNumber3.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("CORE_COMMON_WHATSAPP_MOBILE_NUMBER")}`), /*#__PURE__*/React.createElement("div", {
|
|
12545
12897
|
className: "field"
|
|
12546
12898
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12547
12899
|
control: control,
|
|
12548
|
-
name: "
|
|
12549
|
-
defaultValue:
|
|
12900
|
+
name: "isWatsappSameAsMobile",
|
|
12901
|
+
defaultValue: isWatsappSameAsMobile,
|
|
12902
|
+
render: props => {
|
|
12903
|
+
var _errors$isWatsappSame;
|
|
12904
|
+
return /*#__PURE__*/React.createElement(CheckBox, {
|
|
12905
|
+
label: t("WS_SAME_AS_MOBILE_NUMBER"),
|
|
12906
|
+
name: "isWatsappSameAsMobile",
|
|
12907
|
+
autoFocus: focusIndex.index === (connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key) && focusIndex.type === "isWatsappSameAsMobile",
|
|
12908
|
+
errorStyle: localFormState.touched.isWatsappSameAsMobile && errors !== null && errors !== void 0 && (_errors$isWatsappSame = errors.isWatsappSameAsMobile) !== null && _errors$isWatsappSame !== void 0 && _errors$isWatsappSame.message ? true : false,
|
|
12909
|
+
onChange: e => {
|
|
12910
|
+
setIsWatsappSameAsMobile(e.target.checked);
|
|
12911
|
+
props.onChange(e.target.checked);
|
|
12912
|
+
setFocusIndex({
|
|
12913
|
+
index: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key,
|
|
12914
|
+
type: "isWatsappSameAsMobile"
|
|
12915
|
+
});
|
|
12916
|
+
if (e.target.checked) {
|
|
12917
|
+
setWatsAppMobileNumber(mobileNumber);
|
|
12918
|
+
setValue("watsAppMobileNumber", mobileNumber);
|
|
12919
|
+
} else {
|
|
12920
|
+
setWatsAppMobileNumber("");
|
|
12921
|
+
setValue("watsAppMobileNumber", "");
|
|
12922
|
+
}
|
|
12923
|
+
},
|
|
12924
|
+
checked: isWatsappSameAsMobile,
|
|
12925
|
+
onBlur: props.onBlur,
|
|
12926
|
+
style: {
|
|
12927
|
+
paddingBottom: "10px"
|
|
12928
|
+
}
|
|
12929
|
+
});
|
|
12930
|
+
}
|
|
12931
|
+
}), /*#__PURE__*/React.createElement(Controller, {
|
|
12932
|
+
control: control,
|
|
12933
|
+
name: "watsAppMobileNumber",
|
|
12934
|
+
defaultValue: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.watsAppMobileNumber,
|
|
12550
12935
|
rules: {
|
|
12936
|
+
validate: e => e && getPattern("MobileNoWithPrivacy").test(e) || !e || e.includes("*") ? true : t("ERR_DEFAULT_INPUT_FIELD_MSG"),
|
|
12551
12937
|
required: t("REQUIRED_FIELD")
|
|
12552
12938
|
},
|
|
12939
|
+
isMandatory: true,
|
|
12553
12940
|
render: props => {
|
|
12554
|
-
var _errors$
|
|
12555
|
-
|
|
12556
|
-
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
|
|
12560
|
-
errorStyle: localFormState.touched.
|
|
12561
|
-
|
|
12562
|
-
|
|
12563
|
-
props.onChange(
|
|
12941
|
+
var _errors$watsAppMobile, _formData$ConnectionD29, _formData$ConnectionD30, _formData$cpt6, _formData$cpt6$detail, _formData$ConnectionD31, _formData$ConnectionD32, _formData$ConnectionD33, _formData$ConnectionD34;
|
|
12942
|
+
const watsAppmobileValue = getValues("watsAppMobileNumber");
|
|
12943
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(MobileNumber, {
|
|
12944
|
+
name: "watsAppMobileNumber",
|
|
12945
|
+
value: watsAppmobileValue,
|
|
12946
|
+
autoFocus: focusIndex.index === (connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key) && focusIndex.type === "watsAppMobileNumber",
|
|
12947
|
+
errorStyle: localFormState.touched.watsAppMobileNumber && (errors === null || errors === void 0 ? void 0 : (_errors$watsAppMobile = errors.watsAppMobileNumber) === null || _errors$watsAppMobile === void 0 ? void 0 : _errors$watsAppMobile.message),
|
|
12948
|
+
onChange: val => {
|
|
12949
|
+
setWatsAppMobileNumber(val);
|
|
12950
|
+
props.onChange(val);
|
|
12951
|
+
setFocusIndex({
|
|
12952
|
+
index: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key,
|
|
12953
|
+
type: "watsAppMobileNumber"
|
|
12954
|
+
});
|
|
12564
12955
|
},
|
|
12565
|
-
optionKey: "i18nKey",
|
|
12566
12956
|
onBlur: props.onBlur,
|
|
12567
|
-
|
|
12957
|
+
hideSpan: false,
|
|
12958
|
+
disable: isWatsappSameAsMobile
|
|
12568
12959
|
}), checkifPrivacyValid() && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(WrapUnMaskComponent, {
|
|
12960
|
+
value: watsAppmobileValue,
|
|
12569
12961
|
unmaskField: e => {
|
|
12570
|
-
|
|
12571
|
-
code: e,
|
|
12572
|
-
i18nKey: `COMMON_MASTERS_OWNERTYPE_${e}`,
|
|
12573
|
-
name: e
|
|
12574
|
-
};
|
|
12575
|
-
setOwnerType(r);
|
|
12576
|
-
props.onChange(r);
|
|
12962
|
+
props.onChange(e);
|
|
12577
12963
|
},
|
|
12578
|
-
iseyevisible:
|
|
12964
|
+
iseyevisible: watsAppmobileValue === null || watsAppmobileValue === void 0 ? void 0 : watsAppmobileValue.includes("*"),
|
|
12579
12965
|
privacy: {
|
|
12580
12966
|
uuid: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.uuid,
|
|
12581
|
-
fieldName: "
|
|
12582
|
-
model: "
|
|
12967
|
+
fieldName: "connectionHoldersMobileNumber",
|
|
12968
|
+
model: "WnSConnectionOwner",
|
|
12583
12969
|
loadData: {
|
|
12584
|
-
serviceName: formData !== null && formData !== void 0 && (_formData$
|
|
12970
|
+
serviceName: formData !== null && formData !== void 0 && (_formData$ConnectionD29 = formData.ConnectionDetails) !== null && _formData$ConnectionD29 !== void 0 && (_formData$ConnectionD30 = _formData$ConnectionD29[0]) !== null && _formData$ConnectionD30 !== void 0 && _formData$ConnectionD30.water ? "/ws-services/wc/_search" : "/sw-services/swc/_search",
|
|
12585
12971
|
requestBody: {},
|
|
12586
12972
|
requestParam: {
|
|
12587
|
-
tenantId: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12588
|
-
applicationNumber: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12973
|
+
tenantId: formData === null || formData === void 0 ? void 0 : (_formData$cpt6 = formData.cpt) === null || _formData$cpt6 === void 0 ? void 0 : (_formData$cpt6$detail = _formData$cpt6.details) === null || _formData$cpt6$detail === void 0 ? void 0 : _formData$cpt6$detail.tenantId,
|
|
12974
|
+
applicationNumber: formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD31 = formData.ConnectionDetails) === null || _formData$ConnectionD31 === void 0 ? void 0 : (_formData$ConnectionD32 = _formData$ConnectionD31[0]) === null || _formData$ConnectionD32 === void 0 ? void 0 : _formData$ConnectionD32.applicationNo
|
|
12589
12975
|
},
|
|
12590
|
-
jsonPath: formData !== null && formData !== void 0 && (_formData$
|
|
12976
|
+
jsonPath: formData !== null && formData !== void 0 && (_formData$ConnectionD33 = formData.ConnectionDetails) !== null && _formData$ConnectionD33 !== void 0 && (_formData$ConnectionD34 = _formData$ConnectionD33[0]) !== null && _formData$ConnectionD34 !== void 0 && _formData$ConnectionD34.water ? "WaterConnection[0].connectionHolders[0].mobileNumber" : "SewerageConnections[0].connectionHolders[0].mobileNumber",
|
|
12591
12977
|
isArray: false
|
|
12592
12978
|
}
|
|
12593
12979
|
}
|
|
12594
12980
|
})));
|
|
12595
12981
|
}
|
|
12596
|
-
}))), localFormState.touched.
|
|
12982
|
+
}))), localFormState.touched.watsAppMobileNumber && (errors === null || errors === void 0 ? void 0 : (_errors$watsAppMobile2 = errors.watsAppMobileNumber) === null || _errors$watsAppMobile2 === void 0 ? void 0 : _errors$watsAppMobile2.message) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
12597
12983
|
style: errorStyle
|
|
12598
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$
|
|
12599
|
-
className: "card-label-smaller"
|
|
12600
|
-
}, `${t("WS_EMAIL_ID")}`), /*#__PURE__*/React.createElement("div", {
|
|
12984
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$watsAppMobile3 = errors.watsAppMobileNumber) === null || _errors$watsAppMobile3 === void 0 ? void 0 : _errors$watsAppMobile3.message)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_EMAIL_ID")}`), /*#__PURE__*/React.createElement("div", {
|
|
12601
12985
|
className: "field"
|
|
12602
12986
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12603
12987
|
control: control,
|
|
@@ -12608,7 +12992,7 @@ const ConnectionDetails$1 = _props => {
|
|
|
12608
12992
|
},
|
|
12609
12993
|
isMandatory: false,
|
|
12610
12994
|
render: props => {
|
|
12611
|
-
var _errors$emailId,
|
|
12995
|
+
var _errors$emailId, _getValues3, _formData$ConnectionD35, _formData$ConnectionD36, _formData$cpt7, _formData$cpt7$detail, _formData$ConnectionD37, _formData$ConnectionD38, _formData$ConnectionD39, _formData$ConnectionD40;
|
|
12612
12996
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TextInput, {
|
|
12613
12997
|
value: getValues("emailId"),
|
|
12614
12998
|
autoFocus: focusIndex.index === (connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.key) && focusIndex.type === "emailId",
|
|
@@ -12631,19 +13015,19 @@ const ConnectionDetails$1 = _props => {
|
|
|
12631
13015
|
setEmailId(e);
|
|
12632
13016
|
props.onChange(e);
|
|
12633
13017
|
},
|
|
12634
|
-
iseyevisible: (
|
|
13018
|
+
iseyevisible: (_getValues3 = getValues("emailId")) !== null && _getValues3 !== void 0 && _getValues3.includes("*") ? true : false,
|
|
12635
13019
|
privacy: {
|
|
12636
13020
|
uuid: connectionHolderDetail === null || connectionHolderDetail === void 0 ? void 0 : connectionHolderDetail.uuid,
|
|
12637
13021
|
fieldName: "emailId",
|
|
12638
13022
|
model: "WnSConnectionOwner",
|
|
12639
13023
|
loadData: {
|
|
12640
|
-
serviceName: formData !== null && formData !== void 0 && (_formData$
|
|
13024
|
+
serviceName: formData !== null && formData !== void 0 && (_formData$ConnectionD35 = formData.ConnectionDetails) !== null && _formData$ConnectionD35 !== void 0 && (_formData$ConnectionD36 = _formData$ConnectionD35[0]) !== null && _formData$ConnectionD36 !== void 0 && _formData$ConnectionD36.water ? "/ws-services/wc/_search" : "/sw-services/swc/_search",
|
|
12641
13025
|
requestBody: {},
|
|
12642
13026
|
requestParam: {
|
|
12643
|
-
tenantId: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
12644
|
-
applicationNumber: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
13027
|
+
tenantId: formData === null || formData === void 0 ? void 0 : (_formData$cpt7 = formData.cpt) === null || _formData$cpt7 === void 0 ? void 0 : (_formData$cpt7$detail = _formData$cpt7.details) === null || _formData$cpt7$detail === void 0 ? void 0 : _formData$cpt7$detail.tenantId,
|
|
13028
|
+
applicationNumber: formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD37 = formData.ConnectionDetails) === null || _formData$ConnectionD37 === void 0 ? void 0 : (_formData$ConnectionD38 = _formData$ConnectionD37[0]) === null || _formData$ConnectionD38 === void 0 ? void 0 : _formData$ConnectionD38.applicationNo
|
|
12645
13029
|
},
|
|
12646
|
-
jsonPath: formData !== null && formData !== void 0 && (_formData$
|
|
13030
|
+
jsonPath: formData !== null && formData !== void 0 && (_formData$ConnectionD39 = formData.ConnectionDetails) !== null && _formData$ConnectionD39 !== void 0 && (_formData$ConnectionD40 = _formData$ConnectionD39[0]) !== null && _formData$ConnectionD40 !== void 0 && _formData$ConnectionD40.water ? "WaterConnection[0].connectionHolders[0].emailId" : "SewerageConnections[0].connectionHolders[0].emailId",
|
|
12647
13031
|
isArray: false
|
|
12648
13032
|
}
|
|
12649
13033
|
}
|
|
@@ -15103,10 +15487,10 @@ const WSDocumentsEmployee = ({
|
|
|
15103
15487
|
formState
|
|
15104
15488
|
}) => {
|
|
15105
15489
|
var _formData$DocumentsRe, _applicationDetailsDa, _applicationDetailsDa2, _wsDocs$wsDocsData2;
|
|
15106
|
-
const
|
|
15490
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
15107
15491
|
const [documents, setDocuments] = useState((formData === null || formData === void 0 ? void 0 : (_formData$DocumentsRe = formData.DocumentsRequired) === null || _formData$DocumentsRe === void 0 ? void 0 : _formData$DocumentsRe.documents) || []);
|
|
15108
15492
|
const [error, setError] = useState(null);
|
|
15109
|
-
const wsDocsData = window.location.href.includes("modify") ? "ModifyConnectionDocuments" : window.location.href.includes("disconnection") ? "DisconnectionDocuments" : "
|
|
15493
|
+
const wsDocsData = window.location.href.includes("modify") ? "ModifyConnectionDocuments" : window.location.href.includes("disconnection") ? "DisconnectionDocuments" : "NewWSDocuments";
|
|
15110
15494
|
let action = "create";
|
|
15111
15495
|
const {
|
|
15112
15496
|
pathname
|
|
@@ -15117,7 +15501,7 @@ const WSDocumentsEmployee = ({
|
|
|
15117
15501
|
const {
|
|
15118
15502
|
isLoading,
|
|
15119
15503
|
data: wsDocs
|
|
15120
|
-
} = Digit.Hooks.ws.WSSearchMdmsTypes.
|
|
15504
|
+
} = Digit.Hooks.ws.WSSearchMdmsTypes.useWSServicesNewMasters(tenantId, wsDocsData);
|
|
15121
15505
|
const goNext = () => {
|
|
15122
15506
|
onSelect(config.key, {
|
|
15123
15507
|
documents
|
|
@@ -15150,7 +15534,10 @@ const WSDocumentsEmployee = ({
|
|
|
15150
15534
|
});
|
|
15151
15535
|
});
|
|
15152
15536
|
}
|
|
15153
|
-
return /*#__PURE__*/React.createElement(
|
|
15537
|
+
return /*#__PURE__*/React.createElement(CollapsibleCardPage, {
|
|
15538
|
+
title: t("WS_DOCUMENTS"),
|
|
15539
|
+
defaultOpen: true
|
|
15540
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
15154
15541
|
className: "formcomposer-section-grid ws-doc-upload"
|
|
15155
15542
|
}, wsDocs === null || wsDocs === void 0 ? void 0 : (_wsDocs$wsDocsData2 = wsDocs[wsDocsData]) === null || _wsDocs$wsDocsData2 === void 0 ? void 0 : _wsDocs$wsDocsData2.map((document, index) => {
|
|
15156
15543
|
return /*#__PURE__*/React.createElement(SelectDocument$1, {
|
|
@@ -15191,7 +15578,7 @@ function SelectDocument$1({
|
|
|
15191
15578
|
fromRawData,
|
|
15192
15579
|
id
|
|
15193
15580
|
}) {
|
|
15194
|
-
var _doc$dropdownData, _formData$ConnectionD;
|
|
15581
|
+
var _doc$dropdownData, _formData$ConnectionD, _doc$i18nKey, _doc$i18nKey2, _doc$i18nKey3;
|
|
15195
15582
|
const fileRef = useRef();
|
|
15196
15583
|
const filteredDocument = documents === null || documents === void 0 ? void 0 : documents.filter(item => {
|
|
15197
15584
|
var _item$documentType;
|
|
@@ -15200,21 +15587,57 @@ function SelectDocument$1({
|
|
|
15200
15587
|
const [selectedDocument, setSelectedDocument] = useState(filteredDocument ? {
|
|
15201
15588
|
...filteredDocument,
|
|
15202
15589
|
code: filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentType
|
|
15203
|
-
} : (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData = doc.dropdownData) === null || _doc$dropdownData === void 0 ? void 0 : _doc$dropdownData.length) === 1 ? doc === null || doc === void 0 ? void 0 : doc.dropdownData[0] : {});
|
|
15590
|
+
} : doc !== null && doc !== void 0 && doc.hasDropdown ? (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData = doc.dropdownData) === null || _doc$dropdownData === void 0 ? void 0 : _doc$dropdownData.length) === 1 ? doc === null || doc === void 0 ? void 0 : doc.dropdownData[0] : {} : doc);
|
|
15204
15591
|
const [file, setFile] = useState(null);
|
|
15205
15592
|
const [uploadedFile, setUploadedFile] = useState(() => (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null);
|
|
15593
|
+
const [documentUid, setDocumentUid] = useState(() => (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentUid) || "");
|
|
15594
|
+
const [showCamera, setShowCamera] = useState(false);
|
|
15595
|
+
const [isUploading, setIsUploading] = useState(false);
|
|
15596
|
+
const [isCameraFile, setIsCameraFile] = useState(false);
|
|
15597
|
+
const [showDocModal, setShowDocModal] = useState(false);
|
|
15598
|
+
const [docFileUrl, setDocFileUrl] = useState("");
|
|
15599
|
+
const [docFileType, setDocFileType] = useState("");
|
|
15600
|
+
const handleCapture = capturedFile => {
|
|
15601
|
+
setFile(capturedFile);
|
|
15602
|
+
setIsCameraFile(true);
|
|
15603
|
+
setShowCamera(false);
|
|
15604
|
+
};
|
|
15206
15605
|
const handleSelectDocument = value => setSelectedDocument(value);
|
|
15606
|
+
const viewDocument = async () => {
|
|
15607
|
+
if (uploadedFile) {
|
|
15608
|
+
try {
|
|
15609
|
+
const res = await Digit.UploadServices.FileFetchbyid(uploadedFile, Digit.ULBService.getStateId());
|
|
15610
|
+
if (res !== null && res !== void 0 && res.data) {
|
|
15611
|
+
const blob = res.data instanceof Blob ? res.data : new Blob([res.data], {
|
|
15612
|
+
type: res.headers["content-type"] || res.headers["Content-Type"] || "image/jpeg"
|
|
15613
|
+
});
|
|
15614
|
+
const fileURL = URL.createObjectURL(blob);
|
|
15615
|
+
setDocFileUrl(fileURL);
|
|
15616
|
+
const contentType = res.headers["content-type"] || res.headers["Content-Type"] || "";
|
|
15617
|
+
if (contentType.toLowerCase().includes("pdf")) {
|
|
15618
|
+
setDocFileType("pdf");
|
|
15619
|
+
} else {
|
|
15620
|
+
setDocFileType("image");
|
|
15621
|
+
}
|
|
15622
|
+
setShowDocModal(true);
|
|
15623
|
+
}
|
|
15624
|
+
} catch (err) {
|
|
15625
|
+
console.error("Failed to fetch file URL via FileFetchbyid", err);
|
|
15626
|
+
}
|
|
15627
|
+
}
|
|
15628
|
+
};
|
|
15207
15629
|
useEffect(() => {
|
|
15208
15630
|
if (filteredDocument) {
|
|
15209
15631
|
var _doc$dropdownData2;
|
|
15210
15632
|
setSelectedDocument(filteredDocument ? {
|
|
15211
15633
|
...filteredDocument,
|
|
15212
15634
|
code: filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentType
|
|
15213
|
-
} : (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData2 = doc.dropdownData) === null || _doc$dropdownData2 === void 0 ? void 0 : _doc$dropdownData2.length) === 1 ? doc === null || doc === void 0 ? void 0 : doc.dropdownData[0] : {});
|
|
15635
|
+
} : doc !== null && doc !== void 0 && doc.hasDropdown ? (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData2 = doc.dropdownData) === null || _doc$dropdownData2 === void 0 ? void 0 : _doc$dropdownData2.length) === 1 ? doc === null || doc === void 0 ? void 0 : doc.dropdownData[0] : {} : doc);
|
|
15214
15636
|
}
|
|
15215
15637
|
}, []);
|
|
15216
15638
|
function selectfile(e) {
|
|
15217
15639
|
setFile(e.target.files[0]);
|
|
15640
|
+
setIsCameraFile(false);
|
|
15218
15641
|
}
|
|
15219
15642
|
const {
|
|
15220
15643
|
dropdownData
|
|
@@ -15258,6 +15681,7 @@ function SelectDocument$1({
|
|
|
15258
15681
|
const data = [...filteredDocumentsByFileStoreId, {
|
|
15259
15682
|
documentType: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
|
|
15260
15683
|
fileStoreId: uploadedFile,
|
|
15684
|
+
documentUid: documentUid,
|
|
15261
15685
|
i18nKey: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
|
|
15262
15686
|
id: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.id,
|
|
15263
15687
|
status: "ACTIVE"
|
|
@@ -15275,17 +15699,21 @@ function SelectDocument$1({
|
|
|
15275
15699
|
} else if (isHidden) {
|
|
15276
15700
|
removeError();
|
|
15277
15701
|
}
|
|
15278
|
-
}, [uploadedFile, selectedDocument, isHidden, formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD = formData.ConnectionDetails) === null || _formData$ConnectionD === void 0 ? void 0 : _formData$ConnectionD[0]]);
|
|
15702
|
+
}, [uploadedFile, selectedDocument, documentUid, isHidden, formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD = formData.ConnectionDetails) === null || _formData$ConnectionD === void 0 ? void 0 : _formData$ConnectionD[0]]);
|
|
15279
15703
|
useEffect(() => {
|
|
15280
15704
|
(async () => {
|
|
15281
15705
|
setError(null);
|
|
15282
15706
|
if (file) {
|
|
15283
15707
|
if (file.size >= 5242880) {
|
|
15284
15708
|
setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
15709
|
+
} else if ((doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" && !file.type.match(/image\/(jpeg|png)/i) && !file.name.match(/\.(jpg|jpeg|png)$/i)) {
|
|
15710
|
+
setError(t("WS_ONLY_JPG_PNG_ALLOWED") || "Only JPG and PNG files are allowed for Applicant Photo");
|
|
15711
|
+
setFile(null);
|
|
15285
15712
|
} else {
|
|
15286
15713
|
try {
|
|
15287
15714
|
var _response$data, _response$data$files;
|
|
15288
15715
|
setUploadedFile(null);
|
|
15716
|
+
setIsUploading(true);
|
|
15289
15717
|
const response = await Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId());
|
|
15290
15718
|
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
15291
15719
|
var _response$data2, _response$data2$files;
|
|
@@ -15295,6 +15723,8 @@ function SelectDocument$1({
|
|
|
15295
15723
|
}
|
|
15296
15724
|
} catch (err) {
|
|
15297
15725
|
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
15726
|
+
} finally {
|
|
15727
|
+
setIsUploading(false);
|
|
15298
15728
|
}
|
|
15299
15729
|
}
|
|
15300
15730
|
}
|
|
@@ -15303,11 +15733,16 @@ function SelectDocument$1({
|
|
|
15303
15733
|
useEffect(() => {
|
|
15304
15734
|
if (isHidden) setUploadedFile(null);
|
|
15305
15735
|
}, [isHidden]);
|
|
15306
|
-
return /*#__PURE__*/React.createElement(
|
|
15736
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
15307
15737
|
style: {
|
|
15308
|
-
|
|
15738
|
+
gridColumn: "span 2",
|
|
15739
|
+
display: "grid",
|
|
15740
|
+
gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
|
|
15741
|
+
gap: "20px",
|
|
15742
|
+
width: "100%",
|
|
15743
|
+
marginBottom: "20px"
|
|
15309
15744
|
}
|
|
15310
|
-
}, doc !== null && doc !== void 0 && doc.required ? `${t(doc === null || doc === void 0 ? void 0 : doc.i18nKey)}*` : `${t(doc === null || doc === void 0 ? void 0 : doc.i18nKey)}`), /*#__PURE__*/React.createElement(Dropdown, {
|
|
15745
|
+
}, doc !== null && doc !== void 0 && doc.hasDropdown ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, doc !== null && doc !== void 0 && doc.required ? `${t(doc === null || doc === void 0 ? void 0 : doc.i18nKey)}*` : `${t(doc === null || doc === void 0 ? void 0 : doc.i18nKey)}`), /*#__PURE__*/React.createElement(Dropdown, {
|
|
15311
15746
|
id: `doc-${doc === null || doc === void 0 ? void 0 : doc.code}`,
|
|
15312
15747
|
key: `doc-${doc === null || doc === void 0 ? void 0 : doc.code}`,
|
|
15313
15748
|
className: "form-field",
|
|
@@ -15322,12 +15757,31 @@ function SelectDocument$1({
|
|
|
15322
15757
|
select: handleSelectDocument,
|
|
15323
15758
|
optionKey: "i18nKey",
|
|
15324
15759
|
t: t
|
|
15325
|
-
})) : null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", {
|
|
15760
|
+
})) : null, (doc === null || doc === void 0 ? void 0 : doc.code) !== "OWNER.APPLICANTPHOTO" && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t(`${doc === null || doc === void 0 ? void 0 : (_doc$i18nKey = doc.i18nKey) === null || _doc$i18nKey === void 0 ? void 0 : _doc$i18nKey.replaceAll(".", "_")}_DOCUMENT_NO`)), /*#__PURE__*/React.createElement("div", {
|
|
15326
15761
|
className: "field"
|
|
15762
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
15763
|
+
type: "text",
|
|
15764
|
+
value: documentUid,
|
|
15765
|
+
onChange: e => setDocumentUid(e.target.value),
|
|
15766
|
+
placeholder: t("WS_IDENTITY_NO_PLACEHOLDER")
|
|
15767
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, doc !== null && doc !== void 0 && doc.required ? `${t(`${doc === null || doc === void 0 ? void 0 : (_doc$i18nKey2 = doc.i18nKey) === null || _doc$i18nKey2 === void 0 ? void 0 : _doc$i18nKey2.replaceAll(".", "_")}_UPLOAD_DOCUMENT`)}*` : `${t(`${doc === null || doc === void 0 ? void 0 : (_doc$i18nKey3 = doc.i18nKey) === null || _doc$i18nKey3 === void 0 ? void 0 : _doc$i18nKey3.replaceAll(".", "_")}_UPLOAD_DOCUMENT`)}`), /*#__PURE__*/React.createElement("div", {
|
|
15768
|
+
className: "field",
|
|
15769
|
+
style: {
|
|
15770
|
+
display: "flex",
|
|
15771
|
+
gap: "20px",
|
|
15772
|
+
alignItems: "center",
|
|
15773
|
+
width: "100%"
|
|
15774
|
+
}
|
|
15775
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
15776
|
+
style: {
|
|
15777
|
+
flex: 1
|
|
15778
|
+
}
|
|
15327
15779
|
}, /*#__PURE__*/React.createElement(UploadFile, {
|
|
15328
15780
|
onUpload: selectfile,
|
|
15329
15781
|
onDelete: () => {
|
|
15330
15782
|
setUploadedFile(null);
|
|
15783
|
+
setFile(null);
|
|
15784
|
+
setIsCameraFile(false);
|
|
15331
15785
|
},
|
|
15332
15786
|
id: id,
|
|
15333
15787
|
message: uploadedFile ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`CS_ACTION_NO_FILEUPLOADED`),
|
|
@@ -15336,9 +15790,235 @@ function SelectDocument$1({
|
|
|
15336
15790
|
},
|
|
15337
15791
|
buttonType: "button",
|
|
15338
15792
|
error: !uploadedFile,
|
|
15339
|
-
accept: "image/*, .pdf, .png, .jpeg, .jpg"
|
|
15793
|
+
accept: (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" ? "image/jpeg, image/png, .jpg, .jpeg, .png" : "image/*, .pdf, .png, .jpeg, .jpg",
|
|
15794
|
+
uploadedFiles: uploadedFile && file && isCameraFile ? [[(file === null || file === void 0 ? void 0 : file.name) || "applicant_photo.jpg", {
|
|
15795
|
+
fileStoreId: uploadedFile
|
|
15796
|
+
}]] : undefined,
|
|
15797
|
+
removeTargetedFile: () => {
|
|
15798
|
+
setUploadedFile(null);
|
|
15799
|
+
setFile(null);
|
|
15800
|
+
setIsCameraFile(false);
|
|
15801
|
+
}
|
|
15802
|
+
})), uploadedFile && /*#__PURE__*/React.createElement("div", {
|
|
15803
|
+
onClick: viewDocument,
|
|
15804
|
+
style: {
|
|
15805
|
+
cursor: "pointer"
|
|
15806
|
+
}
|
|
15807
|
+
}, /*#__PURE__*/React.createElement(ViewsIcon, null)), (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" && /*#__PURE__*/React.createElement("div", {
|
|
15808
|
+
style: {
|
|
15809
|
+
flex: 1,
|
|
15810
|
+
display: "flex",
|
|
15811
|
+
flexDirection: "column",
|
|
15812
|
+
marginTop: "-20px"
|
|
15813
|
+
}
|
|
15814
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_CLICK_APPLICANT_PHOTO") || "Click Applicant Photo"), /*#__PURE__*/React.createElement("div", {
|
|
15815
|
+
style: {
|
|
15816
|
+
display: "flex",
|
|
15817
|
+
alignItems: "center",
|
|
15818
|
+
gap: "10px"
|
|
15819
|
+
}
|
|
15820
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
15821
|
+
type: "button",
|
|
15822
|
+
style: {
|
|
15823
|
+
display: "flex",
|
|
15824
|
+
alignItems: "center",
|
|
15825
|
+
justifyContent: "center",
|
|
15826
|
+
gap: "8px",
|
|
15827
|
+
padding: "6px 16px",
|
|
15828
|
+
background: "#f0f0f0",
|
|
15829
|
+
border: "1px solid #ccc",
|
|
15830
|
+
borderRadius: "2px",
|
|
15831
|
+
cursor: isUploading ? "not-allowed" : "pointer",
|
|
15832
|
+
width: "fit-content",
|
|
15833
|
+
opacity: isUploading ? 0.5 : 1
|
|
15834
|
+
},
|
|
15835
|
+
onClick: () => !isUploading && setShowCamera(true),
|
|
15836
|
+
disabled: isUploading
|
|
15837
|
+
}, /*#__PURE__*/React.createElement("span", null, "\uD83D\uDCF8"), " ", t("WS_CLICK_PHOTO") || "Click Photo"), isUploading && /*#__PURE__*/React.createElement("span", {
|
|
15838
|
+
style: {
|
|
15839
|
+
color: "#00497e",
|
|
15840
|
+
fontWeight: "bold",
|
|
15841
|
+
fontSize: "14px"
|
|
15842
|
+
}
|
|
15843
|
+
}, t("CS_COMMON_UPLOADING") || "Uploading..."), uploadedFile && !isUploading && /*#__PURE__*/React.createElement("span", {
|
|
15844
|
+
style: {
|
|
15845
|
+
color: "green",
|
|
15846
|
+
fontWeight: "bold",
|
|
15847
|
+
fontSize: "14px"
|
|
15848
|
+
}
|
|
15849
|
+
}, "\u2714 Uploaded"))))), showCamera && /*#__PURE__*/React.createElement(CameraCaptureModal, {
|
|
15850
|
+
onCapture: handleCapture,
|
|
15851
|
+
onClose: () => setShowCamera(false),
|
|
15852
|
+
t: t
|
|
15853
|
+
}), showDocModal && /*#__PURE__*/React.createElement(Modal, {
|
|
15854
|
+
open: showDocModal,
|
|
15855
|
+
headerBarMain: t("WS_VIEW_DOCUMENT") || "View Document",
|
|
15856
|
+
headerBarEnd: /*#__PURE__*/React.createElement("div", {
|
|
15857
|
+
className: "icon-bg-secondary",
|
|
15858
|
+
onClick: () => setShowDocModal(false),
|
|
15859
|
+
style: {
|
|
15860
|
+
cursor: "pointer",
|
|
15861
|
+
padding: "5px"
|
|
15862
|
+
}
|
|
15863
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
15864
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15865
|
+
viewBox: "0 0 24 24",
|
|
15866
|
+
fill: "#FFFFFF",
|
|
15867
|
+
width: "24",
|
|
15868
|
+
height: "24"
|
|
15869
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
15870
|
+
d: "M0 0h24v24H0V0z",
|
|
15871
|
+
fill: "none"
|
|
15872
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
15873
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
15874
|
+
}))),
|
|
15875
|
+
center: true,
|
|
15876
|
+
actionCancelOnSubmit: () => setShowDocModal(false),
|
|
15877
|
+
actionCancelLabel: t("CS_COMMON_CLOSE") || "Close",
|
|
15878
|
+
popupStyles: {
|
|
15879
|
+
width: "80%",
|
|
15880
|
+
maxWidth: "800px"
|
|
15881
|
+
}
|
|
15882
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
15883
|
+
style: {
|
|
15884
|
+
display: "flex",
|
|
15885
|
+
justifyContent: "center",
|
|
15886
|
+
alignItems: "center",
|
|
15887
|
+
padding: "20px",
|
|
15888
|
+
minHeight: "300px"
|
|
15889
|
+
}
|
|
15890
|
+
}, docFileType === "pdf" ? /*#__PURE__*/React.createElement("iframe", {
|
|
15891
|
+
src: docFileUrl,
|
|
15892
|
+
title: "Document Preview",
|
|
15893
|
+
width: "100%",
|
|
15894
|
+
height: "500px",
|
|
15895
|
+
style: {
|
|
15896
|
+
border: "none"
|
|
15897
|
+
}
|
|
15898
|
+
}) : /*#__PURE__*/React.createElement("img", {
|
|
15899
|
+
src: docFileUrl,
|
|
15900
|
+
alt: "Document Preview",
|
|
15901
|
+
style: {
|
|
15902
|
+
maxWidth: "100%",
|
|
15903
|
+
maxHeight: "500px",
|
|
15904
|
+
objectFit: "contain",
|
|
15905
|
+
borderRadius: "4px"
|
|
15906
|
+
}
|
|
15340
15907
|
}))));
|
|
15341
15908
|
}
|
|
15909
|
+
const CameraCaptureModal = ({
|
|
15910
|
+
onCapture,
|
|
15911
|
+
onClose,
|
|
15912
|
+
t
|
|
15913
|
+
}) => {
|
|
15914
|
+
const videoRef = useRef(null);
|
|
15915
|
+
const canvasRef = useRef(null);
|
|
15916
|
+
const [stream, setStream] = useState(null);
|
|
15917
|
+
const [error, setError] = useState(null);
|
|
15918
|
+
useEffect(() => {
|
|
15919
|
+
const startCamera = async () => {
|
|
15920
|
+
try {
|
|
15921
|
+
const mediaStream = await navigator.mediaDevices.getUserMedia({
|
|
15922
|
+
video: true
|
|
15923
|
+
});
|
|
15924
|
+
if (videoRef.current) {
|
|
15925
|
+
videoRef.current.srcObject = mediaStream;
|
|
15926
|
+
}
|
|
15927
|
+
setStream(mediaStream);
|
|
15928
|
+
} catch (err) {
|
|
15929
|
+
setError(t("WS_CAMERA_ACCESS_ERROR") || "Camera Access Error");
|
|
15930
|
+
console.error("Error accessing camera: ", err);
|
|
15931
|
+
}
|
|
15932
|
+
};
|
|
15933
|
+
startCamera();
|
|
15934
|
+
return () => {
|
|
15935
|
+
if (stream) {
|
|
15936
|
+
stream.getTracks().forEach(track => track.stop());
|
|
15937
|
+
}
|
|
15938
|
+
};
|
|
15939
|
+
}, []);
|
|
15940
|
+
const capturePhoto = () => {
|
|
15941
|
+
if (videoRef.current && canvasRef.current) {
|
|
15942
|
+
const context = canvasRef.current.getContext("2d");
|
|
15943
|
+
canvasRef.current.width = videoRef.current.videoWidth;
|
|
15944
|
+
canvasRef.current.height = videoRef.current.videoHeight;
|
|
15945
|
+
context.translate(canvasRef.current.width, 0);
|
|
15946
|
+
context.scale(-1, 1);
|
|
15947
|
+
context.drawImage(videoRef.current, 0, 0, canvasRef.current.width, canvasRef.current.height);
|
|
15948
|
+
canvasRef.current.toBlob(blob => {
|
|
15949
|
+
const file = new File([blob], "applicant_photo.jpg", {
|
|
15950
|
+
type: "image/jpeg"
|
|
15951
|
+
});
|
|
15952
|
+
onCapture(file);
|
|
15953
|
+
}, "image/jpeg");
|
|
15954
|
+
}
|
|
15955
|
+
};
|
|
15956
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
15957
|
+
style: {
|
|
15958
|
+
position: "fixed",
|
|
15959
|
+
top: 0,
|
|
15960
|
+
left: 0,
|
|
15961
|
+
width: "100%",
|
|
15962
|
+
height: "100%",
|
|
15963
|
+
backgroundColor: "rgba(0,0,0,0.8)",
|
|
15964
|
+
zIndex: 9999,
|
|
15965
|
+
display: "flex",
|
|
15966
|
+
flexDirection: "column",
|
|
15967
|
+
alignItems: "center",
|
|
15968
|
+
justifyContent: "center"
|
|
15969
|
+
}
|
|
15970
|
+
}, error ? /*#__PURE__*/React.createElement("div", {
|
|
15971
|
+
style: {
|
|
15972
|
+
color: "white",
|
|
15973
|
+
marginBottom: "20px"
|
|
15974
|
+
}
|
|
15975
|
+
}, error) : /*#__PURE__*/React.createElement("video", {
|
|
15976
|
+
ref: videoRef,
|
|
15977
|
+
autoPlay: true,
|
|
15978
|
+
playsInline: true,
|
|
15979
|
+
style: {
|
|
15980
|
+
maxWidth: "100%",
|
|
15981
|
+
maxHeight: "80%",
|
|
15982
|
+
backgroundColor: "black",
|
|
15983
|
+
transform: "scaleX(-1)"
|
|
15984
|
+
}
|
|
15985
|
+
}), /*#__PURE__*/React.createElement("canvas", {
|
|
15986
|
+
ref: canvasRef,
|
|
15987
|
+
style: {
|
|
15988
|
+
display: "none"
|
|
15989
|
+
}
|
|
15990
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
15991
|
+
style: {
|
|
15992
|
+
marginTop: "20px",
|
|
15993
|
+
display: "flex",
|
|
15994
|
+
gap: "20px"
|
|
15995
|
+
}
|
|
15996
|
+
}, !error && /*#__PURE__*/React.createElement("button", {
|
|
15997
|
+
type: "button",
|
|
15998
|
+
onClick: capturePhoto,
|
|
15999
|
+
style: {
|
|
16000
|
+
padding: "10px 20px",
|
|
16001
|
+
background: "#00497e",
|
|
16002
|
+
color: "white",
|
|
16003
|
+
border: "none",
|
|
16004
|
+
borderRadius: "4px",
|
|
16005
|
+
cursor: "pointer",
|
|
16006
|
+
fontWeight: "bold"
|
|
16007
|
+
}
|
|
16008
|
+
}, t("WS_CAPTURE_PHOTO") || "Capture"), /*#__PURE__*/React.createElement("button", {
|
|
16009
|
+
type: "button",
|
|
16010
|
+
onClick: onClose,
|
|
16011
|
+
style: {
|
|
16012
|
+
padding: "10px 20px",
|
|
16013
|
+
background: "white",
|
|
16014
|
+
color: "#00497e",
|
|
16015
|
+
border: "1px solid #00497e",
|
|
16016
|
+
borderRadius: "4px",
|
|
16017
|
+
cursor: "pointer",
|
|
16018
|
+
fontWeight: "bold"
|
|
16019
|
+
}
|
|
16020
|
+
}, t("CS_COMMON_CANCEL") || "Cancel")));
|
|
16021
|
+
};
|
|
15342
16022
|
|
|
15343
16023
|
const createConnectionDetails$2 = () => ({
|
|
15344
16024
|
water: true,
|
|
@@ -19157,6 +19837,551 @@ const PlumberDetails$1 = _props => {
|
|
|
19157
19837
|
}, localFormState.touched.disConnectionReason ? errors === null || errors === void 0 ? void 0 : (_errors$disConnection4 = errors.disConnectionReason) === null || _errors$disConnection4 === void 0 ? void 0 : _errors$disConnection4.message : "")));
|
|
19158
19838
|
};
|
|
19159
19839
|
|
|
19840
|
+
const WSBankDetails = ({
|
|
19841
|
+
config,
|
|
19842
|
+
onSelect,
|
|
19843
|
+
userType,
|
|
19844
|
+
formData,
|
|
19845
|
+
setError,
|
|
19846
|
+
formState,
|
|
19847
|
+
clearErrors
|
|
19848
|
+
}) => {
|
|
19849
|
+
var _localFormState$touch, _errors$bankName, _localFormState$touch2, _errors$bankBranchNam, _localFormState$touch3, _errors$ifscCode, _localFormState$touch4, _errors$accountNumber;
|
|
19850
|
+
const {
|
|
19851
|
+
t
|
|
19852
|
+
} = useTranslation();
|
|
19853
|
+
const {
|
|
19854
|
+
control,
|
|
19855
|
+
formState: localFormState,
|
|
19856
|
+
watch,
|
|
19857
|
+
trigger,
|
|
19858
|
+
getValues,
|
|
19859
|
+
setValue
|
|
19860
|
+
} = useForm({
|
|
19861
|
+
defaultValues: (formData === null || formData === void 0 ? void 0 : formData.bankDetails) || {
|
|
19862
|
+
bankName: "",
|
|
19863
|
+
bankBranchName: "",
|
|
19864
|
+
ifscCode: "",
|
|
19865
|
+
accountNumber: "",
|
|
19866
|
+
confirmAccountNumber: "",
|
|
19867
|
+
accountHolderName: ""
|
|
19868
|
+
}
|
|
19869
|
+
});
|
|
19870
|
+
const formValue = watch();
|
|
19871
|
+
const {
|
|
19872
|
+
errors
|
|
19873
|
+
} = localFormState;
|
|
19874
|
+
useEffect(() => {
|
|
19875
|
+
const isDifferent = !lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData.bankDetails, formValue);
|
|
19876
|
+
if (isDifferent) {
|
|
19877
|
+
const timer = setTimeout(() => {
|
|
19878
|
+
onSelect(config === null || config === void 0 ? void 0 : config.key, {
|
|
19879
|
+
...formValue
|
|
19880
|
+
});
|
|
19881
|
+
}, 200);
|
|
19882
|
+
return () => clearTimeout(timer);
|
|
19883
|
+
}
|
|
19884
|
+
}, [formValue]);
|
|
19885
|
+
useEffect(() => {
|
|
19886
|
+
var _formState$errors$con;
|
|
19887
|
+
if (Object.keys(errors).length && !lodash.isEqual(((_formState$errors$con = formState.errors[config.key]) === null || _formState$errors$con === void 0 ? void 0 : _formState$errors$con.type) || {}, errors)) {
|
|
19888
|
+
setError(config.key, {
|
|
19889
|
+
type: errors
|
|
19890
|
+
});
|
|
19891
|
+
} else if (!Object.keys(errors).length && formState.errors[config.key]) {
|
|
19892
|
+
clearErrors(config.key);
|
|
19893
|
+
}
|
|
19894
|
+
}, [errors]);
|
|
19895
|
+
useEffect(() => {
|
|
19896
|
+
const ifsc = formValue === null || formValue === void 0 ? void 0 : formValue.ifscCode;
|
|
19897
|
+
if (ifsc && ifsc.length === 11) {
|
|
19898
|
+
fetch(`https://ifsc.razorpay.com/${ifsc}`).then(response => {
|
|
19899
|
+
if (response.ok) return response.json();
|
|
19900
|
+
throw new Error("Invalid IFSC");
|
|
19901
|
+
}).then(data => {
|
|
19902
|
+
if (data) {
|
|
19903
|
+
setValue("bankName", data.BANK);
|
|
19904
|
+
setValue("bankBranchName", data.BRANCH);
|
|
19905
|
+
}
|
|
19906
|
+
}).catch(err => {
|
|
19907
|
+
console.error("IFSC lookup failed", err);
|
|
19908
|
+
});
|
|
19909
|
+
}
|
|
19910
|
+
}, [formValue === null || formValue === void 0 ? void 0 : formValue.ifscCode]);
|
|
19911
|
+
const errorStyle = {
|
|
19912
|
+
width: "70%",
|
|
19913
|
+
marginLeft: "30%",
|
|
19914
|
+
fontSize: "12px",
|
|
19915
|
+
marginTop: "-21px"
|
|
19916
|
+
};
|
|
19917
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CollapsibleCardPage, {
|
|
19918
|
+
title: t("WS_BANK_DETAILS"),
|
|
19919
|
+
defaultOpen: true
|
|
19920
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19921
|
+
className: "formcomposer-section-grid"
|
|
19922
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
19923
|
+
className: "card-label-smaller"
|
|
19924
|
+
}, t("WS_NAME_OF_BANK") + " *"), /*#__PURE__*/React.createElement("div", {
|
|
19925
|
+
className: "field"
|
|
19926
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
19927
|
+
control: control,
|
|
19928
|
+
name: "bankName",
|
|
19929
|
+
rules: {
|
|
19930
|
+
required: t("CORE_COMMON_REQUIRED_ERRMSG")
|
|
19931
|
+
},
|
|
19932
|
+
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
19933
|
+
value: props.value,
|
|
19934
|
+
placeholder: t("WS_NAME_OF_BANK_PLACEHOLDER"),
|
|
19935
|
+
onChange: e => props.onChange(e.target.value),
|
|
19936
|
+
onBlur: props.onBlur
|
|
19937
|
+
})
|
|
19938
|
+
}))), (_localFormState$touch = localFormState.touched) !== null && _localFormState$touch !== void 0 && _localFormState$touch.bankName ? /*#__PURE__*/React.createElement(CardLabelError, {
|
|
19939
|
+
style: errorStyle
|
|
19940
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$bankName = errors.bankName) === null || _errors$bankName === void 0 ? void 0 : _errors$bankName.message) : null), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
19941
|
+
className: "card-label-smaller"
|
|
19942
|
+
}, t("WS_NAME_OF_BRANCH") + " *"), /*#__PURE__*/React.createElement("div", {
|
|
19943
|
+
className: "field"
|
|
19944
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
19945
|
+
control: control,
|
|
19946
|
+
name: "bankBranchName",
|
|
19947
|
+
rules: {
|
|
19948
|
+
required: t("CORE_COMMON_REQUIRED_ERRMSG")
|
|
19949
|
+
},
|
|
19950
|
+
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
19951
|
+
value: props.value,
|
|
19952
|
+
placeholder: t("WS_NAME_OF_BRANCH_PLACEHOLDER"),
|
|
19953
|
+
onChange: e => props.onChange(e.target.value),
|
|
19954
|
+
onBlur: props.onBlur
|
|
19955
|
+
})
|
|
19956
|
+
}))), (_localFormState$touch2 = localFormState.touched) !== null && _localFormState$touch2 !== void 0 && _localFormState$touch2.bankBranchName ? /*#__PURE__*/React.createElement(CardLabelError, {
|
|
19957
|
+
style: errorStyle
|
|
19958
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$bankBranchNam = errors.bankBranchName) === null || _errors$bankBranchNam === void 0 ? void 0 : _errors$bankBranchNam.message) : null), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
19959
|
+
className: "card-label-smaller"
|
|
19960
|
+
}, t("WS_IFSC_CODE") + " *"), /*#__PURE__*/React.createElement("div", {
|
|
19961
|
+
className: "field"
|
|
19962
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
19963
|
+
control: control,
|
|
19964
|
+
name: "ifscCode",
|
|
19965
|
+
rules: {
|
|
19966
|
+
required: t("CORE_COMMON_REQUIRED_ERRMSG"),
|
|
19967
|
+
pattern: {
|
|
19968
|
+
value: /^[A-Z]{4}0[A-Z0-9]{6}$/,
|
|
19969
|
+
message: t("ERR_INVALID_IFSC_CODE")
|
|
19970
|
+
}
|
|
19971
|
+
},
|
|
19972
|
+
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
19973
|
+
value: props.value,
|
|
19974
|
+
placeholder: t("WS_IFSC_CODE_PLACEHOLDER"),
|
|
19975
|
+
onChange: e => props.onChange(e.target.value.toUpperCase()),
|
|
19976
|
+
onBlur: props.onBlur
|
|
19977
|
+
})
|
|
19978
|
+
}))), (_localFormState$touch3 = localFormState.touched) !== null && _localFormState$touch3 !== void 0 && _localFormState$touch3.ifscCode ? /*#__PURE__*/React.createElement(CardLabelError, {
|
|
19979
|
+
style: errorStyle
|
|
19980
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$ifscCode = errors.ifscCode) === null || _errors$ifscCode === void 0 ? void 0 : _errors$ifscCode.message) : null), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
19981
|
+
className: "card-label-smaller"
|
|
19982
|
+
}, t("WS_BANK_ACCOUNT_NO") + " *"), /*#__PURE__*/React.createElement("div", {
|
|
19983
|
+
className: "field"
|
|
19984
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
19985
|
+
control: control,
|
|
19986
|
+
name: "accountNumber",
|
|
19987
|
+
rules: {
|
|
19988
|
+
required: t("CORE_COMMON_REQUIRED_ERRMSG"),
|
|
19989
|
+
pattern: {
|
|
19990
|
+
value: /^[0-9]{9,18}$/,
|
|
19991
|
+
message: t("ERR_INVALID_BA_ACCOUNT_NUMBER")
|
|
19992
|
+
}
|
|
19993
|
+
},
|
|
19994
|
+
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
19995
|
+
value: props.value,
|
|
19996
|
+
placeholder: t("WS_BANK_ACCOUNT_NO_PLACEHOLDER"),
|
|
19997
|
+
onChange: e => props.onChange(e.target.value),
|
|
19998
|
+
onBlur: props.onBlur
|
|
19999
|
+
})
|
|
20000
|
+
}))), (_localFormState$touch4 = localFormState.touched) !== null && _localFormState$touch4 !== void 0 && _localFormState$touch4.accountNumber ? /*#__PURE__*/React.createElement(CardLabelError, {
|
|
20001
|
+
style: errorStyle
|
|
20002
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$accountNumber = errors.accountNumber) === null || _errors$accountNumber === void 0 ? void 0 : _errors$accountNumber.message) : null), /*#__PURE__*/React.createElement("div", {
|
|
20003
|
+
style: {
|
|
20004
|
+
display: "none"
|
|
20005
|
+
}
|
|
20006
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
20007
|
+
control: control,
|
|
20008
|
+
name: "confirmAccountNumber",
|
|
20009
|
+
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
20010
|
+
value: props.value
|
|
20011
|
+
})
|
|
20012
|
+
}), /*#__PURE__*/React.createElement(Controller, {
|
|
20013
|
+
control: control,
|
|
20014
|
+
name: "accountHolderName",
|
|
20015
|
+
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
20016
|
+
value: props.value
|
|
20017
|
+
})
|
|
20018
|
+
})))));
|
|
20019
|
+
};
|
|
20020
|
+
|
|
20021
|
+
const WSDeclaration = ({
|
|
20022
|
+
config,
|
|
20023
|
+
onSelect,
|
|
20024
|
+
userType,
|
|
20025
|
+
formData,
|
|
20026
|
+
setError,
|
|
20027
|
+
formState,
|
|
20028
|
+
clearErrors,
|
|
20029
|
+
tenantId
|
|
20030
|
+
}) => {
|
|
20031
|
+
var _formData$declaration, _formData$declaration2, _formData$declaration3, _formData$declaration4, _formData$declaration5, _formData$declaration6, _formData$declaration7, _formData$declaration8;
|
|
20032
|
+
const {
|
|
20033
|
+
t
|
|
20034
|
+
} = useTranslation();
|
|
20035
|
+
const [signatureFileStoreId, setSignatureFileStoreId] = useState((formData === null || formData === void 0 ? void 0 : (_formData$declaration = formData.declarationData) === null || _formData$declaration === void 0 ? void 0 : _formData$declaration.signatureFileStoreId) || null);
|
|
20036
|
+
const [signatureFile, setSignatureFile] = useState((formData === null || formData === void 0 ? void 0 : (_formData$declaration2 = formData.declarationData) === null || _formData$declaration2 === void 0 ? void 0 : _formData$declaration2.signatureFile) || null);
|
|
20037
|
+
const {
|
|
20038
|
+
control,
|
|
20039
|
+
formState: localFormState,
|
|
20040
|
+
watch,
|
|
20041
|
+
trigger,
|
|
20042
|
+
getValues,
|
|
20043
|
+
setValue
|
|
20044
|
+
} = useForm({
|
|
20045
|
+
defaultValues: {
|
|
20046
|
+
agree: (formData === null || formData === void 0 ? void 0 : (_formData$declaration3 = formData.declarationData) === null || _formData$declaration3 === void 0 ? void 0 : _formData$declaration3.agree) || false,
|
|
20047
|
+
submittedBy: (formData === null || formData === void 0 ? void 0 : (_formData$declaration4 = formData.declarationData) === null || _formData$declaration4 === void 0 ? void 0 : _formData$declaration4.submittedBy) || {
|
|
20048
|
+
code: "SELF",
|
|
20049
|
+
i18nKey: "WS_SUBMITTED_BY_SELF"
|
|
20050
|
+
},
|
|
20051
|
+
signatureFile: (formData === null || formData === void 0 ? void 0 : (_formData$declaration5 = formData.declarationData) === null || _formData$declaration5 === void 0 ? void 0 : _formData$declaration5.signatureFile) || null,
|
|
20052
|
+
signatureFileStoreId: (formData === null || formData === void 0 ? void 0 : (_formData$declaration6 = formData.declarationData) === null || _formData$declaration6 === void 0 ? void 0 : _formData$declaration6.signatureFileStoreId) || null,
|
|
20053
|
+
declarations: (formData === null || formData === void 0 ? void 0 : (_formData$declaration7 = formData.declarationData) === null || _formData$declaration7 === void 0 ? void 0 : _formData$declaration7.declarations) || Array(9).fill((formData === null || formData === void 0 ? void 0 : (_formData$declaration8 = formData.declarationData) === null || _formData$declaration8 === void 0 ? void 0 : _formData$declaration8.agree) || false)
|
|
20054
|
+
}
|
|
20055
|
+
});
|
|
20056
|
+
const formValue = watch();
|
|
20057
|
+
const {
|
|
20058
|
+
isWSServicesMastersLoading,
|
|
20059
|
+
data: wsServicesMastersData
|
|
20060
|
+
} = Digit.Hooks.ws.useMDMS("dl.djb", "ws-services-masters", ["Declaration"]);
|
|
20061
|
+
const [declarationPoints, setDeclarationPoints] = useState([]);
|
|
20062
|
+
useEffect(() => {
|
|
20063
|
+
var _wsServicesMastersDat;
|
|
20064
|
+
if (wsServicesMastersData !== null && wsServicesMastersData !== void 0 && (_wsServicesMastersDat = wsServicesMastersData["ws-services-masters"]) !== null && _wsServicesMastersDat !== void 0 && _wsServicesMastersDat.Declaration) {
|
|
20065
|
+
setDeclarationPoints(wsServicesMastersData["ws-services-masters"].Declaration);
|
|
20066
|
+
}
|
|
20067
|
+
}, [wsServicesMastersData]);
|
|
20068
|
+
const submittedByOptions = [{
|
|
20069
|
+
code: "SELF",
|
|
20070
|
+
i18nKey: "WS_SUBMITTED_BY_SELF"
|
|
20071
|
+
}];
|
|
20072
|
+
useEffect(() => {
|
|
20073
|
+
var _formData$declaration9, _formData$declaration1;
|
|
20074
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$declaration9 = formData.declarationData) === null || _formData$declaration9 === void 0 ? void 0 : _formData$declaration9.signatureFileStoreId) !== signatureFileStoreId) {
|
|
20075
|
+
var _formData$declaration0;
|
|
20076
|
+
const fsId = (formData === null || formData === void 0 ? void 0 : (_formData$declaration0 = formData.declarationData) === null || _formData$declaration0 === void 0 ? void 0 : _formData$declaration0.signatureFileStoreId) || null;
|
|
20077
|
+
setSignatureFileStoreId(fsId);
|
|
20078
|
+
setValue("signatureFileStoreId", fsId);
|
|
20079
|
+
}
|
|
20080
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$declaration1 = formData.declarationData) === null || _formData$declaration1 === void 0 ? void 0 : _formData$declaration1.signatureFile) !== signatureFile) {
|
|
20081
|
+
var _formData$declaration10;
|
|
20082
|
+
const file = (formData === null || formData === void 0 ? void 0 : (_formData$declaration10 = formData.declarationData) === null || _formData$declaration10 === void 0 ? void 0 : _formData$declaration10.signatureFile) || null;
|
|
20083
|
+
setSignatureFile(file);
|
|
20084
|
+
setValue("signatureFile", file);
|
|
20085
|
+
}
|
|
20086
|
+
}, [formData === null || formData === void 0 ? void 0 : formData.declarationData]);
|
|
20087
|
+
useEffect(() => {
|
|
20088
|
+
const currentValues = {
|
|
20089
|
+
...formValue,
|
|
20090
|
+
signatureFileStoreId,
|
|
20091
|
+
signatureFile
|
|
20092
|
+
};
|
|
20093
|
+
const isDifferent = !lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData.declarationData, currentValues);
|
|
20094
|
+
if (isDifferent) {
|
|
20095
|
+
const timer = setTimeout(() => {
|
|
20096
|
+
onSelect(config === null || config === void 0 ? void 0 : config.key, currentValues);
|
|
20097
|
+
}, 200);
|
|
20098
|
+
return () => clearTimeout(timer);
|
|
20099
|
+
}
|
|
20100
|
+
}, [formValue, signatureFileStoreId, signatureFile]);
|
|
20101
|
+
const onUploadSignature = async e => {
|
|
20102
|
+
var _e$target$files;
|
|
20103
|
+
const file = (_e$target$files = e.target.files) === null || _e$target$files === void 0 ? void 0 : _e$target$files[0];
|
|
20104
|
+
if (file) {
|
|
20105
|
+
if (file.size >= 5242880) ; else {
|
|
20106
|
+
try {
|
|
20107
|
+
var _response$data, _response$data$files;
|
|
20108
|
+
const response = await Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId());
|
|
20109
|
+
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
20110
|
+
var _response$data2, _response$data2$files;
|
|
20111
|
+
const fsId = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId;
|
|
20112
|
+
setSignatureFileStoreId(fsId);
|
|
20113
|
+
setSignatureFile(file);
|
|
20114
|
+
setValue("signatureFileStoreId", fsId);
|
|
20115
|
+
setValue("signatureFile", file);
|
|
20116
|
+
}
|
|
20117
|
+
} catch (err) {
|
|
20118
|
+
console.error("Signature upload failed", err);
|
|
20119
|
+
}
|
|
20120
|
+
}
|
|
20121
|
+
}
|
|
20122
|
+
};
|
|
20123
|
+
const [showDocModal, setShowDocModal] = useState(false);
|
|
20124
|
+
const [docFileUrl, setDocFileUrl] = useState("");
|
|
20125
|
+
const [docFileType, setDocFileType] = useState("");
|
|
20126
|
+
const viewDocument = async () => {
|
|
20127
|
+
if (signatureFileStoreId) {
|
|
20128
|
+
try {
|
|
20129
|
+
const res = await Digit.UploadServices.FileFetchbyid(signatureFileStoreId, Digit.ULBService.getStateId());
|
|
20130
|
+
if (res !== null && res !== void 0 && res.data) {
|
|
20131
|
+
const blob = res.data instanceof Blob ? res.data : new Blob([res.data], {
|
|
20132
|
+
type: res.headers["content-type"] || res.headers["Content-Type"] || "image/jpeg"
|
|
20133
|
+
});
|
|
20134
|
+
const fileURL = URL.createObjectURL(blob);
|
|
20135
|
+
setDocFileUrl(fileURL);
|
|
20136
|
+
const contentType = res.headers["content-type"] || res.headers["Content-Type"] || "";
|
|
20137
|
+
if (contentType.toLowerCase().includes("pdf")) {
|
|
20138
|
+
setDocFileType("pdf");
|
|
20139
|
+
} else {
|
|
20140
|
+
setDocFileType("image");
|
|
20141
|
+
}
|
|
20142
|
+
setShowDocModal(true);
|
|
20143
|
+
}
|
|
20144
|
+
} catch (err) {
|
|
20145
|
+
console.error("Failed to fetch file URL via FileFetchbyid", err);
|
|
20146
|
+
}
|
|
20147
|
+
}
|
|
20148
|
+
};
|
|
20149
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CollapsibleCardPage, {
|
|
20150
|
+
title: t("WS_DECLARATION"),
|
|
20151
|
+
defaultOpen: true
|
|
20152
|
+
}, /*#__PURE__*/React.createElement("div", null, declarationPoints.map((point, index) => /*#__PURE__*/React.createElement("div", {
|
|
20153
|
+
key: index,
|
|
20154
|
+
style: {
|
|
20155
|
+
display: "flex",
|
|
20156
|
+
alignItems: "flex-start",
|
|
20157
|
+
padding: "10px 0",
|
|
20158
|
+
borderBottom: "1px solid #eee"
|
|
20159
|
+
}
|
|
20160
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
20161
|
+
style: {
|
|
20162
|
+
fontSize: "14px",
|
|
20163
|
+
lineHeight: "1.5",
|
|
20164
|
+
marginRight: "8px",
|
|
20165
|
+
fontWeight: "bold"
|
|
20166
|
+
}
|
|
20167
|
+
}, index + 1, "."), /*#__PURE__*/React.createElement("span", {
|
|
20168
|
+
style: {
|
|
20169
|
+
fontSize: "14px",
|
|
20170
|
+
lineHeight: "1.5",
|
|
20171
|
+
flex: 1
|
|
20172
|
+
}
|
|
20173
|
+
}, t(point.code) !== point.code ? t(point.code) : point.description)))), /*#__PURE__*/React.createElement("div", {
|
|
20174
|
+
style: {
|
|
20175
|
+
marginTop: "10px"
|
|
20176
|
+
}
|
|
20177
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
20178
|
+
control: control,
|
|
20179
|
+
name: "agree",
|
|
20180
|
+
render: props => /*#__PURE__*/React.createElement(CheckBox, {
|
|
20181
|
+
label: t("WS_I_AGREE_TO_ALL_DECLARATIONS") || "I agree to all the above declarations",
|
|
20182
|
+
checked: props.value,
|
|
20183
|
+
onChange: e => {
|
|
20184
|
+
const val = e.target.checked;
|
|
20185
|
+
setValue("declarations", Array(9).fill(val));
|
|
20186
|
+
props.onChange(val);
|
|
20187
|
+
}
|
|
20188
|
+
})
|
|
20189
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
20190
|
+
className: "formcomposer-section-grid"
|
|
20191
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_SUBMITTED_BY")), /*#__PURE__*/React.createElement("div", {
|
|
20192
|
+
className: "field"
|
|
20193
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
20194
|
+
control: control,
|
|
20195
|
+
name: "submittedBy",
|
|
20196
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
20197
|
+
option: submittedByOptions,
|
|
20198
|
+
optionKey: "i18nKey",
|
|
20199
|
+
selected: props.value,
|
|
20200
|
+
select: props.onChange,
|
|
20201
|
+
t: t
|
|
20202
|
+
})
|
|
20203
|
+
})))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_UPLOAD_SIGNATURE_FILE")), /*#__PURE__*/React.createElement("div", {
|
|
20204
|
+
className: "field",
|
|
20205
|
+
style: {
|
|
20206
|
+
display: "flex",
|
|
20207
|
+
gap: "10px",
|
|
20208
|
+
alignItems: "center"
|
|
20209
|
+
}
|
|
20210
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
20211
|
+
style: {
|
|
20212
|
+
flex: 1
|
|
20213
|
+
}
|
|
20214
|
+
}, /*#__PURE__*/React.createElement(UploadFile, {
|
|
20215
|
+
onUpload: onUploadSignature,
|
|
20216
|
+
onDelete: () => {
|
|
20217
|
+
setSignatureFile(null);
|
|
20218
|
+
setSignatureFileStoreId(null);
|
|
20219
|
+
setValue("signatureFile", null);
|
|
20220
|
+
setValue("signatureFileStoreId", null);
|
|
20221
|
+
},
|
|
20222
|
+
id: "ws-declaration-signature",
|
|
20223
|
+
message: signatureFileStoreId ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`CS_ACTION_NO_FILEUPLOADED`),
|
|
20224
|
+
textStyles: {
|
|
20225
|
+
width: "100%"
|
|
20226
|
+
},
|
|
20227
|
+
buttonType: "button",
|
|
20228
|
+
accept: "image/*, .pdf, .png, .jpeg, .jpg"
|
|
20229
|
+
})), signatureFileStoreId && /*#__PURE__*/React.createElement("div", {
|
|
20230
|
+
onClick: viewDocument,
|
|
20231
|
+
style: {
|
|
20232
|
+
cursor: "pointer"
|
|
20233
|
+
}
|
|
20234
|
+
}, /*#__PURE__*/React.createElement(ViewsIcon, null))))))), showDocModal && /*#__PURE__*/React.createElement(Modal, {
|
|
20235
|
+
open: showDocModal,
|
|
20236
|
+
headerBarMain: t("WS_VIEW_DOCUMENT") || "View Document",
|
|
20237
|
+
headerBarEnd: /*#__PURE__*/React.createElement("div", {
|
|
20238
|
+
className: "icon-bg-secondary",
|
|
20239
|
+
onClick: () => setShowDocModal(false),
|
|
20240
|
+
style: {
|
|
20241
|
+
cursor: "pointer",
|
|
20242
|
+
padding: "5px"
|
|
20243
|
+
}
|
|
20244
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
20245
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
20246
|
+
viewBox: "0 0 24 24",
|
|
20247
|
+
fill: "#FFFFFF",
|
|
20248
|
+
width: "24",
|
|
20249
|
+
height: "24"
|
|
20250
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
20251
|
+
d: "M0 0h24v24H0V0z",
|
|
20252
|
+
fill: "none"
|
|
20253
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
20254
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
20255
|
+
}))),
|
|
20256
|
+
center: true,
|
|
20257
|
+
actionCancelOnSubmit: () => setShowDocModal(false),
|
|
20258
|
+
actionCancelLabel: t("CS_COMMON_CLOSE") || "Close",
|
|
20259
|
+
popupStyles: {
|
|
20260
|
+
width: "80%",
|
|
20261
|
+
maxWidth: "800px"
|
|
20262
|
+
}
|
|
20263
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
20264
|
+
style: {
|
|
20265
|
+
display: "flex",
|
|
20266
|
+
justifyContent: "center",
|
|
20267
|
+
alignItems: "center",
|
|
20268
|
+
padding: "20px",
|
|
20269
|
+
minHeight: "300px"
|
|
20270
|
+
}
|
|
20271
|
+
}, docFileType === "pdf" ? /*#__PURE__*/React.createElement("iframe", {
|
|
20272
|
+
src: docFileUrl,
|
|
20273
|
+
title: "Document Preview",
|
|
20274
|
+
width: "100%",
|
|
20275
|
+
height: "500px",
|
|
20276
|
+
style: {
|
|
20277
|
+
border: "none"
|
|
20278
|
+
}
|
|
20279
|
+
}) : /*#__PURE__*/React.createElement("img", {
|
|
20280
|
+
src: docFileUrl,
|
|
20281
|
+
alt: "Document Preview",
|
|
20282
|
+
style: {
|
|
20283
|
+
maxWidth: "100%",
|
|
20284
|
+
maxHeight: "500px",
|
|
20285
|
+
objectFit: "contain",
|
|
20286
|
+
borderRadius: "4px"
|
|
20287
|
+
}
|
|
20288
|
+
}))));
|
|
20289
|
+
};
|
|
20290
|
+
|
|
20291
|
+
const WSDjbEmployee = ({
|
|
20292
|
+
config,
|
|
20293
|
+
onSelect,
|
|
20294
|
+
userType,
|
|
20295
|
+
formData,
|
|
20296
|
+
setError,
|
|
20297
|
+
formState,
|
|
20298
|
+
clearErrors
|
|
20299
|
+
}) => {
|
|
20300
|
+
const {
|
|
20301
|
+
t
|
|
20302
|
+
} = useTranslation();
|
|
20303
|
+
const {
|
|
20304
|
+
control,
|
|
20305
|
+
watch,
|
|
20306
|
+
setValue,
|
|
20307
|
+
formState: localFormState
|
|
20308
|
+
} = useForm({
|
|
20309
|
+
defaultValues: (formData === null || formData === void 0 ? void 0 : formData.djbEmployee) || {
|
|
20310
|
+
isDjbEmployee: false,
|
|
20311
|
+
employeeId: "",
|
|
20312
|
+
dor: "",
|
|
20313
|
+
designation: ""
|
|
20314
|
+
}
|
|
20315
|
+
});
|
|
20316
|
+
const formValue = watch();
|
|
20317
|
+
const isDjbEmployee = watch("isDjbEmployee");
|
|
20318
|
+
useEffect(() => {
|
|
20319
|
+
const isDifferent = !lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData.djbEmployee, formValue);
|
|
20320
|
+
if (isDifferent) {
|
|
20321
|
+
const timer = setTimeout(() => {
|
|
20322
|
+
onSelect(config === null || config === void 0 ? void 0 : config.key, {
|
|
20323
|
+
...formValue
|
|
20324
|
+
});
|
|
20325
|
+
}, 200);
|
|
20326
|
+
return () => clearTimeout(timer);
|
|
20327
|
+
}
|
|
20328
|
+
}, [formValue]);
|
|
20329
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CollapsibleCardPage, {
|
|
20330
|
+
title: t("WS_DJB_EMPLOYEE"),
|
|
20331
|
+
defaultOpen: true
|
|
20332
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
20333
|
+
style: {
|
|
20334
|
+
marginBottom: "24px"
|
|
20335
|
+
}
|
|
20336
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
20337
|
+
control: control,
|
|
20338
|
+
name: "isDjbEmployee",
|
|
20339
|
+
render: props => /*#__PURE__*/React.createElement(CheckBox, {
|
|
20340
|
+
label: t("WS_DJB_EMPLOYEE"),
|
|
20341
|
+
checked: props.value,
|
|
20342
|
+
onChange: e => props.onChange(e.target.checked)
|
|
20343
|
+
})
|
|
20344
|
+
})), isDjbEmployee && /*#__PURE__*/React.createElement("div", {
|
|
20345
|
+
className: "formcomposer-section-grid"
|
|
20346
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_EMPLOYEE_ID") + " *"), /*#__PURE__*/React.createElement(Controller, {
|
|
20347
|
+
control: control,
|
|
20348
|
+
name: "employeeId",
|
|
20349
|
+
rules: {
|
|
20350
|
+
required: isDjbEmployee ? t("CORE_COMMON_REQUIRED_ERRMSG") : false
|
|
20351
|
+
},
|
|
20352
|
+
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
20353
|
+
value: props.value,
|
|
20354
|
+
onChange: e => props.onChange(e.target.value),
|
|
20355
|
+
onBlur: props.onBlur
|
|
20356
|
+
})
|
|
20357
|
+
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_DATE_OF_RETIREMENT") + " *"), /*#__PURE__*/React.createElement("div", {
|
|
20358
|
+
className: "field"
|
|
20359
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
20360
|
+
control: control,
|
|
20361
|
+
name: "dor",
|
|
20362
|
+
rules: {
|
|
20363
|
+
required: isDjbEmployee ? t("CORE_COMMON_REQUIRED_ERRMSG") : false
|
|
20364
|
+
},
|
|
20365
|
+
render: props => /*#__PURE__*/React.createElement(DatePicker, {
|
|
20366
|
+
value: props.value,
|
|
20367
|
+
onChange: date => props.onChange(date)
|
|
20368
|
+
})
|
|
20369
|
+
})))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_EMPLOYEE_DESIGNATION") + " *"), /*#__PURE__*/React.createElement("div", {
|
|
20370
|
+
className: "field"
|
|
20371
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
20372
|
+
control: control,
|
|
20373
|
+
name: "designation",
|
|
20374
|
+
rules: {
|
|
20375
|
+
required: isDjbEmployee ? t("CORE_COMMON_REQUIRED_ERRMSG") : false
|
|
20376
|
+
},
|
|
20377
|
+
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
20378
|
+
value: props.value,
|
|
20379
|
+
onChange: e => props.onChange(e.target.value),
|
|
20380
|
+
onBlur: props.onBlur
|
|
20381
|
+
})
|
|
20382
|
+
})))))));
|
|
20383
|
+
};
|
|
20384
|
+
|
|
19160
20385
|
function _extends() {
|
|
19161
20386
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
19162
20387
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -21867,10 +23092,6 @@ const WSCard = () => {
|
|
|
21867
23092
|
}, [wsData]);
|
|
21868
23093
|
let links = [{
|
|
21869
23094
|
label: t("WS_APPLY_NEW_CONNECTION_HOME_CARD_LABEL"),
|
|
21870
|
-
link: `/digit-ui/employee/ws/create-application`,
|
|
21871
|
-
roles: ["WS_CEMP", "SW_CEMP"]
|
|
21872
|
-
}, {
|
|
21873
|
-
label: t("WS_APPLY_OLD_CONNECTION_HOME_CARD_LABEL"),
|
|
21874
23095
|
link: `/digit-ui/employee/ws/old-application`,
|
|
21875
23096
|
roles: ["WS_CEMP", "SW_CEMP"]
|
|
21876
23097
|
}];
|
|
@@ -22816,7 +24037,6 @@ const newConfig = [{
|
|
|
22816
24037
|
hideInCitizen: true
|
|
22817
24038
|
}]
|
|
22818
24039
|
}, {
|
|
22819
|
-
head: "WS_COMMON_PROPERTY_DETAILS",
|
|
22820
24040
|
isEditConnection: true,
|
|
22821
24041
|
isCreateConnection: true,
|
|
22822
24042
|
isModifyConnection: true,
|
|
@@ -22863,8 +24083,6 @@ const newConfig = [{
|
|
|
22863
24083
|
withoutLabel: true
|
|
22864
24084
|
}]
|
|
22865
24085
|
}, {
|
|
22866
|
-
head: "WS_COMMON_CONNECTION_DETAIL",
|
|
22867
|
-
subHead: "WS_CONNECTION_DETAILS_HEADER_SUB_TEXT_LABEL",
|
|
22868
24086
|
isEditConnection: false,
|
|
22869
24087
|
isCreateConnection: true,
|
|
22870
24088
|
body: [{
|
|
@@ -22945,7 +24163,6 @@ const newConfig = [{
|
|
|
22945
24163
|
hideInCitizen: true
|
|
22946
24164
|
}]
|
|
22947
24165
|
}, {
|
|
22948
|
-
head: "WS_COMMON_PROPERTY_DETAILS",
|
|
22949
24166
|
isEditConnection: true,
|
|
22950
24167
|
isCreateConnection: true,
|
|
22951
24168
|
isModifyConnection: true,
|
|
@@ -22992,7 +24209,6 @@ const newConfig = [{
|
|
|
22992
24209
|
withoutLabel: true
|
|
22993
24210
|
}]
|
|
22994
24211
|
}, {
|
|
22995
|
-
head: "WS_COMMON_CONNECTION_DETAIL",
|
|
22996
24212
|
isEditConnection: false,
|
|
22997
24213
|
isCreateConnection: true,
|
|
22998
24214
|
body: [{
|
|
@@ -23073,7 +24289,6 @@ const newConfig = [{
|
|
|
23073
24289
|
hideInCitizen: true
|
|
23074
24290
|
}]
|
|
23075
24291
|
}, {
|
|
23076
|
-
head: "WS_COMMON_PROPERTY_DETAILS",
|
|
23077
24292
|
isEditConnection: true,
|
|
23078
24293
|
isCreateConnection: true,
|
|
23079
24294
|
isModifyConnection: true,
|
|
@@ -23120,7 +24335,6 @@ const newConfig = [{
|
|
|
23120
24335
|
withoutLabel: true
|
|
23121
24336
|
}]
|
|
23122
24337
|
}, {
|
|
23123
|
-
head: "WS_COMMON_CONNECTION_DETAIL",
|
|
23124
24338
|
isEditConnection: false,
|
|
23125
24339
|
isCreateConnection: true,
|
|
23126
24340
|
body: [{
|
|
@@ -23201,7 +24415,6 @@ const newConfig = [{
|
|
|
23201
24415
|
hideInCitizen: true
|
|
23202
24416
|
}]
|
|
23203
24417
|
}, {
|
|
23204
|
-
head: "WS_COMMON_PROPERTY_DETAILS",
|
|
23205
24418
|
isEditConnection: true,
|
|
23206
24419
|
isCreateConnection: true,
|
|
23207
24420
|
isModifyConnection: true,
|
|
@@ -31151,7 +32364,7 @@ const ViewIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
31151
32364
|
cy: "12",
|
|
31152
32365
|
r: "3"
|
|
31153
32366
|
}));
|
|
31154
|
-
const CameraCaptureModal = ({
|
|
32367
|
+
const CameraCaptureModal$1 = ({
|
|
31155
32368
|
onCapture,
|
|
31156
32369
|
onClose,
|
|
31157
32370
|
t
|
|
@@ -34127,13 +35340,122 @@ const NewApplication = () => {
|
|
|
34127
35340
|
label: showToast === null || showToast === void 0 ? void 0 : showToast.message,
|
|
34128
35341
|
onClose: closeToast,
|
|
34129
35342
|
warning: showToast === null || showToast === void 0 ? void 0 : showToast.warning
|
|
34130
|
-
}) : null, showCamera && /*#__PURE__*/React.createElement(CameraCaptureModal, {
|
|
35343
|
+
}) : null, showCamera && /*#__PURE__*/React.createElement(CameraCaptureModal$1, {
|
|
34131
35344
|
onCapture: handleCapture,
|
|
34132
35345
|
onClose: () => setShowCamera(false),
|
|
34133
35346
|
t: t
|
|
34134
35347
|
}));
|
|
34135
35348
|
};
|
|
34136
35349
|
|
|
35350
|
+
const CheckIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
35351
|
+
width: "14",
|
|
35352
|
+
height: "14",
|
|
35353
|
+
viewBox: "0 0 24 24",
|
|
35354
|
+
fill: "none",
|
|
35355
|
+
stroke: "currentColor",
|
|
35356
|
+
strokeWidth: "3",
|
|
35357
|
+
strokeLinecap: "round",
|
|
35358
|
+
strokeLinejoin: "round"
|
|
35359
|
+
}, /*#__PURE__*/React.createElement("polyline", {
|
|
35360
|
+
points: "20 6 9 17 4 12"
|
|
35361
|
+
}));
|
|
35362
|
+
const ClockIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
35363
|
+
width: "14",
|
|
35364
|
+
height: "14",
|
|
35365
|
+
viewBox: "0 0 24 24",
|
|
35366
|
+
fill: "none",
|
|
35367
|
+
stroke: "currentColor",
|
|
35368
|
+
strokeWidth: "2",
|
|
35369
|
+
strokeLinecap: "round",
|
|
35370
|
+
strokeLinejoin: "round"
|
|
35371
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
35372
|
+
cx: "12",
|
|
35373
|
+
cy: "12",
|
|
35374
|
+
r: "10"
|
|
35375
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
35376
|
+
className: "clock-hands2",
|
|
35377
|
+
points: "12 6 12 12 16 14"
|
|
35378
|
+
}));
|
|
35379
|
+
const WorkflowTimeline = ({
|
|
35380
|
+
workflowDetails,
|
|
35381
|
+
hideTimeline,
|
|
35382
|
+
setHideTimeline
|
|
35383
|
+
}) => {
|
|
35384
|
+
var _workflowDetails$data;
|
|
35385
|
+
const {
|
|
35386
|
+
t
|
|
35387
|
+
} = useTranslation();
|
|
35388
|
+
const timeline = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.processInstances;
|
|
35389
|
+
if (!timeline || timeline.length === 0) {
|
|
35390
|
+
return null;
|
|
35391
|
+
}
|
|
35392
|
+
const getStatusClass = index => {
|
|
35393
|
+
if (index === 0) return "current2";
|
|
35394
|
+
return "completed2";
|
|
35395
|
+
};
|
|
35396
|
+
const convertEpochToDateTime = epoch => {
|
|
35397
|
+
if (!epoch) return "N/A";
|
|
35398
|
+
const date = new Date(epoch);
|
|
35399
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
35400
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
35401
|
+
const year = date.getFullYear().toString().slice(-2);
|
|
35402
|
+
const hours = String(date.getHours()).padStart(2, "0");
|
|
35403
|
+
const minutes = String(date.getMinutes()).padStart(2, "0");
|
|
35404
|
+
return `${day}/${month}/${year} ${hours}:${minutes}`;
|
|
35405
|
+
};
|
|
35406
|
+
return /*#__PURE__*/React.createElement(Card, {
|
|
35407
|
+
className: "workflow-timeline-card2 digit-form-composer",
|
|
35408
|
+
style: {
|
|
35409
|
+
background: "#fff",
|
|
35410
|
+
padding: "16px",
|
|
35411
|
+
height: hideTimeline ? "100%" : ""
|
|
35412
|
+
}
|
|
35413
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
35414
|
+
className: `timeline-header-wrapper ${hideTimeline ? "collapsed" : ""}`
|
|
35415
|
+
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
35416
|
+
style: {
|
|
35417
|
+
marginBottom: "0",
|
|
35418
|
+
fontSize: "16px",
|
|
35419
|
+
fontWeight: "700",
|
|
35420
|
+
color: "#374151"
|
|
35421
|
+
},
|
|
35422
|
+
className: hideTimeline ? "hidden-content" : ""
|
|
35423
|
+
}, t("WORKFLOW_TIMELINE"))), /*#__PURE__*/React.createElement("div", {
|
|
35424
|
+
className: hideTimeline ? "hidden-content" : "timeline-container2"
|
|
35425
|
+
}, timeline.map((checkpoint, index) => {
|
|
35426
|
+
var _checkpoint$auditDeta, _checkpoint$auditDeta2, _checkpoint$state, _checkpoint$state2, _checkpoint$state3, _checkpoint$assigner, _checkpoint$assigner2;
|
|
35427
|
+
const statusClass = getStatusClass(index);
|
|
35428
|
+
const showLine = index !== timeline.length - 1 && timeline.length > 1;
|
|
35429
|
+
const epochTime = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModifiedTime) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta2 = checkpoint.auditDetails) === null || _checkpoint$auditDeta2 === void 0 ? void 0 : _checkpoint$auditDeta2.createdTime);
|
|
35430
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
35431
|
+
key: index,
|
|
35432
|
+
className: `timeline-item2 ${statusClass}`
|
|
35433
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
35434
|
+
className: "timeline-marker2"
|
|
35435
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
35436
|
+
className: "timeline-circle2"
|
|
35437
|
+
}, statusClass === "completed2" ? /*#__PURE__*/React.createElement(CheckIcon, null) : /*#__PURE__*/React.createElement(ClockIcon, null)), showLine && /*#__PURE__*/React.createElement("div", {
|
|
35438
|
+
className: "timeline-line2"
|
|
35439
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
35440
|
+
className: "timeline-content2"
|
|
35441
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
35442
|
+
className: "timeline-header2"
|
|
35443
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
35444
|
+
className: "timeline-title2"
|
|
35445
|
+
}, t(`WF_${checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state = checkpoint.state) === null || _checkpoint$state === void 0 ? void 0 : _checkpoint$state.state}`)), /*#__PURE__*/React.createElement("span", {
|
|
35446
|
+
className: "timeline-date2"
|
|
35447
|
+
}, convertEpochToDateTime(epochTime))), /*#__PURE__*/React.createElement("div", {
|
|
35448
|
+
className: "timeline-body2"
|
|
35449
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
35450
|
+
className: `timeline-status-tag2 status-${statusClass}`
|
|
35451
|
+
}, t((checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state2 = checkpoint.state) === null || _checkpoint$state2 === void 0 ? void 0 : _checkpoint$state2.applicationStatus) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state3 = checkpoint.state) === null || _checkpoint$state3 === void 0 ? void 0 : _checkpoint$state3.state))), (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.comment) && /*#__PURE__*/React.createElement("div", {
|
|
35452
|
+
className: "timeline-comment2"
|
|
35453
|
+
}, checkpoint.comment)), (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name) && /*#__PURE__*/React.createElement("div", {
|
|
35454
|
+
className: "timeline-footer2"
|
|
35455
|
+
}, /*#__PURE__*/React.createElement("span", null, t("ES_COMMON_ASSIGNED_TO"), ": ", /*#__PURE__*/React.createElement("strong", null, checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner2 = checkpoint.assigner) === null || _checkpoint$assigner2 === void 0 ? void 0 : _checkpoint$assigner2.name)))));
|
|
35456
|
+
})));
|
|
35457
|
+
};
|
|
35458
|
+
|
|
34137
35459
|
const configPTApproverApplication = ({
|
|
34138
35460
|
t,
|
|
34139
35461
|
action,
|
|
@@ -37053,23 +38375,26 @@ const ActionModal$b = ({
|
|
|
37053
38375
|
isSuccess
|
|
37054
38376
|
} = Digit.Hooks.fsm.useVehiclesSearch({
|
|
37055
38377
|
tenantId,
|
|
38378
|
+
filters: {
|
|
38379
|
+
vendorId: applicationData === null || applicationData === void 0 ? void 0 : applicationData.vendorId
|
|
38380
|
+
},
|
|
37056
38381
|
config: {
|
|
37057
38382
|
enabled: (action === null || action === void 0 ? void 0 : action.state) === "DELIVERY_PENDING" || (action === null || action === void 0 ? void 0 : action.action) === "ASSIGN_VEHICLE_DRIVER"
|
|
37058
38383
|
}
|
|
37059
38384
|
});
|
|
37060
38385
|
let vehicleDescription = [];
|
|
37061
38386
|
vehicleData === null || vehicleData === void 0 ? void 0 : (_vehicleData$vehicle = vehicleData.vehicle) === null || _vehicleData$vehicle === void 0 ? void 0 : (_vehicleData$vehicle$ = _vehicleData$vehicle.filter(item => {
|
|
37062
|
-
var _item$driverData, _item$driver;
|
|
37063
|
-
return (item === null || item === void 0 ? void 0 : (_item$driverData = item.driverData) === null || _item$driverData === void 0 ? void 0 : _item$driverData.id) || (item === null || item === void 0 ? void 0 : (_item$driver = item.driver) === null || _item$driver === void 0 ? void 0 : _item$driver.id);
|
|
38387
|
+
var _item$driverData, _item$driver, _item$owner2;
|
|
38388
|
+
return (item === null || item === void 0 ? void 0 : (_item$driverData = item.driverData) === null || _item$driverData === void 0 ? void 0 : _item$driverData.id) || (item === null || item === void 0 ? void 0 : (_item$driver = item.driver) === null || _item$driver === void 0 ? void 0 : _item$driver.id) || (item === null || item === void 0 ? void 0 : (_item$owner2 = item.owner) === null || _item$owner2 === void 0 ? void 0 : _item$owner2.id);
|
|
37064
38389
|
})) === null || _vehicleData$vehicle$ === void 0 ? void 0 : _vehicleData$vehicle$.map(item => {
|
|
37065
|
-
var _item$driverData2, _item$driver2;
|
|
38390
|
+
var _item$driverData2, _item$driver2, _item$owner3;
|
|
37066
38391
|
vehicleDescription.push({
|
|
37067
38392
|
code: item === null || item === void 0 ? void 0 : item.registrationNumber,
|
|
37068
38393
|
name: item === null || item === void 0 ? void 0 : item.registrationNumber,
|
|
37069
38394
|
i18nKey: item === null || item === void 0 ? void 0 : item.registrationNumber,
|
|
37070
38395
|
tankerCapacity: item === null || item === void 0 ? void 0 : item.tankCapacity,
|
|
37071
38396
|
vehicleId: item === null || item === void 0 ? void 0 : item.id,
|
|
37072
|
-
driverId: (item === null || item === void 0 ? void 0 : (_item$driverData2 = item.driverData) === null || _item$driverData2 === void 0 ? void 0 : _item$driverData2.ownerId) || (item === null || item === void 0 ? void 0 : (_item$driver2 = item.driver) === null || _item$driver2 === void 0 ? void 0 : _item$driver2.ownerId)
|
|
38397
|
+
driverId: (item === null || item === void 0 ? void 0 : (_item$driverData2 = item.driverData) === null || _item$driverData2 === void 0 ? void 0 : _item$driverData2.ownerId) || (item === null || item === void 0 ? void 0 : (_item$driver2 = item.driver) === null || _item$driver2 === void 0 ? void 0 : _item$driver2.ownerId) || (item === null || item === void 0 ? void 0 : item.ownerId) || (item === null || item === void 0 ? void 0 : (_item$owner3 = item.owner) === null || _item$owner3 === void 0 ? void 0 : _item$owner3.uuid)
|
|
37073
38398
|
});
|
|
37074
38399
|
});
|
|
37075
38400
|
const [config, setConfig] = useState({});
|
|
@@ -38070,10 +39395,11 @@ function PropertyDocuments({
|
|
|
38070
39395
|
const [filesArray, setFilesArray] = useState(() => []);
|
|
38071
39396
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
38072
39397
|
const [pdfFiles, setPdfFiles] = useState({});
|
|
39398
|
+
const [modalFile, setModalFile] = useState(null);
|
|
38073
39399
|
useEffect(() => {
|
|
38074
39400
|
var _acc;
|
|
38075
39401
|
let acc = [];
|
|
38076
|
-
documents === null || documents === void 0 ? void 0 : documents.forEach(
|
|
39402
|
+
documents === null || documents === void 0 ? void 0 : documents.forEach(element => {
|
|
38077
39403
|
acc = [...acc, ...(element.values ? element.values : [])];
|
|
38078
39404
|
});
|
|
38079
39405
|
setFilesArray((_acc = acc) === null || _acc === void 0 ? void 0 : _acc.map(value => value === null || value === void 0 ? void 0 : value.fileStoreId));
|
|
@@ -38091,12 +39417,170 @@ function PropertyDocuments({
|
|
|
38091
39417
|
}
|
|
38092
39418
|
}, [filesArray]);
|
|
38093
39419
|
const checkLocation = window.location.href.includes("employee/tl") || window.location.href.includes("/obps") || window.location.href.includes("employee/ws");
|
|
39420
|
+
const isWSLocation = window.location.href.includes("employee/ws");
|
|
38094
39421
|
const isStakeholderApplication = window.location.href.includes("stakeholder");
|
|
39422
|
+
const getDocSubType = documentType => {
|
|
39423
|
+
if (!documentType) return "";
|
|
39424
|
+
const parts = documentType.split(".");
|
|
39425
|
+
const last = parts[parts.length - 1] || "";
|
|
39426
|
+
return last.replace(/_/g, " ").replace(/\b\w/g, c => c.toUpperCase());
|
|
39427
|
+
};
|
|
39428
|
+
const renderModal = () => {
|
|
39429
|
+
if (!modalFile) return null;
|
|
39430
|
+
const isPdf = modalFile.toLowerCase().includes(".pdf") || modalFile.toLowerCase().includes("pdf");
|
|
39431
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
39432
|
+
headerBarMain: /*#__PURE__*/React.createElement("h1", {
|
|
39433
|
+
className: "heading-m"
|
|
39434
|
+
}, "Document Preview"),
|
|
39435
|
+
headerBarEnd: /*#__PURE__*/React.createElement("div", {
|
|
39436
|
+
onClick: () => setModalFile(null),
|
|
39437
|
+
style: {
|
|
39438
|
+
cursor: "pointer",
|
|
39439
|
+
padding: "5px",
|
|
39440
|
+
marginTop: "-5px"
|
|
39441
|
+
}
|
|
39442
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
39443
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
39444
|
+
viewBox: "0 0 24 24",
|
|
39445
|
+
fill: "#000000",
|
|
39446
|
+
width: "24px",
|
|
39447
|
+
height: "24px"
|
|
39448
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
39449
|
+
d: "M0 0h24v24H0V0z",
|
|
39450
|
+
fill: "none"
|
|
39451
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
39452
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
39453
|
+
}))),
|
|
39454
|
+
hideSubmit: true,
|
|
39455
|
+
popupStyles: {
|
|
39456
|
+
maxWidth: "80vw",
|
|
39457
|
+
width: "100%"
|
|
39458
|
+
},
|
|
39459
|
+
popupModuleMianStyles: {
|
|
39460
|
+
display: "flex",
|
|
39461
|
+
justifyContent: "center",
|
|
39462
|
+
alignItems: "center",
|
|
39463
|
+
padding: "0",
|
|
39464
|
+
overflowY: "hidden"
|
|
39465
|
+
}
|
|
39466
|
+
}, isPdf ? /*#__PURE__*/React.createElement("iframe", {
|
|
39467
|
+
src: modalFile,
|
|
39468
|
+
title: "Document Preview",
|
|
39469
|
+
style: {
|
|
39470
|
+
width: "100%",
|
|
39471
|
+
height: "80vh",
|
|
39472
|
+
border: "none",
|
|
39473
|
+
display: "block"
|
|
39474
|
+
}
|
|
39475
|
+
}) : /*#__PURE__*/React.createElement("img", {
|
|
39476
|
+
src: modalFile,
|
|
39477
|
+
alt: "Document Preview",
|
|
39478
|
+
style: {
|
|
39479
|
+
maxWidth: "100%",
|
|
39480
|
+
maxHeight: "80vh",
|
|
39481
|
+
objectFit: "contain",
|
|
39482
|
+
display: "block"
|
|
39483
|
+
}
|
|
39484
|
+
}));
|
|
39485
|
+
};
|
|
39486
|
+
const renderDocumentRow = (value, index) => {
|
|
39487
|
+
var _pdfFiles$value$fileS;
|
|
39488
|
+
const fileUrl = (_pdfFiles$value$fileS = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS === void 0 ? void 0 : _pdfFiles$value$fileS.split(",")[0];
|
|
39489
|
+
const docSubType = getDocSubType(value === null || value === void 0 ? void 0 : value.documentType);
|
|
39490
|
+
const docUid = (value === null || value === void 0 ? void 0 : value.documentUid) || "";
|
|
39491
|
+
const isPhoto = value === null || value === void 0 ? void 0 : value.isPhoto;
|
|
39492
|
+
let typeLabel = "";
|
|
39493
|
+
let numLabel = "";
|
|
39494
|
+
let uploadLabel = "";
|
|
39495
|
+
if (value.title === "WS_IDENTITY_PROOF") {
|
|
39496
|
+
typeLabel = "Identity Proof*";
|
|
39497
|
+
numLabel = "Identity Proof Document Number";
|
|
39498
|
+
uploadLabel = "Upload Identity Proof Document*";
|
|
39499
|
+
} else if (value.title === "WS_OWNERSHIP_PROOF") {
|
|
39500
|
+
typeLabel = "Ownership Proof*";
|
|
39501
|
+
numLabel = "Ownership Proof Document Number";
|
|
39502
|
+
uploadLabel = "Upload Ownership Proof*";
|
|
39503
|
+
} else if (value.title === "WS_OTHER_DOCUMENTS") {
|
|
39504
|
+
typeLabel = "Other Documents*";
|
|
39505
|
+
numLabel = "Other Document Number";
|
|
39506
|
+
uploadLabel = "Upload Other Documents*";
|
|
39507
|
+
} else if (value.title === "WS_APPLICANT_PHOTO") {
|
|
39508
|
+
uploadLabel = "Upload Applicant Photo*";
|
|
39509
|
+
} else {
|
|
39510
|
+
typeLabel = ((value === null || value === void 0 ? void 0 : value.categoryLabel) || "Document") + "*";
|
|
39511
|
+
numLabel = "Document Number";
|
|
39512
|
+
uploadLabel = "Upload Document*";
|
|
39513
|
+
}
|
|
39514
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
39515
|
+
key: index,
|
|
39516
|
+
style: {
|
|
39517
|
+
marginBottom: "24px"
|
|
39518
|
+
}
|
|
39519
|
+
}, /*#__PURE__*/React.createElement(StatusTable, null, !isPhoto && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
39520
|
+
label: typeLabel,
|
|
39521
|
+
text: docSubType || t("NA")
|
|
39522
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
39523
|
+
label: numLabel,
|
|
39524
|
+
text: docUid || t("NA")
|
|
39525
|
+
})), /*#__PURE__*/React.createElement(Row, {
|
|
39526
|
+
label: uploadLabel,
|
|
39527
|
+
text: /*#__PURE__*/React.createElement("div", {
|
|
39528
|
+
style: {
|
|
39529
|
+
display: "flex",
|
|
39530
|
+
alignItems: "center",
|
|
39531
|
+
gap: "16px"
|
|
39532
|
+
}
|
|
39533
|
+
}, isPhoto ? fileUrl ? /*#__PURE__*/React.createElement("div", {
|
|
39534
|
+
style: {
|
|
39535
|
+
position: "relative"
|
|
39536
|
+
}
|
|
39537
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
39538
|
+
src: fileUrl,
|
|
39539
|
+
alt: "Applicant Photo",
|
|
39540
|
+
style: {
|
|
39541
|
+
width: "100px",
|
|
39542
|
+
height: "100px",
|
|
39543
|
+
objectFit: "cover",
|
|
39544
|
+
borderRadius: "4px",
|
|
39545
|
+
border: "1px solid #ccc"
|
|
39546
|
+
}
|
|
39547
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
|
39548
|
+
style: {
|
|
39549
|
+
fontSize: "14px",
|
|
39550
|
+
color: "#505A5F"
|
|
39551
|
+
}
|
|
39552
|
+
}, t("NA")) : /*#__PURE__*/React.createElement("div", {
|
|
39553
|
+
onClick: () => {
|
|
39554
|
+
if (fileUrl) setModalFile(fileUrl);
|
|
39555
|
+
},
|
|
39556
|
+
disabled: !fileUrl,
|
|
39557
|
+
style: {
|
|
39558
|
+
cursor: "pointer"
|
|
39559
|
+
}
|
|
39560
|
+
}, /*#__PURE__*/React.createElement(ViewsIcon, null)), !isPhoto && /*#__PURE__*/React.createElement("label", {
|
|
39561
|
+
style: {
|
|
39562
|
+
display: "flex",
|
|
39563
|
+
alignItems: "center",
|
|
39564
|
+
gap: "8px",
|
|
39565
|
+
fontSize: "14px",
|
|
39566
|
+
color: "#0B0C0C",
|
|
39567
|
+
margin: 0
|
|
39568
|
+
}
|
|
39569
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
39570
|
+
type: "checkbox",
|
|
39571
|
+
style: {
|
|
39572
|
+
width: "18px",
|
|
39573
|
+
height: "18px",
|
|
39574
|
+
accentColor: "#F47738"
|
|
39575
|
+
}
|
|
39576
|
+
}), "Check Verified"))
|
|
39577
|
+
})));
|
|
39578
|
+
};
|
|
38095
39579
|
return /*#__PURE__*/React.createElement("div", {
|
|
38096
39580
|
style: {
|
|
38097
39581
|
marginTop: "19px"
|
|
38098
39582
|
}
|
|
38099
|
-
}, !isStakeholderApplication && (documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
|
|
39583
|
+
}, renderModal(), !isStakeholderApplication && (documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
|
|
38100
39584
|
var _document$values;
|
|
38101
39585
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
38102
39586
|
key: index
|
|
@@ -38104,7 +39588,7 @@ function PropertyDocuments({
|
|
|
38104
39588
|
style: checkLocation ? {
|
|
38105
39589
|
marginTop: "32px",
|
|
38106
39590
|
marginBottom: "18px",
|
|
38107
|
-
color: "#0B0C0C
|
|
39591
|
+
color: "#0B0C0C",
|
|
38108
39592
|
fontSize: "24px",
|
|
38109
39593
|
lineHeight: "30px"
|
|
38110
39594
|
} : {
|
|
@@ -38113,17 +39597,21 @@ function PropertyDocuments({
|
|
|
38113
39597
|
color: "#505A5F",
|
|
38114
39598
|
fontSize: "24px"
|
|
38115
39599
|
}
|
|
38116
|
-
}, t(document === null || document === void 0 ? void 0 : document.title)) : null, /*#__PURE__*/React.createElement("div", {
|
|
39600
|
+
}, t(document === null || document === void 0 ? void 0 : document.title)) : null, isWSLocation ? /*#__PURE__*/React.createElement("div", {
|
|
39601
|
+
style: {
|
|
39602
|
+
marginTop: "8px"
|
|
39603
|
+
}
|
|
39604
|
+
}, document !== null && document !== void 0 && document.values && (document === null || document === void 0 ? void 0 : document.values.length) > 0 ? document.values.map((value, idx) => renderDocumentRow(value, idx)) : !window.location.href.includes("citizen") && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, t("BPA_NO_DOCUMENTS_UPLOADED_LABEL")))) : /*#__PURE__*/React.createElement("div", {
|
|
38117
39605
|
style: {
|
|
38118
39606
|
display: "flex",
|
|
38119
39607
|
flexWrap: "wrap",
|
|
38120
39608
|
justifyContent: "flex-start"
|
|
38121
39609
|
}
|
|
38122
39610
|
}, document !== null && document !== void 0 && document.values && (document === null || document === void 0 ? void 0 : document.values.length) > 0 ? document === null || document === void 0 ? void 0 : (_document$values = document.values) === null || _document$values === void 0 ? void 0 : _document$values.map((value, index) => {
|
|
38123
|
-
var _pdfFiles$value$
|
|
39611
|
+
var _pdfFiles$value$fileS2, _value$documentType;
|
|
38124
39612
|
return /*#__PURE__*/React.createElement("a", {
|
|
38125
39613
|
target: "_",
|
|
38126
|
-
href: (_pdfFiles$value$
|
|
39614
|
+
href: (_pdfFiles$value$fileS2 = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS2 === void 0 ? void 0 : _pdfFiles$value$fileS2.split(",")[0],
|
|
38127
39615
|
style: {
|
|
38128
39616
|
minWidth: "80px",
|
|
38129
39617
|
marginRight: "10px",
|
|
@@ -38170,10 +39658,10 @@ function PropertyDocuments({
|
|
|
38170
39658
|
fontSize: "24px"
|
|
38171
39659
|
}
|
|
38172
39660
|
}, t(document === null || document === void 0 ? void 0 : document.title)) : null, /*#__PURE__*/React.createElement("div", null, document !== null && document !== void 0 && document.values && (document === null || document === void 0 ? void 0 : document.values.length) > 0 ? document === null || document === void 0 ? void 0 : (_document$values2 = document.values) === null || _document$values2 === void 0 ? void 0 : _document$values2.map((value, index) => {
|
|
38173
|
-
var _pdfFiles$value$
|
|
39661
|
+
var _pdfFiles$value$fileS3;
|
|
38174
39662
|
return /*#__PURE__*/React.createElement("a", {
|
|
38175
39663
|
target: "_",
|
|
38176
|
-
href: (_pdfFiles$value$
|
|
39664
|
+
href: (_pdfFiles$value$fileS3 = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS3 === void 0 ? void 0 : _pdfFiles$value$fileS3.split(",")[0],
|
|
38177
39665
|
style: {
|
|
38178
39666
|
minWidth: svgStyles !== null && svgStyles !== void 0 && svgStyles.minWidth ? svgStyles === null || svgStyles === void 0 ? void 0 : svgStyles.minWidth : "160px",
|
|
38179
39667
|
marginRight: "20px"
|
|
@@ -38928,12 +40416,11 @@ const WSAdditonalDetails = ({
|
|
|
38928
40416
|
wsAdditionalDetails,
|
|
38929
40417
|
oldValue
|
|
38930
40418
|
}) => {
|
|
38931
|
-
var _wsAdditionalDetails
|
|
40419
|
+
var _wsAdditionalDetails$;
|
|
38932
40420
|
const {
|
|
38933
40421
|
t
|
|
38934
40422
|
} = useTranslation();
|
|
38935
40423
|
let filters = getQueryStringParams(location.search);
|
|
38936
|
-
const isModify = filters === null || filters === void 0 ? void 0 : filters.mode;
|
|
38937
40424
|
var {
|
|
38938
40425
|
connectionDetails,
|
|
38939
40426
|
plumberDetails,
|
|
@@ -38962,50 +40449,6 @@ const WSAdditonalDetails = ({
|
|
|
38962
40449
|
label: `${t(`${value.title}`)}`,
|
|
38963
40450
|
text: value !== null && value !== void 0 && value.oldValue ? value === null || value === void 0 ? void 0 : value.oldValue : value !== null && value !== void 0 && value.value ? value === null || value === void 0 ? void 0 : value.value : ""
|
|
38964
40451
|
}));
|
|
38965
|
-
})))), (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$2 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$2 === void 0 ? void 0 : _wsAdditionalDetails$2.plumberDetails) && isModify != "MODIFY" && /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
38966
|
-
style: cardSubHeaderStyles()
|
|
38967
|
-
}, t("WS_COMMON_PLUMBER_DETAILS")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
38968
|
-
className: "plumber-details-new-value-wrapper"
|
|
38969
|
-
}, plumberDetails === null || plumberDetails === void 0 ? void 0 : plumberDetails.map((value, index) => {
|
|
38970
|
-
return /*#__PURE__*/React.createElement(Row, {
|
|
38971
|
-
className: "border-none",
|
|
38972
|
-
key: `${value.title}`,
|
|
38973
|
-
label: `${t(`${value.title}`)}`,
|
|
38974
|
-
text: value !== null && value !== void 0 && value.oldValue ? value === null || value === void 0 ? void 0 : value.oldValue : value !== null && value !== void 0 && value.value ? value === null || value === void 0 ? void 0 : value.value : "",
|
|
38975
|
-
privacy: value.privacy
|
|
38976
|
-
});
|
|
38977
|
-
})))), (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$3 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$3 === void 0 ? void 0 : _wsAdditionalDetails$3.roadCuttingDetails) && isModify != "MODIFY" && /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
38978
|
-
style: cardSubHeaderStyles()
|
|
38979
|
-
}, t("WS_ROAD_CUTTING_DETAILS")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
38980
|
-
className: "plumber-details-new-value-wrapper"
|
|
38981
|
-
}, roadCuttingDetails === null || roadCuttingDetails === void 0 ? void 0 : roadCuttingDetails.map((value, index) => {
|
|
38982
|
-
var _value$values;
|
|
38983
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
38984
|
-
key: index,
|
|
38985
|
-
style: (roadCuttingDetails === null || roadCuttingDetails === void 0 ? void 0 : roadCuttingDetails.length) > 1 ? {
|
|
38986
|
-
border: "1px solid #D6D5D4",
|
|
38987
|
-
background: "#FAFAFA",
|
|
38988
|
-
borderRadius: "4px",
|
|
38989
|
-
padding: "10px 10px 0px 10px",
|
|
38990
|
-
margin: "5px 0px"
|
|
38991
|
-
} : {}
|
|
38992
|
-
}, value === null || value === void 0 ? void 0 : (_value$values = value.values) === null || _value$values === void 0 ? void 0 : _value$values.map(roadValue => /*#__PURE__*/React.createElement(Row, {
|
|
38993
|
-
className: "border-none",
|
|
38994
|
-
key: `${roadValue.title}`,
|
|
38995
|
-
label: `${t(`${roadValue.title}`)}`,
|
|
38996
|
-
text: roadValue !== null && roadValue !== void 0 && roadValue.oldValue ? roadValue === null || roadValue === void 0 ? void 0 : roadValue.oldValue : roadValue !== null && roadValue !== void 0 && roadValue.value ? roadValue === null || roadValue === void 0 ? void 0 : roadValue.value : ""
|
|
38997
|
-
})));
|
|
38998
|
-
})))), (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$4 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$4 === void 0 ? void 0 : _wsAdditionalDetails$4.activationDetails) && /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
38999
|
-
style: cardSubHeaderStyles()
|
|
39000
|
-
}, t("WS_ACTIVATION_DETAILS")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
39001
|
-
className: "plumber-details-new-value-wrapper"
|
|
39002
|
-
}, activationDetails === null || activationDetails === void 0 ? void 0 : activationDetails.map((value, index) => {
|
|
39003
|
-
return /*#__PURE__*/React.createElement(Row, {
|
|
39004
|
-
className: "border-none",
|
|
39005
|
-
key: `${value.title}`,
|
|
39006
|
-
label: `${t(`${value.title}`)}`,
|
|
39007
|
-
text: value !== null && value !== void 0 && value.oldValue ? value === null || value === void 0 ? void 0 : value.oldValue : value !== null && value !== void 0 && value.value ? value === null || value === void 0 ? void 0 : value.value : ""
|
|
39008
|
-
});
|
|
39009
40452
|
}))))));
|
|
39010
40453
|
};
|
|
39011
40454
|
|
|
@@ -41021,6 +42464,7 @@ const ApplicationDetails$1 = () => {
|
|
|
41021
42464
|
const applicationNumber = filters === null || filters === void 0 ? void 0 : filters.applicationNumber;
|
|
41022
42465
|
const serviceType = filters === null || filters === void 0 ? void 0 : filters.service;
|
|
41023
42466
|
const menuRef = useRef();
|
|
42467
|
+
const [hideTimeline, setHideTimeline] = React.useState(typeof window !== "undefined" ? window.innerWidth < 768 : false);
|
|
41024
42468
|
sessionStorage.removeItem("Digit.PT_CREATE_EMP_WS_NEW_FORM");
|
|
41025
42469
|
sessionStorage.removeItem("IsDetailsExists");
|
|
41026
42470
|
const [sessionFormData, setSessionFormData, clearSessionFormData] = Digit.Hooks.useSessionStorage("ADHOC_ADD_REBATE_DATA", {});
|
|
@@ -41406,7 +42850,28 @@ const ApplicationDetails$1 = () => {
|
|
|
41406
42850
|
return a.order - b.order;
|
|
41407
42851
|
});
|
|
41408
42852
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
41409
|
-
className: "employee-main-application-details"
|
|
42853
|
+
className: "employee-main-application-details",
|
|
42854
|
+
style: {
|
|
42855
|
+
display: "flex",
|
|
42856
|
+
gap: "20px"
|
|
42857
|
+
}
|
|
42858
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
42859
|
+
className: `workflow-timeline-wrapper no-scrollbar ${hideTimeline ? "hide-workflow" : ""}`,
|
|
42860
|
+
style: {
|
|
42861
|
+
flex: "1 1 300px",
|
|
42862
|
+
maxWidth: hideTimeline ? "fit-content" : "400px",
|
|
42863
|
+
transition: "max-width 0.3s"
|
|
42864
|
+
}
|
|
42865
|
+
}, /*#__PURE__*/React.createElement(WorkflowTimeline, {
|
|
42866
|
+
workflowDetails: workflowDetails,
|
|
42867
|
+
hideTimeline: hideTimeline,
|
|
42868
|
+
setHideTimeline: setHideTimeline
|
|
42869
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
42870
|
+
style: {
|
|
42871
|
+
flex: "2 1 500px",
|
|
42872
|
+
minWidth: "300px",
|
|
42873
|
+
overflowY: "auto"
|
|
42874
|
+
}
|
|
41410
42875
|
}, /*#__PURE__*/React.createElement(ApplicationDetails, {
|
|
41411
42876
|
applicationDetails: applicationDetails,
|
|
41412
42877
|
isLoading: isLoading || isBillingServiceLoading || isCommonmastersLoading || isServicesMasterLoading,
|
|
@@ -41423,7 +42888,8 @@ const ApplicationDetails$1 = () => {
|
|
|
41423
42888
|
timelineStatusPrefix: `WF_${applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p18 = applicationDetails.processInstancesDetails) === null || _applicationDetails$p18 === void 0 ? void 0 : (_applicationDetails$p19 = _applicationDetails$p18[0]) === null || _applicationDetails$p19 === void 0 ? void 0 : (_applicationDetails$p20 = _applicationDetails$p19.businessService) === null || _applicationDetails$p20 === void 0 ? void 0 : _applicationDetails$p20.toUpperCase()}_`,
|
|
41424
42889
|
oldValue: res,
|
|
41425
42890
|
isInfoLabel: checkforPrivacyenablement(),
|
|
41426
|
-
clearDataDetails: clearDataDetails
|
|
42891
|
+
clearDataDetails: clearDataDetails,
|
|
42892
|
+
showTimeLine: false
|
|
41427
42893
|
}), showWaringToast && /*#__PURE__*/React.createElement(Toast, {
|
|
41428
42894
|
style: {
|
|
41429
42895
|
zIndex: "10000"
|
|
@@ -41433,7 +42899,7 @@ const ApplicationDetails$1 = () => {
|
|
|
41433
42899
|
label: t(showWaringToast === null || showWaringToast === void 0 ? void 0 : showWaringToast.message),
|
|
41434
42900
|
onClose: () => setShowWaringToast(null),
|
|
41435
42901
|
isDleteBtn: true
|
|
41436
|
-
})));
|
|
42902
|
+
}))));
|
|
41437
42903
|
};
|
|
41438
42904
|
|
|
41439
42905
|
const GetConnectionDetails = () => {
|
|
@@ -45187,9 +46653,7 @@ const OLDApplication = () => {
|
|
|
45187
46653
|
const {
|
|
45188
46654
|
t
|
|
45189
46655
|
} = useTranslation();
|
|
45190
|
-
const
|
|
45191
|
-
state
|
|
45192
|
-
} = useLocation();
|
|
46656
|
+
const location = useLocation();
|
|
45193
46657
|
const history = useHistory();
|
|
45194
46658
|
let filters = getQueryStringParams(location.search);
|
|
45195
46659
|
const [canSubmit, setSubmitValve] = useState(false);
|
|
@@ -45198,9 +46662,26 @@ const OLDApplication = () => {
|
|
|
45198
46662
|
const [appDetails, setAppDetails] = useState({});
|
|
45199
46663
|
const [waterAndSewerageBoth, setWaterAndSewerageBoth] = useState(null);
|
|
45200
46664
|
const [config, setConfig] = useState({
|
|
45201
|
-
head: "",
|
|
45202
46665
|
body: []
|
|
45203
46666
|
});
|
|
46667
|
+
const [currentStep, setCurrentStep] = useState(1);
|
|
46668
|
+
const timelineConfig = [{
|
|
46669
|
+
label: "WS_COMMON_PROPERTY_DETAILS"
|
|
46670
|
+
}, {
|
|
46671
|
+
label: "WS_COMMON_CONNECTION_DETAIL"
|
|
46672
|
+
}, {
|
|
46673
|
+
label: "WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER"
|
|
46674
|
+
}, {
|
|
46675
|
+
label: "WS_COMMON_DOCS"
|
|
46676
|
+
}, {
|
|
46677
|
+
label: "WS_COMMON_SUMMARY"
|
|
46678
|
+
}].map((step, index) => ({
|
|
46679
|
+
route: `step-${index + 1}`,
|
|
46680
|
+
timeLine: [{
|
|
46681
|
+
actions: step.label,
|
|
46682
|
+
currentStep: index + 1
|
|
46683
|
+
}]
|
|
46684
|
+
}));
|
|
45204
46685
|
let tenantId = Digit.ULBService.getCurrentTenantId();
|
|
45205
46686
|
if (!tenantId) {
|
|
45206
46687
|
var _Digit$SessionStorage;
|
|
@@ -45231,19 +46712,12 @@ const OLDApplication = () => {
|
|
|
45231
46712
|
sessionStorage.removeItem("FORMSTATE_ERRORS");
|
|
45232
46713
|
}, []);
|
|
45233
46714
|
useEffect(() => {
|
|
45234
|
-
console.log("[WS] useEffect newConfig triggered", {
|
|
45235
|
-
isLoading,
|
|
45236
|
-
newConfig
|
|
45237
|
-
});
|
|
45238
46715
|
if (!isLoading && newConfig) {
|
|
45239
46716
|
const config = newConfig.find(conf => conf.hideInCitizen && conf.isCreate);
|
|
45240
|
-
console.log("[WS] found config", config);
|
|
45241
46717
|
if (config) {
|
|
45242
46718
|
var _config$body;
|
|
45243
|
-
config.head = "WS_APP_FOR_WATER_AND_SEWERAGE_LABEL";
|
|
45244
46719
|
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)) || [];
|
|
45245
|
-
|
|
45246
|
-
const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionHolderDetails", "WSConnectionDetails", "WSActivationPlumberDetails", "WSRoadCuttingDetails", "WSDocumentsEmployee"];
|
|
46720
|
+
const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionDetails", "WSConnectionHolderDetails", "CPTPropertyLocationDetails", "PropertyWaterConnection", "WSDjbEmployee", "WSActivationPlumberDetails", "WSRoadCuttingDetails", "WSBankDetails", "WSDocumentsEmployee", "WSDeclaration"];
|
|
45247
46721
|
const reorderedBody = [];
|
|
45248
46722
|
desiredComponentOrder.forEach(compName => {
|
|
45249
46723
|
const section = allCreateSections.find(s => {
|
|
@@ -45252,11 +46726,57 @@ const OLDApplication = () => {
|
|
|
45252
46726
|
return bodyComp === compName || compName === "WSConnectionDetails" && bodyComp === "WSConnectionDetails";
|
|
45253
46727
|
});
|
|
45254
46728
|
if (section) {
|
|
45255
|
-
if (compName === "CPTPropertySearchNSummary") section.head = "WS_COMMON_PROPERTY_DETAILS";
|
|
45256
|
-
if (compName === "WSConnectionHolderDetails") section.head = "WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER";
|
|
45257
|
-
if (compName === "WSConnectionDetails") section.head = "WS_COMMON_CONNECTION_DETAIL";
|
|
45258
|
-
if (compName === "WSDocumentsEmployee") section.head = "WS_COMMON_DOCS";
|
|
45259
46729
|
reorderedBody.push(section);
|
|
46730
|
+
} else if (compName === "CPTPropertyLocationDetails") {
|
|
46731
|
+
reorderedBody.push({
|
|
46732
|
+
isCreateConnection: true,
|
|
46733
|
+
body: [{
|
|
46734
|
+
type: "component",
|
|
46735
|
+
key: "propertyAddress",
|
|
46736
|
+
component: "CPTPropertyLocationDetails",
|
|
46737
|
+
withoutLabel: true
|
|
46738
|
+
}]
|
|
46739
|
+
});
|
|
46740
|
+
} else if (compName === "PropertyWaterConnection") {
|
|
46741
|
+
reorderedBody.push({
|
|
46742
|
+
isCreateConnection: true,
|
|
46743
|
+
body: [{
|
|
46744
|
+
type: "component",
|
|
46745
|
+
key: "useDetails",
|
|
46746
|
+
component: "PropertyWaterConnection",
|
|
46747
|
+
withoutLabel: true
|
|
46748
|
+
}]
|
|
46749
|
+
});
|
|
46750
|
+
} else if (compName === "WSBankDetails") {
|
|
46751
|
+
reorderedBody.push({
|
|
46752
|
+
isCreateConnection: true,
|
|
46753
|
+
body: [{
|
|
46754
|
+
type: "component",
|
|
46755
|
+
key: "bankDetails",
|
|
46756
|
+
component: "WSBankDetails",
|
|
46757
|
+
withoutLabel: true
|
|
46758
|
+
}]
|
|
46759
|
+
});
|
|
46760
|
+
} else if (compName === "WSDeclaration") {
|
|
46761
|
+
reorderedBody.push({
|
|
46762
|
+
isCreateConnection: true,
|
|
46763
|
+
body: [{
|
|
46764
|
+
type: "component",
|
|
46765
|
+
key: "declarationData",
|
|
46766
|
+
component: "WSDeclaration",
|
|
46767
|
+
withoutLabel: true
|
|
46768
|
+
}]
|
|
46769
|
+
});
|
|
46770
|
+
} else if (compName === "WSDjbEmployee") {
|
|
46771
|
+
reorderedBody.push({
|
|
46772
|
+
isCreateConnection: true,
|
|
46773
|
+
body: [{
|
|
46774
|
+
type: "component",
|
|
46775
|
+
key: "djbEmployee",
|
|
46776
|
+
component: "WSDjbEmployee",
|
|
46777
|
+
withoutLabel: true
|
|
46778
|
+
}]
|
|
46779
|
+
});
|
|
45260
46780
|
} else {
|
|
45261
46781
|
console.warn(`[WS] section for component ${compName} not found in allCreateSections`);
|
|
45262
46782
|
}
|
|
@@ -45271,7 +46791,6 @@ const OLDApplication = () => {
|
|
|
45271
46791
|
reorderedBody.push(section);
|
|
45272
46792
|
}
|
|
45273
46793
|
});
|
|
45274
|
-
console.log("[WS] reorderedBody", reorderedBody);
|
|
45275
46794
|
config.body = reorderedBody;
|
|
45276
46795
|
setConfig(config);
|
|
45277
46796
|
}
|
|
@@ -45336,12 +46855,7 @@ const OLDApplication = () => {
|
|
|
45336
46855
|
setShowToast(null);
|
|
45337
46856
|
};
|
|
45338
46857
|
const onSubmit = async data => {
|
|
45339
|
-
var _data$cpt, _propertyDetails$Prop2, _formStateErros$Conne, _Object$keys2, _formStateErros$Conne2, _data$
|
|
45340
|
-
console.log("[WS] onSubmit triggered", {
|
|
45341
|
-
data,
|
|
45342
|
-
propertyId,
|
|
45343
|
-
propertyDetails
|
|
45344
|
-
});
|
|
46858
|
+
var _data$cpt, _propertyDetails$Prop2, _formStateErros$Conne, _Object$keys2, _formStateErros$Conne2, _data$useDetails, _data$ConnectionDetai, _data$ConnectionDetai2, _data$DocumentsRequir, _data$cpt3, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _propertyDetails$Prop4, _propertyDetails$Prop5, _propertyDetails$Prop6, _propertyDetails$Prop7, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$cpt4, _data$cpt4$details, _data$cpt4$details$ow, _data$cpt4$details$ow2;
|
|
45345
46859
|
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])) {
|
|
45346
46860
|
var _data$cpt2;
|
|
45347
46861
|
if (!(data !== null && data !== void 0 && (_data$cpt2 = data.cpt) !== null && _data$cpt2 !== void 0 && _data$cpt2.details) || !propertyDetails) {
|
|
@@ -45357,7 +46871,6 @@ const OLDApplication = () => {
|
|
|
45357
46871
|
}
|
|
45358
46872
|
}
|
|
45359
46873
|
const errors = sessionStorage.getItem("FORMSTATE_ERRORS");
|
|
45360
|
-
console.log("[WS] FORMSTATE_ERRORS from sessionStorage:", errors);
|
|
45361
46874
|
const formStateErros = typeof errors === "string" && errors !== "null" ? JSON.parse(errors) : {};
|
|
45362
46875
|
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 => {
|
|
45363
46876
|
var _ob$ref2;
|
|
@@ -45370,6 +46883,99 @@ const OLDApplication = () => {
|
|
|
45370
46883
|
});
|
|
45371
46884
|
return;
|
|
45372
46885
|
}
|
|
46886
|
+
if (data !== null && data !== void 0 && (_data$useDetails = data.useDetails) !== null && _data$useDetails !== void 0 && _data$useDetails.useDetails) {
|
|
46887
|
+
data.useDetails = {
|
|
46888
|
+
...data.useDetails,
|
|
46889
|
+
...data.useDetails.useDetails
|
|
46890
|
+
};
|
|
46891
|
+
delete data.useDetails.useDetails;
|
|
46892
|
+
}
|
|
46893
|
+
if (data !== null && data !== void 0 && (_data$ConnectionDetai = data.ConnectionDetails) !== null && _data$ConnectionDetai !== void 0 && _data$ConnectionDetai[0]) {
|
|
46894
|
+
const srv = data.ConnectionDetails[0].serviceType;
|
|
46895
|
+
const srvCode = (typeof srv === "object" ? srv === null || srv === void 0 ? void 0 : srv.code : srv) || "WATER";
|
|
46896
|
+
const srvUpper = (srvCode === null || srvCode === void 0 ? void 0 : srvCode.toUpperCase()) || "";
|
|
46897
|
+
data.ConnectionDetails[0].water = srvUpper.includes("WATER") || srvUpper === "BOTH";
|
|
46898
|
+
data.ConnectionDetails[0].sewerage = srvUpper.includes("SEWERAGE") || srvUpper === "BOTH";
|
|
46899
|
+
data.ConnectionDetails[0].service = srvUpper.includes("WATER") && srvUpper.includes("SEWERAGE") ? "Water And Sewerage" : srvUpper.includes("SEWERAGE") ? "Sewerage" : "Water";
|
|
46900
|
+
if (typeof srv !== "object") {
|
|
46901
|
+
data.ConnectionDetails[0].serviceType = {
|
|
46902
|
+
code: srvCode
|
|
46903
|
+
};
|
|
46904
|
+
}
|
|
46905
|
+
} else {
|
|
46906
|
+
data.ConnectionDetails = [{
|
|
46907
|
+
serviceType: {
|
|
46908
|
+
code: "WATER"
|
|
46909
|
+
},
|
|
46910
|
+
water: true,
|
|
46911
|
+
sewerage: false,
|
|
46912
|
+
service: "Water"
|
|
46913
|
+
}];
|
|
46914
|
+
}
|
|
46915
|
+
const connDetail = (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai2 = data.ConnectionDetails) === null || _data$ConnectionDetai2 === void 0 ? void 0 : _data$ConnectionDetai2[0]) || {};
|
|
46916
|
+
if (data !== null && data !== void 0 && data.useDetails) {
|
|
46917
|
+
data.useDetails = {
|
|
46918
|
+
...connDetail,
|
|
46919
|
+
...data.useDetails
|
|
46920
|
+
};
|
|
46921
|
+
}
|
|
46922
|
+
if (data !== null && data !== void 0 && (_data$DocumentsRequir = data.DocumentsRequired) !== null && _data$DocumentsRequir !== void 0 && _data$DocumentsRequir.documents) {
|
|
46923
|
+
const docs = data.DocumentsRequired.documents;
|
|
46924
|
+
const identityDoc = docs.find(d => {
|
|
46925
|
+
var _d$documentType;
|
|
46926
|
+
return d === null || d === void 0 ? void 0 : (_d$documentType = d.documentType) === null || _d$documentType === void 0 ? void 0 : _d$documentType.includes("IDENTITYPROOF");
|
|
46927
|
+
});
|
|
46928
|
+
const ownershipDoc = docs.find(d => {
|
|
46929
|
+
var _d$documentType2, _d$documentType3;
|
|
46930
|
+
return (d === null || d === void 0 ? void 0 : (_d$documentType2 = d.documentType) === null || _d$documentType2 === void 0 ? void 0 : _d$documentType2.includes("ADDRESSPROOF")) || (d === null || d === void 0 ? void 0 : (_d$documentType3 = d.documentType) === null || _d$documentType3 === void 0 ? void 0 : _d$documentType3.includes("OWNERSHIPPROOF"));
|
|
46931
|
+
});
|
|
46932
|
+
const otherDoc = docs.find(d => {
|
|
46933
|
+
var _d$documentType4, _d$documentType5;
|
|
46934
|
+
return !(d !== null && d !== void 0 && (_d$documentType4 = d.documentType) !== null && _d$documentType4 !== void 0 && _d$documentType4.includes("IDENTITYPROOF")) && !(d !== null && d !== void 0 && (_d$documentType5 = d.documentType) !== null && _d$documentType5 !== void 0 && _d$documentType5.includes("ADDRESSPROOF"));
|
|
46935
|
+
});
|
|
46936
|
+
data.documents = {
|
|
46937
|
+
documents: docs,
|
|
46938
|
+
identityProofNumber: (identityDoc === null || identityDoc === void 0 ? void 0 : identityDoc.documentUid) || "",
|
|
46939
|
+
ownershipDocumentNumber: (ownershipDoc === null || ownershipDoc === void 0 ? void 0 : ownershipDoc.documentUid) || "",
|
|
46940
|
+
otherDocumentNumber: (otherDoc === null || otherDoc === void 0 ? void 0 : otherDoc.documentUid) || ""
|
|
46941
|
+
};
|
|
46942
|
+
}
|
|
46943
|
+
if (data !== null && data !== void 0 && data.propertyAddress) {
|
|
46944
|
+
data.propertyAddress = {
|
|
46945
|
+
...data.propertyAddress,
|
|
46946
|
+
pinCode: data.propertyAddress.pincode || data.propertyAddress.pinCode,
|
|
46947
|
+
street: data.propertyAddress.streetName || data.propertyAddress.street,
|
|
46948
|
+
Latitude: data.propertyAddress.latitude || data.propertyAddress.Latitude,
|
|
46949
|
+
Longitude: data.propertyAddress.longitude || data.propertyAddress.Longitude,
|
|
46950
|
+
address: data.propertyAddress.addressLine1 || data.propertyAddress.address,
|
|
46951
|
+
Assembly: data.propertyAddress.assembly || data.propertyAddress.Assembly
|
|
46952
|
+
};
|
|
46953
|
+
if (!data.zro && data.propertyAddress.zro) {
|
|
46954
|
+
data.zro = data.propertyAddress.zro;
|
|
46955
|
+
}
|
|
46956
|
+
}
|
|
46957
|
+
if (data !== null && data !== void 0 && data.bankDetails) {
|
|
46958
|
+
data.bankDetails = {
|
|
46959
|
+
...data.bankDetails,
|
|
46960
|
+
branchName: data.bankDetails.branchName || data.bankDetails.bankBranchName,
|
|
46961
|
+
bankBranchName: data.bankDetails.bankBranchName || data.bankDetails.branchName,
|
|
46962
|
+
bankAccountNumber: data.bankDetails.bankAccountNumber || data.bankDetails.accountNumber,
|
|
46963
|
+
accountNumber: data.bankDetails.accountNumber || data.bankDetails.bankAccountNumber
|
|
46964
|
+
};
|
|
46965
|
+
}
|
|
46966
|
+
if (data !== null && data !== void 0 && data.declarationData) {
|
|
46967
|
+
var _data$declarationData, _data$declarationData2, _data$declarationData3, _data$declarationData4, _data$declarationData5, _data$declarationData6;
|
|
46968
|
+
const declarations = (_data$declarationData = data.declarationData) !== null && _data$declarationData !== void 0 && _data$declarationData.agree ? true : false;
|
|
46969
|
+
data.declaration = {
|
|
46970
|
+
...data.declarationData,
|
|
46971
|
+
submittedBy: typeof ((_data$declarationData2 = data.declarationData) === null || _data$declarationData2 === void 0 ? void 0 : _data$declarationData2.submittedBy) === "object" ? (_data$declarationData3 = data.declarationData) === null || _data$declarationData3 === void 0 ? void 0 : (_data$declarationData4 = _data$declarationData3.submittedBy) === null || _data$declarationData4 === void 0 ? void 0 : _data$declarationData4.code : (_data$declarationData5 = data.declarationData) === null || _data$declarationData5 === void 0 ? void 0 : _data$declarationData5.submittedBy,
|
|
46972
|
+
agree: declarations,
|
|
46973
|
+
declarations: ((_data$declarationData6 = data.declarationData) === null || _data$declarationData6 === void 0 ? void 0 : _data$declarationData6.declarations) || Array(9).fill(declarations)
|
|
46974
|
+
};
|
|
46975
|
+
data.declarationData.submittedBy = data.declaration.submittedBy;
|
|
46976
|
+
data.declarationData.agree = data.declaration.agree;
|
|
46977
|
+
data.declarationData.declarations = data.declaration.declarations;
|
|
46978
|
+
}
|
|
45373
46979
|
if (!(data !== null && data !== void 0 && (_data$cpt3 = data.cpt) !== null && _data$cpt3 !== void 0 && _data$cpt3.details)) {
|
|
45374
46980
|
var _propertyDetails$Prop3;
|
|
45375
46981
|
data.cpt = {
|
|
@@ -45377,30 +46983,27 @@ const OLDApplication = () => {
|
|
|
45377
46983
|
};
|
|
45378
46984
|
}
|
|
45379
46985
|
data.channel = "CITIZEN";
|
|
45380
|
-
const connDetail = (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai = data.ConnectionDetails) === null || _data$ConnectionDetai === void 0 ? void 0 : _data$ConnectionDetai[0]) || {};
|
|
45381
46986
|
data.applicationSelection = {
|
|
45382
|
-
serviceType: {
|
|
46987
|
+
serviceType: (connDetail === null || connDetail === void 0 ? void 0 : connDetail.serviceType) || {
|
|
45383
46988
|
code: "WATER"
|
|
45384
46989
|
},
|
|
45385
|
-
connectionType: {
|
|
45386
|
-
code:
|
|
46990
|
+
connectionType: (connDetail === null || connDetail === void 0 ? void 0 : connDetail.connectionType) || {
|
|
46991
|
+
code: "Metered"
|
|
45387
46992
|
},
|
|
45388
|
-
applicantType: {
|
|
46993
|
+
applicantType: (connDetail === null || connDetail === void 0 ? void 0 : connDetail.applicantType) || {
|
|
45389
46994
|
code: "NONPTPRESSURE"
|
|
45390
46995
|
},
|
|
45391
|
-
categoryType: {
|
|
46996
|
+
categoryType: (connDetail === null || connDetail === void 0 ? void 0 : connDetail.categoryType) || {
|
|
45392
46997
|
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"
|
|
45393
46998
|
},
|
|
46999
|
+
domesticType: connDetail === null || connDetail === void 0 ? void 0 : connDetail.domesticType,
|
|
47000
|
+
departmentType: connDetail === null || connDetail === void 0 ? void 0 : connDetail.departmentType,
|
|
47001
|
+
temporaryConnection: connDetail === null || connDetail === void 0 ? void 0 : connDetail.temporaryType,
|
|
47002
|
+
waterDemandType: connDetail === null || connDetail === void 0 ? void 0 : connDetail.waterDemandType,
|
|
45394
47003
|
ownerContactNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde6 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde6 === void 0 ? void 0 : (_data$ConnectionHolde7 = _data$ConnectionHolde6[0]) === null || _data$ConnectionHolde7 === void 0 ? void 0 : _data$ConnectionHolde7.mobileNumber) || (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$ow = _data$cpt4$details.owners) === null || _data$cpt4$details$ow === void 0 ? void 0 : (_data$cpt4$details$ow2 = _data$cpt4$details$ow[0]) === null || _data$cpt4$details$ow2 === void 0 ? void 0 : _data$cpt4$details$ow2.mobileNumber)
|
|
45395
47004
|
};
|
|
45396
|
-
if (data !== null && data !== void 0 && (_data$ConnectionDetai2 = data.ConnectionDetails) !== null && _data$ConnectionDetai2 !== void 0 && _data$ConnectionDetai2[0]) {
|
|
45397
|
-
data.ConnectionDetails[0].water = true;
|
|
45398
|
-
data.ConnectionDetails[0].sewerage = false;
|
|
45399
|
-
data.ConnectionDetails[0].service = "Water";
|
|
45400
|
-
}
|
|
45401
47005
|
const allDetails = cloneDeep_1(data);
|
|
45402
47006
|
const payload = await createPayloadOfWS(data);
|
|
45403
|
-
console.log("[WS] createPayloadOfWS result:", payload);
|
|
45404
47007
|
if (!(payload !== null && payload !== void 0 && payload.water) && !(payload !== null && payload !== void 0 && payload.sewerage)) {
|
|
45405
47008
|
console.error("[WS] onSubmit EXIT: payload has neither water nor sewerage", payload);
|
|
45406
47009
|
setShowToast({
|
|
@@ -45416,47 +47019,137 @@ const OLDApplication = () => {
|
|
|
45416
47019
|
disconnectRequest: false,
|
|
45417
47020
|
reconnectRequest: false
|
|
45418
47021
|
};
|
|
47022
|
+
let sewerageConnection = {
|
|
47023
|
+
SewerageConnection: payload,
|
|
47024
|
+
disconnectRequest: false,
|
|
47025
|
+
reconnectRequest: false
|
|
47026
|
+
};
|
|
45419
47027
|
if (waterAndSewerageLoader) {
|
|
45420
47028
|
setWaterAndSewerageBoth(true);
|
|
45421
47029
|
sessionStorage.setItem("setWaterAndSewerageBoth", JSON.stringify(true));
|
|
45422
47030
|
} else {
|
|
45423
47031
|
sessionStorage.setItem("setWaterAndSewerageBoth", JSON.stringify(false));
|
|
45424
47032
|
}
|
|
45425
|
-
if (payload !== null && payload !== void 0 && payload.water) {
|
|
45426
|
-
if (waterMutation) {
|
|
47033
|
+
if (payload !== null && payload !== void 0 && payload.water && payload !== null && payload !== void 0 && payload.sewerage) {
|
|
47034
|
+
if (waterMutation && sewerageMutation) {
|
|
45427
47035
|
setIsEnableLoader(true);
|
|
45428
47036
|
await waterMutation(waterConnection, {
|
|
45429
47037
|
onError: error => {
|
|
45430
47038
|
var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
|
|
45431
47039
|
setIsEnableLoader(false);
|
|
45432
|
-
console.error("[WS] waterMutation error", error);
|
|
45433
47040
|
setShowToast({
|
|
45434
47041
|
key: "error",
|
|
45435
47042
|
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"
|
|
45436
47043
|
});
|
|
45437
47044
|
setTimeout(closeToastOfError, 5000);
|
|
45438
47045
|
},
|
|
47046
|
+
onSuccess: async waterData => {
|
|
47047
|
+
var _waterData$WaterConne;
|
|
47048
|
+
let response = await updatePayloadOfWS(waterData === null || waterData === void 0 ? void 0 : (_waterData$WaterConne = waterData.WaterConnection) === null || _waterData$WaterConne === void 0 ? void 0 : _waterData$WaterConne[0], "WATER");
|
|
47049
|
+
let waterConnectionUpdate = {
|
|
47050
|
+
WaterConnection: response,
|
|
47051
|
+
disconnectRequest: false,
|
|
47052
|
+
reconnectRequest: false
|
|
47053
|
+
};
|
|
47054
|
+
waterUpdateMutation(waterConnectionUpdate, {
|
|
47055
|
+
onError: error => {
|
|
47056
|
+
var _error$response2, _error$response2$data, _error$response2$data2, _error$response2$data3;
|
|
47057
|
+
setIsEnableLoader(false);
|
|
47058
|
+
setShowToast({
|
|
47059
|
+
key: "error",
|
|
47060
|
+
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"
|
|
47061
|
+
});
|
|
47062
|
+
setTimeout(closeToastOfError, 5000);
|
|
47063
|
+
},
|
|
47064
|
+
onSuccess: async waterUpdateData => {
|
|
47065
|
+
setAppDetails(prev => {
|
|
47066
|
+
var _waterUpdateData$Wate;
|
|
47067
|
+
return {
|
|
47068
|
+
...prev,
|
|
47069
|
+
waterConnection: waterUpdateData === null || waterUpdateData === void 0 ? void 0 : (_waterUpdateData$Wate = waterUpdateData.WaterConnection) === null || _waterUpdateData$Wate === void 0 ? void 0 : _waterUpdateData$Wate[0]
|
|
47070
|
+
};
|
|
47071
|
+
});
|
|
47072
|
+
await sewerageMutation(sewerageConnection, {
|
|
47073
|
+
onError: error => {
|
|
47074
|
+
var _error$response3, _error$response3$data, _error$response3$data2, _error$response3$data3;
|
|
47075
|
+
setIsEnableLoader(false);
|
|
47076
|
+
setShowToast({
|
|
47077
|
+
key: "error",
|
|
47078
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : (_error$response3$data = _error$response3.data) === null || _error$response3$data === void 0 ? void 0 : (_error$response3$data2 = _error$response3$data.Errors) === null || _error$response3$data2 === void 0 ? void 0 : (_error$response3$data3 = _error$response3$data2[0]) === null || _error$response3$data3 === void 0 ? void 0 : _error$response3$data3.message) || (error === null || error === void 0 ? void 0 : error.message) || "ERR_UNKNOWN"
|
|
47079
|
+
});
|
|
47080
|
+
setTimeout(closeToastOfError, 5000);
|
|
47081
|
+
},
|
|
47082
|
+
onSuccess: async sewerageData => {
|
|
47083
|
+
var _sewerageData$Sewerag;
|
|
47084
|
+
let response = await updatePayloadOfWS(sewerageData === null || sewerageData === void 0 ? void 0 : (_sewerageData$Sewerag = sewerageData.SewerageConnections) === null || _sewerageData$Sewerag === void 0 ? void 0 : _sewerageData$Sewerag[0], "SEWERAGE");
|
|
47085
|
+
let sewerageConnectionUpdate = {
|
|
47086
|
+
SewerageConnection: response,
|
|
47087
|
+
disconnectRequest: false,
|
|
47088
|
+
reconnectRequest: false
|
|
47089
|
+
};
|
|
47090
|
+
await sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
47091
|
+
onError: error => {
|
|
47092
|
+
var _error$response4, _error$response4$data, _error$response4$data2, _error$response4$data3;
|
|
47093
|
+
setIsEnableLoader(false);
|
|
47094
|
+
setShowToast({
|
|
47095
|
+
key: "error",
|
|
47096
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.Errors) === null || _error$response4$data2 === void 0 ? void 0 : (_error$response4$data3 = _error$response4$data2[0]) === null || _error$response4$data3 === void 0 ? void 0 : _error$response4$data3.message) || (error === null || error === void 0 ? void 0 : error.message) || "ERR_UNKNOWN"
|
|
47097
|
+
});
|
|
47098
|
+
setTimeout(closeToastOfError, 5000);
|
|
47099
|
+
},
|
|
47100
|
+
onSuccess: async sewerageUpdateData => {
|
|
47101
|
+
var _waterUpdateData$Wate2, _waterUpdateData$Wate3, _sewerageUpdateData$S2, _sewerageUpdateData$S3;
|
|
47102
|
+
setAppDetails(prev => {
|
|
47103
|
+
var _sewerageUpdateData$S;
|
|
47104
|
+
return {
|
|
47105
|
+
...prev,
|
|
47106
|
+
sewerageConnection: sewerageUpdateData === null || sewerageUpdateData === void 0 ? void 0 : (_sewerageUpdateData$S = sewerageUpdateData.SewerageConnections) === null || _sewerageUpdateData$S === void 0 ? void 0 : _sewerageUpdateData$S[0]
|
|
47107
|
+
};
|
|
47108
|
+
});
|
|
47109
|
+
clearSessionFormData();
|
|
47110
|
+
history.push(`/digit-ui/employee/ws/ws-response?applicationNumber=${waterUpdateData === null || waterUpdateData === void 0 ? void 0 : (_waterUpdateData$Wate2 = waterUpdateData.WaterConnection) === null || _waterUpdateData$Wate2 === void 0 ? void 0 : (_waterUpdateData$Wate3 = _waterUpdateData$Wate2[0]) === null || _waterUpdateData$Wate3 === void 0 ? void 0 : _waterUpdateData$Wate3.applicationNo}&applicationNumber1=${sewerageUpdateData === null || sewerageUpdateData === void 0 ? void 0 : (_sewerageUpdateData$S2 = sewerageUpdateData.SewerageConnections) === null || _sewerageUpdateData$S2 === void 0 ? void 0 : (_sewerageUpdateData$S3 = _sewerageUpdateData$S2[0]) === null || _sewerageUpdateData$S3 === void 0 ? void 0 : _sewerageUpdateData$S3.applicationNo}`);
|
|
47111
|
+
}
|
|
47112
|
+
});
|
|
47113
|
+
}
|
|
47114
|
+
});
|
|
47115
|
+
}
|
|
47116
|
+
});
|
|
47117
|
+
}
|
|
47118
|
+
});
|
|
47119
|
+
}
|
|
47120
|
+
} else if (payload !== null && payload !== void 0 && payload.water && !(payload !== null && payload !== void 0 && payload.sewerage)) {
|
|
47121
|
+
if (waterMutation) {
|
|
47122
|
+
setIsEnableLoader(true);
|
|
47123
|
+
await waterMutation(waterConnection, {
|
|
47124
|
+
onError: error => {
|
|
47125
|
+
var _error$response5, _error$response5$data, _error$response5$data2, _error$response5$data3;
|
|
47126
|
+
setIsEnableLoader(false);
|
|
47127
|
+
console.error("[WS] waterMutation error", error);
|
|
47128
|
+
setShowToast({
|
|
47129
|
+
key: "error",
|
|
47130
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response5 = error.response) === null || _error$response5 === void 0 ? void 0 : (_error$response5$data = _error$response5.data) === null || _error$response5$data === void 0 ? void 0 : (_error$response5$data2 = _error$response5$data.Errors) === null || _error$response5$data2 === void 0 ? void 0 : (_error$response5$data3 = _error$response5$data2[0]) === null || _error$response5$data3 === void 0 ? void 0 : _error$response5$data3.message) || (error === null || error === void 0 ? void 0 : error.message) || "ERR_UNKNOWN"
|
|
47131
|
+
});
|
|
47132
|
+
setTimeout(closeToastOfError, 5000);
|
|
47133
|
+
},
|
|
45439
47134
|
onSuccess: async data => {
|
|
45440
47135
|
var _data$WaterConnection;
|
|
45441
|
-
console.log("[WS] waterMutation success", data);
|
|
45442
47136
|
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");
|
|
45443
47137
|
let waterConnectionUpdate = {
|
|
45444
47138
|
WaterConnection: response
|
|
45445
47139
|
};
|
|
45446
47140
|
waterUpdateMutation(waterConnectionUpdate, {
|
|
45447
47141
|
onError: error => {
|
|
45448
|
-
var _error$
|
|
47142
|
+
var _error$response6, _error$response6$data, _error$response6$data2, _error$response6$data3;
|
|
45449
47143
|
setIsEnableLoader(false);
|
|
45450
47144
|
console.error("[WS] waterUpdateMutation error", error);
|
|
45451
47145
|
setShowToast({
|
|
45452
47146
|
key: "error",
|
|
45453
|
-
message: (error === null || error === void 0 ? void 0 : (_error$
|
|
47147
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response6 = error.response) === null || _error$response6 === void 0 ? void 0 : (_error$response6$data = _error$response6.data) === null || _error$response6$data === void 0 ? void 0 : (_error$response6$data2 = _error$response6$data.Errors) === null || _error$response6$data2 === void 0 ? void 0 : (_error$response6$data3 = _error$response6$data2[0]) === null || _error$response6$data3 === void 0 ? void 0 : _error$response6$data3.message) || (error === null || error === void 0 ? void 0 : error.message) || "ERR_UNKNOWN"
|
|
45454
47148
|
});
|
|
45455
47149
|
setTimeout(closeToastOfError, 5000);
|
|
45456
47150
|
},
|
|
45457
47151
|
onSuccess: data => {
|
|
45458
47152
|
var _data$WaterConnection3, _data$WaterConnection4;
|
|
45459
|
-
console.log("[WS] waterUpdateMutation success", data);
|
|
45460
47153
|
setAppDetails(prev => {
|
|
45461
47154
|
var _data$WaterConnection2;
|
|
45462
47155
|
return {
|
|
@@ -45471,6 +47164,53 @@ const OLDApplication = () => {
|
|
|
45471
47164
|
}
|
|
45472
47165
|
});
|
|
45473
47166
|
}
|
|
47167
|
+
} else if (payload !== null && payload !== void 0 && payload.sewerage && !(payload !== null && payload !== void 0 && payload.water)) {
|
|
47168
|
+
if (sewerageMutation) {
|
|
47169
|
+
setIsEnableLoader(true);
|
|
47170
|
+
await sewerageMutation(sewerageConnection, {
|
|
47171
|
+
onError: error => {
|
|
47172
|
+
var _error$response7, _error$response7$data, _error$response7$data2, _error$response7$data3;
|
|
47173
|
+
setIsEnableLoader(false);
|
|
47174
|
+
console.error("[WS] sewerageMutation error", error);
|
|
47175
|
+
setShowToast({
|
|
47176
|
+
key: "error",
|
|
47177
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response7 = error.response) === null || _error$response7 === void 0 ? void 0 : (_error$response7$data = _error$response7.data) === null || _error$response7$data === void 0 ? void 0 : (_error$response7$data2 = _error$response7$data.Errors) === null || _error$response7$data2 === void 0 ? void 0 : (_error$response7$data3 = _error$response7$data2[0]) === null || _error$response7$data3 === void 0 ? void 0 : _error$response7$data3.message) || (error === null || error === void 0 ? void 0 : error.message) || "ERR_UNKNOWN"
|
|
47178
|
+
});
|
|
47179
|
+
setTimeout(closeToastOfError, 5000);
|
|
47180
|
+
},
|
|
47181
|
+
onSuccess: async data => {
|
|
47182
|
+
var _data$SewerageConnect;
|
|
47183
|
+
let response = await updatePayloadOfWS(data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnections) === null || _data$SewerageConnect === void 0 ? void 0 : _data$SewerageConnect[0], "SEWERAGE");
|
|
47184
|
+
let sewerageConnectionUpdate = {
|
|
47185
|
+
SewerageConnection: response
|
|
47186
|
+
};
|
|
47187
|
+
await sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
47188
|
+
onError: error => {
|
|
47189
|
+
var _error$response8, _error$response8$data, _error$response8$data2, _error$response8$data3;
|
|
47190
|
+
setIsEnableLoader(false);
|
|
47191
|
+
console.error("[WS] sewerageUpdateMutation error", error);
|
|
47192
|
+
setShowToast({
|
|
47193
|
+
key: "error",
|
|
47194
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response8 = error.response) === null || _error$response8 === void 0 ? void 0 : (_error$response8$data = _error$response8.data) === null || _error$response8$data === void 0 ? void 0 : (_error$response8$data2 = _error$response8$data.Errors) === null || _error$response8$data2 === void 0 ? void 0 : (_error$response8$data3 = _error$response8$data2[0]) === null || _error$response8$data3 === void 0 ? void 0 : _error$response8$data3.message) || (error === null || error === void 0 ? void 0 : error.message) || "ERR_UNKNOWN"
|
|
47195
|
+
});
|
|
47196
|
+
setTimeout(closeToastOfError, 5000);
|
|
47197
|
+
},
|
|
47198
|
+
onSuccess: data => {
|
|
47199
|
+
var _data$SewerageConnect3, _data$SewerageConnect4;
|
|
47200
|
+
setAppDetails(prev => {
|
|
47201
|
+
var _data$SewerageConnect2;
|
|
47202
|
+
return {
|
|
47203
|
+
...prev,
|
|
47204
|
+
sewerageConnection: data === null || data === void 0 ? void 0 : (_data$SewerageConnect2 = data.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : _data$SewerageConnect2[0]
|
|
47205
|
+
};
|
|
47206
|
+
});
|
|
47207
|
+
clearSessionFormData();
|
|
47208
|
+
history.push(`/digit-ui/employee/ws/ws-response?applicationNumber1=${data === null || data === void 0 ? void 0 : (_data$SewerageConnect3 = data.SewerageConnections) === null || _data$SewerageConnect3 === void 0 ? void 0 : (_data$SewerageConnect4 = _data$SewerageConnect3[0]) === null || _data$SewerageConnect4 === void 0 ? void 0 : _data$SewerageConnect4.applicationNo}`);
|
|
47209
|
+
}
|
|
47210
|
+
});
|
|
47211
|
+
}
|
|
47212
|
+
});
|
|
47213
|
+
}
|
|
45474
47214
|
}
|
|
45475
47215
|
};
|
|
45476
47216
|
const closeToast = () => {
|
|
@@ -45480,16 +47220,20 @@ const OLDApplication = () => {
|
|
|
45480
47220
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
45481
47221
|
}
|
|
45482
47222
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
45483
|
-
|
|
45484
|
-
|
|
45485
|
-
|
|
45486
|
-
|
|
47223
|
+
className: "employee-form-section-wrapper"
|
|
47224
|
+
}, /*#__PURE__*/React.createElement(VerticalTimeline, {
|
|
47225
|
+
config: timelineConfig,
|
|
47226
|
+
currentActiveIndex: currentStep - 1,
|
|
47227
|
+
showFinalStep: false
|
|
47228
|
+
}), /*#__PURE__*/React.createElement(FormComposer, {
|
|
45487
47229
|
config: config.body,
|
|
45488
47230
|
userType: "employee",
|
|
45489
47231
|
onFormValueChange: onFormValueChange,
|
|
45490
47232
|
label: creatingWaterApplicationLoading || creatingSewerageApplicationLoading || updatingWaterApplicationLoading || updatingSewerageApplicationLoading ? t("CS_COMMON_SUBMITTING") : t("CS_COMMON_SUBMIT"),
|
|
45491
47233
|
onSubmit: onSubmit,
|
|
45492
47234
|
defaultValues: sessionFormData,
|
|
47235
|
+
noCard: true,
|
|
47236
|
+
noBreakLine: true,
|
|
45493
47237
|
cardFormWrapperClassName: "new-application-card"
|
|
45494
47238
|
}), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
45495
47239
|
isDleteBtn: true,
|
|
@@ -45498,7 +47242,7 @@ const OLDApplication = () => {
|
|
|
45498
47242
|
label: t(showToast === null || showToast === void 0 ? void 0 : showToast.message),
|
|
45499
47243
|
onClose: closeToast,
|
|
45500
47244
|
isWarning: showToast === null || showToast === void 0 ? void 0 : showToast.isWarning
|
|
45501
|
-
}));
|
|
47245
|
+
})));
|
|
45502
47246
|
};
|
|
45503
47247
|
|
|
45504
47248
|
const WSModule = ({
|
|
@@ -45524,6 +47268,7 @@ const WSModule = ({
|
|
|
45524
47268
|
});
|
|
45525
47269
|
Digit.SessionStorage.set("WS_TENANTS", tenants);
|
|
45526
47270
|
Digit.SessionStorage.set("PT_TENANTS", tenants);
|
|
47271
|
+
initWSComponents();
|
|
45527
47272
|
if (isLoading) {
|
|
45528
47273
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
45529
47274
|
}
|
|
@@ -45607,6 +47352,9 @@ const componentsToRegister = {
|
|
|
45607
47352
|
WSDisconnectAcknowledgement,
|
|
45608
47353
|
WSRestorationAcknowledgement: WSDisconnectAcknowledgement$1,
|
|
45609
47354
|
WSDisconnectionAppDetails,
|
|
47355
|
+
WSBankDetails,
|
|
47356
|
+
WSDeclaration,
|
|
47357
|
+
WSDjbEmployee,
|
|
45610
47358
|
WSInbox,
|
|
45611
47359
|
BillAmendmentCard,
|
|
45612
47360
|
WSSearchApplication: SearchApplication,
|