@mseva/digit-ui-module-obps 1.0.34 → 1.0.35
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 +948 -738
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Fragment, useMemo, useState, useEffect, useCallback, useReducer, useRef } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { Link, useLocation, useHistory, useParams, Switch, Route, useRouteMatch, Redirect } from 'react-router-dom';
|
|
4
|
-
import { SearchField, TextInput, MobileNumber, CardLabelError, Dropdown, DatePicker, SubmitBar, Loader, SearchAction, PopUp, Card, DetailsCard, Header, SearchForm, Table, Toast, CloseSvg, KeyNote, TelePhone, DisplayPhotos, CardSectionHeader, CheckPoint, ConnectingCheckPoints, LinkButton, MultiLink,
|
|
4
|
+
import { SearchField, TextInput, MobileNumber, CardLabelError, Dropdown, DatePicker, SubmitBar, Loader, SearchAction, PopUp, Card, DetailsCard, Header, SearchForm, Table, Toast, CloseSvg, KeyNote, TelePhone, DisplayPhotos, CardSectionHeader, CheckPoint, ConnectingCheckPoints, LinkButton, MultiLink, CardLabel, Banner, CardText, ActionBar, FilterFormField, RadioButtons, RemoveableTag, MultiSelectDropdown, CheckBox, CaseIcon, InboxComposer, BackButton, PrivateRoute, BPAHomeIcon, EDCRIcon, BPAIcon, EmployeeModuleCard, CitizenHomeCard, FormStep, UploadFile, TickMark, Label, SearchIconSvg, CardCaption, CardHeader, StatusTable, Row, CitizenInfoLabel, CardSubHeader, SearchIcon, DeleteIcon, RadioOrSelect, PDFSvg as PDFSvg$1, LabelFieldPair, MultiUploadWrapper, LocationSearchCard, Modal, FormComposer, ButtonSelector, TextArea, Menu, OTPInput, BreadCrumb, OBPSIconSolidBg, Close as Close$d, BreakLine, InfoBannerIcon, EditIcon, OBPSIcon } from '@mseva/digit-ui-react-components';
|
|
5
5
|
import { useWatch, useForm, Controller, useFormContext, useFieldArray } from 'react-hook-form';
|
|
6
6
|
import 'react-dom';
|
|
7
7
|
import EXIF from 'exif-js';
|
|
@@ -1505,7 +1505,7 @@ const getapplicationdocstakeholder = initial => {
|
|
|
1505
1505
|
return convertedDoc;
|
|
1506
1506
|
};
|
|
1507
1507
|
const convertToStakeholderObject = data => {
|
|
1508
|
-
var _data$result, _data$result2, _data$result2$License, _data$formData, _data$formData$Licnes, _data$
|
|
1508
|
+
var _data$result, _data$result2, _data$result2$License, _data$formData, _data$formData$Licnes, _data$formData2, _data$formData2$Licne, _data$formData3, _data$formData3$Licne, _data$formData3$Licne2, _data$formData4, _data$formData4$Licne, _data$formData5, _data$formData5$Licne, _data$formData6, _data$formData6$Licne, _data$result3, _data$result3$License, _data$result3$License2, _data$result3$License3, _data$formData7, _data$formData7$Licne, _data$formData7$Licne2, _data$result4, _data$result4$License, _data$result4$License2, _data$result4$License3, _data$result4$License4, _data$result5, _data$result5$License, _data$result5$License2, _data$result5$License3, _data$formData8, _data$formData8$Licne, _data$formData8$Licne2, _data$formData9, _data$formData9$Licne, _data$formData0, _data$formData0$Licne, _data$formData0$Licne2, _data$formData1, _data$formData1$Licne, _data$formData1$Licne2, _data$formData10, _data$formData10$Licn, _data$formData10$Licn2, _data$formData11, _data$formData11$Licn, _data$formData12, _data$formData12$Licn, _data$formData13, _data$formData13$Licn, _data$formData13$Licn2, _data$formData14, _data$formData14$Licn, _data$formData14$Licn2, _data$formData15, _data$formData15$Licn, _data$result6, _data$result6$License, _data$result6$License2, _data$result6$License3, _data$result6$License4;
|
|
1509
1509
|
console.log("dataconvertToStakeholderObject", data);
|
|
1510
1510
|
let formData = {
|
|
1511
1511
|
Licenses: [{
|
|
@@ -1514,26 +1514,26 @@ const convertToStakeholderObject = data => {
|
|
|
1514
1514
|
tradeLicenseDetail: {
|
|
1515
1515
|
...(data === null || data === void 0 ? void 0 : (_data$result2 = data.result) === null || _data$result2 === void 0 ? void 0 : (_data$result2$License = _data$result2.Licenses[0]) === null || _data$result2$License === void 0 ? void 0 : _data$result2$License.tradeLicenseDetail),
|
|
1516
1516
|
additionalDetail: {
|
|
1517
|
-
qualificationType: data === null || data === void 0 ? void 0 : (_data$formData = data.formData) === null || _data$formData === void 0 ? void 0 : (_data$formData$Licnes = _data$formData.LicneseType) === null || _data$formData$Licnes === void 0 ? void 0 : (_data$formData$
|
|
1518
|
-
counsilForArchNo: data === null || data === void 0 ? void 0 : (_data$
|
|
1519
|
-
isSelfCertificationRequired: data === null || data === void 0 ? void 0 : (_data$
|
|
1520
|
-
Ulb: data === null || data === void 0 ? void 0 : (_data$
|
|
1517
|
+
qualificationType: typeof (data === null || data === void 0 ? void 0 : (_data$formData = data.formData) === null || _data$formData === void 0 ? void 0 : (_data$formData$Licnes = _data$formData.LicneseType) === null || _data$formData$Licnes === void 0 ? void 0 : _data$formData$Licnes.qualificationType) === "string" ? data === null || data === void 0 ? void 0 : (_data$formData2 = data.formData) === null || _data$formData2 === void 0 ? void 0 : (_data$formData2$Licne = _data$formData2.LicneseType) === null || _data$formData2$Licne === void 0 ? void 0 : _data$formData2$Licne.qualificationType : data === null || data === void 0 ? void 0 : (_data$formData3 = data.formData) === null || _data$formData3 === void 0 ? void 0 : (_data$formData3$Licne = _data$formData3.LicneseType) === null || _data$formData3$Licne === void 0 ? void 0 : (_data$formData3$Licne2 = _data$formData3$Licne.qualificationType) === null || _data$formData3$Licne2 === void 0 ? void 0 : _data$formData3$Licne2.name,
|
|
1518
|
+
counsilForArchNo: data === null || data === void 0 ? void 0 : (_data$formData4 = data.formData) === null || _data$formData4 === void 0 ? void 0 : (_data$formData4$Licne = _data$formData4.LicneseType) === null || _data$formData4$Licne === void 0 ? void 0 : _data$formData4$Licne.ArchitectNo,
|
|
1519
|
+
isSelfCertificationRequired: data === null || data === void 0 ? void 0 : (_data$formData5 = data.formData) === null || _data$formData5 === void 0 ? void 0 : (_data$formData5$Licne = _data$formData5.LicneseType) === null || _data$formData5$Licne === void 0 ? void 0 : _data$formData5$Licne.selfCertification,
|
|
1520
|
+
Ulb: data === null || data === void 0 ? void 0 : (_data$formData6 = data.formData) === null || _data$formData6 === void 0 ? void 0 : (_data$formData6$Licne = _data$formData6.LicneseDetails) === null || _data$formData6$Licne === void 0 ? void 0 : _data$formData6$Licne.Ulb
|
|
1521
1521
|
},
|
|
1522
1522
|
tradeUnits: [{
|
|
1523
1523
|
...(data === null || data === void 0 ? void 0 : (_data$result3 = data.result) === null || _data$result3 === void 0 ? void 0 : (_data$result3$License = _data$result3.Licenses[0]) === null || _data$result3$License === void 0 ? void 0 : (_data$result3$License2 = _data$result3$License.tradeLicenseDetail) === null || _data$result3$License2 === void 0 ? void 0 : (_data$result3$License3 = _data$result3$License2.tradeUnits) === null || _data$result3$License3 === void 0 ? void 0 : _data$result3$License3[0]),
|
|
1524
|
-
tradeType: data === null || data === void 0 ? void 0 : (_data$
|
|
1524
|
+
tradeType: data === null || data === void 0 ? void 0 : (_data$formData7 = data.formData) === null || _data$formData7 === void 0 ? void 0 : (_data$formData7$Licne = _data$formData7.LicneseType) === null || _data$formData7$Licne === void 0 ? void 0 : (_data$formData7$Licne2 = _data$formData7$Licne.LicenseType) === null || _data$formData7$Licne2 === void 0 ? void 0 : _data$formData7$Licne2.tradeType,
|
|
1525
1525
|
id: data === null || data === void 0 ? void 0 : (_data$result4 = data.result) === null || _data$result4 === void 0 ? void 0 : (_data$result4$License = _data$result4.Licenses[0]) === null || _data$result4$License === void 0 ? void 0 : (_data$result4$License2 = _data$result4$License.tradeLicenseDetail) === null || _data$result4$License2 === void 0 ? void 0 : (_data$result4$License3 = _data$result4$License2.tradeUnits) === null || _data$result4$License3 === void 0 ? void 0 : (_data$result4$License4 = _data$result4$License3[0]) === null || _data$result4$License4 === void 0 ? void 0 : _data$result4$License4.id
|
|
1526
1526
|
}],
|
|
1527
1527
|
owners: [{
|
|
1528
1528
|
...(data === null || data === void 0 ? void 0 : (_data$result5 = data.result) === null || _data$result5 === void 0 ? void 0 : (_data$result5$License = _data$result5.Licenses[0]) === null || _data$result5$License === void 0 ? void 0 : (_data$result5$License2 = _data$result5$License.tradeLicenseDetail) === null || _data$result5$License2 === void 0 ? void 0 : (_data$result5$License3 = _data$result5$License2.owners) === null || _data$result5$License3 === void 0 ? void 0 : _data$result5$License3[0]),
|
|
1529
|
-
gender: data === null || data === void 0 ? void 0 : (_data$
|
|
1530
|
-
mobileNumber: data === null || data === void 0 ? void 0 : (_data$
|
|
1531
|
-
name: data === null || data === void 0 ? void 0 : (_data$
|
|
1529
|
+
gender: data === null || data === void 0 ? void 0 : (_data$formData8 = data.formData) === null || _data$formData8 === void 0 ? void 0 : (_data$formData8$Licne = _data$formData8.LicneseDetails) === null || _data$formData8$Licne === void 0 ? void 0 : (_data$formData8$Licne2 = _data$formData8$Licne.gender) === null || _data$formData8$Licne2 === void 0 ? void 0 : _data$formData8$Licne2.code,
|
|
1530
|
+
mobileNumber: data === null || data === void 0 ? void 0 : (_data$formData9 = data.formData) === null || _data$formData9 === void 0 ? void 0 : (_data$formData9$Licne = _data$formData9.LicneseDetails) === null || _data$formData9$Licne === void 0 ? void 0 : _data$formData9$Licne.mobileNumber,
|
|
1531
|
+
name: [data === null || data === void 0 ? void 0 : (_data$formData0 = data.formData) === null || _data$formData0 === void 0 ? void 0 : (_data$formData0$Licne = _data$formData0.LicneseDetails) === null || _data$formData0$Licne === void 0 ? void 0 : (_data$formData0$Licne2 = _data$formData0$Licne.name) === null || _data$formData0$Licne2 === void 0 ? void 0 : _data$formData0$Licne2.trim(), data === null || data === void 0 ? void 0 : (_data$formData1 = data.formData) === null || _data$formData1 === void 0 ? void 0 : (_data$formData1$Licne = _data$formData1.LicneseDetails) === null || _data$formData1$Licne === void 0 ? void 0 : (_data$formData1$Licne2 = _data$formData1$Licne.middleName) === null || _data$formData1$Licne2 === void 0 ? void 0 : _data$formData1$Licne2.trim(), data === null || data === void 0 ? void 0 : (_data$formData10 = data.formData) === null || _data$formData10 === void 0 ? void 0 : (_data$formData10$Licn = _data$formData10.LicneseDetails) === null || _data$formData10$Licn === void 0 ? void 0 : (_data$formData10$Licn2 = _data$formData10$Licn.lastName) === null || _data$formData10$Licn2 === void 0 ? void 0 : _data$formData10$Licn2.trim()].filter(Boolean).join(" "),
|
|
1532
1532
|
dob: null,
|
|
1533
|
-
emailId: data === null || data === void 0 ? void 0 : (_data$
|
|
1534
|
-
permanentAddress: (data === null || data === void 0 ? void 0 : (_data$
|
|
1533
|
+
emailId: data === null || data === void 0 ? void 0 : (_data$formData11 = data.formData) === null || _data$formData11 === void 0 ? void 0 : (_data$formData11$Licn = _data$formData11.LicneseDetails) === null || _data$formData11$Licn === void 0 ? void 0 : _data$formData11$Licn.email,
|
|
1534
|
+
permanentAddress: (data === null || data === void 0 ? void 0 : (_data$formData12 = data.formData) === null || _data$formData12 === void 0 ? void 0 : (_data$formData12$Licn = _data$formData12.LicneseDetails) === null || _data$formData12$Licn === void 0 ? void 0 : _data$formData12$Licn.PermanentAddress) + " , " + (data === null || data === void 0 ? void 0 : (_data$formData13 = data.formData) === null || _data$formData13 === void 0 ? void 0 : (_data$formData13$Licn = _data$formData13.LicneseDetails) === null || _data$formData13$Licn === void 0 ? void 0 : (_data$formData13$Licn2 = _data$formData13$Licn.SelectedDistrict) === null || _data$formData13$Licn2 === void 0 ? void 0 : _data$formData13$Licn2.name) + " , " + (data === null || data === void 0 ? void 0 : (_data$formData14 = data.formData) === null || _data$formData14 === void 0 ? void 0 : (_data$formData14$Licn = _data$formData14.LicneseDetails) === null || _data$formData14$Licn === void 0 ? void 0 : (_data$formData14$Licn2 = _data$formData14$Licn.SelectedState) === null || _data$formData14$Licn2 === void 0 ? void 0 : _data$formData14$Licn2.name),
|
|
1535
1535
|
correspondenceAddress: data === null || data === void 0 ? void 0 : data.Correspondenceaddress,
|
|
1536
|
-
pan: data === null || data === void 0 ? void 0 : (_data$
|
|
1536
|
+
pan: data === null || data === void 0 ? void 0 : (_data$formData15 = data.formData) === null || _data$formData15 === void 0 ? void 0 : (_data$formData15$Licn = _data$formData15.LicneseDetails) === null || _data$formData15$Licn === void 0 ? void 0 : _data$formData15$Licn.PanNumber,
|
|
1537
1537
|
uuid: data === null || data === void 0 ? void 0 : (_data$result6 = data.result) === null || _data$result6 === void 0 ? void 0 : (_data$result6$License = _data$result6.Licenses[0]) === null || _data$result6$License === void 0 ? void 0 : (_data$result6$License2 = _data$result6$License.tradeLicenseDetail) === null || _data$result6$License2 === void 0 ? void 0 : (_data$result6$License3 = _data$result6$License2.owners) === null || _data$result6$License3 === void 0 ? void 0 : (_data$result6$License4 = _data$result6$License3[0]) === null || _data$result6$License4 === void 0 ? void 0 : _data$result6$License4.uuid
|
|
1538
1538
|
}],
|
|
1539
1539
|
applicationDocuments: getapplicationdocstakeholder(data)
|
|
@@ -1543,14 +1543,17 @@ const convertToStakeholderObject = data => {
|
|
|
1543
1543
|
return formData;
|
|
1544
1544
|
};
|
|
1545
1545
|
const convertDateToEpoch = (dateString, dayStartOrEnd = "dayend") => {
|
|
1546
|
+
console.log("dateString", dateString);
|
|
1546
1547
|
try {
|
|
1547
1548
|
const parts = dateString.match(/(\d{4})-(\d{1,2})-(\d{1,2})/);
|
|
1548
1549
|
const DateObj = new Date(Date.UTC(parts[1], parts[2] - 1, parts[3]));
|
|
1549
1550
|
DateObj.setMinutes(DateObj.getMinutes() + DateObj.getTimezoneOffset());
|
|
1551
|
+
console.log("DateObj", DateObj);
|
|
1550
1552
|
if (dayStartOrEnd === "dayend") {
|
|
1551
1553
|
DateObj.setHours(DateObj.getHours() + 24);
|
|
1552
1554
|
DateObj.setSeconds(DateObj.getSeconds() - 1);
|
|
1553
1555
|
}
|
|
1556
|
+
console.log("DateObj.getTime()", DateObj.getTime());
|
|
1554
1557
|
return DateObj.getTime();
|
|
1555
1558
|
} catch (e) {
|
|
1556
1559
|
return dateString;
|
|
@@ -2677,14 +2680,19 @@ const MyApplication = () => {
|
|
|
2677
2680
|
} = Digit.Hooks.obps.useMDMS(Digit.ULBService.getStateId(), "BPA", ["RiskTypeComputation"]);
|
|
2678
2681
|
console.log(bpaData, "BBBB");
|
|
2679
2682
|
const getBPAREGFormData = data => {
|
|
2680
|
-
var _license$tradeLicense, _license$tradeLicense2, _license$tradeLicense3, _license$tradeLicense4, _license$tradeLicense5, _license$tradeLicense6, _license$tradeLicense7, _license$tradeLicense8, _license$tradeLicense9, _license$tradeLicense0, _license$tradeLicense1, _license$tradeLicense10, _license$tradeLicense11, _license$tradeLicense12, _license$tradeLicense13, _license$tradeLicense14, _license$tradeLicense15, _license$tradeLicense16, _license$tradeLicense17, _license$tradeLicense18, _license$tradeLicense19, _license$tradeLicense20, _license$tradeLicense21, _license$tradeLicense22, _license$tradeLicense23, _license$tradeLicense24, _license$tradeLicense25, _license$tradeLicense26, _license$tradeLicense27, _license$tradeLicense28, _license$tradeLicense29, _license$tradeLicense30, _license$tradeLicense31, _license$tradeLicense32, _license$tradeLicense33, _license$tradeLicense34, _license$tradeLicense35, _license$tradeLicense36, _license$tradeLicense37, _license$tradeLicense38, _license$tradeLicense39, _license$tradeLicense40, _license$tradeLicense41, _license$tradeLicense42, _license$tradeLicense43, _license$tradeLicense44, _license$tradeLicense45, _license$tradeLicense46, _license$tradeLicense47, _license$tradeLicense48, _license$tradeLicense49, _license$tradeLicense50, _license$tradeLicense51, _license$tradeLicense52, _license$tradeLicense53, _license$tradeLicense54, _license$tradeLicense55, _license$tradeLicense56, _license$tradeLicense57, _license$tradeLicense58, _license$tradeLicense59, _license$tradeLicense60, _license$tradeLicense61, _license$tradeLicense62, _license$tradeLicense63, _license$tradeLicense64;
|
|
2683
|
+
var _license$tradeLicense, _license$tradeLicense2, _license$tradeLicense3, _address$split, _address$split2, _address$split3, _address$split4, _address$split5, _address$split6, _address$split7, _address$split7$slice, _address$split7$slice2, _address$split8, _license$tradeLicense4, _license$tradeLicense5, _license$tradeLicense6, _license$tradeLicense7, _license$tradeLicense8, _license$tradeLicense9, _license$tradeLicense0, _license$tradeLicense1, _license$tradeLicense10, _license$tradeLicense11, _license$tradeLicense12, _license$tradeLicense13, _license$tradeLicense14, _license$tradeLicense15, _license$tradeLicense16, _license$tradeLicense17, _license$tradeLicense18, _license$tradeLicense19, _license$tradeLicense20, _license$tradeLicense21, _license$tradeLicense22, _license$tradeLicense23, _license$tradeLicense24, _license$tradeLicense25, _license$tradeLicense26, _license$tradeLicense27, _license$tradeLicense28, _license$tradeLicense29, _license$tradeLicense30, _license$tradeLicense31, _license$tradeLicense32, _license$tradeLicense33, _license$tradeLicense34, _license$tradeLicense35, _license$tradeLicense36, _license$tradeLicense37, _license$tradeLicense38, _license$tradeLicense39, _license$tradeLicense40, _license$tradeLicense41, _license$tradeLicense42, _license$tradeLicense43, _license$tradeLicense44, _license$tradeLicense45, _license$tradeLicense46, _license$tradeLicense47, _license$tradeLicense48, _license$tradeLicense49, _license$tradeLicense50, _license$tradeLicense51, _data$tradeLicenseDet, _data$tradeLicenseDet2, _data$tradeLicenseDet3, _data$tradeLicenseDet4, _data$tradeLicenseDet5, _data$tradeLicenseDet6, _license$tradeLicense52, _license$tradeLicense53, _license$tradeLicense54, _license$tradeLicense55, _license$tradeLicense56, _license$tradeLicense57, _license$tradeLicense58, _license$tradeLicense59, _license$tradeLicense60, _license$tradeLicense61, _license$tradeLicense62, _license$tradeLicense63, _license$tradeLicense64, _license$tradeLicense65, _license$tradeLicense66, _license$tradeLicense67, _license$tradeLicense68, _license$tradeLicense69, _license$tradeLicense70, _license$tradeLicense71, _license$tradeLicense72;
|
|
2684
|
+
console.log("data in getBPAREGFormData", data);
|
|
2681
2685
|
let license = data;
|
|
2686
|
+
const address = license === null || license === void 0 ? void 0 : (_license$tradeLicense = license.tradeLicenseDetail) === null || _license$tradeLicense === void 0 ? void 0 : (_license$tradeLicense2 = _license$tradeLicense.owners) === null || _license$tradeLicense2 === void 0 ? void 0 : (_license$tradeLicense3 = _license$tradeLicense2[0]) === null || _license$tradeLicense3 === void 0 ? void 0 : _license$tradeLicense3.permanentAddress;
|
|
2687
|
+
const state = address === null || address === void 0 ? void 0 : (_address$split = address.split(",")) === null || _address$split === void 0 ? void 0 : (_address$split2 = _address$split[(address === null || address === void 0 ? void 0 : (_address$split3 = address.split(",")) === null || _address$split3 === void 0 ? void 0 : _address$split3.length) - 1]) === null || _address$split2 === void 0 ? void 0 : _address$split2.trim();
|
|
2688
|
+
const distrcit = address === null || address === void 0 ? void 0 : (_address$split4 = address.split(",")) === null || _address$split4 === void 0 ? void 0 : (_address$split5 = _address$split4[(address === null || address === void 0 ? void 0 : (_address$split6 = address.split(",")) === null || _address$split6 === void 0 ? void 0 : _address$split6.length) - 2]) === null || _address$split5 === void 0 ? void 0 : _address$split5.trim();
|
|
2689
|
+
const permanentAddress = address === null || address === void 0 ? void 0 : (_address$split7 = address.split(",")) === null || _address$split7 === void 0 ? void 0 : (_address$split7$slice = _address$split7.slice(0, (address === null || address === void 0 ? void 0 : (_address$split8 = address.split(",")) === null || _address$split8 === void 0 ? void 0 : _address$split8.length) - 2)) === null || _address$split7$slice === void 0 ? void 0 : (_address$split7$slice2 = _address$split7$slice.join(",")) === null || _address$split7$slice2 === void 0 ? void 0 : _address$split7$slice2.trim();
|
|
2682
2690
|
let intermediateData = {
|
|
2683
|
-
Correspondenceaddress: (license === null || license === void 0 ? void 0 : (_license$
|
|
2691
|
+
Correspondenceaddress: (license === null || license === void 0 ? void 0 : (_license$tradeLicense4 = license.tradeLicenseDetail) === null || _license$tradeLicense4 === void 0 ? void 0 : (_license$tradeLicense5 = _license$tradeLicense4.owners) === null || _license$tradeLicense5 === void 0 ? void 0 : (_license$tradeLicense6 = _license$tradeLicense5[0]) === null || _license$tradeLicense6 === void 0 ? void 0 : _license$tradeLicense6.correspondenceAddress) || `${license !== null && license !== void 0 && (_license$tradeLicense7 = license.tradeLicenseDetail) !== null && _license$tradeLicense7 !== void 0 && (_license$tradeLicense8 = _license$tradeLicense7.address) !== null && _license$tradeLicense8 !== void 0 && _license$tradeLicense8.doorNo ? `${license === null || license === void 0 ? void 0 : (_license$tradeLicense9 = license.tradeLicenseDetail) === null || _license$tradeLicense9 === void 0 ? void 0 : (_license$tradeLicense0 = _license$tradeLicense9.address) === null || _license$tradeLicense0 === void 0 ? void 0 : _license$tradeLicense0.doorNo}, ` : ""} ${license !== null && license !== void 0 && (_license$tradeLicense1 = license.tradeLicenseDetail) !== null && _license$tradeLicense1 !== void 0 && (_license$tradeLicense10 = _license$tradeLicense1.address) !== null && _license$tradeLicense10 !== void 0 && _license$tradeLicense10.street ? `${license === null || license === void 0 ? void 0 : (_license$tradeLicense11 = license.tradeLicenseDetail) === null || _license$tradeLicense11 === void 0 ? void 0 : (_license$tradeLicense12 = _license$tradeLicense11.address) === null || _license$tradeLicense12 === void 0 ? void 0 : _license$tradeLicense12.street}, ` : ""}${license !== null && license !== void 0 && (_license$tradeLicense13 = license.tradeLicenseDetail) !== null && _license$tradeLicense13 !== void 0 && (_license$tradeLicense14 = _license$tradeLicense13.address) !== null && _license$tradeLicense14 !== void 0 && _license$tradeLicense14.landmark ? `${license === null || license === void 0 ? void 0 : (_license$tradeLicense15 = license.tradeLicenseDetail) === null || _license$tradeLicense15 === void 0 ? void 0 : (_license$tradeLicense16 = _license$tradeLicense15.address) === null || _license$tradeLicense16 === void 0 ? void 0 : _license$tradeLicense16.landmark}, ` : ""}${t(license === null || license === void 0 ? void 0 : (_license$tradeLicense17 = license.tradeLicenseDetail) === null || _license$tradeLicense17 === void 0 ? void 0 : (_license$tradeLicense18 = _license$tradeLicense17.address) === null || _license$tradeLicense18 === void 0 ? void 0 : _license$tradeLicense18.locality.code)}, ${t(license !== null && license !== void 0 && (_license$tradeLicense19 = license.tradeLicenseDetail) !== null && _license$tradeLicense19 !== void 0 && (_license$tradeLicense20 = _license$tradeLicense19.address) !== null && _license$tradeLicense20 !== void 0 && _license$tradeLicense20.city ? license === null || license === void 0 ? void 0 : (_license$tradeLicense21 = license.tradeLicenseDetail) === null || _license$tradeLicense21 === void 0 ? void 0 : (_license$tradeLicense22 = _license$tradeLicense21.address) === null || _license$tradeLicense22 === void 0 ? void 0 : _license$tradeLicense22.city.code : "")},${t(license === null || license === void 0 ? void 0 : (_license$tradeLicense23 = license.tradeLicenseDetail) === null || _license$tradeLicense23 === void 0 ? void 0 : (_license$tradeLicense24 = _license$tradeLicense23.address) === null || _license$tradeLicense24 === void 0 ? void 0 : _license$tradeLicense24.pincode) ? `${(_license$tradeLicense25 = license.tradeLicenseDetail) === null || _license$tradeLicense25 === void 0 ? void 0 : (_license$tradeLicense26 = _license$tradeLicense25.address) === null || _license$tradeLicense26 === void 0 ? void 0 : _license$tradeLicense26.pincode}` : " "}`,
|
|
2684
2692
|
formData: {
|
|
2685
2693
|
LicneseDetails: {
|
|
2686
|
-
PanNumber: license === null || license === void 0 ? void 0 : (_license$
|
|
2687
|
-
PermanentAddress:
|
|
2694
|
+
PanNumber: license === null || license === void 0 ? void 0 : (_license$tradeLicense27 = license.tradeLicenseDetail) === null || _license$tradeLicense27 === void 0 ? void 0 : (_license$tradeLicense28 = _license$tradeLicense27.owners) === null || _license$tradeLicense28 === void 0 ? void 0 : (_license$tradeLicense29 = _license$tradeLicense28[0]) === null || _license$tradeLicense29 === void 0 ? void 0 : _license$tradeLicense29.pan,
|
|
2695
|
+
PermanentAddress: permanentAddress,
|
|
2688
2696
|
email: license === null || license === void 0 ? void 0 : (_license$tradeLicense30 = license.tradeLicenseDetail) === null || _license$tradeLicense30 === void 0 ? void 0 : (_license$tradeLicense31 = _license$tradeLicense30.owners) === null || _license$tradeLicense31 === void 0 ? void 0 : (_license$tradeLicense32 = _license$tradeLicense31[0]) === null || _license$tradeLicense32 === void 0 ? void 0 : _license$tradeLicense32.emailId,
|
|
2689
2697
|
gender: {
|
|
2690
2698
|
code: license === null || license === void 0 ? void 0 : (_license$tradeLicense33 = license.tradeLicenseDetail) === null || _license$tradeLicense33 === void 0 ? void 0 : (_license$tradeLicense34 = _license$tradeLicense33.owners) === null || _license$tradeLicense34 === void 0 ? void 0 : (_license$tradeLicense35 = _license$tradeLicense34[0]) === null || _license$tradeLicense35 === void 0 ? void 0 : _license$tradeLicense35.gender,
|
|
@@ -2692,18 +2700,25 @@ const MyApplication = () => {
|
|
|
2692
2700
|
value: license === null || license === void 0 ? void 0 : (_license$tradeLicense39 = license.tradeLicenseDetail) === null || _license$tradeLicense39 === void 0 ? void 0 : (_license$tradeLicense40 = _license$tradeLicense39.owners) === null || _license$tradeLicense40 === void 0 ? void 0 : (_license$tradeLicense41 = _license$tradeLicense40[0]) === null || _license$tradeLicense41 === void 0 ? void 0 : _license$tradeLicense41.gender
|
|
2693
2701
|
},
|
|
2694
2702
|
mobileNumber: license === null || license === void 0 ? void 0 : (_license$tradeLicense42 = license.tradeLicenseDetail) === null || _license$tradeLicense42 === void 0 ? void 0 : (_license$tradeLicense43 = _license$tradeLicense42.owners) === null || _license$tradeLicense43 === void 0 ? void 0 : (_license$tradeLicense44 = _license$tradeLicense43[0]) === null || _license$tradeLicense44 === void 0 ? void 0 : _license$tradeLicense44.mobileNumber,
|
|
2695
|
-
name: license === null || license === void 0 ? void 0 : (_license$tradeLicense45 = license.tradeLicenseDetail) === null || _license$tradeLicense45 === void 0 ? void 0 : (_license$tradeLicense46 = _license$tradeLicense45.owners) === null || _license$tradeLicense46 === void 0 ? void 0 : (_license$tradeLicense47 = _license$tradeLicense46[0]) === null || _license$tradeLicense47 === void 0 ? void 0 : _license$tradeLicense47.name
|
|
2703
|
+
name: license === null || license === void 0 ? void 0 : (_license$tradeLicense45 = license.tradeLicenseDetail) === null || _license$tradeLicense45 === void 0 ? void 0 : (_license$tradeLicense46 = _license$tradeLicense45.owners) === null || _license$tradeLicense46 === void 0 ? void 0 : (_license$tradeLicense47 = _license$tradeLicense46[0]) === null || _license$tradeLicense47 === void 0 ? void 0 : _license$tradeLicense47.name,
|
|
2704
|
+
SelectedState: state || "",
|
|
2705
|
+
SelectedDistrict: distrcit || "",
|
|
2706
|
+
pincode: (license === null || license === void 0 ? void 0 : (_license$tradeLicense48 = license.tradeLicenseDetail) === null || _license$tradeLicense48 === void 0 ? void 0 : (_license$tradeLicense49 = _license$tradeLicense48.address) === null || _license$tradeLicense49 === void 0 ? void 0 : _license$tradeLicense49.pincode) || "",
|
|
2707
|
+
Ulb: (license === null || license === void 0 ? void 0 : (_license$tradeLicense50 = license.tradeLicenseDetail) === null || _license$tradeLicense50 === void 0 ? void 0 : (_license$tradeLicense51 = _license$tradeLicense50.additionalDetail) === null || _license$tradeLicense51 === void 0 ? void 0 : _license$tradeLicense51.Ulb) || [],
|
|
2708
|
+
dateOfBirth: data !== null && data !== void 0 && (_data$tradeLicenseDet = data.tradeLicenseDetail) !== null && _data$tradeLicenseDet !== void 0 && (_data$tradeLicenseDet2 = _data$tradeLicenseDet.owners) !== null && _data$tradeLicenseDet2 !== void 0 && (_data$tradeLicenseDet3 = _data$tradeLicenseDet2[0]) !== null && _data$tradeLicenseDet3 !== void 0 && _data$tradeLicenseDet3.dob ? Digit.Utils.date.getDate(data === null || data === void 0 ? void 0 : (_data$tradeLicenseDet4 = data.tradeLicenseDetail) === null || _data$tradeLicenseDet4 === void 0 ? void 0 : (_data$tradeLicenseDet5 = _data$tradeLicenseDet4.owners) === null || _data$tradeLicenseDet5 === void 0 ? void 0 : (_data$tradeLicenseDet6 = _data$tradeLicenseDet5[0]) === null || _data$tradeLicenseDet6 === void 0 ? void 0 : _data$tradeLicenseDet6.dob) || null : null
|
|
2696
2709
|
},
|
|
2697
2710
|
LicneseType: {
|
|
2698
2711
|
LicenseType: {
|
|
2699
|
-
i18nKey: `TRADELICENSE_TRADETYPE_${license === null || license === void 0 ? void 0 : (_license$
|
|
2700
|
-
role: [`BPA_${license === null || license === void 0 ? void 0 : (_license$
|
|
2701
|
-
tradeType: license === null || license === void 0 ? void 0 : (_license$
|
|
2712
|
+
i18nKey: `TRADELICENSE_TRADETYPE_${license === null || license === void 0 ? void 0 : (_license$tradeLicense52 = license.tradeLicenseDetail) === null || _license$tradeLicense52 === void 0 ? void 0 : (_license$tradeLicense53 = _license$tradeLicense52.tradeUnits) === null || _license$tradeLicense53 === void 0 ? void 0 : (_license$tradeLicense54 = _license$tradeLicense53[0]) === null || _license$tradeLicense54 === void 0 ? void 0 : _license$tradeLicense54.tradeType.split(".")[0]}`,
|
|
2713
|
+
role: [`BPA_${license === null || license === void 0 ? void 0 : (_license$tradeLicense55 = license.tradeLicenseDetail) === null || _license$tradeLicense55 === void 0 ? void 0 : (_license$tradeLicense56 = _license$tradeLicense55.tradeUnits) === null || _license$tradeLicense56 === void 0 ? void 0 : (_license$tradeLicense57 = _license$tradeLicense56[0]) === null || _license$tradeLicense57 === void 0 ? void 0 : _license$tradeLicense57.tradeType.split(".")[0]}`],
|
|
2714
|
+
tradeType: license === null || license === void 0 ? void 0 : (_license$tradeLicense58 = license.tradeLicenseDetail) === null || _license$tradeLicense58 === void 0 ? void 0 : (_license$tradeLicense59 = _license$tradeLicense58.tradeUnits) === null || _license$tradeLicense59 === void 0 ? void 0 : (_license$tradeLicense60 = _license$tradeLicense59[0]) === null || _license$tradeLicense60 === void 0 ? void 0 : _license$tradeLicense60.tradeType
|
|
2702
2715
|
},
|
|
2703
|
-
ArchitectNo: (license === null || license === void 0 ? void 0 : (_license$
|
|
2716
|
+
ArchitectNo: (license === null || license === void 0 ? void 0 : (_license$tradeLicense61 = license.tradeLicenseDetail) === null || _license$tradeLicense61 === void 0 ? void 0 : (_license$tradeLicense62 = _license$tradeLicense61.additionalDetail) === null || _license$tradeLicense62 === void 0 ? void 0 : _license$tradeLicense62.counsilForArchNo) || null,
|
|
2717
|
+
selfCertification: (license === null || license === void 0 ? void 0 : (_license$tradeLicense63 = license.tradeLicenseDetail) === null || _license$tradeLicense63 === void 0 ? void 0 : (_license$tradeLicense64 = _license$tradeLicense63.additionalDetail) === null || _license$tradeLicense64 === void 0 ? void 0 : _license$tradeLicense64.isSelfCertificationRequired) || false,
|
|
2718
|
+
qualificationType: (license === null || license === void 0 ? void 0 : (_license$tradeLicense65 = license.tradeLicenseDetail) === null || _license$tradeLicense65 === void 0 ? void 0 : (_license$tradeLicense66 = _license$tradeLicense65.additionalDetail) === null || _license$tradeLicense66 === void 0 ? void 0 : _license$tradeLicense66.qualificationType) || null
|
|
2704
2719
|
}
|
|
2705
2720
|
},
|
|
2706
|
-
isAddressSame: (license === null || license === void 0 ? void 0 : (_license$
|
|
2721
|
+
isAddressSame: (license === null || license === void 0 ? void 0 : (_license$tradeLicense67 = license.tradeLicenseDetail) === null || _license$tradeLicense67 === void 0 ? void 0 : (_license$tradeLicense68 = _license$tradeLicense67.owners) === null || _license$tradeLicense68 === void 0 ? void 0 : (_license$tradeLicense69 = _license$tradeLicense68[0]) === null || _license$tradeLicense69 === void 0 ? void 0 : _license$tradeLicense69.correspondenceAddress) === (license === null || license === void 0 ? void 0 : (_license$tradeLicense70 = license.tradeLicenseDetail) === null || _license$tradeLicense70 === void 0 ? void 0 : (_license$tradeLicense71 = _license$tradeLicense70.owners) === null || _license$tradeLicense71 === void 0 ? void 0 : (_license$tradeLicense72 = _license$tradeLicense71[0]) === null || _license$tradeLicense72 === void 0 ? void 0 : _license$tradeLicense72.permanentAddress) ? true : false,
|
|
2707
2722
|
result: {
|
|
2708
2723
|
Licenses: [{
|
|
2709
2724
|
...data
|
|
@@ -3053,8 +3068,128 @@ const ApplicationTimeline = ({
|
|
|
3053
3068
|
})), data && showNextActions(data === null || data === void 0 ? void 0 : (_data$nextActions = data.nextActions) === null || _data$nextActions === void 0 ? void 0 : _data$nextActions[0]));
|
|
3054
3069
|
};
|
|
3055
3070
|
|
|
3071
|
+
const getAcknowledgementData = async (application, tenantInfo, t) => {
|
|
3072
|
+
var _application$applicat, _application$applicat2, _application$applicat3, _application$applicat4, _application$applicat5, _application$applicat6, _application$applicat7, _application$applicat8, _application$applicat9, _application$applicat0, _application$applicat1, _application$applicat10, _application$applicat11, _application$applicat12, _application$applicat13, _application$applicat14, _application$applicat15, _application$applicat16, _application$applicat17, _application$applicat18, _application$applicat19, _application$applicat20, _application$applicat21, _application$applicat22, _application$applicat23, _application$applicat24, _application$applicat25, _application$applicat26, _application$applicat27, _application$applicat28, _application$applicat29, _application$applicat30, _application$applicat31, _application$applicat32, _application$applicat33, _application$applicat34, _application$applicat35, _application$applicat36, _application$applicat37, _application$applicat38, _application$applicat39, _application$applicat40, _application$applicat41, _application$applicat42, _application$applicat43, _application$applicat44, _application$applicat45, _application$applicat46, _application$applicat47, _application$applicat48, _application$applicat49, _application$applicat50, _application$applicat51, _application$applicat52, _application$applicat53, _application$applicat54;
|
|
3073
|
+
console.log("application in getAcknowledgement", application);
|
|
3074
|
+
const details = [];
|
|
3075
|
+
details.push({
|
|
3076
|
+
title: t("CS_APPLICATION_DETAILS"),
|
|
3077
|
+
values: [{
|
|
3078
|
+
title: t("CS_APPLICATION_NUMBER"),
|
|
3079
|
+
value: (application === null || application === void 0 ? void 0 : (_application$applicat = application.applicationData) === null || _application$applicat === void 0 ? void 0 : _application$applicat.applicationNumber) || "NA"
|
|
3080
|
+
}, {
|
|
3081
|
+
title: t("REGISTRATION_FILED_DATE"),
|
|
3082
|
+
value: Digit.DateUtils.ConvertTimestampToDate(application === null || application === void 0 ? void 0 : (_application$applicat2 = application.applicationData) === null || _application$applicat2 === void 0 ? void 0 : (_application$applicat3 = _application$applicat2.auditDetails) === null || _application$applicat3 === void 0 ? void 0 : _application$applicat3.createdTime, "dd/MM/yyyy") || "NA"
|
|
3083
|
+
}]
|
|
3084
|
+
});
|
|
3085
|
+
details.push({
|
|
3086
|
+
title: t("BPA_LICENSE_DETAILS_LABEL"),
|
|
3087
|
+
values: [{
|
|
3088
|
+
title: t("BPA_LICENSE_TYPE"),
|
|
3089
|
+
value: t(`${application === null || application === void 0 ? void 0 : (_application$applicat4 = application.applicationDetails) === null || _application$applicat4 === void 0 ? void 0 : (_application$applicat5 = _application$applicat4[1]) === null || _application$applicat5 === void 0 ? void 0 : (_application$applicat6 = _application$applicat5.values) === null || _application$applicat6 === void 0 ? void 0 : (_application$applicat7 = _application$applicat6[0]) === null || _application$applicat7 === void 0 ? void 0 : _application$applicat7.value}`) || "NA"
|
|
3090
|
+
}, {
|
|
3091
|
+
title: t("BPA_COUNCIL_NUMBER"),
|
|
3092
|
+
value: (application === null || application === void 0 ? void 0 : (_application$applicat8 = application.applicationDetails) === null || _application$applicat8 === void 0 ? void 0 : (_application$applicat9 = _application$applicat8[1]) === null || _application$applicat9 === void 0 ? void 0 : (_application$applicat0 = _application$applicat9.values) === null || _application$applicat0 === void 0 ? void 0 : (_application$applicat1 = _application$applicat0[1]) === null || _application$applicat1 === void 0 ? void 0 : _application$applicat1.value) || "NA"
|
|
3093
|
+
}]
|
|
3094
|
+
});
|
|
3095
|
+
details.push({
|
|
3096
|
+
title: t("BPA_LICENSEE_DETAILS_HEADER_OWNER_INFO"),
|
|
3097
|
+
values: [{
|
|
3098
|
+
title: t("BPA_APPLICANT_NAME_LABEL"),
|
|
3099
|
+
value: (application === null || application === void 0 ? void 0 : (_application$applicat10 = application.applicationData) === null || _application$applicat10 === void 0 ? void 0 : (_application$applicat11 = _application$applicat10.tradeLicenseDetail) === null || _application$applicat11 === void 0 ? void 0 : (_application$applicat12 = _application$applicat11.owners) === null || _application$applicat12 === void 0 ? void 0 : (_application$applicat13 = _application$applicat12[0]) === null || _application$applicat13 === void 0 ? void 0 : _application$applicat13.name) || "NA"
|
|
3100
|
+
}, {
|
|
3101
|
+
title: t("BPA_OWNER_MOBILE_NO_LABEL"),
|
|
3102
|
+
value: (application === null || application === void 0 ? void 0 : (_application$applicat14 = application.applicationData) === null || _application$applicat14 === void 0 ? void 0 : (_application$applicat15 = _application$applicat14.tradeLicenseDetail) === null || _application$applicat15 === void 0 ? void 0 : (_application$applicat16 = _application$applicat15.owners) === null || _application$applicat16 === void 0 ? void 0 : (_application$applicat17 = _application$applicat16[0]) === null || _application$applicat17 === void 0 ? void 0 : _application$applicat17.mobileNumber) || "NA"
|
|
3103
|
+
}, {
|
|
3104
|
+
title: t("BPA_APPLICANT_GENDER_LABEL"),
|
|
3105
|
+
value: (application === null || application === void 0 ? void 0 : (_application$applicat18 = application.applicationDetails) === null || _application$applicat18 === void 0 ? void 0 : (_application$applicat19 = _application$applicat18[2]) === null || _application$applicat19 === void 0 ? void 0 : (_application$applicat20 = _application$applicat19.values) === null || _application$applicat20 === void 0 ? void 0 : (_application$applicat21 = _application$applicat20[1]) === null || _application$applicat21 === void 0 ? void 0 : _application$applicat21.value) || "NA"
|
|
3106
|
+
}, {
|
|
3107
|
+
title: t("BPA_APPLICANT_EMAIL_LABEL"),
|
|
3108
|
+
value: (application === null || application === void 0 ? void 0 : (_application$applicat22 = application.applicationDetails) === null || _application$applicat22 === void 0 ? void 0 : (_application$applicat23 = _application$applicat22[2]) === null || _application$applicat23 === void 0 ? void 0 : (_application$applicat24 = _application$applicat23.values) === null || _application$applicat24 === void 0 ? void 0 : (_application$applicat25 = _application$applicat24[3]) === null || _application$applicat25 === void 0 ? void 0 : _application$applicat25.value) || "NA"
|
|
3109
|
+
}, {
|
|
3110
|
+
title: t("BPA_APPLICANT_ULB_LIST"),
|
|
3111
|
+
value: (application === null || application === void 0 ? void 0 : (_application$applicat26 = application.applicationData) === null || _application$applicat26 === void 0 ? void 0 : (_application$applicat27 = _application$applicat26.tradeLicenseDetail) === null || _application$applicat27 === void 0 ? void 0 : (_application$applicat28 = _application$applicat27.additionalDetail) === null || _application$applicat28 === void 0 ? void 0 : _application$applicat28.qualificationType) === "B-Arch" ? t("ALL_ULBS") : (application === null || application === void 0 ? void 0 : (_application$applicat29 = application.applicationData) === null || _application$applicat29 === void 0 ? void 0 : (_application$applicat30 = _application$applicat29.tradeLicenseDetail) === null || _application$applicat30 === void 0 ? void 0 : (_application$applicat31 = _application$applicat30.additionalDetail) === null || _application$applicat31 === void 0 ? void 0 : (_application$applicat32 = _application$applicat31.Ulb) === null || _application$applicat32 === void 0 ? void 0 : (_application$applicat33 = _application$applicat32.map(ulb => t(ulb === null || ulb === void 0 ? void 0 : ulb.ulbname))) === null || _application$applicat33 === void 0 ? void 0 : _application$applicat33.join(', ')) ?? "N/A"
|
|
3112
|
+
}]
|
|
3113
|
+
});
|
|
3114
|
+
details.push({
|
|
3115
|
+
title: t("BPA_NEW_ADDRESS_HEADER_DETAILS"),
|
|
3116
|
+
values: [{
|
|
3117
|
+
title: t("BPA_PERMANANT_ADDRESS_LABEL"),
|
|
3118
|
+
value: (application === null || application === void 0 ? void 0 : (_application$applicat34 = application.applicationDetails) === null || _application$applicat34 === void 0 ? void 0 : (_application$applicat35 = _application$applicat34[3]) === null || _application$applicat35 === void 0 ? void 0 : (_application$applicat36 = _application$applicat35.values) === null || _application$applicat36 === void 0 ? void 0 : (_application$applicat37 = _application$applicat36[0]) === null || _application$applicat37 === void 0 ? void 0 : _application$applicat37.value) || "NA"
|
|
3119
|
+
}, {
|
|
3120
|
+
title: t("BPA_APPLICANT_CORRESPONDENCE_ADDRESS_LABEL"),
|
|
3121
|
+
value: (application === null || application === void 0 ? void 0 : (_application$applicat38 = application.applicationDetails) === null || _application$applicat38 === void 0 ? void 0 : (_application$applicat39 = _application$applicat38[4]) === null || _application$applicat39 === void 0 ? void 0 : (_application$applicat40 = _application$applicat39.values) === null || _application$applicat40 === void 0 ? void 0 : (_application$applicat41 = _application$applicat40[0]) === null || _application$applicat41 === void 0 ? void 0 : _application$applicat41.value) || "NA"
|
|
3122
|
+
}]
|
|
3123
|
+
});
|
|
3124
|
+
const documents = application === null || application === void 0 ? void 0 : (_application$applicat42 = application.applicationDetails) === null || _application$applicat42 === void 0 ? void 0 : (_application$applicat43 = _application$applicat42.find(detail => detail.title === "BPA_DOCUMENT_DETAILS_LABEL")) === null || _application$applicat43 === void 0 ? void 0 : (_application$applicat44 = _application$applicat43.additionalDetails) === null || _application$applicat44 === void 0 ? void 0 : (_application$applicat45 = _application$applicat44.documentsWithUrl) === null || _application$applicat45 === void 0 ? void 0 : (_application$applicat46 = _application$applicat45[0]) === null || _application$applicat46 === void 0 ? void 0 : _application$applicat46.values;
|
|
3125
|
+
const docDetails = documents === null || documents === void 0 ? void 0 : documents.map((doc, index) => ({
|
|
3126
|
+
title: `${index + 1}`,
|
|
3127
|
+
value: t(`DOC_${doc.documentType}`) || "NA",
|
|
3128
|
+
link: doc.fileStoreId ? Digit.Utils.getFileUrl(doc.fileStoreId) : ""
|
|
3129
|
+
}));
|
|
3130
|
+
details.push({
|
|
3131
|
+
title: t("BPA_APPLICATION_DOCUMENTS"),
|
|
3132
|
+
values: docDetails !== null && docDetails !== void 0 && docDetails.length ? docDetails : [{
|
|
3133
|
+
title: t("CS_NO_DOCUMENTS_UPLOADED"),
|
|
3134
|
+
value: "NA"
|
|
3135
|
+
}]
|
|
3136
|
+
});
|
|
3137
|
+
const imageURL = (application === null || application === void 0 ? void 0 : (_application$applicat47 = application.applicationDetails) === null || _application$applicat47 === void 0 ? void 0 : (_application$applicat48 = _application$applicat47.find(detail => detail.title === "BPA_DOCUMENT_DETAILS_LABEL")) === null || _application$applicat48 === void 0 ? void 0 : (_application$applicat49 = _application$applicat48.additionalDetails) === null || _application$applicat49 === void 0 ? void 0 : (_application$applicat50 = _application$applicat49.documentsWithUrl) === null || _application$applicat50 === void 0 ? void 0 : (_application$applicat51 = _application$applicat50[0]) === null || _application$applicat51 === void 0 ? void 0 : (_application$applicat52 = _application$applicat51.values) === null || _application$applicat52 === void 0 ? void 0 : (_application$applicat53 = _application$applicat52.find(doc => (doc === null || doc === void 0 ? void 0 : doc.documentType) === "APPL.BPAREG_PASS_PORT_SIZE_PHOTO")) === null || _application$applicat53 === void 0 ? void 0 : _application$applicat53.url) || null;
|
|
3138
|
+
return {
|
|
3139
|
+
t: t,
|
|
3140
|
+
tenantId: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code,
|
|
3141
|
+
name: t("BPA_ACKNOWLEDGEMENT_TITLE"),
|
|
3142
|
+
email: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.emailId,
|
|
3143
|
+
phoneNumber: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.contactNumber,
|
|
3144
|
+
heading: t("LOCAL_GOVERNMENT_PUNJAB"),
|
|
3145
|
+
applicationNumber: (application === null || application === void 0 ? void 0 : (_application$applicat54 = application.applicationData) === null || _application$applicat54 === void 0 ? void 0 : _application$applicat54.applicationNumber) || "NA",
|
|
3146
|
+
details,
|
|
3147
|
+
imageURL
|
|
3148
|
+
};
|
|
3149
|
+
};
|
|
3150
|
+
|
|
3151
|
+
const DownloadCertificateButton = ({
|
|
3152
|
+
applicationNumber
|
|
3153
|
+
}) => {
|
|
3154
|
+
var _window, _window$localStorage;
|
|
3155
|
+
const {
|
|
3156
|
+
t
|
|
3157
|
+
} = useTranslation();
|
|
3158
|
+
const tenantId = (_window = window) === null || _window === void 0 ? void 0 : (_window$localStorage = _window.localStorage) === null || _window$localStorage === void 0 ? void 0 : _window$localStorage.getItem("CITIZEN.CITY");
|
|
3159
|
+
const {
|
|
3160
|
+
data: storeData
|
|
3161
|
+
} = Digit.Hooks.useStore.getInitData();
|
|
3162
|
+
const {
|
|
3163
|
+
tenants
|
|
3164
|
+
} = storeData || {};
|
|
3165
|
+
const {
|
|
3166
|
+
data: applicationDetails
|
|
3167
|
+
} = Digit.Hooks.obps.useLicenseDetails(tenantId, {
|
|
3168
|
+
applicationNumber,
|
|
3169
|
+
tenantId
|
|
3170
|
+
}, {});
|
|
3171
|
+
const handleDownloadPdf = async () => {
|
|
3172
|
+
try {
|
|
3173
|
+
var _Property$Licenses, _Property$Licenses$, _Digit$SessionStorage, _Digit$SessionStorage2, _Digit$SessionStorage3, _Digit$SessionStorage4;
|
|
3174
|
+
const Property = applicationDetails;
|
|
3175
|
+
if (!Property) return;
|
|
3176
|
+
const propertyTenantId = (Property === null || Property === void 0 ? void 0 : Property.tenantId) || (Property === null || Property === void 0 ? void 0 : (_Property$Licenses = Property.Licenses) === null || _Property$Licenses === void 0 ? void 0 : (_Property$Licenses$ = _Property$Licenses[0]) === null || _Property$Licenses$ === void 0 ? void 0 : _Property$Licenses$.tenantId) || ((_Digit$SessionStorage = Digit.SessionStorage.get("Digit.BUILDING_PERMIT")) === null || _Digit$SessionStorage === void 0 ? void 0 : (_Digit$SessionStorage2 = _Digit$SessionStorage.result) === null || _Digit$SessionStorage2 === void 0 ? void 0 : (_Digit$SessionStorage3 = _Digit$SessionStorage2.Licenses) === null || _Digit$SessionStorage3 === void 0 ? void 0 : (_Digit$SessionStorage4 = _Digit$SessionStorage3[0]) === null || _Digit$SessionStorage4 === void 0 ? void 0 : _Digit$SessionStorage4.tenantId);
|
|
3177
|
+
if (!propertyTenantId) return;
|
|
3178
|
+
const tenantInfo = tenants === null || tenants === void 0 ? void 0 : tenants.find(tenant => tenant.code === propertyTenantId);
|
|
3179
|
+
if (!tenantInfo) return;
|
|
3180
|
+
const acknowledgementData = await getAcknowledgementData(Property, tenantInfo, t);
|
|
3181
|
+
Digit.Utils.pdf.generateBPAREG(acknowledgementData);
|
|
3182
|
+
} catch (err) {
|
|
3183
|
+
console.error("Error generating acknowledgement PDF", err);
|
|
3184
|
+
}
|
|
3185
|
+
};
|
|
3186
|
+
return !applicationDetails ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(SubmitBar, {
|
|
3187
|
+
label: t("CS_COMMON_DOWNLOAD_Certificate"),
|
|
3188
|
+
onSubmit: handleDownloadPdf
|
|
3189
|
+
});
|
|
3190
|
+
};
|
|
3056
3191
|
const ApplicationDetails = () => {
|
|
3057
|
-
var _LicenseData$Licenses, _License$tradeLicense7, _License$tradeLicense8,
|
|
3192
|
+
var _LicenseData$Licenses, _reciept_data$Payment6, _License$tradeLicense5, _License$tradeLicense6, _License$tradeLicense7, _License$tradeLicense8, _License$tradeLicense9, _License$tradeLicense0, _License$tradeLicense1, _License$tradeLicense10, _License$tradeLicense11, _License$tradeLicense12, _License$tradeLicense13, _License$tradeLicense14, _License$tradeLicense15, _License$tradeLicense16, _License$tradeLicense17, _License$tradeLicense18, _License$tradeLicense19, _License$tradeLicense20, _License$tradeLicense21, _License$tradeLicense22, _License$tradeLicense23, _License$tradeLicense24, _License$tradeLicense25, _License$tradeLicense26, _License$tradeLicense27, _License$tradeLicense28, _License$tradeLicense29, _License$tradeLicense30, _License$tradeLicense31, _License$tradeLicense32, _License$tradeLicense33;
|
|
3058
3193
|
const {
|
|
3059
3194
|
id
|
|
3060
3195
|
} = useParams();
|
|
@@ -3079,14 +3214,13 @@ const ApplicationDetails = () => {
|
|
|
3079
3214
|
} = Digit.Hooks.obps.useBPAREGSearch(tenantId, {}, params);
|
|
3080
3215
|
let License = LicenseData === null || LicenseData === void 0 ? void 0 : (_LicenseData$Licenses = LicenseData.Licenses) === null || _LicenseData$Licenses === void 0 ? void 0 : _LicenseData$Licenses[0];
|
|
3081
3216
|
const {
|
|
3082
|
-
data: mdmsRes
|
|
3083
|
-
isLoading: mdmsResIsLoading
|
|
3217
|
+
data: mdmsRes
|
|
3084
3218
|
} = Digit.Hooks.obps.useMDMS(stateCode, "StakeholderRegistraition", "TradeTypetoRoleMapping");
|
|
3085
3219
|
const {
|
|
3086
3220
|
data: reciept_data,
|
|
3087
3221
|
isLoading: recieptDataLoading
|
|
3088
3222
|
} = Digit.Hooks.useRecieptSearch({
|
|
3089
|
-
tenantId
|
|
3223
|
+
tenantId,
|
|
3090
3224
|
businessService: "BPAREG",
|
|
3091
3225
|
consumerCodes: id,
|
|
3092
3226
|
isEmployee: false
|
|
@@ -3102,7 +3236,7 @@ const ApplicationDetails = () => {
|
|
|
3102
3236
|
}, [License]);
|
|
3103
3237
|
useEffect(() => {
|
|
3104
3238
|
if (License) {
|
|
3105
|
-
var _reciept_data$Payment
|
|
3239
|
+
var _reciept_data$Payment;
|
|
3106
3240
|
if ((reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments) === null || _reciept_data$Payment === void 0 ? void 0 : _reciept_data$Payment.length) > 0) {
|
|
3107
3241
|
setDowloadOptions([{
|
|
3108
3242
|
label: t("TL_RECEIPT"),
|
|
@@ -3112,166 +3246,173 @@ const ApplicationDetails = () => {
|
|
|
3112
3246
|
}
|
|
3113
3247
|
}]);
|
|
3114
3248
|
}
|
|
3115
|
-
const fileStoresIds = License === null || License === void 0 ? void 0 : (_License$tradeLicense5 = License.tradeLicenseDetail) === null || _License$tradeLicense5 === void 0 ? void 0 : (_License$tradeLicense6 = _License$tradeLicense5.applicationDocuments) === null || _License$tradeLicense6 === void 0 ? void 0 : _License$tradeLicense6.map(document => document === null || document === void 0 ? void 0 : document.fileStoreId);
|
|
3116
3249
|
}
|
|
3117
3250
|
}, [License, reciept_data]);
|
|
3118
|
-
if (License !== null && License !== void 0 && (_License$tradeLicense7 = License.tradeLicenseDetail) !== null && _License$tradeLicense7 !== void 0 && (_License$tradeLicense8 = _License$tradeLicense7.applicationDocuments) !== null && _License$tradeLicense8 !== void 0 && _License$tradeLicense8.length && (mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$StakeholderR = mdmsRes.StakeholderRegistraition) === null || _mdmsRes$StakeholderR === void 0 ? void 0 : (_mdmsRes$StakeholderR2 = _mdmsRes$StakeholderR.TradeTypetoRoleMapping) === null || _mdmsRes$StakeholderR2 === void 0 ? void 0 : _mdmsRes$StakeholderR2.length) > 0) {
|
|
3119
|
-
var _mdmsRes$StakeholderR3, _mdmsRes$StakeholderR4;
|
|
3120
|
-
mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$StakeholderR3 = mdmsRes.StakeholderRegistraition) === null || _mdmsRes$StakeholderR3 === void 0 ? void 0 : (_mdmsRes$StakeholderR4 = _mdmsRes$StakeholderR3.TradeTypetoRoleMapping) === null || _mdmsRes$StakeholderR4 === void 0 ? void 0 : _mdmsRes$StakeholderR4.map(doc => {
|
|
3121
|
-
var _doc$docTypes, _License$tradeLicense9, _License$tradeLicense0, _License$tradeLicense1;
|
|
3122
|
-
if ((doc === null || doc === void 0 ? void 0 : (_doc$docTypes = doc.docTypes) === null || _doc$docTypes === void 0 ? void 0 : _doc$docTypes.length) > 0 && (doc === null || doc === void 0 ? void 0 : doc.tradeType) == (License === null || License === void 0 ? void 0 : (_License$tradeLicense9 = License.tradeLicenseDetail) === null || _License$tradeLicense9 === void 0 ? void 0 : (_License$tradeLicense0 = _License$tradeLicense9.tradeUnits) === null || _License$tradeLicense0 === void 0 ? void 0 : (_License$tradeLicense1 = _License$tradeLicense0[0]) === null || _License$tradeLicense1 === void 0 ? void 0 : _License$tradeLicense1.tradeType)) {
|
|
3123
|
-
var _doc$docTypes2;
|
|
3124
|
-
doc === null || doc === void 0 ? void 0 : (_doc$docTypes2 = doc.docTypes) === null || _doc$docTypes2 === void 0 ? void 0 : _doc$docTypes2.map(docType => {
|
|
3125
|
-
var _License$tradeLicense10, _License$tradeLicense11;
|
|
3126
|
-
License === null || License === void 0 ? void 0 : (_License$tradeLicense10 = License.tradeLicenseDetail) === null || _License$tradeLicense10 === void 0 ? void 0 : (_License$tradeLicense11 = _License$tradeLicense10.applicationDocuments) === null || _License$tradeLicense11 === void 0 ? void 0 : _License$tradeLicense11.forEach(document => {
|
|
3127
|
-
if ((docType === null || docType === void 0 ? void 0 : docType.code) == (document === null || document === void 0 ? void 0 : document.documentType) && docType !== null && docType !== void 0 && docType.info) document.info = docType === null || docType === void 0 ? void 0 : docType.info;
|
|
3128
|
-
});
|
|
3129
|
-
});
|
|
3130
|
-
}
|
|
3131
|
-
});
|
|
3132
|
-
}
|
|
3133
3251
|
const handleViewTimeline = () => {
|
|
3134
3252
|
setViewTimeline(true);
|
|
3135
|
-
const timelineSection = document.getElementById(
|
|
3136
|
-
if (timelineSection) {
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
});
|
|
3140
|
-
}
|
|
3253
|
+
const timelineSection = document.getElementById("timeline");
|
|
3254
|
+
if (timelineSection) timelineSection.scrollIntoView({
|
|
3255
|
+
behavior: "smooth"
|
|
3256
|
+
});
|
|
3141
3257
|
};
|
|
3142
3258
|
if (isLoading) return /*#__PURE__*/React.createElement(Loader, null);
|
|
3143
|
-
|
|
3259
|
+
const pageStyle = {
|
|
3260
|
+
padding: isMobile ? "1rem" : "2rem",
|
|
3261
|
+
backgroundColor: "#fbfbfbff",
|
|
3262
|
+
fontFamily: "'Segoe UI', Tahoma, Geneva, Verdana, sans-serif",
|
|
3263
|
+
color: "#333",
|
|
3264
|
+
paddingBottom: "5rem"
|
|
3265
|
+
};
|
|
3266
|
+
const sectionStyle = {
|
|
3267
|
+
backgroundColor: "#ffffff",
|
|
3268
|
+
padding: isMobile ? "0.75rem 1rem" : "1rem 1.5rem",
|
|
3269
|
+
borderRadius: "8px",
|
|
3270
|
+
marginBottom: "1.5rem",
|
|
3271
|
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.05)"
|
|
3272
|
+
};
|
|
3273
|
+
const headingStyle = {
|
|
3274
|
+
fontSize: isMobile ? "1.2rem" : "1.5rem",
|
|
3275
|
+
borderBottom: "2px solid #ccc",
|
|
3276
|
+
paddingBottom: "0.3rem",
|
|
3277
|
+
color: "#2e4a66",
|
|
3278
|
+
marginTop: isMobile ? "1.2rem" : "2rem",
|
|
3279
|
+
marginBottom: "1rem"
|
|
3280
|
+
};
|
|
3281
|
+
const labelFieldPairStyle = {
|
|
3282
|
+
display: "flex",
|
|
3283
|
+
flexDirection: isMobile ? "column" : "row",
|
|
3284
|
+
justifyContent: "space-between",
|
|
3285
|
+
alignItems: isMobile ? "flex-start" : "center",
|
|
3286
|
+
borderBottom: "1px dashed #e0e0e0",
|
|
3287
|
+
padding: "0.5rem 0",
|
|
3288
|
+
color: "#333",
|
|
3289
|
+
gap: isMobile ? "0.25rem" : "0"
|
|
3290
|
+
};
|
|
3291
|
+
const boldLabelStyle = {
|
|
3292
|
+
fontWeight: "bold",
|
|
3293
|
+
color: "#555"
|
|
3294
|
+
};
|
|
3295
|
+
const renderLabel = (label, value) => /*#__PURE__*/React.createElement("div", {
|
|
3296
|
+
style: labelFieldPairStyle
|
|
3297
|
+
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
3298
|
+
style: boldLabelStyle
|
|
3299
|
+
}, label), /*#__PURE__*/React.createElement("div", {
|
|
3144
3300
|
style: {
|
|
3145
|
-
|
|
3301
|
+
wordBreak: "break-word"
|
|
3146
3302
|
}
|
|
3303
|
+
}, value || t("CS_NA")));
|
|
3304
|
+
const documentsContainerStyle = {
|
|
3305
|
+
display: "flex",
|
|
3306
|
+
flexWrap: "wrap",
|
|
3307
|
+
gap: "1rem"
|
|
3308
|
+
};
|
|
3309
|
+
const documentCardStyle = {
|
|
3310
|
+
flex: isMobile ? "1 1 100%" : "1 1 calc(50% - 1rem)",
|
|
3311
|
+
minWidth: "100%",
|
|
3312
|
+
maxWidth: "100%",
|
|
3313
|
+
backgroundColor: "#fdfdfd",
|
|
3314
|
+
padding: "0.75rem",
|
|
3315
|
+
border: "1px solid #e0e0e0",
|
|
3316
|
+
borderRadius: "6px",
|
|
3317
|
+
boxShadow: "0 1px 3px rgba(0,0,0,0.05)",
|
|
3318
|
+
display: "flex",
|
|
3319
|
+
flexDirection: "column",
|
|
3320
|
+
alignItems: "center",
|
|
3321
|
+
textAlign: "center",
|
|
3322
|
+
justifyContent: "center",
|
|
3323
|
+
cursor: "pointer",
|
|
3324
|
+
transition: "transform 0.2s, box-shadow 0.2s"
|
|
3325
|
+
};
|
|
3326
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
3327
|
+
style: pageStyle
|
|
3147
3328
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3329
|
+
style: {
|
|
3330
|
+
display: "flex",
|
|
3331
|
+
justifyContent: "space-between",
|
|
3332
|
+
alignItems: "center",
|
|
3333
|
+
marginBottom: "2rem"
|
|
3151
3334
|
}
|
|
3152
|
-
}, /*#__PURE__*/React.createElement(
|
|
3153
|
-
|
|
3154
|
-
fontSize: "
|
|
3155
|
-
|
|
3335
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
3336
|
+
style: {
|
|
3337
|
+
fontSize: "2rem",
|
|
3338
|
+
color: "#2e4a66"
|
|
3156
3339
|
}
|
|
3157
3340
|
}, t("BPA_TASK_DETAILS_HEADER")), /*#__PURE__*/React.createElement("div", {
|
|
3158
3341
|
style: {
|
|
3159
|
-
zIndex: "10",
|
|
3160
3342
|
display: "flex",
|
|
3161
|
-
|
|
3162
|
-
alignItems: "center"
|
|
3343
|
+
gap: "1rem",
|
|
3344
|
+
alignItems: "center",
|
|
3345
|
+
flexDirection: isMobile ? "column" : "row"
|
|
3163
3346
|
}
|
|
3164
|
-
}, /*#__PURE__*/React.createElement(
|
|
3165
|
-
/*#__PURE__*/
|
|
3166
|
-
React.createElement(MultiLink, {
|
|
3167
|
-
className: "multilinkWrapper",
|
|
3347
|
+
}, recieptDataLoading ? /*#__PURE__*/React.createElement(Loader, null) : (reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment6 = reciept_data.Payments) === null || _reciept_data$Payment6 === void 0 ? void 0 : _reciept_data$Payment6.length) > 0 && /*#__PURE__*/React.createElement(MultiLink, {
|
|
3168
3348
|
onHeadClick: () => setShowOptions(!showOptions),
|
|
3169
3349
|
displayOptions: showOptions,
|
|
3170
|
-
options: dowloadOptions
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
})), /*#__PURE__*/React.createElement(LinkButton, {
|
|
3350
|
+
options: dowloadOptions
|
|
3351
|
+
}), /*#__PURE__*/React.createElement(DownloadCertificateButton, {
|
|
3352
|
+
applicationNumber: id
|
|
3353
|
+
}), /*#__PURE__*/React.createElement(LinkButton, {
|
|
3175
3354
|
label: t("VIEW_TIMELINE"),
|
|
3176
3355
|
style: {
|
|
3177
3356
|
color: "#A52A2A"
|
|
3178
3357
|
},
|
|
3179
3358
|
onClick: handleViewTimeline
|
|
3180
|
-
}))), /*#__PURE__*/React.createElement("div",
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
}
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
},
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
}
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
}
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
},
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
}
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
label: t(`BPA_OWNER_MOBILE_NO_LABEL`),
|
|
3211
|
-
text: License === null || License === void 0 ? void 0 : (_License$tradeLicense27 = License.tradeLicenseDetail) === null || _License$tradeLicense27 === void 0 ? void 0 : (_License$tradeLicense28 = _License$tradeLicense27.owners) === null || _License$tradeLicense28 === void 0 ? void 0 : (_License$tradeLicense29 = _License$tradeLicense28[0]) === null || _License$tradeLicense29 === void 0 ? void 0 : _License$tradeLicense29.mobileNumber
|
|
3212
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
3213
|
-
className: "border-none",
|
|
3214
|
-
label: t(`BPA_APPLICANT_EMAIL_LABEL`),
|
|
3215
|
-
text: (License === null || License === void 0 ? void 0 : (_License$tradeLicense30 = License.tradeLicenseDetail) === null || _License$tradeLicense30 === void 0 ? void 0 : (_License$tradeLicense31 = _License$tradeLicense30.owners) === null || _License$tradeLicense31 === void 0 ? void 0 : (_License$tradeLicense32 = _License$tradeLicense31[0]) === null || _License$tradeLicense32 === void 0 ? void 0 : _License$tradeLicense32.emailId) || t("CS_NA")
|
|
3216
|
-
}))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardHeader, {
|
|
3217
|
-
styles: {
|
|
3218
|
-
fontSize: "24px"
|
|
3219
|
-
}
|
|
3220
|
-
}, t(`BPA_LICENSEE_PERMANENT_LABEL`)), /*#__PURE__*/React.createElement(Row, {
|
|
3221
|
-
className: "border-none",
|
|
3222
|
-
text: (License === null || License === void 0 ? void 0 : (_License$tradeLicense33 = License.tradeLicenseDetail) === null || _License$tradeLicense33 === void 0 ? void 0 : (_License$tradeLicense34 = _License$tradeLicense33.owners) === null || _License$tradeLicense34 === void 0 ? void 0 : (_License$tradeLicense35 = _License$tradeLicense34[0]) === null || _License$tradeLicense35 === void 0 ? void 0 : _License$tradeLicense35.permanentAddress) || t("CS_NA")
|
|
3223
|
-
})), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardHeader, {
|
|
3224
|
-
styles: {
|
|
3225
|
-
fontSize: "24px"
|
|
3226
|
-
}
|
|
3227
|
-
}, t(`BPA_CORRESPONDANCE_ADDRESS_LABEL`)), /*#__PURE__*/React.createElement(Row, {
|
|
3228
|
-
className: "border-none",
|
|
3229
|
-
text: (License === null || License === void 0 ? void 0 : (_License$tradeLicense36 = License.tradeLicenseDetail) === null || _License$tradeLicense36 === void 0 ? void 0 : (_License$tradeLicense37 = _License$tradeLicense36.owners) === null || _License$tradeLicense37 === void 0 ? void 0 : (_License$tradeLicense38 = _License$tradeLicense37[0]) === null || _License$tradeLicense38 === void 0 ? void 0 : _License$tradeLicense38.correspondenceAddress) || t("CS_NA")
|
|
3230
|
-
})), (License === null || License === void 0 ? void 0 : (_License$tradeLicense39 = License.tradeLicenseDetail) === null || _License$tradeLicense39 === void 0 ? void 0 : (_License$tradeLicense40 = _License$tradeLicense39.applicationDocuments) === null || _License$tradeLicense40 === void 0 ? void 0 : _License$tradeLicense40.length) > 0 && /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardHeader, {
|
|
3231
|
-
styles: {
|
|
3232
|
-
fontSize: "24px"
|
|
3233
|
-
}
|
|
3234
|
-
}, t("BPA_DOC_DETAILS_SUMMARY")), License === null || License === void 0 ? void 0 : (_License$tradeLicense41 = License.tradeLicenseDetail) === null || _License$tradeLicense41 === void 0 ? void 0 : (_License$tradeLicense42 = _License$tradeLicense41.applicationDocuments) === null || _License$tradeLicense42 === void 0 ? void 0 : _License$tradeLicense42.map((document, index) => {
|
|
3235
|
-
var _document$documentTyp, _documents$document$f, _document$documentTyp2, _License$tradeLicense43, _License$tradeLicense44;
|
|
3236
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
3237
|
-
styles: {
|
|
3238
|
-
fontSize: "18px"
|
|
3239
|
-
}
|
|
3240
|
-
}, t(`BPAREG_HEADER_${stringReplaceAll(document === null || document === void 0 ? void 0 : (_document$documentTyp = document.documentType) === null || _document$documentTyp === void 0 ? void 0 : _document$documentTyp.toUpperCase(), ".", "_")}`)), document !== null && document !== void 0 && document.info ? /*#__PURE__*/React.createElement("div", {
|
|
3359
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
3360
|
+
style: sectionStyle
|
|
3361
|
+
}, renderLabel(t("BPA_APPLICATION_NUMBER_LABEL"), License === null || License === void 0 ? void 0 : License.applicationNumber)), /*#__PURE__*/React.createElement("div", {
|
|
3362
|
+
style: sectionStyle
|
|
3363
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
3364
|
+
style: headingStyle
|
|
3365
|
+
}, t("BPA_LICENSE_DETAILS_LABEL")), renderLabel(t("BPA_LICENSE_TYPE"), t(`TRADELICENSE_TRADETYPE_${License === null || License === void 0 ? void 0 : (_License$tradeLicense5 = License.tradeLicenseDetail) === null || _License$tradeLicense5 === void 0 ? void 0 : (_License$tradeLicense6 = _License$tradeLicense5.tradeUnits) === null || _License$tradeLicense6 === void 0 ? void 0 : (_License$tradeLicense7 = _License$tradeLicense6[0]) === null || _License$tradeLicense7 === void 0 ? void 0 : (_License$tradeLicense8 = _License$tradeLicense7.tradeType) === null || _License$tradeLicense8 === void 0 ? void 0 : _License$tradeLicense8.split(".")[0]}`)), (License === null || License === void 0 ? void 0 : (_License$tradeLicense9 = License.tradeLicenseDetail) === null || _License$tradeLicense9 === void 0 ? void 0 : (_License$tradeLicense0 = _License$tradeLicense9.tradeUnits) === null || _License$tradeLicense0 === void 0 ? void 0 : (_License$tradeLicense1 = _License$tradeLicense0[0]) === null || _License$tradeLicense1 === void 0 ? void 0 : _License$tradeLicense1.tradeType.includes("ARCHITECT")) && renderLabel(t("BPA_COUNCIL_OF_ARCH_NO_LABEL"), License === null || License === void 0 ? void 0 : (_License$tradeLicense10 = License.tradeLicenseDetail) === null || _License$tradeLicense10 === void 0 ? void 0 : (_License$tradeLicense11 = _License$tradeLicense10.additionalDetail) === null || _License$tradeLicense11 === void 0 ? void 0 : _License$tradeLicense11.counsilForArchNo)), /*#__PURE__*/React.createElement("div", {
|
|
3366
|
+
style: sectionStyle
|
|
3367
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
3368
|
+
style: headingStyle
|
|
3369
|
+
}, t("BPA_LICENSE_DET_CAPTION")), renderLabel(t("BPA_APPLICANT_NAME_LABEL"), License === null || License === void 0 ? void 0 : (_License$tradeLicense12 = License.tradeLicenseDetail) === null || _License$tradeLicense12 === void 0 ? void 0 : (_License$tradeLicense13 = _License$tradeLicense12.owners) === null || _License$tradeLicense13 === void 0 ? void 0 : (_License$tradeLicense14 = _License$tradeLicense13[0]) === null || _License$tradeLicense14 === void 0 ? void 0 : _License$tradeLicense14.name), renderLabel(t("BPA_APPLICANT_GENDER_LABEL"), t(License === null || License === void 0 ? void 0 : (_License$tradeLicense15 = License.tradeLicenseDetail) === null || _License$tradeLicense15 === void 0 ? void 0 : (_License$tradeLicense16 = _License$tradeLicense15.owners) === null || _License$tradeLicense16 === void 0 ? void 0 : (_License$tradeLicense17 = _License$tradeLicense16[0]) === null || _License$tradeLicense17 === void 0 ? void 0 : _License$tradeLicense17.gender)), renderLabel(t("BPA_OWNER_MOBILE_NO_LABEL"), License === null || License === void 0 ? void 0 : (_License$tradeLicense18 = License.tradeLicenseDetail) === null || _License$tradeLicense18 === void 0 ? void 0 : (_License$tradeLicense19 = _License$tradeLicense18.owners) === null || _License$tradeLicense19 === void 0 ? void 0 : (_License$tradeLicense20 = _License$tradeLicense19[0]) === null || _License$tradeLicense20 === void 0 ? void 0 : _License$tradeLicense20.mobileNumber), renderLabel(t("BPA_APPLICANT_EMAIL_LABEL"), License === null || License === void 0 ? void 0 : (_License$tradeLicense21 = License.tradeLicenseDetail) === null || _License$tradeLicense21 === void 0 ? void 0 : (_License$tradeLicense22 = _License$tradeLicense21.owners) === null || _License$tradeLicense22 === void 0 ? void 0 : (_License$tradeLicense23 = _License$tradeLicense22[0]) === null || _License$tradeLicense23 === void 0 ? void 0 : _License$tradeLicense23.emailId)), /*#__PURE__*/React.createElement("div", {
|
|
3370
|
+
style: sectionStyle
|
|
3371
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
3372
|
+
style: headingStyle
|
|
3373
|
+
}, t("BPA_LICENSEE_PERMANENT_LABEL")), renderLabel(t("BPA_APPLICANT_ADDRESS_LABEL"), License === null || License === void 0 ? void 0 : (_License$tradeLicense24 = License.tradeLicenseDetail) === null || _License$tradeLicense24 === void 0 ? void 0 : (_License$tradeLicense25 = _License$tradeLicense24.owners) === null || _License$tradeLicense25 === void 0 ? void 0 : (_License$tradeLicense26 = _License$tradeLicense25[0]) === null || _License$tradeLicense26 === void 0 ? void 0 : _License$tradeLicense26.permanentAddress)), /*#__PURE__*/React.createElement("div", {
|
|
3374
|
+
style: sectionStyle
|
|
3375
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
3376
|
+
style: headingStyle
|
|
3377
|
+
}, t("BPA_CORRESPONDANCE_ADDRESS_LABEL")), renderLabel(t("Address"), License === null || License === void 0 ? void 0 : (_License$tradeLicense27 = License.tradeLicenseDetail) === null || _License$tradeLicense27 === void 0 ? void 0 : (_License$tradeLicense28 = _License$tradeLicense27.owners) === null || _License$tradeLicense28 === void 0 ? void 0 : (_License$tradeLicense29 = _License$tradeLicense28[0]) === null || _License$tradeLicense29 === void 0 ? void 0 : _License$tradeLicense29.correspondenceAddress)), (License === null || License === void 0 ? void 0 : (_License$tradeLicense30 = License.tradeLicenseDetail) === null || _License$tradeLicense30 === void 0 ? void 0 : (_License$tradeLicense31 = _License$tradeLicense30.applicationDocuments) === null || _License$tradeLicense31 === void 0 ? void 0 : _License$tradeLicense31.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
3378
|
+
style: sectionStyle
|
|
3379
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
3380
|
+
style: headingStyle
|
|
3381
|
+
}, t("BPA_DOC_DETAILS_SUMMARY")), /*#__PURE__*/React.createElement("div", {
|
|
3382
|
+
style: documentsContainerStyle
|
|
3383
|
+
}, License === null || License === void 0 ? void 0 : (_License$tradeLicense32 = License.tradeLicenseDetail) === null || _License$tradeLicense32 === void 0 ? void 0 : (_License$tradeLicense33 = _License$tradeLicense32.applicationDocuments) === null || _License$tradeLicense33 === void 0 ? void 0 : _License$tradeLicense33.map((document, index) => {
|
|
3384
|
+
var _documents$document$f, _document$documentTyp;
|
|
3385
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
3386
|
+
key: index,
|
|
3387
|
+
target: "_blank",
|
|
3388
|
+
href: (_documents$document$f = documents[document.fileStoreId]) === null || _documents$document$f === void 0 ? void 0 : _documents$document$f.split(",")[0],
|
|
3241
3389
|
style: {
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
fontWeight: 400,
|
|
3245
|
-
lineHeight: "15px",
|
|
3246
|
-
margin: "10px 0px"
|
|
3390
|
+
textDecoration: "none",
|
|
3391
|
+
flex: isMobile ? "1 1 100%" : "1 1 calc(50% - 1rem)"
|
|
3247
3392
|
}
|
|
3248
|
-
},
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
}, /*#__PURE__*/React.createElement(PDFSvg$1, null)), /*#__PURE__*/React.createElement("p", {
|
|
3393
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3394
|
+
style: documentCardStyle
|
|
3395
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
3252
3396
|
style: {
|
|
3253
3397
|
marginTop: "8px",
|
|
3254
3398
|
fontWeight: "bold",
|
|
3255
|
-
fontSize: "16px",
|
|
3256
|
-
|
|
3257
|
-
color: "#505A5F",
|
|
3258
|
-
fontWeight: "400"
|
|
3399
|
+
fontSize: isMobile ? "14px" : "16px",
|
|
3400
|
+
color: "#505A5F"
|
|
3259
3401
|
}
|
|
3260
|
-
}, t(`BPAREG_HEADER_${stringReplaceAll(document === null || document === void 0 ? void 0 : (_document$
|
|
3402
|
+
}, t(`BPAREG_HEADER_${stringReplaceAll(document === null || document === void 0 ? void 0 : (_document$documentTyp = document.documentType) === null || _document$documentTyp === void 0 ? void 0 : _document$documentTyp.toUpperCase(), ".", "_")}`)), (document === null || document === void 0 ? void 0 : document.info) && /*#__PURE__*/React.createElement("div", {
|
|
3261
3403
|
style: {
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
marginTop: "20px",
|
|
3266
|
-
marginBottom: "20px"
|
|
3404
|
+
fontSize: "12px",
|
|
3405
|
+
color: "#505A5F",
|
|
3406
|
+
marginTop: "5px"
|
|
3267
3407
|
}
|
|
3268
|
-
}
|
|
3269
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
3270
|
-
id: "timeline"
|
|
3271
|
-
|
|
3408
|
+
}, t(document === null || document === void 0 ? void 0 : document.info))));
|
|
3409
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
3410
|
+
id: "timeline",
|
|
3411
|
+
style: sectionStyle
|
|
3412
|
+
}, /*#__PURE__*/React.createElement(ApplicationTimeline, {
|
|
3272
3413
|
id: id,
|
|
3273
3414
|
tenantId: License === null || License === void 0 ? void 0 : License.tenantId
|
|
3274
|
-
}))))
|
|
3415
|
+
}))));
|
|
3275
3416
|
};
|
|
3276
3417
|
|
|
3277
3418
|
const OBPSResponse = props => {
|
|
@@ -17071,7 +17212,8 @@ const LocationDetails = ({
|
|
|
17071
17212
|
const StakeholderDocsRequired = ({
|
|
17072
17213
|
onSelect,
|
|
17073
17214
|
onSkip,
|
|
17074
|
-
config
|
|
17215
|
+
config,
|
|
17216
|
+
formData
|
|
17075
17217
|
}) => {
|
|
17076
17218
|
var _data$StakeholderRegi, _data$StakeholderRegi2, _data$StakeholderRegi3, _data$StakeholderRegi4;
|
|
17077
17219
|
const {
|
|
@@ -17086,6 +17228,10 @@ const StakeholderDocsRequired = ({
|
|
|
17086
17228
|
} = Digit.Hooks.obps.useMDMS(stateId, "StakeholderRegistraition", "TradeTypetoRoleMapping");
|
|
17087
17229
|
let isopenlink = window.location.href.includes("/openlink/");
|
|
17088
17230
|
const isCitizenUrl = Digit.Utils.browser.isMobile() ? true : false;
|
|
17231
|
+
if (JSON.parse(sessionStorage.getItem("BPAREGintermediateValue")) !== null) {
|
|
17232
|
+
formData = JSON.parse(sessionStorage.getItem("BPAREGintermediateValue"));
|
|
17233
|
+
console.log("formData in DocRequired", formData);
|
|
17234
|
+
} else formData = formData;
|
|
17089
17235
|
useEffect(() => {
|
|
17090
17236
|
if (tenantId) Digit.LocalizationService.getLocale({
|
|
17091
17237
|
modules: [`rainmaker-bpareg`],
|
|
@@ -17096,6 +17242,16 @@ const StakeholderDocsRequired = ({
|
|
|
17096
17242
|
if (isLoading) {
|
|
17097
17243
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
17098
17244
|
}
|
|
17245
|
+
function goNext() {
|
|
17246
|
+
var _formData, _formData2, _formData2$result, _formData2$result$Lic;
|
|
17247
|
+
if ((_formData = formData) !== null && _formData !== void 0 && _formData.result && (_formData2 = formData) !== null && _formData2 !== void 0 && (_formData2$result = _formData2.result) !== null && _formData2$result !== void 0 && (_formData2$result$Lic = _formData2$result.Licenses[0]) !== null && _formData2$result$Lic !== void 0 && _formData2$result$Lic.id) {
|
|
17248
|
+
console.log("onSelect going", formData);
|
|
17249
|
+
onSelect("", formData);
|
|
17250
|
+
} else {
|
|
17251
|
+
console.log("onSelect going 2", formData);
|
|
17252
|
+
onSelect();
|
|
17253
|
+
}
|
|
17254
|
+
}
|
|
17099
17255
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
17100
17256
|
className: isopenlink ? "OpenlinkContainer" : ""
|
|
17101
17257
|
}, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardHeader, null, t(`BPA_NEW_BUILDING_HEADER`)), /*#__PURE__*/React.createElement(CardText, {
|
|
@@ -17139,7 +17295,7 @@ const StakeholderDocsRequired = ({
|
|
|
17139
17295
|
}
|
|
17140
17296
|
}, `${t(doc === null || doc === void 0 ? void 0 : doc.info.replace('.', '_'))}`) : null))))), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
17141
17297
|
label: t(`CS_COMMON_NEXT`),
|
|
17142
|
-
onSubmit:
|
|
17298
|
+
onSubmit: goNext
|
|
17143
17299
|
})), /*#__PURE__*/React.createElement(CitizenInfoLabel, {
|
|
17144
17300
|
info: t("CS_FILE_APPLICATION_INFO_LABEL"),
|
|
17145
17301
|
text: t(`OBPS_DOCS_FILE_SIZE`),
|
|
@@ -18939,13 +19095,13 @@ const newConfig$4 = [{
|
|
|
18939
19095
|
texts: {
|
|
18940
19096
|
headerCaption: "BPA_LICENSE_DET_CAPTION",
|
|
18941
19097
|
header: "BPA_LICENSE_TYPE",
|
|
18942
|
-
cardText: "BPA_LICENSE_TYPE_TEXT"
|
|
18943
|
-
submitBarLabel: "CS_COMMON_NEXT"
|
|
19098
|
+
cardText: "BPA_LICENSE_TYPE_TEXT"
|
|
18944
19099
|
},
|
|
18945
19100
|
nextStep: "license-details",
|
|
18946
19101
|
key: "LicneseType",
|
|
18947
19102
|
withoutLabel: true,
|
|
18948
|
-
hideInEmployee: true
|
|
19103
|
+
hideInEmployee: true,
|
|
19104
|
+
step: "1"
|
|
18949
19105
|
}, {
|
|
18950
19106
|
type: "component",
|
|
18951
19107
|
route: "license-details",
|
|
@@ -18954,13 +19110,13 @@ const newConfig$4 = [{
|
|
|
18954
19110
|
texts: {
|
|
18955
19111
|
headerCaption: "BPA_LICENSE_DET_CAPTION",
|
|
18956
19112
|
header: "BPA_LICENSE_DET_CAPTION",
|
|
18957
|
-
cardText: "BPA_LICENSE_DETAILS_TEXT"
|
|
18958
|
-
submitBarLabel: "CS_COMMON_NEXT"
|
|
19113
|
+
cardText: "BPA_LICENSE_DETAILS_TEXT"
|
|
18959
19114
|
},
|
|
18960
19115
|
nextStep: "Permanent-address",
|
|
18961
19116
|
key: "LicneseDetails",
|
|
18962
19117
|
withoutLabel: true,
|
|
18963
|
-
hideInEmployee: true
|
|
19118
|
+
hideInEmployee: true,
|
|
19119
|
+
step: "1"
|
|
18964
19120
|
}, {
|
|
18965
19121
|
type: "component",
|
|
18966
19122
|
route: "Permanent-address",
|
|
@@ -18969,13 +19125,13 @@ const newConfig$4 = [{
|
|
|
18969
19125
|
texts: {
|
|
18970
19126
|
headerCaption: "BPA_NEW_ADDRESS_HEADER_DETAILS",
|
|
18971
19127
|
header: "BPA_LICENSEE_PERM_ADDR_HEADER",
|
|
18972
|
-
cardText: "
|
|
18973
|
-
submitBarLabel: "CS_COMMON_NEXT"
|
|
19128
|
+
cardText: "BPA_LICENSEE_CORRESPONDENCE_TEXT"
|
|
18974
19129
|
},
|
|
18975
19130
|
nextStep: "correspondence-address",
|
|
18976
19131
|
key: "LicneseDetails",
|
|
18977
19132
|
withoutLabel: true,
|
|
18978
|
-
hideInEmployee: true
|
|
19133
|
+
hideInEmployee: true,
|
|
19134
|
+
step: "2"
|
|
18979
19135
|
}, {
|
|
18980
19136
|
type: "component",
|
|
18981
19137
|
route: "correspondence-address",
|
|
@@ -18983,14 +19139,13 @@ const newConfig$4 = [{
|
|
|
18983
19139
|
component: "CorrospondenceAddress",
|
|
18984
19140
|
texts: {
|
|
18985
19141
|
headerCaption: "BPA_NEW_ADDRESS_HEADER_DETAILS",
|
|
18986
|
-
header: "BPA_LICENSEE_CORRESPONDENCE_LABEL"
|
|
18987
|
-
cardText: "BPA_LICENSEE_CORRESPONDENCE_TEXT",
|
|
18988
|
-
submitBarLabel: "CS_COMMON_NEXT"
|
|
19142
|
+
header: "BPA_LICENSEE_CORRESPONDENCE_LABEL"
|
|
18989
19143
|
},
|
|
18990
19144
|
nextStep: "stakeholder-document-details",
|
|
18991
19145
|
key: "LicneseDetails",
|
|
18992
19146
|
withoutLabel: true,
|
|
18993
|
-
hideInEmployee: true
|
|
19147
|
+
hideInEmployee: true,
|
|
19148
|
+
step: "2"
|
|
18994
19149
|
}, {
|
|
18995
19150
|
route: "stakeholder-document-details",
|
|
18996
19151
|
component: "StakeholderDocuments",
|
|
@@ -18998,12 +19153,184 @@ const newConfig$4 = [{
|
|
|
18998
19153
|
key: "documents",
|
|
18999
19154
|
texts: {
|
|
19000
19155
|
headerCaption: "BPA_DOCUMENT_DETAILS_LABEL",
|
|
19001
|
-
header: "BPA_LICENSEE_DOCUMENT_DETAILS_HEADER"
|
|
19002
|
-
|
|
19003
|
-
|
|
19156
|
+
header: "BPA_LICENSEE_DOCUMENT_DETAILS_HEADER"
|
|
19157
|
+
},
|
|
19158
|
+
step: "3"
|
|
19004
19159
|
}]
|
|
19005
19160
|
}];
|
|
19006
19161
|
|
|
19162
|
+
const StepWrapper = ({
|
|
19163
|
+
children,
|
|
19164
|
+
currentStep: _currentStep = 1,
|
|
19165
|
+
nextStep,
|
|
19166
|
+
prevStep,
|
|
19167
|
+
stepsList: _stepsList = []
|
|
19168
|
+
}) => {
|
|
19169
|
+
const {
|
|
19170
|
+
t
|
|
19171
|
+
} = useTranslation();
|
|
19172
|
+
const stepStyle = isActive => ({
|
|
19173
|
+
display: "flex",
|
|
19174
|
+
alignItems: "center",
|
|
19175
|
+
justifyContent: "flex-end",
|
|
19176
|
+
flex: 1,
|
|
19177
|
+
color: isActive ? "#3f51b5" : "#ccc",
|
|
19178
|
+
padding: "10px 10px",
|
|
19179
|
+
width: "260px"
|
|
19180
|
+
});
|
|
19181
|
+
const circleStyle = stepNumber => {
|
|
19182
|
+
let backgroundColor;
|
|
19183
|
+
if (stepNumber <= _currentStep) {
|
|
19184
|
+
backgroundColor = "#0D43A7";
|
|
19185
|
+
} else {
|
|
19186
|
+
backgroundColor = "#FFFFFF";
|
|
19187
|
+
}
|
|
19188
|
+
return {
|
|
19189
|
+
width: "60px",
|
|
19190
|
+
height: "60px",
|
|
19191
|
+
borderRadius: "50%",
|
|
19192
|
+
backgroundColor,
|
|
19193
|
+
color: stepNumber <= _currentStep ? "white" : "black",
|
|
19194
|
+
display: "flex",
|
|
19195
|
+
alignItems: "center",
|
|
19196
|
+
justifyContent: "center",
|
|
19197
|
+
marginBottom: "10px",
|
|
19198
|
+
fontWeight: "normal",
|
|
19199
|
+
fontSize: "18px",
|
|
19200
|
+
border: stepNumber > _currentStep ? "1px solid black" : "",
|
|
19201
|
+
position: "relative"
|
|
19202
|
+
};
|
|
19203
|
+
};
|
|
19204
|
+
const labelStyle = {
|
|
19205
|
+
fontSize: "18px",
|
|
19206
|
+
color: "#1E1E1E",
|
|
19207
|
+
fontWeight: "500",
|
|
19208
|
+
fontFamily: "Noto Sans,sans-serif",
|
|
19209
|
+
marginRight: "6px"
|
|
19210
|
+
};
|
|
19211
|
+
const stepNumberStyle = {
|
|
19212
|
+
fontSize: "18px",
|
|
19213
|
+
color: "#263238",
|
|
19214
|
+
fontWeight: "400",
|
|
19215
|
+
fontFamily: "Noto Sans,sans-serif",
|
|
19216
|
+
margin: "0px 6px 0px 0px"
|
|
19217
|
+
};
|
|
19218
|
+
const lineStyle = {
|
|
19219
|
+
position: "absolute",
|
|
19220
|
+
width: "2px",
|
|
19221
|
+
height: "50px",
|
|
19222
|
+
backgroundColor: "grey",
|
|
19223
|
+
left: "50%",
|
|
19224
|
+
top: "100%",
|
|
19225
|
+
transform: "translateX(-50%)"
|
|
19226
|
+
};
|
|
19227
|
+
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
19228
|
+
const totalSteps = _stepsList.length;
|
|
19229
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19230
|
+
className: "stepper",
|
|
19231
|
+
style: {
|
|
19232
|
+
width: "100%",
|
|
19233
|
+
display: "flex",
|
|
19234
|
+
flexDirection: "row",
|
|
19235
|
+
alignItems: "top",
|
|
19236
|
+
justifyContent: "flex-start"
|
|
19237
|
+
}
|
|
19238
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19239
|
+
className: "stepper-navigation-bar",
|
|
19240
|
+
style: {
|
|
19241
|
+
display: "flex",
|
|
19242
|
+
flexDirection: "column",
|
|
19243
|
+
justifyContent: "space-between",
|
|
19244
|
+
height: "50%",
|
|
19245
|
+
marginBottom: "20px"
|
|
19246
|
+
}
|
|
19247
|
+
}, [...Array(totalSteps)].map((_, index) => /*#__PURE__*/React.createElement("div", {
|
|
19248
|
+
className: "step-content",
|
|
19249
|
+
key: index,
|
|
19250
|
+
style: stepStyle(index + 1 <= _currentStep)
|
|
19251
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19252
|
+
className: "step-sub-content",
|
|
19253
|
+
style: {
|
|
19254
|
+
display: "flex",
|
|
19255
|
+
flexDirection: "column",
|
|
19256
|
+
alignItems: "flex-end",
|
|
19257
|
+
margin: "10px"
|
|
19258
|
+
}
|
|
19259
|
+
}, index + 1 === totalSteps ? null : /*#__PURE__*/React.createElement("div", {
|
|
19260
|
+
className: "step-number",
|
|
19261
|
+
style: stepNumberStyle
|
|
19262
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
19263
|
+
className: "step-label",
|
|
19264
|
+
style: labelStyle
|
|
19265
|
+
}, t(_stepsList[index].stepLabel))), /*#__PURE__*/React.createElement("div", {
|
|
19266
|
+
className: "step-circle",
|
|
19267
|
+
style: circleStyle(index + 1)
|
|
19268
|
+
}, index + 1, index < totalSteps - 1 && /*#__PURE__*/React.createElement("div", {
|
|
19269
|
+
style: lineStyle
|
|
19270
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
19271
|
+
className: "stepper-body",
|
|
19272
|
+
style: {
|
|
19273
|
+
width: "100%",
|
|
19274
|
+
marginBottom: "20px"
|
|
19275
|
+
}
|
|
19276
|
+
}, children));
|
|
19277
|
+
};
|
|
19278
|
+
|
|
19279
|
+
const Stepper = ({
|
|
19280
|
+
stepsList: _stepsList = [],
|
|
19281
|
+
onSubmit,
|
|
19282
|
+
step,
|
|
19283
|
+
setStep
|
|
19284
|
+
}) => {
|
|
19285
|
+
const enabledStepsList = _stepsList.filter(item => item.isStepEnabled);
|
|
19286
|
+
const {
|
|
19287
|
+
t
|
|
19288
|
+
} = useTranslation();
|
|
19289
|
+
function onGoNext() {
|
|
19290
|
+
if (step < enabledStepsList.length) {
|
|
19291
|
+
nextStep();
|
|
19292
|
+
} else if (step === enabledStepsList.length) {
|
|
19293
|
+
onSubmit();
|
|
19294
|
+
}
|
|
19295
|
+
}
|
|
19296
|
+
function onBackClick() {
|
|
19297
|
+
if (step > 1) {
|
|
19298
|
+
prevStep();
|
|
19299
|
+
}
|
|
19300
|
+
}
|
|
19301
|
+
const nextStep = () => setStep(step + 1);
|
|
19302
|
+
const prevStep = () => setStep(step - 1);
|
|
19303
|
+
const renderStep = () => {
|
|
19304
|
+
var _Digit, _Digit$ComponentRegis;
|
|
19305
|
+
const currStepConfBody = enabledStepsList[step - 1];
|
|
19306
|
+
const {
|
|
19307
|
+
component,
|
|
19308
|
+
key,
|
|
19309
|
+
texts,
|
|
19310
|
+
currStepConfig
|
|
19311
|
+
} = currStepConfBody;
|
|
19312
|
+
const Component = (_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ComponentRegis = _Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent(component);
|
|
19313
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Component, {
|
|
19314
|
+
config: {
|
|
19315
|
+
key,
|
|
19316
|
+
texts,
|
|
19317
|
+
component,
|
|
19318
|
+
currStepNumber: step,
|
|
19319
|
+
currStepConfig
|
|
19320
|
+
},
|
|
19321
|
+
onGoNext: onGoNext,
|
|
19322
|
+
onBackClick: onBackClick,
|
|
19323
|
+
t: t
|
|
19324
|
+
}));
|
|
19325
|
+
};
|
|
19326
|
+
return /*#__PURE__*/React.createElement(StepWrapper, {
|
|
19327
|
+
currentStep: step,
|
|
19328
|
+
nextStep: nextStep,
|
|
19329
|
+
prevStep: prevStep,
|
|
19330
|
+
stepsList: enabledStepsList
|
|
19331
|
+
}, renderStep());
|
|
19332
|
+
};
|
|
19333
|
+
|
|
19007
19334
|
const StakeholderRegistration = () => {
|
|
19008
19335
|
var _window, _window$localStorage, _newConfig, _newConfig2, _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi;
|
|
19009
19336
|
const queryClient = useQueryClient();
|
|
@@ -19019,6 +19346,7 @@ const StakeholderRegistration = () => {
|
|
|
19019
19346
|
state
|
|
19020
19347
|
} = useLocation();
|
|
19021
19348
|
const history = useHistory();
|
|
19349
|
+
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
19022
19350
|
const tenantId = (_window = window) === null || _window === void 0 ? void 0 : (_window$localStorage = _window.localStorage) === null || _window$localStorage === void 0 ? void 0 : _window$localStorage.getItem("CITIZEN.CITY");
|
|
19023
19351
|
const [params, setParams, clearParams] = Digit.Hooks.useSessionStorage("BUILDING_PERMIT", state !== null && state !== void 0 && state.edcrNumber ? {
|
|
19024
19352
|
data: {
|
|
@@ -19027,6 +19355,36 @@ const StakeholderRegistration = () => {
|
|
|
19027
19355
|
}
|
|
19028
19356
|
}
|
|
19029
19357
|
} : {});
|
|
19358
|
+
console.log("params in StakeholderRegistration", params, state);
|
|
19359
|
+
const stepperConfig = [{
|
|
19360
|
+
head: "Applicant Details",
|
|
19361
|
+
stepLabel: "BPA_LICENSE_DETAILS_LABEL",
|
|
19362
|
+
stepNumber: 1,
|
|
19363
|
+
isStepEnabled: true,
|
|
19364
|
+
type: "component",
|
|
19365
|
+
component: "dummy"
|
|
19366
|
+
}, {
|
|
19367
|
+
head: "NDC_DOCUMENTS_REQUIRED",
|
|
19368
|
+
stepLabel: "BPA_NEW_ADDRESS_HEADER_DETAILS",
|
|
19369
|
+
stepNumber: 2,
|
|
19370
|
+
isStepEnabled: true,
|
|
19371
|
+
type: "component",
|
|
19372
|
+
component: "dummy"
|
|
19373
|
+
}, {
|
|
19374
|
+
head: "NDC_DOCUMENTS_REQUIRED",
|
|
19375
|
+
stepLabel: "BPA_DOC_DETAILS_SUMMARY",
|
|
19376
|
+
stepNumber: 3,
|
|
19377
|
+
isStepEnabled: true,
|
|
19378
|
+
type: "component",
|
|
19379
|
+
component: "dummy"
|
|
19380
|
+
}, {
|
|
19381
|
+
head: "Summary",
|
|
19382
|
+
stepLabel: "BPA_STEPPER_SUMMARY_HEADER",
|
|
19383
|
+
stepNumber: 4,
|
|
19384
|
+
isStepEnabled: true,
|
|
19385
|
+
type: "component",
|
|
19386
|
+
component: "dummy"
|
|
19387
|
+
}];
|
|
19030
19388
|
const stateId = Digit.ULBService.getStateId();
|
|
19031
19389
|
let {
|
|
19032
19390
|
data: newConfig
|
|
@@ -19042,9 +19400,12 @@ const StakeholderRegistration = () => {
|
|
|
19042
19400
|
}
|
|
19043
19401
|
redirectWithHistory(`${path}/${nextStep}`);
|
|
19044
19402
|
};
|
|
19045
|
-
const onSuccess =
|
|
19403
|
+
const onSuccess = data => {
|
|
19046
19404
|
clearParams();
|
|
19047
19405
|
queryClient.invalidateQueries("PT_CREATE_PROPERTY");
|
|
19406
|
+
console.log("Mutationdata 1", data);
|
|
19407
|
+
sessionStorage.setItem("isStakeholderRegistered", true);
|
|
19408
|
+
sessionStorage.setItem("stakeholder.mutationData", JSON.stringify(data));
|
|
19048
19409
|
};
|
|
19049
19410
|
const createApplication = async () => {
|
|
19050
19411
|
history.push(`${path}/acknowledgement`);
|
|
@@ -19066,7 +19427,7 @@ const StakeholderRegistration = () => {
|
|
|
19066
19427
|
const handleSkip = () => {};
|
|
19067
19428
|
let config = [];
|
|
19068
19429
|
newConfig = (_newConfig = newConfig) !== null && _newConfig !== void 0 && _newConfig.StakeholderConfig ? (_newConfig2 = newConfig) === null || _newConfig2 === void 0 ? void 0 : _newConfig2.StakeholderConfig : newConfig$4;
|
|
19069
|
-
newConfig.forEach(obj => {
|
|
19430
|
+
newConfig$4.forEach(obj => {
|
|
19070
19431
|
config = config.concat(obj.body.filter(a => !a.hideInCitizen));
|
|
19071
19432
|
});
|
|
19072
19433
|
config.indexRoute = "stakeholder-docs-required";
|
|
@@ -19076,11 +19437,25 @@ const StakeholderRegistration = () => {
|
|
|
19076
19437
|
sessionStorage.setItem("isPermitApplication", false);
|
|
19077
19438
|
}
|
|
19078
19439
|
}, []);
|
|
19440
|
+
const currentStepOBJ = config.find(routeObj => routeObj.route === pathname.split("/").pop());
|
|
19441
|
+
const currentStep = currentStepOBJ !== null && currentStepOBJ !== void 0 && currentStepOBJ.step ? parseInt(currentStepOBJ === null || currentStepOBJ === void 0 ? void 0 : currentStepOBJ.step) : window.location.href.includes("check") ? 4 : 0;
|
|
19079
19442
|
const CheckPage = (_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ComponentRegis = _Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent("StakeholderCheckPage");
|
|
19080
19443
|
const StakeholderAcknowledgement = (_Digit2 = Digit) === null || _Digit2 === void 0 ? void 0 : (_Digit2$ComponentRegi = _Digit2.ComponentRegistryService) === null || _Digit2$ComponentRegi === void 0 ? void 0 : _Digit2$ComponentRegi.getComponent("StakeholderAcknowledgement");
|
|
19081
19444
|
console.log("formData in StakeholderRegistration", params);
|
|
19082
19445
|
console.log("config in StakeholderRegistration", config);
|
|
19083
|
-
return /*#__PURE__*/React.createElement(
|
|
19446
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19447
|
+
style: {
|
|
19448
|
+
display: "flex",
|
|
19449
|
+
flexDirection: "row"
|
|
19450
|
+
}
|
|
19451
|
+
}, !(window.location.href.includes("stakeholder-docs-required") || window.location.href.includes("acknowledgement")) && !isMobile && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Stepper, {
|
|
19452
|
+
stepsList: stepperConfig,
|
|
19453
|
+
step: currentStep
|
|
19454
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
19455
|
+
style: {
|
|
19456
|
+
flexGrow: 1
|
|
19457
|
+
}
|
|
19458
|
+
}, /*#__PURE__*/React.createElement(Switch, null, config.map((routeObj, index) => {
|
|
19084
19459
|
const {
|
|
19085
19460
|
component,
|
|
19086
19461
|
texts,
|
|
@@ -19114,7 +19489,7 @@ const StakeholderRegistration = () => {
|
|
|
19114
19489
|
onSuccess: onSuccess
|
|
19115
19490
|
})), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
|
|
19116
19491
|
to: `${path}/${config.indexRoute}`
|
|
19117
|
-
})));
|
|
19492
|
+
})))));
|
|
19118
19493
|
};
|
|
19119
19494
|
|
|
19120
19495
|
const BPAApplicationTimeline = props => {
|
|
@@ -22766,28 +23141,22 @@ const LicenseType = ({
|
|
|
22766
23141
|
formData
|
|
22767
23142
|
}) => {
|
|
22768
23143
|
var _window$location$href, _EmployeeStatusData$S, _CompetencyDescriptio, _CompetencyDescriptio2, _LicenseType$i18nKey;
|
|
22769
|
-
if (JSON.parse(sessionStorage.getItem("BPAREGintermediateValue")) !== null) {
|
|
22770
|
-
formData = JSON.parse(sessionStorage.getItem("BPAREGintermediateValue"));
|
|
22771
|
-
sessionStorage.setItem("BPAREGintermediateValue", null);
|
|
22772
|
-
} else formData = formData;
|
|
22773
23144
|
const index = (_window$location$href = window.location.href) === null || _window$location$href === void 0 ? void 0 : _window$location$href.split("/").pop();
|
|
22774
23145
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
22775
23146
|
const stateId = Digit.ULBService.getStateId();
|
|
22776
23147
|
const [qualificationType, setQualificationType] = useState(() => {
|
|
22777
|
-
var _formData, _formData$
|
|
22778
|
-
|
|
22779
|
-
return saved ? JSON.parse(saved) : ((_formData = formData) === null || _formData === void 0 ? void 0 : (_formData$LicneseType = _formData.LicneseType) === null || _formData$LicneseType === void 0 ? void 0 : _formData$LicneseType.qualificationType) || null;
|
|
23148
|
+
var _formData$LicneseType, _formData$formData, _formData$formData$Li;
|
|
23149
|
+
return (formData === null || formData === void 0 ? void 0 : (_formData$LicneseType = formData.LicneseType) === null || _formData$LicneseType === void 0 ? void 0 : _formData$LicneseType.qualificationType) || (formData === null || formData === void 0 ? void 0 : (_formData$formData = formData.formData) === null || _formData$formData === void 0 ? void 0 : (_formData$formData$Li = _formData$formData.LicneseType) === null || _formData$formData$Li === void 0 ? void 0 : _formData$formData$Li.qualificationType) || null;
|
|
22780
23150
|
});
|
|
22781
23151
|
const [LicenseType, setLicenseType] = useState(() => {
|
|
22782
|
-
var
|
|
22783
|
-
|
|
22784
|
-
return saved ? JSON.parse(saved) : ((_formData2 = formData) === null || _formData2 === void 0 ? void 0 : (_formData2$LicneseTyp = _formData2.LicneseType) === null || _formData2$LicneseTyp === void 0 ? void 0 : _formData2$LicneseTyp.LicenseType) || ((_formData3 = formData) === null || _formData3 === void 0 ? void 0 : (_formData3$formData = _formData3.formData) === null || _formData3$formData === void 0 ? void 0 : (_formData3$formData$L = _formData3$formData.LicneseType) === null || _formData3$formData$L === void 0 ? void 0 : _formData3$formData$L.LicenseType) || null;
|
|
23152
|
+
var _formData$LicneseType2, _formData$formData2, _formData$formData2$L;
|
|
23153
|
+
return (formData === null || formData === void 0 ? void 0 : (_formData$LicneseType2 = formData.LicneseType) === null || _formData$LicneseType2 === void 0 ? void 0 : _formData$LicneseType2.LicenseType) || (formData === null || formData === void 0 ? void 0 : (_formData$formData2 = formData.formData) === null || _formData$formData2 === void 0 ? void 0 : (_formData$formData2$L = _formData$formData2.LicneseType) === null || _formData$formData2$L === void 0 ? void 0 : _formData$formData2$L.LicenseType) || null;
|
|
22785
23154
|
});
|
|
22786
23155
|
const [ArchitectNo, setArchitectNo] = useState(() => {
|
|
22787
|
-
var
|
|
22788
|
-
|
|
22789
|
-
return saved ? saved : ((_formData4 = formData) === null || _formData4 === void 0 ? void 0 : (_formData4$LicneseTyp = _formData4.LicneseType) === null || _formData4$LicneseTyp === void 0 ? void 0 : _formData4$LicneseTyp.ArchitectNo) || ((_formData5 = formData) === null || _formData5 === void 0 ? void 0 : (_formData5$formData = _formData5.formData) === null || _formData5$formData === void 0 ? void 0 : (_formData5$formData$L = _formData5$formData.LicneseType) === null || _formData5$formData$L === void 0 ? void 0 : _formData5$formData$L.ArchitectNo) || null;
|
|
23156
|
+
var _formData$LicneseType3, _formData$formData3, _formData$formData3$L;
|
|
23157
|
+
return (formData === null || formData === void 0 ? void 0 : (_formData$LicneseType3 = formData.LicneseType) === null || _formData$LicneseType3 === void 0 ? void 0 : _formData$LicneseType3.ArchitectNo) || (formData === null || formData === void 0 ? void 0 : (_formData$formData3 = formData.formData) === null || _formData$formData3 === void 0 ? void 0 : (_formData$formData3$L = _formData$formData3.LicneseType) === null || _formData$formData3$L === void 0 ? void 0 : _formData$formData3$L.ArchitectNo) || null;
|
|
22790
23158
|
});
|
|
23159
|
+
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
22791
23160
|
const {
|
|
22792
23161
|
data: qualificationTypes,
|
|
22793
23162
|
isLoading: isQualificationLoading,
|
|
@@ -22806,11 +23175,10 @@ const LicenseType = ({
|
|
|
22806
23175
|
const isopenlink = window.location.href.includes("/openlink/");
|
|
22807
23176
|
const isCitizenUrl = Digit.Utils.browser.isMobile() ? true : false;
|
|
22808
23177
|
const [selfCertification, setSelfCertification] = useState(() => {
|
|
22809
|
-
var
|
|
22810
|
-
|
|
22811
|
-
return saved ? JSON.parse(saved) : ((_formData6 = formData) === null || _formData6 === void 0 ? void 0 : _formData6.selfCertification) || ((_formData7 = formData) === null || _formData7 === void 0 ? void 0 : (_formData7$formData = _formData7.formData) === null || _formData7$formData === void 0 ? void 0 : _formData7$formData.selfCertification) || null;
|
|
23178
|
+
var _formData$LicneseType4, _formData$formData4, _formData$formData4$L;
|
|
23179
|
+
return (formData === null || formData === void 0 ? void 0 : (_formData$LicneseType4 = formData.LicneseType) === null || _formData$LicneseType4 === void 0 ? void 0 : _formData$LicneseType4.selfCertification) || (formData === null || formData === void 0 ? void 0 : (_formData$formData4 = formData.formData) === null || _formData$formData4 === void 0 ? void 0 : (_formData$formData4$L = _formData$formData4.LicneseType) === null || _formData$formData4$L === void 0 ? void 0 : _formData$formData4$L.selfCertification) || false;
|
|
22812
23180
|
});
|
|
22813
|
-
console.log("OBPS_Formdata", formData);
|
|
23181
|
+
console.log("OBPS_Formdata", formData, qualificationType);
|
|
22814
23182
|
const [errorMessage, setErrorMessage] = useState("");
|
|
22815
23183
|
if (isopenlink) window.onunload = () => {
|
|
22816
23184
|
sessionStorage.removeItem("Digit.BUILDING_PERMIT");
|
|
@@ -22822,18 +23190,26 @@ const LicenseType = ({
|
|
|
22822
23190
|
}, [qualificationType]);
|
|
22823
23191
|
console.log("qualificationTypeFinfing", qualificationType);
|
|
22824
23192
|
useEffect(() => {
|
|
22825
|
-
var
|
|
22826
|
-
console.log("selectedQualificationType 1", qualificationTypes,
|
|
22827
|
-
if (
|
|
22828
|
-
var
|
|
23193
|
+
var _formData$LicneseType5, _formData$LicneseType6;
|
|
23194
|
+
console.log("selectedQualificationType 1", qualificationTypes, formData === null || formData === void 0 ? void 0 : (_formData$LicneseType5 = formData.LicneseType) === null || _formData$LicneseType5 === void 0 ? void 0 : _formData$LicneseType5.qualificationType, qualificationTypes);
|
|
23195
|
+
if (formData !== null && formData !== void 0 && (_formData$LicneseType6 = formData.LicneseType) !== null && _formData$LicneseType6 !== void 0 && _formData$LicneseType6.qualificationType && qualificationTypes && !qualificationType) {
|
|
23196
|
+
var _formData$LicneseType8;
|
|
22829
23197
|
const selectedQualificationType = qualificationTypes.find(val => {
|
|
22830
|
-
var
|
|
22831
|
-
return val.name === (
|
|
23198
|
+
var _formData$LicneseType7;
|
|
23199
|
+
return val.name === (formData === null || formData === void 0 ? void 0 : (_formData$LicneseType7 = formData.LicneseType) === null || _formData$LicneseType7 === void 0 ? void 0 : _formData$LicneseType7.qualificationType);
|
|
22832
23200
|
});
|
|
22833
23201
|
setQualificationType(selectedQualificationType);
|
|
22834
|
-
console.log("selectedQualificationType", selectedQualificationType,
|
|
23202
|
+
console.log("selectedQualificationType", selectedQualificationType, formData === null || formData === void 0 ? void 0 : (_formData$LicneseType8 = formData.LicneseType) === null || _formData$LicneseType8 === void 0 ? void 0 : _formData$LicneseType8.qualificationType, qualificationTypes);
|
|
22835
23203
|
}
|
|
22836
23204
|
}, []);
|
|
23205
|
+
useEffect(() => {
|
|
23206
|
+
if (typeof qualificationType === "string" && (qualificationTypes === null || qualificationTypes === void 0 ? void 0 : qualificationTypes.length) > 0) {
|
|
23207
|
+
const selectedQualificationType = qualificationTypes.find(val => {
|
|
23208
|
+
return val.name === qualificationType;
|
|
23209
|
+
});
|
|
23210
|
+
setQualificationType(selectedQualificationType);
|
|
23211
|
+
}
|
|
23212
|
+
}, [qualificationTypes, qualificationType]);
|
|
22837
23213
|
useEffect(() => {
|
|
22838
23214
|
if (qualificationType !== null) {
|
|
22839
23215
|
localStorage.setItem("licenseForm_qualificationType", JSON.stringify(qualificationType));
|
|
@@ -22878,21 +23254,11 @@ const LicenseType = ({
|
|
|
22878
23254
|
}
|
|
22879
23255
|
console.log("License Type List", getLicenseType());
|
|
22880
23256
|
function mapQualificationToLicense(qualification) {
|
|
22881
|
-
let license = null;
|
|
22882
|
-
if (qualification.name == "B-Arch") {
|
|
22883
|
-
license = getLicenseType().find(type => type.i18nKey.includes("ARCHITECT"));
|
|
22884
|
-
} else if (qualification.name == "BE/B-Tech") {
|
|
22885
|
-
license = getLicenseType().find(type => type.i18nKey.includes("ENGINEER"));
|
|
22886
|
-
} else if (qualification.name == "Diploma in Civil Engineering/Architect") {
|
|
22887
|
-
license = getLicenseType().find(type => type.i18nKey.includes("SUPERVISOR"));
|
|
22888
|
-
} else if (qualification.name == "Town and Country Planning") {
|
|
22889
|
-
license = getLicenseType().find(type => type.i18nKey.includes("TOWNPLANNER"));
|
|
22890
|
-
}
|
|
23257
|
+
let license = getLicenseType().find(type => type.i18nKey.includes(qualification === null || qualification === void 0 ? void 0 : qualification.role));
|
|
22891
23258
|
if (license) {
|
|
22892
23259
|
setLicenseType(license);
|
|
22893
23260
|
}
|
|
22894
23261
|
}
|
|
22895
|
-
const onSkip = () => onSelect();
|
|
22896
23262
|
function selectQualificationType(value) {
|
|
22897
23263
|
setQualificationType(value);
|
|
22898
23264
|
mapQualificationToLicense(value);
|
|
@@ -22937,7 +23303,7 @@ const LicenseType = ({
|
|
|
22937
23303
|
}
|
|
22938
23304
|
}
|
|
22939
23305
|
function goNext() {
|
|
22940
|
-
var
|
|
23306
|
+
var _formData$result, _formData$result$Lice;
|
|
22941
23307
|
if (errorMessage !== "") return;
|
|
22942
23308
|
if (LicenseType !== null && LicenseType !== void 0 && LicenseType.i18nKey.includes("ARCHITECT") && ArchitectNo === null) {
|
|
22943
23309
|
setErrorMessage(t("BPA_INVALID_MESSAGE_FOR_COA"));
|
|
@@ -22955,18 +23321,27 @@ const LicenseType = ({
|
|
|
22955
23321
|
localStorage.removeItem("licenseForm_LicenseType");
|
|
22956
23322
|
localStorage.removeItem("licenseForm_ArchitectNo");
|
|
22957
23323
|
localStorage.removeItem("licenseForm_selfCertification");
|
|
22958
|
-
if (!(
|
|
22959
|
-
|
|
22960
|
-
|
|
22961
|
-
|
|
22962
|
-
|
|
22963
|
-
|
|
22964
|
-
|
|
22965
|
-
|
|
23324
|
+
if (!(formData !== null && formData !== void 0 && formData.result && formData !== null && formData !== void 0 && (_formData$result = formData.result) !== null && _formData$result !== void 0 && (_formData$result$Lice = _formData$result.Licenses[0]) !== null && _formData$result$Lice !== void 0 && _formData$result$Lice.id)) {
|
|
23325
|
+
console.log("onSelect going", {
|
|
23326
|
+
LicenseType,
|
|
23327
|
+
ArchitectNo,
|
|
23328
|
+
selfCertification,
|
|
23329
|
+
qualificationType
|
|
23330
|
+
});
|
|
23331
|
+
onSelect(config.key, {
|
|
23332
|
+
LicenseType,
|
|
23333
|
+
ArchitectNo,
|
|
23334
|
+
selfCertification,
|
|
23335
|
+
qualificationType: qualificationType
|
|
23336
|
+
});
|
|
23337
|
+
} else {
|
|
23338
|
+
const data = formData === null || formData === void 0 ? void 0 : formData.formData;
|
|
23339
|
+
console.log("onSelect going 2", data);
|
|
22966
23340
|
data.LicneseType.LicenseType = LicenseType;
|
|
22967
23341
|
data.LicneseType.ArchitectNo = ArchitectNo;
|
|
22968
23342
|
data.LicneseType.selfCertification = selfCertification ? selfCertification : false;
|
|
22969
|
-
data.qualificationType = qualificationType;
|
|
23343
|
+
data.LicneseType.qualificationType = qualificationType;
|
|
23344
|
+
formData.formData = data;
|
|
22970
23345
|
onSelect("", formData);
|
|
22971
23346
|
}
|
|
22972
23347
|
}
|
|
@@ -22974,6 +23349,7 @@ const LicenseType = ({
|
|
|
22974
23349
|
setSelfCertification(e.target.checked);
|
|
22975
23350
|
}
|
|
22976
23351
|
console.log("formData in LicenseType", formData);
|
|
23352
|
+
if (isQualificationLoading) return /*#__PURE__*/React.createElement(Loader, null);
|
|
22977
23353
|
return /*#__PURE__*/React.createElement("div", {
|
|
22978
23354
|
style: {
|
|
22979
23355
|
display: "flex",
|
|
@@ -22991,15 +23367,12 @@ const LicenseType = ({
|
|
|
22991
23367
|
style: {
|
|
22992
23368
|
border: "none"
|
|
22993
23369
|
}
|
|
22994
|
-
}, t("CS_COMMON_BACK")), /*#__PURE__*/React.createElement(Timeline, {
|
|
23370
|
+
}, t("CS_COMMON_BACK")), isMobile && /*#__PURE__*/React.createElement(Timeline, {
|
|
22995
23371
|
currentStep: 1,
|
|
22996
23372
|
flow: "STAKEHOLDER"
|
|
22997
23373
|
}), /*#__PURE__*/React.createElement(FormStep, {
|
|
22998
23374
|
t: t,
|
|
22999
|
-
config: config
|
|
23000
|
-
onSelect: goNext,
|
|
23001
|
-
onSkip: onSkip,
|
|
23002
|
-
isDisabled: (LicenseType === null || LicenseType === void 0 ? void 0 : LicenseType.i18nKey.includes("ARCHITECT")) && !ArchitectNo || (LicenseType === null || LicenseType === void 0 ? void 0 : LicenseType.i18nKey.includes("TOWNPLANNER")) && !ArchitectNo || !qualificationType
|
|
23375
|
+
config: config
|
|
23003
23376
|
}, /*#__PURE__*/React.createElement(CardLabel, null, t("BPA_QUALIFICATION_TYPE"), "*"), /*#__PURE__*/React.createElement("div", {
|
|
23004
23377
|
className: "form-pt-dropdown-only"
|
|
23005
23378
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
@@ -23061,8 +23434,8 @@ const LicenseType = ({
|
|
|
23061
23434
|
marginTop: "4px",
|
|
23062
23435
|
marginBottom: "12px"
|
|
23063
23436
|
}
|
|
23064
|
-
}, errorMessage)), LicenseType && ((LicenseType === null || LicenseType === void 0 ? void 0 : LicenseType.i18nKey.includes("ARCHITECT")) || (LicenseType === null || LicenseType === void 0 ? void 0 : LicenseType.i18nKey.includes("
|
|
23065
|
-
label: LicenseType !== null && LicenseType !== void 0 && LicenseType.i18nKey.includes("ARCHITECT") ? t("DECLARATION_SELF_CERTIFICATION_RESIDENTIAL_ARCHITECT") : LicenseType !== null && LicenseType !== void 0 && LicenseType.i18nKey.includes("
|
|
23437
|
+
}, errorMessage)), LicenseType && ((LicenseType === null || LicenseType === void 0 ? void 0 : LicenseType.i18nKey.includes("ARCHITECT")) || (LicenseType === null || LicenseType === void 0 ? void 0 : LicenseType.i18nKey.includes("ENGINEER")) || (LicenseType === null || LicenseType === void 0 ? void 0 : LicenseType.i18nKey.includes("SUPERVISOR")) || (LicenseType === null || LicenseType === void 0 ? void 0 : LicenseType.i18nKey.includes("TOWNPLANNER"))) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CheckBox, {
|
|
23438
|
+
label: LicenseType !== null && LicenseType !== void 0 && LicenseType.i18nKey.includes("ARCHITECT") ? t("DECLARATION_SELF_CERTIFICATION_RESIDENTIAL_ARCHITECT") : LicenseType !== null && LicenseType !== void 0 && LicenseType.i18nKey.includes("ENGINEER") ? t("DECLARATION_SELF_CERTIFICATION_RESIDENTIAL_ENGINEER") : LicenseType !== null && LicenseType !== void 0 && LicenseType.i18nKey.includes("SUPERVISOR") ? t("DECLARATION_SELF_CERTIFICATION_RESIDENTIAL_SUPERVISOR") : t("DECLARATION_SELF_CERTIFICATION_RESIDENTIAL_TOWNPLANNER"),
|
|
23066
23439
|
onChange: selectSelfCertification,
|
|
23067
23440
|
value: selfCertification,
|
|
23068
23441
|
checked: selfCertification || false,
|
|
@@ -23103,7 +23476,11 @@ const LicenseType = ({
|
|
|
23103
23476
|
style: {
|
|
23104
23477
|
marginBottom: "8px"
|
|
23105
23478
|
}
|
|
23106
|
-
}, point.trim())))))))
|
|
23479
|
+
}, point.trim()))))))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
23480
|
+
label: t("CS_COMMON_NEXT"),
|
|
23481
|
+
onSubmit: goNext,
|
|
23482
|
+
disabled: (LicenseType === null || LicenseType === void 0 ? void 0 : LicenseType.i18nKey.includes("ARCHITECT")) && !ArchitectNo || (LicenseType === null || LicenseType === void 0 ? void 0 : LicenseType.i18nKey.includes("TOWNPLANNER")) && !ArchitectNo || !qualificationType
|
|
23483
|
+
})));
|
|
23107
23484
|
};
|
|
23108
23485
|
|
|
23109
23486
|
const LicenseDetails = ({
|
|
@@ -23114,7 +23491,7 @@ const LicenseDetails = ({
|
|
|
23114
23491
|
formData,
|
|
23115
23492
|
ownerIndex
|
|
23116
23493
|
}) => {
|
|
23117
|
-
var _userInfo$info, _formData$LicneseDeta4, _userInfo$info5, _formData$LicneseDeta5, _formData$
|
|
23494
|
+
var _userInfo$info, _formData$LicneseDeta4, _formData$formData, _formData$formData$Li, _userInfo$info5, _formData$LicneseDeta5, _formData$formData2, _formData$formData2$L, _formData$LicneseDeta6, _userDetails$user, _userDetails$user$, _userDetails$user2, _userDetails$user2$, _userDetails$user3, _userDetails$user3$, _formData$formData3, _formData$formData3$L, _userInfo$info6, _formData$LicneseDeta7, _formData$formData4, _formData$formData4$L, _formData$LicneseDeta8, _formData$formData5, _formData$formData5$L, _userInfo$info8;
|
|
23118
23495
|
const {
|
|
23119
23496
|
pathname: url
|
|
23120
23497
|
} = useLocation();
|
|
@@ -23123,6 +23500,12 @@ const LicenseDetails = ({
|
|
|
23123
23500
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
23124
23501
|
let isOpenLinkFlow = window.location.href.includes("openlink");
|
|
23125
23502
|
const uuid = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info = userInfo.info) === null || _userInfo$info === void 0 ? void 0 : _userInfo$info.uuid;
|
|
23503
|
+
const [disable, setDisable] = useState({
|
|
23504
|
+
lastName: false,
|
|
23505
|
+
middleName: false,
|
|
23506
|
+
gender: false,
|
|
23507
|
+
dateOfBirth: false
|
|
23508
|
+
});
|
|
23126
23509
|
const [getUserDetails, setGetUserDetails] = useState(null);
|
|
23127
23510
|
const {
|
|
23128
23511
|
data: userDetails,
|
|
@@ -23142,26 +23525,47 @@ const LicenseDetails = ({
|
|
|
23142
23525
|
var _formData$LicneseDeta2, _userInfo$info3;
|
|
23143
23526
|
const fullName = (formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta2 = formData.LicneseDetails) === null || _formData$LicneseDeta2 === void 0 ? void 0 : _formData$LicneseDeta2.name) || (!isOpenLinkFlow ? userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info3 = userInfo.info) === null || _userInfo$info3 === void 0 ? void 0 : _userInfo$info3.name : "") || "";
|
|
23144
23527
|
const nameParts = fullName.trim().split(" ");
|
|
23528
|
+
if (nameParts.length > 1) {
|
|
23529
|
+
setDisable(prev => ({
|
|
23530
|
+
...prev,
|
|
23531
|
+
lastName: true
|
|
23532
|
+
}));
|
|
23533
|
+
}
|
|
23145
23534
|
return nameParts.length > 1 ? nameParts[nameParts.length - 1] : "";
|
|
23146
23535
|
});
|
|
23147
23536
|
const [middleName, setMiddleName] = useState(() => {
|
|
23148
23537
|
var _formData$LicneseDeta3, _userInfo$info4;
|
|
23149
23538
|
const fullName = (formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta3 = formData.LicneseDetails) === null || _formData$LicneseDeta3 === void 0 ? void 0 : _formData$LicneseDeta3.name) || (!isOpenLinkFlow ? userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info4 = userInfo.info) === null || _userInfo$info4 === void 0 ? void 0 : _userInfo$info4.name : "") || "";
|
|
23150
23539
|
const nameParts = fullName.trim().split(" ");
|
|
23540
|
+
console.log("Middle name parts:", nameParts.slice(1, -1));
|
|
23541
|
+
if (nameParts.length === 3 && nameParts.slice(1, -1).length > 0 && nameParts.slice(1, -1)[0] !== "") {
|
|
23542
|
+
setDisable(prev => ({
|
|
23543
|
+
...prev,
|
|
23544
|
+
middleName: true
|
|
23545
|
+
}));
|
|
23546
|
+
}
|
|
23547
|
+
if (nameParts.length > 3 && nameParts.slice(1, -1).length > 0 && nameParts.slice(1, -1)[1] !== "") {
|
|
23548
|
+
setDisable(prev => ({
|
|
23549
|
+
...prev,
|
|
23550
|
+
middleName: true
|
|
23551
|
+
}));
|
|
23552
|
+
}
|
|
23151
23553
|
return nameParts.length > 2 ? nameParts.slice(1, -1).join(" ") : "";
|
|
23152
23554
|
});
|
|
23555
|
+
console.log("disable state", disable);
|
|
23153
23556
|
const [userName, setUserName] = useState("");
|
|
23154
23557
|
const [password, setPassword] = useState("");
|
|
23155
23558
|
const [isPasswordValid, setIsPasswordValid] = useState(true);
|
|
23156
|
-
const [dateOfBirth, setDateOfBirth] = useState((formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta4 = formData.LicneseDetails) === null || _formData$LicneseDeta4 === void 0 ? void 0 : _formData$LicneseDeta4.dateOfBirth) || "");
|
|
23157
|
-
const [
|
|
23559
|
+
const [dateOfBirth, setDateOfBirth] = useState((formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta4 = formData.LicneseDetails) === null || _formData$LicneseDeta4 === void 0 ? void 0 : _formData$LicneseDeta4.dateOfBirth) || (formData === null || formData === void 0 ? void 0 : (_formData$formData = formData.formData) === null || _formData$formData === void 0 ? void 0 : (_formData$formData$Li = _formData$formData.LicneseDetails) === null || _formData$formData$Li === void 0 ? void 0 : _formData$formData$Li.dateOfBirth) || "");
|
|
23560
|
+
const [age, setAge] = useState(0);
|
|
23561
|
+
const [email, setEmail] = useState((!isOpenLinkFlow ? userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info5 = userInfo.info) === null || _userInfo$info5 === void 0 ? void 0 : _userInfo$info5.emailId : "") || (formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta5 = formData.LicneseDetails) === null || _formData$LicneseDeta5 === void 0 ? void 0 : _formData$LicneseDeta5.email) || (formData === null || formData === void 0 ? void 0 : (_formData$formData2 = formData.formData) === null || _formData$formData2 === void 0 ? void 0 : (_formData$formData2$L = _formData$formData2.LicneseDetails) === null || _formData$formData2$L === void 0 ? void 0 : _formData$formData2$L.email) || "");
|
|
23158
23562
|
const [gender, setGender] = useState((formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta6 = formData.LicneseDetails) === null || _formData$LicneseDeta6 === void 0 ? void 0 : _formData$LicneseDeta6.gender) || (!isOpenLinkFlow && userDetails ? {
|
|
23159
23563
|
i18nKey: `COMMON_GENDER_${userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$user = userDetails.user) === null || _userDetails$user === void 0 ? void 0 : (_userDetails$user$ = _userDetails$user[0]) === null || _userDetails$user$ === void 0 ? void 0 : _userDetails$user$.gender}`,
|
|
23160
23564
|
code: userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$user2 = userDetails.user) === null || _userDetails$user2 === void 0 ? void 0 : (_userDetails$user2$ = _userDetails$user2[0]) === null || _userDetails$user2$ === void 0 ? void 0 : _userDetails$user2$.gender,
|
|
23161
23565
|
value: userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$user3 = userDetails.user) === null || _userDetails$user3 === void 0 ? void 0 : (_userDetails$user3$ = _userDetails$user3[0]) === null || _userDetails$user3$ === void 0 ? void 0 : _userDetails$user3$.gender
|
|
23162
|
-
} : "") || (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
23163
|
-
const [mobileNumber, setMobileNumber] = useState((!isOpenLinkFlow ? userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info6 = userInfo.info) === null || _userInfo$info6 === void 0 ? void 0 : _userInfo$info6.mobileNumber : "") || (formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta7 = formData.LicneseDetails) === null || _formData$LicneseDeta7 === void 0 ? void 0 : _formData$LicneseDeta7.mobileNumber) || (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
23164
|
-
const [PanNumber, setPanNumber] = useState((formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta8 = formData.LicneseDetails) === null || _formData$LicneseDeta8 === void 0 ? void 0 : _formData$LicneseDeta8.PanNumber) || (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
23566
|
+
} : "") || (formData === null || formData === void 0 ? void 0 : (_formData$formData3 = formData.formData) === null || _formData$formData3 === void 0 ? void 0 : (_formData$formData3$L = _formData$formData3.LicneseDetails) === null || _formData$formData3$L === void 0 ? void 0 : _formData$formData3$L.gender));
|
|
23567
|
+
const [mobileNumber, setMobileNumber] = useState((!isOpenLinkFlow ? userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info6 = userInfo.info) === null || _userInfo$info6 === void 0 ? void 0 : _userInfo$info6.mobileNumber : "") || (formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta7 = formData.LicneseDetails) === null || _formData$LicneseDeta7 === void 0 ? void 0 : _formData$LicneseDeta7.mobileNumber) || (formData === null || formData === void 0 ? void 0 : (_formData$formData4 = formData.formData) === null || _formData$formData4 === void 0 ? void 0 : (_formData$formData4$L = _formData$formData4.LicneseDetails) === null || _formData$formData4$L === void 0 ? void 0 : _formData$formData4$L.mobileNumber) || "");
|
|
23568
|
+
const [PanNumber, setPanNumber] = useState((formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta8 = formData.LicneseDetails) === null || _formData$LicneseDeta8 === void 0 ? void 0 : _formData$LicneseDeta8.PanNumber) || (formData === null || formData === void 0 ? void 0 : (_formData$formData5 = formData.formData) === null || _formData$formData5 === void 0 ? void 0 : (_formData$formData5$L = _formData$formData5.LicneseDetails) === null || _formData$formData5$L === void 0 ? void 0 : _formData$formData5$L.PanNumber) || "");
|
|
23165
23569
|
const [errorMessage, setErrorMessage] = useState("");
|
|
23166
23570
|
const getUserInfo = async () => {
|
|
23167
23571
|
var _userInfo$info7;
|
|
@@ -23175,11 +23579,16 @@ const LicenseDetails = ({
|
|
|
23175
23579
|
const user = usersResponse.user[0];
|
|
23176
23580
|
setGetUserDetails(user);
|
|
23177
23581
|
if (user !== null && user !== void 0 && user.dob) {
|
|
23582
|
+
setDisable(prev => ({
|
|
23583
|
+
...prev,
|
|
23584
|
+
dateOfBirth: true
|
|
23585
|
+
}));
|
|
23178
23586
|
setDateOfBirth(user.dob);
|
|
23179
23587
|
}
|
|
23180
23588
|
}
|
|
23181
23589
|
}
|
|
23182
23590
|
};
|
|
23591
|
+
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
23183
23592
|
useEffect(() => {
|
|
23184
23593
|
getUserInfo();
|
|
23185
23594
|
}, []);
|
|
@@ -23187,6 +23596,10 @@ const LicenseDetails = ({
|
|
|
23187
23596
|
var _userDetails$user4, _userDetails$user4$;
|
|
23188
23597
|
if (!(gender !== null && gender !== void 0 && gender.code) && userDetails !== null && userDetails !== void 0 && (_userDetails$user4 = userDetails.user) !== null && _userDetails$user4 !== void 0 && (_userDetails$user4$ = _userDetails$user4[0]) !== null && _userDetails$user4$ !== void 0 && _userDetails$user4$.gender && !isOpenLinkFlow) {
|
|
23189
23598
|
var _userDetails$user5, _userDetails$user5$, _userDetails$user6, _userDetails$user6$, _userDetails$user7, _userDetails$user7$;
|
|
23599
|
+
setDisable(prev => ({
|
|
23600
|
+
...prev,
|
|
23601
|
+
gender: true
|
|
23602
|
+
}));
|
|
23190
23603
|
setGender({
|
|
23191
23604
|
i18nKey: `COMMON_GENDER_${userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$user5 = userDetails.user) === null || _userDetails$user5 === void 0 ? void 0 : (_userDetails$user5$ = _userDetails$user5[0]) === null || _userDetails$user5$ === void 0 ? void 0 : _userDetails$user5$.gender}`,
|
|
23192
23605
|
code: userDetails === null || userDetails === void 0 ? void 0 : (_userDetails$user6 = userDetails.user) === null || _userDetails$user6 === void 0 ? void 0 : (_userDetails$user6$ = _userDetails$user6[0]) === null || _userDetails$user6$ === void 0 ? void 0 : _userDetails$user6$.gender,
|
|
@@ -23194,6 +23607,18 @@ const LicenseDetails = ({
|
|
|
23194
23607
|
});
|
|
23195
23608
|
}
|
|
23196
23609
|
}, [userDetails]);
|
|
23610
|
+
useEffect(() => {
|
|
23611
|
+
if (dateOfBirth) {
|
|
23612
|
+
const today = new Date();
|
|
23613
|
+
const birthDate = new Date(dateOfBirth);
|
|
23614
|
+
let age = today.getFullYear() - birthDate.getFullYear();
|
|
23615
|
+
const monthDifference = today.getMonth() - birthDate.getMonth();
|
|
23616
|
+
if (monthDifference < 0 || monthDifference === 0 && today.getDate() < birthDate.getDate()) {
|
|
23617
|
+
age--;
|
|
23618
|
+
}
|
|
23619
|
+
setAge(age);
|
|
23620
|
+
}
|
|
23621
|
+
}, [dateOfBirth]);
|
|
23197
23622
|
const stateId = Digit.ULBService.getStateId();
|
|
23198
23623
|
const isCitizenUrl = Digit.Utils.browser.isMobile() ? true : false;
|
|
23199
23624
|
if (isOpenLinkFlow) window.onunload = function () {
|
|
@@ -23284,28 +23709,25 @@ const LicenseDetails = ({
|
|
|
23284
23709
|
data.LicneseDetails.gender = gender;
|
|
23285
23710
|
data.LicneseDetails.email = email;
|
|
23286
23711
|
data.LicneseDetails.PanNumber = PanNumber;
|
|
23712
|
+
data.LicneseDetails.dateOfBirth = dateOfBirth;
|
|
23287
23713
|
onSelect("", formData);
|
|
23288
23714
|
}
|
|
23289
23715
|
if (age < 18) {
|
|
23290
23716
|
alert(t("BPA_DOB_VALIDATION_MESSAGE"));
|
|
23291
23717
|
}
|
|
23292
23718
|
};
|
|
23293
|
-
const onSkip = () => onSelect();
|
|
23294
23719
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
23295
23720
|
className: isOpenLinkFlow ? "OpenlinkContainer" : ""
|
|
23296
23721
|
}, isOpenLinkFlow && /*#__PURE__*/React.createElement(BackButton, {
|
|
23297
23722
|
style: {
|
|
23298
23723
|
border: "none"
|
|
23299
23724
|
}
|
|
23300
|
-
}, t("CS_COMMON_BACK")), /*#__PURE__*/React.createElement(Timeline, {
|
|
23725
|
+
}, t("CS_COMMON_BACK")), isMobile && /*#__PURE__*/React.createElement(Timeline, {
|
|
23301
23726
|
currentStep: 1,
|
|
23302
23727
|
flow: "STAKEHOLDER"
|
|
23303
23728
|
}), !isLoading || !isUserLoading ? /*#__PURE__*/React.createElement(FormStep, {
|
|
23304
23729
|
config: config,
|
|
23305
|
-
|
|
23306
|
-
onSkip: onSkip,
|
|
23307
|
-
t: t,
|
|
23308
|
-
isDisabled: !name || !mobileNumber || !gender || !dateOfBirth || !lastName || !email
|
|
23730
|
+
t: t
|
|
23309
23731
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("BPA_FIRST_NAME"), "*"), /*#__PURE__*/React.createElement(TextInput, Object.assign({
|
|
23310
23732
|
t: t,
|
|
23311
23733
|
type: "text",
|
|
@@ -23326,7 +23748,8 @@ const LicenseDetails = ({
|
|
|
23326
23748
|
isMandatory: false,
|
|
23327
23749
|
name: "Mname",
|
|
23328
23750
|
value: middleName,
|
|
23329
|
-
onChange: SelectMiddleName
|
|
23751
|
+
onChange: SelectMiddleName,
|
|
23752
|
+
disable: disable === null || disable === void 0 ? void 0 : disable.middleName
|
|
23330
23753
|
}, validation = {
|
|
23331
23754
|
isRequired: false,
|
|
23332
23755
|
pattern: "^[a-zA-Z ]*$",
|
|
@@ -23339,7 +23762,8 @@ const LicenseDetails = ({
|
|
|
23339
23762
|
optionKey: "i18nKey",
|
|
23340
23763
|
name: "Lname",
|
|
23341
23764
|
value: lastName,
|
|
23342
|
-
onChange: SelectLastName
|
|
23765
|
+
onChange: SelectLastName,
|
|
23766
|
+
disable: disable === null || disable === void 0 ? void 0 : disable.lastName
|
|
23343
23767
|
}, validation = {
|
|
23344
23768
|
isRequired: true,
|
|
23345
23769
|
pattern: "^[a-zA-Z ]*$",
|
|
@@ -23350,7 +23774,8 @@ const LicenseDetails = ({
|
|
|
23350
23774
|
onChange: handleDateOfBirthChange,
|
|
23351
23775
|
min: "1900-01-01",
|
|
23352
23776
|
max: new Date().toISOString().split("T")[0],
|
|
23353
|
-
isRequired: true
|
|
23777
|
+
isRequired: true,
|
|
23778
|
+
disabled: disable === null || disable === void 0 ? void 0 : disable.dateOfBirth
|
|
23354
23779
|
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("BPA_APPLICANT_GENDER_LABEL")}*`), /*#__PURE__*/React.createElement(RadioButtons, {
|
|
23355
23780
|
t: t,
|
|
23356
23781
|
options: menu,
|
|
@@ -23361,7 +23786,7 @@ const LicenseDetails = ({
|
|
|
23361
23786
|
onSelect: setGenderName,
|
|
23362
23787
|
isDependent: true,
|
|
23363
23788
|
labelKey: "COMMON_GENDER",
|
|
23364
|
-
|
|
23789
|
+
disabled: disable === null || disable === void 0 ? void 0 : disable.gender
|
|
23365
23790
|
}), errorMessage && /*#__PURE__*/React.createElement("div", {
|
|
23366
23791
|
style: {
|
|
23367
23792
|
color: "#d32f2f",
|
|
@@ -23397,7 +23822,11 @@ const LicenseDetails = ({
|
|
|
23397
23822
|
pattern: "[A-Za-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,4}$",
|
|
23398
23823
|
type: "email",
|
|
23399
23824
|
title: t("CORE_COMMON_APPLICANT_MOBILE_NUMBER_INVALID")
|
|
23400
|
-
})))) : /*#__PURE__*/React.createElement(Loader, null))
|
|
23825
|
+
})))) : /*#__PURE__*/React.createElement(Loader, null)), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
23826
|
+
label: t("CS_COMMON_NEXT"),
|
|
23827
|
+
onSubmit: goNext,
|
|
23828
|
+
disabled: !name || !mobileNumber || !gender || !dateOfBirth || !lastName || !email || age < 18
|
|
23829
|
+
})));
|
|
23401
23830
|
};
|
|
23402
23831
|
|
|
23403
23832
|
const CorrospondenceAddress = ({
|
|
@@ -23420,6 +23849,7 @@ const CorrospondenceAddress = ({
|
|
|
23420
23849
|
const stateId = Digit.ULBService.getStateId();
|
|
23421
23850
|
let isopenlink = window.location.href.includes("/openlink/");
|
|
23422
23851
|
const isCitizenUrl = Digit.Utils.browser.isMobile() ? true : false;
|
|
23852
|
+
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
23423
23853
|
if (isopenlink) window.onunload = function () {
|
|
23424
23854
|
sessionStorage.removeItem("Digit.BUILDING_PERMIT");
|
|
23425
23855
|
};
|
|
@@ -23441,21 +23871,21 @@ const CorrospondenceAddress = ({
|
|
|
23441
23871
|
const goNext = () => {
|
|
23442
23872
|
var _formData$result, _formData$result$Lice;
|
|
23443
23873
|
if (!(formData !== null && formData !== void 0 && formData.result && formData !== null && formData !== void 0 && (_formData$result = formData.result) !== null && _formData$result !== void 0 && (_formData$result$Lice = _formData$result.Licenses[0]) !== null && _formData$result$Lice !== void 0 && _formData$result$Lice.id)) {
|
|
23444
|
-
var _formData$LicneseDeta3, _formData$LicneseDeta4, _formData$LicneseDeta5, _formData$LicneseDeta6, _formData$LicneseDeta7, _formData$
|
|
23874
|
+
var _formData$LicneseDeta3, _formData$LicneseDeta4, _formData$LicneseDeta5, _formData$LicneseDeta6, _formData$LicneseDeta7, _formData$LicneseDeta8, _formData$LicneseDeta9, _formData$LicneseDeta0, _formData$LicneseDeta1, _formData$LicneseDeta10, _formData$LicneseDeta11, _formData$LicneseDeta12, _formData$LicneseDeta13, _formData$LicneseDeta14, _formData$LicneseType, _formData$LicneseType2, _formData$LicneseType3, _formData$LicneseType4, _formData$LicneseType5, _formData$LicneseType6, _formData$LicneseType7, _formData$LicneseDeta15, _formData$LicneseDeta16;
|
|
23445
23875
|
setIsDisableForNext(true);
|
|
23446
|
-
console.log("Correspondenceaddress", formData === null || formData === void 0 ? void 0 : formData.LicneseDetails);
|
|
23876
|
+
console.log("Correspondenceaddress", formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta3 = formData.LicneseDetails) === null || _formData$LicneseDeta3 === void 0 ? void 0 : _formData$LicneseDeta3.dateOfBirth);
|
|
23447
23877
|
let payload = {
|
|
23448
23878
|
Licenses: [{
|
|
23449
23879
|
tradeLicenseDetail: {
|
|
23450
23880
|
owners: [{
|
|
23451
|
-
gender: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
23452
|
-
mobileNumber: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
23453
|
-
name: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
23454
|
-
dob: formData !== null && formData !== void 0 && (_formData$
|
|
23455
|
-
emailId: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
23456
|
-
permanentAddress: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
23881
|
+
gender: formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta4 = formData.LicneseDetails) === null || _formData$LicneseDeta4 === void 0 ? void 0 : (_formData$LicneseDeta5 = _formData$LicneseDeta4.gender) === null || _formData$LicneseDeta5 === void 0 ? void 0 : _formData$LicneseDeta5.code,
|
|
23882
|
+
mobileNumber: formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta6 = formData.LicneseDetails) === null || _formData$LicneseDeta6 === void 0 ? void 0 : _formData$LicneseDeta6.mobileNumber,
|
|
23883
|
+
name: formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta7 = formData.LicneseDetails) === null || _formData$LicneseDeta7 === void 0 ? void 0 : _formData$LicneseDeta7.name,
|
|
23884
|
+
dob: formData !== null && formData !== void 0 && (_formData$LicneseDeta8 = formData.LicneseDetails) !== null && _formData$LicneseDeta8 !== void 0 && _formData$LicneseDeta8.dateOfBirth ? convertDateToEpoch(formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta9 = formData.LicneseDetails) === null || _formData$LicneseDeta9 === void 0 ? void 0 : _formData$LicneseDeta9.dateOfBirth) : null,
|
|
23885
|
+
emailId: formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta0 = formData.LicneseDetails) === null || _formData$LicneseDeta0 === void 0 ? void 0 : _formData$LicneseDeta0.email,
|
|
23886
|
+
permanentAddress: (formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta1 = formData.LicneseDetails) === null || _formData$LicneseDeta1 === void 0 ? void 0 : _formData$LicneseDeta1.PermanentAddress) + " , " + (formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta10 = formData.LicneseDetails) === null || _formData$LicneseDeta10 === void 0 ? void 0 : (_formData$LicneseDeta11 = _formData$LicneseDeta10.SelectedDistrict) === null || _formData$LicneseDeta11 === void 0 ? void 0 : _formData$LicneseDeta11.name) + " , " + (formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta12 = formData.LicneseDetails) === null || _formData$LicneseDeta12 === void 0 ? void 0 : (_formData$LicneseDeta13 = _formData$LicneseDeta12.SelectedState) === null || _formData$LicneseDeta13 === void 0 ? void 0 : _formData$LicneseDeta13.name),
|
|
23457
23887
|
correspondenceAddress: Correspondenceaddress,
|
|
23458
|
-
pan: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
23888
|
+
pan: formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta14 = formData.LicneseDetails) === null || _formData$LicneseDeta14 === void 0 ? void 0 : _formData$LicneseDeta14.PanNumber
|
|
23459
23889
|
}],
|
|
23460
23890
|
subOwnerShipCategory: "INDIVIDUAL",
|
|
23461
23891
|
tradeUnits: [{
|
|
@@ -23465,12 +23895,12 @@ const CorrospondenceAddress = ({
|
|
|
23465
23895
|
qualificationType: formData === null || formData === void 0 ? void 0 : (_formData$LicneseType3 = formData.LicneseType) === null || _formData$LicneseType3 === void 0 ? void 0 : (_formData$LicneseType4 = _formData$LicneseType3.qualificationType) === null || _formData$LicneseType4 === void 0 ? void 0 : _formData$LicneseType4.name,
|
|
23466
23896
|
counsilForArchNo: formData === null || formData === void 0 ? void 0 : (_formData$LicneseType5 = formData.LicneseType) === null || _formData$LicneseType5 === void 0 ? void 0 : _formData$LicneseType5.ArchitectNo,
|
|
23467
23897
|
isSelfCertificationRequired: formData !== null && formData !== void 0 && (_formData$LicneseType6 = formData.LicneseType) !== null && _formData$LicneseType6 !== void 0 && _formData$LicneseType6.selfCertification ? formData === null || formData === void 0 ? void 0 : (_formData$LicneseType7 = formData.LicneseType) === null || _formData$LicneseType7 === void 0 ? void 0 : _formData$LicneseType7.selfCertification : null,
|
|
23468
|
-
Ulb: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
23898
|
+
Ulb: formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta15 = formData.LicneseDetails) === null || _formData$LicneseDeta15 === void 0 ? void 0 : _formData$LicneseDeta15.Ulb
|
|
23469
23899
|
},
|
|
23470
23900
|
address: {
|
|
23471
23901
|
city: "",
|
|
23472
23902
|
landmark: "",
|
|
23473
|
-
pincode: formData === null || formData === void 0 ? void 0 : (_formData$
|
|
23903
|
+
pincode: formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta16 = formData.LicneseDetails) === null || _formData$LicneseDeta16 === void 0 ? void 0 : _formData$LicneseDeta16.Pincode
|
|
23474
23904
|
},
|
|
23475
23905
|
institution: null,
|
|
23476
23906
|
applicationDocuments: null
|
|
@@ -23512,7 +23942,7 @@ const CorrospondenceAddress = ({
|
|
|
23512
23942
|
style: {
|
|
23513
23943
|
border: "none"
|
|
23514
23944
|
}
|
|
23515
|
-
}, t("CS_COMMON_BACK")), /*#__PURE__*/React.createElement(Timeline, {
|
|
23945
|
+
}, t("CS_COMMON_BACK")), isMobile && /*#__PURE__*/React.createElement(Timeline, {
|
|
23516
23946
|
currentStep: 2,
|
|
23517
23947
|
flow: "STAKEHOLDER"
|
|
23518
23948
|
}), /*#__PURE__*/React.createElement(FormStep, {
|
|
@@ -23553,7 +23983,11 @@ const CorrospondenceAddress = ({
|
|
|
23553
23983
|
setShowToast(null);
|
|
23554
23984
|
setError(null);
|
|
23555
23985
|
}
|
|
23556
|
-
})
|
|
23986
|
+
}), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
23987
|
+
label: t("CS_COMMON_NEXT"),
|
|
23988
|
+
onSubmit: goNext,
|
|
23989
|
+
disabled: isDisableForNext
|
|
23990
|
+
})));
|
|
23557
23991
|
};
|
|
23558
23992
|
|
|
23559
23993
|
const PermanentAddress = ({
|
|
@@ -23564,16 +23998,15 @@ const PermanentAddress = ({
|
|
|
23564
23998
|
userType,
|
|
23565
23999
|
formData
|
|
23566
24000
|
}) => {
|
|
23567
|
-
var _formData$LicneseDeta, _formData$formData, _formData$formData$Li, _formData$LicneseDeta2, _formData$formData2, _formData$formData2$L, _formData$LicneseDeta3, _formData$formData3, _formData$formData3$L, _formData$LicneseDeta4, _formData$formData4, _formData$formData4$L, _formData$LicneseDeta5, _formData$formData5, _formData$formData5$L, _formData$LicneseType3, _formData$LicneseType4
|
|
24001
|
+
var _formData$LicneseDeta, _formData$formData, _formData$formData$Li, _formData$LicneseDeta2, _formData$formData2, _formData$formData2$L, _formData$LicneseDeta3, _formData$formData3, _formData$formData3$L, _formData$LicneseDeta4, _formData$formData4, _formData$formData4$L, _formData$LicneseDeta5, _formData$formData5, _formData$formData5$L, _formData$LicneseType3, _formData$LicneseType4;
|
|
23568
24002
|
let validation = {};
|
|
23569
|
-
const onSkip = () => onSelect();
|
|
23570
24003
|
const [PermanentAddress, setPermanentAddress] = useState((formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta = formData.LicneseDetails) === null || _formData$LicneseDeta === void 0 ? void 0 : _formData$LicneseDeta.PermanentAddress) || (formData === null || formData === void 0 ? void 0 : (_formData$formData = formData.formData) === null || _formData$formData === void 0 ? void 0 : (_formData$formData$Li = _formData$formData.LicneseDetails) === null || _formData$formData$Li === void 0 ? void 0 : _formData$formData$Li.PermanentAddress));
|
|
23571
24004
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
23572
24005
|
console.log("tenantId", tenantId);
|
|
23573
24006
|
const stateId = Digit.ULBService.getStateId();
|
|
23574
24007
|
let isopenlink = window.location.href.includes("/openlink/");
|
|
23575
24008
|
const isCitizenUrl = Digit.Utils.browser.isMobile() ? true : false;
|
|
23576
|
-
const [pinCode, setPinCode] = useState((formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta2 = formData.LicneseDetails) === null || _formData$LicneseDeta2 === void 0 ? void 0 : _formData$LicneseDeta2.
|
|
24009
|
+
const [pinCode, setPinCode] = useState((formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta2 = formData.LicneseDetails) === null || _formData$LicneseDeta2 === void 0 ? void 0 : _formData$LicneseDeta2.pincode) || (formData === null || formData === void 0 ? void 0 : (_formData$formData2 = formData.formData) === null || _formData$formData2 === void 0 ? void 0 : (_formData$formData2$L = _formData$formData2.LicneseDetails) === null || _formData$formData2$L === void 0 ? void 0 : _formData$formData2$L.pincode) || "");
|
|
23577
24010
|
const [ulbType, setUlbType] = useState("");
|
|
23578
24011
|
const [selectedUlbTypes, setSelectedUlbTypes] = useState((formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta3 = formData.LicneseDetails) === null || _formData$LicneseDeta3 === void 0 ? void 0 : _formData$LicneseDeta3.Ulb) || (formData === null || formData === void 0 ? void 0 : (_formData$formData3 = formData.formData) === null || _formData$formData3 === void 0 ? void 0 : (_formData$formData3$L = _formData$formData3.LicneseDetails) === null || _formData$formData3$L === void 0 ? void 0 : _formData$formData3$L.Ulb) || []);
|
|
23579
24012
|
const [errorMessage, setErrorMessage] = useState("");
|
|
@@ -23583,8 +24016,27 @@ const PermanentAddress = ({
|
|
|
23583
24016
|
data: districtList,
|
|
23584
24017
|
isLoading
|
|
23585
24018
|
} = Digit.Hooks.useCustomMDMS(selectedState.code, "BPA", [{
|
|
23586
|
-
name: "
|
|
24019
|
+
name: "Ulb"
|
|
23587
24020
|
}]);
|
|
24021
|
+
const stateOptions = useMemo(() => {
|
|
24022
|
+
return [{
|
|
24023
|
+
code: "pb",
|
|
24024
|
+
name: "Punjab",
|
|
24025
|
+
i18Code: "Punjab"
|
|
24026
|
+
}];
|
|
24027
|
+
}, []);
|
|
24028
|
+
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
24029
|
+
const uniqueDistricts = useMemo(() => {
|
|
24030
|
+
var _districtList$BPA, _districtList$BPA$Ulb;
|
|
24031
|
+
if (isLoading || !(districtList !== null && districtList !== void 0 && (_districtList$BPA = districtList.BPA) !== null && _districtList$BPA !== void 0 && (_districtList$BPA$Ulb = _districtList$BPA.Ulb) !== null && _districtList$BPA$Ulb !== void 0 && _districtList$BPA$Ulb.length)) return [];
|
|
24032
|
+
return [...new Set(districtList.BPA.Ulb.map(item => {
|
|
24033
|
+
var _item$Districts;
|
|
24034
|
+
return (_item$Districts = item.Districts) === null || _item$Districts === void 0 ? void 0 : _item$Districts.trim();
|
|
24035
|
+
}))].filter(Boolean).sort((a, b) => a.localeCompare(b)).map(district => ({
|
|
24036
|
+
name: district,
|
|
24037
|
+
code: district
|
|
24038
|
+
}));
|
|
24039
|
+
}, [isLoading, districtList]);
|
|
23588
24040
|
const tenantName = Digit.SessionStorage.get("OBPS_TENANTS").map(tenant => tenant.name);
|
|
23589
24041
|
useEffect(() => {
|
|
23590
24042
|
var _formData$LicneseType, _formData$LicneseType2;
|
|
@@ -23597,6 +24049,18 @@ const PermanentAddress = ({
|
|
|
23597
24049
|
console.log("Initial ULBs for BPA_ARCHITECT:", allUlbs);
|
|
23598
24050
|
}
|
|
23599
24051
|
}, [formData === null || formData === void 0 ? void 0 : (_formData$LicneseType3 = formData.LicneseType) === null || _formData$LicneseType3 === void 0 ? void 0 : (_formData$LicneseType4 = _formData$LicneseType3.LicenseType) === null || _formData$LicneseType4 === void 0 ? void 0 : _formData$LicneseType4.role]);
|
|
24052
|
+
useEffect(() => {
|
|
24053
|
+
if (typeof selectedState === "string") {
|
|
24054
|
+
const state = stateOptions.find(state => state.name === selectedState);
|
|
24055
|
+
setSelectedState(state);
|
|
24056
|
+
}
|
|
24057
|
+
}, [selectedState]);
|
|
24058
|
+
useEffect(() => {
|
|
24059
|
+
if (typeof selectedDistrict === "string" && !isLoading && uniqueDistricts.length > 0) {
|
|
24060
|
+
const district = uniqueDistricts.find(district => district.code === selectedDistrict);
|
|
24061
|
+
setSelectedDistrict(district);
|
|
24062
|
+
}
|
|
24063
|
+
}, [selectedDistrict, isLoading, uniqueDistricts]);
|
|
23600
24064
|
if (isopenlink) window.onunload = function () {
|
|
23601
24065
|
sessionStorage.removeItem("Digit.BUILDING_PERMIT");
|
|
23602
24066
|
};
|
|
@@ -23665,15 +24129,12 @@ const PermanentAddress = ({
|
|
|
23665
24129
|
style: {
|
|
23666
24130
|
border: "none"
|
|
23667
24131
|
}
|
|
23668
|
-
}, t("CS_COMMON_BACK")), /*#__PURE__*/React.createElement(Timeline, {
|
|
24132
|
+
}, t("CS_COMMON_BACK")), isMobile && /*#__PURE__*/React.createElement(Timeline, {
|
|
23669
24133
|
currentStep: 2,
|
|
23670
24134
|
flow: "STAKEHOLDER"
|
|
23671
24135
|
}), /*#__PURE__*/React.createElement(FormStep, {
|
|
23672
24136
|
config: config,
|
|
23673
|
-
|
|
23674
|
-
onSkip: onSkip,
|
|
23675
|
-
t: t,
|
|
23676
|
-
isDisabled: !PermanentAddress || selectedUlbTypes.length === 0 || pinCode === "" || !(selectedState !== null && selectedState !== void 0 && selectedState.code) || !(selectedDistrict !== null && selectedDistrict !== void 0 && selectedDistrict.code)
|
|
24137
|
+
t: t
|
|
23677
24138
|
}, /*#__PURE__*/React.createElement(CardLabel, null, `${t("BPA_PERMANANT_ADDRESS_LABEL")}*`), /*#__PURE__*/React.createElement(TextArea, {
|
|
23678
24139
|
t: t,
|
|
23679
24140
|
isMandatory: false,
|
|
@@ -23708,17 +24169,13 @@ const PermanentAddress = ({
|
|
|
23708
24169
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
23709
24170
|
t: t,
|
|
23710
24171
|
optionKey: "code",
|
|
23711
|
-
option:
|
|
23712
|
-
code: "pb",
|
|
23713
|
-
name: "Punjab",
|
|
23714
|
-
i18Code: "Punjab"
|
|
23715
|
-
}],
|
|
24172
|
+
option: stateOptions,
|
|
23716
24173
|
selected: selectedState,
|
|
23717
24174
|
select: SelectState
|
|
23718
24175
|
})), isLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", null, " ", /*#__PURE__*/React.createElement(CardLabel, null, t("BPA_DISTRICT_TYPE"), "*"), /*#__PURE__*/React.createElement(Dropdown, {
|
|
23719
24176
|
t: t,
|
|
23720
24177
|
optionKey: "code",
|
|
23721
|
-
option:
|
|
24178
|
+
option: uniqueDistricts,
|
|
23722
24179
|
selected: selectedDistrict,
|
|
23723
24180
|
select: SelectDistrict
|
|
23724
24181
|
})), /*#__PURE__*/React.createElement(CardLabel, null, t("BPA_SELECT_ULB"), "*"), /*#__PURE__*/React.createElement(MultiSelectDropdown, {
|
|
@@ -23730,7 +24187,11 @@ const PermanentAddress = ({
|
|
|
23730
24187
|
defaultLabel: t("Select ULBs"),
|
|
23731
24188
|
defaultUnit: t("ULBs"),
|
|
23732
24189
|
selected: selectedUlbTypes
|
|
23733
|
-
})))
|
|
24190
|
+
}))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
24191
|
+
label: t("CS_COMMON_NEXT"),
|
|
24192
|
+
onSubmit: goNext,
|
|
24193
|
+
disabled: !PermanentAddress || selectedUlbTypes.length === 0 || pinCode === "" || !(selectedState !== null && selectedState !== void 0 && selectedState.code) || !(selectedDistrict !== null && selectedDistrict !== void 0 && selectedDistrict.code)
|
|
24194
|
+
})));
|
|
23734
24195
|
};
|
|
23735
24196
|
|
|
23736
24197
|
const StakeholderDocuments = ({
|
|
@@ -23753,6 +24214,7 @@ const StakeholderDocuments = ({
|
|
|
23753
24214
|
const [checkRequiredFields, setCheckRequiredFields] = useState(false);
|
|
23754
24215
|
const isCitizenUrl = Digit.Utils.browser.isMobile() ? true : false;
|
|
23755
24216
|
let isopenlink = window.location.href.includes("/openlink/");
|
|
24217
|
+
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
23756
24218
|
if (isopenlink) window.onunload = function () {
|
|
23757
24219
|
sessionStorage.removeItem("Digit.BUILDING_PERMIT");
|
|
23758
24220
|
};
|
|
@@ -23813,7 +24275,7 @@ const StakeholderDocuments = ({
|
|
|
23813
24275
|
style: {
|
|
23814
24276
|
border: "none"
|
|
23815
24277
|
}
|
|
23816
|
-
}, t("CS_COMMON_BACK")), /*#__PURE__*/React.createElement(Timeline, {
|
|
24278
|
+
}, t("CS_COMMON_BACK")), isMobile && /*#__PURE__*/React.createElement(Timeline, {
|
|
23817
24279
|
currentStep: 3,
|
|
23818
24280
|
flow: "STAKEHOLDER"
|
|
23819
24281
|
}), !isLoading ? /*#__PURE__*/React.createElement(FormStep, {
|
|
@@ -23847,6 +24309,10 @@ const StakeholderDocuments = ({
|
|
|
23847
24309
|
info: t("CS_FILE_APPLICATION_INFO_LABEL"),
|
|
23848
24310
|
text: `${t("BPA_APPLICATION_NUMBER_LABEL")} ${formData === null || formData === void 0 ? void 0 : (_formData$result = formData.result) === null || _formData$result === void 0 ? void 0 : (_formData$result$Lice = _formData$result.Licenses) === null || _formData$result$Lice === void 0 ? void 0 : (_formData$result$Lice2 = _formData$result$Lice[0]) === null || _formData$result$Lice2 === void 0 ? void 0 : _formData$result$Lice2.applicationNumber} ${t("BPA_DOCS_INFORMATION")}`,
|
|
23849
24311
|
className: "info-banner-wrap-citizen-override"
|
|
24312
|
+
})), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
24313
|
+
label: t("CS_COMMON_NEXT"),
|
|
24314
|
+
onSubmit: handleSubmit,
|
|
24315
|
+
disabled: enableSubmit
|
|
23850
24316
|
})));
|
|
23851
24317
|
};
|
|
23852
24318
|
function SelectDocument$2({
|
|
@@ -39533,7 +39999,7 @@ const CheckPage$3 = ({
|
|
|
39533
39999
|
onSubmit,
|
|
39534
40000
|
value
|
|
39535
40001
|
}) => {
|
|
39536
|
-
var _user$info, _user$info2, _result$Licenses, _result$Licenses$,
|
|
40002
|
+
var _user$info, _user$info2, _result$Licenses, _result$Licenses$, _formData$LicneseType, _formData$LicneseType2, _formData$LicneseType3, _formData$LicneseType4, _formData$LicneseType5, _formData$LicneseType6, _formData$LicneseType7, _formData$LicneseType8, _formData$LicneseType9, _formData$LicneseType0, _formData$LicneseType1, _formData$LicneseType10, _formData$LicneseType11, _formData$LicneseType12, _formData$LicneseDeta, _formData$LicneseDeta2, _formData$LicneseDeta3, _formData$LicneseDeta4, _formData$LicneseDeta5, _formData$LicneseDeta6, _formData$LicneseDeta7, _formData$LicneseDeta8, _formData$LicneseDeta9, _formData$LicneseDeta0, _formData$LicneseDeta1, _formData$LicneseDeta10, _formData$LicneseType13, _formData$LicneseType14, _formData$LicneseType15, _formData$LicneseDeta11, _formData$LicneseDeta12, _documents$documents, _paymentDetails$billR, _paymentDetails$billR2, _paymentDetails$billR3, _paymentDetails$billR4, _paymentDetails$billR5, _paymentDetails$billR6, _paymentDetails$billR7, _paymentDetails$billR8, _paymentDetails$billR9, _paymentDetails$billR0, _paymentDetails$billR1, _paymentDetails$billR10, _paymentDetails$billR11, _paymentDetails$billR12, _paymentDetails$billR13;
|
|
39537
40003
|
const {
|
|
39538
40004
|
t
|
|
39539
40005
|
} = useTranslation();
|
|
@@ -39552,8 +40018,6 @@ const CheckPage$3 = ({
|
|
|
39552
40018
|
formData,
|
|
39553
40019
|
documents
|
|
39554
40020
|
} = safeValue;
|
|
39555
|
-
console.log(safeValue, "Final Value after refresh handling");
|
|
39556
|
-
console.log(value, "VVVV");
|
|
39557
40021
|
let consumerCode = result === null || result === void 0 ? void 0 : result.Licenses[0].applicationNumber;
|
|
39558
40022
|
const fetchBillParams = {
|
|
39559
40023
|
consumerCode
|
|
@@ -39564,213 +40028,118 @@ const CheckPage$3 = ({
|
|
|
39564
40028
|
} = Digit.Hooks.obps.useBPAREGgetbill({
|
|
39565
40029
|
businessService: "BPAREG",
|
|
39566
40030
|
...fetchBillParams,
|
|
39567
|
-
tenantId: tenant
|
|
40031
|
+
tenantId: tenant || tenantId.split(".")[0]
|
|
39568
40032
|
}, {
|
|
39569
40033
|
enabled: consumerCode ? true : false,
|
|
39570
40034
|
retry: false
|
|
39571
40035
|
});
|
|
39572
|
-
console.log(formData, "CHECK FORM");
|
|
39573
40036
|
if (isLoading) {
|
|
39574
40037
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
39575
40038
|
}
|
|
39576
|
-
|
|
39577
|
-
|
|
39578
|
-
|
|
39579
|
-
|
|
39580
|
-
|
|
39581
|
-
|
|
39582
|
-
|
|
40039
|
+
console.log("formDataInCheckPage", formData);
|
|
40040
|
+
const pageStyle = {
|
|
40041
|
+
padding: "2rem",
|
|
40042
|
+
backgroundColor: "#f1f1f1ff",
|
|
40043
|
+
fontFamily: "'Segoe UI', Tahoma, Geneva, Verdana, sans-serif",
|
|
40044
|
+
color: "#333",
|
|
40045
|
+
paddingBottom: "5rem"
|
|
40046
|
+
};
|
|
40047
|
+
const sectionStyle = {
|
|
40048
|
+
backgroundColor: "#ffffff",
|
|
40049
|
+
padding: "1rem 1.5rem",
|
|
40050
|
+
borderRadius: "8px",
|
|
40051
|
+
marginBottom: "2rem",
|
|
40052
|
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.05)"
|
|
40053
|
+
};
|
|
40054
|
+
const headingStyle = {
|
|
40055
|
+
fontSize: "1.5rem",
|
|
40056
|
+
borderBottom: "2px solid #ccc",
|
|
40057
|
+
paddingBottom: "0.3rem",
|
|
40058
|
+
color: "#2e4a66",
|
|
40059
|
+
marginTop: "2rem",
|
|
40060
|
+
marginBottom: "1rem"
|
|
40061
|
+
};
|
|
40062
|
+
const labelFieldPairStyle = {
|
|
40063
|
+
display: "flex",
|
|
40064
|
+
justifyContent: "space-between",
|
|
40065
|
+
borderBottom: "1px dashed #e0e0e0",
|
|
40066
|
+
padding: "0.5rem 0",
|
|
40067
|
+
color: "#333"
|
|
40068
|
+
};
|
|
40069
|
+
const documentsContainerStyle = {
|
|
40070
|
+
display: "flex",
|
|
40071
|
+
flexWrap: "wrap",
|
|
40072
|
+
gap: "1rem"
|
|
40073
|
+
};
|
|
40074
|
+
const documentCardStyle = {
|
|
40075
|
+
flex: isCitizenUrl ? "1 1 18%" : "1 1 22%",
|
|
40076
|
+
minWidth: "200px",
|
|
40077
|
+
maxWidth: "250px",
|
|
40078
|
+
backgroundColor: "#fdfdfd",
|
|
40079
|
+
padding: "0.75rem",
|
|
40080
|
+
border: "1px solid #e0e0e0",
|
|
40081
|
+
borderRadius: "6px",
|
|
40082
|
+
boxShadow: "0 1px 3px rgba(0,0,0,0.05)"
|
|
40083
|
+
};
|
|
40084
|
+
const boldLabelStyle = {
|
|
40085
|
+
fontWeight: "bold",
|
|
40086
|
+
color: "#555"
|
|
40087
|
+
};
|
|
40088
|
+
const renderLabel = (label, value) => /*#__PURE__*/React.createElement("div", {
|
|
40089
|
+
style: labelFieldPairStyle
|
|
40090
|
+
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
40091
|
+
style: boldLabelStyle
|
|
40092
|
+
}, label), /*#__PURE__*/React.createElement("div", null, value || t("CS_NA")));
|
|
40093
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
40094
|
+
style: pageStyle
|
|
40095
|
+
}, isMobile && /*#__PURE__*/React.createElement(Timeline, {
|
|
39583
40096
|
currentStep: 4,
|
|
39584
40097
|
flow: "STAKEHOLDER"
|
|
39585
|
-
}), /*#__PURE__*/React.createElement(
|
|
39586
|
-
|
|
39587
|
-
|
|
39588
|
-
|
|
39589
|
-
|
|
39590
|
-
|
|
39591
|
-
|
|
39592
|
-
|
|
39593
|
-
|
|
39594
|
-
|
|
39595
|
-
|
|
39596
|
-
|
|
39597
|
-
|
|
39598
|
-
|
|
39599
|
-
|
|
39600
|
-
|
|
39601
|
-
|
|
39602
|
-
|
|
39603
|
-
|
|
39604
|
-
|
|
39605
|
-
|
|
39606
|
-
|
|
39607
|
-
|
|
39608
|
-
|
|
39609
|
-
|
|
39610
|
-
|
|
39611
|
-
|
|
39612
|
-
|
|
39613
|
-
|
|
39614
|
-
}
|
|
39615
|
-
|
|
39616
|
-
|
|
39617
|
-
|
|
39618
|
-
|
|
39619
|
-
|
|
39620
|
-
|
|
39621
|
-
|
|
39622
|
-
|
|
39623
|
-
|
|
39624
|
-
|
|
39625
|
-
|
|
39626
|
-
}, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(CardHeader, {
|
|
39627
|
-
styles: {
|
|
39628
|
-
fontSize: "24px"
|
|
39629
|
-
}
|
|
39630
|
-
}, t(`BPA_LICENSE_DET_CAPTION`)), /*#__PURE__*/React.createElement(Row, {
|
|
39631
|
-
className: "border-none",
|
|
39632
|
-
label: t(`BPA_APPLICANT_NAME_LABEL`),
|
|
39633
|
-
text: t(formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta = formData.LicneseDetails) === null || _formData$LicneseDeta === void 0 ? void 0 : _formData$LicneseDeta.name)
|
|
39634
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
39635
|
-
className: "border-none",
|
|
39636
|
-
label: t(`BPA_APPLICANT_GENDER_LABEL`),
|
|
39637
|
-
text: t(formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta2 = formData.LicneseDetails) === null || _formData$LicneseDeta2 === void 0 ? void 0 : _formData$LicneseDeta2.gender.i18nKey)
|
|
39638
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
39639
|
-
className: "border-none",
|
|
39640
|
-
label: t(`BPA_OWNER_MOBILE_NO_LABEL`),
|
|
39641
|
-
text: formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta3 = formData.LicneseDetails) === null || _formData$LicneseDeta3 === void 0 ? void 0 : _formData$LicneseDeta3.mobileNumber
|
|
39642
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
39643
|
-
className: "border-none",
|
|
39644
|
-
label: t(`BPA_APPLICANT_EMAIL_LABEL`),
|
|
39645
|
-
text: (formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta4 = formData.LicneseDetails) === null || _formData$LicneseDeta4 === void 0 ? void 0 : _formData$LicneseDeta4.email) || t("CS_NA")
|
|
39646
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
39647
|
-
className: "border-none",
|
|
39648
|
-
label: t(`BPA_APPLICANT_DOB_LABEL`),
|
|
39649
|
-
text: (formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta5 = formData.LicneseDetails) === null || _formData$LicneseDeta5 === void 0 ? void 0 : _formData$LicneseDeta5.dateOfBirth) || t("CS_NA")
|
|
39650
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
39651
|
-
className: "border-none",
|
|
39652
|
-
label: t(`BPA_DETAILS_PIN_LABEL`),
|
|
39653
|
-
text: (formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta6 = formData.LicneseDetails) === null || _formData$LicneseDeta6 === void 0 ? void 0 : _formData$LicneseDeta6.Pincode) || t("CS_NA")
|
|
39654
|
-
}))), /*#__PURE__*/React.createElement(Card, {
|
|
39655
|
-
style: {
|
|
39656
|
-
paddingRight: "16px"
|
|
39657
|
-
}
|
|
39658
|
-
}, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement("div", {
|
|
39659
|
-
style: {
|
|
39660
|
-
marginRight: "24px"
|
|
39661
|
-
}
|
|
39662
|
-
}, /*#__PURE__*/React.createElement(CardHeader, {
|
|
39663
|
-
styles: {
|
|
39664
|
-
fontSize: "24px"
|
|
39665
|
-
}
|
|
39666
|
-
}, t(`BPA_PERMANANT_ADDRESS_LABEL`))), /*#__PURE__*/React.createElement(CardText, {
|
|
39667
|
-
style: isMobile ? {
|
|
39668
|
-
color: "black"
|
|
39669
|
-
} : {
|
|
39670
|
-
color: "black",
|
|
39671
|
-
fontSize: "16px"
|
|
39672
|
-
}
|
|
39673
|
-
}, t(formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta7 = formData.LicneseDetails) === null || _formData$LicneseDeta7 === void 0 ? void 0 : _formData$LicneseDeta7.PermanentAddress)), formData !== null && formData !== void 0 && (_formData$LicneseType1 = formData.LicneseType) !== null && _formData$LicneseType1 !== void 0 && (_formData$LicneseType10 = _formData$LicneseType1.LicenseType) !== null && _formData$LicneseType10 !== void 0 && _formData$LicneseType10.i18nKey.includes("ARCHITECT") ? /*#__PURE__*/React.createElement(Row, {
|
|
39674
|
-
className: "border-none",
|
|
39675
|
-
label: t(`BPA_SELECTED_ULB`),
|
|
39676
|
-
text: t("BPA_ULB_SELECTED_MESSAGE ")
|
|
39677
|
-
}) : /*#__PURE__*/React.createElement(Row, {
|
|
39678
|
-
className: "border-none",
|
|
39679
|
-
label: t(`BPA_SELECTED_ULB`),
|
|
39680
|
-
text: formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta8 = formData.LicneseDetails) === null || _formData$LicneseDeta8 === void 0 ? void 0 : (_formData$LicneseDeta9 = _formData$LicneseDeta8.Ulb) === null || _formData$LicneseDeta9 === void 0 ? void 0 : _formData$LicneseDeta9.map(obj => obj.ulbname).join(", ")
|
|
39681
|
-
}))), /*#__PURE__*/React.createElement(Card, {
|
|
39682
|
-
style: {
|
|
39683
|
-
paddingRight: "16px"
|
|
39684
|
-
}
|
|
39685
|
-
}, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement("div", {
|
|
39686
|
-
style: {
|
|
39687
|
-
marginRight: "24px"
|
|
39688
|
-
}
|
|
39689
|
-
}, /*#__PURE__*/React.createElement(CardHeader, {
|
|
39690
|
-
styles: {
|
|
39691
|
-
fontSize: "24px"
|
|
39692
|
-
}
|
|
39693
|
-
}, t(`BPA_COMMUNICATION_ADDRESS_HEADER_DETAILS`))), /*#__PURE__*/React.createElement(CardText, {
|
|
39694
|
-
style: isMobile ? {
|
|
39695
|
-
color: "black"
|
|
39696
|
-
} : {
|
|
39697
|
-
color: "black",
|
|
39698
|
-
fontSize: "16px"
|
|
39699
|
-
}
|
|
39700
|
-
}, t(safeValue === null || safeValue === void 0 ? void 0 : safeValue.Correspondenceaddress)))), /*#__PURE__*/React.createElement(Card, {
|
|
39701
|
-
style: {
|
|
39702
|
-
paddingRight: "16px"
|
|
39703
|
-
}
|
|
39704
|
-
}, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(CardHeader, {
|
|
39705
|
-
styles: {
|
|
39706
|
-
fontSize: "24px"
|
|
39707
|
-
}
|
|
39708
|
-
}, t("BPA_DOC_DETAILS_SUMMARY")), documents === null || documents === void 0 ? void 0 : documents.documents.map((doc, index) => {
|
|
39709
|
-
var _doc$documentType, _documents$documents;
|
|
39710
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
39711
|
-
key: index
|
|
39712
|
-
}, /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
39713
|
-
styles: {
|
|
39714
|
-
fontSize: "18px"
|
|
39715
|
-
}
|
|
39716
|
-
}, t(`BPAREG_HEADER_${doc === null || doc === void 0 ? void 0 : (_doc$documentType = doc.documentType) === null || _doc$documentType === void 0 ? void 0 : _doc$documentType.replace(".", "_")}`)), doc !== null && doc !== void 0 && doc.info ? /*#__PURE__*/React.createElement("div", {
|
|
39717
|
-
style: {
|
|
39718
|
-
fontSize: "12px",
|
|
39719
|
-
color: "#505A5F",
|
|
39720
|
-
fontWeight: 400,
|
|
39721
|
-
lineHeight: "15px"
|
|
39722
|
-
}
|
|
39723
|
-
}, `${t(doc === null || doc === void 0 ? void 0 : doc.info)}`) : null, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(OBPSDocument, {
|
|
39724
|
-
value: safeValue,
|
|
39725
|
-
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
39726
|
-
index: index,
|
|
39727
|
-
isNOC: false,
|
|
39728
|
-
svgStyles: {},
|
|
39729
|
-
isStakeHolder: true
|
|
39730
|
-
}), (documents === null || documents === void 0 ? void 0 : (_documents$documents = documents.documents) === null || _documents$documents === void 0 ? void 0 : _documents$documents.length) != index + 1 ? /*#__PURE__*/React.createElement("hr", {
|
|
39731
|
-
style: {
|
|
39732
|
-
color: "#cccccc",
|
|
39733
|
-
backgroundColor: "#cccccc",
|
|
39734
|
-
height: "2px",
|
|
39735
|
-
marginTop: "20px",
|
|
39736
|
-
marginBottom: "20px"
|
|
39737
|
-
}
|
|
39738
|
-
}) : null));
|
|
39739
|
-
}))), /*#__PURE__*/React.createElement(Card, {
|
|
39740
|
-
style: {
|
|
39741
|
-
paddingRight: "16px"
|
|
39742
|
-
}
|
|
39743
|
-
}, /*#__PURE__*/React.createElement(CardHeader, {
|
|
39744
|
-
styles: {
|
|
39745
|
-
fontSize: "24px"
|
|
39746
|
-
}
|
|
39747
|
-
}, t("BPA_SUMMARY_FEE_EST")), /*#__PURE__*/React.createElement(StatusTable, null, paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$billR = paymentDetails.billResponse) === null || _paymentDetails$billR === void 0 ? void 0 : (_paymentDetails$billR2 = _paymentDetails$billR.Bill[0]) === null || _paymentDetails$billR2 === void 0 ? void 0 : (_paymentDetails$billR3 = _paymentDetails$billR2.billDetails[0]) === null || _paymentDetails$billR3 === void 0 ? void 0 : _paymentDetails$billR3.billAccountDetails.map((bill, index) => /*#__PURE__*/React.createElement("div", {
|
|
39748
|
-
key: index
|
|
39749
|
-
}, /*#__PURE__*/React.createElement(Row, {
|
|
39750
|
-
className: "border-none",
|
|
39751
|
-
label: t(`${bill.taxHeadCode}`),
|
|
39752
|
-
text: `₹ ${bill === null || bill === void 0 ? void 0 : bill.amount}` || t("CS_NA")
|
|
39753
|
-
}))), /*#__PURE__*/React.createElement(Row, {
|
|
39754
|
-
className: "border-none",
|
|
39755
|
-
label: t(`BPA_COMMON_TOTAL_AMT`),
|
|
39756
|
-
text: `₹ ${paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$billR4 = paymentDetails.billResponse) === null || _paymentDetails$billR4 === void 0 ? void 0 : (_paymentDetails$billR5 = _paymentDetails$billR4.Bill) === null || _paymentDetails$billR5 === void 0 ? void 0 : (_paymentDetails$billR6 = _paymentDetails$billR5[0]) === null || _paymentDetails$billR6 === void 0 ? void 0 : (_paymentDetails$billR7 = _paymentDetails$billR6.billDetails[0]) === null || _paymentDetails$billR7 === void 0 ? void 0 : _paymentDetails$billR7.amount}` || t("CS_NA")
|
|
39757
|
-
})), /*#__PURE__*/React.createElement("hr", {
|
|
39758
|
-
style: {
|
|
39759
|
-
color: "#cccccc",
|
|
39760
|
-
backgroundColor: "#cccccc",
|
|
39761
|
-
height: "2px",
|
|
39762
|
-
marginTop: "20px",
|
|
39763
|
-
marginBottom: "20px"
|
|
39764
|
-
}
|
|
39765
|
-
}), /*#__PURE__*/React.createElement(CardHeader, {
|
|
39766
|
-
styles: {
|
|
39767
|
-
fontSize: "24px"
|
|
39768
|
-
}
|
|
39769
|
-
}, t("BPA_COMMON_TOTAL_AMT")), /*#__PURE__*/React.createElement(CardHeader, null, "\u20B9 ", paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$billR8 = paymentDetails.billResponse) === null || _paymentDetails$billR8 === void 0 ? void 0 : (_paymentDetails$billR9 = _paymentDetails$billR8.Bill) === null || _paymentDetails$billR9 === void 0 ? void 0 : (_paymentDetails$billR0 = _paymentDetails$billR9[0]) === null || _paymentDetails$billR0 === void 0 ? void 0 : (_paymentDetails$billR1 = _paymentDetails$billR0.billDetails[0]) === null || _paymentDetails$billR1 === void 0 ? void 0 : _paymentDetails$billR1.amount), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
40098
|
+
}), /*#__PURE__*/React.createElement("h2", {
|
|
40099
|
+
style: headingStyle
|
|
40100
|
+
}, t("BPA_STEPPER_SUMMARY_HEADER")), /*#__PURE__*/React.createElement("div", {
|
|
40101
|
+
style: sectionStyle
|
|
40102
|
+
}, renderLabel(t("BPA_APPLICATION_NUMBER_LABEL"), result === null || result === void 0 ? void 0 : (_result$Licenses = result.Licenses) === null || _result$Licenses === void 0 ? void 0 : (_result$Licenses$ = _result$Licenses[0]) === null || _result$Licenses$ === void 0 ? void 0 : _result$Licenses$.applicationNumber)), /*#__PURE__*/React.createElement("div", {
|
|
40103
|
+
style: sectionStyle
|
|
40104
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
40105
|
+
style: headingStyle
|
|
40106
|
+
}, t("BPA_LICENSE_TYPE")), renderLabel(t("BPA_QUALIFICATION_TYPE"), t(typeof (formData === null || formData === void 0 ? void 0 : (_formData$LicneseType = formData.LicneseType) === null || _formData$LicneseType === void 0 ? void 0 : _formData$LicneseType.qualificationType) === "string" ? formData === null || formData === void 0 ? void 0 : (_formData$LicneseType2 = formData.LicneseType) === null || _formData$LicneseType2 === void 0 ? void 0 : _formData$LicneseType2.qualificationType : formData === null || formData === void 0 ? void 0 : (_formData$LicneseType3 = formData.LicneseType) === null || _formData$LicneseType3 === void 0 ? void 0 : (_formData$LicneseType4 = _formData$LicneseType3.qualificationType) === null || _formData$LicneseType4 === void 0 ? void 0 : _formData$LicneseType4.name)), renderLabel(t("BPA_LICENSE_TYPE"), t(formData === null || formData === void 0 ? void 0 : (_formData$LicneseType5 = formData.LicneseType) === null || _formData$LicneseType5 === void 0 ? void 0 : (_formData$LicneseType6 = _formData$LicneseType5.LicenseType) === null || _formData$LicneseType6 === void 0 ? void 0 : _formData$LicneseType6.i18nKey)), (formData === null || formData === void 0 ? void 0 : (_formData$LicneseType7 = formData.LicneseType) === null || _formData$LicneseType7 === void 0 ? void 0 : (_formData$LicneseType8 = _formData$LicneseType7.LicenseType) === null || _formData$LicneseType8 === void 0 ? void 0 : (_formData$LicneseType9 = _formData$LicneseType8.i18nKey) === null || _formData$LicneseType9 === void 0 ? void 0 : _formData$LicneseType9.includes("ARCHITECT")) && renderLabel(t("BPA_COUNCIL_NUMBER"), formData === null || formData === void 0 ? void 0 : (_formData$LicneseType0 = formData.LicneseType) === null || _formData$LicneseType0 === void 0 ? void 0 : _formData$LicneseType0.ArchitectNo), (formData === null || formData === void 0 ? void 0 : (_formData$LicneseType1 = formData.LicneseType) === null || _formData$LicneseType1 === void 0 ? void 0 : (_formData$LicneseType10 = _formData$LicneseType1.LicenseType) === null || _formData$LicneseType10 === void 0 ? void 0 : (_formData$LicneseType11 = _formData$LicneseType10.i18nKey) === null || _formData$LicneseType11 === void 0 ? void 0 : _formData$LicneseType11.includes("TOWNPLANNER")) && renderLabel(t("BPA_ASSOCIATE_OR_FELLOW_NUMBER"), formData === null || formData === void 0 ? void 0 : (_formData$LicneseType12 = formData.LicneseType) === null || _formData$LicneseType12 === void 0 ? void 0 : _formData$LicneseType12.ArchitectNo)), /*#__PURE__*/React.createElement("div", {
|
|
40107
|
+
style: sectionStyle
|
|
40108
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
40109
|
+
style: headingStyle
|
|
40110
|
+
}, t("BPA_LICENSE_DET_CAPTION")), renderLabel(t("BPA_APPLICANT_NAME_LABEL"), [formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta = formData.LicneseDetails) === null || _formData$LicneseDeta === void 0 ? void 0 : (_formData$LicneseDeta2 = _formData$LicneseDeta.name) === null || _formData$LicneseDeta2 === void 0 ? void 0 : _formData$LicneseDeta2.trim(), formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta3 = formData.LicneseDetails) === null || _formData$LicneseDeta3 === void 0 ? void 0 : (_formData$LicneseDeta4 = _formData$LicneseDeta3.middleName) === null || _formData$LicneseDeta4 === void 0 ? void 0 : _formData$LicneseDeta4.trim(), formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta5 = formData.LicneseDetails) === null || _formData$LicneseDeta5 === void 0 ? void 0 : (_formData$LicneseDeta6 = _formData$LicneseDeta5.lastName) === null || _formData$LicneseDeta6 === void 0 ? void 0 : _formData$LicneseDeta6.trim()].filter(Boolean).join(" ")), renderLabel(t("BPA_APPLICANT_GENDER_LABEL"), t(formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta7 = formData.LicneseDetails) === null || _formData$LicneseDeta7 === void 0 ? void 0 : _formData$LicneseDeta7.gender.i18nKey)), renderLabel(t("BPA_OWNER_MOBILE_NO_LABEL"), formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta8 = formData.LicneseDetails) === null || _formData$LicneseDeta8 === void 0 ? void 0 : _formData$LicneseDeta8.mobileNumber), renderLabel(t("BPA_APPLICANT_EMAIL_LABEL"), formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta9 = formData.LicneseDetails) === null || _formData$LicneseDeta9 === void 0 ? void 0 : _formData$LicneseDeta9.email), renderLabel(t("BPA_APPLICANT_DOB_LABEL"), formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta0 = formData.LicneseDetails) === null || _formData$LicneseDeta0 === void 0 ? void 0 : _formData$LicneseDeta0.dateOfBirth), renderLabel(t("BPA_DETAILS_PIN_LABEL"), formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta1 = formData.LicneseDetails) === null || _formData$LicneseDeta1 === void 0 ? void 0 : _formData$LicneseDeta1.Pincode)), /*#__PURE__*/React.createElement("div", {
|
|
40111
|
+
style: sectionStyle
|
|
40112
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
40113
|
+
style: headingStyle
|
|
40114
|
+
}, t("BPA_PERMANANT_ADDRESS_LABEL")), renderLabel(t("BPA_APPLICANT_ADDRESS_LABEL"), formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta10 = formData.LicneseDetails) === null || _formData$LicneseDeta10 === void 0 ? void 0 : _formData$LicneseDeta10.PermanentAddress), formData !== null && formData !== void 0 && (_formData$LicneseType13 = formData.LicneseType) !== null && _formData$LicneseType13 !== void 0 && (_formData$LicneseType14 = _formData$LicneseType13.LicenseType) !== null && _formData$LicneseType14 !== void 0 && (_formData$LicneseType15 = _formData$LicneseType14.i18nKey) !== null && _formData$LicneseType15 !== void 0 && _formData$LicneseType15.includes("ARCHITECT") ? renderLabel(t("BPA_SELECTED_ULB"), t("BPA_ULB_SELECTED_MESSAGE")) : renderLabel(t("BPA_SELECTED_ULB"), formData === null || formData === void 0 ? void 0 : (_formData$LicneseDeta11 = formData.LicneseDetails) === null || _formData$LicneseDeta11 === void 0 ? void 0 : (_formData$LicneseDeta12 = _formData$LicneseDeta11.Ulb) === null || _formData$LicneseDeta12 === void 0 ? void 0 : _formData$LicneseDeta12.map(obj => obj.ulbname).join(", "))), /*#__PURE__*/React.createElement("div", {
|
|
40115
|
+
style: sectionStyle
|
|
40116
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
40117
|
+
style: headingStyle
|
|
40118
|
+
}, t("BPA_COMMUNICATION_ADDRESS_HEADER_DETAILS")), renderLabel(t("Address"), safeValue === null || safeValue === void 0 ? void 0 : safeValue.Correspondenceaddress)), /*#__PURE__*/React.createElement("div", {
|
|
40119
|
+
style: sectionStyle
|
|
40120
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
40121
|
+
style: headingStyle
|
|
40122
|
+
}, t("BPA_DOC_DETAILS_SUMMARY")), (documents === null || documents === void 0 ? void 0 : (_documents$documents = documents.documents) === null || _documents$documents === void 0 ? void 0 : _documents$documents.length) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
40123
|
+
style: documentsContainerStyle
|
|
40124
|
+
}, documents === null || documents === void 0 ? void 0 : documents.documents.map((doc, index) => /*#__PURE__*/React.createElement("div", {
|
|
40125
|
+
key: index,
|
|
40126
|
+
style: documentCardStyle
|
|
40127
|
+
}, /*#__PURE__*/React.createElement(OBPSDocument, {
|
|
40128
|
+
value: safeValue,
|
|
40129
|
+
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
40130
|
+
index: index,
|
|
40131
|
+
isNOC: false,
|
|
40132
|
+
svgStyles: {},
|
|
40133
|
+
isStakeHolder: true
|
|
40134
|
+
})))) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG"))), /*#__PURE__*/React.createElement("div", {
|
|
40135
|
+
style: sectionStyle
|
|
40136
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
40137
|
+
style: headingStyle
|
|
40138
|
+
}, t("BPA_SUMMARY_FEE_EST")), paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$billR = paymentDetails.billResponse) === null || _paymentDetails$billR === void 0 ? void 0 : (_paymentDetails$billR2 = _paymentDetails$billR.Bill[0]) === null || _paymentDetails$billR2 === void 0 ? void 0 : (_paymentDetails$billR3 = _paymentDetails$billR2.billDetails[0]) === null || _paymentDetails$billR3 === void 0 ? void 0 : _paymentDetails$billR3.billAccountDetails.map((bill, index) => renderLabel(t(bill.taxHeadCode), `₹ ${bill === null || bill === void 0 ? void 0 : bill.amount}`)), renderLabel(t("BPA_COMMON_TOTAL_AMT"), `₹ ${paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$billR4 = paymentDetails.billResponse) === null || _paymentDetails$billR4 === void 0 ? void 0 : (_paymentDetails$billR5 = _paymentDetails$billR4.Bill) === null || _paymentDetails$billR5 === void 0 ? void 0 : (_paymentDetails$billR6 = _paymentDetails$billR5[0]) === null || _paymentDetails$billR6 === void 0 ? void 0 : (_paymentDetails$billR7 = _paymentDetails$billR6.billDetails[0]) === null || _paymentDetails$billR7 === void 0 ? void 0 : _paymentDetails$billR7.amount}`)), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
39770
40139
|
label: t("CS_COMMON_SUBMIT"),
|
|
39771
40140
|
onSubmit: onSubmit,
|
|
39772
|
-
disabled: typeof (paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$
|
|
39773
|
-
})))
|
|
40141
|
+
disabled: typeof (paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$billR8 = paymentDetails.billResponse) === null || _paymentDetails$billR8 === void 0 ? void 0 : (_paymentDetails$billR9 = _paymentDetails$billR8.Bill) === null || _paymentDetails$billR9 === void 0 ? void 0 : (_paymentDetails$billR0 = _paymentDetails$billR9[0]) === null || _paymentDetails$billR0 === void 0 ? void 0 : (_paymentDetails$billR1 = _paymentDetails$billR0.billDetails[0]) === null || _paymentDetails$billR1 === void 0 ? void 0 : _paymentDetails$billR1.amount) !== "number" || (paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$billR10 = paymentDetails.billResponse) === null || _paymentDetails$billR10 === void 0 ? void 0 : (_paymentDetails$billR11 = _paymentDetails$billR10.Bill) === null || _paymentDetails$billR11 === void 0 ? void 0 : (_paymentDetails$billR12 = _paymentDetails$billR11[0]) === null || _paymentDetails$billR12 === void 0 ? void 0 : (_paymentDetails$billR13 = _paymentDetails$billR12.billDetails[0]) === null || _paymentDetails$billR13 === void 0 ? void 0 : _paymentDetails$billR13.amount) < 0
|
|
40142
|
+
})));
|
|
39774
40143
|
};
|
|
39775
40144
|
|
|
39776
40145
|
const EDCRAcknowledgement = props => {
|
|
@@ -40635,86 +41004,6 @@ const Acknowledgement = props => {
|
|
|
40635
41004
|
})))));
|
|
40636
41005
|
};
|
|
40637
41006
|
|
|
40638
|
-
const getAcknowledgementData = async (application, tenantInfo, t) => {
|
|
40639
|
-
var _application$applicat, _application$applicat2, _application$applicat3, _application$applicat4, _application$applicat5, _application$applicat6, _application$applicat7, _application$applicat8, _application$applicat9, _application$applicat0, _application$applicat1, _application$applicat10, _application$applicat11, _application$applicat12, _application$applicat13, _application$applicat14, _application$applicat15, _application$applicat16, _application$applicat17, _application$applicat18, _application$applicat19, _application$applicat20, _application$applicat21, _application$applicat22, _application$applicat23, _application$applicat24, _application$applicat25, _application$applicat26, _application$applicat27, _application$applicat28, _application$applicat29, _application$applicat30, _application$applicat31, _application$applicat32, _application$applicat33, _application$applicat34, _application$applicat35, _application$applicat36, _application$applicat37, _application$applicat38, _application$applicat39, _application$applicat40, _application$applicat41, _application$applicat42, _application$applicat43, _application$applicat44, _application$applicat45, _application$applicat46, _application$applicat47, _application$applicat48, _application$applicat49, _application$applicat50, _application$applicat51, _application$applicat52, _application$applicat53, _application$applicat54;
|
|
40640
|
-
console.log("application in getAcknowledgement", application);
|
|
40641
|
-
const details = [];
|
|
40642
|
-
details.push({
|
|
40643
|
-
title: t("CS_APPLICATION_DETAILS"),
|
|
40644
|
-
values: [{
|
|
40645
|
-
title: t("CS_APPLICATION_NUMBER"),
|
|
40646
|
-
value: (application === null || application === void 0 ? void 0 : (_application$applicat = application.applicationData) === null || _application$applicat === void 0 ? void 0 : _application$applicat.applicationNumber) || "NA"
|
|
40647
|
-
}, {
|
|
40648
|
-
title: t("REGISTRATION_FILED_DATE"),
|
|
40649
|
-
value: Digit.DateUtils.ConvertTimestampToDate(application === null || application === void 0 ? void 0 : (_application$applicat2 = application.applicationData) === null || _application$applicat2 === void 0 ? void 0 : (_application$applicat3 = _application$applicat2.auditDetails) === null || _application$applicat3 === void 0 ? void 0 : _application$applicat3.createdTime, "dd/MM/yyyy") || "NA"
|
|
40650
|
-
}]
|
|
40651
|
-
});
|
|
40652
|
-
details.push({
|
|
40653
|
-
title: t("BPA_LICENSE_DETAILS_LABEL"),
|
|
40654
|
-
values: [{
|
|
40655
|
-
title: t("BPA_LICENSE_TYPE"),
|
|
40656
|
-
value: t(`${application === null || application === void 0 ? void 0 : (_application$applicat4 = application.applicationDetails) === null || _application$applicat4 === void 0 ? void 0 : (_application$applicat5 = _application$applicat4[1]) === null || _application$applicat5 === void 0 ? void 0 : (_application$applicat6 = _application$applicat5.values) === null || _application$applicat6 === void 0 ? void 0 : (_application$applicat7 = _application$applicat6[0]) === null || _application$applicat7 === void 0 ? void 0 : _application$applicat7.value}`) || "NA"
|
|
40657
|
-
}, {
|
|
40658
|
-
title: t("BPA_COUNCIL_NUMBER"),
|
|
40659
|
-
value: (application === null || application === void 0 ? void 0 : (_application$applicat8 = application.applicationDetails) === null || _application$applicat8 === void 0 ? void 0 : (_application$applicat9 = _application$applicat8[1]) === null || _application$applicat9 === void 0 ? void 0 : (_application$applicat0 = _application$applicat9.values) === null || _application$applicat0 === void 0 ? void 0 : (_application$applicat1 = _application$applicat0[1]) === null || _application$applicat1 === void 0 ? void 0 : _application$applicat1.value) || "NA"
|
|
40660
|
-
}]
|
|
40661
|
-
});
|
|
40662
|
-
details.push({
|
|
40663
|
-
title: t("BPA_LICENSEE_DETAILS_HEADER_OWNER_INFO"),
|
|
40664
|
-
values: [{
|
|
40665
|
-
title: t("BPA_APPLICANT_NAME_LABEL"),
|
|
40666
|
-
value: (application === null || application === void 0 ? void 0 : (_application$applicat10 = application.applicationData) === null || _application$applicat10 === void 0 ? void 0 : (_application$applicat11 = _application$applicat10.tradeLicenseDetail) === null || _application$applicat11 === void 0 ? void 0 : (_application$applicat12 = _application$applicat11.owners) === null || _application$applicat12 === void 0 ? void 0 : (_application$applicat13 = _application$applicat12[0]) === null || _application$applicat13 === void 0 ? void 0 : _application$applicat13.name) || "NA"
|
|
40667
|
-
}, {
|
|
40668
|
-
title: t("BPA_OWNER_MOBILE_NO_LABEL"),
|
|
40669
|
-
value: (application === null || application === void 0 ? void 0 : (_application$applicat14 = application.applicationData) === null || _application$applicat14 === void 0 ? void 0 : (_application$applicat15 = _application$applicat14.tradeLicenseDetail) === null || _application$applicat15 === void 0 ? void 0 : (_application$applicat16 = _application$applicat15.owners) === null || _application$applicat16 === void 0 ? void 0 : (_application$applicat17 = _application$applicat16[0]) === null || _application$applicat17 === void 0 ? void 0 : _application$applicat17.mobileNumber) || "NA"
|
|
40670
|
-
}, {
|
|
40671
|
-
title: t("BPA_APPLICANT_GENDER_LABEL"),
|
|
40672
|
-
value: (application === null || application === void 0 ? void 0 : (_application$applicat18 = application.applicationDetails) === null || _application$applicat18 === void 0 ? void 0 : (_application$applicat19 = _application$applicat18[2]) === null || _application$applicat19 === void 0 ? void 0 : (_application$applicat20 = _application$applicat19.values) === null || _application$applicat20 === void 0 ? void 0 : (_application$applicat21 = _application$applicat20[1]) === null || _application$applicat21 === void 0 ? void 0 : _application$applicat21.value) || "NA"
|
|
40673
|
-
}, {
|
|
40674
|
-
title: t("BPA_APPLICANT_EMAIL_LABEL"),
|
|
40675
|
-
value: (application === null || application === void 0 ? void 0 : (_application$applicat22 = application.applicationDetails) === null || _application$applicat22 === void 0 ? void 0 : (_application$applicat23 = _application$applicat22[2]) === null || _application$applicat23 === void 0 ? void 0 : (_application$applicat24 = _application$applicat23.values) === null || _application$applicat24 === void 0 ? void 0 : (_application$applicat25 = _application$applicat24[3]) === null || _application$applicat25 === void 0 ? void 0 : _application$applicat25.value) || "NA"
|
|
40676
|
-
}, {
|
|
40677
|
-
title: t("BPA_APPLICANT_ULB_LIST"),
|
|
40678
|
-
value: (application === null || application === void 0 ? void 0 : (_application$applicat26 = application.applicationData) === null || _application$applicat26 === void 0 ? void 0 : (_application$applicat27 = _application$applicat26.tradeLicenseDetail) === null || _application$applicat27 === void 0 ? void 0 : (_application$applicat28 = _application$applicat27.additionalDetail) === null || _application$applicat28 === void 0 ? void 0 : _application$applicat28.qualificationType) === "B-Arch" ? t("ALL_ULBS") : (application === null || application === void 0 ? void 0 : (_application$applicat29 = application.applicationData) === null || _application$applicat29 === void 0 ? void 0 : (_application$applicat30 = _application$applicat29.tradeLicenseDetail) === null || _application$applicat30 === void 0 ? void 0 : (_application$applicat31 = _application$applicat30.additionalDetail) === null || _application$applicat31 === void 0 ? void 0 : (_application$applicat32 = _application$applicat31.Ulb) === null || _application$applicat32 === void 0 ? void 0 : (_application$applicat33 = _application$applicat32.map(ulb => t(ulb === null || ulb === void 0 ? void 0 : ulb.ulbname))) === null || _application$applicat33 === void 0 ? void 0 : _application$applicat33.join(', ')) ?? "N/A"
|
|
40679
|
-
}]
|
|
40680
|
-
});
|
|
40681
|
-
details.push({
|
|
40682
|
-
title: t("BPA_NEW_ADDRESS_HEADER_DETAILS"),
|
|
40683
|
-
values: [{
|
|
40684
|
-
title: t("BPA_PERMANANT_ADDRESS_LABEL"),
|
|
40685
|
-
value: (application === null || application === void 0 ? void 0 : (_application$applicat34 = application.applicationDetails) === null || _application$applicat34 === void 0 ? void 0 : (_application$applicat35 = _application$applicat34[3]) === null || _application$applicat35 === void 0 ? void 0 : (_application$applicat36 = _application$applicat35.values) === null || _application$applicat36 === void 0 ? void 0 : (_application$applicat37 = _application$applicat36[0]) === null || _application$applicat37 === void 0 ? void 0 : _application$applicat37.value) || "NA"
|
|
40686
|
-
}, {
|
|
40687
|
-
title: t("BPA_APPLICANT_CORRESPONDENCE_ADDRESS_LABEL"),
|
|
40688
|
-
value: (application === null || application === void 0 ? void 0 : (_application$applicat38 = application.applicationDetails) === null || _application$applicat38 === void 0 ? void 0 : (_application$applicat39 = _application$applicat38[4]) === null || _application$applicat39 === void 0 ? void 0 : (_application$applicat40 = _application$applicat39.values) === null || _application$applicat40 === void 0 ? void 0 : (_application$applicat41 = _application$applicat40[0]) === null || _application$applicat41 === void 0 ? void 0 : _application$applicat41.value) || "NA"
|
|
40689
|
-
}]
|
|
40690
|
-
});
|
|
40691
|
-
const documents = application === null || application === void 0 ? void 0 : (_application$applicat42 = application.applicationDetails) === null || _application$applicat42 === void 0 ? void 0 : (_application$applicat43 = _application$applicat42.find(detail => detail.title === "BPA_DOCUMENT_DETAILS_LABEL")) === null || _application$applicat43 === void 0 ? void 0 : (_application$applicat44 = _application$applicat43.additionalDetails) === null || _application$applicat44 === void 0 ? void 0 : (_application$applicat45 = _application$applicat44.documentsWithUrl) === null || _application$applicat45 === void 0 ? void 0 : (_application$applicat46 = _application$applicat45[0]) === null || _application$applicat46 === void 0 ? void 0 : _application$applicat46.values;
|
|
40692
|
-
const docDetails = documents === null || documents === void 0 ? void 0 : documents.map((doc, index) => ({
|
|
40693
|
-
title: `${index + 1}`,
|
|
40694
|
-
value: t(`DOC_${doc.documentType}`) || "NA",
|
|
40695
|
-
link: doc.fileStoreId ? Digit.Utils.getFileUrl(doc.fileStoreId) : ""
|
|
40696
|
-
}));
|
|
40697
|
-
details.push({
|
|
40698
|
-
title: t("BPA_APPLICATION_DOCUMENTS"),
|
|
40699
|
-
values: docDetails !== null && docDetails !== void 0 && docDetails.length ? docDetails : [{
|
|
40700
|
-
title: t("CS_NO_DOCUMENTS_UPLOADED"),
|
|
40701
|
-
value: "NA"
|
|
40702
|
-
}]
|
|
40703
|
-
});
|
|
40704
|
-
const imageURL = (application === null || application === void 0 ? void 0 : (_application$applicat47 = application.applicationDetails) === null || _application$applicat47 === void 0 ? void 0 : (_application$applicat48 = _application$applicat47.find(detail => detail.title === "BPA_DOCUMENT_DETAILS_LABEL")) === null || _application$applicat48 === void 0 ? void 0 : (_application$applicat49 = _application$applicat48.additionalDetails) === null || _application$applicat49 === void 0 ? void 0 : (_application$applicat50 = _application$applicat49.documentsWithUrl) === null || _application$applicat50 === void 0 ? void 0 : (_application$applicat51 = _application$applicat50[0]) === null || _application$applicat51 === void 0 ? void 0 : (_application$applicat52 = _application$applicat51.values) === null || _application$applicat52 === void 0 ? void 0 : (_application$applicat53 = _application$applicat52.find(doc => (doc === null || doc === void 0 ? void 0 : doc.documentType) === "APPL.BPAREG_PASS_PORT_SIZE_PHOTO")) === null || _application$applicat53 === void 0 ? void 0 : _application$applicat53.url) || null;
|
|
40705
|
-
return {
|
|
40706
|
-
t: t,
|
|
40707
|
-
tenantId: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code,
|
|
40708
|
-
name: t("BPA_ACKNOWLEDGEMENT_TITLE"),
|
|
40709
|
-
email: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.emailId,
|
|
40710
|
-
phoneNumber: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.contactNumber,
|
|
40711
|
-
heading: t("LOCAL_GOVERNMENT_PUNJAB"),
|
|
40712
|
-
applicationNumber: (application === null || application === void 0 ? void 0 : (_application$applicat54 = application.applicationData) === null || _application$applicat54 === void 0 ? void 0 : _application$applicat54.applicationNumber) || "NA",
|
|
40713
|
-
details,
|
|
40714
|
-
imageURL
|
|
40715
|
-
};
|
|
40716
|
-
};
|
|
40717
|
-
|
|
40718
41007
|
const GetActionMessage$2 = props => {
|
|
40719
41008
|
var _props$data, _props$data$Licenses, _props$data$Licenses$, _props$data$Licenses$2, _props$data$Licenses$3, _props$data$Licenses$4, _props$data$Licenses$5;
|
|
40720
41009
|
const LicenseType = (props === null || props === void 0 ? void 0 : (_props$data = props.data) === null || _props$data === void 0 ? void 0 : (_props$data$Licenses = _props$data.Licenses) === null || _props$data$Licenses === void 0 ? void 0 : (_props$data$Licenses$ = _props$data$Licenses[0]) === null || _props$data$Licenses$ === void 0 ? void 0 : (_props$data$Licenses$2 = _props$data$Licenses$.tradeLicenseDetail) === null || _props$data$Licenses$2 === void 0 ? void 0 : (_props$data$Licenses$3 = _props$data$Licenses$2.tradeUnits) === null || _props$data$Licenses$3 === void 0 ? void 0 : (_props$data$Licenses$4 = _props$data$Licenses$3[0]) === null || _props$data$Licenses$4 === void 0 ? void 0 : (_props$data$Licenses$5 = _props$data$Licenses$4.tradeType) === null || _props$data$Licenses$5 === void 0 ? void 0 : _props$data$Licenses$5.split(".")[0]) || "ARCHITECT";
|
|
@@ -40722,7 +41011,7 @@ const GetActionMessage$2 = props => {
|
|
|
40722
41011
|
t
|
|
40723
41012
|
} = useTranslation();
|
|
40724
41013
|
if (props.isSuccess) {
|
|
40725
|
-
return !window.location.href.includes("edit-application") ? `${t(`TRADELICENSE_TRADETYPE_${LicenseType}`)}${t(`CS_STAKEHOLDER_APPLICATION_SUCCESS`)}` : t("CS_PROPERTY_UPDATE_APPLICATION_SUCCESS");
|
|
41014
|
+
return !window.location.href.includes("edit-application") ? `${t(`TRADELICENSE_TRADETYPE_${LicenseType}`)} ${t(`CS_STAKEHOLDER_APPLICATION_SUCCESS`)}` : t("CS_PROPERTY_UPDATE_APPLICATION_SUCCESS");
|
|
40726
41015
|
} else if (props.isLoading) {
|
|
40727
41016
|
return !window.location.href.includes("edit-application") ? t("CS_STAKEHOLDER_APPLICATION_PENDING") : t("CS_PROPERTY_UPDATE_APPLICATION_PENDING");
|
|
40728
41017
|
} else if (!props.isSuccess) {
|
|
@@ -40797,7 +41086,7 @@ const StakeholderAcknowledgementChild = ({
|
|
|
40797
41086
|
return !applicationDetails ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(BannerPicker$2, {
|
|
40798
41087
|
t: t,
|
|
40799
41088
|
data: mutation.data,
|
|
40800
|
-
isSuccess: mutation.isSuccess,
|
|
41089
|
+
isSuccess: isStakeholderRegistered || mutation.isSuccess,
|
|
40801
41090
|
isLoading: mutation.isIdle || mutation.isLoading
|
|
40802
41091
|
}), mutation.isSuccess && /*#__PURE__*/React.createElement(CardText, null, `${t(`TRADELICENSE_TRADETYPE_${licenseType}`)}${t(`CS_FILE_STAKEHOLDER_RESPONSE`)}`), !mutation.isSuccess && /*#__PURE__*/React.createElement(CardText, null, t("CS_FILE_PROPERTY_FAILED_RESPONSE")), mutation.isSuccess && !isOpenLinkFlow && /*#__PURE__*/React.createElement(Link, {
|
|
40803
41092
|
to: {
|
|
@@ -40827,23 +41116,108 @@ const StakeholderAcknowledgementChild = ({
|
|
|
40827
41116
|
label: t("BPA_COMMON_PROCEED_NEXT")
|
|
40828
41117
|
})));
|
|
40829
41118
|
};
|
|
41119
|
+
const StakeholderAcknowledgementChildNotMutation = ({
|
|
41120
|
+
mutation,
|
|
41121
|
+
applicationNumber,
|
|
41122
|
+
isOpenLinkFlow
|
|
41123
|
+
}) => {
|
|
41124
|
+
var _window2, _window2$localStorage, _mutation$data2, _mutation$data2$Licen, _mutation$data2$Licen2, _mutation$data2$Licen3, _mutation$data2$Licen4, _mutation$data2$Licen5, _mutation$data2$Licen6;
|
|
41125
|
+
const {
|
|
41126
|
+
t
|
|
41127
|
+
} = useTranslation();
|
|
41128
|
+
const tenantId = (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$localStorage = _window2.localStorage) === null || _window2$localStorage === void 0 ? void 0 : _window2$localStorage.getItem("CITIZEN.CITY");
|
|
41129
|
+
const {
|
|
41130
|
+
data: storeData
|
|
41131
|
+
} = Digit.Hooks.useStore.getInitData();
|
|
41132
|
+
const {
|
|
41133
|
+
tenants
|
|
41134
|
+
} = storeData || {};
|
|
41135
|
+
const {
|
|
41136
|
+
data: applicationDetails
|
|
41137
|
+
} = Digit.Hooks.obps.useLicenseDetails(tenantId, {
|
|
41138
|
+
applicationNumber: applicationNumber,
|
|
41139
|
+
tenantId
|
|
41140
|
+
}, {});
|
|
41141
|
+
const licenseType = (mutation === null || mutation === void 0 ? void 0 : (_mutation$data2 = mutation.data) === null || _mutation$data2 === void 0 ? void 0 : (_mutation$data2$Licen = _mutation$data2.Licenses) === null || _mutation$data2$Licen === void 0 ? void 0 : (_mutation$data2$Licen2 = _mutation$data2$Licen[0]) === null || _mutation$data2$Licen2 === void 0 ? void 0 : (_mutation$data2$Licen3 = _mutation$data2$Licen2.tradeLicenseDetail) === null || _mutation$data2$Licen3 === void 0 ? void 0 : (_mutation$data2$Licen4 = _mutation$data2$Licen3.tradeUnits) === null || _mutation$data2$Licen4 === void 0 ? void 0 : (_mutation$data2$Licen5 = _mutation$data2$Licen4[0]) === null || _mutation$data2$Licen5 === void 0 ? void 0 : (_mutation$data2$Licen6 = _mutation$data2$Licen5.tradeType) === null || _mutation$data2$Licen6 === void 0 ? void 0 : _mutation$data2$Licen6.split(".")[0]) || "ARCHITECT";
|
|
41142
|
+
const handleDownloadPdf = async () => {
|
|
41143
|
+
try {
|
|
41144
|
+
var _Property$Licenses2, _Property$Licenses2$, _Digit$SessionStorage5, _Digit$SessionStorage6, _Digit$SessionStorage7, _Digit$SessionStorage8;
|
|
41145
|
+
const Property = applicationDetails;
|
|
41146
|
+
console.log("applicationDetails in StakeholderAck1", applicationDetails);
|
|
41147
|
+
if (!Property) {
|
|
41148
|
+
console.error("No application details found");
|
|
41149
|
+
return;
|
|
41150
|
+
}
|
|
41151
|
+
const propertyTenantId = (Property === null || Property === void 0 ? void 0 : Property.tenantId) || (Property === null || Property === void 0 ? void 0 : (_Property$Licenses2 = Property.Licenses) === null || _Property$Licenses2 === void 0 ? void 0 : (_Property$Licenses2$ = _Property$Licenses2[0]) === null || _Property$Licenses2$ === void 0 ? void 0 : _Property$Licenses2$.tenantId) || ((_Digit$SessionStorage5 = Digit.SessionStorage.get("Digit.BUILDING_PERMIT")) === null || _Digit$SessionStorage5 === void 0 ? void 0 : (_Digit$SessionStorage6 = _Digit$SessionStorage5.result) === null || _Digit$SessionStorage6 === void 0 ? void 0 : (_Digit$SessionStorage7 = _Digit$SessionStorage6.Licenses) === null || _Digit$SessionStorage7 === void 0 ? void 0 : (_Digit$SessionStorage8 = _Digit$SessionStorage7[0]) === null || _Digit$SessionStorage8 === void 0 ? void 0 : _Digit$SessionStorage8.tenantId);
|
|
41152
|
+
if (!propertyTenantId) {
|
|
41153
|
+
console.error("No tenantId found in applicationDetails or sessionStorage");
|
|
41154
|
+
return;
|
|
41155
|
+
}
|
|
41156
|
+
const tenantInfo = tenants === null || tenants === void 0 ? void 0 : tenants.find(tenant => tenant.code === propertyTenantId);
|
|
41157
|
+
if (!tenantInfo) {
|
|
41158
|
+
console.error("No tenantInfo found for tenantId:", propertyTenantId);
|
|
41159
|
+
return;
|
|
41160
|
+
}
|
|
41161
|
+
const acknowledgementData = await getAcknowledgementData(Property, tenantInfo, t);
|
|
41162
|
+
console.log(acknowledgementData, "ACKO");
|
|
41163
|
+
Digit.Utils.pdf.generateBPAREG(acknowledgementData);
|
|
41164
|
+
} catch (err) {
|
|
41165
|
+
console.error("Error generating acknowledgement PDF", err);
|
|
41166
|
+
}
|
|
41167
|
+
};
|
|
41168
|
+
const isStakeholderRegistered = sessionStorage.getItem("isStakeholderRegistered") || false;
|
|
41169
|
+
const mutationData = JSON.parse(sessionStorage.getItem("stakeholder.mutationData")) || {};
|
|
41170
|
+
console.log("Mutationdata 2", mutation.data);
|
|
41171
|
+
return !applicationDetails ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(BannerPicker$2, {
|
|
41172
|
+
t: t,
|
|
41173
|
+
data: mutationData,
|
|
41174
|
+
isSuccess: isStakeholderRegistered
|
|
41175
|
+
}), /*#__PURE__*/React.createElement(CardText, null, `${t(`TRADELICENSE_TRADETYPE_${licenseType}`)}${t(`CS_FILE_STAKEHOLDER_RESPONSE`)}`), !isOpenLinkFlow && /*#__PURE__*/React.createElement(Link, {
|
|
41176
|
+
to: {
|
|
41177
|
+
pathname: `/digit-ui/citizen/payment/collect/${mutationData.Licenses[0].businessService}/${mutationData.Licenses[0].applicationNumber}/${mutationData.Licenses[0].tenantId}?tenantId=${mutationData.Licenses[0].tenantId}`,
|
|
41178
|
+
state: {
|
|
41179
|
+
tenantId: mutationData.Licenses[0].tenantId
|
|
41180
|
+
}
|
|
41181
|
+
}
|
|
41182
|
+
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
41183
|
+
label: t("COMMON_MAKE_PAYMENT")
|
|
41184
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
41185
|
+
style: {
|
|
41186
|
+
marginTop: "10px"
|
|
41187
|
+
}
|
|
41188
|
+
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
41189
|
+
label: t("CS_COMMON_DOWNLOAD"),
|
|
41190
|
+
onSubmit: handleDownloadPdf
|
|
41191
|
+
})), !isOpenLinkFlow && /*#__PURE__*/React.createElement(Link, {
|
|
41192
|
+
to: `/digit-ui/citizen`
|
|
41193
|
+
}, /*#__PURE__*/React.createElement(LinkButton, {
|
|
41194
|
+
label: t("CORE_COMMON_GO_TO_HOME")
|
|
41195
|
+
})), mutation.isSuccess && isOpenLinkFlow && /*#__PURE__*/React.createElement(Link, {
|
|
41196
|
+
to: {
|
|
41197
|
+
pathname: `/digit-ui/citizen`
|
|
41198
|
+
}
|
|
41199
|
+
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
41200
|
+
label: t("BPA_COMMON_PROCEED_NEXT")
|
|
41201
|
+
})));
|
|
41202
|
+
};
|
|
40830
41203
|
const StakeholderAcknowledgement = ({
|
|
40831
41204
|
data,
|
|
40832
41205
|
onSuccess
|
|
40833
41206
|
}) => {
|
|
40834
|
-
var
|
|
41207
|
+
var _window3, _window3$localStorage, _mutation$data3, _mutation$data3$Licen, _mutation$data3$Licen2, _mutation$data3$Licen3, _mutation$data3$Licen4, _mutation$data3$Licen5, _mutation$data3$Licen6, _data$result, _data$result$Licenses, _data$result$Licenses2, _mutation$data4, _mutation$data4$Licen, _mutation$data4$Licen2, _Digit$SessionStorage9, _Digit$SessionStorage0, _Digit$SessionStorage1, _Digit$SessionStorage10;
|
|
40835
41208
|
const {
|
|
40836
41209
|
t
|
|
40837
41210
|
} = useTranslation();
|
|
40838
|
-
const tenantId = (
|
|
41211
|
+
const tenantId = (_window3 = window) === null || _window3 === void 0 ? void 0 : (_window3$localStorage = _window3.localStorage) === null || _window3$localStorage === void 0 ? void 0 : _window3$localStorage.getItem("CITIZEN.CITY");
|
|
40839
41212
|
const mutation = Digit.Hooks.obps.useStakeholderAPI(tenantId, true);
|
|
40840
41213
|
const {
|
|
40841
41214
|
data: storeData
|
|
40842
41215
|
} = Digit.Hooks.useStore.getInitData();
|
|
40843
41216
|
let isOpenLinkFlow = window.location.href.includes("openlink");
|
|
40844
41217
|
const isCitizenUrl = Digit.Utils.browser.isMobile() ? true : false;
|
|
40845
|
-
const licenseType = (mutation === null || mutation === void 0 ? void 0 : (_mutation$
|
|
40846
|
-
const applicationNumber = (data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : (_data$result$Licenses = _data$result.Licenses) === null || _data$result$Licenses === void 0 ? void 0 : (_data$result$Licenses2 = _data$result$Licenses[0]) === null || _data$result$Licenses2 === void 0 ? void 0 : _data$result$Licenses2.applicationNumber) || (mutation === null || mutation === void 0 ? void 0 : (_mutation$
|
|
41218
|
+
const licenseType = (mutation === null || mutation === void 0 ? void 0 : (_mutation$data3 = mutation.data) === null || _mutation$data3 === void 0 ? void 0 : (_mutation$data3$Licen = _mutation$data3.Licenses) === null || _mutation$data3$Licen === void 0 ? void 0 : (_mutation$data3$Licen2 = _mutation$data3$Licen[0]) === null || _mutation$data3$Licen2 === void 0 ? void 0 : (_mutation$data3$Licen3 = _mutation$data3$Licen2.tradeLicenseDetail) === null || _mutation$data3$Licen3 === void 0 ? void 0 : (_mutation$data3$Licen4 = _mutation$data3$Licen3.tradeUnits) === null || _mutation$data3$Licen4 === void 0 ? void 0 : (_mutation$data3$Licen5 = _mutation$data3$Licen4[0]) === null || _mutation$data3$Licen5 === void 0 ? void 0 : (_mutation$data3$Licen6 = _mutation$data3$Licen5.tradeType) === null || _mutation$data3$Licen6 === void 0 ? void 0 : _mutation$data3$Licen6.split(".")[0]) || "ARCHITECT";
|
|
41219
|
+
const applicationNumber = (data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : (_data$result$Licenses = _data$result.Licenses) === null || _data$result$Licenses === void 0 ? void 0 : (_data$result$Licenses2 = _data$result$Licenses[0]) === null || _data$result$Licenses2 === void 0 ? void 0 : _data$result$Licenses2.applicationNumber) || (mutation === null || mutation === void 0 ? void 0 : (_mutation$data4 = mutation.data) === null || _mutation$data4 === void 0 ? void 0 : (_mutation$data4$Licen = _mutation$data4.Licenses) === null || _mutation$data4$Licen === void 0 ? void 0 : (_mutation$data4$Licen2 = _mutation$data4$Licen[0]) === null || _mutation$data4$Licen2 === void 0 ? void 0 : _mutation$data4$Licen2.applicationNumber) || ((_Digit$SessionStorage9 = Digit.SessionStorage.get("Digit.BUILDING_PERMIT")) === null || _Digit$SessionStorage9 === void 0 ? void 0 : (_Digit$SessionStorage0 = _Digit$SessionStorage9.result) === null || _Digit$SessionStorage0 === void 0 ? void 0 : (_Digit$SessionStorage1 = _Digit$SessionStorage0.Licenses) === null || _Digit$SessionStorage1 === void 0 ? void 0 : (_Digit$SessionStorage10 = _Digit$SessionStorage1[0]) === null || _Digit$SessionStorage10 === void 0 ? void 0 : _Digit$SessionStorage10.applicationNumber);
|
|
41220
|
+
const isStakeholderRegistered = sessionStorage.getItem("isStakeholderRegistered") || false;
|
|
40847
41221
|
console.log(applicationNumber, "Application Number");
|
|
40848
41222
|
useEffect(() => {
|
|
40849
41223
|
try {
|
|
@@ -40862,13 +41236,17 @@ const StakeholderAcknowledgement = ({
|
|
|
40862
41236
|
id: applicationNumber,
|
|
40863
41237
|
moduleCode: "BPAREG"
|
|
40864
41238
|
});
|
|
40865
|
-
return mutation.isLoading || mutation.isIdle ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
41239
|
+
return !isStakeholderRegistered && (mutation.isLoading || mutation.isIdle) ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
40866
41240
|
className: isOpenLinkFlow ? "OpenlinkContainer" : ""
|
|
40867
41241
|
}, isOpenLinkFlow && /*#__PURE__*/React.createElement(BackButton, {
|
|
40868
41242
|
style: {
|
|
40869
41243
|
border: "none"
|
|
40870
41244
|
}
|
|
40871
|
-
}, t("CS_COMMON_BACK")), /*#__PURE__*/React.createElement(
|
|
41245
|
+
}, t("CS_COMMON_BACK")), isStakeholderRegistered ? /*#__PURE__*/React.createElement(StakeholderAcknowledgementChildNotMutation, {
|
|
41246
|
+
applicationNumber,
|
|
41247
|
+
mutation,
|
|
41248
|
+
isOpenLinkFlow
|
|
41249
|
+
}) : /*#__PURE__*/React.createElement(StakeholderAcknowledgementChild, {
|
|
40872
41250
|
applicationNumber,
|
|
40873
41251
|
mutation,
|
|
40874
41252
|
isOpenLinkFlow
|
|
@@ -40910,178 +41288,6 @@ const getRootReducer = () => combineReducers({
|
|
|
40910
41288
|
OBPSFormReducer
|
|
40911
41289
|
});
|
|
40912
41290
|
|
|
40913
|
-
const StepWrapper = ({
|
|
40914
|
-
children,
|
|
40915
|
-
currentStep: _currentStep = 1,
|
|
40916
|
-
nextStep,
|
|
40917
|
-
prevStep,
|
|
40918
|
-
stepsList: _stepsList = []
|
|
40919
|
-
}) => {
|
|
40920
|
-
const {
|
|
40921
|
-
t
|
|
40922
|
-
} = useTranslation();
|
|
40923
|
-
const stepStyle = isActive => ({
|
|
40924
|
-
display: "flex",
|
|
40925
|
-
alignItems: "center",
|
|
40926
|
-
justifyContent: "flex-end",
|
|
40927
|
-
flex: 1,
|
|
40928
|
-
color: isActive ? "#3f51b5" : "#ccc",
|
|
40929
|
-
padding: "10px 10px",
|
|
40930
|
-
width: "260px"
|
|
40931
|
-
});
|
|
40932
|
-
const circleStyle = stepNumber => {
|
|
40933
|
-
let backgroundColor;
|
|
40934
|
-
if (stepNumber <= _currentStep) {
|
|
40935
|
-
backgroundColor = "#0D43A7";
|
|
40936
|
-
} else {
|
|
40937
|
-
backgroundColor = "#FFFFFF";
|
|
40938
|
-
}
|
|
40939
|
-
return {
|
|
40940
|
-
width: "60px",
|
|
40941
|
-
height: "60px",
|
|
40942
|
-
borderRadius: "50%",
|
|
40943
|
-
backgroundColor,
|
|
40944
|
-
color: stepNumber <= _currentStep ? "white" : "black",
|
|
40945
|
-
display: "flex",
|
|
40946
|
-
alignItems: "center",
|
|
40947
|
-
justifyContent: "center",
|
|
40948
|
-
marginBottom: "10px",
|
|
40949
|
-
fontWeight: "normal",
|
|
40950
|
-
fontSize: "18px",
|
|
40951
|
-
border: stepNumber > _currentStep ? "1px solid black" : "",
|
|
40952
|
-
position: "relative"
|
|
40953
|
-
};
|
|
40954
|
-
};
|
|
40955
|
-
const labelStyle = {
|
|
40956
|
-
fontSize: "18px",
|
|
40957
|
-
color: "#1E1E1E",
|
|
40958
|
-
fontWeight: "500",
|
|
40959
|
-
fontFamily: "Noto Sans,sans-serif",
|
|
40960
|
-
marginRight: "6px"
|
|
40961
|
-
};
|
|
40962
|
-
const stepNumberStyle = {
|
|
40963
|
-
fontSize: "18px",
|
|
40964
|
-
color: "#263238",
|
|
40965
|
-
fontWeight: "400",
|
|
40966
|
-
fontFamily: "Noto Sans,sans-serif",
|
|
40967
|
-
margin: "0px 6px 0px 0px"
|
|
40968
|
-
};
|
|
40969
|
-
const lineStyle = {
|
|
40970
|
-
position: "absolute",
|
|
40971
|
-
width: "2px",
|
|
40972
|
-
height: "50px",
|
|
40973
|
-
backgroundColor: "grey",
|
|
40974
|
-
left: "50%",
|
|
40975
|
-
top: "100%",
|
|
40976
|
-
transform: "translateX(-50%)"
|
|
40977
|
-
};
|
|
40978
|
-
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
40979
|
-
const totalSteps = _stepsList.length;
|
|
40980
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
40981
|
-
className: "stepper",
|
|
40982
|
-
style: {
|
|
40983
|
-
width: "100%",
|
|
40984
|
-
display: "flex",
|
|
40985
|
-
flexDirection: "row",
|
|
40986
|
-
alignItems: "top",
|
|
40987
|
-
justifyContent: "flex-start"
|
|
40988
|
-
}
|
|
40989
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
40990
|
-
className: "stepper-navigation-bar",
|
|
40991
|
-
style: {
|
|
40992
|
-
display: "flex",
|
|
40993
|
-
flexDirection: "column",
|
|
40994
|
-
justifyContent: "space-between",
|
|
40995
|
-
height: "50%",
|
|
40996
|
-
marginBottom: "20px"
|
|
40997
|
-
}
|
|
40998
|
-
}, [...Array(totalSteps)].map((_, index) => /*#__PURE__*/React.createElement("div", {
|
|
40999
|
-
className: "step-content",
|
|
41000
|
-
key: index,
|
|
41001
|
-
style: stepStyle(index + 1 <= _currentStep)
|
|
41002
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
41003
|
-
className: "step-sub-content",
|
|
41004
|
-
style: {
|
|
41005
|
-
display: "flex",
|
|
41006
|
-
flexDirection: "column",
|
|
41007
|
-
alignItems: "flex-end",
|
|
41008
|
-
margin: "10px"
|
|
41009
|
-
}
|
|
41010
|
-
}, index + 1 === totalSteps ? null : /*#__PURE__*/React.createElement("div", {
|
|
41011
|
-
className: "step-number",
|
|
41012
|
-
style: stepNumberStyle
|
|
41013
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
41014
|
-
className: "step-label",
|
|
41015
|
-
style: labelStyle
|
|
41016
|
-
}, t(_stepsList[index].stepLabel))), /*#__PURE__*/React.createElement("div", {
|
|
41017
|
-
className: "step-circle",
|
|
41018
|
-
style: circleStyle(index + 1)
|
|
41019
|
-
}, index + 1, index < totalSteps - 1 && /*#__PURE__*/React.createElement("div", {
|
|
41020
|
-
style: lineStyle
|
|
41021
|
-
}))))), /*#__PURE__*/React.createElement("div", {
|
|
41022
|
-
className: "stepper-body",
|
|
41023
|
-
style: {
|
|
41024
|
-
width: "100%",
|
|
41025
|
-
marginBottom: "20px"
|
|
41026
|
-
}
|
|
41027
|
-
}, children));
|
|
41028
|
-
};
|
|
41029
|
-
|
|
41030
|
-
const Stepper = ({
|
|
41031
|
-
stepsList: _stepsList = [],
|
|
41032
|
-
onSubmit,
|
|
41033
|
-
step,
|
|
41034
|
-
setStep
|
|
41035
|
-
}) => {
|
|
41036
|
-
const enabledStepsList = _stepsList.filter(item => item.isStepEnabled);
|
|
41037
|
-
const {
|
|
41038
|
-
t
|
|
41039
|
-
} = useTranslation();
|
|
41040
|
-
function onGoNext() {
|
|
41041
|
-
if (step < enabledStepsList.length) {
|
|
41042
|
-
nextStep();
|
|
41043
|
-
} else if (step === enabledStepsList.length) {
|
|
41044
|
-
onSubmit();
|
|
41045
|
-
}
|
|
41046
|
-
}
|
|
41047
|
-
function onBackClick() {
|
|
41048
|
-
if (step > 1) {
|
|
41049
|
-
prevStep();
|
|
41050
|
-
}
|
|
41051
|
-
}
|
|
41052
|
-
const nextStep = () => setStep(step + 1);
|
|
41053
|
-
const prevStep = () => setStep(step - 1);
|
|
41054
|
-
const renderStep = () => {
|
|
41055
|
-
var _Digit, _Digit$ComponentRegis;
|
|
41056
|
-
const currStepConfBody = enabledStepsList[step - 1];
|
|
41057
|
-
const {
|
|
41058
|
-
component,
|
|
41059
|
-
key,
|
|
41060
|
-
texts,
|
|
41061
|
-
currStepConfig
|
|
41062
|
-
} = currStepConfBody;
|
|
41063
|
-
const Component = (_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ComponentRegis = _Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent(component);
|
|
41064
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Component, {
|
|
41065
|
-
config: {
|
|
41066
|
-
key,
|
|
41067
|
-
texts,
|
|
41068
|
-
component,
|
|
41069
|
-
currStepNumber: step,
|
|
41070
|
-
currStepConfig
|
|
41071
|
-
},
|
|
41072
|
-
onGoNext: onGoNext,
|
|
41073
|
-
onBackClick: onBackClick,
|
|
41074
|
-
t: t
|
|
41075
|
-
}));
|
|
41076
|
-
};
|
|
41077
|
-
return /*#__PURE__*/React.createElement(StepWrapper, {
|
|
41078
|
-
currentStep: step,
|
|
41079
|
-
nextStep: nextStep,
|
|
41080
|
-
prevStep: prevStep,
|
|
41081
|
-
stepsList: enabledStepsList
|
|
41082
|
-
}, renderStep());
|
|
41083
|
-
};
|
|
41084
|
-
|
|
41085
41291
|
const layoutStepperConfig = [{
|
|
41086
41292
|
head: "BPA_APPLICATION_REGISTRATION",
|
|
41087
41293
|
stepNumber: 1,
|
|
@@ -44124,6 +44330,9 @@ const OBPSLinks = ({
|
|
|
44124
44330
|
isInfo: true
|
|
44125
44331
|
});
|
|
44126
44332
|
};
|
|
44333
|
+
const dummy = () => {
|
|
44334
|
+
return /*#__PURE__*/React.createElement("div", null);
|
|
44335
|
+
};
|
|
44127
44336
|
const componentsToRegister = {
|
|
44128
44337
|
OBPSModule,
|
|
44129
44338
|
OBPSLinks,
|
|
@@ -44192,7 +44401,8 @@ const componentsToRegister = {
|
|
|
44192
44401
|
LayoutDocumentsRequired,
|
|
44193
44402
|
LayoutSummary,
|
|
44194
44403
|
LayoutLocalityInfo,
|
|
44195
|
-
LayoutCLUDetails
|
|
44404
|
+
LayoutCLUDetails,
|
|
44405
|
+
dummy
|
|
44196
44406
|
};
|
|
44197
44407
|
const initOBPSComponents = () => {
|
|
44198
44408
|
Object.entries(componentsToRegister).forEach(([key, value]) => {
|