@djb25/digit-ui-module-ws 1.0.18 → 1.0.19
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 +492 -93
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -441,7 +441,7 @@ const getFiles = async (filesArray, tenant) => {
|
|
|
441
441
|
response !== null && response !== void 0 && (_response$data = response.data) !== null && _response$data !== void 0 && (_response$data$fileSt = _response$data.fileStoreIds) !== null && _response$data$fileSt !== void 0 && (_response$data$fileSt2 = _response$data$fileSt[0]) !== null && _response$data$fileSt2 !== void 0 && _response$data$fileSt2.url ? window.open(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$fileS = _response$data2.fileStoreIds) === null || _response$data2$fileS === void 0 ? void 0 : (_response$data2$fileS2 = _response$data2$fileS[0]) === null || _response$data2$fileS2 === void 0 ? void 0 : _response$data2$fileS2.url) : null;
|
|
442
442
|
};
|
|
443
443
|
const createPayloadOfWS = async data => {
|
|
444
|
-
var _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$applicationSele, _data$applicationSele2, _data$useDetails, _data$useDetails2, _data$useDetails3, _data$useDetails3$pro, _data$useDetails4, _data$useDetails4$pro, _data$useDetails5, _data$useDetails6, _data$useDetails7, _data$useDetails8, _data$propertyAddress, _data$applicant, _data$useDetails9, _data$useDetails9$gen, _data$contact, _data$applicant2, _data$applicant3, _data$applicant4, _data$applicationSele3, _data$applicationSele4, _data$contact2, _data$cpt2, _data$cpt3, _data$cpt3$details, _data$zro, _data$propertyAddress2, _data$propertyAddress3, _data$applicationSele5, _data$applicationSele6, _data$applicationSele7, _data$applicationSele8, _data$applicationSele9, _data$applicationSele0, _data$applicationSele1, _data$applicationSele10, _data$applicationSele11, _data$applicationSele12, _data$applicationSele13, _data$contact3, _data$cpt4, _data$cpt4$details, _data$propertyAddress4, _data$propertyAddress5, _data$cpt5, _Digit, _Digit$Customizations, _Digit$Customizations2, _Digit2, _Digit2$Customization, _Digit2$Customization2;
|
|
444
|
+
var _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$applicationSele, _data$applicationSele2, _data$useDetails, _data$useDetails2, _data$useDetails3, _data$useDetails3$pro, _data$useDetails4, _data$useDetails4$pro, _data$useDetails5, _data$useDetails6, _data$useDetails7, _data$useDetails8, _data$propertyAddress, _data$applicant, _data$useDetails9, _data$useDetails9$gen, _data$contact, _data$applicant2, _data$applicant3, _data$applicant4, _data$applicationSele3, _data$applicationSele4, _data$contact2, _data$cpt2, _data$cpt3, _data$cpt3$details, _data$zro, _data$propertyAddress2, _data$propertyAddress3, _data$applicationSele5, _data$applicationSele6, _data$applicationSele7, _data$applicationSele8, _data$applicationSele9, _data$applicationSele0, _data$applicationSele1, _data$applicationSele10, _data$applicationSele11, _data$applicationSele12, _data$applicationSele13, _data$applicationSele14, _data$applicationSele15, _data$applicationSele16, _data$applicationSele17, _data$applicationSele18, _data$applicationSele19, _data$applicationSele20, _data$applicationSele21, _data$applicationSele22, _data$applicationSele23, _data$contact3, _data$documents, _data$documents2, _data$documents3, _data$cpt4, _data$cpt4$details, _data$propertyAddress4, _data$propertyAddress5, _data$cpt5, _Digit, _Digit$Customizations, _Digit$Customizations2, _Digit2, _Digit2$Customization, _Digit2$Customization2;
|
|
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
|
});
|
|
@@ -483,9 +483,18 @@ const createPayloadOfWS = async data => {
|
|
|
483
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
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
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
|
-
|
|
487
|
-
|
|
486
|
+
domesticType: data === null || data === void 0 ? void 0 : (_data$applicationSele11 = data.applicationSelection) === null || _data$applicationSele11 === void 0 ? void 0 : (_data$applicationSele12 = _data$applicationSele11.domesticType) === null || _data$applicationSele12 === void 0 ? void 0 : _data$applicationSele12.code,
|
|
487
|
+
temporaryConnection: data === null || data === void 0 ? void 0 : (_data$applicationSele13 = data.applicationSelection) === null || _data$applicationSele13 === void 0 ? void 0 : (_data$applicationSele14 = _data$applicationSele13.temporaryConnection) === null || _data$applicationSele14 === void 0 ? void 0 : _data$applicationSele14.code,
|
|
488
|
+
ownerAuthorizationDoc: data === null || data === void 0 ? void 0 : (_data$applicationSele15 = data.applicationSelection) === null || _data$applicationSele15 === void 0 ? void 0 : (_data$applicationSele16 = _data$applicationSele15.ownerAuthorizationDoc) === null || _data$applicationSele16 === void 0 ? void 0 : (_data$applicationSele17 = _data$applicationSele16[0]) === null || _data$applicationSele17 === void 0 ? void 0 : (_data$applicationSele18 = _data$applicationSele17[1]) === null || _data$applicationSele18 === void 0 ? void 0 : _data$applicationSele18.fileStoreId,
|
|
489
|
+
ownerContactNumber: data === null || data === void 0 ? void 0 : (_data$applicationSele19 = data.applicationSelection) === null || _data$applicationSele19 === void 0 ? void 0 : _data$applicationSele19.ownerContactNumber,
|
|
490
|
+
isOwnerVerified: data === null || data === void 0 ? void 0 : (_data$applicationSele20 = data.applicationSelection) === null || _data$applicationSele20 === void 0 ? void 0 : _data$applicationSele20.isOwnerVerified,
|
|
491
|
+
commercialType: data === null || data === void 0 ? void 0 : (_data$applicationSele21 = data.applicationSelection) === null || _data$applicationSele21 === void 0 ? void 0 : (_data$applicationSele22 = _data$applicationSele21.commercialType) === null || _data$applicationSele22 === void 0 ? void 0 : _data$applicationSele22.code,
|
|
492
|
+
govtOrganization: data === null || data === void 0 ? void 0 : (_data$applicationSele23 = data.applicationSelection) === null || _data$applicationSele23 === void 0 ? void 0 : _data$applicationSele23.govtOrganization,
|
|
493
|
+
governmentEmployee: data === null || data === void 0 ? void 0 : data.governmentEmployee,
|
|
488
494
|
whatsAppNumber: data === null || data === void 0 ? void 0 : (_data$contact3 = data.contact) === null || _data$contact3 === void 0 ? void 0 : _data$contact3.whatsAppNumber,
|
|
495
|
+
identityProofNumber: data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : _data$documents.identityProofNumber,
|
|
496
|
+
ownershipDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents2 = data.documents) === null || _data$documents2 === void 0 ? void 0 : _data$documents2.ownershipDocumentNumber,
|
|
497
|
+
otherDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.otherDocumentNumber,
|
|
489
498
|
detailsProvidedBy: ""
|
|
490
499
|
},
|
|
491
500
|
tenantId: (data === null || data === void 0 ? void 0 : (_data$cpt4 = data.cpt) === null || _data$cpt4 === void 0 ? void 0 : (_data$cpt4$details = _data$cpt4.details) === null || _data$cpt4$details === void 0 ? void 0 : _data$cpt4$details.tenantId) || (data === null || data === void 0 ? void 0 : (_data$propertyAddress4 = data.propertyAddress) === null || _data$propertyAddress4 === void 0 ? void 0 : (_data$propertyAddress5 = _data$propertyAddress4.city) === null || _data$propertyAddress5 === void 0 ? void 0 : _data$propertyAddress5.code),
|
|
@@ -515,11 +524,11 @@ const updatePayloadOfWS = async (data, type) => {
|
|
|
515
524
|
return payload;
|
|
516
525
|
};
|
|
517
526
|
const convertToWSUpdate = data => {
|
|
518
|
-
var _data$WaterConnection, _data$WaterConnection2, _data$
|
|
527
|
+
var _data$WaterConnection, _data$WaterConnection2, _data$documents4, _Digit5, _Digit5$Customization, _Digit5$Customization2, _Digit6, _Digit6$Customization, _Digit6$Customization2;
|
|
519
528
|
let formdata = {
|
|
520
529
|
WaterConnection: {
|
|
521
530
|
...(data === null || data === void 0 ? void 0 : (_data$WaterConnection = data.WaterConnectionResult) === null || _data$WaterConnection === void 0 ? void 0 : (_data$WaterConnection2 = _data$WaterConnection.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : _data$WaterConnection2[0]),
|
|
522
|
-
documents: [...(data === null || data === void 0 ? void 0 : (_data$
|
|
531
|
+
documents: [...(data === null || data === void 0 ? void 0 : (_data$documents4 = data.documents) === null || _data$documents4 === void 0 ? void 0 : _data$documents4.documents)],
|
|
523
532
|
processInstance: {
|
|
524
533
|
action: "SUBMIT_APPLICATION"
|
|
525
534
|
}
|
|
@@ -529,7 +538,7 @@ const convertToWSUpdate = data => {
|
|
|
529
538
|
return formdata;
|
|
530
539
|
};
|
|
531
540
|
const convertToEditWSUpdate = data => {
|
|
532
|
-
var _data$WaterConnection3, _data$WaterConnection4, _data$
|
|
541
|
+
var _data$WaterConnection3, _data$WaterConnection4, _data$documents5, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$ConnectionHolde8, _data$ConnectionHolde9, _data$ConnectionHolde0, _data$ConnectionHolde1, _data$ConnectionHolde10, _data$ConnectionHolde11, _data$waterConectionD, _data$waterConectionD2, _data$waterConectionD3, _data$applicationType, _data$applicationType2, _data$serviceName, _waterResult$serviceN, _data$documents6, _data$sewerageConnect, _data$sewerageConnect2, _Digit7, _Digit7$Customization, _Digit7$Customization2, _Digit8, _Digit8$Customization, _Digit8$Customization2;
|
|
533
542
|
let waterResult = data === null || data === void 0 ? void 0 : (_data$WaterConnection3 = data.WaterConnectionResult) === null || _data$WaterConnection3 === void 0 ? void 0 : (_data$WaterConnection4 = _data$WaterConnection3.WaterConnection) === null || _data$WaterConnection4 === void 0 ? void 0 : _data$WaterConnection4[0];
|
|
534
543
|
let formdata = {
|
|
535
544
|
WaterConnection: {
|
|
@@ -541,7 +550,7 @@ const convertToEditWSUpdate = data => {
|
|
|
541
550
|
status: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.status : waterResult === null || waterResult === void 0 ? void 0 : waterResult.status,
|
|
542
551
|
connectionNo: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.connectionNo : waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionNo) || null,
|
|
543
552
|
oldConnectionNo: null,
|
|
544
|
-
documents: [...(data === null || data === void 0 ? void 0 : (_data$
|
|
553
|
+
documents: [...(data === null || data === void 0 ? void 0 : (_data$documents5 = data.documents) === null || _data$documents5 === void 0 ? void 0 : _data$documents5.documents)],
|
|
545
554
|
plumberInfo: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.plumberInfo : (waterResult === null || waterResult === void 0 ? void 0 : waterResult.plumberInfo) || [],
|
|
546
555
|
roadType: null,
|
|
547
556
|
roadCuttingArea: null,
|
|
@@ -594,7 +603,7 @@ const convertToEditWSUpdate = data => {
|
|
|
594
603
|
water: data !== null && data !== void 0 && (_data$applicationType = data.applicationType) !== null && _data$applicationType !== void 0 && _data$applicationType.includes("WATER") ? true : false,
|
|
595
604
|
sewerage: data !== null && data !== void 0 && (_data$applicationType2 = data.applicationType) !== null && _data$applicationType2 !== void 0 && _data$applicationType2.includes("WATER") ? true : false,
|
|
596
605
|
service: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$serviceName = data.serviceName) === null || _data$serviceName === void 0 ? void 0 : _data$serviceName.code : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$serviceN = waterResult.serviceName) === null || _waterResult$serviceN === void 0 ? void 0 : _waterResult$serviceN.code,
|
|
597
|
-
reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$
|
|
606
|
+
reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$documents6 = data.documents) === null || _data$documents6 === void 0 ? void 0 : _data$documents6.documents)],
|
|
598
607
|
proposedWaterClosets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect = data.sewerageConnectionDetails) === null || _data$sewerageConnect === void 0 ? void 0 : _data$sewerageConnect.proposedWaterClosets,
|
|
599
608
|
proposedToilets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect2 = data.sewerageConnectionDetails) === null || _data$sewerageConnect2 === void 0 ? void 0 : _data$sewerageConnect2.proposedToilets,
|
|
600
609
|
comment: "",
|
|
@@ -608,7 +617,7 @@ const convertToEditWSUpdate = data => {
|
|
|
608
617
|
return formdata;
|
|
609
618
|
};
|
|
610
619
|
const convertToEditSWUpdate = data => {
|
|
611
|
-
var _data$SewerageConnect, _data$SewerageConnect2, _data$
|
|
620
|
+
var _data$SewerageConnect, _data$SewerageConnect2, _data$documents7, _data$ConnectionHolde12, _data$ConnectionHolde13, _data$ConnectionHolde14, _data$ConnectionHolde15, _data$ConnectionHolde16, _data$ConnectionHolde17, _data$ConnectionHolde18, _data$ConnectionHolde19, _data$ConnectionHolde20, _data$ConnectionHolde21, _data$ConnectionHolde22, _data$ConnectionHolde23, _data$ConnectionHolde24, _data$waterConectionD4, _data$waterConectionD5, _data$waterConectionD6, _data$applicationType3, _data$applicationType4, _data$serviceName2, _SewerageResult$servi, _data$documents8, _data$sewerageConnect3, _data$sewerageConnect4, _Digit9, _Digit9$Customization, _Digit9$Customization2, _Digit0, _Digit0$Customization, _Digit0$Customization2;
|
|
612
621
|
let SewerageResult = data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnectionResult) === null || _data$SewerageConnect === void 0 ? void 0 : (_data$SewerageConnect2 = _data$SewerageConnect.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : _data$SewerageConnect2[0];
|
|
613
622
|
let formdata = {
|
|
614
623
|
SewerageConnection: {
|
|
@@ -620,7 +629,7 @@ const convertToEditSWUpdate = data => {
|
|
|
620
629
|
status: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.status : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.status,
|
|
621
630
|
connectionNo: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.connectionNo : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.connectionNo) || null,
|
|
622
631
|
oldConnectionNo: null,
|
|
623
|
-
documents: [...(data === null || data === void 0 ? void 0 : (_data$
|
|
632
|
+
documents: [...(data === null || data === void 0 ? void 0 : (_data$documents7 = data.documents) === null || _data$documents7 === void 0 ? void 0 : _data$documents7.documents)],
|
|
624
633
|
plumberInfo: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.plumberInfo : (SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.plumberInfo) || [],
|
|
625
634
|
roadType: null,
|
|
626
635
|
roadCuttingArea: null,
|
|
@@ -673,7 +682,7 @@ const convertToEditSWUpdate = data => {
|
|
|
673
682
|
water: data !== null && data !== void 0 && (_data$applicationType3 = data.applicationType) !== null && _data$applicationType3 !== void 0 && _data$applicationType3.includes("WATER") ? true : false,
|
|
674
683
|
sewerage: data !== null && data !== void 0 && (_data$applicationType4 = data.applicationType) !== null && _data$applicationType4 !== void 0 && _data$applicationType4.includes("WATER") ? true : false,
|
|
675
684
|
service: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$serviceName2 = data.serviceName) === null || _data$serviceName2 === void 0 ? void 0 : _data$serviceName2.code : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$servi = SewerageResult.serviceName) === null || _SewerageResult$servi === void 0 ? void 0 : _SewerageResult$servi.code,
|
|
676
|
-
reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$
|
|
685
|
+
reviewDocData: [...(data === null || data === void 0 ? void 0 : (_data$documents8 = data.documents) === null || _data$documents8 === void 0 ? void 0 : _data$documents8.documents)],
|
|
677
686
|
proposedWaterClosets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect3 = data.sewerageConnectionDetails) === null || _data$sewerageConnect3 === void 0 ? void 0 : _data$sewerageConnect3.proposedWaterClosets,
|
|
678
687
|
proposedToilets: data === null || data === void 0 ? void 0 : (_data$sewerageConnect4 = data.sewerageConnectionDetails) === null || _data$sewerageConnect4 === void 0 ? void 0 : _data$sewerageConnect4.proposedToilets,
|
|
679
688
|
comment: "",
|
|
@@ -687,12 +696,12 @@ const convertToEditSWUpdate = data => {
|
|
|
687
696
|
return formdata;
|
|
688
697
|
};
|
|
689
698
|
const convertToSWUpdate = data => {
|
|
690
|
-
var _data$SewerageConnect3, _data$SewerageConnect4, _data$
|
|
699
|
+
var _data$SewerageConnect3, _data$SewerageConnect4, _data$documents9, _Digit1, _Digit1$Customization, _Digit1$Customization2, _Digit10, _Digit10$Customizatio, _Digit10$Customizatio2;
|
|
691
700
|
let formdata = {
|
|
692
701
|
SewerageConnection: {
|
|
693
702
|
...(data === null || data === void 0 ? void 0 : (_data$SewerageConnect3 = data.SewerageConnectionResult) === null || _data$SewerageConnect3 === void 0 ? void 0 : (_data$SewerageConnect4 = _data$SewerageConnect3.SewerageConnections) === null || _data$SewerageConnect4 === void 0 ? void 0 : _data$SewerageConnect4[0]),
|
|
694
703
|
connectionType: "Non Metered",
|
|
695
|
-
documents: [...(data === null || data === void 0 ? void 0 : (_data$
|
|
704
|
+
documents: [...(data === null || data === void 0 ? void 0 : (_data$documents9 = data.documents) === null || _data$documents9 === void 0 ? void 0 : _data$documents9.documents)],
|
|
696
705
|
processInstance: {
|
|
697
706
|
action: "SUBMIT_APPLICATION"
|
|
698
707
|
}
|
|
@@ -30927,6 +30936,10 @@ var applicantTypes = [
|
|
|
30927
30936
|
{
|
|
30928
30937
|
code: "TENANT",
|
|
30929
30938
|
name: "Tenant"
|
|
30939
|
+
},
|
|
30940
|
+
{
|
|
30941
|
+
code: "RELATIVE",
|
|
30942
|
+
name: "Relative"
|
|
30930
30943
|
}
|
|
30931
30944
|
];
|
|
30932
30945
|
var connectionTypes = [
|
|
@@ -30993,18 +31006,50 @@ var propertyTypes = [
|
|
|
30993
31006
|
name: "Hospital"
|
|
30994
31007
|
}
|
|
30995
31008
|
];
|
|
31009
|
+
var temporaryConnectionTypes = [
|
|
31010
|
+
{
|
|
31011
|
+
code: "EXHIBITION",
|
|
31012
|
+
name: "Exhibition"
|
|
31013
|
+
},
|
|
31014
|
+
{
|
|
31015
|
+
code: "OFFICIAL_FUNCTION",
|
|
31016
|
+
name: "Official Function"
|
|
31017
|
+
},
|
|
31018
|
+
{
|
|
31019
|
+
code: "RELIGIOUS_FUNCTION",
|
|
31020
|
+
name: "Religious Function"
|
|
31021
|
+
},
|
|
31022
|
+
{
|
|
31023
|
+
code: "CIRCUS",
|
|
31024
|
+
name: "Circus"
|
|
31025
|
+
},
|
|
31026
|
+
{
|
|
31027
|
+
code: "CONSTRUCTION",
|
|
31028
|
+
name: "Construction"
|
|
31029
|
+
},
|
|
31030
|
+
{
|
|
31031
|
+
code: "AS_PER_COURT_ORDERS",
|
|
31032
|
+
name: "as per Court Orders"
|
|
31033
|
+
},
|
|
31034
|
+
{
|
|
31035
|
+
code: "SOCIAL_FAMILY_FUNCTION",
|
|
31036
|
+
name: "Social/Family Function"
|
|
31037
|
+
}
|
|
31038
|
+
];
|
|
30996
31039
|
var dropdownData = {
|
|
30997
31040
|
serviceTypes: serviceTypes,
|
|
30998
31041
|
applicantTypes: applicantTypes,
|
|
30999
31042
|
connectionTypes: connectionTypes,
|
|
31000
31043
|
categoryTypes: categoryTypes,
|
|
31001
31044
|
subCategories: subCategories,
|
|
31002
|
-
propertyTypes: propertyTypes
|
|
31045
|
+
propertyTypes: propertyTypes,
|
|
31046
|
+
temporaryConnectionTypes: temporaryConnectionTypes
|
|
31003
31047
|
};
|
|
31004
31048
|
|
|
31005
31049
|
const FORM_STORAGE_KEY = "WS_EMPLOYEE_NEW_APPLICATION_FORM";
|
|
31006
31050
|
const MAX_FILE_SIZE = 5242880;
|
|
31007
31051
|
const SUPPORTED_FILE_TYPES = /(\.pdf|\.png|\.jpe?g)$/i;
|
|
31052
|
+
const DECLARATION_POINTS = ["I understand that sanction of connection does not acknowledge or confer any title, ownership or occupancy right in favour of the applicant.", "I declare that there is no dispute on property and there is no stay from any court of law against obtaining water/ sewerage connection.", "The Property on which connection is being applied is not booked/unauthorized/encroachment of Govt.Land/misuse etc.", "I further undertake that in case of any dispute about the ownership of the property I will absolve DJB from any legal battle in the court of law as the water connection applied for is related to supply of potable water and not to decide the ownership of property.", "I further undertake to pay the charges as and when demanded by DJB, and in the event of non-payment, DJB will be at liberty to disconnect the services being provided by DJB.", "I further undertake that I have not taken 'DJB Employee Rebate' against any other Premise/Connection.", "In case of variation in plot size as per document submitted by the undersigned and on actual measurement by DJB representative, difference of Infrastructure charge/any other charge on actual measurement will be paid by me.", "In case connection is found non-feasible on technical ground as per any prevalent policy of DJB the water connection may be denied or if sanctioned inadvertently, the said sanction may be withdrawn and may be disconnected without any notice.", "I hereby undertake that all the facts and documents submitted are true and correct, in case of any misrepresentation or wrong facts etc., sanction of connection may be disconnected without any notice.."];
|
|
31008
31053
|
const NAME_PATTERN = /^[a-zA-Z\s.'-]{1,50}$/;
|
|
31009
31054
|
const EMAIL_PATTERN = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/;
|
|
31010
31055
|
const MOBILE_PATTERN = /^[6-9][0-9]{9}$/;
|
|
@@ -31024,7 +31069,8 @@ const DEFAULT_SECTION_STATE = {
|
|
|
31024
31069
|
application: true,
|
|
31025
31070
|
applicant: true,
|
|
31026
31071
|
contact: true,
|
|
31027
|
-
|
|
31072
|
+
djbEmployee: true,
|
|
31073
|
+
governmentEmployee: true,
|
|
31028
31074
|
address: true,
|
|
31029
31075
|
usage: true,
|
|
31030
31076
|
bank: true,
|
|
@@ -31040,9 +31086,7 @@ const DEFAULT_FORM_VALUES = {
|
|
|
31040
31086
|
middleName: "",
|
|
31041
31087
|
lastName: "",
|
|
31042
31088
|
ParentorSpouse: "",
|
|
31043
|
-
|
|
31044
|
-
applicantIdProofFile: null,
|
|
31045
|
-
governmentOrganizationName: ""
|
|
31089
|
+
applicantIdProofFile: null
|
|
31046
31090
|
},
|
|
31047
31091
|
contact: {
|
|
31048
31092
|
emailId: "",
|
|
@@ -31055,12 +31099,13 @@ const DEFAULT_FORM_VALUES = {
|
|
|
31055
31099
|
connectionType: null,
|
|
31056
31100
|
categoryType: null,
|
|
31057
31101
|
subCategory: null,
|
|
31058
|
-
|
|
31059
|
-
|
|
31060
|
-
|
|
31061
|
-
|
|
31062
|
-
|
|
31063
|
-
|
|
31102
|
+
temporaryConnection: null,
|
|
31103
|
+
ownerAuthorizationDoc: null,
|
|
31104
|
+
ownerContactNumber: "",
|
|
31105
|
+
ownerOtp: "",
|
|
31106
|
+
isOwnerVerified: false,
|
|
31107
|
+
domesticType: null,
|
|
31108
|
+
commercialType: null
|
|
31064
31109
|
},
|
|
31065
31110
|
djbEmployee: {
|
|
31066
31111
|
isDjbEmployee: false,
|
|
@@ -31068,6 +31113,12 @@ const DEFAULT_FORM_VALUES = {
|
|
|
31068
31113
|
retirementDate: "",
|
|
31069
31114
|
officeNameAndAddress: ""
|
|
31070
31115
|
},
|
|
31116
|
+
governmentEmployee: {
|
|
31117
|
+
isGovernmentEmployee: false,
|
|
31118
|
+
organizationName: "",
|
|
31119
|
+
natureOfWork: "",
|
|
31120
|
+
organizationDocument: null
|
|
31121
|
+
},
|
|
31071
31122
|
propertyAddress: {
|
|
31072
31123
|
address: "",
|
|
31073
31124
|
landmark: "",
|
|
@@ -31290,6 +31341,16 @@ const ProfileImageUpload = ({
|
|
|
31290
31341
|
}
|
|
31291
31342
|
}, error));
|
|
31292
31343
|
};
|
|
31344
|
+
const linkButtonStyle = {
|
|
31345
|
+
background: "transparent",
|
|
31346
|
+
border: "none",
|
|
31347
|
+
color: "#0B4B66",
|
|
31348
|
+
cursor: "pointer",
|
|
31349
|
+
fontSize: "14px",
|
|
31350
|
+
fontWeight: "600",
|
|
31351
|
+
padding: 0,
|
|
31352
|
+
textDecoration: "underline"
|
|
31353
|
+
};
|
|
31293
31354
|
const buildDefaultValues = () => ({
|
|
31294
31355
|
zro: {
|
|
31295
31356
|
value: "",
|
|
@@ -31539,7 +31600,7 @@ const FileUploadField = ({
|
|
|
31539
31600
|
}, isUploading ? "Uploading file..." : (value === null || value === void 0 ? void 0 : value.fileName) || "No file selected"));
|
|
31540
31601
|
};
|
|
31541
31602
|
const NewApplication = () => {
|
|
31542
|
-
var _Digit$SessionStorage, _getFieldError, _getFieldError2, _getFieldError3, _getFieldError4, _getFieldError5, _getFieldError6, _getFieldError7, _getFieldError8, _formValues$applicati, _formValues$applicati2, _formValues$applicati3, _formValues$applicati4, _formValues$applicati5, _formValues$applicati6, _formValues$applicati7, _formValues$applicati8, _formValues$applicati9, _formValues$applicati0, _formValues$applicati1, _formValues$applicati10, _formValues$applicati11, _formValues$applicati12, _formValues$applicant, _formValues$applicant2, _formValues$applicant3, _formValues$applicant4, _formValues$applicant5, _formValues$applicant6, _formValues$applicant7, _formValues$useDetail, _formValues$applicant8, _formValues$contact, _formValues$contact2, _formValues$contact3, _formValues$documents, _formValues$djbEmploy, _formValues$djbEmploy2, _formValues$djbEmploy3, _formValues$djbEmploy4, _formValues$djbEmploy5, _formValues$propertyA, _formValues$propertyA2, _formValues$propertyA3, _formValues$propertyA4, _formValues$propertyA5, _formValues$propertyA6, _formValues$propertyA7, _formValues$propertyA8, _formValues$propertyA9, _formValues$propertyA0, _formValues$propertyA1, _formValues$useDetail2, _formValues$useDetail3, _formValues$useDetail4, _formValues$useDetail5, _formValues$useDetail6, _formValues$useDetail7, _formValues$useDetail8, _formValues$useDetail9, _formValues$useDetail0, _formValues$useDetail1, _formValues$useDetail10, _formValues$useDetail11, _formValues$bankDetai, _formValues$bankDetai2, _formValues$bankDetai3, _formValues$bankDetai4, _formValues$documents2, _formValues$documents3, _formValues$documents4, _formValues$documents5, _formValues$documents6;
|
|
31603
|
+
var _Digit$SessionStorage, _getFieldError, _getFieldError2, _getFieldError3, _getFieldError4, _getFieldError5, _getFieldError6, _getFieldError7, _getFieldError8, _getFieldError9, _getFieldError0, _getFieldError1, _formValues$applicati, _formValues$applicati2, _formValues$applicati3, _formValues$applicati4, _formValues$applicati5, _formValues$applicati6, _formValues$applicati7, _formValues$applicati8, _formValues$applicati9, _formValues$applicati0, _formValues$applicati1, _formValues$applicati10, _formValues$applicati11, _formValues$applicati12, _formValues$applicati13, _formValues$applicati14, _formValues$applicati15, _formValues$applicati16, _formValues$applicati17, _formValues$applicati18, _formValues$applicati19, _formValues$applicati20, _formValues$applicant, _formValues$applicant2, _formValues$applicant3, _formValues$applicant4, _formValues$applicant5, _formValues$applicant6, _formValues$applicant7, _formValues$useDetail, _formValues$applicant8, _formValues$contact, _formValues$contact2, _formValues$contact3, _formValues$documents, _formValues$djbEmploy, _formValues$djbEmploy2, _formValues$djbEmploy3, _formValues$djbEmploy4, _formValues$djbEmploy5, _formValues$governmen, _formValues$governmen2, _formValues$governmen3, _formValues$governmen4, _formValues$propertyA, _formValues$propertyA2, _formValues$propertyA3, _formValues$propertyA4, _formValues$propertyA5, _formValues$propertyA6, _formValues$propertyA7, _formValues$propertyA8, _formValues$propertyA9, _formValues$propertyA0, _formValues$propertyA1, _formValues$useDetail2, _formValues$useDetail3, _formValues$useDetail4, _formValues$useDetail5, _formValues$useDetail6, _formValues$useDetail7, _formValues$useDetail8, _formValues$useDetail9, _formValues$useDetail0, _formValues$useDetail1, _formValues$useDetail10, _formValues$useDetail11, _formValues$bankDetai, _formValues$bankDetai2, _formValues$bankDetai3, _formValues$bankDetai4, _formValues$documents2, _formValues$documents3, _formValues$documents4, _formValues$documents5, _formValues$documents6, _formValues$declarati, _formValues$declarati2, _formValues$declarati3;
|
|
31543
31604
|
const {
|
|
31544
31605
|
t
|
|
31545
31606
|
} = useTranslation();
|
|
@@ -31556,6 +31617,8 @@ const NewApplication = () => {
|
|
|
31556
31617
|
const [collapsedSections, setCollapsedSections] = useState(DEFAULT_SECTION_STATE);
|
|
31557
31618
|
const [showToast, setShowToast] = useState(null);
|
|
31558
31619
|
const [uploadingFields, setUploadingFields] = useState({});
|
|
31620
|
+
const [isOtpSent, setIsOtpSent] = useState(false);
|
|
31621
|
+
const [otpError, setOtpError] = useState(null);
|
|
31559
31622
|
const [isEnableLoader, setIsEnableLoader] = useState(false);
|
|
31560
31623
|
const [appDetails, setAppDetails] = useState({});
|
|
31561
31624
|
const [waterAndSewerageBoth, setWaterAndSewerageBoth] = useState(null);
|
|
@@ -31639,6 +31702,7 @@ const NewApplication = () => {
|
|
|
31639
31702
|
applicant: React.useRef(null),
|
|
31640
31703
|
contact: React.useRef(null),
|
|
31641
31704
|
djbEmployee: React.useRef(null),
|
|
31705
|
+
governmentEmployee: React.useRef(null),
|
|
31642
31706
|
propertyAddress: React.useRef(null),
|
|
31643
31707
|
useDetails: React.useRef(null),
|
|
31644
31708
|
bankDetails: React.useRef(null),
|
|
@@ -31674,6 +31738,7 @@ const NewApplication = () => {
|
|
|
31674
31738
|
const formValues = watch();
|
|
31675
31739
|
const isGovernmentOrganization = watch("applicant.isGovernmentOrganization");
|
|
31676
31740
|
const isDjbEmployee = watch("djbEmployee.isDjbEmployee");
|
|
31741
|
+
const isGovernmentEmployee = watch("governmentEmployee.isGovernmentEmployee");
|
|
31677
31742
|
const selectedPropertyType = watch("useDetails.propertyType");
|
|
31678
31743
|
const selectedLocality = watch("propertyAddress.locality");
|
|
31679
31744
|
const selectedSubLocality = watch("propertyAddress.subLocality");
|
|
@@ -31691,6 +31756,19 @@ const NewApplication = () => {
|
|
|
31691
31756
|
const subCategoryIsCommercial = (selectedSubCategory === null || selectedSubCategory === void 0 ? void 0 : selectedSubCategory.code) === "COMMERCIAL";
|
|
31692
31757
|
const hasPendingUpload = Object.values(uploadingFields).some(Boolean);
|
|
31693
31758
|
const isHospitalProperty = (selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code) === "HOSPITAL" || (selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code) === "HOSPITAL_NURSING_HOME";
|
|
31759
|
+
const selectedApplicantType = watch("applicationSelection.applicantType");
|
|
31760
|
+
const isTenantOrRelative = (selectedApplicantType === null || selectedApplicantType === void 0 ? void 0 : selectedApplicantType.code) === "TENANT" || (selectedApplicantType === null || selectedApplicantType === void 0 ? void 0 : selectedApplicantType.code) === "RELATIVE";
|
|
31761
|
+
const isOwnerVerified = watch("applicationSelection.isOwnerVerified");
|
|
31762
|
+
const subCategoryIsDomestic = (selectedSubCategory === null || selectedSubCategory === void 0 ? void 0 : selectedSubCategory.code) === "DOMESTIC";
|
|
31763
|
+
const selectedConnectionType = watch("applicationSelection.connectionType");
|
|
31764
|
+
const connectionTypeIsTemporary = (selectedConnectionType === null || selectedConnectionType === void 0 ? void 0 : selectedConnectionType.code) === "TEMPORARY";
|
|
31765
|
+
const selectedDomesticType = watch("applicationSelection.domesticType");
|
|
31766
|
+
const activeType = (selectedSubCategory === null || selectedSubCategory === void 0 ? void 0 : selectedSubCategory.code) === "DOMESTIC" ? selectedDomesticType : selectedCommercialType;
|
|
31767
|
+
const applicantSectionTitle = useMemo(() => {
|
|
31768
|
+
if ((activeType === null || activeType === void 0 ? void 0 : activeType.code) === "INDIVIDUAL") return "Applicant Details";
|
|
31769
|
+
if ((activeType === null || activeType === void 0 ? void 0 : activeType.code) === "ORGANIZATION") return "Authorized Person Details";
|
|
31770
|
+
return "Details of Applicant";
|
|
31771
|
+
}, [activeType]);
|
|
31694
31772
|
const timelineConfig = [{
|
|
31695
31773
|
sectionId: "application",
|
|
31696
31774
|
route: "application-selection",
|
|
@@ -31698,11 +31776,15 @@ const NewApplication = () => {
|
|
|
31698
31776
|
}, {
|
|
31699
31777
|
sectionId: "applicant",
|
|
31700
31778
|
route: "applicant-details",
|
|
31701
|
-
actions:
|
|
31779
|
+
actions: applicantSectionTitle
|
|
31702
31780
|
}, ...(isDjbEmployee ? [{
|
|
31703
31781
|
sectionId: "djbEmployee",
|
|
31704
31782
|
route: "djb-employee",
|
|
31705
31783
|
actions: "For DJB Employee"
|
|
31784
|
+
}] : []), ...(isGovernmentEmployee ? [{
|
|
31785
|
+
sectionId: "governmentEmployee",
|
|
31786
|
+
route: "government-employee",
|
|
31787
|
+
actions: "For Government Employee"
|
|
31706
31788
|
}] : []), {
|
|
31707
31789
|
sectionId: "propertyAddress",
|
|
31708
31790
|
route: "property-address",
|
|
@@ -31719,6 +31801,10 @@ const NewApplication = () => {
|
|
|
31719
31801
|
sectionId: "documents",
|
|
31720
31802
|
route: "documents",
|
|
31721
31803
|
actions: "Documents to be Attached"
|
|
31804
|
+
}, {
|
|
31805
|
+
sectionId: "declaration",
|
|
31806
|
+
route: "declaration",
|
|
31807
|
+
actions: "Declaration/Undertaking"
|
|
31722
31808
|
}, {
|
|
31723
31809
|
sectionId: "Review",
|
|
31724
31810
|
route: "review",
|
|
@@ -31798,12 +31884,46 @@ const NewApplication = () => {
|
|
|
31798
31884
|
clearErrors("djbEmployee.officeNameAndAddress");
|
|
31799
31885
|
}
|
|
31800
31886
|
}, [isDjbEmployee, setValue, clearErrors]);
|
|
31887
|
+
useEffect(() => {
|
|
31888
|
+
if (!isGovernmentEmployee) {
|
|
31889
|
+
setValue("governmentEmployee.organizationName", "");
|
|
31890
|
+
setValue("governmentEmployee.natureOfWork", "");
|
|
31891
|
+
setValue("governmentEmployee.organizationDocument", null);
|
|
31892
|
+
clearErrors("governmentEmployee.organizationName");
|
|
31893
|
+
clearErrors("governmentEmployee.natureOfWork");
|
|
31894
|
+
clearErrors("governmentEmployee.organizationDocument");
|
|
31895
|
+
}
|
|
31896
|
+
}, [isGovernmentEmployee, setValue, clearErrors]);
|
|
31801
31897
|
useEffect(() => {
|
|
31802
31898
|
if (!isHospitalProperty) {
|
|
31803
31899
|
setValue("useDetails.hospitalBeds", "");
|
|
31804
31900
|
clearErrors("useDetails.hospitalBeds");
|
|
31805
31901
|
}
|
|
31806
31902
|
}, [isHospitalProperty, setValue, clearErrors]);
|
|
31903
|
+
useEffect(() => {
|
|
31904
|
+
if (!isTenantOrRelative) {
|
|
31905
|
+
setValue("applicationSelection.ownerAuthorizationDoc", null);
|
|
31906
|
+
setValue("applicationSelection.ownerContactNumber", "");
|
|
31907
|
+
setValue("applicationSelection.ownerOtp", "");
|
|
31908
|
+
setValue("applicationSelection.isOwnerVerified", false);
|
|
31909
|
+
setIsOtpSent(false);
|
|
31910
|
+
clearErrors("applicationSelection.ownerAuthorizationDoc");
|
|
31911
|
+
clearErrors("applicationSelection.ownerContactNumber");
|
|
31912
|
+
clearErrors("applicationSelection.ownerOtp");
|
|
31913
|
+
}
|
|
31914
|
+
}, [isTenantOrRelative, setValue, clearErrors]);
|
|
31915
|
+
useEffect(() => {
|
|
31916
|
+
if (!subCategoryIsDomestic) {
|
|
31917
|
+
setValue("applicationSelection.domesticType", null);
|
|
31918
|
+
clearErrors("applicationSelection.domesticType");
|
|
31919
|
+
}
|
|
31920
|
+
}, [subCategoryIsDomestic, setValue, clearErrors]);
|
|
31921
|
+
useEffect(() => {
|
|
31922
|
+
if (!connectionTypeIsTemporary) {
|
|
31923
|
+
setValue("applicationSelection.temporaryConnection", null);
|
|
31924
|
+
clearErrors("applicationSelection.temporaryConnection");
|
|
31925
|
+
}
|
|
31926
|
+
}, [connectionTypeIsTemporary, setValue, clearErrors]);
|
|
31807
31927
|
useEffect(() => {}, [selectedLocality === null || selectedLocality === void 0 ? void 0 : selectedLocality.code, setValue]);
|
|
31808
31928
|
const closeToast = () => setShowToast(null);
|
|
31809
31929
|
const closeToastOfError = () => setShowToast(null);
|
|
@@ -32341,7 +32461,105 @@ const NewApplication = () => {
|
|
|
32341
32461
|
onBlur: props.onBlur,
|
|
32342
32462
|
t: t
|
|
32343
32463
|
})
|
|
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, {
|
|
32464
|
+
}))), getFieldError("applicationSelection.applicantType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError2 = getFieldError("applicationSelection.applicantType")) === null || _getFieldError2 === void 0 ? void 0 : _getFieldError2.message), isTenantOrRelative && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32465
|
+
className: "card-label-smaller"
|
|
32466
|
+
}, "Owner Authorization"), /*#__PURE__*/React.createElement("div", {
|
|
32467
|
+
className: "field"
|
|
32468
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32469
|
+
control: control,
|
|
32470
|
+
name: "applicationSelection.ownerAuthorizationDoc",
|
|
32471
|
+
rules: {
|
|
32472
|
+
required: isTenantOrRelative ? "Owner Authorization is required" : false
|
|
32473
|
+
},
|
|
32474
|
+
render: props => /*#__PURE__*/React.createElement(FileUploadField, {
|
|
32475
|
+
error: getFieldError("applicationSelection.ownerAuthorizationDoc"),
|
|
32476
|
+
id: "owner-auth-doc",
|
|
32477
|
+
isUploading: !!uploadingFields["applicationSelection.ownerAuthorizationDoc"],
|
|
32478
|
+
onDelete: () => clearUploadedFile("applicationSelection.ownerAuthorizationDoc", props.onChange),
|
|
32479
|
+
onUpload: event => uploadFile(event, "applicationSelection.ownerAuthorizationDoc", props.onChange),
|
|
32480
|
+
value: props.value
|
|
32481
|
+
})
|
|
32482
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32483
|
+
className: "card-label-smaller"
|
|
32484
|
+
}, "Owner Contact Number"), /*#__PURE__*/React.createElement("div", {
|
|
32485
|
+
className: "field",
|
|
32486
|
+
style: {
|
|
32487
|
+
display: "flex",
|
|
32488
|
+
alignItems: "center",
|
|
32489
|
+
gap: "10px"
|
|
32490
|
+
}
|
|
32491
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32492
|
+
style: {
|
|
32493
|
+
flex: 1
|
|
32494
|
+
}
|
|
32495
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32496
|
+
name: "applicationSelection.ownerContactNumber",
|
|
32497
|
+
inputRef: register({
|
|
32498
|
+
required: isTenantOrRelative ? "Owner Contact Number is required" : false,
|
|
32499
|
+
pattern: {
|
|
32500
|
+
value: MOBILE_PATTERN,
|
|
32501
|
+
message: "Enter a valid 10-digit mobile number."
|
|
32502
|
+
}
|
|
32503
|
+
}),
|
|
32504
|
+
errorStyle: !!getFieldError("applicationSelection.ownerContactNumber"),
|
|
32505
|
+
maxlength: 10,
|
|
32506
|
+
disable: isOwnerVerified
|
|
32507
|
+
})), !isOwnerVerified && /*#__PURE__*/React.createElement("button", {
|
|
32508
|
+
type: "button",
|
|
32509
|
+
style: linkButtonStyle,
|
|
32510
|
+
onClick: () => {
|
|
32511
|
+
const mobile = watch("applicationSelection.ownerContactNumber");
|
|
32512
|
+
if (MOBILE_PATTERN.test(mobile)) {
|
|
32513
|
+
setIsOtpSent(true);
|
|
32514
|
+
setOtpError(null);
|
|
32515
|
+
} else {
|
|
32516
|
+
setError("applicationSelection.ownerContactNumber", {
|
|
32517
|
+
type: "manual",
|
|
32518
|
+
message: "Enter a valid mobile number first."
|
|
32519
|
+
});
|
|
32520
|
+
}
|
|
32521
|
+
}
|
|
32522
|
+
}, isOtpSent ? "Resend OTP" : "Verify"), isOwnerVerified && /*#__PURE__*/React.createElement("span", {
|
|
32523
|
+
style: {
|
|
32524
|
+
color: "green",
|
|
32525
|
+
fontSize: "14px",
|
|
32526
|
+
fontWeight: "600"
|
|
32527
|
+
}
|
|
32528
|
+
}, "Verified \u2713"))), getFieldError("applicationSelection.ownerContactNumber") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError3 = getFieldError("applicationSelection.ownerContactNumber")) === null || _getFieldError3 === void 0 ? void 0 : _getFieldError3.message), isOtpSent && !isOwnerVerified && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32529
|
+
className: "card-label-smaller"
|
|
32530
|
+
}, "OTP Verification"), /*#__PURE__*/React.createElement("div", {
|
|
32531
|
+
className: "field",
|
|
32532
|
+
style: {
|
|
32533
|
+
display: "flex",
|
|
32534
|
+
alignItems: "center",
|
|
32535
|
+
gap: "10px"
|
|
32536
|
+
}
|
|
32537
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32538
|
+
style: {
|
|
32539
|
+
flex: 1
|
|
32540
|
+
}
|
|
32541
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32542
|
+
name: "applicationSelection.ownerOtp",
|
|
32543
|
+
inputRef: register({
|
|
32544
|
+
required: isOtpSent ? "OTP is required" : false
|
|
32545
|
+
}),
|
|
32546
|
+
errorStyle: !!getFieldError("applicationSelection.ownerOtp") || !!otpError,
|
|
32547
|
+
maxlength: 6
|
|
32548
|
+
})), /*#__PURE__*/React.createElement("button", {
|
|
32549
|
+
type: "button",
|
|
32550
|
+
style: linkButtonStyle,
|
|
32551
|
+
onClick: () => {
|
|
32552
|
+
const otp = watch("applicationSelection.ownerOtp");
|
|
32553
|
+
if (otp && otp.length === 6) {
|
|
32554
|
+
setValue("applicationSelection.isOwnerVerified", true);
|
|
32555
|
+
setIsOtpSent(false);
|
|
32556
|
+
setOtpError(null);
|
|
32557
|
+
clearErrors("applicationSelection.ownerOtp");
|
|
32558
|
+
} else {
|
|
32559
|
+
setOtpError("Enter 6 digit OTP");
|
|
32560
|
+
}
|
|
32561
|
+
}
|
|
32562
|
+
}, "Confirm"))), (getFieldError("applicationSelection.ownerOtp") || otpError) && /*#__PURE__*/React.createElement(CardLabelError, null, ((_getFieldError4 = getFieldError("applicationSelection.ownerOtp")) === null || _getFieldError4 === void 0 ? void 0 : _getFieldError4.message) || otpError)), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32345
32563
|
className: "card-label-smaller"
|
|
32346
32564
|
}, "Connection Type"), /*#__PURE__*/React.createElement("div", {
|
|
32347
32565
|
className: "field"
|
|
@@ -32363,31 +32581,31 @@ const NewApplication = () => {
|
|
|
32363
32581
|
onBlur: props.onBlur,
|
|
32364
32582
|
t: t
|
|
32365
32583
|
})
|
|
32366
|
-
}))), getFieldError("applicationSelection.connectionType") && /*#__PURE__*/React.createElement(CardLabelError, null, (
|
|
32584
|
+
}))), getFieldError("applicationSelection.connectionType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError5 = getFieldError("applicationSelection.connectionType")) === null || _getFieldError5 === void 0 ? void 0 : _getFieldError5.message), connectionTypeIsTemporary && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32367
32585
|
className: "card-label-smaller"
|
|
32368
|
-
}, "
|
|
32586
|
+
}, "Temporary Connection"), /*#__PURE__*/React.createElement("div", {
|
|
32369
32587
|
className: "field"
|
|
32370
32588
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32371
32589
|
control: control,
|
|
32372
|
-
name: "applicationSelection.
|
|
32590
|
+
name: "applicationSelection.temporaryConnection",
|
|
32373
32591
|
rules: {
|
|
32374
|
-
required: t("REQUIRED_FIELD")
|
|
32592
|
+
required: connectionTypeIsTemporary ? t("REQUIRED_FIELD") : false
|
|
32375
32593
|
},
|
|
32376
32594
|
isMandatory: true,
|
|
32377
32595
|
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32378
32596
|
className: "form-field",
|
|
32379
32597
|
selected: props.value,
|
|
32380
32598
|
disable: false,
|
|
32381
|
-
option: dropdownData.
|
|
32382
|
-
errorStyle: !!getFieldError("applicationSelection.
|
|
32599
|
+
option: dropdownData.temporaryConnectionTypes,
|
|
32600
|
+
errorStyle: !!getFieldError("applicationSelection.temporaryConnection"),
|
|
32383
32601
|
select: props.onChange,
|
|
32384
32602
|
optionKey: "name",
|
|
32385
32603
|
onBlur: props.onBlur,
|
|
32386
32604
|
t: t
|
|
32387
32605
|
})
|
|
32388
|
-
}))), getFieldError("applicationSelection.
|
|
32606
|
+
}))), connectionTypeIsTemporary && getFieldError("applicationSelection.temporaryConnection") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError6 = getFieldError("applicationSelection.temporaryConnection")) === null || _getFieldError6 === void 0 ? void 0 : _getFieldError6.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32389
32607
|
className: "card-label-smaller"
|
|
32390
|
-
}, "
|
|
32608
|
+
}, "Category Type"), /*#__PURE__*/React.createElement("div", {
|
|
32391
32609
|
className: "field"
|
|
32392
32610
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32393
32611
|
control: control,
|
|
@@ -32407,7 +32625,51 @@ const NewApplication = () => {
|
|
|
32407
32625
|
onBlur: props.onBlur,
|
|
32408
32626
|
t: t
|
|
32409
32627
|
})
|
|
32410
|
-
}))), getFieldError("applicationSelection.subCategory") && /*#__PURE__*/React.createElement(CardLabelError, null, (
|
|
32628
|
+
}))), getFieldError("applicationSelection.subCategory") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError7 = getFieldError("applicationSelection.subCategory")) === null || _getFieldError7 === void 0 ? void 0 : _getFieldError7.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32629
|
+
className: "card-label-smaller"
|
|
32630
|
+
}, "Water Demand Type"), /*#__PURE__*/React.createElement("div", {
|
|
32631
|
+
className: "field"
|
|
32632
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32633
|
+
control: control,
|
|
32634
|
+
name: "applicationSelection.categoryType",
|
|
32635
|
+
rules: {
|
|
32636
|
+
required: t("REQUIRED_FIELD")
|
|
32637
|
+
},
|
|
32638
|
+
isMandatory: true,
|
|
32639
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
32640
|
+
className: "form-field",
|
|
32641
|
+
selected: props.value,
|
|
32642
|
+
disable: false,
|
|
32643
|
+
option: dropdownData.categoryTypes,
|
|
32644
|
+
errorStyle: !!getFieldError("applicationSelection.categoryType"),
|
|
32645
|
+
select: props.onChange,
|
|
32646
|
+
optionKey: "name",
|
|
32647
|
+
onBlur: props.onBlur,
|
|
32648
|
+
t: t
|
|
32649
|
+
})
|
|
32650
|
+
}))), getFieldError("applicationSelection.categoryType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError8 = getFieldError("applicationSelection.categoryType")) === null || _getFieldError8 === void 0 ? void 0 : _getFieldError8.message), subCategoryIsDomestic && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32651
|
+
className: "card-label-smaller"
|
|
32652
|
+
}, "Domestic Type"), /*#__PURE__*/React.createElement("div", {
|
|
32653
|
+
className: "field"
|
|
32654
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32655
|
+
control: control,
|
|
32656
|
+
name: "applicationSelection.domesticType",
|
|
32657
|
+
rules: {
|
|
32658
|
+
required: subCategoryIsDomestic ? t("REQUIRED_FIELD") : false
|
|
32659
|
+
},
|
|
32660
|
+
render: props => /*#__PURE__*/React.createElement(RadioButtons, {
|
|
32661
|
+
onSelect: props.onChange,
|
|
32662
|
+
selectedOption: props.value,
|
|
32663
|
+
optionsKey: "name",
|
|
32664
|
+
options: [{
|
|
32665
|
+
code: "INDIVIDUAL",
|
|
32666
|
+
name: "Individual"
|
|
32667
|
+
}, {
|
|
32668
|
+
code: "ORGANIZATION",
|
|
32669
|
+
name: "Organization"
|
|
32670
|
+
}]
|
|
32671
|
+
})
|
|
32672
|
+
}))), subCategoryIsDomestic && getFieldError("applicationSelection.domesticType") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError9 = getFieldError("applicationSelection.domesticType")) === null || _getFieldError9 === void 0 ? void 0 : _getFieldError9.message), subCategoryIsCommercial && /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32411
32673
|
className: "card-label-smaller"
|
|
32412
32674
|
}, "Commercial Type"), /*#__PURE__*/React.createElement("div", {
|
|
32413
32675
|
className: "field"
|
|
@@ -32422,67 +32684,71 @@ const NewApplication = () => {
|
|
|
32422
32684
|
onSelect: props.onChange,
|
|
32423
32685
|
selectedOption: props.value,
|
|
32424
32686
|
options: [{
|
|
32425
|
-
code: "
|
|
32426
|
-
name: "
|
|
32687
|
+
code: "INDIVIDUAL",
|
|
32688
|
+
name: "Individual"
|
|
32427
32689
|
}, {
|
|
32428
|
-
code: "
|
|
32429
|
-
name: "
|
|
32690
|
+
code: "ORGANIZATION",
|
|
32691
|
+
name: "Organization"
|
|
32430
32692
|
}],
|
|
32431
32693
|
optionsKey: "name",
|
|
32432
32694
|
t: t
|
|
32433
32695
|
})
|
|
32434
|
-
}))),
|
|
32435
|
-
|
|
32436
|
-
|
|
32437
|
-
|
|
32438
|
-
|
|
32439
|
-
|
|
32440
|
-
|
|
32441
|
-
|
|
32442
|
-
|
|
32443
|
-
|
|
32444
|
-
|
|
32445
|
-
|
|
32446
|
-
|
|
32447
|
-
|
|
32696
|
+
}))))), /*#__PURE__*/React.createElement(SectionCard, {
|
|
32697
|
+
description: "Enable this section only when the applicant is a Government Connection.",
|
|
32698
|
+
isOpen: collapsedSections.governmentEmployee,
|
|
32699
|
+
onToggle: toggleSection,
|
|
32700
|
+
sectionKey: "governmentEmployee",
|
|
32701
|
+
title: "Government Connection",
|
|
32702
|
+
sectionRef: sectionRefs.governmentEmployee
|
|
32703
|
+
}, /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32704
|
+
label: "Government Connection"
|
|
32705
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32706
|
+
control: control,
|
|
32707
|
+
name: "governmentEmployee.isGovernmentEmployee",
|
|
32708
|
+
render: props => /*#__PURE__*/React.createElement(CheckBox, {
|
|
32709
|
+
checked: !!props.value,
|
|
32710
|
+
label: "Applicant is a Government Connection",
|
|
32711
|
+
onChange: event => props.onChange(event.target.checked)
|
|
32712
|
+
})
|
|
32713
|
+
})), isGovernmentEmployee && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32448
32714
|
className: "card-label-smaller"
|
|
32449
32715
|
}, "Organization Name"), /*#__PURE__*/React.createElement("div", {
|
|
32450
32716
|
className: "field"
|
|
32451
32717
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32452
|
-
name: "
|
|
32718
|
+
name: "governmentEmployee.organizationName",
|
|
32453
32719
|
inputRef: register({
|
|
32454
|
-
required:
|
|
32720
|
+
required: isGovernmentEmployee ? "Organization Name is required" : false
|
|
32455
32721
|
}),
|
|
32456
|
-
errorStyle: !!getFieldError("
|
|
32457
|
-
}))), getFieldError("
|
|
32722
|
+
errorStyle: !!getFieldError("governmentEmployee.organizationName")
|
|
32723
|
+
}))), getFieldError("governmentEmployee.organizationName") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError0 = getFieldError("governmentEmployee.organizationName")) === null || _getFieldError0 === void 0 ? void 0 : _getFieldError0.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32458
32724
|
className: "card-label-smaller"
|
|
32459
32725
|
}, "Nature of Work"), /*#__PURE__*/React.createElement("div", {
|
|
32460
32726
|
className: "field"
|
|
32461
32727
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
32462
|
-
name: "
|
|
32728
|
+
name: "governmentEmployee.natureOfWork",
|
|
32463
32729
|
inputRef: register({
|
|
32464
|
-
required:
|
|
32730
|
+
required: isGovernmentEmployee ? "Nature of Work is required" : false
|
|
32465
32731
|
}),
|
|
32466
|
-
errorStyle: !!getFieldError("
|
|
32467
|
-
}))), getFieldError("
|
|
32732
|
+
errorStyle: !!getFieldError("governmentEmployee.natureOfWork")
|
|
32733
|
+
}))), getFieldError("governmentEmployee.natureOfWork") && /*#__PURE__*/React.createElement(CardLabelError, null, (_getFieldError1 = getFieldError("governmentEmployee.natureOfWork")) === null || _getFieldError1 === void 0 ? void 0 : _getFieldError1.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
32468
32734
|
className: "card-label-smaller"
|
|
32469
32735
|
}, "Upload Document"), /*#__PURE__*/React.createElement("div", {
|
|
32470
32736
|
className: "field"
|
|
32471
32737
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32472
32738
|
control: control,
|
|
32473
|
-
name: "
|
|
32739
|
+
name: "governmentEmployee.organizationDocument",
|
|
32474
32740
|
rules: {
|
|
32475
|
-
required:
|
|
32741
|
+
required: isGovernmentEmployee ? "Document is required" : false
|
|
32476
32742
|
},
|
|
32477
32743
|
render: props => /*#__PURE__*/React.createElement(FileUploadField, {
|
|
32478
|
-
error: getFieldError("
|
|
32744
|
+
error: getFieldError("governmentEmployee.organizationDocument"),
|
|
32479
32745
|
id: "govt-org-doc",
|
|
32480
|
-
isUploading: !!uploadingFields["
|
|
32481
|
-
onDelete: () => clearUploadedFile("
|
|
32482
|
-
onUpload: event => uploadFile(event, "
|
|
32746
|
+
isUploading: !!uploadingFields["governmentEmployee.organizationDocument"],
|
|
32747
|
+
onDelete: () => clearUploadedFile("governmentEmployee.organizationDocument", props.onChange),
|
|
32748
|
+
onUpload: event => uploadFile(event, "governmentEmployee.organizationDocument", props.onChange),
|
|
32483
32749
|
value: props.value
|
|
32484
32750
|
})
|
|
32485
|
-
}))))
|
|
32751
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
32486
32752
|
style: {
|
|
32487
32753
|
display: previewMode ? "none" : "block"
|
|
32488
32754
|
}
|
|
@@ -32491,7 +32757,7 @@ const NewApplication = () => {
|
|
|
32491
32757
|
isOpen: collapsedSections.applicant,
|
|
32492
32758
|
onToggle: toggleSection,
|
|
32493
32759
|
sectionKey: "applicant",
|
|
32494
|
-
title:
|
|
32760
|
+
title: applicantSectionTitle,
|
|
32495
32761
|
sectionRef: sectionRefs.applicant
|
|
32496
32762
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
32497
32763
|
control: control,
|
|
@@ -32500,9 +32766,9 @@ const NewApplication = () => {
|
|
|
32500
32766
|
validate: value => !!value || "Applicant Picture is required."
|
|
32501
32767
|
},
|
|
32502
32768
|
render: props => {
|
|
32503
|
-
var
|
|
32769
|
+
var _getFieldError10;
|
|
32504
32770
|
return /*#__PURE__*/React.createElement(ProfileImageUpload, {
|
|
32505
|
-
error: (
|
|
32771
|
+
error: (_getFieldError10 = getFieldError("applicant.UploadPicture")) === null || _getFieldError10 === void 0 ? void 0 : _getFieldError10.message,
|
|
32506
32772
|
isUploading: !!uploadingFields["applicant.UploadPicture"],
|
|
32507
32773
|
label: "Upload Picture",
|
|
32508
32774
|
onUpload: event => uploadFile(event, "applicant.UploadPicture", props.onChange),
|
|
@@ -32635,7 +32901,7 @@ const NewApplication = () => {
|
|
|
32635
32901
|
isOpen: collapsedSections.employee,
|
|
32636
32902
|
onToggle: toggleSection,
|
|
32637
32903
|
sectionKey: "djbEmployee",
|
|
32638
|
-
title: "
|
|
32904
|
+
title: "DJB Employee",
|
|
32639
32905
|
sectionRef: sectionRefs.djbEmployee
|
|
32640
32906
|
}, /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32641
32907
|
label: "DJB Employee"
|
|
@@ -32782,13 +33048,6 @@ const NewApplication = () => {
|
|
|
32782
33048
|
errorStyle: !!getFieldError("propertyAddress.state"),
|
|
32783
33049
|
inputRef: register(),
|
|
32784
33050
|
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
33051
|
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
32793
33052
|
error: getFieldError("propertyAddress.street"),
|
|
32794
33053
|
label: "Street"
|
|
@@ -33047,6 +33306,14 @@ const NewApplication = () => {
|
|
|
33047
33306
|
select: props.onChange,
|
|
33048
33307
|
t: t
|
|
33049
33308
|
})
|
|
33309
|
+
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
33310
|
+
error: getFieldError("propertyAddress.proofOfIdentity"),
|
|
33311
|
+
label: "Proof of Identity Document",
|
|
33312
|
+
required: true
|
|
33313
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
33314
|
+
errorStyle: !!getFieldError("propertyAddress.proofOfIdentity"),
|
|
33315
|
+
inputRef: register(),
|
|
33316
|
+
name: "propertyAddress.proofOfIdentity"
|
|
33050
33317
|
})), /*#__PURE__*/React.createElement(Controller, {
|
|
33051
33318
|
control: control,
|
|
33052
33319
|
name: "documents.identityProofFile",
|
|
@@ -33064,9 +33331,11 @@ const NewApplication = () => {
|
|
|
33064
33331
|
required: true,
|
|
33065
33332
|
value: props.value
|
|
33066
33333
|
})
|
|
33334
|
+
}), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
33335
|
+
error: getFieldError("propertyAddress.otherDocument")
|
|
33067
33336
|
}), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
33068
33337
|
error: getFieldError("documents.ownershipStatus"),
|
|
33069
|
-
label: "Ownership
|
|
33338
|
+
label: "Ownership Proof",
|
|
33070
33339
|
required: true
|
|
33071
33340
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
33072
33341
|
control: control,
|
|
@@ -33081,6 +33350,14 @@ const NewApplication = () => {
|
|
|
33081
33350
|
select: props.onChange,
|
|
33082
33351
|
t: t
|
|
33083
33352
|
})
|
|
33353
|
+
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
33354
|
+
error: getFieldError("propertyAddress.ownershipStatus"),
|
|
33355
|
+
label: "Proof of Identity Ownership Document",
|
|
33356
|
+
required: true
|
|
33357
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
33358
|
+
errorStyle: !!getFieldError("propertyAddress.ownershipStatus"),
|
|
33359
|
+
inputRef: register(),
|
|
33360
|
+
name: "propertyAddress.ownershipStatus"
|
|
33084
33361
|
})), /*#__PURE__*/React.createElement(Controller, {
|
|
33085
33362
|
control: control,
|
|
33086
33363
|
name: "documents.ownershipDocumentFile",
|
|
@@ -33098,7 +33375,34 @@ const NewApplication = () => {
|
|
|
33098
33375
|
required: true,
|
|
33099
33376
|
value: props.value
|
|
33100
33377
|
})
|
|
33101
|
-
}), /*#__PURE__*/React.createElement(
|
|
33378
|
+
}), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
33379
|
+
error: getFieldError("propertyAddress.otherDocument")
|
|
33380
|
+
}), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
33381
|
+
error: getFieldError("documents.otherDocument"),
|
|
33382
|
+
label: "Other Document",
|
|
33383
|
+
required: true
|
|
33384
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
33385
|
+
control: control,
|
|
33386
|
+
name: "documents.otherDocument",
|
|
33387
|
+
rules: {
|
|
33388
|
+
required: "Other Document is required."
|
|
33389
|
+
},
|
|
33390
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
33391
|
+
option: OWNERSHIP_STATUS_OPTIONS,
|
|
33392
|
+
optionKey: "name",
|
|
33393
|
+
selected: props.value,
|
|
33394
|
+
select: props.onChange,
|
|
33395
|
+
t: t
|
|
33396
|
+
})
|
|
33397
|
+
})), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
33398
|
+
error: getFieldError("propertyAddress.otherDocument"),
|
|
33399
|
+
label: "Other Document",
|
|
33400
|
+
required: true
|
|
33401
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
33402
|
+
errorStyle: !!getFieldError("propertyAddress.otherDocument"),
|
|
33403
|
+
inputRef: register(),
|
|
33404
|
+
name: "propertyAddress.otherDocument"
|
|
33405
|
+
})), /*#__PURE__*/React.createElement(Controller, {
|
|
33102
33406
|
control: control,
|
|
33103
33407
|
name: "documents.otherDocumentFile",
|
|
33104
33408
|
render: props => /*#__PURE__*/React.createElement(FileUploadField, {
|
|
@@ -33111,6 +33415,56 @@ const NewApplication = () => {
|
|
|
33111
33415
|
onUpload: event => uploadFile(event, "documents.otherDocumentFile", props.onChange),
|
|
33112
33416
|
value: props.value
|
|
33113
33417
|
})
|
|
33418
|
+
})), /*#__PURE__*/React.createElement(SectionCard, {
|
|
33419
|
+
description: "Declaration and undertaking to be signed by the applicant.",
|
|
33420
|
+
isOpen: collapsedSections.declaration,
|
|
33421
|
+
onToggle: toggleSection,
|
|
33422
|
+
sectionKey: "declaration",
|
|
33423
|
+
title: "Declaration/Undertaking",
|
|
33424
|
+
sectionRef: sectionRefs.declaration
|
|
33425
|
+
}, DECLARATION_POINTS.map((point, index) => /*#__PURE__*/React.createElement("p", {
|
|
33426
|
+
key: index
|
|
33427
|
+
}, /*#__PURE__*/React.createElement("span", null, String(index + 1), "."), /*#__PURE__*/React.createElement("span", null, point))), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
33428
|
+
error: getFieldError("propertyAddress.otherDocument")
|
|
33429
|
+
}), /*#__PURE__*/React.createElement(FieldBlock, {
|
|
33430
|
+
error: getFieldError("declaration.submittedBy"),
|
|
33431
|
+
label: "Submitted By *",
|
|
33432
|
+
required: true
|
|
33433
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
33434
|
+
control: control,
|
|
33435
|
+
name: "declaration.submittedBy",
|
|
33436
|
+
rules: {
|
|
33437
|
+
required: "Submission type is required."
|
|
33438
|
+
},
|
|
33439
|
+
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
33440
|
+
option: [{
|
|
33441
|
+
code: "SELF",
|
|
33442
|
+
name: "SELF"
|
|
33443
|
+
}, {
|
|
33444
|
+
code: "RELATIVE",
|
|
33445
|
+
name: "Relative"
|
|
33446
|
+
}],
|
|
33447
|
+
optionKey: "name",
|
|
33448
|
+
selected: props.value,
|
|
33449
|
+
select: props.onChange,
|
|
33450
|
+
t: t
|
|
33451
|
+
})
|
|
33452
|
+
})), /*#__PURE__*/React.createElement(Controller, {
|
|
33453
|
+
control: control,
|
|
33454
|
+
name: "declaration.signatureFile",
|
|
33455
|
+
rules: {
|
|
33456
|
+
validate: value => !!value || "Signature upload is required."
|
|
33457
|
+
},
|
|
33458
|
+
render: props => /*#__PURE__*/React.createElement(FileUploadField, {
|
|
33459
|
+
error: getFieldError("declaration.signatureFile"),
|
|
33460
|
+
id: "signature-file",
|
|
33461
|
+
isUploading: !!uploadingFields["declaration.signatureFile"],
|
|
33462
|
+
label: "Upload Signature",
|
|
33463
|
+
onDelete: () => clearUploadedFile("declaration.signatureFile", props.onChange),
|
|
33464
|
+
onUpload: event => uploadFile(event, "declaration.signatureFile", props.onChange),
|
|
33465
|
+
required: true,
|
|
33466
|
+
value: props.value
|
|
33467
|
+
})
|
|
33114
33468
|
})))), previewMode && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionCard, {
|
|
33115
33469
|
description: "Selected request and connection type.",
|
|
33116
33470
|
isOpen: collapsedSections.application,
|
|
@@ -33130,30 +33484,42 @@ const NewApplication = () => {
|
|
|
33130
33484
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33131
33485
|
label: "Connection Type",
|
|
33132
33486
|
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati3 = formValues.applicationSelection) === null || _formValues$applicati3 === void 0 ? void 0 : _formValues$applicati3.connectionType
|
|
33487
|
+
}), (formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati4 = formValues.applicationSelection) === null || _formValues$applicati4 === void 0 ? void 0 : (_formValues$applicati5 = _formValues$applicati4.connectionType) === null || _formValues$applicati5 === void 0 ? void 0 : _formValues$applicati5.code) === "TEMPORARY" && /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33488
|
+
label: "Temporary Connection",
|
|
33489
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati6 = formValues.applicationSelection) === null || _formValues$applicati6 === void 0 ? void 0 : _formValues$applicati6.temporaryConnection
|
|
33490
|
+
}), isTenantOrRelative && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33491
|
+
label: "Owner Authorization",
|
|
33492
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati7 = formValues.applicationSelection) === null || _formValues$applicati7 === void 0 ? void 0 : _formValues$applicati7.ownerAuthorizationDoc
|
|
33133
33493
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33494
|
+
label: "Owner Contact Number",
|
|
33495
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati8 = formValues.applicationSelection) === null || _formValues$applicati8 === void 0 ? void 0 : _formValues$applicati8.ownerContactNumber
|
|
33496
|
+
})), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33134
33497
|
label: "Category Type",
|
|
33135
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33498
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati9 = formValues.applicationSelection) === null || _formValues$applicati9 === void 0 ? void 0 : _formValues$applicati9.categoryType
|
|
33136
33499
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33137
33500
|
label: "Sub Category",
|
|
33138
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33139
|
-
}), (formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33501
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati0 = formValues.applicationSelection) === null || _formValues$applicati0 === void 0 ? void 0 : _formValues$applicati0.subCategory
|
|
33502
|
+
}), (formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati1 = formValues.applicationSelection) === null || _formValues$applicati1 === void 0 ? void 0 : (_formValues$applicati10 = _formValues$applicati1.subCategory) === null || _formValues$applicati10 === void 0 ? void 0 : _formValues$applicati10.code) === "DOMESTIC" && /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33503
|
+
label: "Domestic Type",
|
|
33504
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati11 = formValues.applicationSelection) === null || _formValues$applicati11 === void 0 ? void 0 : _formValues$applicati11.domesticType
|
|
33505
|
+
}), (formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati12 = formValues.applicationSelection) === null || _formValues$applicati12 === void 0 ? void 0 : (_formValues$applicati13 = _formValues$applicati12.subCategory) === null || _formValues$applicati13 === void 0 ? void 0 : _formValues$applicati13.code) === "COMMERCIAL" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33140
33506
|
label: "Commercial Type",
|
|
33141
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33507
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati14 = formValues.applicationSelection) === null || _formValues$applicati14 === void 0 ? void 0 : _formValues$applicati14.commercialType
|
|
33142
33508
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33143
33509
|
label: "Organization Name",
|
|
33144
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33510
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati15 = formValues.applicationSelection) === null || _formValues$applicati15 === void 0 ? void 0 : (_formValues$applicati16 = _formValues$applicati15.govtOrganization) === null || _formValues$applicati16 === void 0 ? void 0 : _formValues$applicati16.organizationName
|
|
33145
33511
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33146
33512
|
label: "Nature of Work",
|
|
33147
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33513
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati17 = formValues.applicationSelection) === null || _formValues$applicati17 === void 0 ? void 0 : (_formValues$applicati18 = _formValues$applicati17.govtOrganization) === null || _formValues$applicati18 === void 0 ? void 0 : _formValues$applicati18.natureOfWork
|
|
33148
33514
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33149
33515
|
label: "Organization Document",
|
|
33150
|
-
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$
|
|
33516
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$applicati19 = formValues.applicationSelection) === null || _formValues$applicati19 === void 0 ? void 0 : (_formValues$applicati20 = _formValues$applicati19.govtOrganization) === null || _formValues$applicati20 === void 0 ? void 0 : _formValues$applicati20.organizationDocument
|
|
33151
33517
|
}))), /*#__PURE__*/React.createElement(SectionCard, {
|
|
33152
33518
|
description: "Applicant identity and organization information.",
|
|
33153
33519
|
isOpen: collapsedSections.applicant,
|
|
33154
33520
|
onToggle: toggleSection,
|
|
33155
33521
|
sectionKey: "applicant",
|
|
33156
|
-
title:
|
|
33522
|
+
title: applicantSectionTitle,
|
|
33157
33523
|
onEditClick: () => handleSectionEdit("applicant")
|
|
33158
33524
|
}, /*#__PURE__*/React.createElement("div", {
|
|
33159
33525
|
style: {
|
|
@@ -33219,9 +33585,9 @@ const NewApplication = () => {
|
|
|
33219
33585
|
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents = formValues.documents) === null || _formValues$documents === void 0 ? void 0 : _formValues$documents.identityProofFile
|
|
33220
33586
|
})), /*#__PURE__*/React.createElement(SectionCard, {
|
|
33221
33587
|
description: "DJB employee-specific information.",
|
|
33222
|
-
isOpen: collapsedSections.
|
|
33588
|
+
isOpen: collapsedSections.djbEmployee,
|
|
33223
33589
|
onToggle: toggleSection,
|
|
33224
|
-
sectionKey: "
|
|
33590
|
+
sectionKey: "djbEmployee",
|
|
33225
33591
|
title: "For DJB Employee",
|
|
33226
33592
|
onEditClick: () => handleSectionEdit("djbEmployee")
|
|
33227
33593
|
}, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
@@ -33237,7 +33603,23 @@ const NewApplication = () => {
|
|
|
33237
33603
|
isFullWidth: true,
|
|
33238
33604
|
label: "Office Name & Address",
|
|
33239
33605
|
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$djbEmploy5 = formValues.djbEmployee) === null || _formValues$djbEmploy5 === void 0 ? void 0 : _formValues$djbEmploy5.officeNameAndAddress
|
|
33240
|
-
})) : null), /*#__PURE__*/React.createElement(SectionCard, {
|
|
33606
|
+
})) : null), (formValues === null || formValues === void 0 ? void 0 : (_formValues$governmen = formValues.governmentEmployee) === null || _formValues$governmen === void 0 ? void 0 : _formValues$governmen.isGovernmentEmployee) && /*#__PURE__*/React.createElement(SectionCard, {
|
|
33607
|
+
description: "Government employee organization details.",
|
|
33608
|
+
isOpen: collapsedSections.governmentEmployee,
|
|
33609
|
+
onToggle: toggleSection,
|
|
33610
|
+
sectionKey: "governmentEmployee",
|
|
33611
|
+
title: "For Government Employee",
|
|
33612
|
+
onEditClick: () => handleSectionEdit("governmentEmployee")
|
|
33613
|
+
}, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33614
|
+
label: "Organization Name",
|
|
33615
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$governmen2 = formValues.governmentEmployee) === null || _formValues$governmen2 === void 0 ? void 0 : _formValues$governmen2.organizationName
|
|
33616
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33617
|
+
label: "Nature of Work",
|
|
33618
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$governmen3 = formValues.governmentEmployee) === null || _formValues$governmen3 === void 0 ? void 0 : _formValues$governmen3.natureOfWork
|
|
33619
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33620
|
+
label: "Organization Document",
|
|
33621
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$governmen4 = formValues.governmentEmployee) === null || _formValues$governmen4 === void 0 ? void 0 : _formValues$governmen4.organizationDocument
|
|
33622
|
+
})), /*#__PURE__*/React.createElement(SectionCard, {
|
|
33241
33623
|
description: "Property address and administrative boundary values.",
|
|
33242
33624
|
isOpen: collapsedSections.address,
|
|
33243
33625
|
onToggle: toggleSection,
|
|
@@ -33350,6 +33732,23 @@ const NewApplication = () => {
|
|
|
33350
33732
|
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33351
33733
|
label: "Other Document",
|
|
33352
33734
|
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$documents6 = formValues.documents) === null || _formValues$documents6 === void 0 ? void 0 : _formValues$documents6.otherDocumentFile
|
|
33735
|
+
})), /*#__PURE__*/React.createElement(SectionCard, {
|
|
33736
|
+
description: "Applicant declaration details.",
|
|
33737
|
+
isOpen: collapsedSections.declaration,
|
|
33738
|
+
onToggle: toggleSection,
|
|
33739
|
+
sectionKey: "declaration",
|
|
33740
|
+
title: "Declaration/Undertaking",
|
|
33741
|
+
onEditClick: () => handleSectionEdit("declaration")
|
|
33742
|
+
}, /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33743
|
+
label: "Submitted By",
|
|
33744
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$declarati = formValues.declaration) === null || _formValues$declarati === void 0 ? void 0 : _formValues$declarati.submittedBy
|
|
33745
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33746
|
+
isFullWidth: true,
|
|
33747
|
+
label: "Signature",
|
|
33748
|
+
value: formValues === null || formValues === void 0 ? void 0 : (_formValues$declarati2 = formValues.declaration) === null || _formValues$declarati2 === void 0 ? void 0 : _formValues$declarati2.signatureFile
|
|
33749
|
+
}), /*#__PURE__*/React.createElement(PreviewItem, {
|
|
33750
|
+
label: "Agreed",
|
|
33751
|
+
value: formValues !== null && formValues !== void 0 && (_formValues$declarati3 = formValues.declaration) !== null && _formValues$declarati3 !== void 0 && _formValues$declarati3.agree ? "Yes" : "No"
|
|
33353
33752
|
}))))), /*#__PURE__*/React.createElement(ActionBar, {
|
|
33354
33753
|
style: actionBarStyle
|
|
33355
33754
|
}, !previewMode ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SubmitBar, {
|