@djb25/digit-ui-module-ws 1.0.16 → 1.0.18
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.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1408 -716
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
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, BreadcrumbHeader, ArrowLeft, TickMark, FormStep, CardLabel, RadioOrSelect, TextInput, CardHeader, CitizenInfoLabel, CardSubHeader,
|
|
4
|
+
import { Loader, Card, KeyNote, SubmitBar, InfoBannerIcon, Header, BackButton, PrivateRoute, Banner, CardText, ActionBar, HomeIcon, PrintBtnCommon, MultiLink, LinkButton, Toast, BreadcrumbHeader, ArrowLeft, TickMark, FormStep, CardLabel, RadioOrSelect, TextInput, CardHeader, CitizenInfoLabel, CardSubHeader, Dropdown, UploadFile, CheckBox, RadioButtons, MobileNumber, LabelFieldPair, DatePicker, CardLabelError, DeleteIcon, WrapUnMaskComponent, StatusTable, Row, CardSectionHeader, InfoIcon, TextArea, SearchField, FilterFormField, RemoveableTag, MultiSelectDropdown, InboxComposer, DropIcon, WSICon, EmployeeModuleCard, SearchAction, PopUp, DetailsCard, SearchForm, CloseSvg, CollapsibleCardPage, Table, Localities, Modal, DownloadBtnCommon, CollectionIcon, ResponseComposer, TelePhone, DisplayPhotos, CheckPoint, ConnectingCheckPoints, ActionLinks, PDFSvg, EditIcon, CardSectionSubText, DownloadIcon, CardLabelDesc, VerticalTimeline, FormComposer, MultiUploadWrapper, Close as Close$e, BreakLine, ViewsIcon, Menu, ButtonSelector, CitizenHomeCard } from '@djb25/digit-ui-react-components';
|
|
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,29 +441,32 @@ const getFiles = async (filesArray, tenant) => {
|
|
|
441
441
|
response !== null && response !== void 0 && (_response$data = response.data) !== null && _response$data !== void 0 && (_response$data$fileSt = _response$data.fileStoreIds) !== null && _response$data$fileSt !== void 0 && (_response$data$fileSt2 = _response$data$fileSt[0]) !== null && _response$data$fileSt2 !== void 0 && _response$data$fileSt2.url ? window.open(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$fileS = _response$data2.fileStoreIds) === null || _response$data2$fileS === void 0 ? void 0 : (_response$data2$fileS2 = _response$data2$fileS[0]) === null || _response$data2$fileS2 === void 0 ? void 0 : _response$data2$fileS2.url) : null;
|
|
442
442
|
};
|
|
443
443
|
const createPayloadOfWS = async data => {
|
|
444
|
-
var _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$
|
|
444
|
+
var _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$applicationSele, _data$applicationSele2, _data$useDetails, _data$useDetails2, _data$useDetails3, _data$useDetails3$pro, _data$useDetails4, _data$useDetails4$pro, _data$useDetails5, _data$useDetails6, _data$useDetails7, _data$useDetails8, _data$propertyAddress, _data$applicant, _data$useDetails9, _data$useDetails9$gen, _data$contact, _data$applicant2, _data$applicant3, _data$applicant4, _data$applicationSele3, _data$applicationSele4, _data$contact2, _data$cpt2, _data$cpt3, _data$cpt3$details, _data$zro, _data$propertyAddress2, _data$propertyAddress3, _data$applicationSele5, _data$applicationSele6, _data$applicationSele7, _data$applicationSele8, _data$applicationSele9, _data$applicationSele0, _data$applicationSele1, _data$applicationSele10, _data$applicationSele11, _data$applicationSele12, _data$applicationSele13, _data$contact3, _data$cpt4, _data$cpt4$details, _data$propertyAddress4, _data$propertyAddress5, _data$cpt5, _Digit, _Digit$Customizations, _Digit$Customizations2, _Digit2, _Digit2$Customization, _Digit2$Customization2;
|
|
445
445
|
data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : (_data$cpt$details = _data$cpt.details) === null || _data$cpt$details === void 0 ? void 0 : (_data$cpt$details$own = _data$cpt$details.owners) === null || _data$cpt$details$own === void 0 ? void 0 : _data$cpt$details$own.forEach(owner => {
|
|
446
446
|
if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
|
|
447
447
|
});
|
|
448
|
+
const serviceType = data === null || data === void 0 ? void 0 : (_data$applicationSele = data.applicationSelection) === null || _data$applicationSele === void 0 ? void 0 : (_data$applicationSele2 = _data$applicationSele.serviceType) === null || _data$applicationSele2 === void 0 ? void 0 : _data$applicationSele2.code;
|
|
449
|
+
const isWater = serviceType === "WATER" || serviceType === "BOTH";
|
|
450
|
+
const isSewerage = serviceType === "SEWERAGE" || serviceType === "BOTH";
|
|
448
451
|
let payload = {
|
|
449
|
-
water:
|
|
450
|
-
sewerage:
|
|
451
|
-
proposedTaps: (data === null || data === void 0 ? void 0 : (_data$
|
|
452
|
-
proposedPipeSize: (data === null || data === void 0 ? void 0 : (_data$
|
|
453
|
-
proposedWaterClosets: (data === null || data === void 0 ? void 0 : (_data$
|
|
454
|
-
proposedToilets: (data === null || data === void 0 ? void 0 : (_data$
|
|
455
|
-
connectionHolders:
|
|
456
|
-
correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$
|
|
457
|
-
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$
|
|
458
|
-
gender: (data === null || data === void 0 ? void 0 : (_data$
|
|
459
|
-
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$
|
|
460
|
-
name:
|
|
461
|
-
ownerType: (data === null || data === void 0 ? void 0 : (_data$
|
|
462
|
-
relationship:
|
|
463
|
-
sameAsPropertyAddress:
|
|
464
|
-
emailId: (data === null || data === void 0 ? void 0 : (_data$
|
|
465
|
-
}]
|
|
466
|
-
service:
|
|
452
|
+
water: isWater,
|
|
453
|
+
sewerage: isSewerage,
|
|
454
|
+
proposedTaps: (data === null || data === void 0 ? void 0 : (_data$useDetails = data.useDetails) === null || _data$useDetails === void 0 ? void 0 : _data$useDetails.noOfTaps) && Number(data === null || data === void 0 ? void 0 : (_data$useDetails2 = data.useDetails) === null || _data$useDetails2 === void 0 ? void 0 : _data$useDetails2.noOfTaps),
|
|
455
|
+
proposedPipeSize: (data === null || data === void 0 ? void 0 : (_data$useDetails3 = data.useDetails) === null || _data$useDetails3 === void 0 ? void 0 : (_data$useDetails3$pro = _data$useDetails3.proposedPipeSize) === null || _data$useDetails3$pro === void 0 ? void 0 : _data$useDetails3$pro.size) && Number(data === null || data === void 0 ? void 0 : (_data$useDetails4 = data.useDetails) === null || _data$useDetails4 === void 0 ? void 0 : (_data$useDetails4$pro = _data$useDetails4.proposedPipeSize) === null || _data$useDetails4$pro === void 0 ? void 0 : _data$useDetails4$pro.size),
|
|
456
|
+
proposedWaterClosets: (data === null || data === void 0 ? void 0 : (_data$useDetails5 = data.useDetails) === null || _data$useDetails5 === void 0 ? void 0 : _data$useDetails5.proposedWaterClosets) && Number(data === null || data === void 0 ? void 0 : (_data$useDetails6 = data.useDetails) === null || _data$useDetails6 === void 0 ? void 0 : _data$useDetails6.proposedWaterClosets),
|
|
457
|
+
proposedToilets: (data === null || data === void 0 ? void 0 : (_data$useDetails7 = data.useDetails) === null || _data$useDetails7 === void 0 ? void 0 : _data$useDetails7.proposedToilets) && Number(data === null || data === void 0 ? void 0 : (_data$useDetails8 = data.useDetails) === null || _data$useDetails8 === void 0 ? void 0 : _data$useDetails8.proposedToilets),
|
|
458
|
+
connectionHolders: [{
|
|
459
|
+
correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$propertyAddress = data.propertyAddress) === null || _data$propertyAddress === void 0 ? void 0 : _data$propertyAddress.address) || "",
|
|
460
|
+
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$applicant = data.applicant) === null || _data$applicant === void 0 ? void 0 : _data$applicant.ParentorSpouse) || "",
|
|
461
|
+
gender: (data === null || data === void 0 ? void 0 : (_data$useDetails9 = data.useDetails) === null || _data$useDetails9 === void 0 ? void 0 : (_data$useDetails9$gen = _data$useDetails9.gender) === null || _data$useDetails9$gen === void 0 ? void 0 : _data$useDetails9$gen.code) || "",
|
|
462
|
+
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$contact = data.contact) === null || _data$contact === void 0 ? void 0 : _data$contact.mobileNumber) || "",
|
|
463
|
+
name: `${data === null || data === void 0 ? void 0 : (_data$applicant2 = data.applicant) === null || _data$applicant2 === void 0 ? void 0 : _data$applicant2.firstName} ${(data === null || data === void 0 ? void 0 : (_data$applicant3 = data.applicant) === null || _data$applicant3 === void 0 ? void 0 : _data$applicant3.middleName) || ""} ${data === null || data === void 0 ? void 0 : (_data$applicant4 = data.applicant) === null || _data$applicant4 === void 0 ? void 0 : _data$applicant4.lastName}`.replace(/\s+/g, " ").trim(),
|
|
464
|
+
ownerType: (data === null || data === void 0 ? void 0 : (_data$applicationSele3 = data.applicationSelection) === null || _data$applicationSele3 === void 0 ? void 0 : (_data$applicationSele4 = _data$applicationSele3.categoryType) === null || _data$applicationSele4 === void 0 ? void 0 : _data$applicationSele4.code) || "",
|
|
465
|
+
relationship: "OTHERS",
|
|
466
|
+
sameAsPropertyAddress: true,
|
|
467
|
+
emailId: (data === null || data === void 0 ? void 0 : (_data$contact2 = data.contact) === null || _data$contact2 === void 0 ? void 0 : _data$contact2.emailId) || ""
|
|
468
|
+
}],
|
|
469
|
+
service: isWater && !isSewerage ? "Water" : !isWater && isSewerage ? "Sewerage" : "Water And Sewerage",
|
|
467
470
|
property: data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : _data$cpt2.details,
|
|
468
471
|
propertyId: data === null || data === void 0 ? void 0 : (_data$cpt3 = data.cpt) === null || _data$cpt3 === void 0 ? void 0 : (_data$cpt3$details = _data$cpt3.details) === null || _data$cpt3$details === void 0 ? void 0 : _data$cpt3$details.propertyId,
|
|
469
472
|
roadCuttingArea: null,
|
|
@@ -471,18 +474,28 @@ const createPayloadOfWS = async data => {
|
|
|
471
474
|
noOfWaterClosets: null,
|
|
472
475
|
noOfToilets: null,
|
|
473
476
|
additionalDetails: {
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
477
|
+
...(data === null || data === void 0 ? void 0 : data.useDetails),
|
|
478
|
+
...(data === null || data === void 0 ? void 0 : data.djbEmployee),
|
|
479
|
+
...(data === null || data === void 0 ? void 0 : data.bankDetails),
|
|
480
|
+
zro: data === null || data === void 0 ? void 0 : (_data$zro = data.zro) === null || _data$zro === void 0 ? void 0 : _data$zro.code,
|
|
481
|
+
locality: data === null || data === void 0 ? void 0 : (_data$propertyAddress2 = data.propertyAddress) === null || _data$propertyAddress2 === void 0 ? void 0 : (_data$propertyAddress3 = _data$propertyAddress2.locality) === null || _data$propertyAddress3 === void 0 ? void 0 : _data$propertyAddress3.code,
|
|
482
|
+
applicantType: data === null || data === void 0 ? void 0 : (_data$applicationSele5 = data.applicationSelection) === null || _data$applicationSele5 === void 0 ? void 0 : (_data$applicationSele6 = _data$applicationSele5.applicantType) === null || _data$applicationSele6 === void 0 ? void 0 : _data$applicationSele6.code,
|
|
483
|
+
connectionType: data === null || data === void 0 ? void 0 : (_data$applicationSele7 = data.applicationSelection) === null || _data$applicationSele7 === void 0 ? void 0 : (_data$applicationSele8 = _data$applicationSele7.connectionType) === null || _data$applicationSele8 === void 0 ? void 0 : _data$applicationSele8.code,
|
|
484
|
+
categoryType: data === null || data === void 0 ? void 0 : (_data$applicationSele9 = data.applicationSelection) === null || _data$applicationSele9 === void 0 ? void 0 : (_data$applicationSele0 = _data$applicationSele9.categoryType) === null || _data$applicationSele0 === void 0 ? void 0 : _data$applicationSele0.code,
|
|
485
|
+
subCategory: data === null || data === void 0 ? void 0 : (_data$applicationSele1 = data.applicationSelection) === null || _data$applicationSele1 === void 0 ? void 0 : (_data$applicationSele10 = _data$applicationSele1.subCategory) === null || _data$applicationSele10 === void 0 ? void 0 : _data$applicationSele10.code,
|
|
486
|
+
commercialType: data === null || data === void 0 ? void 0 : (_data$applicationSele11 = data.applicationSelection) === null || _data$applicationSele11 === void 0 ? void 0 : (_data$applicationSele12 = _data$applicationSele11.commercialType) === null || _data$applicationSele12 === void 0 ? void 0 : _data$applicationSele12.code,
|
|
487
|
+
govtOrganization: data === null || data === void 0 ? void 0 : (_data$applicationSele13 = data.applicationSelection) === null || _data$applicationSele13 === void 0 ? void 0 : _data$applicationSele13.govtOrganization,
|
|
488
|
+
whatsAppNumber: data === null || data === void 0 ? void 0 : (_data$contact3 = data.contact) === null || _data$contact3 === void 0 ? void 0 : _data$contact3.whatsAppNumber,
|
|
489
|
+
detailsProvidedBy: ""
|
|
490
|
+
},
|
|
491
|
+
tenantId: (data === null || data === void 0 ? void 0 : (_data$cpt4 = data.cpt) === null || _data$cpt4 === void 0 ? void 0 : (_data$cpt4$details = _data$cpt4.details) === null || _data$cpt4$details === void 0 ? void 0 : _data$cpt4$details.tenantId) || (data === null || data === void 0 ? void 0 : (_data$propertyAddress4 = data.propertyAddress) === null || _data$propertyAddress4 === void 0 ? void 0 : (_data$propertyAddress5 = _data$propertyAddress4.city) === null || _data$propertyAddress5 === void 0 ? void 0 : _data$propertyAddress5.code),
|
|
479
492
|
processInstance: {
|
|
480
493
|
action: "INITIATE"
|
|
481
494
|
},
|
|
482
495
|
channel: "CFC_COUNTER"
|
|
483
496
|
};
|
|
484
|
-
sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify(data === null || data === void 0 ? void 0 :
|
|
485
|
-
sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$
|
|
497
|
+
sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : data.documents));
|
|
498
|
+
sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$cpt5 = data.cpt) === null || _data$cpt5 === void 0 ? void 0 : _data$cpt5.details));
|
|
486
499
|
payload = (_Digit = Digit) !== null && _Digit !== void 0 && (_Digit$Customizations = _Digit.Customizations) !== null && _Digit$Customizations !== void 0 && (_Digit$Customizations2 = _Digit$Customizations.WS) !== null && _Digit$Customizations2 !== void 0 && _Digit$Customizations2.customiseCreatePayloadOfWS ? (_Digit2 = Digit) === null || _Digit2 === void 0 ? void 0 : (_Digit2$Customization = _Digit2.Customizations) === null || _Digit2$Customization === void 0 ? void 0 : (_Digit2$Customization2 = _Digit2$Customization.WS) === null || _Digit2$Customization2 === void 0 ? void 0 : _Digit2$Customization2.customiseCreatePayloadOfWS(data, payload) : payload;
|
|
487
500
|
return payload;
|
|
488
501
|
};
|
|
@@ -516,7 +529,7 @@ const convertToWSUpdate = data => {
|
|
|
516
529
|
return formdata;
|
|
517
530
|
};
|
|
518
531
|
const convertToEditWSUpdate = data => {
|
|
519
|
-
var _data$WaterConnection3, _data$WaterConnection4, _data$documents2, _data$
|
|
532
|
+
var _data$WaterConnection3, _data$WaterConnection4, _data$documents2, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$ConnectionHolde8, _data$ConnectionHolde9, _data$ConnectionHolde0, _data$ConnectionHolde1, _data$ConnectionHolde10, _data$ConnectionHolde11, _data$waterConectionD, _data$waterConectionD2, _data$waterConectionD3, _data$applicationType, _data$applicationType2, _data$serviceName, _waterResult$serviceN, _data$documents3, _data$sewerageConnect, _data$sewerageConnect2, _Digit7, _Digit7$Customization, _Digit7$Customization2, _Digit8, _Digit8$Customization, _Digit8$Customization2;
|
|
520
533
|
let waterResult = data === null || data === void 0 ? void 0 : (_data$WaterConnection3 = data.WaterConnectionResult) === null || _data$WaterConnection3 === void 0 ? void 0 : (_data$WaterConnection4 = _data$WaterConnection3.WaterConnection) === null || _data$WaterConnection4 === void 0 ? void 0 : _data$WaterConnection4[0];
|
|
521
534
|
let formdata = {
|
|
522
535
|
WaterConnection: {
|
|
@@ -551,16 +564,16 @@ const convertToEditWSUpdate = data => {
|
|
|
551
564
|
},
|
|
552
565
|
applicationType: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.applicationType : "MODIFY_WATER_CONNECTION",
|
|
553
566
|
dateEffectiveFrom: convertDateToEpoch(Date.now() + 86400000),
|
|
554
|
-
connectionHolders: data !== null && data !== void 0 && data.isEditApplication ? !(data !== null && data !== void 0 && (_data$
|
|
555
|
-
correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$
|
|
556
|
-
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$
|
|
557
|
-
gender: (data === null || data === void 0 ? void 0 : (_data$
|
|
558
|
-
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$
|
|
559
|
-
name: (data === null || data === void 0 ? void 0 : (_data$
|
|
560
|
-
emailId: (data === null || data === void 0 ? void 0 : (_data$
|
|
561
|
-
ownerType: (data === null || data === void 0 ? void 0 : (_data$
|
|
562
|
-
relationship: (data === null || data === void 0 ? void 0 : (_data$
|
|
563
|
-
sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$
|
|
567
|
+
connectionHolders: data !== null && data !== void 0 && data.isEditApplication ? !(data !== null && data !== void 0 && (_data$ConnectionHolde = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde !== void 0 && _data$ConnectionHolde.isOwnerSame) ? [{
|
|
568
|
+
correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde2 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde2 === void 0 ? void 0 : _data$ConnectionHolde2.address) || "",
|
|
569
|
+
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde3 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde3 === void 0 ? void 0 : _data$ConnectionHolde3.guardian) || "",
|
|
570
|
+
gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde4 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde4 === void 0 ? void 0 : (_data$ConnectionHolde5 = _data$ConnectionHolde4.gender) === null || _data$ConnectionHolde5 === void 0 ? void 0 : _data$ConnectionHolde5.code) || "",
|
|
571
|
+
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde6 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde6 === void 0 ? void 0 : _data$ConnectionHolde6.mobileNumber) || "",
|
|
572
|
+
name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde7 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde7 === void 0 ? void 0 : _data$ConnectionHolde7.name) || "",
|
|
573
|
+
emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde8 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde8 === void 0 ? void 0 : _data$ConnectionHolde8.emailId) || "",
|
|
574
|
+
ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde9 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde9 === void 0 ? void 0 : (_data$ConnectionHolde0 = _data$ConnectionHolde9.specialCategoryType) === null || _data$ConnectionHolde0 === void 0 ? void 0 : _data$ConnectionHolde0.code) || "",
|
|
575
|
+
relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde1 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde1 === void 0 ? void 0 : (_data$ConnectionHolde10 = _data$ConnectionHolde1.relationship) === null || _data$ConnectionHolde10 === void 0 ? void 0 : _data$ConnectionHolde10.code) || "",
|
|
576
|
+
sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde11 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde11 === void 0 ? void 0 : _data$ConnectionHolde11.sameAsOwnerDetails
|
|
564
577
|
}] : null : waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionHolders,
|
|
565
578
|
oldApplication: false,
|
|
566
579
|
channel: "CITIZEN",
|
|
@@ -595,7 +608,7 @@ const convertToEditWSUpdate = data => {
|
|
|
595
608
|
return formdata;
|
|
596
609
|
};
|
|
597
610
|
const convertToEditSWUpdate = data => {
|
|
598
|
-
var _data$SewerageConnect, _data$SewerageConnect2, _data$documents4, _data$
|
|
611
|
+
var _data$SewerageConnect, _data$SewerageConnect2, _data$documents4, _data$ConnectionHolde12, _data$ConnectionHolde13, _data$ConnectionHolde14, _data$ConnectionHolde15, _data$ConnectionHolde16, _data$ConnectionHolde17, _data$ConnectionHolde18, _data$ConnectionHolde19, _data$ConnectionHolde20, _data$ConnectionHolde21, _data$ConnectionHolde22, _data$ConnectionHolde23, _data$ConnectionHolde24, _data$waterConectionD4, _data$waterConectionD5, _data$waterConectionD6, _data$applicationType3, _data$applicationType4, _data$serviceName2, _SewerageResult$servi, _data$documents5, _data$sewerageConnect3, _data$sewerageConnect4, _Digit9, _Digit9$Customization, _Digit9$Customization2, _Digit0, _Digit0$Customization, _Digit0$Customization2;
|
|
599
612
|
let SewerageResult = data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnectionResult) === null || _data$SewerageConnect === void 0 ? void 0 : (_data$SewerageConnect2 = _data$SewerageConnect.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : _data$SewerageConnect2[0];
|
|
600
613
|
let formdata = {
|
|
601
614
|
SewerageConnection: {
|
|
@@ -630,16 +643,16 @@ const convertToEditSWUpdate = data => {
|
|
|
630
643
|
},
|
|
631
644
|
applicationType: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.applicationType : "MODIFY_WATER_CONNECTION",
|
|
632
645
|
dateEffectiveFrom: convertDateToEpoch(Date.now() + 86400000),
|
|
633
|
-
connectionHolders: data !== null && data !== void 0 && data.isEditApplication ? !(data !== null && data !== void 0 && (_data$
|
|
634
|
-
correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$
|
|
635
|
-
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$
|
|
636
|
-
gender: (data === null || data === void 0 ? void 0 : (_data$
|
|
637
|
-
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$
|
|
638
|
-
name: (data === null || data === void 0 ? void 0 : (_data$
|
|
639
|
-
emailId: (data === null || data === void 0 ? void 0 : (_data$
|
|
640
|
-
ownerType: (data === null || data === void 0 ? void 0 : (_data$
|
|
641
|
-
relationship: (data === null || data === void 0 ? void 0 : (_data$
|
|
642
|
-
sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$
|
|
646
|
+
connectionHolders: data !== null && data !== void 0 && data.isEditApplication ? !(data !== null && data !== void 0 && (_data$ConnectionHolde12 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde12 !== void 0 && _data$ConnectionHolde12.isOwnerSame) ? [{
|
|
647
|
+
correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde13 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde13 === void 0 ? void 0 : _data$ConnectionHolde13.address) || "",
|
|
648
|
+
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde14 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde14 === void 0 ? void 0 : _data$ConnectionHolde14.guardian) || "",
|
|
649
|
+
gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde15 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde15 === void 0 ? void 0 : (_data$ConnectionHolde16 = _data$ConnectionHolde15.gender) === null || _data$ConnectionHolde16 === void 0 ? void 0 : _data$ConnectionHolde16.code) || "",
|
|
650
|
+
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde17 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde17 === void 0 ? void 0 : _data$ConnectionHolde17.mobileNumber) || "",
|
|
651
|
+
name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde18 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde18 === void 0 ? void 0 : _data$ConnectionHolde18.name) || "",
|
|
652
|
+
emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde19 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde19 === void 0 ? void 0 : _data$ConnectionHolde19.emailId) || "",
|
|
653
|
+
ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde20 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde20 === void 0 ? void 0 : (_data$ConnectionHolde21 = _data$ConnectionHolde20.specialCategoryType) === null || _data$ConnectionHolde21 === void 0 ? void 0 : _data$ConnectionHolde21.code) || "",
|
|
654
|
+
relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde22 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde22 === void 0 ? void 0 : (_data$ConnectionHolde23 = _data$ConnectionHolde22.relationship) === null || _data$ConnectionHolde23 === void 0 ? void 0 : _data$ConnectionHolde23.code) || "",
|
|
655
|
+
sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde24 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde24 === void 0 ? void 0 : _data$ConnectionHolde24.sameAsOwnerDetails
|
|
643
656
|
}] : null : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.connectionHolders,
|
|
644
657
|
oldApplication: false,
|
|
645
658
|
channel: "CITIZEN",
|
|
@@ -1027,7 +1040,7 @@ const getDocumentsForPDF = (app, t) => {
|
|
|
1027
1040
|
});
|
|
1028
1041
|
};
|
|
1029
1042
|
const getPDFData = (application, data, tenantInfo, t) => {
|
|
1030
|
-
var _tenantInfo$city, _data$cpt7, _data$cpt7$details, _data$cpt8, _data$cpt8$details, _data$cpt9, _data$cpt9$details, _data$cpt0, _data$cpt0$details, _data$cpt1, _data$cpt1$details, _data$cpt1$details$ad, _data$cpt10, _data$cpt10$details, _data$cpt10$details$a, _data$cpt11, _data$cpt11$details, _data$cpt11$details$a, _data$cpt12, _data$cpt12$details, _data$cpt12$details$a, _data$cpt13, _data$cpt13$details, _data$cpt13$details$a, _data$
|
|
1043
|
+
var _tenantInfo$city, _data$cpt6, _data$cpt6$details, _data$cpt7, _data$cpt7$details, _data$cpt8, _data$cpt8$details, _data$cpt9, _data$cpt9$details, _data$cpt0, _data$cpt0$details, _data$cpt0$details$ad, _data$cpt1, _data$cpt1$details, _data$cpt1$details$ad, _data$cpt10, _data$cpt10$details, _data$cpt10$details$a, _data$cpt11, _data$cpt11$details, _data$cpt11$details$a, _data$cpt12, _data$cpt12$details, _data$cpt12$details$a, _data$cpt13, _data$cpt13$details, _data$cpt13$details$a, _data$cpt13$details$a2, _data$cpt14, _application$plumberI, _application$plumberI2, _application$plumberI3, _application$plumberI4;
|
|
1031
1044
|
return {
|
|
1032
1045
|
t: t,
|
|
1033
1046
|
tenantId: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code,
|
|
@@ -1049,44 +1062,44 @@ const getPDFData = (application, data, tenantInfo, t) => {
|
|
|
1049
1062
|
value: (application === null || application === void 0 ? void 0 : application.propertyId) || "N/A"
|
|
1050
1063
|
}, {
|
|
1051
1064
|
title: t("WS_PROPERTY_TYPE_LABEL"),
|
|
1052
|
-
value: (data === null || data === void 0 ? void 0 : (_data$
|
|
1065
|
+
value: (data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : (_data$cpt6$details = _data$cpt6.details) === null || _data$cpt6$details === void 0 ? void 0 : _data$cpt6$details.propertyType) || "N/A"
|
|
1053
1066
|
}, {
|
|
1054
1067
|
title: t("WS_PROPERTY_USAGE_TYPE_LABEL"),
|
|
1055
|
-
value: (data === null || data === void 0 ? void 0 : (_data$
|
|
1068
|
+
value: (data === null || data === void 0 ? void 0 : (_data$cpt7 = data.cpt) === null || _data$cpt7 === void 0 ? void 0 : (_data$cpt7$details = _data$cpt7.details) === null || _data$cpt7$details === void 0 ? void 0 : _data$cpt7$details.usageCategory) || "N/A"
|
|
1056
1069
|
}, {
|
|
1057
1070
|
title: t("WS_PROPERTY_SUB_USAGE_TYPE_LABEL"),
|
|
1058
1071
|
value: "N/A"
|
|
1059
1072
|
}, {
|
|
1060
1073
|
title: t("WS_PROP_DETAIL_PLOT_SIZE_LABEL"),
|
|
1061
|
-
value: (data === null || data === void 0 ? void 0 : (_data$
|
|
1074
|
+
value: (data === null || data === void 0 ? void 0 : (_data$cpt8 = data.cpt) === null || _data$cpt8 === void 0 ? void 0 : (_data$cpt8$details = _data$cpt8.details) === null || _data$cpt8$details === void 0 ? void 0 : _data$cpt8$details.superBuiltUpArea) || "N/A"
|
|
1062
1075
|
}, {
|
|
1063
1076
|
title: t("WS_PROPERTY_NO_OF_FLOOR_LABEL"),
|
|
1064
|
-
value: (data === null || data === void 0 ? void 0 : (_data$
|
|
1077
|
+
value: (data === null || data === void 0 ? void 0 : (_data$cpt9 = data.cpt) === null || _data$cpt9 === void 0 ? void 0 : (_data$cpt9$details = _data$cpt9.details) === null || _data$cpt9$details === void 0 ? void 0 : _data$cpt9$details.noOfFloors) || "N/A"
|
|
1065
1078
|
}, {
|
|
1066
1079
|
title: t("WS_SERV_DETAIL_CONN_RAIN_WATER_HARVESTING_FAC"),
|
|
1067
|
-
value: data === null || data === void 0 ? void 0 : (_data$
|
|
1080
|
+
value: data === null || data === void 0 ? void 0 : (_data$cpt0 = data.cpt) === null || _data$cpt0 === void 0 ? void 0 : (_data$cpt0$details = _data$cpt0.details) === null || _data$cpt0$details === void 0 ? void 0 : (_data$cpt0$details$ad = _data$cpt0$details.additionalDetails) === null || _data$cpt0$details$ad === void 0 ? void 0 : _data$cpt0$details$ad.isRainwaterHarvesting
|
|
1068
1081
|
}]
|
|
1069
1082
|
}, {
|
|
1070
1083
|
title: t("WS_COMMON_PROP_LOC_DETAIL_HEADER"),
|
|
1071
1084
|
values: [{
|
|
1072
1085
|
title: t("WS_PROP_DETAIL_CITY"),
|
|
1073
|
-
value: data === null || data === void 0 ? void 0 : (_data$
|
|
1086
|
+
value: data === null || data === void 0 ? void 0 : (_data$cpt1 = data.cpt) === null || _data$cpt1 === void 0 ? void 0 : (_data$cpt1$details = _data$cpt1.details) === null || _data$cpt1$details === void 0 ? void 0 : (_data$cpt1$details$ad = _data$cpt1$details.address) === null || _data$cpt1$details$ad === void 0 ? void 0 : _data$cpt1$details$ad.city
|
|
1074
1087
|
}, {
|
|
1075
1088
|
title: t("WS_PROP_DETAIL_DHNO"),
|
|
1076
|
-
value: data === null || data === void 0 ? void 0 : (_data$
|
|
1089
|
+
value: data === null || data === void 0 ? void 0 : (_data$cpt10 = data.cpt) === null || _data$cpt10 === void 0 ? void 0 : (_data$cpt10$details = _data$cpt10.details) === null || _data$cpt10$details === void 0 ? void 0 : (_data$cpt10$details$a = _data$cpt10$details.address) === null || _data$cpt10$details$a === void 0 ? void 0 : _data$cpt10$details$a.doorNo
|
|
1077
1090
|
}, {
|
|
1078
1091
|
title: t("WS_PROP_DETAIL_BUILD_NAME_LABEL"),
|
|
1079
|
-
value: data === null || data === void 0 ? void 0 : (_data$
|
|
1092
|
+
value: data === null || data === void 0 ? void 0 : (_data$cpt11 = data.cpt) === null || _data$cpt11 === void 0 ? void 0 : (_data$cpt11$details = _data$cpt11.details) === null || _data$cpt11$details === void 0 ? void 0 : (_data$cpt11$details$a = _data$cpt11$details.address) === null || _data$cpt11$details$a === void 0 ? void 0 : _data$cpt11$details$a.buildingName
|
|
1080
1093
|
}, {
|
|
1081
1094
|
title: t("WS_PROP_DETAIL_STREET_NAME"),
|
|
1082
|
-
value: data === null || data === void 0 ? void 0 : (_data$
|
|
1095
|
+
value: data === null || data === void 0 ? void 0 : (_data$cpt12 = data.cpt) === null || _data$cpt12 === void 0 ? void 0 : (_data$cpt12$details = _data$cpt12.details) === null || _data$cpt12$details === void 0 ? void 0 : (_data$cpt12$details$a = _data$cpt12$details.address) === null || _data$cpt12$details$a === void 0 ? void 0 : _data$cpt12$details$a.street
|
|
1083
1096
|
}, {
|
|
1084
1097
|
title: t("WS_PROP_DETAIL_LOCALITY_MOHALLA_LABEL"),
|
|
1085
|
-
value: data === null || data === void 0 ? void 0 : (_data$
|
|
1098
|
+
value: data === null || data === void 0 ? void 0 : (_data$cpt13 = data.cpt) === null || _data$cpt13 === void 0 ? void 0 : (_data$cpt13$details = _data$cpt13.details) === null || _data$cpt13$details === void 0 ? void 0 : (_data$cpt13$details$a = _data$cpt13$details.address) === null || _data$cpt13$details$a === void 0 ? void 0 : (_data$cpt13$details$a2 = _data$cpt13$details$a.locality) === null || _data$cpt13$details$a2 === void 0 ? void 0 : _data$cpt13$details$a2.name
|
|
1086
1099
|
}]
|
|
1087
1100
|
}, {
|
|
1088
1101
|
title: t("WS_TASK_PROP_OWN_HEADER"),
|
|
1089
|
-
values: getOwnersforPDF(data === null || data === void 0 ? void 0 : (_data$
|
|
1102
|
+
values: getOwnersforPDF(data === null || data === void 0 ? void 0 : (_data$cpt14 = data.cpt) === null || _data$cpt14 === void 0 ? void 0 : _data$cpt14.details, t)
|
|
1090
1103
|
}, {
|
|
1091
1104
|
...(application !== null && application !== void 0 && application.applicationType.includes("WATER") ? {
|
|
1092
1105
|
title: t("WS_COMMON_CONNECTION_DETAILS"),
|
|
@@ -1405,35 +1418,35 @@ const convertApplicationData = (data, serviceType, modify = false, editByConfig
|
|
|
1405
1418
|
return payload;
|
|
1406
1419
|
};
|
|
1407
1420
|
const convertEditApplicationDetails = async (data, appData, actionData) => {
|
|
1408
|
-
var _data$
|
|
1409
|
-
data === null || data === void 0 ? void 0 : (_data$
|
|
1421
|
+
var _data$cpt15, _data$cpt15$details, _data$cpt15$details$o, _data$cpt16, _data$cpt16$details, _data$ConnectionDetai, _data$ConnectionDetai2, _data$ConnectionDetai3, _data$ConnectionDetai4, _data$ConnectionDetai5, _data$ConnectionDetai6, _data$ConnectionDetai7, _data$ConnectionDetai8, _data$ConnectionDetai9, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$ConnectionDetai13, _data$ConnectionDetai14, _data$ConnectionDetai15, _data$ConnectionDetai16, _data$ConnectionHolde25, _data$ConnectionHolde26, _appData$applicationD, _appData$applicationD2, _data$ConnectionHolde27, _data$ConnectionHolde28, _data$ConnectionHolde29, _data$ConnectionHolde30, _data$ConnectionHolde31, _data$ConnectionHolde32, _data$ConnectionHolde33, _data$ConnectionHolde34, _data$ConnectionHolde35, _data$ConnectionHolde36, _data$ConnectionHolde37, _data$ConnectionHolde38, _data$ConnectionHolde39, _data$ConnectionHolde40, _data$ConnectionHolde41, _data$ConnectionHolde42, _data$ConnectionHolde43, _data$ConnectionHolde44, _data$ConnectionHolde45, _data$ConnectionHolde46, _data$ConnectionHolde47, _data$cpt17, _data$DocumentsRequir;
|
|
1422
|
+
data === null || data === void 0 ? void 0 : (_data$cpt15 = data.cpt) === null || _data$cpt15 === void 0 ? void 0 : (_data$cpt15$details = _data$cpt15.details) === null || _data$cpt15$details === void 0 ? void 0 : (_data$cpt15$details$o = _data$cpt15$details.owners) === null || _data$cpt15$details$o === void 0 ? void 0 : _data$cpt15$details$o.forEach(owner => {
|
|
1410
1423
|
if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
|
|
1411
1424
|
});
|
|
1412
1425
|
let payload = {
|
|
1413
1426
|
...appData.applicationData,
|
|
1414
|
-
propertyId: data === null || data === void 0 ? void 0 : (_data$
|
|
1415
|
-
proposedTaps: (data === null || data === void 0 ? void 0 : (_data$
|
|
1416
|
-
proposedPipeSize: (data === null || data === void 0 ? void 0 : (_data$
|
|
1417
|
-
proposedWaterClosets: (data === null || data === void 0 ? void 0 : (_data$
|
|
1418
|
-
proposedToilets: (data === null || data === void 0 ? void 0 : (_data$
|
|
1419
|
-
connectionHolders: !(data !== null && data !== void 0 && (_data$
|
|
1427
|
+
propertyId: data === null || data === void 0 ? void 0 : (_data$cpt16 = data.cpt) === null || _data$cpt16 === void 0 ? void 0 : (_data$cpt16$details = _data$cpt16.details) === null || _data$cpt16$details === void 0 ? void 0 : _data$cpt16$details.propertyId,
|
|
1428
|
+
proposedTaps: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai = data.ConnectionDetails) === null || _data$ConnectionDetai === void 0 ? void 0 : (_data$ConnectionDetai2 = _data$ConnectionDetai[0]) === null || _data$ConnectionDetai2 === void 0 ? void 0 : _data$ConnectionDetai2.proposedTaps) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai3 = data.ConnectionDetails) === null || _data$ConnectionDetai3 === void 0 ? void 0 : (_data$ConnectionDetai4 = _data$ConnectionDetai3[0]) === null || _data$ConnectionDetai4 === void 0 ? void 0 : _data$ConnectionDetai4.proposedTaps),
|
|
1429
|
+
proposedPipeSize: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai5 = data.ConnectionDetails) === null || _data$ConnectionDetai5 === void 0 ? void 0 : (_data$ConnectionDetai6 = _data$ConnectionDetai5[0]) === null || _data$ConnectionDetai6 === void 0 ? void 0 : (_data$ConnectionDetai7 = _data$ConnectionDetai6.proposedPipeSize) === null || _data$ConnectionDetai7 === void 0 ? void 0 : _data$ConnectionDetai7.size) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai8 = data.ConnectionDetails) === null || _data$ConnectionDetai8 === void 0 ? void 0 : (_data$ConnectionDetai9 = _data$ConnectionDetai8[0]) === null || _data$ConnectionDetai9 === void 0 ? void 0 : (_data$ConnectionDetai0 = _data$ConnectionDetai9.proposedPipeSize) === null || _data$ConnectionDetai0 === void 0 ? void 0 : _data$ConnectionDetai0.size),
|
|
1430
|
+
proposedWaterClosets: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai1 = data.ConnectionDetails) === null || _data$ConnectionDetai1 === void 0 ? void 0 : (_data$ConnectionDetai10 = _data$ConnectionDetai1[0]) === null || _data$ConnectionDetai10 === void 0 ? void 0 : _data$ConnectionDetai10.proposedWaterClosets) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai11 = data.ConnectionDetails) === null || _data$ConnectionDetai11 === void 0 ? void 0 : (_data$ConnectionDetai12 = _data$ConnectionDetai11[0]) === null || _data$ConnectionDetai12 === void 0 ? void 0 : _data$ConnectionDetai12.proposedWaterClosets),
|
|
1431
|
+
proposedToilets: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai13 = data.ConnectionDetails) === null || _data$ConnectionDetai13 === void 0 ? void 0 : (_data$ConnectionDetai14 = _data$ConnectionDetai13[0]) === null || _data$ConnectionDetai14 === void 0 ? void 0 : _data$ConnectionDetai14.proposedToilets) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai15 = data.ConnectionDetails) === null || _data$ConnectionDetai15 === void 0 ? void 0 : (_data$ConnectionDetai16 = _data$ConnectionDetai15[0]) === null || _data$ConnectionDetai16 === void 0 ? void 0 : _data$ConnectionDetai16.proposedToilets),
|
|
1432
|
+
connectionHolders: !(data !== null && data !== void 0 && (_data$ConnectionHolde25 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde25 !== void 0 && (_data$ConnectionHolde26 = _data$ConnectionHolde25[0]) !== null && _data$ConnectionHolde26 !== void 0 && _data$ConnectionHolde26.sameAsOwnerDetails) ? [{
|
|
1420
1433
|
...(appData === null || appData === void 0 ? void 0 : (_appData$applicationD = appData.applicationData) === null || _appData$applicationD === void 0 ? void 0 : (_appData$applicationD2 = _appData$applicationD.connectionHolders) === null || _appData$applicationD2 === void 0 ? void 0 : _appData$applicationD2[0]),
|
|
1421
|
-
correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$
|
|
1422
|
-
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$
|
|
1423
|
-
gender: (data === null || data === void 0 ? void 0 : (_data$
|
|
1424
|
-
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$
|
|
1425
|
-
name: (data === null || data === void 0 ? void 0 : (_data$
|
|
1426
|
-
emailId: (data === null || data === void 0 ? void 0 : (_data$
|
|
1427
|
-
ownerType: (data === null || data === void 0 ? void 0 : (_data$
|
|
1428
|
-
relationship: (data === null || data === void 0 ? void 0 : (_data$
|
|
1429
|
-
sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$
|
|
1434
|
+
correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde27 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde27 === void 0 ? void 0 : (_data$ConnectionHolde28 = _data$ConnectionHolde27[0]) === null || _data$ConnectionHolde28 === void 0 ? void 0 : _data$ConnectionHolde28.address) || "",
|
|
1435
|
+
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde29 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde29 === void 0 ? void 0 : (_data$ConnectionHolde30 = _data$ConnectionHolde29[0]) === null || _data$ConnectionHolde30 === void 0 ? void 0 : _data$ConnectionHolde30.guardian) || "",
|
|
1436
|
+
gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde31 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde31 === void 0 ? void 0 : (_data$ConnectionHolde32 = _data$ConnectionHolde31[0]) === null || _data$ConnectionHolde32 === void 0 ? void 0 : (_data$ConnectionHolde33 = _data$ConnectionHolde32.gender) === null || _data$ConnectionHolde33 === void 0 ? void 0 : _data$ConnectionHolde33.code) || "",
|
|
1437
|
+
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde34 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde34 === void 0 ? void 0 : (_data$ConnectionHolde35 = _data$ConnectionHolde34[0]) === null || _data$ConnectionHolde35 === void 0 ? void 0 : _data$ConnectionHolde35.mobileNumber) || "",
|
|
1438
|
+
name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde36 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde36 === void 0 ? void 0 : (_data$ConnectionHolde37 = _data$ConnectionHolde36[0]) === null || _data$ConnectionHolde37 === void 0 ? void 0 : _data$ConnectionHolde37.name) || "",
|
|
1439
|
+
emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde38 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde38 === void 0 ? void 0 : (_data$ConnectionHolde39 = _data$ConnectionHolde38[0]) === null || _data$ConnectionHolde39 === void 0 ? void 0 : _data$ConnectionHolde39.emailId) || "",
|
|
1440
|
+
ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde40 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde40 === void 0 ? void 0 : (_data$ConnectionHolde41 = _data$ConnectionHolde40[0]) === null || _data$ConnectionHolde41 === void 0 ? void 0 : (_data$ConnectionHolde42 = _data$ConnectionHolde41.ownerType) === null || _data$ConnectionHolde42 === void 0 ? void 0 : _data$ConnectionHolde42.code) || "",
|
|
1441
|
+
relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde43 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde43 === void 0 ? void 0 : (_data$ConnectionHolde44 = _data$ConnectionHolde43[0]) === null || _data$ConnectionHolde44 === void 0 ? void 0 : (_data$ConnectionHolde45 = _data$ConnectionHolde44.relationship) === null || _data$ConnectionHolde45 === void 0 ? void 0 : _data$ConnectionHolde45.code) || "",
|
|
1442
|
+
sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde46 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde46 === void 0 ? void 0 : (_data$ConnectionHolde47 = _data$ConnectionHolde46[0]) === null || _data$ConnectionHolde47 === void 0 ? void 0 : _data$ConnectionHolde47.sameAsOwnerDetails
|
|
1430
1443
|
}] : null,
|
|
1431
|
-
property: data === null || data === void 0 ? void 0 : (_data$
|
|
1444
|
+
property: data === null || data === void 0 ? void 0 : (_data$cpt17 = data.cpt) === null || _data$cpt17 === void 0 ? void 0 : _data$cpt17.details,
|
|
1432
1445
|
processInstance: {
|
|
1433
1446
|
action: actionData ? actionData : "RESUBMIT_APPLICATION"
|
|
1434
1447
|
},
|
|
1435
1448
|
action: actionData ? actionData : "RESUBMIT_APPLICATION",
|
|
1436
|
-
documents: data === null || data === void 0 ? void 0 : (_data$
|
|
1449
|
+
documents: data === null || data === void 0 ? void 0 : (_data$DocumentsRequir = data.DocumentsRequired) === null || _data$DocumentsRequir === void 0 ? void 0 : _data$DocumentsRequir.documents
|
|
1437
1450
|
};
|
|
1438
1451
|
return payload;
|
|
1439
1452
|
};
|
|
@@ -1488,7 +1501,7 @@ const convertDisonnectApplicationData = (data, serviceType, editByConfig = false
|
|
|
1488
1501
|
return payload;
|
|
1489
1502
|
};
|
|
1490
1503
|
const convertDisonnectEditApplicationDetails = async (data, appData, actionData) => {
|
|
1491
|
-
var _data$plumberDetails, _data$plumberDetails$, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _appData$applicationD5, _appData$applicationD6, _appData$applicationD7, _data$
|
|
1504
|
+
var _data$plumberDetails, _data$plumberDetails$, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _appData$applicationD5, _appData$applicationD6, _appData$applicationD7, _data$DocumentsRequir2, _data$disConnectionDe, _data$disConnectionDe2, _data$disConnectionDe3, _data$disConnectionDe4, _data$disConnectionDe5, _data$disConnectionDe6, _data$plumberDetails6, _data$plumberDetails7, _data$plumberDetails8;
|
|
1492
1505
|
const docs = sessionStorage.getItem("DISCONNECTION_EDIT_DOCS");
|
|
1493
1506
|
const docsData = docs ? JSON.parse(docs) : "";
|
|
1494
1507
|
const documentsData = [];
|
|
@@ -1516,7 +1529,7 @@ const convertDisonnectEditApplicationDetails = async (data, appData, actionData)
|
|
|
1516
1529
|
}];
|
|
1517
1530
|
let payload = {
|
|
1518
1531
|
...appData.applicationData,
|
|
1519
|
-
documents: (documentsData === null || documentsData === void 0 ? void 0 : documentsData.length) > 0 ? documentsData : data === null || data === void 0 ? void 0 : (_data$
|
|
1532
|
+
documents: (documentsData === null || documentsData === void 0 ? void 0 : documentsData.length) > 0 ? documentsData : data === null || data === void 0 ? void 0 : (_data$DocumentsRequir2 = data.DocumentsRequired) === null || _data$DocumentsRequir2 === void 0 ? void 0 : _data$DocumentsRequir2.documents,
|
|
1520
1533
|
isDisconnectionTemporary: (data === null || data === void 0 ? void 0 : (_data$disConnectionDe = data.disConnectionDetails) === null || _data$disConnectionDe === void 0 ? void 0 : (_data$disConnectionDe2 = _data$disConnectionDe[0]) === null || _data$disConnectionDe2 === void 0 ? void 0 : _data$disConnectionDe2.disConnectionType) == "TEMPORARY" ? true : false,
|
|
1521
1534
|
disconnectionReason: (data === null || data === void 0 ? void 0 : (_data$disConnectionDe3 = data.disConnectionDetails) === null || _data$disConnectionDe3 === void 0 ? void 0 : (_data$disConnectionDe4 = _data$disConnectionDe3[0]) === null || _data$disConnectionDe4 === void 0 ? void 0 : _data$disConnectionDe4.disConnectionReason) || "",
|
|
1522
1535
|
dateEffectiveFrom: await getConvertedDate(data === null || data === void 0 ? void 0 : (_data$disConnectionDe5 = data.disConnectionDetails) === null || _data$disConnectionDe5 === void 0 ? void 0 : (_data$disConnectionDe6 = _data$disConnectionDe5[0]) === null || _data$disConnectionDe6 === void 0 ? void 0 : _data$disConnectionDe6.disConnectionProposeDate),
|
|
@@ -1549,14 +1562,14 @@ const getConvertedDate = async dateOfTime => {
|
|
|
1549
1562
|
return convertedDate;
|
|
1550
1563
|
};
|
|
1551
1564
|
const convertModifyApplicationDetails = async (data, appData, actionData = "INITIATE") => {
|
|
1552
|
-
var _data$
|
|
1553
|
-
data === null || data === void 0 ? void 0 : (_data$
|
|
1565
|
+
var _data$cpt18, _data$cpt18$details, _data$cpt18$details$o, _data$cpt19, _data$cpt19$details, _data$cpt20, _data$cpt20$details, _data$connectionDetai, _data$connectionDetai2, _data$connectionDetai3, _data$connectionDetai4, _data$connectionDetai5, _data$connectionDetai6, _data$connectionDetai7, _data$connectionDetai8, _data$connectionDetai9, _data$connectionDetai0, _data$connectionDetai1, _data$connectionDetai10, _data$connectionDetai11, _data$connectionDetai12, _data$connectionDetai13, _data$connectionDetai14, _data$connectionDetai15, _data$connectionDetai16, _data$connectionDetai17, _data$connectionDetai18, _data$connectionDetai19, _data$connectionDetai20, _data$connectionDetai21, _data$connectionDetai22, _data$connectionDetai23, _data$connectionDetai24, _data$connectionDetai25, _data$connectionDetai26, _data$connectionDetai27, _data$connectionDetai28, _data$activationDetai, _data$activationDetai2, _data$activationDetai3, _data$activationDetai4, _data$activationDetai5, _data$activationDetai6, _data$activationDetai7, _data$activationDetai8, _data$activationDetai9, _data$activationDetai0, _data$activationDetai1, _data$activationDetai10, _data$activationDetai11, _data$activationDetai12, _data$activationDetai13, _data$activationDetai14, _data$activationDetai15, _data$activationDetai16, _data$activationDetai17, _data$activationDetai18, _data$DocumentsRequir3, _data$DocumentsRequir4, _data$DocumentsRequir5, _data$ConnectionHolde48, _data$ConnectionHolde49, _data$DocumentsRequir6, _data$cpt21;
|
|
1566
|
+
data === null || data === void 0 ? void 0 : (_data$cpt18 = data.cpt) === null || _data$cpt18 === void 0 ? void 0 : (_data$cpt18$details = _data$cpt18.details) === null || _data$cpt18$details === void 0 ? void 0 : (_data$cpt18$details$o = _data$cpt18$details.owners) === null || _data$cpt18$details$o === void 0 ? void 0 : _data$cpt18$details$o.forEach(owner => {
|
|
1554
1567
|
if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
|
|
1555
1568
|
});
|
|
1556
1569
|
let formData = {
|
|
1557
1570
|
...appData.applicationData
|
|
1558
1571
|
};
|
|
1559
|
-
if (data !== null && data !== void 0 && (_data$
|
|
1572
|
+
if (data !== null && data !== void 0 && (_data$cpt19 = data.cpt) !== null && _data$cpt19 !== void 0 && (_data$cpt19$details = _data$cpt19.details) !== null && _data$cpt19$details !== void 0 && _data$cpt19$details.propertyId) formData.propertyId = data === null || data === void 0 ? void 0 : (_data$cpt20 = data.cpt) === null || _data$cpt20 === void 0 ? void 0 : (_data$cpt20$details = _data$cpt20.details) === null || _data$cpt20$details === void 0 ? void 0 : _data$cpt20$details.propertyId;
|
|
1560
1573
|
if (data !== null && data !== void 0 && (_data$connectionDetai = data.connectionDetails) !== null && _data$connectionDetai !== void 0 && (_data$connectionDetai2 = _data$connectionDetai[0]) !== null && _data$connectionDetai2 !== void 0 && (_data$connectionDetai3 = _data$connectionDetai2.connectionType) !== null && _data$connectionDetai3 !== void 0 && _data$connectionDetai3.code) formData.connectionType = data === null || data === void 0 ? void 0 : (_data$connectionDetai4 = data.connectionDetails) === null || _data$connectionDetai4 === void 0 ? void 0 : (_data$connectionDetai5 = _data$connectionDetai4[0]) === null || _data$connectionDetai5 === void 0 ? void 0 : (_data$connectionDetai6 = _data$connectionDetai5.connectionType) === null || _data$connectionDetai6 === void 0 ? void 0 : _data$connectionDetai6.code;
|
|
1561
1574
|
if (data !== null && data !== void 0 && (_data$connectionDetai7 = data.connectionDetails) !== null && _data$connectionDetai7 !== void 0 && (_data$connectionDetai8 = _data$connectionDetai7[0]) !== null && _data$connectionDetai8 !== void 0 && (_data$connectionDetai9 = _data$connectionDetai8.waterSource) !== null && _data$connectionDetai9 !== void 0 && _data$connectionDetai9.code) formData.waterSource = data === null || data === void 0 ? void 0 : (_data$connectionDetai0 = data.connectionDetails) === null || _data$connectionDetai0 === void 0 ? void 0 : (_data$connectionDetai1 = _data$connectionDetai0[0]) === null || _data$connectionDetai1 === void 0 ? void 0 : (_data$connectionDetai10 = _data$connectionDetai1.waterSource) === null || _data$connectionDetai10 === void 0 ? void 0 : _data$connectionDetai10.code;
|
|
1562
1575
|
if (data !== null && data !== void 0 && (_data$connectionDetai11 = data.connectionDetails) !== null && _data$connectionDetai11 !== void 0 && (_data$connectionDetai12 = _data$connectionDetai11[0]) !== null && _data$connectionDetai12 !== void 0 && (_data$connectionDetai13 = _data$connectionDetai12.pipeSize) !== null && _data$connectionDetai13 !== void 0 && _data$connectionDetai13.size) formData.pipeSize = data === null || data === void 0 ? void 0 : (_data$connectionDetai14 = data.connectionDetails) === null || _data$connectionDetai14 === void 0 ? void 0 : (_data$connectionDetai15 = _data$connectionDetai14[0]) === null || _data$connectionDetai15 === void 0 ? void 0 : (_data$connectionDetai16 = _data$connectionDetai15.pipeSize) === null || _data$connectionDetai16 === void 0 ? void 0 : _data$connectionDetai16.size;
|
|
@@ -1568,20 +1581,20 @@ const convertModifyApplicationDetails = async (data, appData, actionData = "INIT
|
|
|
1568
1581
|
if (data !== null && data !== void 0 && (_data$activationDetai9 = data.activationDetails) !== null && _data$activationDetai9 !== void 0 && (_data$activationDetai0 = _data$activationDetai9[0]) !== null && _data$activationDetai0 !== void 0 && _data$activationDetai0.meterInitialReading) formData.additionalDetails.initialMeterReading = data === null || data === void 0 ? void 0 : (_data$activationDetai1 = data.activationDetails) === null || _data$activationDetai1 === void 0 ? void 0 : (_data$activationDetai10 = _data$activationDetai1[0]) === null || _data$activationDetai10 === void 0 ? void 0 : _data$activationDetai10.meterInitialReading;
|
|
1569
1582
|
if (data !== null && data !== void 0 && (_data$activationDetai11 = data.activationDetails) !== null && _data$activationDetai11 !== void 0 && (_data$activationDetai12 = _data$activationDetai11[0]) !== null && _data$activationDetai12 !== void 0 && _data$activationDetai12.connectionExecutionDate) formData.connectionExecutionDate = await getConvertedDate(data === null || data === void 0 ? void 0 : (_data$activationDetai13 = data.activationDetails) === null || _data$activationDetai13 === void 0 ? void 0 : (_data$activationDetai14 = _data$activationDetai13[0]) === null || _data$activationDetai14 === void 0 ? void 0 : _data$activationDetai14.connectionExecutionDate);
|
|
1570
1583
|
if (data !== null && data !== void 0 && (_data$activationDetai15 = data.activationDetails) !== null && _data$activationDetai15 !== void 0 && (_data$activationDetai16 = _data$activationDetai15[0]) !== null && _data$activationDetai16 !== void 0 && _data$activationDetai16.dateEffectiveFrom) formData.dateEffectiveFrom = await getConvertedDate(data === null || data === void 0 ? void 0 : (_data$activationDetai17 = data.activationDetails) === null || _data$activationDetai17 === void 0 ? void 0 : (_data$activationDetai18 = _data$activationDetai17[0]) === null || _data$activationDetai18 === void 0 ? void 0 : _data$activationDetai18.dateEffectiveFrom);
|
|
1571
|
-
if (data !== null && data !== void 0 && (_data$
|
|
1572
|
-
if (!(data !== null && data !== void 0 && (_data$
|
|
1573
|
-
var _appData$applicationD8, _appData$applicationD9, _data$
|
|
1584
|
+
if (data !== null && data !== void 0 && (_data$DocumentsRequir3 = data.DocumentsRequired) !== null && _data$DocumentsRequir3 !== void 0 && (_data$DocumentsRequir4 = _data$DocumentsRequir3.documents) !== null && _data$DocumentsRequir4 !== void 0 && _data$DocumentsRequir4.length) formData.documents = data === null || data === void 0 ? void 0 : (_data$DocumentsRequir5 = data.DocumentsRequired) === null || _data$DocumentsRequir5 === void 0 ? void 0 : _data$DocumentsRequir5.documents;else formData.documents = null;
|
|
1585
|
+
if (!(data !== null && data !== void 0 && (_data$ConnectionHolde48 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde48 !== void 0 && (_data$ConnectionHolde49 = _data$ConnectionHolde48[0]) !== null && _data$ConnectionHolde49 !== void 0 && _data$ConnectionHolde49.sameAsOwnerDetails)) {
|
|
1586
|
+
var _appData$applicationD8, _appData$applicationD9, _data$ConnectionHolde50, _data$ConnectionHolde51, _data$ConnectionHolde52, _data$ConnectionHolde53, _data$ConnectionHolde54, _data$ConnectionHolde55, _data$ConnectionHolde56, _data$ConnectionHolde57, _data$ConnectionHolde58, _data$ConnectionHolde59, _data$ConnectionHolde60, _data$ConnectionHolde61, _data$ConnectionHolde62, _data$ConnectionHolde63, _data$ConnectionHolde64, _data$ConnectionHolde65, _data$ConnectionHolde66, _data$ConnectionHolde67, _data$ConnectionHolde68, _data$ConnectionHolde69, _data$ConnectionHolde70;
|
|
1574
1587
|
formData.connectionHolders = [{
|
|
1575
1588
|
...(appData === null || appData === void 0 ? void 0 : (_appData$applicationD8 = appData.applicationData) === null || _appData$applicationD8 === void 0 ? void 0 : (_appData$applicationD9 = _appData$applicationD8.connectionHolders) === null || _appData$applicationD9 === void 0 ? void 0 : _appData$applicationD9[0]),
|
|
1576
|
-
correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$
|
|
1577
|
-
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$
|
|
1578
|
-
gender: (data === null || data === void 0 ? void 0 : (_data$
|
|
1579
|
-
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$
|
|
1580
|
-
name: (data === null || data === void 0 ? void 0 : (_data$
|
|
1581
|
-
emailId: (data === null || data === void 0 ? void 0 : (_data$
|
|
1582
|
-
ownerType: (data === null || data === void 0 ? void 0 : (_data$
|
|
1583
|
-
relationship: (data === null || data === void 0 ? void 0 : (_data$
|
|
1584
|
-
sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$
|
|
1589
|
+
correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde50 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde50 === void 0 ? void 0 : (_data$ConnectionHolde51 = _data$ConnectionHolde50[0]) === null || _data$ConnectionHolde51 === void 0 ? void 0 : _data$ConnectionHolde51.address) || "",
|
|
1590
|
+
fatherOrHusbandName: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde52 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde52 === void 0 ? void 0 : (_data$ConnectionHolde53 = _data$ConnectionHolde52[0]) === null || _data$ConnectionHolde53 === void 0 ? void 0 : _data$ConnectionHolde53.guardian) || "",
|
|
1591
|
+
gender: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde54 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde54 === void 0 ? void 0 : (_data$ConnectionHolde55 = _data$ConnectionHolde54[0]) === null || _data$ConnectionHolde55 === void 0 ? void 0 : (_data$ConnectionHolde56 = _data$ConnectionHolde55.gender) === null || _data$ConnectionHolde56 === void 0 ? void 0 : _data$ConnectionHolde56.code) || "",
|
|
1592
|
+
mobileNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde57 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde57 === void 0 ? void 0 : (_data$ConnectionHolde58 = _data$ConnectionHolde57[0]) === null || _data$ConnectionHolde58 === void 0 ? void 0 : _data$ConnectionHolde58.mobileNumber) || "",
|
|
1593
|
+
name: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde59 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde59 === void 0 ? void 0 : (_data$ConnectionHolde60 = _data$ConnectionHolde59[0]) === null || _data$ConnectionHolde60 === void 0 ? void 0 : _data$ConnectionHolde60.name) || "",
|
|
1594
|
+
emailId: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde61 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde61 === void 0 ? void 0 : (_data$ConnectionHolde62 = _data$ConnectionHolde61[0]) === null || _data$ConnectionHolde62 === void 0 ? void 0 : _data$ConnectionHolde62.emailId) || "",
|
|
1595
|
+
ownerType: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde63 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde63 === void 0 ? void 0 : (_data$ConnectionHolde64 = _data$ConnectionHolde63[0]) === null || _data$ConnectionHolde64 === void 0 ? void 0 : (_data$ConnectionHolde65 = _data$ConnectionHolde64.ownerType) === null || _data$ConnectionHolde65 === void 0 ? void 0 : _data$ConnectionHolde65.code) || "",
|
|
1596
|
+
relationship: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde66 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde66 === void 0 ? void 0 : (_data$ConnectionHolde67 = _data$ConnectionHolde66[0]) === null || _data$ConnectionHolde67 === void 0 ? void 0 : (_data$ConnectionHolde68 = _data$ConnectionHolde67.relationship) === null || _data$ConnectionHolde68 === void 0 ? void 0 : _data$ConnectionHolde68.code) || "",
|
|
1597
|
+
sameAsPropertyAddress: data === null || data === void 0 ? void 0 : (_data$ConnectionHolde69 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde69 === void 0 ? void 0 : (_data$ConnectionHolde70 = _data$ConnectionHolde69[0]) === null || _data$ConnectionHolde70 === void 0 ? void 0 : _data$ConnectionHolde70.sameAsOwnerDetails
|
|
1585
1598
|
}];
|
|
1586
1599
|
}
|
|
1587
1600
|
formData.processInstance = {
|
|
@@ -1589,8 +1602,8 @@ const convertModifyApplicationDetails = async (data, appData, actionData = "INIT
|
|
|
1589
1602
|
};
|
|
1590
1603
|
formData.action = actionData;
|
|
1591
1604
|
formData.channel = "CFC_COUNTER";
|
|
1592
|
-
sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify((data === null || data === void 0 ? void 0 : (_data$
|
|
1593
|
-
sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$
|
|
1605
|
+
sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify((data === null || data === void 0 ? void 0 : (_data$DocumentsRequir6 = data.DocumentsRequired) === null || _data$DocumentsRequir6 === void 0 ? void 0 : _data$DocumentsRequir6.documents) || []));
|
|
1606
|
+
sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$cpt21 = data.cpt) === null || _data$cpt21 === void 0 ? void 0 : _data$cpt21.details));
|
|
1594
1607
|
return formData;
|
|
1595
1608
|
};
|
|
1596
1609
|
const downloadPdf = (blob, fileName) => {
|
|
@@ -9860,15 +9873,6 @@ const WSDocsRequired = ({
|
|
|
9860
9873
|
const goNext = () => {
|
|
9861
9874
|
onSelect("DocsReq", "");
|
|
9862
9875
|
};
|
|
9863
|
-
const {
|
|
9864
|
-
control,
|
|
9865
|
-
formState: localFormState,
|
|
9866
|
-
getValues
|
|
9867
|
-
} = useForm();
|
|
9868
|
-
const [zro, setZro] = useState({
|
|
9869
|
-
value: "",
|
|
9870
|
-
error: ""
|
|
9871
|
-
});
|
|
9872
9876
|
sessionStorage.removeItem("Digit.PT_CREATE_EMP_WS_NEW_FORM");
|
|
9873
9877
|
sessionStorage.removeItem("IsDetailsExists");
|
|
9874
9878
|
sessionStorage.removeItem("FORMSTATE_ERRORS");
|
|
@@ -9935,23 +9939,6 @@ const WSDocsRequired = ({
|
|
|
9935
9939
|
onSubmit: goNext
|
|
9936
9940
|
})));
|
|
9937
9941
|
}
|
|
9938
|
-
const menu = [{
|
|
9939
|
-
i18nKey: "ASHOK VIHAR",
|
|
9940
|
-
code: "ASHOK VIHAR",
|
|
9941
|
-
value: "ASHOK VIHAR"
|
|
9942
|
-
}, {
|
|
9943
|
-
i18nKey: "BURARI",
|
|
9944
|
-
code: "BURARI",
|
|
9945
|
-
value: "BURARI"
|
|
9946
|
-
}, {
|
|
9947
|
-
i18nKey: "DWARKA",
|
|
9948
|
-
code: "DWARKA",
|
|
9949
|
-
value: "DWARKA"
|
|
9950
|
-
}, {
|
|
9951
|
-
i18nKey: "OKHLA",
|
|
9952
|
-
code: "OKHLA",
|
|
9953
|
-
value: "OKHLA"
|
|
9954
|
-
}];
|
|
9955
9942
|
return /*#__PURE__*/React.createElement("div", {
|
|
9956
9943
|
className: "employee-form-content-with-action-bar"
|
|
9957
9944
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -9980,37 +9967,7 @@ const WSDocsRequired = ({
|
|
|
9980
9967
|
}, /*#__PURE__*/React.createElement("span", {
|
|
9981
9968
|
className: "ws-doc-bullet"
|
|
9982
9969
|
}, idx + 1, "."), /*#__PURE__*/React.createElement("span", null, t(value === null || value === void 0 ? void 0 : value.i18nKey))))));
|
|
9983
|
-
}), /*#__PURE__*/React.createElement(
|
|
9984
|
-
className: "ws-doc-card"
|
|
9985
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
9986
|
-
className: "card-label-smaller"
|
|
9987
|
-
}, "ZRO Location"), /*#__PURE__*/React.createElement("div", {
|
|
9988
|
-
className: "field"
|
|
9989
|
-
}, /*#__PURE__*/React.createElement(Controller, {
|
|
9990
|
-
control: control,
|
|
9991
|
-
name: "zro",
|
|
9992
|
-
defaultValue: zro,
|
|
9993
|
-
rules: {
|
|
9994
|
-
required: t("REQUIRED_FIELD")
|
|
9995
|
-
},
|
|
9996
|
-
isMandatory: true,
|
|
9997
|
-
render: props => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
9998
|
-
className: "form-field",
|
|
9999
|
-
selected: getValues("gender"),
|
|
10000
|
-
disable: false,
|
|
10001
|
-
option: menu,
|
|
10002
|
-
errorStyle: localFormState.touched.gender && zro.error ? true : false,
|
|
10003
|
-
select: e => {
|
|
10004
|
-
setZro(prev => ({
|
|
10005
|
-
...prev,
|
|
10006
|
-
value: e
|
|
10007
|
-
}));
|
|
10008
|
-
},
|
|
10009
|
-
optionKey: "i18nKey",
|
|
10010
|
-
onBlur: props.onBlur,
|
|
10011
|
-
t: t
|
|
10012
|
-
}))
|
|
10013
|
-
}))), localFormState && zro.error && /*#__PURE__*/React.createElement(CardLabelError, null, zro.error)))), /*#__PURE__*/React.createElement(ActionBar, {
|
|
9970
|
+
})), /*#__PURE__*/React.createElement(ActionBar, {
|
|
10014
9971
|
style: {
|
|
10015
9972
|
display: "flex",
|
|
10016
9973
|
justifyContent: "flex-end",
|
|
@@ -10020,8 +9977,7 @@ const WSDocsRequired = ({
|
|
|
10020
9977
|
label: t("ACTION_TEST_APPLY"),
|
|
10021
9978
|
onSubmit: () => {
|
|
10022
9979
|
history.push(match.path.replace("create-application", "new-application"));
|
|
10023
|
-
}
|
|
10024
|
-
disabled: wsDocsLoading || !zro.value ? true : false
|
|
9980
|
+
}
|
|
10025
9981
|
}))));
|
|
10026
9982
|
};
|
|
10027
9983
|
|
|
@@ -13445,8 +13401,8 @@ var _DataView = DataView;
|
|
|
13445
13401
|
var Promise$1 = _getNative(_root, 'Promise');
|
|
13446
13402
|
var _Promise = Promise$1;
|
|
13447
13403
|
|
|
13448
|
-
var Set = _getNative(_root, 'Set');
|
|
13449
|
-
var _Set = Set;
|
|
13404
|
+
var Set$1 = _getNative(_root, 'Set');
|
|
13405
|
+
var _Set = Set$1;
|
|
13450
13406
|
|
|
13451
13407
|
var WeakMap = _getNative(_root, 'WeakMap');
|
|
13452
13408
|
var _WeakMap = WeakMap;
|
|
@@ -30945,14 +30901,113 @@ const RequiredDocuments = ({
|
|
|
30945
30901
|
})));
|
|
30946
30902
|
};
|
|
30947
30903
|
|
|
30904
|
+
var serviceTypes = [
|
|
30905
|
+
{
|
|
30906
|
+
code: "WATER_AND_SEWERAGE",
|
|
30907
|
+
name: "Water and Sewerage"
|
|
30908
|
+
},
|
|
30909
|
+
{
|
|
30910
|
+
code: "WATER",
|
|
30911
|
+
name: "Water"
|
|
30912
|
+
},
|
|
30913
|
+
{
|
|
30914
|
+
code: "SEWERAGE",
|
|
30915
|
+
name: "Sewerage"
|
|
30916
|
+
},
|
|
30917
|
+
{
|
|
30918
|
+
code: "REGULARIZATION",
|
|
30919
|
+
name: "Regularization"
|
|
30920
|
+
}
|
|
30921
|
+
];
|
|
30922
|
+
var applicantTypes = [
|
|
30923
|
+
{
|
|
30924
|
+
code: "OWNER",
|
|
30925
|
+
name: "Owner"
|
|
30926
|
+
},
|
|
30927
|
+
{
|
|
30928
|
+
code: "TENANT",
|
|
30929
|
+
name: "Tenant"
|
|
30930
|
+
}
|
|
30931
|
+
];
|
|
30932
|
+
var connectionTypes = [
|
|
30933
|
+
{
|
|
30934
|
+
code: "PERMANENT",
|
|
30935
|
+
name: "Permanent"
|
|
30936
|
+
},
|
|
30937
|
+
{
|
|
30938
|
+
code: "TEMPORARY",
|
|
30939
|
+
name: "Temporary"
|
|
30940
|
+
}
|
|
30941
|
+
];
|
|
30942
|
+
var categoryTypes = [
|
|
30943
|
+
{
|
|
30944
|
+
code: "BULK",
|
|
30945
|
+
name: "Bulk"
|
|
30946
|
+
},
|
|
30947
|
+
{
|
|
30948
|
+
code: "NON_BULK",
|
|
30949
|
+
name: "Non-Bulk"
|
|
30950
|
+
}
|
|
30951
|
+
];
|
|
30952
|
+
var subCategories = [
|
|
30953
|
+
{
|
|
30954
|
+
code: "DOMESTIC",
|
|
30955
|
+
name: "Domestic"
|
|
30956
|
+
},
|
|
30957
|
+
{
|
|
30958
|
+
code: "COMMERCIAL",
|
|
30959
|
+
name: "Commercial"
|
|
30960
|
+
}
|
|
30961
|
+
];
|
|
30962
|
+
var propertyTypes = [
|
|
30963
|
+
{
|
|
30964
|
+
code: "SCHOOL",
|
|
30965
|
+
name: "school"
|
|
30966
|
+
},
|
|
30967
|
+
{
|
|
30968
|
+
code: "COLLEGE",
|
|
30969
|
+
name: "college"
|
|
30970
|
+
},
|
|
30971
|
+
{
|
|
30972
|
+
code: "INDUSTRY",
|
|
30973
|
+
name: "Industry"
|
|
30974
|
+
},
|
|
30975
|
+
{
|
|
30976
|
+
code: "MALL",
|
|
30977
|
+
name: "Mall"
|
|
30978
|
+
},
|
|
30979
|
+
{
|
|
30980
|
+
code: "HOTEL",
|
|
30981
|
+
name: "Hotel"
|
|
30982
|
+
},
|
|
30983
|
+
{
|
|
30984
|
+
code: "SHOP",
|
|
30985
|
+
name: "Shop"
|
|
30986
|
+
},
|
|
30987
|
+
{
|
|
30988
|
+
code: "OFFICE",
|
|
30989
|
+
name: "Office"
|
|
30990
|
+
},
|
|
30991
|
+
{
|
|
30992
|
+
code: "HOSPITAL",
|
|
30993
|
+
name: "Hospital"
|
|
30994
|
+
}
|
|
30995
|
+
];
|
|
30996
|
+
var dropdownData = {
|
|
30997
|
+
serviceTypes: serviceTypes,
|
|
30998
|
+
applicantTypes: applicantTypes,
|
|
30999
|
+
connectionTypes: connectionTypes,
|
|
31000
|
+
categoryTypes: categoryTypes,
|
|
31001
|
+
subCategories: subCategories,
|
|
31002
|
+
propertyTypes: propertyTypes
|
|
31003
|
+
};
|
|
31004
|
+
|
|
30948
31005
|
const FORM_STORAGE_KEY = "WS_EMPLOYEE_NEW_APPLICATION_FORM";
|
|
30949
31006
|
const MAX_FILE_SIZE = 5242880;
|
|
30950
31007
|
const SUPPORTED_FILE_TYPES = /(\.pdf|\.png|\.jpe?g)$/i;
|
|
30951
31008
|
const NAME_PATTERN = /^[a-zA-Z\s.'-]{1,50}$/;
|
|
30952
31009
|
const EMAIL_PATTERN = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/;
|
|
30953
31010
|
const MOBILE_PATTERN = /^[6-9][0-9]{9}$/;
|
|
30954
|
-
const OFFICE_PATTERN = /^[0-9]{6,12}$/;
|
|
30955
|
-
const PINCODE_PATTERN = /^[1-9][0-9]{5}$/;
|
|
30956
31011
|
const NUMBER_PATTERN = /^\d+$/;
|
|
30957
31012
|
const DECIMAL_PATTERN = /^\d+(\.\d{1,2})?$/;
|
|
30958
31013
|
const IFSC_PATTERN = /^[A-Z]{4}0[A-Z0-9]{6}$/;
|
|
@@ -30962,22 +31017,9 @@ const createOption = (code, name) => ({
|
|
|
30962
31017
|
code,
|
|
30963
31018
|
name
|
|
30964
31019
|
});
|
|
30965
|
-
const
|
|
30966
|
-
const CONNECTION_TYPE_OPTIONS = [createOption("METERED", "Metered"), createOption("NON_METERED", "Non Metered")];
|
|
30967
|
-
const LOCALITY_OPTIONS = [createOption("DWARKA", "Dwarka"), createOption("ROHINI", "Rohini"), createOption("KAROL_BAGH", "Karol Bagh")];
|
|
30968
|
-
const SUB_LOCALITY_OPTIONS = {
|
|
30969
|
-
DWARKA: [createOption("SECTOR_6", "Sector 6"), createOption("SECTOR_10", "Sector 10"), createOption("SECTOR_12", "Sector 12")],
|
|
30970
|
-
ROHINI: [createOption("SECTOR_3", "Sector 3"), createOption("SECTOR_8", "Sector 8"), createOption("SECTOR_16", "Sector 16")],
|
|
30971
|
-
KAROL_BAGH: [createOption("DEV_NAGAR", "Dev Nagar"), createOption("PAHAR_GANJ", "Pahar Ganj"), createOption("PATEL_NAGAR", "Patel Nagar")]
|
|
30972
|
-
};
|
|
30973
|
-
const ASSEMBLY_OPTIONS = [createOption("DWARKA_ASSEMBLY", "Dwarka Assembly"), createOption("ROHINI_ASSEMBLY", "Rohini Assembly"), createOption("KAROL_BAGH_ASSEMBLY", "Karol Bagh Assembly")];
|
|
30974
|
-
const WARD_OPTIONS = [createOption("WARD_101", "Ward 101"), createOption("WARD_102", "Ward 102"), createOption("WARD_103", "Ward 103")];
|
|
30975
|
-
const PROPERTY_TYPE_OPTIONS = [createOption("RESIDENTIAL", "Residential"), createOption("COMMERCIAL", "Commercial"), createOption("INDUSTRIAL", "Industrial"), createOption("INSTITUTIONAL", "Institutional"), createOption("HOSPITAL_NURSING_HOME", "Hospital / Nursing Home")];
|
|
30976
|
-
const WATER_CONNECTION_CATEGORY_OPTIONS = [createOption("DOMESTIC", "Domestic"), createOption("NON_DOMESTIC", "Non-Domestic"), createOption("MIXED_USE", "Mixed Use")];
|
|
30977
|
-
const WATER_CONNECTION_USED_BY_OPTIONS = [createOption("OWNER", "Owner"), createOption("TENANT", "Tenant"), createOption("AUTHORIZED_OCCUPIER", "Authorized Occupier")];
|
|
31020
|
+
const WATER_CONNECTION_USED_BY_OPTIONS = [createOption("5 Star Hotel", "5 Star Hotel"), createOption("4/5 Star Hotel", "4/5 Star Hotel"), createOption("Ex-Army Service", "Ex-Army Service"), createOption("General", "General"), createOption("Bank", "Bank"), createOption("Airport", "Airport"), createOption("Govt. College", "Govt. College")];
|
|
30978
31021
|
const PROOF_OF_IDENTITY_OPTIONS = [createOption("AADHAAR", "Aadhaar"), createOption("PAN", "PAN"), createOption("VOTER_ID", "Voter ID"), createOption("PASSPORT", "Passport"), createOption("DRIVING_LICENSE", "Driving License")];
|
|
30979
31022
|
const OWNERSHIP_STATUS_OPTIONS = [createOption("SELF_OWNED", "Self Owned"), createOption("LEASED", "Leased"), createOption("RENTED", "Rented"), createOption("GOVERNMENT_ALLOTTED", "Government Allotted")];
|
|
30980
|
-
const SUBMITTED_BY_OPTIONS = [createOption("APPLICANT", "Applicant"), createOption("AUTHORIZED_SIGNATORY", "Authorized Signatory"), createOption("DJB_COUNTER", "DJB Counter")];
|
|
30981
31023
|
const DEFAULT_SECTION_STATE = {
|
|
30982
31024
|
application: true,
|
|
30983
31025
|
applicant: true,
|
|
@@ -30997,7 +31039,7 @@ const DEFAULT_FORM_VALUES = {
|
|
|
30997
31039
|
firstName: "",
|
|
30998
31040
|
middleName: "",
|
|
30999
31041
|
lastName: "",
|
|
31000
|
-
|
|
31042
|
+
ParentorSpouse: "",
|
|
31001
31043
|
isGovernmentOrganization: false,
|
|
31002
31044
|
applicantIdProofFile: null,
|
|
31003
31045
|
governmentOrganizationName: ""
|
|
@@ -31005,7 +31047,20 @@ const DEFAULT_FORM_VALUES = {
|
|
|
31005
31047
|
contact: {
|
|
31006
31048
|
emailId: "",
|
|
31007
31049
|
mobileNumber: "",
|
|
31008
|
-
|
|
31050
|
+
whatsAppNumber: ""
|
|
31051
|
+
},
|
|
31052
|
+
applicationSelection: {
|
|
31053
|
+
serviceType: null,
|
|
31054
|
+
applicantType: null,
|
|
31055
|
+
connectionType: null,
|
|
31056
|
+
categoryType: null,
|
|
31057
|
+
subCategory: null,
|
|
31058
|
+
commercialType: null,
|
|
31059
|
+
govtOrganization: {
|
|
31060
|
+
organizationName: "",
|
|
31061
|
+
natureOfWork: "",
|
|
31062
|
+
organizationDocument: null
|
|
31063
|
+
}
|
|
31009
31064
|
},
|
|
31010
31065
|
djbEmployee: {
|
|
31011
31066
|
isDjbEmployee: false,
|
|
@@ -31019,6 +31074,12 @@ const DEFAULT_FORM_VALUES = {
|
|
|
31019
31074
|
pinCode: "",
|
|
31020
31075
|
locality: null,
|
|
31021
31076
|
subLocality: null,
|
|
31077
|
+
state: "",
|
|
31078
|
+
district: "",
|
|
31079
|
+
city: "",
|
|
31080
|
+
street: "",
|
|
31081
|
+
houseNo: "",
|
|
31082
|
+
block: "",
|
|
31022
31083
|
assembly: null,
|
|
31023
31084
|
ward: null
|
|
31024
31085
|
},
|
|
@@ -31029,7 +31090,10 @@ const DEFAULT_FORM_VALUES = {
|
|
|
31029
31090
|
plotArea: "",
|
|
31030
31091
|
builtUpArea: "",
|
|
31031
31092
|
waterConnectionCategory: null,
|
|
31032
|
-
|
|
31093
|
+
gender: null,
|
|
31094
|
+
NumberofDwellingUnits: "",
|
|
31095
|
+
SelectYearofConstruction: null,
|
|
31096
|
+
WaterConnectionUsageType: null
|
|
31033
31097
|
},
|
|
31034
31098
|
bankDetails: {
|
|
31035
31099
|
bankName: "",
|
|
@@ -31050,7 +31114,6 @@ const DEFAULT_FORM_VALUES = {
|
|
|
31050
31114
|
declaration: {
|
|
31051
31115
|
submittedBy: null,
|
|
31052
31116
|
signatureFile: null,
|
|
31053
|
-
captcha: "",
|
|
31054
31117
|
agree: false
|
|
31055
31118
|
},
|
|
31056
31119
|
cpt: {
|
|
@@ -31077,75 +31140,194 @@ const actionBarStyle = {
|
|
|
31077
31140
|
gap: "16px",
|
|
31078
31141
|
flexWrap: "wrap"
|
|
31079
31142
|
};
|
|
31080
|
-
const
|
|
31081
|
-
|
|
31082
|
-
|
|
31083
|
-
|
|
31084
|
-
|
|
31085
|
-
|
|
31086
|
-
|
|
31087
|
-
|
|
31088
|
-
|
|
31089
|
-
|
|
31090
|
-
const
|
|
31091
|
-
|
|
31092
|
-
|
|
31093
|
-
|
|
31094
|
-
|
|
31095
|
-
|
|
31096
|
-
|
|
31097
|
-
|
|
31098
|
-
|
|
31099
|
-
};
|
|
31100
|
-
|
|
31101
|
-
|
|
31102
|
-
|
|
31103
|
-
|
|
31104
|
-
|
|
31105
|
-
|
|
31106
|
-
|
|
31107
|
-
|
|
31143
|
+
const ProfileImagePreview = ({
|
|
31144
|
+
fileStoreId
|
|
31145
|
+
}) => {
|
|
31146
|
+
const [imageUrl, setImageUrl] = useState(null);
|
|
31147
|
+
useEffect(() => {
|
|
31148
|
+
const fetchImageUrl = async () => {
|
|
31149
|
+
if (fileStoreId) {
|
|
31150
|
+
try {
|
|
31151
|
+
var _response$data, _response$data$fileSt, _response$data$fileSt2;
|
|
31152
|
+
const tenantId = Digit.ULBService.getStateId();
|
|
31153
|
+
const response = await Digit.UploadServices.Filefetch([fileStoreId], tenantId);
|
|
31154
|
+
const url = response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$fileSt = _response$data.fileStoreIds) === null || _response$data$fileSt === void 0 ? void 0 : (_response$data$fileSt2 = _response$data$fileSt[0]) === null || _response$data$fileSt2 === void 0 ? void 0 : _response$data$fileSt2.url;
|
|
31155
|
+
if (url) {
|
|
31156
|
+
let differentFormats = (url === null || url === void 0 ? void 0 : url.split(",")) || [];
|
|
31157
|
+
let fileURL = "";
|
|
31158
|
+
differentFormats.map(link => {
|
|
31159
|
+
if (!link.includes("large") && !link.includes("medium") && !link.includes("small")) {
|
|
31160
|
+
fileURL = link;
|
|
31161
|
+
}
|
|
31162
|
+
});
|
|
31163
|
+
setImageUrl(fileURL || differentFormats[0]);
|
|
31164
|
+
}
|
|
31165
|
+
} catch (err) {
|
|
31166
|
+
console.error("Error fetching image URL:", err);
|
|
31167
|
+
setImageUrl(null);
|
|
31168
|
+
}
|
|
31169
|
+
}
|
|
31170
|
+
};
|
|
31171
|
+
fetchImageUrl();
|
|
31172
|
+
}, [fileStoreId]);
|
|
31173
|
+
if (!imageUrl) return null;
|
|
31174
|
+
return /*#__PURE__*/React.createElement("img", {
|
|
31175
|
+
src: imageUrl,
|
|
31176
|
+
alt: "Profile",
|
|
31177
|
+
style: {
|
|
31178
|
+
width: "100%",
|
|
31179
|
+
height: "100%",
|
|
31180
|
+
objectFit: "cover"
|
|
31181
|
+
}
|
|
31182
|
+
});
|
|
31183
|
+
};
|
|
31184
|
+
const ProfileImageUpload = ({
|
|
31185
|
+
value,
|
|
31186
|
+
onUpload,
|
|
31187
|
+
isUploading,
|
|
31188
|
+
error,
|
|
31189
|
+
t,
|
|
31190
|
+
label,
|
|
31191
|
+
required
|
|
31192
|
+
}) => {
|
|
31193
|
+
const fileInputRef = React.useRef(null);
|
|
31194
|
+
const fileStoreId = value === null || value === void 0 ? void 0 : value.fileStoreId;
|
|
31195
|
+
const [imageUrl, setImageUrl] = useState(null);
|
|
31196
|
+
useEffect(() => {
|
|
31197
|
+
const fetchImageUrl = async () => {
|
|
31198
|
+
if (fileStoreId) {
|
|
31199
|
+
try {
|
|
31200
|
+
var _response$data2, _response$data2$fileS, _response$data2$fileS2;
|
|
31201
|
+
const tenantId = Digit.ULBService.getStateId();
|
|
31202
|
+
const response = await Digit.UploadServices.Filefetch([fileStoreId], tenantId);
|
|
31203
|
+
const url = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$fileS = _response$data2.fileStoreIds) === null || _response$data2$fileS === void 0 ? void 0 : (_response$data2$fileS2 = _response$data2$fileS[0]) === null || _response$data2$fileS2 === void 0 ? void 0 : _response$data2$fileS2.url;
|
|
31204
|
+
if (url) {
|
|
31205
|
+
let differentFormats = (url === null || url === void 0 ? void 0 : url.split(",")) || [];
|
|
31206
|
+
let fileURL = "";
|
|
31207
|
+
differentFormats.map(link => {
|
|
31208
|
+
if (!link.includes("large") && !link.includes("medium") && !link.includes("small")) {
|
|
31209
|
+
fileURL = link;
|
|
31210
|
+
}
|
|
31211
|
+
});
|
|
31212
|
+
setImageUrl(fileURL || differentFormats[0]);
|
|
31213
|
+
}
|
|
31214
|
+
} catch (err) {
|
|
31215
|
+
console.error("Error fetching image URL:", err);
|
|
31216
|
+
setImageUrl(null);
|
|
31217
|
+
}
|
|
31218
|
+
} else {
|
|
31219
|
+
setImageUrl(null);
|
|
31220
|
+
}
|
|
31221
|
+
};
|
|
31222
|
+
fetchImageUrl();
|
|
31223
|
+
}, [fileStoreId]);
|
|
31224
|
+
const handleEditClick = () => {
|
|
31225
|
+
fileInputRef.current.click();
|
|
31226
|
+
};
|
|
31227
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
31228
|
+
className: "avatar-upload-container"
|
|
31229
|
+
}, label && /*#__PURE__*/React.createElement(CardLabel, {
|
|
31230
|
+
style: {
|
|
31231
|
+
textAlign: "center",
|
|
31232
|
+
marginBottom: "16px",
|
|
31233
|
+
fontWeight: "700"
|
|
31234
|
+
}
|
|
31235
|
+
}, `${t(label)}${required ? "*" : ""}`), /*#__PURE__*/React.createElement("div", {
|
|
31236
|
+
className: "avatar-wrapper"
|
|
31237
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
31238
|
+
className: "avatar-circle",
|
|
31239
|
+
onClick: handleEditClick
|
|
31240
|
+
}, imageUrl ? /*#__PURE__*/React.createElement("img", {
|
|
31241
|
+
src: imageUrl,
|
|
31242
|
+
alt: "Profile"
|
|
31243
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
31244
|
+
className: "avatar-placeholder"
|
|
31245
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
31246
|
+
width: "40",
|
|
31247
|
+
height: "40",
|
|
31248
|
+
viewBox: "0 0 24 24",
|
|
31249
|
+
fill: "none",
|
|
31250
|
+
stroke: "#9CA3AF",
|
|
31251
|
+
strokeWidth: "1.5"
|
|
31252
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
31253
|
+
d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"
|
|
31254
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
31255
|
+
cx: "12",
|
|
31256
|
+
cy: "7",
|
|
31257
|
+
r: "4"
|
|
31258
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
31259
|
+
className: "avatar-edit-icon",
|
|
31260
|
+
onClick: handleEditClick
|
|
31261
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
31262
|
+
width: "18",
|
|
31263
|
+
height: "18",
|
|
31264
|
+
viewBox: "0 0 24 24",
|
|
31265
|
+
fill: "none",
|
|
31266
|
+
stroke: "#0B4B66",
|
|
31267
|
+
strokeWidth: "2.5",
|
|
31268
|
+
strokeLinecap: "round",
|
|
31269
|
+
strokeLinejoin: "round"
|
|
31270
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
31271
|
+
d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"
|
|
31272
|
+
})))), /*#__PURE__*/React.createElement("input", {
|
|
31273
|
+
type: "file",
|
|
31274
|
+
ref: fileInputRef,
|
|
31275
|
+
style: {
|
|
31276
|
+
display: "none"
|
|
31277
|
+
},
|
|
31278
|
+
accept: "image/*",
|
|
31279
|
+
onChange: onUpload
|
|
31280
|
+
}), isUploading && /*#__PURE__*/React.createElement("div", {
|
|
31281
|
+
style: {
|
|
31282
|
+
fontSize: "14px",
|
|
31283
|
+
marginTop: "8px",
|
|
31284
|
+
color: "#505A5F"
|
|
31285
|
+
}
|
|
31286
|
+
}, "Uploading..."), error && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
31287
|
+
style: {
|
|
31288
|
+
textAlign: "center",
|
|
31289
|
+
marginTop: "8px"
|
|
31290
|
+
}
|
|
31291
|
+
}, error));
|
|
31108
31292
|
};
|
|
31109
|
-
const buildDefaultValues = (
|
|
31110
|
-
|
|
31111
|
-
|
|
31293
|
+
const buildDefaultValues = () => ({
|
|
31294
|
+
zro: {
|
|
31295
|
+
value: "",
|
|
31296
|
+
error: ""
|
|
31297
|
+
},
|
|
31298
|
+
typeOfRequest: DEFAULT_FORM_VALUES.typeOfRequest,
|
|
31299
|
+
connectionType: DEFAULT_FORM_VALUES.connectionType,
|
|
31112
31300
|
applicant: {
|
|
31113
|
-
...DEFAULT_FORM_VALUES.applicant
|
|
31114
|
-
...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.applicant) || {})
|
|
31301
|
+
...DEFAULT_FORM_VALUES.applicant
|
|
31115
31302
|
},
|
|
31116
31303
|
contact: {
|
|
31117
|
-
...DEFAULT_FORM_VALUES.contact
|
|
31118
|
-
...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.contact) || {})
|
|
31304
|
+
...DEFAULT_FORM_VALUES.contact
|
|
31119
31305
|
},
|
|
31120
31306
|
djbEmployee: {
|
|
31121
|
-
...DEFAULT_FORM_VALUES.djbEmployee
|
|
31122
|
-
...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.djbEmployee) || {})
|
|
31307
|
+
...DEFAULT_FORM_VALUES.djbEmployee
|
|
31123
31308
|
},
|
|
31124
31309
|
propertyAddress: {
|
|
31125
|
-
...DEFAULT_FORM_VALUES.propertyAddress
|
|
31126
|
-
...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.propertyAddress) || {})
|
|
31310
|
+
...DEFAULT_FORM_VALUES.propertyAddress
|
|
31127
31311
|
},
|
|
31128
31312
|
useDetails: {
|
|
31129
|
-
...DEFAULT_FORM_VALUES.useDetails
|
|
31130
|
-
...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.useDetails) || {})
|
|
31313
|
+
...DEFAULT_FORM_VALUES.useDetails
|
|
31131
31314
|
},
|
|
31132
31315
|
bankDetails: {
|
|
31133
|
-
...DEFAULT_FORM_VALUES.bankDetails
|
|
31134
|
-
...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.bankDetails) || {})
|
|
31316
|
+
...DEFAULT_FORM_VALUES.bankDetails
|
|
31135
31317
|
},
|
|
31136
31318
|
rainWaterHarvesting: {
|
|
31137
|
-
...DEFAULT_FORM_VALUES.rainWaterHarvesting
|
|
31138
|
-
|
|
31319
|
+
...DEFAULT_FORM_VALUES.rainWaterHarvesting
|
|
31320
|
+
},
|
|
31321
|
+
applicationSelection: {
|
|
31322
|
+
...DEFAULT_FORM_VALUES.applicationSelection
|
|
31139
31323
|
},
|
|
31140
31324
|
documents: {
|
|
31141
|
-
...DEFAULT_FORM_VALUES.documents
|
|
31142
|
-
...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.documents) || {})
|
|
31325
|
+
...DEFAULT_FORM_VALUES.documents
|
|
31143
31326
|
},
|
|
31144
31327
|
declaration: {
|
|
31145
|
-
...DEFAULT_FORM_VALUES.declaration
|
|
31146
|
-
...((savedFormData === null || savedFormData === void 0 ? void 0 : savedFormData.declaration) || {})
|
|
31328
|
+
...DEFAULT_FORM_VALUES.declaration
|
|
31147
31329
|
},
|
|
31148
|
-
cpt:
|
|
31330
|
+
cpt: {
|
|
31149
31331
|
id: "",
|
|
31150
31332
|
details: null
|
|
31151
31333
|
}
|
|
@@ -31164,14 +31346,6 @@ const getDisplayValue = value => {
|
|
|
31164
31346
|
}
|
|
31165
31347
|
return String(value);
|
|
31166
31348
|
};
|
|
31167
|
-
const generateCaptcha = () => {
|
|
31168
|
-
const characters = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789";
|
|
31169
|
-
let captcha = "";
|
|
31170
|
-
for (let index = 0; index < 6; index += 1) {
|
|
31171
|
-
captcha += characters.charAt(Math.floor(Math.random() * characters.length));
|
|
31172
|
-
}
|
|
31173
|
-
return captcha;
|
|
31174
|
-
};
|
|
31175
31349
|
const FieldBlock = ({
|
|
31176
31350
|
label,
|
|
31177
31351
|
required,
|
|
@@ -31205,14 +31379,47 @@ const SectionCard = ({
|
|
|
31205
31379
|
title,
|
|
31206
31380
|
description,
|
|
31207
31381
|
isOpen: _isOpen = true,
|
|
31208
|
-
children
|
|
31382
|
+
children,
|
|
31383
|
+
sectionRef,
|
|
31384
|
+
sectionKey,
|
|
31385
|
+
onEditClick
|
|
31209
31386
|
}) => {
|
|
31210
31387
|
return /*#__PURE__*/React.createElement("div", {
|
|
31211
31388
|
className: "ws-new-application-collapsible",
|
|
31212
31389
|
style: {
|
|
31213
|
-
marginBottom: "16px"
|
|
31214
|
-
|
|
31215
|
-
|
|
31390
|
+
marginBottom: "16px",
|
|
31391
|
+
position: "relative"
|
|
31392
|
+
},
|
|
31393
|
+
ref: sectionRef,
|
|
31394
|
+
"data-section": sectionKey
|
|
31395
|
+
}, onEditClick && /*#__PURE__*/React.createElement("div", {
|
|
31396
|
+
onClick: onEditClick,
|
|
31397
|
+
style: {
|
|
31398
|
+
position: "absolute",
|
|
31399
|
+
top: "20px",
|
|
31400
|
+
right: "50px",
|
|
31401
|
+
zIndex: 10,
|
|
31402
|
+
cursor: "pointer",
|
|
31403
|
+
display: "flex",
|
|
31404
|
+
alignItems: "center",
|
|
31405
|
+
gap: "4px",
|
|
31406
|
+
color: "#0B4B66",
|
|
31407
|
+
fontSize: "14px",
|
|
31408
|
+
fontWeight: "600"
|
|
31409
|
+
},
|
|
31410
|
+
title: "Edit Section"
|
|
31411
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
31412
|
+
width: "16",
|
|
31413
|
+
height: "16",
|
|
31414
|
+
viewBox: "0 0 24 24",
|
|
31415
|
+
fill: "none",
|
|
31416
|
+
stroke: "currentColor",
|
|
31417
|
+
strokeWidth: "2.5",
|
|
31418
|
+
strokeLinecap: "round",
|
|
31419
|
+
strokeLinejoin: "round"
|
|
31420
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
31421
|
+
d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"
|
|
31422
|
+
})), "Edit"), /*#__PURE__*/React.createElement(CollapsibleCardPage, {
|
|
31216
31423
|
defaultOpen: _isOpen,
|
|
31217
31424
|
defaultTab: COLLAPSIBLE_CONTENT_TAB,
|
|
31218
31425
|
tabs: [COLLAPSIBLE_CONTENT_TAB],
|
|
@@ -31225,11 +31432,32 @@ const SectionCard = ({
|
|
|
31225
31432
|
className: "formcomposer-section-grid"
|
|
31226
31433
|
}, children))));
|
|
31227
31434
|
};
|
|
31435
|
+
const handleView = async (fileStoreId, tenantId) => {
|
|
31436
|
+
try {
|
|
31437
|
+
var _response$data3, _response$data3$fileS, _response$data3$fileS2;
|
|
31438
|
+
const response = await Digit.UploadServices.Filefetch([fileStoreId], tenantId);
|
|
31439
|
+
const url = response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : (_response$data3$fileS = _response$data3.fileStoreIds) === null || _response$data3$fileS === void 0 ? void 0 : (_response$data3$fileS2 = _response$data3$fileS[0]) === null || _response$data3$fileS2 === void 0 ? void 0 : _response$data3$fileS2.url;
|
|
31440
|
+
if (url) {
|
|
31441
|
+
const differentFormats = (url === null || url === void 0 ? void 0 : url.split(",")) || [];
|
|
31442
|
+
let fileURL = "";
|
|
31443
|
+
differentFormats.map(link => {
|
|
31444
|
+
if (!link.includes("large") && !link.includes("medium") && !link.includes("small")) {
|
|
31445
|
+
fileURL = link;
|
|
31446
|
+
}
|
|
31447
|
+
});
|
|
31448
|
+
window.open(fileURL || differentFormats[0], "_blank");
|
|
31449
|
+
}
|
|
31450
|
+
} catch (error) {
|
|
31451
|
+
console.error("Error fetching file URL:", error);
|
|
31452
|
+
}
|
|
31453
|
+
};
|
|
31228
31454
|
const PreviewItem = ({
|
|
31229
31455
|
label,
|
|
31230
31456
|
value,
|
|
31231
31457
|
isFullWidth
|
|
31232
31458
|
}) => {
|
|
31459
|
+
const stateId = Digit.ULBService.getStateId();
|
|
31460
|
+
const isFile = value && typeof value === "object" && (value === null || value === void 0 ? void 0 : value.fileStoreId);
|
|
31233
31461
|
return /*#__PURE__*/React.createElement("div", {
|
|
31234
31462
|
style: {
|
|
31235
31463
|
...fieldWrapperStyle,
|
|
@@ -31242,12 +31470,42 @@ const PreviewItem = ({
|
|
|
31242
31470
|
fontWeight: "600",
|
|
31243
31471
|
marginBottom: "0px"
|
|
31244
31472
|
}
|
|
31245
|
-
}, label), /*#__PURE__*/React.createElement(
|
|
31473
|
+
}, label), /*#__PURE__*/React.createElement("div", {
|
|
31474
|
+
style: {
|
|
31475
|
+
display: "flex",
|
|
31476
|
+
alignItems: "center",
|
|
31477
|
+
gap: "8px"
|
|
31478
|
+
}
|
|
31479
|
+
}, /*#__PURE__*/React.createElement(CardText, {
|
|
31246
31480
|
style: {
|
|
31247
31481
|
marginBottom: "0px",
|
|
31248
31482
|
marginTop: "0px"
|
|
31249
31483
|
}
|
|
31250
|
-
}, getDisplayValue(value))
|
|
31484
|
+
}, getDisplayValue(value)), isFile && /*#__PURE__*/React.createElement("div", {
|
|
31485
|
+
onClick: () => handleView(value.fileStoreId, stateId),
|
|
31486
|
+
style: {
|
|
31487
|
+
cursor: "pointer",
|
|
31488
|
+
display: "flex",
|
|
31489
|
+
alignItems: "center",
|
|
31490
|
+
color: "#0B4B66"
|
|
31491
|
+
},
|
|
31492
|
+
title: "View Document"
|
|
31493
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
31494
|
+
width: "20",
|
|
31495
|
+
height: "20",
|
|
31496
|
+
viewBox: "0 0 24 24",
|
|
31497
|
+
fill: "none",
|
|
31498
|
+
stroke: "currentColor",
|
|
31499
|
+
strokeWidth: "2",
|
|
31500
|
+
strokeLinecap: "round",
|
|
31501
|
+
strokeLinejoin: "round"
|
|
31502
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
31503
|
+
d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
|
|
31504
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
31505
|
+
cx: "12",
|
|
31506
|
+
cy: "12",
|
|
31507
|
+
r: "3"
|
|
31508
|
+
})))));
|
|
31251
31509
|
};
|
|
31252
31510
|
const FileUploadField = ({
|
|
31253
31511
|
id,
|
|
@@ -31281,25 +31539,121 @@ const FileUploadField = ({
|
|
|
31281
31539
|
}, isUploading ? "Uploading file..." : (value === null || value === void 0 ? void 0 : value.fileName) || "No file selected"));
|
|
31282
31540
|
};
|
|
31283
31541
|
const NewApplication = () => {
|
|
31284
|
-
var _Digit$SessionStorage, _formValues$applicant, _formValues$applicant2, _formValues$applicant3, _formValues$applicant4, _formValues$applicant5, _formValues$applicant6, _formValues$applicant7, _formValues$applicant8, _formValues$contact, _formValues$contact2, _formValues$contact3, _formValues$djbEmploy, _formValues$djbEmploy2, _formValues$djbEmploy3, _formValues$djbEmploy4, _formValues$djbEmploy5, _formValues$propertyA, _formValues$propertyA2, _formValues$propertyA3, _formValues$propertyA4, _formValues$propertyA5, _formValues$propertyA6, _formValues$propertyA7, _formValues$
|
|
31542
|
+
var _Digit$SessionStorage, _getFieldError, _getFieldError2, _getFieldError3, _getFieldError4, _getFieldError5, _getFieldError6, _getFieldError7, _getFieldError8, _formValues$applicati, _formValues$applicati2, _formValues$applicati3, _formValues$applicati4, _formValues$applicati5, _formValues$applicati6, _formValues$applicati7, _formValues$applicati8, _formValues$applicati9, _formValues$applicati0, _formValues$applicati1, _formValues$applicati10, _formValues$applicati11, _formValues$applicati12, _formValues$applicant, _formValues$applicant2, _formValues$applicant3, _formValues$applicant4, _formValues$applicant5, _formValues$applicant6, _formValues$applicant7, _formValues$useDetail, _formValues$applicant8, _formValues$contact, _formValues$contact2, _formValues$contact3, _formValues$documents, _formValues$djbEmploy, _formValues$djbEmploy2, _formValues$djbEmploy3, _formValues$djbEmploy4, _formValues$djbEmploy5, _formValues$propertyA, _formValues$propertyA2, _formValues$propertyA3, _formValues$propertyA4, _formValues$propertyA5, _formValues$propertyA6, _formValues$propertyA7, _formValues$propertyA8, _formValues$propertyA9, _formValues$propertyA0, _formValues$propertyA1, _formValues$useDetail2, _formValues$useDetail3, _formValues$useDetail4, _formValues$useDetail5, _formValues$useDetail6, _formValues$useDetail7, _formValues$useDetail8, _formValues$useDetail9, _formValues$useDetail0, _formValues$useDetail1, _formValues$useDetail10, _formValues$useDetail11, _formValues$bankDetai, _formValues$bankDetai2, _formValues$bankDetai3, _formValues$bankDetai4, _formValues$documents2, _formValues$documents3, _formValues$documents4, _formValues$documents5, _formValues$documents6;
|
|
31285
31543
|
const {
|
|
31286
31544
|
t
|
|
31287
31545
|
} = useTranslation();
|
|
31288
31546
|
const history = useHistory();
|
|
31289
31547
|
const location = useLocation();
|
|
31548
|
+
const {
|
|
31549
|
+
data: allCities,
|
|
31550
|
+
isLoading
|
|
31551
|
+
} = Digit.Hooks.useTenants();
|
|
31290
31552
|
const stateId = Digit.ULBService.getStateId();
|
|
31291
31553
|
const tenantId = Digit.ULBService.getCurrentTenantId() || ((_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code);
|
|
31292
31554
|
const [previewMode, setPreviewMode] = useState(false);
|
|
31555
|
+
const [currentStep, setCurrentStep] = useState(1);
|
|
31293
31556
|
const [collapsedSections, setCollapsedSections] = useState(DEFAULT_SECTION_STATE);
|
|
31294
31557
|
const [showToast, setShowToast] = useState(null);
|
|
31295
|
-
const [generatedCaptcha, setGeneratedCaptcha] = useState(generateCaptcha());
|
|
31296
31558
|
const [uploadingFields, setUploadingFields] = useState({});
|
|
31297
31559
|
const [isEnableLoader, setIsEnableLoader] = useState(false);
|
|
31298
31560
|
const [appDetails, setAppDetails] = useState({});
|
|
31299
31561
|
const [waterAndSewerageBoth, setWaterAndSewerageBoth] = useState(null);
|
|
31300
31562
|
const [propertyId, setPropertyId] = useState(new URLSearchParams(location.search).get("propertyId"));
|
|
31301
|
-
|
|
31302
|
-
const
|
|
31563
|
+
const initialFormValues = buildDefaultValues();
|
|
31564
|
+
const [zro, setZro] = useState(initialFormValues.zro);
|
|
31565
|
+
const [localFormState, setLocalFormState] = useState(false);
|
|
31566
|
+
const [city, setCity] = useState("");
|
|
31567
|
+
useEffect(() => {
|
|
31568
|
+
if (allCities && tenantId && !city) {
|
|
31569
|
+
const currentCity = allCities === null || allCities === void 0 ? void 0 : allCities.find(c => c.code === tenantId);
|
|
31570
|
+
if (currentCity) {
|
|
31571
|
+
setCity(currentCity);
|
|
31572
|
+
setValue("propertyAddress.city", currentCity);
|
|
31573
|
+
}
|
|
31574
|
+
}
|
|
31575
|
+
}, [allCities, tenantId]);
|
|
31576
|
+
const {
|
|
31577
|
+
data: egovLocationData
|
|
31578
|
+
} = Digit.Hooks.useCommonMDMS(tenantId, "egov-location", ["TenantBoundary"]);
|
|
31579
|
+
const boundaryData = useMemo(() => {
|
|
31580
|
+
var _egovLocationData$ego;
|
|
31581
|
+
const tenantBoundary = (egovLocationData === null || egovLocationData === void 0 ? void 0 : (_egovLocationData$ego = egovLocationData["egov-location"]) === null || _egovLocationData$ego === void 0 ? void 0 : _egovLocationData$ego.TenantBoundary) || [];
|
|
31582
|
+
const revenueData = tenantBoundary.find(item => {
|
|
31583
|
+
var _item$hierarchyType;
|
|
31584
|
+
return (item === null || item === void 0 ? void 0 : (_item$hierarchyType = item.hierarchyType) === null || _item$hierarchyType === void 0 ? void 0 : _item$hierarchyType.code) === "REVENUE";
|
|
31585
|
+
});
|
|
31586
|
+
const boundary = (revenueData === null || revenueData === void 0 ? void 0 : revenueData.boundary) || [];
|
|
31587
|
+
return Array.isArray(boundary) ? boundary : [boundary];
|
|
31588
|
+
}, [egovLocationData]);
|
|
31589
|
+
const structuredLocalityData = useMemo(() => {
|
|
31590
|
+
let localities = [];
|
|
31591
|
+
const boundaries = Array.isArray(boundaryData) ? boundaryData : boundaryData ? [boundaryData] : [];
|
|
31592
|
+
const extractLocalities = (node, zone = null, ward = null) => {
|
|
31593
|
+
if (!node) return;
|
|
31594
|
+
let currentZone = zone;
|
|
31595
|
+
let currentWard = ward;
|
|
31596
|
+
if (node.label === "Zone" || node.label === "ZONE") {
|
|
31597
|
+
currentZone = node.localname || node.code || node.name;
|
|
31598
|
+
}
|
|
31599
|
+
if (node.label === "Ward" || node.label === "WARD" || node.label === "Block" || node.label === "BLOCK") {
|
|
31600
|
+
currentWard = node.code || node.localname || node.name;
|
|
31601
|
+
}
|
|
31602
|
+
if (node.label === "Locality" || node.label === "LOCALITY") {
|
|
31603
|
+
localities.push({
|
|
31604
|
+
...node,
|
|
31605
|
+
name: node.localname || node.name || node.code,
|
|
31606
|
+
i18nKey: node.i18nKey || `${tenantId.replace(".", "_")}_REVENUE_${node.code}`.toUpperCase(),
|
|
31607
|
+
zone: currentZone,
|
|
31608
|
+
ward: currentWard
|
|
31609
|
+
});
|
|
31610
|
+
}
|
|
31611
|
+
if (node.children && node.children.length > 0) {
|
|
31612
|
+
node.children.forEach(child => extractLocalities(child, currentZone, currentWard));
|
|
31613
|
+
}
|
|
31614
|
+
};
|
|
31615
|
+
boundaries.forEach(rootNode => extractLocalities(rootNode));
|
|
31616
|
+
return localities;
|
|
31617
|
+
}, [boundaryData, tenantId]);
|
|
31618
|
+
const fetchedPincodes = useMemo(() => {
|
|
31619
|
+
const pinSet = new Set();
|
|
31620
|
+
structuredLocalityData.forEach(loc => {
|
|
31621
|
+
if (loc.pincode) {
|
|
31622
|
+
const pins = Array.isArray(loc.pincode) ? loc.pincode : [loc.pincode];
|
|
31623
|
+
pins.forEach(p => {
|
|
31624
|
+
if (p) {
|
|
31625
|
+
const sanitizedPin = p.toString().split(".")[0];
|
|
31626
|
+
pinSet.add(sanitizedPin);
|
|
31627
|
+
}
|
|
31628
|
+
});
|
|
31629
|
+
}
|
|
31630
|
+
});
|
|
31631
|
+
return Array.from(pinSet).sort().map(pin => ({
|
|
31632
|
+
code: pin,
|
|
31633
|
+
name: pin,
|
|
31634
|
+
i18nKey: pin
|
|
31635
|
+
}));
|
|
31636
|
+
}, [structuredLocalityData]);
|
|
31637
|
+
const sectionRefs = {
|
|
31638
|
+
application: React.useRef(null),
|
|
31639
|
+
applicant: React.useRef(null),
|
|
31640
|
+
contact: React.useRef(null),
|
|
31641
|
+
djbEmployee: React.useRef(null),
|
|
31642
|
+
propertyAddress: React.useRef(null),
|
|
31643
|
+
useDetails: React.useRef(null),
|
|
31644
|
+
bankDetails: React.useRef(null),
|
|
31645
|
+
documents: React.useRef(null),
|
|
31646
|
+
declaration: React.useRef(null)
|
|
31647
|
+
};
|
|
31648
|
+
const currentYear = new Date().getFullYear();
|
|
31649
|
+
const yearOptions = [];
|
|
31650
|
+
for (let year = 1970; year <= currentYear; year++) {
|
|
31651
|
+
yearOptions.push({
|
|
31652
|
+
i18nKey: `${year}`,
|
|
31653
|
+
code: `${year}`,
|
|
31654
|
+
value: `${year}`
|
|
31655
|
+
});
|
|
31656
|
+
}
|
|
31303
31657
|
const {
|
|
31304
31658
|
register,
|
|
31305
31659
|
control,
|
|
@@ -31309,6 +31663,7 @@ const NewApplication = () => {
|
|
|
31309
31663
|
setError,
|
|
31310
31664
|
clearErrors,
|
|
31311
31665
|
reset,
|
|
31666
|
+
getValues,
|
|
31312
31667
|
formState: {
|
|
31313
31668
|
errors
|
|
31314
31669
|
}
|
|
@@ -31322,9 +31677,84 @@ const NewApplication = () => {
|
|
|
31322
31677
|
const selectedPropertyType = watch("useDetails.propertyType");
|
|
31323
31678
|
const selectedLocality = watch("propertyAddress.locality");
|
|
31324
31679
|
const selectedSubLocality = watch("propertyAddress.subLocality");
|
|
31325
|
-
const
|
|
31680
|
+
const pCode = watch("propertyAddress.pinCode");
|
|
31681
|
+
const filteredLocalities = useMemo(() => {
|
|
31682
|
+
if (!pCode) return structuredLocalityData;
|
|
31683
|
+
return structuredLocalityData.filter(loc => {
|
|
31684
|
+
if (!loc.pincode) return false;
|
|
31685
|
+
const pins = Array.isArray(loc.pincode) ? loc.pincode : [loc.pincode];
|
|
31686
|
+
return pins.some(p => p.toString() === pCode);
|
|
31687
|
+
});
|
|
31688
|
+
}, [structuredLocalityData, pCode]);
|
|
31689
|
+
const selectedSubCategory = watch("applicationSelection.subCategory");
|
|
31690
|
+
const selectedCommercialType = watch("applicationSelection.commercialType");
|
|
31691
|
+
const subCategoryIsCommercial = (selectedSubCategory === null || selectedSubCategory === void 0 ? void 0 : selectedSubCategory.code) === "COMMERCIAL";
|
|
31326
31692
|
const hasPendingUpload = Object.values(uploadingFields).some(Boolean);
|
|
31327
|
-
const isHospitalProperty = (selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code) === "HOSPITAL_NURSING_HOME";
|
|
31693
|
+
const isHospitalProperty = (selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code) === "HOSPITAL" || (selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code) === "HOSPITAL_NURSING_HOME";
|
|
31694
|
+
const timelineConfig = [{
|
|
31695
|
+
sectionId: "application",
|
|
31696
|
+
route: "application-selection",
|
|
31697
|
+
actions: "Application Selection"
|
|
31698
|
+
}, {
|
|
31699
|
+
sectionId: "applicant",
|
|
31700
|
+
route: "applicant-details",
|
|
31701
|
+
actions: "Details of Applicant"
|
|
31702
|
+
}, ...(isDjbEmployee ? [{
|
|
31703
|
+
sectionId: "djbEmployee",
|
|
31704
|
+
route: "djb-employee",
|
|
31705
|
+
actions: "For DJB Employee"
|
|
31706
|
+
}] : []), {
|
|
31707
|
+
sectionId: "propertyAddress",
|
|
31708
|
+
route: "property-address",
|
|
31709
|
+
actions: "Property Address"
|
|
31710
|
+
}, {
|
|
31711
|
+
sectionId: "useDetails",
|
|
31712
|
+
route: "use-details",
|
|
31713
|
+
actions: "Property & Connection Use Details"
|
|
31714
|
+
}, {
|
|
31715
|
+
sectionId: "bankDetails",
|
|
31716
|
+
route: "bank-details",
|
|
31717
|
+
actions: "Bank Details"
|
|
31718
|
+
}, {
|
|
31719
|
+
sectionId: "documents",
|
|
31720
|
+
route: "documents",
|
|
31721
|
+
actions: "Documents to be Attached"
|
|
31722
|
+
}, {
|
|
31723
|
+
sectionId: "Review",
|
|
31724
|
+
route: "review",
|
|
31725
|
+
actions: "Review Application"
|
|
31726
|
+
}].map((step, index) => ({
|
|
31727
|
+
...step,
|
|
31728
|
+
timeLine: [{
|
|
31729
|
+
actions: step.actions,
|
|
31730
|
+
currentStep: index + 1
|
|
31731
|
+
}]
|
|
31732
|
+
}));
|
|
31733
|
+
useEffect(() => {
|
|
31734
|
+
if (previewMode) return;
|
|
31735
|
+
const observerOptions = {
|
|
31736
|
+
root: null,
|
|
31737
|
+
rootMargin: "-20% 0px -50% 0px",
|
|
31738
|
+
threshold: [0, 0.1, 0.5, 1.0]
|
|
31739
|
+
};
|
|
31740
|
+
const handleIntersection = entries => {
|
|
31741
|
+
const mostVisible = entries.reduce((prev, current) => {
|
|
31742
|
+
return current.intersectionRatio > (prev ? prev.intersectionRatio : 0) ? current : prev;
|
|
31743
|
+
}, null);
|
|
31744
|
+
if (mostVisible && mostVisible.isIntersecting) {
|
|
31745
|
+
const sectionKey = mostVisible.target.getAttribute("data-section");
|
|
31746
|
+
const stepIndex = timelineConfig.findIndex(c => c.sectionId === sectionKey);
|
|
31747
|
+
if (stepIndex !== -1) {
|
|
31748
|
+
setCurrentStep(stepIndex + 1);
|
|
31749
|
+
}
|
|
31750
|
+
}
|
|
31751
|
+
};
|
|
31752
|
+
const observer = new IntersectionObserver(handleIntersection, observerOptions);
|
|
31753
|
+
Object.values(sectionRefs).forEach(ref => {
|
|
31754
|
+
if (ref.current) observer.observe(ref.current);
|
|
31755
|
+
});
|
|
31756
|
+
return () => observer.disconnect();
|
|
31757
|
+
}, [previewMode, sectionRefs, timelineConfig]);
|
|
31328
31758
|
const {
|
|
31329
31759
|
data: propertyDetails,
|
|
31330
31760
|
isLoading: isPropertyLoading
|
|
@@ -31352,10 +31782,6 @@ const NewApplication = () => {
|
|
|
31352
31782
|
const {
|
|
31353
31783
|
mutate: sewerageUpdateMutation
|
|
31354
31784
|
} = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE");
|
|
31355
|
-
useEffect(() => {
|
|
31356
|
-
if (typeof window === "undefined") return;
|
|
31357
|
-
window.sessionStorage.setItem(FORM_STORAGE_KEY, JSON.stringify(formValues));
|
|
31358
|
-
}, [formValues]);
|
|
31359
31785
|
useEffect(() => {
|
|
31360
31786
|
if (!isGovernmentOrganization) {
|
|
31361
31787
|
setValue("applicant.governmentOrganizationName", "");
|
|
@@ -31378,12 +31804,7 @@ const NewApplication = () => {
|
|
|
31378
31804
|
clearErrors("useDetails.hospitalBeds");
|
|
31379
31805
|
}
|
|
31380
31806
|
}, [isHospitalProperty, setValue, clearErrors]);
|
|
31381
|
-
useEffect(() => {
|
|
31382
|
-
const isValidSubLocality = selectedSubLocality ? subLocalityOptions.some(option => option.code === selectedSubLocality.code) : true;
|
|
31383
|
-
if (!isValidSubLocality) {
|
|
31384
|
-
setValue("propertyAddress.subLocality", null);
|
|
31385
|
-
}
|
|
31386
|
-
}, [selectedLocality === null || selectedLocality === void 0 ? void 0 : selectedLocality.code, selectedSubLocality === null || selectedSubLocality === void 0 ? void 0 : selectedSubLocality.code, setValue]);
|
|
31807
|
+
useEffect(() => {}, [selectedLocality === null || selectedLocality === void 0 ? void 0 : selectedLocality.code, setValue]);
|
|
31387
31808
|
const closeToast = () => setShowToast(null);
|
|
31388
31809
|
const closeToastOfError = () => setShowToast(null);
|
|
31389
31810
|
const toggleSection = sectionKey => {
|
|
@@ -31393,11 +31814,6 @@ const NewApplication = () => {
|
|
|
31393
31814
|
}));
|
|
31394
31815
|
};
|
|
31395
31816
|
const getFieldError = fieldName => resolveNestedValue(errors, fieldName);
|
|
31396
|
-
const refreshCaptcha = () => {
|
|
31397
|
-
setGeneratedCaptcha(generateCaptcha());
|
|
31398
|
-
setValue("declaration.captcha", "");
|
|
31399
|
-
clearErrors("declaration.captcha");
|
|
31400
|
-
};
|
|
31401
31817
|
const uploadFile = async (event, fieldName, onChange) => {
|
|
31402
31818
|
var _event$target, _event$target$files;
|
|
31403
31819
|
const file = event === null || event === void 0 ? void 0 : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : (_event$target$files = _event$target.files) === null || _event$target$files === void 0 ? void 0 : _event$target$files[0];
|
|
@@ -31411,7 +31827,7 @@ const NewApplication = () => {
|
|
|
31411
31827
|
}));
|
|
31412
31828
|
clearErrors(fieldName);
|
|
31413
31829
|
try {
|
|
31414
|
-
var _response$
|
|
31830
|
+
var _response$data4, _response$data4$files, _response$data4$files2;
|
|
31415
31831
|
if (file.size > MAX_FILE_SIZE) {
|
|
31416
31832
|
throw new Error("File size should be 5 MB or less.");
|
|
31417
31833
|
}
|
|
@@ -31419,7 +31835,7 @@ const NewApplication = () => {
|
|
|
31419
31835
|
throw new Error("Only PDF, PNG, JPG and JPEG files are supported.");
|
|
31420
31836
|
}
|
|
31421
31837
|
const response = await Digit.UploadServices.Filestorage("WS", file, stateId);
|
|
31422
|
-
const fileStoreId = response === null || response === void 0 ? void 0 : (_response$
|
|
31838
|
+
const fileStoreId = response === null || response === void 0 ? void 0 : (_response$data4 = response.data) === null || _response$data4 === void 0 ? void 0 : (_response$data4$files = _response$data4.files) === null || _response$data4$files === void 0 ? void 0 : (_response$data4$files2 = _response$data4$files[0]) === null || _response$data4$files2 === void 0 ? void 0 : _response$data4$files2.fileStoreId;
|
|
31423
31839
|
if (!fileStoreId) {
|
|
31424
31840
|
throw new Error("File upload failed. Please try again.");
|
|
31425
31841
|
}
|
|
@@ -31459,22 +31875,6 @@ const NewApplication = () => {
|
|
|
31459
31875
|
});
|
|
31460
31876
|
}
|
|
31461
31877
|
};
|
|
31462
|
-
const validateCaptcha = data => {
|
|
31463
|
-
var _data$declaration, _data$declaration$cap, _data$declaration$cap2;
|
|
31464
|
-
if ((data === null || data === void 0 ? void 0 : (_data$declaration = data.declaration) === null || _data$declaration === void 0 ? void 0 : (_data$declaration$cap = _data$declaration.captcha) === null || _data$declaration$cap === void 0 ? void 0 : (_data$declaration$cap2 = _data$declaration$cap.trim()) === null || _data$declaration$cap2 === void 0 ? void 0 : _data$declaration$cap2.toUpperCase()) !== generatedCaptcha) {
|
|
31465
|
-
setError("declaration.captcha", {
|
|
31466
|
-
type: "manual",
|
|
31467
|
-
message: "Captcha does not match."
|
|
31468
|
-
});
|
|
31469
|
-
setShowToast({
|
|
31470
|
-
warning: true,
|
|
31471
|
-
message: "Captcha does not match."
|
|
31472
|
-
});
|
|
31473
|
-
return false;
|
|
31474
|
-
}
|
|
31475
|
-
clearErrors("declaration.captcha");
|
|
31476
|
-
return true;
|
|
31477
|
-
};
|
|
31478
31878
|
const onPreview = data => {
|
|
31479
31879
|
if (hasPendingUpload) {
|
|
31480
31880
|
setShowToast({
|
|
@@ -31483,7 +31883,6 @@ const NewApplication = () => {
|
|
|
31483
31883
|
});
|
|
31484
31884
|
return;
|
|
31485
31885
|
}
|
|
31486
|
-
if (!validateCaptcha(data)) return;
|
|
31487
31886
|
setPreviewMode(true);
|
|
31488
31887
|
scrollToTop();
|
|
31489
31888
|
};
|
|
@@ -31496,7 +31895,6 @@ const NewApplication = () => {
|
|
|
31496
31895
|
});
|
|
31497
31896
|
return;
|
|
31498
31897
|
}
|
|
31499
|
-
if (!validateCaptcha(data)) return;
|
|
31500
31898
|
if (!(propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop = propertyDetails.Properties) !== null && _propertyDetails$Prop !== void 0 && _propertyDetails$Prop[0])) {
|
|
31501
31899
|
setShowToast({
|
|
31502
31900
|
key: "error",
|
|
@@ -31721,10 +32119,25 @@ const NewApplication = () => {
|
|
|
31721
32119
|
setPreviewMode(false);
|
|
31722
32120
|
scrollToTop();
|
|
31723
32121
|
};
|
|
32122
|
+
const handleSectionEdit = sectionKey => {
|
|
32123
|
+
setPreviewMode(false);
|
|
32124
|
+
setTimeout(() => {
|
|
32125
|
+
var _sectionRefs$sectionK;
|
|
32126
|
+
const element = (_sectionRefs$sectionK = sectionRefs[sectionKey]) === null || _sectionRefs$sectionK === void 0 ? void 0 : _sectionRefs$sectionK.current;
|
|
32127
|
+
if (element) {
|
|
32128
|
+
const headerOffset = 100;
|
|
32129
|
+
const elementPosition = element.getBoundingClientRect().top;
|
|
32130
|
+
const offsetPosition = elementPosition + window.pageYOffset - headerOffset;
|
|
32131
|
+
window.scrollTo({
|
|
32132
|
+
top: offsetPosition,
|
|
32133
|
+
behavior: "smooth"
|
|
32134
|
+
});
|
|
32135
|
+
}
|
|
32136
|
+
}, 100);
|
|
32137
|
+
};
|
|
31724
32138
|
const onReset = () => {
|
|
31725
32139
|
reset(DEFAULT_FORM_VALUES);
|
|
31726
32140
|
setPreviewMode(false);
|
|
31727
|
-
setGeneratedCaptcha(generateCaptcha());
|
|
31728
32141
|
setCollapsedSections(DEFAULT_SECTION_STATE);
|
|
31729
32142
|
setUploadingFields({});
|
|
31730
32143
|
setShowToast(null);
|
|
@@ -31736,9 +32149,24 @@ const NewApplication = () => {
|
|
|
31736
32149
|
if (isEnableLoader || isPropertyLoading) {
|
|
31737
32150
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
31738
32151
|
}
|
|
31739
|
-
|
|
31740
|
-
|
|
31741
|
-
|
|
32152
|
+
const menu = [{
|
|
32153
|
+
i18nKey: "ASHOK VIHAR",
|
|
32154
|
+
code: "ASHOK VIHAR",
|
|
32155
|
+
value: "ASHOK VIHAR"
|
|
32156
|
+
}, {
|
|
32157
|
+
i18nKey: "BURARI",
|
|
32158
|
+
code: "BURARI",
|
|
32159
|
+
value: "BURARI"
|
|
32160
|
+
}, {
|
|
32161
|
+
i18nKey: "DWARKA",
|
|
32162
|
+
code: "DWARKA",
|
|
32163
|
+
value: "DWARKA"
|
|
32164
|
+
}, {
|
|
32165
|
+
i18nKey: "OKHLA",
|
|
32166
|
+
code: "OKHLA",
|
|
32167
|
+
value: "OKHLA"
|
|
32168
|
+
}];
|
|
32169
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("style", null, `
|
|
31742
32170
|
.ws-new-application-collapsible .collapsible-card-tabs {
|
|
31743
32171
|
display: none;
|
|
31744
32172
|
}
|
|
@@ -31746,61 +32174,344 @@ const NewApplication = () => {
|
|
|
31746
32174
|
.ws-new-application-collapsible .collapsible-card-tab-content {
|
|
31747
32175
|
padding: 0;
|
|
31748
32176
|
}
|
|
31749
|
-
|
|
31750
|
-
|
|
31751
|
-
|
|
31752
|
-
|
|
31753
|
-
|
|
31754
|
-
|
|
32177
|
+
|
|
32178
|
+
.avatar-upload-container {
|
|
32179
|
+
display: flex;
|
|
32180
|
+
flex-direction: column;
|
|
32181
|
+
align-items: center;
|
|
32182
|
+
justify-content: center;
|
|
32183
|
+
grid-column: 1 / -1;
|
|
32184
|
+
}
|
|
32185
|
+
|
|
32186
|
+
.avatar-wrapper {
|
|
32187
|
+
position: relative;
|
|
32188
|
+
width: 120px;
|
|
32189
|
+
height: 120px;
|
|
32190
|
+
}
|
|
32191
|
+
|
|
32192
|
+
.avatar-circle {
|
|
32193
|
+
width: 100%;
|
|
32194
|
+
height: 100%;
|
|
32195
|
+
border-radius: 50%;
|
|
32196
|
+
border: 2px solid #E5E7EB;
|
|
32197
|
+
overflow: hidden;
|
|
32198
|
+
background-color: #F3F4F6;
|
|
32199
|
+
display: flex;
|
|
32200
|
+
justify-content: center;
|
|
32201
|
+
align-items: center;
|
|
32202
|
+
cursor: pointer;
|
|
32203
|
+
transition: all 0.2s ease;
|
|
32204
|
+
}
|
|
32205
|
+
|
|
32206
|
+
.avatar-circle:hover {
|
|
32207
|
+
border-color: #0B4B66;
|
|
32208
|
+
opacity: 0.9;
|
|
32209
|
+
}
|
|
32210
|
+
|
|
32211
|
+
.avatar-circle img {
|
|
32212
|
+
width: 100%;
|
|
32213
|
+
height: 100%;
|
|
32214
|
+
object-fit: cover;
|
|
32215
|
+
}
|
|
32216
|
+
|
|
32217
|
+
.avatar-placeholder {
|
|
32218
|
+
display: flex;
|
|
32219
|
+
justify-content: center;
|
|
32220
|
+
align-items: center;
|
|
32221
|
+
}
|
|
32222
|
+
|
|
32223
|
+
.avatar-edit-icon {
|
|
32224
|
+
position: absolute;
|
|
32225
|
+
bottom: 4px;
|
|
32226
|
+
right: 4px;
|
|
32227
|
+
background: white;
|
|
32228
|
+
width: 36px;
|
|
32229
|
+
height: 36px;
|
|
32230
|
+
border-radius: 50%;
|
|
32231
|
+
display: flex;
|
|
32232
|
+
justify-content: center;
|
|
32233
|
+
align-items: center;
|
|
32234
|
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
32235
|
+
border: 1px solid #E5E7EB;
|
|
32236
|
+
cursor: pointer;
|
|
32237
|
+
transition: all 0.2s ease;
|
|
32238
|
+
}
|
|
32239
|
+
|
|
32240
|
+
.avatar-edit-icon:hover {
|
|
32241
|
+
transform: scale(1.1);
|
|
32242
|
+
background-color: #F9FAFB;
|
|
32243
|
+
}
|
|
32244
|
+
`), /*#__PURE__*/React.createElement("div", {
|
|
32245
|
+
style: {
|
|
32246
|
+
display: "flex",
|
|
32247
|
+
alignItems: "flex-start",
|
|
32248
|
+
gap: "24px",
|
|
32249
|
+
marginBottom: "80px"
|
|
32250
|
+
}
|
|
32251
|
+
}, !previewMode && /*#__PURE__*/React.createElement(VerticalTimeline, {
|
|
32252
|
+
config: timelineConfig,
|
|
32253
|
+
currentActiveIndex: currentStep - 1,
|
|
32254
|
+
showFinalStep: false
|
|
32255
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
32256
|
+
style: {
|
|
32257
|
+
flex: "1",
|
|
32258
|
+
overflowY: "auto",
|
|
32259
|
+
minWidth: 0
|
|
32260
|
+
}
|
|
32261
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32262
|
+
style: {
|
|
31755
32263
|
display: previewMode ? "none" : "block"
|
|
31756
32264
|
}
|
|
31757
|
-
}, /*#__PURE__*/React.createElement(
|
|
31758
|
-
description: "Primary request selections",
|
|
32265
|
+
}, /*#__PURE__*/React.createElement(SectionCard, {
|
|
31759
32266
|
isOpen: collapsedSections.application,
|
|
31760
32267
|
onToggle: toggleSection,
|
|
31761
32268
|
sectionKey: "application",
|
|
31762
|
-
title: "Application Selection"
|
|
31763
|
-
|
|
31764
|
-
|
|
31765
|
-
|
|
31766
|
-
|
|
32269
|
+
title: "Application Selection",
|
|
32270
|
+
sectionRef: sectionRefs.application
|
|
32271
|
+
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32272
|
+
className: "card-label-smaller"
|
|
32273
|
+
}, "ZRO Location"), /*#__PURE__*/React.createElement("div", {
|
|
32274
|
+
className: "field"
|
|
31767
32275
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
31768
32276
|
control: control,
|
|
31769
|
-
name: "
|
|
32277
|
+
name: "zro",
|
|
32278
|
+
defaultValue: zro,
|
|
31770
32279
|
rules: {
|
|
31771
|
-
required: "
|
|
32280
|
+
required: t("REQUIRED_FIELD")
|
|
31772
32281
|
},
|
|
31773
|
-
|
|
31774
|
-
|
|
31775
|
-
|
|
31776
|
-
|
|
31777
|
-
|
|
31778
|
-
|
|
32282
|
+
isMandatory: true,
|
|
32283
|
+
render: props => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
32284
|
+
className: "form-field",
|
|
32285
|
+
selected: props.value,
|
|
32286
|
+
disable: false,
|
|
32287
|
+
option: menu,
|
|
32288
|
+
errorStyle: !!getFieldError("zro"),
|
|
32289
|
+
select: e => {
|
|
32290
|
+
props.onChange(e);
|
|
32291
|
+
setZro(prev => ({
|
|
32292
|
+
...prev,
|
|
32293
|
+
value: e
|
|
32294
|
+
}));
|
|
32295
|
+
},
|
|
32296
|
+
optionKey: "i18nKey",
|
|
32297
|
+
onBlur: props.onBlur,
|
|
32298
|
+
t: t
|
|
32299
|
+
}))
|
|
32300
|
+
}))), localFormState && zro.error && /*#__PURE__*/React.createElement(CardLabelError, null, zro.error), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32301
|
+
className: "card-label-smaller"
|
|
32302
|
+
}, "Service Type"), /*#__PURE__*/React.createElement("div", {
|
|
32303
|
+
className: "field"
|
|
32304
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32305
|
+
control: control,
|
|
32306
|
+
name: "applicationSelection.serviceType",
|
|
32307
|
+
rules: {
|
|
32308
|
+
required: t("REQUIRED_FIELD")
|
|
32309
|
+
},
|
|
32310
|
+
isMandatory: true,
|
|
32311
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32312
|
+
className: "form-field",
|
|
32313
|
+
selected: props.value,
|
|
32314
|
+
disable: false,
|
|
32315
|
+
option: dropdownData.serviceTypes,
|
|
32316
|
+
errorStyle: !!getFieldError("applicationSelection.serviceType"),
|
|
32317
|
+
select: props.onChange,
|
|
32318
|
+
optionKey: "name",
|
|
32319
|
+
onBlur: props.onBlur,
|
|
32320
|
+
t: t
|
|
31779
32321
|
})
|
|
31780
|
-
})), /*#__PURE__*/React.createElement(
|
|
31781
|
-
|
|
31782
|
-
|
|
31783
|
-
|
|
32322
|
+
}))), getFieldError("applicationSelection.serviceType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError = getFieldError("applicationSelection.serviceType")) === null || _getFieldError === void 0 ? void 0 : _getFieldError.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32323
|
+
className: "card-label-smaller"
|
|
32324
|
+
}, "Applicant Type"), /*#__PURE__*/React.createElement("div", {
|
|
32325
|
+
className: "field"
|
|
31784
32326
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
31785
32327
|
control: control,
|
|
31786
|
-
name: "
|
|
32328
|
+
name: "applicationSelection.applicantType",
|
|
32329
|
+
rules: {
|
|
32330
|
+
required: t("REQUIRED_FIELD")
|
|
32331
|
+
},
|
|
32332
|
+
isMandatory: true,
|
|
32333
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32334
|
+
className: "form-field",
|
|
32335
|
+
selected: props.value,
|
|
32336
|
+
disable: false,
|
|
32337
|
+
option: dropdownData.applicantTypes,
|
|
32338
|
+
errorStyle: !!getFieldError("applicationSelection.applicantType"),
|
|
32339
|
+
select: props.onChange,
|
|
32340
|
+
optionKey: "name",
|
|
32341
|
+
onBlur: props.onBlur,
|
|
32342
|
+
t: t
|
|
32343
|
+
})
|
|
32344
|
+
}))), getFieldError("applicationSelection.applicantType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError2 = getFieldError("applicationSelection.applicantType")) === null || _getFieldError2 === void 0 ? void 0 : _getFieldError2.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32345
|
+
className: "card-label-smaller"
|
|
32346
|
+
}, "Connection Type"), /*#__PURE__*/React.createElement("div", {
|
|
32347
|
+
className: "field"
|
|
32348
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32349
|
+
control: control,
|
|
32350
|
+
name: "applicationSelection.connectionType",
|
|
32351
|
+
rules: {
|
|
32352
|
+
required: t("REQUIRED_FIELD")
|
|
32353
|
+
},
|
|
32354
|
+
isMandatory: true,
|
|
32355
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32356
|
+
className: "form-field",
|
|
32357
|
+
selected: props.value,
|
|
32358
|
+
disable: false,
|
|
32359
|
+
option: dropdownData.connectionTypes,
|
|
32360
|
+
errorStyle: !!getFieldError("applicationSelection.connectionType"),
|
|
32361
|
+
select: props.onChange,
|
|
32362
|
+
optionKey: "name",
|
|
32363
|
+
onBlur: props.onBlur,
|
|
32364
|
+
t: t
|
|
32365
|
+
})
|
|
32366
|
+
}))), getFieldError("applicationSelection.connectionType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError3 = getFieldError("applicationSelection.connectionType")) === null || _getFieldError3 === void 0 ? void 0 : _getFieldError3.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32367
|
+
className: "card-label-smaller"
|
|
32368
|
+
}, "Category Type"), /*#__PURE__*/React.createElement("div", {
|
|
32369
|
+
className: "field"
|
|
32370
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32371
|
+
control: control,
|
|
32372
|
+
name: "applicationSelection.categoryType",
|
|
31787
32373
|
rules: {
|
|
31788
|
-
required: "
|
|
32374
|
+
required: t("REQUIRED_FIELD")
|
|
32375
|
+
},
|
|
32376
|
+
isMandatory: true,
|
|
32377
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32378
|
+
className: "form-field",
|
|
32379
|
+
selected: props.value,
|
|
32380
|
+
disable: false,
|
|
32381
|
+
option: dropdownData.categoryTypes,
|
|
32382
|
+
errorStyle: !!getFieldError("applicationSelection.categoryType"),
|
|
32383
|
+
select: props.onChange,
|
|
32384
|
+
optionKey: "name",
|
|
32385
|
+
onBlur: props.onBlur,
|
|
32386
|
+
t: t
|
|
32387
|
+
})
|
|
32388
|
+
}))), getFieldError("applicationSelection.categoryType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError4 = getFieldError("applicationSelection.categoryType")) === null || _getFieldError4 === void 0 ? void 0 : _getFieldError4.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32389
|
+
className: "card-label-smaller"
|
|
32390
|
+
}, "Sub Category"), /*#__PURE__*/React.createElement("div", {
|
|
32391
|
+
className: "field"
|
|
32392
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32393
|
+
control: control,
|
|
32394
|
+
name: "applicationSelection.subCategory",
|
|
32395
|
+
rules: {
|
|
32396
|
+
required: t("REQUIRED_FIELD")
|
|
31789
32397
|
},
|
|
32398
|
+
isMandatory: true,
|
|
32399
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32400
|
+
className: "form-field",
|
|
32401
|
+
selected: props.value,
|
|
32402
|
+
disable: false,
|
|
32403
|
+
option: dropdownData.subCategories,
|
|
32404
|
+
errorStyle: !!getFieldError("applicationSelection.subCategory"),
|
|
32405
|
+
select: props.onChange,
|
|
32406
|
+
optionKey: "name",
|
|
32407
|
+
onBlur: props.onBlur,
|
|
32408
|
+
t: t
|
|
32409
|
+
})
|
|
32410
|
+
}))), getFieldError("applicationSelection.subCategory") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError5 = getFieldError("applicationSelection.subCategory")) === null || _getFieldError5 === void 0 ? void 0 : _getFieldError5.message), subCategoryIsCommercial && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32411
|
+
className: "card-label-smaller"
|
|
32412
|
+
}, "Commercial Type"), /*#__PURE__*/React.createElement("div", {
|
|
32413
|
+
className: "field"
|
|
32414
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32415
|
+
control: control,
|
|
32416
|
+
name: "applicationSelection.commercialType",
|
|
32417
|
+
rules: {
|
|
32418
|
+
required: t("REQUIRED_FIELD")
|
|
32419
|
+
},
|
|
32420
|
+
isMandatory: true,
|
|
31790
32421
|
render: props => /*#__PURE__*/React.createElement(RadioButtons, {
|
|
31791
|
-
name: "connectionType",
|
|
31792
|
-
options: CONNECTION_TYPE_OPTIONS,
|
|
31793
|
-
optionsKey: "name",
|
|
31794
32422
|
onSelect: props.onChange,
|
|
31795
|
-
selectedOption: props.value
|
|
32423
|
+
selectedOption: props.value,
|
|
32424
|
+
options: [{
|
|
32425
|
+
code: "GOV",
|
|
32426
|
+
name: "Gov"
|
|
32427
|
+
}, {
|
|
32428
|
+
code: "NON_GOV",
|
|
32429
|
+
name: "Non-Gov"
|
|
32430
|
+
}],
|
|
32431
|
+
optionsKey: "name",
|
|
32432
|
+
t: t
|
|
31796
32433
|
})
|
|
31797
|
-
}))), /*#__PURE__*/React.createElement(
|
|
32434
|
+
}))), subCategoryIsCommercial && !!selectedCommercialType && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
32435
|
+
style: {
|
|
32436
|
+
gridColumn: "span 2",
|
|
32437
|
+
marginTop: "24px",
|
|
32438
|
+
marginBottom: "16px"
|
|
32439
|
+
}
|
|
32440
|
+
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32441
|
+
style: {
|
|
32442
|
+
color: "#3B82F6",
|
|
32443
|
+
fontWeight: "700",
|
|
32444
|
+
fontSize: "18px",
|
|
32445
|
+
marginBottom: "0"
|
|
32446
|
+
}
|
|
32447
|
+
}, "Organization Details")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32448
|
+
className: "card-label-smaller"
|
|
32449
|
+
}, "Organization Name"), /*#__PURE__*/React.createElement("div", {
|
|
32450
|
+
className: "field"
|
|
32451
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32452
|
+
name: "applicationSelection.govtOrganization.organizationName",
|
|
32453
|
+
inputRef: register({
|
|
32454
|
+
required: !!selectedCommercialType ? "Organization Name is required" : false
|
|
32455
|
+
}),
|
|
32456
|
+
errorStyle: !!getFieldError("applicationSelection.govtOrganization.organizationName")
|
|
32457
|
+
}))), getFieldError("applicationSelection.govtOrganization.organizationName") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError6 = getFieldError("applicationSelection.govtOrganization.organizationName")) === null || _getFieldError6 === void 0 ? void 0 : _getFieldError6.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32458
|
+
className: "card-label-smaller"
|
|
32459
|
+
}, "Nature of Work"), /*#__PURE__*/React.createElement("div", {
|
|
32460
|
+
className: "field"
|
|
32461
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32462
|
+
name: "applicationSelection.govtOrganization.natureOfWork",
|
|
32463
|
+
inputRef: register({
|
|
32464
|
+
required: !!selectedCommercialType ? "Nature of Work is required" : false
|
|
32465
|
+
}),
|
|
32466
|
+
errorStyle: !!getFieldError("applicationSelection.govtOrganization.natureOfWork")
|
|
32467
|
+
}))), getFieldError("applicationSelection.govtOrganization.natureOfWork") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError7 = getFieldError("applicationSelection.govtOrganization.natureOfWork")) === null || _getFieldError7 === void 0 ? void 0 : _getFieldError7.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32468
|
+
className: "card-label-smaller"
|
|
32469
|
+
}, "Upload Document"), /*#__PURE__*/React.createElement("div", {
|
|
32470
|
+
className: "field"
|
|
32471
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32472
|
+
control: control,
|
|
32473
|
+
name: "applicationSelection.govtOrganization.organizationDocument",
|
|
32474
|
+
rules: {
|
|
32475
|
+
required: !!selectedCommercialType ? "Document is required" : false
|
|
32476
|
+
},
|
|
32477
|
+
render: props => /*#__PURE__*/React.createElement(FileUploadField, {
|
|
32478
|
+
error: getFieldError("applicationSelection.govtOrganization.organizationDocument"),
|
|
32479
|
+
id: "govt-org-doc",
|
|
32480
|
+
isUploading: !!uploadingFields["applicationSelection.govtOrganization.organizationDocument"],
|
|
32481
|
+
onDelete: () => clearUploadedFile("applicationSelection.govtOrganization.organizationDocument", props.onChange),
|
|
32482
|
+
onUpload: event => uploadFile(event, "applicationSelection.govtOrganization.organizationDocument", props.onChange),
|
|
32483
|
+
value: props.value
|
|
32484
|
+
})
|
|
32485
|
+
})))), subCategoryIsCommercial && getFieldError("applicationSelection.commercialType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError8 = getFieldError("applicationSelection.commercialType")) === null || _getFieldError8 === void 0 ? void 0 : _getFieldError8.message))), /*#__PURE__*/React.createElement("div", {
|
|
32486
|
+
style: {
|
|
32487
|
+
display: previewMode ? "none" : "block"
|
|
32488
|
+
}
|
|
32489
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionCard, {
|
|
31798
32490
|
description: "Applicant name, organization details, and supporting ID proof.",
|
|
31799
32491
|
isOpen: collapsedSections.applicant,
|
|
31800
32492
|
onToggle: toggleSection,
|
|
31801
32493
|
sectionKey: "applicant",
|
|
31802
|
-
title: "Details of Applicant"
|
|
31803
|
-
|
|
32494
|
+
title: "Details of Applicant",
|
|
32495
|
+
sectionRef: sectionRefs.applicant
|
|
32496
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32497
|
+
control: control,
|
|
32498
|
+
name: "applicant.UploadPicture",
|
|
32499
|
+
rules: {
|
|
32500
|
+
validate: value => !!value || "Applicant Picture is required."
|
|
32501
|
+
},
|
|
32502
|
+
render: props => {
|
|
32503
|
+
var _getFieldError9;
|
|
32504
|
+
return /*#__PURE__*/React.createElement(ProfileImageUpload, {
|
|
32505
|
+
error: (_getFieldError9 = getFieldError("applicant.UploadPicture")) === null || _getFieldError9 === void 0 ? void 0 : _getFieldError9.message,
|
|
32506
|
+
isUploading: !!uploadingFields["applicant.UploadPicture"],
|
|
32507
|
+
label: "Upload Picture",
|
|
32508
|
+
onUpload: event => uploadFile(event, "applicant.UploadPicture", props.onChange),
|
|
32509
|
+
required: true,
|
|
32510
|
+
t: t,
|
|
32511
|
+
value: props.value
|
|
32512
|
+
});
|
|
32513
|
+
}
|
|
32514
|
+
}), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
31804
32515
|
error: getFieldError("applicant.firstName"),
|
|
31805
32516
|
label: "First Name",
|
|
31806
32517
|
required: true
|
|
@@ -31841,64 +32552,43 @@ const NewApplication = () => {
|
|
|
31841
32552
|
}),
|
|
31842
32553
|
name: "applicant.lastName"
|
|
31843
32554
|
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
31844
|
-
error: getFieldError("
|
|
31845
|
-
label: "
|
|
32555
|
+
error: getFieldError("useDetails.gender"),
|
|
32556
|
+
label: "Gender",
|
|
32557
|
+
required: true
|
|
32558
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32559
|
+
control: control,
|
|
32560
|
+
name: "useDetails.gender",
|
|
32561
|
+
rules: {
|
|
32562
|
+
required: "Gender is required."
|
|
32563
|
+
},
|
|
32564
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32565
|
+
option: [{
|
|
32566
|
+
name: "Male",
|
|
32567
|
+
code: "MALE"
|
|
32568
|
+
}, {
|
|
32569
|
+
name: "Female",
|
|
32570
|
+
code: "FEMALE"
|
|
32571
|
+
}],
|
|
32572
|
+
optionKey: "name",
|
|
32573
|
+
selected: props.value,
|
|
32574
|
+
select: props.onChange,
|
|
32575
|
+
t: t
|
|
32576
|
+
})
|
|
32577
|
+
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32578
|
+
error: getFieldError("applicant.ParentorSpouse"),
|
|
32579
|
+
label: "Parent/ spouse",
|
|
31846
32580
|
required: true
|
|
31847
32581
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
31848
|
-
errorStyle: !!getFieldError("applicant.
|
|
32582
|
+
errorStyle: !!getFieldError("applicant.ParentorSpouse"),
|
|
31849
32583
|
inputRef: register({
|
|
31850
32584
|
pattern: {
|
|
31851
32585
|
value: NAME_PATTERN,
|
|
31852
32586
|
message: "Use letters only."
|
|
31853
32587
|
},
|
|
31854
|
-
required: "
|
|
32588
|
+
required: "Parent/ spouse Name is required."
|
|
31855
32589
|
}),
|
|
31856
|
-
name: "applicant.
|
|
32590
|
+
name: "applicant.ParentorSpouse"
|
|
31857
32591
|
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
31858
|
-
label: "Government Organization"
|
|
31859
|
-
}, /*#__PURE__*/React.createElement(Controller, {
|
|
31860
|
-
control: control,
|
|
31861
|
-
name: "applicant.isGovernmentOrganization",
|
|
31862
|
-
render: props => /*#__PURE__*/React.createElement(CheckBox, {
|
|
31863
|
-
checked: !!props.value,
|
|
31864
|
-
label: "Applicant belongs to a Government Organization",
|
|
31865
|
-
onChange: event => props.onChange(event.target.checked)
|
|
31866
|
-
})
|
|
31867
|
-
})), isGovernmentOrganization ? /*#__PURE__*/React.createElement(FieldBlock, {
|
|
31868
|
-
error: getFieldError("applicant.governmentOrganizationName"),
|
|
31869
|
-
isFullWidth: true,
|
|
31870
|
-
label: "Name of Government Organization",
|
|
31871
|
-
required: true
|
|
31872
|
-
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
31873
|
-
errorStyle: !!getFieldError("applicant.governmentOrganizationName"),
|
|
31874
|
-
inputRef: register({
|
|
31875
|
-
required: isGovernmentOrganization ? "Government Organization Name is required." : false
|
|
31876
|
-
}),
|
|
31877
|
-
name: "applicant.governmentOrganizationName"
|
|
31878
|
-
})) : null, /*#__PURE__*/React.createElement(Controller, {
|
|
31879
|
-
control: control,
|
|
31880
|
-
name: "applicant.applicantIdProofFile",
|
|
31881
|
-
rules: {
|
|
31882
|
-
validate: value => !!value || "Applicant ID Proof is required."
|
|
31883
|
-
},
|
|
31884
|
-
render: props => /*#__PURE__*/React.createElement(FileUploadField, {
|
|
31885
|
-
error: getFieldError("applicant.applicantIdProofFile"),
|
|
31886
|
-
helperText: "Max size 5 MB. Allowed types: PDF, PNG, JPG, JPEG.",
|
|
31887
|
-
id: "applicant-id-proof",
|
|
31888
|
-
isUploading: !!uploadingFields["applicant.applicantIdProofFile"],
|
|
31889
|
-
label: "Upload ID Proof",
|
|
31890
|
-
onDelete: () => clearUploadedFile("applicant.applicantIdProofFile", props.onChange),
|
|
31891
|
-
onUpload: event => uploadFile(event, "applicant.applicantIdProofFile", props.onChange),
|
|
31892
|
-
required: true,
|
|
31893
|
-
value: props.value
|
|
31894
|
-
})
|
|
31895
|
-
})), /*#__PURE__*/React.createElement(SectionCard, {
|
|
31896
|
-
description: "Basic communication details for the application.",
|
|
31897
|
-
isOpen: collapsedSections.contact,
|
|
31898
|
-
onToggle: toggleSection,
|
|
31899
|
-
sectionKey: "contact",
|
|
31900
|
-
title: "Contact Details"
|
|
31901
|
-
}, /*#__PURE__*/React.createElement(FieldBlock, {
|
|
31902
32592
|
error: getFieldError("contact.emailId"),
|
|
31903
32593
|
label: "Email ID",
|
|
31904
32594
|
required: true
|
|
@@ -31928,23 +32618,25 @@ const NewApplication = () => {
|
|
|
31928
32618
|
maxlength: 10,
|
|
31929
32619
|
name: "contact.mobileNumber"
|
|
31930
32620
|
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
31931
|
-
error: getFieldError("contact.
|
|
31932
|
-
label: "
|
|
32621
|
+
error: getFieldError("contact.whatsAppNumber"),
|
|
32622
|
+
label: "WhatsApp Number"
|
|
31933
32623
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
31934
|
-
errorStyle: !!getFieldError("contact.
|
|
32624
|
+
errorStyle: !!getFieldError("contact.whatsAppNumber"),
|
|
31935
32625
|
inputRef: register({
|
|
31936
32626
|
pattern: {
|
|
31937
|
-
value:
|
|
31938
|
-
message: "Enter a valid
|
|
32627
|
+
value: MOBILE_PATTERN,
|
|
32628
|
+
message: "Enter a valid 10-digit WhatsApp number."
|
|
31939
32629
|
}
|
|
31940
32630
|
}),
|
|
31941
|
-
|
|
32631
|
+
maxlength: 10,
|
|
32632
|
+
name: "contact.whatsAppNumber"
|
|
31942
32633
|
}))), /*#__PURE__*/React.createElement(SectionCard, {
|
|
31943
32634
|
description: "Enable this section only when the applicant is a DJB employee.",
|
|
31944
32635
|
isOpen: collapsedSections.employee,
|
|
31945
32636
|
onToggle: toggleSection,
|
|
31946
|
-
sectionKey: "
|
|
31947
|
-
title: "For DJB Employee"
|
|
32637
|
+
sectionKey: "djbEmployee",
|
|
32638
|
+
title: "For DJB Employee",
|
|
32639
|
+
sectionRef: sectionRefs.djbEmployee
|
|
31948
32640
|
}, /*#__PURE__*/React.createElement(FieldBlock, {
|
|
31949
32641
|
label: "DJB Employee"
|
|
31950
32642
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -31955,7 +32647,7 @@ const NewApplication = () => {
|
|
|
31955
32647
|
label: "Applicant is a DJB Employee",
|
|
31956
32648
|
onChange: event => props.onChange(event.target.checked)
|
|
31957
32649
|
})
|
|
31958
|
-
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32650
|
+
})), isDjbEmployee && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FieldBlock, {
|
|
31959
32651
|
error: getFieldError("djbEmployee.employeeId"),
|
|
31960
32652
|
label: "Employee ID",
|
|
31961
32653
|
required: isDjbEmployee
|
|
@@ -31990,126 +32682,168 @@ const NewApplication = () => {
|
|
|
31990
32682
|
required: isDjbEmployee ? "Office Name & Address is required." : false
|
|
31991
32683
|
}),
|
|
31992
32684
|
name: "djbEmployee.officeNameAndAddress",
|
|
31993
|
-
style: {
|
|
31994
|
-
minHeight: "96px"
|
|
31995
|
-
}
|
|
31996
|
-
}))), /*#__PURE__*/React.createElement(SectionCard, {
|
|
31997
|
-
description: "Property location and administrative boundary details.",
|
|
31998
|
-
isOpen: collapsedSections.address,
|
|
31999
|
-
onToggle: toggleSection,
|
|
32000
|
-
sectionKey: "
|
|
32001
|
-
title: "Property Address"
|
|
32002
|
-
|
|
32003
|
-
|
|
32004
|
-
|
|
32005
|
-
label: "
|
|
32006
|
-
required: true
|
|
32007
|
-
}, /*#__PURE__*/React.createElement(TextArea, {
|
|
32008
|
-
className: getFieldError("propertyAddress.address") ? "employee-card-input-error" : "",
|
|
32009
|
-
inputRef: register({
|
|
32010
|
-
required: "Address is required."
|
|
32011
|
-
}),
|
|
32012
|
-
name: "propertyAddress.address",
|
|
32013
|
-
style: {
|
|
32014
|
-
minHeight: "96px"
|
|
32015
|
-
}
|
|
32016
|
-
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32017
|
-
error: getFieldError("propertyAddress.landmark"),
|
|
32018
|
-
label: "Landmark"
|
|
32019
|
-
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32020
|
-
errorStyle: !!getFieldError("propertyAddress.landmark"),
|
|
32021
|
-
inputRef: register(),
|
|
32022
|
-
name: "propertyAddress.landmark"
|
|
32023
|
-
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32024
|
-
error: getFieldError("propertyAddress.pinCode"),
|
|
32025
|
-
label: "Pin Code",
|
|
32026
|
-
required: true
|
|
32027
|
-
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32028
|
-
errorStyle: !!getFieldError("propertyAddress.pinCode"),
|
|
32029
|
-
inputRef: register({
|
|
32030
|
-
pattern: {
|
|
32031
|
-
value: PINCODE_PATTERN,
|
|
32032
|
-
message: "Enter a valid 6-digit pin code."
|
|
32033
|
-
},
|
|
32034
|
-
required: "Pin Code is required."
|
|
32035
|
-
}),
|
|
32036
|
-
maxlength: 6,
|
|
32037
|
-
name: "propertyAddress.pinCode"
|
|
32038
|
-
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32039
|
-
error: getFieldError("propertyAddress.locality"),
|
|
32040
|
-
label: "Locality",
|
|
32041
|
-
required: true
|
|
32042
|
-
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32043
|
-
control: control,
|
|
32044
|
-
name: "propertyAddress.locality",
|
|
32045
|
-
rules: {
|
|
32046
|
-
required: "Locality is required."
|
|
32047
|
-
},
|
|
32048
|
-
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32049
|
-
option: LOCALITY_OPTIONS,
|
|
32050
|
-
optionKey: "name",
|
|
32051
|
-
selected: props.value,
|
|
32052
|
-
select: props.onChange,
|
|
32053
|
-
t: t
|
|
32054
|
-
})
|
|
32055
|
-
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32056
|
-
error: getFieldError("propertyAddress.subLocality"),
|
|
32057
|
-
label: "Sub Locality",
|
|
32058
|
-
required: true
|
|
32685
|
+
style: {
|
|
32686
|
+
minHeight: "96px"
|
|
32687
|
+
}
|
|
32688
|
+
})))), /*#__PURE__*/React.createElement(SectionCard, {
|
|
32689
|
+
description: "Property location and administrative boundary details.",
|
|
32690
|
+
isOpen: collapsedSections.address,
|
|
32691
|
+
onToggle: toggleSection,
|
|
32692
|
+
sectionKey: "propertyAddress",
|
|
32693
|
+
title: "Property Address",
|
|
32694
|
+
sectionRef: sectionRefs.propertyAddress
|
|
32695
|
+
}, /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32696
|
+
error: getFieldError("propertyAddress.city"),
|
|
32697
|
+
label: "City"
|
|
32059
32698
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32060
32699
|
control: control,
|
|
32061
|
-
name: "propertyAddress.
|
|
32062
|
-
rules: {
|
|
32063
|
-
required: "Sub Locality is required."
|
|
32064
|
-
},
|
|
32700
|
+
name: "propertyAddress.city",
|
|
32065
32701
|
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32066
|
-
|
|
32067
|
-
|
|
32068
|
-
|
|
32069
|
-
|
|
32070
|
-
|
|
32071
|
-
|
|
32702
|
+
className: "form-field",
|
|
32703
|
+
selected: props.value || city,
|
|
32704
|
+
select: val => {
|
|
32705
|
+
setCity(val);
|
|
32706
|
+
props.onChange(val);
|
|
32707
|
+
},
|
|
32708
|
+
option: allCities,
|
|
32709
|
+
optionCardStyles: {
|
|
32710
|
+
overflowY: "auto",
|
|
32711
|
+
maxHeight: "300px"
|
|
32712
|
+
},
|
|
32713
|
+
optionKey: "i18nKey",
|
|
32714
|
+
t: t,
|
|
32715
|
+
style: {
|
|
32716
|
+
width: "100%"
|
|
32717
|
+
},
|
|
32718
|
+
placeholder: "Select"
|
|
32072
32719
|
})
|
|
32073
32720
|
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32074
|
-
error: getFieldError("propertyAddress.
|
|
32075
|
-
label: "
|
|
32721
|
+
error: getFieldError("propertyAddress.pinCode"),
|
|
32722
|
+
label: "Pin Code",
|
|
32076
32723
|
required: true
|
|
32077
32724
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32078
32725
|
control: control,
|
|
32079
|
-
name: "propertyAddress.
|
|
32726
|
+
name: "propertyAddress.pinCode",
|
|
32080
32727
|
rules: {
|
|
32081
|
-
required: "
|
|
32728
|
+
required: "Pin Code is required."
|
|
32082
32729
|
},
|
|
32083
32730
|
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32084
|
-
option:
|
|
32085
|
-
optionKey: "
|
|
32086
|
-
selected: props.value
|
|
32087
|
-
|
|
32731
|
+
option: fetchedPincodes,
|
|
32732
|
+
optionKey: "i18nKey",
|
|
32733
|
+
selected: (fetchedPincodes === null || fetchedPincodes === void 0 ? void 0 : fetchedPincodes.find(p => p.code === props.value)) || (props.value ? {
|
|
32734
|
+
code: props.value,
|
|
32735
|
+
name: props.value,
|
|
32736
|
+
i18nKey: props.value
|
|
32737
|
+
} : null),
|
|
32738
|
+
select: val => {
|
|
32739
|
+
const newPin = val === null || val === void 0 ? void 0 : val.code;
|
|
32740
|
+
if (newPin !== props.value) {
|
|
32741
|
+
setValue("propertyAddress.locality", null);
|
|
32742
|
+
setValue("propertyAddress.zone", "");
|
|
32743
|
+
setValue("propertyAddress.block", "");
|
|
32744
|
+
setValue("propertyAddress.address", "");
|
|
32745
|
+
}
|
|
32746
|
+
props.onChange(newPin);
|
|
32747
|
+
},
|
|
32088
32748
|
t: t
|
|
32089
32749
|
})
|
|
32090
32750
|
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32091
|
-
error: getFieldError("propertyAddress.
|
|
32092
|
-
label: "
|
|
32751
|
+
error: getFieldError("propertyAddress.locality"),
|
|
32752
|
+
label: "Locality",
|
|
32093
32753
|
required: true
|
|
32094
32754
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32095
32755
|
control: control,
|
|
32096
|
-
name: "propertyAddress.
|
|
32756
|
+
name: "propertyAddress.locality",
|
|
32097
32757
|
rules: {
|
|
32098
|
-
required: "
|
|
32758
|
+
required: "Locality is required."
|
|
32099
32759
|
},
|
|
32100
32760
|
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32101
|
-
option:
|
|
32102
|
-
optionKey: "
|
|
32761
|
+
option: filteredLocalities,
|
|
32762
|
+
optionKey: "i18nKey",
|
|
32103
32763
|
selected: props.value,
|
|
32104
|
-
select:
|
|
32764
|
+
select: val => {
|
|
32765
|
+
props.onChange(val);
|
|
32766
|
+
if (val !== null && val !== void 0 && val.zone) setValue("propertyAddress.zone", val.zone);
|
|
32767
|
+
if (val !== null && val !== void 0 && val.ward) setValue("propertyAddress.block", val.ward);
|
|
32768
|
+
if (val !== null && val !== void 0 && val.localname) setValue("propertyAddress.address", val.localname);
|
|
32769
|
+
if (val !== null && val !== void 0 && val.pincode) {
|
|
32770
|
+
const p = Array.isArray(val.pincode) ? val.pincode[0] : val.pincode;
|
|
32771
|
+
if (p) {
|
|
32772
|
+
setValue("propertyAddress.pinCode", p.toString().split(".")[0]);
|
|
32773
|
+
}
|
|
32774
|
+
}
|
|
32775
|
+
},
|
|
32105
32776
|
t: t
|
|
32106
32777
|
})
|
|
32778
|
+
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32779
|
+
error: getFieldError("propertyAddress.state"),
|
|
32780
|
+
label: "State"
|
|
32781
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32782
|
+
errorStyle: !!getFieldError("propertyAddress.state"),
|
|
32783
|
+
inputRef: register(),
|
|
32784
|
+
name: "propertyAddress.state"
|
|
32785
|
+
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32786
|
+
error: getFieldError("propertyAddress.district"),
|
|
32787
|
+
label: "District"
|
|
32788
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32789
|
+
errorStyle: !!getFieldError("propertyAddress.district"),
|
|
32790
|
+
inputRef: register(),
|
|
32791
|
+
name: "propertyAddress.district"
|
|
32792
|
+
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32793
|
+
error: getFieldError("propertyAddress.street"),
|
|
32794
|
+
label: "Street"
|
|
32795
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32796
|
+
errorStyle: !!getFieldError("propertyAddress.street"),
|
|
32797
|
+
inputRef: register(),
|
|
32798
|
+
name: "propertyAddress.street"
|
|
32799
|
+
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32800
|
+
error: getFieldError("propertyAddress.houseNo"),
|
|
32801
|
+
label: "House No"
|
|
32802
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32803
|
+
errorStyle: !!getFieldError("propertyAddress.houseNo"),
|
|
32804
|
+
inputRef: register(),
|
|
32805
|
+
name: "propertyAddress.houseNo"
|
|
32806
|
+
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32807
|
+
error: getFieldError("propertyAddress.block"),
|
|
32808
|
+
label: "Block"
|
|
32809
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32810
|
+
errorStyle: !!getFieldError("propertyAddress.block"),
|
|
32811
|
+
inputRef: register(),
|
|
32812
|
+
name: "propertyAddress.block"
|
|
32813
|
+
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32814
|
+
error: getFieldError("propertyAddress.zone"),
|
|
32815
|
+
label: "Zone"
|
|
32816
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32817
|
+
errorStyle: !!getFieldError("propertyAddress.zone"),
|
|
32818
|
+
inputRef: register(),
|
|
32819
|
+
name: "propertyAddress.zone"
|
|
32820
|
+
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32821
|
+
error: getFieldError("propertyAddress.landmark"),
|
|
32822
|
+
label: "Landmark"
|
|
32823
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32824
|
+
errorStyle: !!getFieldError("propertyAddress.landmark"),
|
|
32825
|
+
inputRef: register(),
|
|
32826
|
+
name: "propertyAddress.landmark"
|
|
32827
|
+
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32828
|
+
error: getFieldError("propertyAddress.address"),
|
|
32829
|
+
isFullWidth: true,
|
|
32830
|
+
label: "Address"
|
|
32831
|
+
}, /*#__PURE__*/React.createElement(TextArea, {
|
|
32832
|
+
className: getFieldError("propertyAddress.address") ? "employee-card-input-error" : "",
|
|
32833
|
+
inputRef: register({
|
|
32834
|
+
required: "Address is required."
|
|
32835
|
+
}),
|
|
32836
|
+
name: "propertyAddress.address",
|
|
32837
|
+
style: {
|
|
32838
|
+
minHeight: "96px"
|
|
32839
|
+
}
|
|
32107
32840
|
}))), /*#__PURE__*/React.createElement(SectionCard, {
|
|
32108
32841
|
description: "Usage attributes for the property and the requested water connection.",
|
|
32109
32842
|
isOpen: collapsedSections.usage,
|
|
32110
32843
|
onToggle: toggleSection,
|
|
32111
|
-
sectionKey: "
|
|
32112
|
-
title: "Property and Water Connection Use Details"
|
|
32844
|
+
sectionKey: "useDetails",
|
|
32845
|
+
title: "Property and Water Connection Use Details",
|
|
32846
|
+
sectionRef: sectionRefs.useDetails
|
|
32113
32847
|
}, /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32114
32848
|
error: getFieldError("useDetails.propertyType"),
|
|
32115
32849
|
label: "Property Type",
|
|
@@ -32121,60 +32855,60 @@ const NewApplication = () => {
|
|
|
32121
32855
|
required: "Property Type is required."
|
|
32122
32856
|
},
|
|
32123
32857
|
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32124
|
-
option:
|
|
32858
|
+
option: dropdownData.propertyTypes,
|
|
32125
32859
|
optionKey: "name",
|
|
32126
32860
|
selected: props.value,
|
|
32127
32861
|
select: props.onChange,
|
|
32128
32862
|
t: t
|
|
32129
32863
|
})
|
|
32130
32864
|
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32131
|
-
error: getFieldError("useDetails.
|
|
32132
|
-
label: "
|
|
32865
|
+
error: getFieldError("useDetails.plotArea"),
|
|
32866
|
+
label: "Plot Area (Sq. m.)",
|
|
32133
32867
|
required: true
|
|
32134
32868
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32135
|
-
errorStyle: !!getFieldError("useDetails.
|
|
32869
|
+
errorStyle: !!getFieldError("useDetails.plotArea"),
|
|
32136
32870
|
inputRef: register({
|
|
32137
32871
|
pattern: {
|
|
32138
|
-
value:
|
|
32139
|
-
message: "Enter a valid
|
|
32872
|
+
value: DECIMAL_PATTERN,
|
|
32873
|
+
message: "Enter a valid numeric value."
|
|
32140
32874
|
},
|
|
32141
|
-
required: "
|
|
32875
|
+
required: "Plot Area is required."
|
|
32142
32876
|
}),
|
|
32143
|
-
name: "useDetails.
|
|
32144
|
-
})),
|
|
32145
|
-
error: getFieldError("useDetails.
|
|
32146
|
-
label: "
|
|
32877
|
+
name: "useDetails.plotArea"
|
|
32878
|
+
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32879
|
+
error: getFieldError("useDetails.builtUpArea"),
|
|
32880
|
+
label: "Built-up Area (Sq. m.)",
|
|
32147
32881
|
required: true
|
|
32148
32882
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32149
|
-
errorStyle: !!getFieldError("useDetails.
|
|
32883
|
+
errorStyle: !!getFieldError("useDetails.builtUpArea"),
|
|
32150
32884
|
inputRef: register({
|
|
32151
32885
|
pattern: {
|
|
32152
|
-
value:
|
|
32153
|
-
message: "Enter a valid
|
|
32886
|
+
value: DECIMAL_PATTERN,
|
|
32887
|
+
message: "Enter a valid numeric value."
|
|
32154
32888
|
},
|
|
32155
|
-
required:
|
|
32889
|
+
required: "Built Up Area is required."
|
|
32156
32890
|
}),
|
|
32157
|
-
name: "useDetails.
|
|
32158
|
-
}))
|
|
32159
|
-
error: getFieldError("useDetails.
|
|
32160
|
-
label: "
|
|
32891
|
+
name: "useDetails.builtUpArea"
|
|
32892
|
+
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32893
|
+
error: getFieldError("useDetails.noOfFloors"),
|
|
32894
|
+
label: "Number of Floors",
|
|
32161
32895
|
required: true
|
|
32162
32896
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32163
|
-
errorStyle: !!getFieldError("useDetails.
|
|
32897
|
+
errorStyle: !!getFieldError("useDetails.noOfFloors"),
|
|
32164
32898
|
inputRef: register({
|
|
32165
32899
|
pattern: {
|
|
32166
|
-
value:
|
|
32167
|
-
message: "Enter a valid
|
|
32900
|
+
value: NUMBER_PATTERN,
|
|
32901
|
+
message: "Enter a valid whole number."
|
|
32168
32902
|
},
|
|
32169
|
-
required: "
|
|
32903
|
+
required: "No. of Floors is required."
|
|
32170
32904
|
}),
|
|
32171
|
-
name: "useDetails.
|
|
32905
|
+
name: "useDetails.noOfFloors"
|
|
32172
32906
|
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32173
|
-
error: getFieldError("useDetails.
|
|
32174
|
-
label: "
|
|
32907
|
+
error: getFieldError("useDetails.NumberofDwellingUnits"),
|
|
32908
|
+
label: "Number of Dwelling Units",
|
|
32175
32909
|
required: true
|
|
32176
32910
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32177
|
-
errorStyle: !!getFieldError("useDetails.
|
|
32911
|
+
errorStyle: !!getFieldError("useDetails.NumberofDwellingUnits"),
|
|
32178
32912
|
inputRef: register({
|
|
32179
32913
|
pattern: {
|
|
32180
32914
|
value: DECIMAL_PATTERN,
|
|
@@ -32182,33 +32916,47 @@ const NewApplication = () => {
|
|
|
32182
32916
|
},
|
|
32183
32917
|
required: "Built Up Area is required."
|
|
32184
32918
|
}),
|
|
32185
|
-
name: "useDetails.
|
|
32186
|
-
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32187
|
-
error: getFieldError("useDetails.
|
|
32188
|
-
label: "
|
|
32919
|
+
name: "useDetails.NumberofDwellingUnits"
|
|
32920
|
+
})), isHospitalProperty ? /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32921
|
+
error: getFieldError("useDetails.hospitalBeds"),
|
|
32922
|
+
label: "Number of Beds",
|
|
32923
|
+
required: true
|
|
32924
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32925
|
+
errorStyle: !!getFieldError("useDetails.hospitalBeds"),
|
|
32926
|
+
inputRef: register({
|
|
32927
|
+
pattern: {
|
|
32928
|
+
value: NUMBER_PATTERN,
|
|
32929
|
+
message: "Enter a valid whole number."
|
|
32930
|
+
},
|
|
32931
|
+
required: isHospitalProperty ? "No. of Beds is required for Hospital / Nursing Home." : false
|
|
32932
|
+
}),
|
|
32933
|
+
name: "useDetails.hospitalBeds"
|
|
32934
|
+
})) : null, /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32935
|
+
error: getFieldError("useDetails.SelectYearofConstruction"),
|
|
32936
|
+
label: "Select Year of Construction",
|
|
32189
32937
|
required: true
|
|
32190
32938
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32191
32939
|
control: control,
|
|
32192
|
-
name: "useDetails.
|
|
32940
|
+
name: "useDetails.SelectYearofConstruction",
|
|
32193
32941
|
rules: {
|
|
32194
|
-
required: "
|
|
32942
|
+
required: "Select Year of Construction is required."
|
|
32195
32943
|
},
|
|
32196
32944
|
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32197
|
-
option:
|
|
32198
|
-
optionKey: "
|
|
32945
|
+
option: yearOptions,
|
|
32946
|
+
optionKey: "value",
|
|
32199
32947
|
selected: props.value,
|
|
32200
32948
|
select: props.onChange,
|
|
32201
32949
|
t: t
|
|
32202
32950
|
})
|
|
32203
32951
|
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32204
|
-
error: getFieldError("useDetails.
|
|
32205
|
-
label: "Water Connection
|
|
32952
|
+
error: getFieldError("useDetails.WaterConnectionUsageType"),
|
|
32953
|
+
label: "Water Connection Usage Type",
|
|
32206
32954
|
required: true
|
|
32207
32955
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32208
32956
|
control: control,
|
|
32209
|
-
name: "useDetails.
|
|
32957
|
+
name: "useDetails.WaterConnectionUsageType",
|
|
32210
32958
|
rules: {
|
|
32211
|
-
required: "Water Connection
|
|
32959
|
+
required: "Water Connection Usage Type is required."
|
|
32212
32960
|
},
|
|
32213
32961
|
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32214
32962
|
option: WATER_CONNECTION_USED_BY_OPTIONS,
|
|
@@ -32221,8 +32969,9 @@ const NewApplication = () => {
|
|
|
32221
32969
|
description: "Refund or payment-linked bank account details.",
|
|
32222
32970
|
isOpen: collapsedSections.bank,
|
|
32223
32971
|
onToggle: toggleSection,
|
|
32224
|
-
sectionKey: "
|
|
32225
|
-
title: "Bank Details"
|
|
32972
|
+
sectionKey: "bankDetails",
|
|
32973
|
+
title: "Bank Details",
|
|
32974
|
+
sectionRef: sectionRefs.bankDetails
|
|
32226
32975
|
}, /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32227
32976
|
error: getFieldError("bankDetails.bankName"),
|
|
32228
32977
|
label: "Name of the Bank",
|
|
@@ -32274,29 +33023,13 @@ const NewApplication = () => {
|
|
|
32274
33023
|
required: "Bank Account Number is required."
|
|
32275
33024
|
}),
|
|
32276
33025
|
name: "bankDetails.bankAccountNumber"
|
|
32277
|
-
}))), /*#__PURE__*/React.createElement(SectionCard, {
|
|
32278
|
-
description: "Optional rain water harvesting certificate request.",
|
|
32279
|
-
isOpen: collapsedSections.rainWaterHarvesting,
|
|
32280
|
-
onToggle: toggleSection,
|
|
32281
|
-
sectionKey: "rainWaterHarvesting",
|
|
32282
|
-
title: "Rain Water Harvesting"
|
|
32283
|
-
}, /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32284
|
-
isFullWidth: true,
|
|
32285
|
-
label: "Apply for RWH Adequacy Certificate"
|
|
32286
|
-
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32287
|
-
control: control,
|
|
32288
|
-
name: "rainWaterHarvesting.applyForAdequacyCertificate",
|
|
32289
|
-
render: props => /*#__PURE__*/React.createElement(CheckBox, {
|
|
32290
|
-
checked: !!props.value,
|
|
32291
|
-
label: "Apply for RWH Adequacy Certificate",
|
|
32292
|
-
onChange: event => props.onChange(event.target.checked)
|
|
32293
|
-
})
|
|
32294
33026
|
}))), /*#__PURE__*/React.createElement(SectionCard, {
|
|
32295
33027
|
description: "Documents to be attached. Maximum allowed file size is 5 MB.",
|
|
32296
33028
|
isOpen: collapsedSections.documents,
|
|
32297
33029
|
onToggle: toggleSection,
|
|
32298
33030
|
sectionKey: "documents",
|
|
32299
|
-
title: "Documents to be Attached"
|
|
33031
|
+
title: "Documents to be Attached",
|
|
33032
|
+
sectionRef: sectionRefs.documents
|
|
32300
33033
|
}, /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32301
33034
|
error: getFieldError("documents.proofOfIdentity"),
|
|
32302
33035
|
label: "Proof of Identity",
|
|
@@ -32378,151 +33111,119 @@ const NewApplication = () => {
|
|
|
32378
33111
|
onUpload: event => uploadFile(event, "documents.otherDocumentFile", props.onChange),
|
|
32379
33112
|
value: props.value
|
|
32380
33113
|
})
|
|
32381
|
-
})), /*#__PURE__*/React.createElement(SectionCard, {
|
|
32382
|
-
description: "Final undertaking details before preview and submit.",
|
|
32383
|
-
isOpen: collapsedSections.declaration,
|
|
32384
|
-
onToggle: toggleSection,
|
|
32385
|
-
sectionKey: "declaration",
|
|
32386
|
-
title: "Declaration / Undertaking"
|
|
32387
|
-
}, /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32388
|
-
error: getFieldError("declaration.submittedBy"),
|
|
32389
|
-
label: "Submitted By",
|
|
32390
|
-
required: true
|
|
32391
|
-
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32392
|
-
control: control,
|
|
32393
|
-
name: "declaration.submittedBy",
|
|
32394
|
-
rules: {
|
|
32395
|
-
required: "Submitted By is required."
|
|
32396
|
-
},
|
|
32397
|
-
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32398
|
-
option: SUBMITTED_BY_OPTIONS,
|
|
32399
|
-
optionKey: "name",
|
|
32400
|
-
selected: props.value,
|
|
32401
|
-
select: props.onChange,
|
|
32402
|
-
t: t
|
|
32403
|
-
})
|
|
32404
|
-
})), /*#__PURE__*/React.createElement(Controller, {
|
|
32405
|
-
control: control,
|
|
32406
|
-
name: "declaration.signatureFile",
|
|
32407
|
-
rules: {
|
|
32408
|
-
validate: value => !!value || "Upload Signature is required."
|
|
32409
|
-
},
|
|
32410
|
-
render: props => /*#__PURE__*/React.createElement(FileUploadField, {
|
|
32411
|
-
error: getFieldError("declaration.signatureFile"),
|
|
32412
|
-
helperText: "Max size 5 MB. Allowed types: PDF, PNG, JPG, JPEG.",
|
|
32413
|
-
id: "signature-file",
|
|
32414
|
-
isUploading: !!uploadingFields["declaration.signatureFile"],
|
|
32415
|
-
label: "Upload Signature",
|
|
32416
|
-
onDelete: () => clearUploadedFile("declaration.signatureFile", props.onChange),
|
|
32417
|
-
onUpload: event => uploadFile(event, "declaration.signatureFile", props.onChange),
|
|
32418
|
-
required: true,
|
|
32419
|
-
value: props.value
|
|
32420
|
-
})
|
|
32421
|
-
}), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32422
|
-
isFullWidth: true,
|
|
32423
|
-
label: "Captcha",
|
|
32424
|
-
required: true
|
|
32425
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
32426
|
-
style: {
|
|
32427
|
-
display: "flex",
|
|
32428
|
-
gap: "16px",
|
|
32429
|
-
flexWrap: "wrap",
|
|
32430
|
-
alignItems: "center"
|
|
32431
|
-
}
|
|
32432
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
32433
|
-
style: captchaBoxStyle
|
|
32434
|
-
}, generatedCaptcha), /*#__PURE__*/React.createElement("button", {
|
|
32435
|
-
type: "button",
|
|
32436
|
-
onClick: refreshCaptcha,
|
|
32437
|
-
style: linkButtonStyle
|
|
32438
|
-
}, "Refresh Captcha"))), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32439
|
-
error: getFieldError("declaration.captcha"),
|
|
32440
|
-
label: "Enter Captcha",
|
|
32441
|
-
required: true
|
|
32442
|
-
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32443
|
-
errorStyle: !!getFieldError("declaration.captcha"),
|
|
32444
|
-
inputRef: register({
|
|
32445
|
-
required: "Captcha is required."
|
|
32446
|
-
}),
|
|
32447
|
-
name: "declaration.captcha"
|
|
32448
|
-
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32449
|
-
error: getFieldError("declaration.agree"),
|
|
32450
|
-
isFullWidth: true,
|
|
32451
|
-
label: "Declaration",
|
|
32452
|
-
required: true
|
|
32453
|
-
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32454
|
-
control: control,
|
|
32455
|
-
name: "declaration.agree",
|
|
32456
|
-
rules: {
|
|
32457
|
-
validate: value => value || "Please accept the declaration to continue."
|
|
32458
|
-
},
|
|
32459
|
-
render: props => /*#__PURE__*/React.createElement(CheckBox, {
|
|
32460
|
-
checked: !!props.value,
|
|
32461
|
-
label: "I Agree",
|
|
32462
|
-
onChange: event => props.onChange(event.target.checked)
|
|
32463
|
-
})
|
|
32464
|
-
}))))), previewMode && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionCard, {
|
|
33114
|
+
})))), previewMode && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionCard, {
|
|
32465
33115
|
description: "Selected request and connection type.",
|
|
32466
33116
|
isOpen: collapsedSections.application,
|
|
32467
33117
|
onToggle: toggleSection,
|
|
32468
33118
|
sectionKey: "application",
|
|
32469
|
-
title: "Application Selection"
|
|
33119
|
+
title: "Application Selection",
|
|
33120
|
+
onEditClick: () => handleSectionEdit("application")
|
|
32470
33121
|
}, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32471
|
-
label: "
|
|
32472
|
-
value: formValues === null || formValues === void 0 ? void 0 : formValues.
|
|
33122
|
+
label: "ZRO Location",
|
|
33123
|
+
value: formValues === null || formValues === void 0 ? void 0 : formValues.zro
|
|
33124
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33125
|
+
label: "Service Type",
|
|
33126
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati = formValues.applicationSelection) === null || _formValues$applicati === void 0 ? void 0 : _formValues$applicati.serviceType
|
|
33127
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33128
|
+
label: "Applicant Type",
|
|
33129
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati2 = formValues.applicationSelection) === null || _formValues$applicati2 === void 0 ? void 0 : _formValues$applicati2.applicantType
|
|
32473
33130
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32474
33131
|
label: "Connection Type",
|
|
32475
|
-
value: formValues === null || formValues === void 0 ? void 0 : formValues.connectionType
|
|
32476
|
-
})
|
|
33132
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati3 = formValues.applicationSelection) === null || _formValues$applicati3 === void 0 ? void 0 : _formValues$applicati3.connectionType
|
|
33133
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33134
|
+
label: "Category Type",
|
|
33135
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati4 = formValues.applicationSelection) === null || _formValues$applicati4 === void 0 ? void 0 : _formValues$applicati4.categoryType
|
|
33136
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33137
|
+
label: "Sub Category",
|
|
33138
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati5 = formValues.applicationSelection) === null || _formValues$applicati5 === void 0 ? void 0 : _formValues$applicati5.subCategory
|
|
33139
|
+
}), (formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati6 = formValues.applicationSelection) === null || _formValues$applicati6 === void 0 ? void 0 : (_formValues$applicati7 = _formValues$applicati6.subCategory) === null || _formValues$applicati7 === void 0 ? void 0 : _formValues$applicati7.code) === "COMMERCIAL" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33140
|
+
label: "Commercial Type",
|
|
33141
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati8 = formValues.applicationSelection) === null || _formValues$applicati8 === void 0 ? void 0 : _formValues$applicati8.commercialType
|
|
33142
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33143
|
+
label: "Organization Name",
|
|
33144
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati9 = formValues.applicationSelection) === null || _formValues$applicati9 === void 0 ? void 0 : (_formValues$applicati0 = _formValues$applicati9.govtOrganization) === null || _formValues$applicati0 === void 0 ? void 0 : _formValues$applicati0.organizationName
|
|
33145
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33146
|
+
label: "Nature of Work",
|
|
33147
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati1 = formValues.applicationSelection) === null || _formValues$applicati1 === void 0 ? void 0 : (_formValues$applicati10 = _formValues$applicati1.govtOrganization) === null || _formValues$applicati10 === void 0 ? void 0 : _formValues$applicati10.natureOfWork
|
|
33148
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33149
|
+
label: "Organization Document",
|
|
33150
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati11 = formValues.applicationSelection) === null || _formValues$applicati11 === void 0 ? void 0 : (_formValues$applicati12 = _formValues$applicati11.govtOrganization) === null || _formValues$applicati12 === void 0 ? void 0 : _formValues$applicati12.organizationDocument
|
|
33151
|
+
}))), /*#__PURE__*/React.createElement(SectionCard, {
|
|
32477
33152
|
description: "Applicant identity and organization information.",
|
|
32478
33153
|
isOpen: collapsedSections.applicant,
|
|
32479
33154
|
onToggle: toggleSection,
|
|
32480
33155
|
sectionKey: "applicant",
|
|
32481
|
-
title: "Details of Applicant"
|
|
32482
|
-
|
|
33156
|
+
title: "Details of Applicant",
|
|
33157
|
+
onEditClick: () => handleSectionEdit("applicant")
|
|
33158
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
33159
|
+
style: {
|
|
33160
|
+
gridColumn: "1 / -1",
|
|
33161
|
+
display: "flex",
|
|
33162
|
+
justifyContent: "center",
|
|
33163
|
+
marginBottom: "16px"
|
|
33164
|
+
}
|
|
33165
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
33166
|
+
className: "avatar-wrapper",
|
|
33167
|
+
style: {
|
|
33168
|
+
cursor: "default"
|
|
33169
|
+
}
|
|
33170
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
33171
|
+
className: "avatar-circle",
|
|
33172
|
+
style: {
|
|
33173
|
+
cursor: "default"
|
|
33174
|
+
}
|
|
33175
|
+
}, formValues !== null && formValues !== void 0 && (_formValues$applicant = formValues.applicant) !== null && _formValues$applicant !== void 0 && (_formValues$applicant2 = _formValues$applicant.UploadPicture) !== null && _formValues$applicant2 !== void 0 && _formValues$applicant2.fileStoreId ? /*#__PURE__*/React.createElement(ProfileImagePreview, {
|
|
33176
|
+
fileStoreId: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant3 = formValues.applicant) === null || _formValues$applicant3 === void 0 ? void 0 : (_formValues$applicant4 = _formValues$applicant3.UploadPicture) === null || _formValues$applicant4 === void 0 ? void 0 : _formValues$applicant4.fileStoreId
|
|
33177
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
33178
|
+
className: "avatar-placeholder"
|
|
33179
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
33180
|
+
width: "40",
|
|
33181
|
+
height: "40",
|
|
33182
|
+
viewBox: "0 0 24 24",
|
|
33183
|
+
fill: "none",
|
|
33184
|
+
stroke: "#9CA3AF",
|
|
33185
|
+
strokeWidth: "1.5"
|
|
33186
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
33187
|
+
d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"
|
|
33188
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
33189
|
+
cx: "12",
|
|
33190
|
+
cy: "7",
|
|
33191
|
+
r: "4"
|
|
33192
|
+
})))))), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32483
33193
|
label: "First Name",
|
|
32484
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33194
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant5 = formValues.applicant) === null || _formValues$applicant5 === void 0 ? void 0 : _formValues$applicant5.firstName
|
|
32485
33195
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32486
33196
|
label: "Middle Name",
|
|
32487
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33197
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant6 = formValues.applicant) === null || _formValues$applicant6 === void 0 ? void 0 : _formValues$applicant6.middleName
|
|
32488
33198
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32489
33199
|
label: "Last Name",
|
|
32490
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33200
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant7 = formValues.applicant) === null || _formValues$applicant7 === void 0 ? void 0 : _formValues$applicant7.lastName
|
|
32491
33201
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32492
|
-
label: "
|
|
32493
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33202
|
+
label: "Gender",
|
|
33203
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail = formValues.useDetails) === null || _formValues$useDetail === void 0 ? void 0 : _formValues$useDetail.gender
|
|
33204
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33205
|
+
label: "Parent/ spouse",
|
|
33206
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant8 = formValues.applicant) === null || _formValues$applicant8 === void 0 ? void 0 : _formValues$applicant8.ParentorSpouse
|
|
32494
33207
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32495
|
-
label: "Government Organization",
|
|
32496
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant5 = formValues.applicant) === null || _formValues$applicant5 === void 0 ? void 0 : _formValues$applicant5.isGovernmentOrganization
|
|
32497
|
-
}), formValues !== null && formValues !== void 0 && (_formValues$applicant6 = formValues.applicant) !== null && _formValues$applicant6 !== void 0 && _formValues$applicant6.isGovernmentOrganization ? /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32498
|
-
isFullWidth: true,
|
|
32499
|
-
label: "Name of Government Organization",
|
|
32500
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant7 = formValues.applicant) === null || _formValues$applicant7 === void 0 ? void 0 : _formValues$applicant7.governmentOrganizationName
|
|
32501
|
-
}) : null, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32502
|
-
isFullWidth: true,
|
|
32503
|
-
label: "Uploaded ID Proof",
|
|
32504
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicant8 = formValues.applicant) === null || _formValues$applicant8 === void 0 ? void 0 : _formValues$applicant8.applicantIdProofFile
|
|
32505
|
-
})), /*#__PURE__*/React.createElement(SectionCard, {
|
|
32506
|
-
description: "Communication details captured in the application.",
|
|
32507
|
-
isOpen: collapsedSections.contact,
|
|
32508
|
-
onToggle: toggleSection,
|
|
32509
|
-
sectionKey: "contact",
|
|
32510
|
-
title: "Contact Details"
|
|
32511
|
-
}, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32512
33208
|
label: "Email ID",
|
|
32513
33209
|
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$contact = formValues.contact) === null || _formValues$contact === void 0 ? void 0 : _formValues$contact.emailId
|
|
32514
33210
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32515
33211
|
label: "Mobile Number",
|
|
32516
33212
|
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$contact2 = formValues.contact) === null || _formValues$contact2 === void 0 ? void 0 : _formValues$contact2.mobileNumber
|
|
32517
33213
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32518
|
-
label: "
|
|
32519
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$contact3 = formValues.contact) === null || _formValues$contact3 === void 0 ? void 0 : _formValues$contact3.
|
|
33214
|
+
label: "WhatsApp Number",
|
|
33215
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$contact3 = formValues.contact) === null || _formValues$contact3 === void 0 ? void 0 : _formValues$contact3.whatsAppNumber
|
|
33216
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33217
|
+
isFullWidth: true,
|
|
33218
|
+
label: "Uploaded ID Proof",
|
|
33219
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents = formValues.documents) === null || _formValues$documents === void 0 ? void 0 : _formValues$documents.identityProofFile
|
|
32520
33220
|
})), /*#__PURE__*/React.createElement(SectionCard, {
|
|
32521
33221
|
description: "DJB employee-specific information.",
|
|
32522
33222
|
isOpen: collapsedSections.employee,
|
|
32523
33223
|
onToggle: toggleSection,
|
|
32524
33224
|
sectionKey: "employee",
|
|
32525
|
-
title: "For DJB Employee"
|
|
33225
|
+
title: "For DJB Employee",
|
|
33226
|
+
onEditClick: () => handleSectionEdit("djbEmployee")
|
|
32526
33227
|
}, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32527
33228
|
label: "DJB Employee",
|
|
32528
33229
|
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$djbEmploy = formValues.djbEmployee) === null || _formValues$djbEmploy === void 0 ? void 0 : _formValues$djbEmploy.isDjbEmployee
|
|
@@ -32541,62 +33242,80 @@ const NewApplication = () => {
|
|
|
32541
33242
|
isOpen: collapsedSections.address,
|
|
32542
33243
|
onToggle: toggleSection,
|
|
32543
33244
|
sectionKey: "address",
|
|
32544
|
-
title: "Property Address"
|
|
33245
|
+
title: "Property Address",
|
|
33246
|
+
onEditClick: () => handleSectionEdit("propertyAddress")
|
|
32545
33247
|
}, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32546
|
-
|
|
32547
|
-
|
|
32548
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA = formValues.propertyAddress) === null || _formValues$propertyA === void 0 ? void 0 : _formValues$propertyA.address
|
|
33248
|
+
label: "Pin Code",
|
|
33249
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA = formValues.propertyAddress) === null || _formValues$propertyA === void 0 ? void 0 : _formValues$propertyA.pinCode
|
|
32549
33250
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32550
|
-
label: "
|
|
32551
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA2 = formValues.propertyAddress) === null || _formValues$propertyA2 === void 0 ? void 0 : _formValues$propertyA2.
|
|
33251
|
+
label: "State",
|
|
33252
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA2 = formValues.propertyAddress) === null || _formValues$propertyA2 === void 0 ? void 0 : _formValues$propertyA2.state
|
|
32552
33253
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32553
|
-
label: "
|
|
32554
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA3 = formValues.propertyAddress) === null || _formValues$propertyA3 === void 0 ? void 0 : _formValues$propertyA3.
|
|
33254
|
+
label: "District",
|
|
33255
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA3 = formValues.propertyAddress) === null || _formValues$propertyA3 === void 0 ? void 0 : _formValues$propertyA3.district
|
|
33256
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33257
|
+
label: "City",
|
|
33258
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA4 = formValues.propertyAddress) === null || _formValues$propertyA4 === void 0 ? void 0 : _formValues$propertyA4.city
|
|
32555
33259
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32556
33260
|
label: "Locality",
|
|
32557
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33261
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA5 = formValues.propertyAddress) === null || _formValues$propertyA5 === void 0 ? void 0 : _formValues$propertyA5.locality
|
|
32558
33262
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32559
|
-
label: "
|
|
32560
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33263
|
+
label: "Street",
|
|
33264
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA6 = formValues.propertyAddress) === null || _formValues$propertyA6 === void 0 ? void 0 : _formValues$propertyA6.street
|
|
32561
33265
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32562
|
-
label: "
|
|
32563
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33266
|
+
label: "House No",
|
|
33267
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA7 = formValues.propertyAddress) === null || _formValues$propertyA7 === void 0 ? void 0 : _formValues$propertyA7.houseNo
|
|
33268
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33269
|
+
label: "Block",
|
|
33270
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA8 = formValues.propertyAddress) === null || _formValues$propertyA8 === void 0 ? void 0 : _formValues$propertyA8.block
|
|
33271
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33272
|
+
label: "Zone",
|
|
33273
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA9 = formValues.propertyAddress) === null || _formValues$propertyA9 === void 0 ? void 0 : _formValues$propertyA9.zone
|
|
33274
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33275
|
+
label: "Landmark",
|
|
33276
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA0 = formValues.propertyAddress) === null || _formValues$propertyA0 === void 0 ? void 0 : _formValues$propertyA0.landmark
|
|
32564
33277
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32565
|
-
|
|
32566
|
-
|
|
33278
|
+
isFullWidth: true,
|
|
33279
|
+
label: "Address",
|
|
33280
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$propertyA1 = formValues.propertyAddress) === null || _formValues$propertyA1 === void 0 ? void 0 : _formValues$propertyA1.address
|
|
32567
33281
|
})), /*#__PURE__*/React.createElement(SectionCard, {
|
|
32568
33282
|
description: "Property and connection usage values.",
|
|
32569
33283
|
isOpen: collapsedSections.usage,
|
|
32570
33284
|
onToggle: toggleSection,
|
|
32571
33285
|
sectionKey: "usage",
|
|
32572
|
-
title: "Property and Water Connection Use Details"
|
|
33286
|
+
title: "Property and Water Connection Use Details",
|
|
33287
|
+
onEditClick: () => handleSectionEdit("useDetails")
|
|
32573
33288
|
}, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32574
33289
|
label: "Property Type",
|
|
32575
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33290
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail2 = formValues.useDetails) === null || _formValues$useDetail2 === void 0 ? void 0 : _formValues$useDetail2.propertyType
|
|
32576
33291
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32577
|
-
label: "
|
|
32578
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
32579
|
-
}),
|
|
32580
|
-
label: "
|
|
32581
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
32582
|
-
}) : null, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32583
|
-
label: "Plot Area in Sqm",
|
|
32584
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail6 = formValues.useDetails) === null || _formValues$useDetail6 === void 0 ? void 0 : _formValues$useDetail6.plotArea
|
|
33292
|
+
label: "Plot Area (Sq. m.)",
|
|
33293
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail3 = formValues.useDetails) === null || _formValues$useDetail3 === void 0 ? void 0 : _formValues$useDetail3.plotArea
|
|
33294
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33295
|
+
label: "Built-up Area (Sq. m.)",
|
|
33296
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail4 = formValues.useDetails) === null || _formValues$useDetail4 === void 0 ? void 0 : _formValues$useDetail4.builtUpArea
|
|
32585
33297
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32586
|
-
label: "
|
|
32587
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33298
|
+
label: "Number of Floors",
|
|
33299
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail5 = formValues.useDetails) === null || _formValues$useDetail5 === void 0 ? void 0 : _formValues$useDetail5.noOfFloors
|
|
32588
33300
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32589
|
-
label: "
|
|
32590
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33301
|
+
label: "Number of Dwelling Units",
|
|
33302
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail6 = formValues.useDetails) === null || _formValues$useDetail6 === void 0 ? void 0 : _formValues$useDetail6.NumberofDwellingUnits
|
|
33303
|
+
}), (formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail7 = formValues.useDetails) === null || _formValues$useDetail7 === void 0 ? void 0 : (_formValues$useDetail8 = _formValues$useDetail7.propertyType) === null || _formValues$useDetail8 === void 0 ? void 0 : _formValues$useDetail8.code) === "HOSPITAL" || (formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail9 = formValues.useDetails) === null || _formValues$useDetail9 === void 0 ? void 0 : (_formValues$useDetail0 = _formValues$useDetail9.propertyType) === null || _formValues$useDetail0 === void 0 ? void 0 : _formValues$useDetail0.code) === "HOSPITAL_NURSING_HOME" ? /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33304
|
+
label: "No. of Beds",
|
|
33305
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail1 = formValues.useDetails) === null || _formValues$useDetail1 === void 0 ? void 0 : _formValues$useDetail1.hospitalBeds
|
|
33306
|
+
}) : null, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33307
|
+
label: "Year of Construction",
|
|
33308
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail10 = formValues.useDetails) === null || _formValues$useDetail10 === void 0 ? void 0 : _formValues$useDetail10.SelectYearofConstruction
|
|
32591
33309
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32592
|
-
label: "Water Connection
|
|
32593
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33310
|
+
label: "Water Connection Usage Type",
|
|
33311
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail11 = formValues.useDetails) === null || _formValues$useDetail11 === void 0 ? void 0 : _formValues$useDetail11.WaterConnectionUsageType
|
|
32594
33312
|
})), /*#__PURE__*/React.createElement(SectionCard, {
|
|
32595
33313
|
description: "Banking information as entered in the form.",
|
|
32596
33314
|
isOpen: collapsedSections.bank,
|
|
32597
33315
|
onToggle: toggleSection,
|
|
32598
33316
|
sectionKey: "bank",
|
|
32599
|
-
title: "Bank Details"
|
|
33317
|
+
title: "Bank Details",
|
|
33318
|
+
onEditClick: () => handleSectionEdit("bankDetails")
|
|
32600
33319
|
}, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32601
33320
|
label: "Name of the Bank",
|
|
32602
33321
|
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$bankDetai = formValues.bankDetails) === null || _formValues$bankDetai === void 0 ? void 0 : _formValues$bankDetai.bankName
|
|
@@ -32609,56 +33328,29 @@ const NewApplication = () => {
|
|
|
32609
33328
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32610
33329
|
label: "Bank Account No.",
|
|
32611
33330
|
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$bankDetai4 = formValues.bankDetails) === null || _formValues$bankDetai4 === void 0 ? void 0 : _formValues$bankDetai4.bankAccountNumber
|
|
32612
|
-
})), /*#__PURE__*/React.createElement(SectionCard, {
|
|
32613
|
-
description: "Rain water harvesting request status.",
|
|
32614
|
-
isOpen: collapsedSections.rainWaterHarvesting,
|
|
32615
|
-
onToggle: toggleSection,
|
|
32616
|
-
sectionKey: "rainWaterHarvesting",
|
|
32617
|
-
title: "Rain Water Harvesting"
|
|
32618
|
-
}, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32619
|
-
isFullWidth: true,
|
|
32620
|
-
label: "Apply for RWH Adequacy Certificate",
|
|
32621
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$rainWater = formValues.rainWaterHarvesting) === null || _formValues$rainWater === void 0 ? void 0 : _formValues$rainWater.applyForAdequacyCertificate
|
|
32622
33331
|
})), /*#__PURE__*/React.createElement(SectionCard, {
|
|
32623
33332
|
description: "Uploaded supporting documents.",
|
|
32624
33333
|
isOpen: collapsedSections.documents,
|
|
32625
33334
|
onToggle: toggleSection,
|
|
32626
33335
|
sectionKey: "documents",
|
|
32627
|
-
title: "Documents to be Attached"
|
|
33336
|
+
title: "Documents to be Attached",
|
|
33337
|
+
onEditClick: () => handleSectionEdit("documents")
|
|
32628
33338
|
}, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32629
33339
|
label: "Proof of Identity",
|
|
32630
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33340
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents2 = formValues.documents) === null || _formValues$documents2 === void 0 ? void 0 : _formValues$documents2.proofOfIdentity
|
|
32631
33341
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32632
33342
|
label: "Upload Identity Proof",
|
|
32633
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33343
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents3 = formValues.documents) === null || _formValues$documents3 === void 0 ? void 0 : _formValues$documents3.identityProofFile
|
|
32634
33344
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32635
33345
|
label: "Ownership Status",
|
|
32636
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33346
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents4 = formValues.documents) === null || _formValues$documents4 === void 0 ? void 0 : _formValues$documents4.ownershipStatus
|
|
32637
33347
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32638
33348
|
label: "Upload Ownership Document",
|
|
32639
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33349
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents5 = formValues.documents) === null || _formValues$documents5 === void 0 ? void 0 : _formValues$documents5.ownershipDocumentFile
|
|
32640
33350
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32641
33351
|
label: "Other Document",
|
|
32642
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
32643
|
-
})), /*#__PURE__*/React.createElement(
|
|
32644
|
-
description: "Declaration and undertaking details.",
|
|
32645
|
-
isOpen: collapsedSections.declaration,
|
|
32646
|
-
onToggle: toggleSection,
|
|
32647
|
-
sectionKey: "declaration",
|
|
32648
|
-
title: "Declaration / Undertaking"
|
|
32649
|
-
}, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32650
|
-
label: "Submitted By",
|
|
32651
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$declarati = formValues.declaration) === null || _formValues$declarati === void 0 ? void 0 : _formValues$declarati.submittedBy
|
|
32652
|
-
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32653
|
-
label: "Upload Signature",
|
|
32654
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$declarati2 = formValues.declaration) === null || _formValues$declarati2 === void 0 ? void 0 : _formValues$declarati2.signatureFile
|
|
32655
|
-
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32656
|
-
label: "Entered Captcha",
|
|
32657
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$declarati3 = formValues.declaration) === null || _formValues$declarati3 === void 0 ? void 0 : _formValues$declarati3.captcha
|
|
32658
|
-
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
32659
|
-
label: "I Agree",
|
|
32660
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$declarati4 = formValues.declaration) === null || _formValues$declarati4 === void 0 ? void 0 : _formValues$declarati4.agree
|
|
32661
|
-
}))), /*#__PURE__*/React.createElement(ActionBar, {
|
|
33352
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents6 = formValues.documents) === null || _formValues$documents6 === void 0 ? void 0 : _formValues$documents6.otherDocumentFile
|
|
33353
|
+
}))))), /*#__PURE__*/React.createElement(ActionBar, {
|
|
32662
33354
|
style: actionBarStyle
|
|
32663
33355
|
}, !previewMode ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
32664
33356
|
label: "Reset",
|