@djb25/digit-ui-module-commonpt 1.0.4 → 1.0.6
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 +467 -222
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Loader, VerticalTimeline, FormComposer, Toast, Card, CardText, StatusTable, Row, SubmitBar, Banner, RadioButtons, Dropdown, InfoBannerIcon, Localities, Header, ResponseComposer, Modal, KeyNote, OTPInput, CardLabelError, FormStep, UploadFile, DatePicker, CardSubHeader, PDFSvg, LabelFieldPair, CardLabel, MultiUploadWrapper, CardHeader, CardSectionHeader, CheckBox, TextInput, LinkButton, Close as Close$e, BreakLine, Table, TelePhone, DisplayPhotos, EditIcon,
|
|
1
|
+
import { Loader, VerticalTimeline, FormComposer, Toast, Card, CardText, StatusTable, Row, SubmitBar, Banner, RadioButtons, Dropdown, InfoBannerIcon, Localities, Header, ResponseComposer, Modal, KeyNote, OTPInput, CardLabelError, FormStep, UploadFile, DatePicker, CardSubHeader, PDFSvg, LabelFieldPair, CardLabel, MultiUploadWrapper, CardHeader, CardSectionHeader, CheckBox, TextInput, LinkButton, Close as Close$e, ViewsIcon, BreakLine, Table, TelePhone, DisplayPhotos, EditIcon, CheckPoint, ConnectingCheckPoints, ActionBar, Menu, ButtonSelector, HomeIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, CollapsibleCardPage, AddressDetails, DeleteIcon, MobileNumber, RadioOrSelect, TextArea, SearchForm, SearchField, DetailsCard, TickMark, Label, PropertyHouse, EmployeeModuleCard, CitizenHomeCard, PTIcon } from '@djb25/digit-ui-react-components';
|
|
2
2
|
import React, { useState, useEffect, useLayoutEffect, useMemo, useRef, Fragment as Fragment$1, memo, useCallback } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useLocation, useHistory, useRouteMatch, Switch, Route, Link, useParams } from 'react-router-dom';
|
|
@@ -5924,7 +5924,7 @@ const setAddressDetailsLW = data => {
|
|
|
5924
5924
|
assembly: (address === null || address === void 0 ? void 0 : address.assembly) || (address === null || address === void 0 ? void 0 : address.Assembly),
|
|
5925
5925
|
block: address === null || address === void 0 ? void 0 : address.block,
|
|
5926
5926
|
zone: address === null || address === void 0 ? void 0 : address.zone,
|
|
5927
|
-
|
|
5927
|
+
zroLocation: (address === null || address === void 0 ? void 0 : (_address$zro = address.zro) === null || _address$zro === void 0 ? void 0 : _address$zro.code) || (address === null || address === void 0 ? void 0 : address.zro),
|
|
5928
5928
|
addressType: (address === null || address === void 0 ? void 0 : (_address$addressType = address.addressType) === null || _address$addressType === void 0 ? void 0 : _address$addressType.code) || (address === null || address === void 0 ? void 0 : address.addressType)
|
|
5929
5929
|
};
|
|
5930
5930
|
data.address = propAddress;
|
|
@@ -6017,7 +6017,7 @@ const setPropertyDetailsLW = data => {
|
|
|
6017
6017
|
return data;
|
|
6018
6018
|
};
|
|
6019
6019
|
const convertToPropertyLightWeight = (data = {}) => {
|
|
6020
|
-
var _data$propertyDetails, _data$propertyDetails2, _data, _data$owners2, _data$owners2$, _data$propertyDetails3, _data$propertyDetails4, _data$waterConnection, _data$waterConnection2, _data$waterConnection3, _data$waterConnection4, _data$waterConnection5, _data$waterConnection6, _data$waterConnection7, _data$waterConnection8, _data$waterConnection9, _data$waterConnection0, _data$waterConnection1, _data$waterConnection10, _data$waterConnection11, _data$waterConnection12, _data$waterConnection13, _data$waterConnection14, _data$waterConnection15, _data$waterConnection16;
|
|
6020
|
+
var _data$propertyDetails, _data$propertyDetails2, _data, _data$owners2, _data$owners2$, _data$propertyDetails3, _data$propertyDetails4, _data$waterConnection, _data$waterConnection2, _data$waterConnection3, _data$useDetails, _data$useDetails$Wate, _data$waterConnection4, _data$waterConnection5, _data$waterConnection6, _data$useDetails2, _data$useDetails2$Sel, _data$waterConnection7, _data$waterConnection8, _data$useDetails3, _data$waterConnection9, _data$waterConnection0, _data$useDetails4, _data$waterConnection1, _data$waterConnection10, _data$waterConnection11, _data$useDetails5, _data$useDetails5$noO, _data$waterConnection12, _data$waterConnection13, _data$useDetails6, _data$waterConnection14, _data$waterConnection15, _data$useDetails7, _data$waterConnection16, _data$waterConnection17, _data$useDetails8;
|
|
6021
6021
|
data = setOwnerDetailsLW(data);
|
|
6022
6022
|
data = setAddressDetailsLW(data);
|
|
6023
6023
|
data = setPropertyDetailsLW(data);
|
|
@@ -6061,14 +6061,14 @@ const convertToPropertyLightWeight = (data = {}) => {
|
|
|
6061
6061
|
isRainwaterHarvesting: false,
|
|
6062
6062
|
propertyType: propertyType,
|
|
6063
6063
|
propertyCategory: (_data$propertyDetails4 = data.propertyDetails) === null || _data$propertyDetails4 === void 0 ? void 0 : _data$propertyDetails4.usageCategory,
|
|
6064
|
-
waterConnectionUsageType: (_data$waterConnection = data.waterConnection) === null || _data$waterConnection === void 0 ? void 0 : (_data$waterConnection2 = _data$waterConnection.useDetails) === null || _data$waterConnection2 === void 0 ? void 0 : (_data$waterConnection3 = _data$waterConnection2.WaterConnectionUsageType) === null || _data$waterConnection3 === void 0 ? void 0 : _data$waterConnection3.code,
|
|
6065
|
-
yearOfConstruction: (_data$waterConnection4 = data.waterConnection) === null || _data$waterConnection4 === void 0 ? void 0 : (_data$waterConnection5 = _data$waterConnection4.useDetails) === null || _data$waterConnection5 === void 0 ? void 0 : (_data$waterConnection6 = _data$waterConnection5.SelectYearofConstruction) === null || _data$waterConnection6 === void 0 ? void 0 : _data$waterConnection6.value,
|
|
6066
|
-
numberOfDwellingUnits: (_data$waterConnection7 = data.waterConnection) === null || _data$waterConnection7 === void 0 ? void 0 : (_data$waterConnection8 = _data$waterConnection7.useDetails) === null || _data$waterConnection8 === void 0 ? void 0 : _data$waterConnection8.NumberofDwellingUnits,
|
|
6067
|
-
numberOfRooms: (_data$waterConnection9 = data.waterConnection) === null || _data$waterConnection9 === void 0 ? void 0 : (_data$waterConnection0 = _data$waterConnection9.useDetails) === null || _data$waterConnection0 === void 0 ? void 0 : _data$waterConnection0.NumberofRooms,
|
|
6068
|
-
numberOfFloors: (_data$waterConnection1 = data.waterConnection) === null || _data$waterConnection1 === void 0 ? void 0 : (_data$waterConnection10 = _data$waterConnection1.useDetails) === null || _data$waterConnection10 === void 0 ? void 0 : _data$waterConnection10.
|
|
6069
|
-
plotArea: (_data$
|
|
6070
|
-
builtUpArea: (_data$
|
|
6071
|
-
numberOfBeds: (_data$
|
|
6064
|
+
waterConnectionUsageType: ((_data$waterConnection = data.waterConnection) === null || _data$waterConnection === void 0 ? void 0 : (_data$waterConnection2 = _data$waterConnection.useDetails) === null || _data$waterConnection2 === void 0 ? void 0 : (_data$waterConnection3 = _data$waterConnection2.WaterConnectionUsageType) === null || _data$waterConnection3 === void 0 ? void 0 : _data$waterConnection3.code) || ((_data$useDetails = data.useDetails) === null || _data$useDetails === void 0 ? void 0 : (_data$useDetails$Wate = _data$useDetails.WaterConnectionUsageType) === null || _data$useDetails$Wate === void 0 ? void 0 : _data$useDetails$Wate.code),
|
|
6065
|
+
yearOfConstruction: ((_data$waterConnection4 = data.waterConnection) === null || _data$waterConnection4 === void 0 ? void 0 : (_data$waterConnection5 = _data$waterConnection4.useDetails) === null || _data$waterConnection5 === void 0 ? void 0 : (_data$waterConnection6 = _data$waterConnection5.SelectYearofConstruction) === null || _data$waterConnection6 === void 0 ? void 0 : _data$waterConnection6.value) || ((_data$useDetails2 = data.useDetails) === null || _data$useDetails2 === void 0 ? void 0 : (_data$useDetails2$Sel = _data$useDetails2.SelectYearofConstruction) === null || _data$useDetails2$Sel === void 0 ? void 0 : _data$useDetails2$Sel.value),
|
|
6066
|
+
numberOfDwellingUnits: ((_data$waterConnection7 = data.waterConnection) === null || _data$waterConnection7 === void 0 ? void 0 : (_data$waterConnection8 = _data$waterConnection7.useDetails) === null || _data$waterConnection8 === void 0 ? void 0 : _data$waterConnection8.NumberofDwellingUnits) || ((_data$useDetails3 = data.useDetails) === null || _data$useDetails3 === void 0 ? void 0 : _data$useDetails3.NumberofDwellingUnits),
|
|
6067
|
+
numberOfRooms: ((_data$waterConnection9 = data.waterConnection) === null || _data$waterConnection9 === void 0 ? void 0 : (_data$waterConnection0 = _data$waterConnection9.useDetails) === null || _data$waterConnection0 === void 0 ? void 0 : _data$waterConnection0.NumberofRooms) || ((_data$useDetails4 = data.useDetails) === null || _data$useDetails4 === void 0 ? void 0 : _data$useDetails4.NumberofRooms),
|
|
6068
|
+
numberOfFloors: ((_data$waterConnection1 = data.waterConnection) === null || _data$waterConnection1 === void 0 ? void 0 : (_data$waterConnection10 = _data$waterConnection1.useDetails) === null || _data$waterConnection10 === void 0 ? void 0 : (_data$waterConnection11 = _data$waterConnection10.noOfFloors) === null || _data$waterConnection11 === void 0 ? void 0 : _data$waterConnection11.code) || ((_data$useDetails5 = data.useDetails) === null || _data$useDetails5 === void 0 ? void 0 : (_data$useDetails5$noO = _data$useDetails5.noOfFloors) === null || _data$useDetails5$noO === void 0 ? void 0 : _data$useDetails5$noO.code) || 1,
|
|
6069
|
+
plotArea: ((_data$waterConnection12 = data.waterConnection) === null || _data$waterConnection12 === void 0 ? void 0 : (_data$waterConnection13 = _data$waterConnection12.useDetails) === null || _data$waterConnection13 === void 0 ? void 0 : _data$waterConnection13.plotArea) || ((_data$useDetails6 = data.useDetails) === null || _data$useDetails6 === void 0 ? void 0 : _data$useDetails6.plotArea),
|
|
6070
|
+
builtUpArea: ((_data$waterConnection14 = data.waterConnection) === null || _data$waterConnection14 === void 0 ? void 0 : (_data$waterConnection15 = _data$waterConnection14.useDetails) === null || _data$waterConnection15 === void 0 ? void 0 : _data$waterConnection15.builtUpArea) || ((_data$useDetails7 = data.useDetails) === null || _data$useDetails7 === void 0 ? void 0 : _data$useDetails7.builtUpArea),
|
|
6071
|
+
numberOfBeds: ((_data$waterConnection16 = data.waterConnection) === null || _data$waterConnection16 === void 0 ? void 0 : (_data$waterConnection17 = _data$waterConnection16.useDetails) === null || _data$waterConnection17 === void 0 ? void 0 : _data$waterConnection17.hospitalBeds) || ((_data$useDetails8 = data.useDetails) === null || _data$useDetails8 === void 0 ? void 0 : _data$useDetails8.hospitalBeds),
|
|
6072
6072
|
owners: [...(data.owners || []).map((owner, index) => {
|
|
6073
6073
|
var _owner$gender3, _owner$gender4, _owner$ownerType2, _owner$relationship2, _owner$inistitutetype2;
|
|
6074
6074
|
return {
|
|
@@ -6107,7 +6107,7 @@ const convertToPropertyLightWeight = (data = {}) => {
|
|
|
6107
6107
|
return formdata;
|
|
6108
6108
|
};
|
|
6109
6109
|
const convertToUpdatePropertyLightWeight = (data = {}) => {
|
|
6110
|
-
var _data$propertyDetails5, _data$propertyDetails6, _data$
|
|
6110
|
+
var _data$propertyDetails5, _data$propertyDetails6, _data$waterConnection18, _data$waterConnection19, _data$waterConnection20, _data$useDetails9, _data$useDetails9$Wat, _data$waterConnection21, _data$waterConnection22, _data$waterConnection23, _data$useDetails0, _data$useDetails0$Sel, _data$waterConnection24, _data$waterConnection25, _data$useDetails1, _data$waterConnection26, _data$waterConnection27, _data$useDetails10, _data$waterConnection28, _data$waterConnection29, _data$waterConnection30, _data$useDetails11, _data$useDetails11$no, _data$waterConnection31, _data$waterConnection32, _data$useDetails12, _data$waterConnection33, _data$waterConnection34, _data$useDetails13, _data$waterConnection35, _data$waterConnection36, _data$useDetails14, _formdata$Property, _data3, _formdata$Property3;
|
|
6111
6111
|
data = setOwnerDetailsLW(data);
|
|
6112
6112
|
data = setAddressDetailsLW(data);
|
|
6113
6113
|
data = setPropertyDetailsLW(data);
|
|
@@ -6153,11 +6153,14 @@ const convertToUpdatePropertyLightWeight = (data = {}) => {
|
|
|
6153
6153
|
noOfFloors: noOfFloors,
|
|
6154
6154
|
additionalDetails: {
|
|
6155
6155
|
isRainwaterHarvesting: false,
|
|
6156
|
-
waterConnectionUsageType: (_data$
|
|
6157
|
-
yearOfConstruction: (_data$
|
|
6158
|
-
numberOfDwellingUnits: (_data$
|
|
6159
|
-
numberOfRooms: (_data$
|
|
6160
|
-
|
|
6156
|
+
waterConnectionUsageType: ((_data$waterConnection18 = data.waterConnection) === null || _data$waterConnection18 === void 0 ? void 0 : (_data$waterConnection19 = _data$waterConnection18.useDetails) === null || _data$waterConnection19 === void 0 ? void 0 : (_data$waterConnection20 = _data$waterConnection19.WaterConnectionUsageType) === null || _data$waterConnection20 === void 0 ? void 0 : _data$waterConnection20.code) || ((_data$useDetails9 = data.useDetails) === null || _data$useDetails9 === void 0 ? void 0 : (_data$useDetails9$Wat = _data$useDetails9.WaterConnectionUsageType) === null || _data$useDetails9$Wat === void 0 ? void 0 : _data$useDetails9$Wat.code),
|
|
6157
|
+
yearOfConstruction: ((_data$waterConnection21 = data.waterConnection) === null || _data$waterConnection21 === void 0 ? void 0 : (_data$waterConnection22 = _data$waterConnection21.useDetails) === null || _data$waterConnection22 === void 0 ? void 0 : (_data$waterConnection23 = _data$waterConnection22.SelectYearofConstruction) === null || _data$waterConnection23 === void 0 ? void 0 : _data$waterConnection23.value) || ((_data$useDetails0 = data.useDetails) === null || _data$useDetails0 === void 0 ? void 0 : (_data$useDetails0$Sel = _data$useDetails0.SelectYearofConstruction) === null || _data$useDetails0$Sel === void 0 ? void 0 : _data$useDetails0$Sel.value),
|
|
6158
|
+
numberOfDwellingUnits: ((_data$waterConnection24 = data.waterConnection) === null || _data$waterConnection24 === void 0 ? void 0 : (_data$waterConnection25 = _data$waterConnection24.useDetails) === null || _data$waterConnection25 === void 0 ? void 0 : _data$waterConnection25.NumberofDwellingUnits) || ((_data$useDetails1 = data.useDetails) === null || _data$useDetails1 === void 0 ? void 0 : _data$useDetails1.NumberofDwellingUnits),
|
|
6159
|
+
numberOfRooms: ((_data$waterConnection26 = data.waterConnection) === null || _data$waterConnection26 === void 0 ? void 0 : (_data$waterConnection27 = _data$waterConnection26.useDetails) === null || _data$waterConnection27 === void 0 ? void 0 : _data$waterConnection27.NumberofRooms) || ((_data$useDetails10 = data.useDetails) === null || _data$useDetails10 === void 0 ? void 0 : _data$useDetails10.NumberofRooms),
|
|
6160
|
+
numberOfFloors: ((_data$waterConnection28 = data.waterConnection) === null || _data$waterConnection28 === void 0 ? void 0 : (_data$waterConnection29 = _data$waterConnection28.useDetails) === null || _data$waterConnection29 === void 0 ? void 0 : (_data$waterConnection30 = _data$waterConnection29.noOfFloors) === null || _data$waterConnection30 === void 0 ? void 0 : _data$waterConnection30.code) || ((_data$useDetails11 = data.useDetails) === null || _data$useDetails11 === void 0 ? void 0 : (_data$useDetails11$no = _data$useDetails11.noOfFloors) === null || _data$useDetails11$no === void 0 ? void 0 : _data$useDetails11$no.code) || 1,
|
|
6161
|
+
plotArea: ((_data$waterConnection31 = data.waterConnection) === null || _data$waterConnection31 === void 0 ? void 0 : (_data$waterConnection32 = _data$waterConnection31.useDetails) === null || _data$waterConnection32 === void 0 ? void 0 : _data$waterConnection32.plotArea) || ((_data$useDetails12 = data.useDetails) === null || _data$useDetails12 === void 0 ? void 0 : _data$useDetails12.plotArea),
|
|
6162
|
+
builtUpArea: ((_data$waterConnection33 = data.waterConnection) === null || _data$waterConnection33 === void 0 ? void 0 : (_data$waterConnection34 = _data$waterConnection33.useDetails) === null || _data$waterConnection34 === void 0 ? void 0 : _data$waterConnection34.builtUpArea) || ((_data$useDetails13 = data.useDetails) === null || _data$useDetails13 === void 0 ? void 0 : _data$useDetails13.builtUpArea),
|
|
6163
|
+
hospitalBeds: ((_data$waterConnection35 = data.waterConnection) === null || _data$waterConnection35 === void 0 ? void 0 : (_data$waterConnection36 = _data$waterConnection35.useDetails) === null || _data$waterConnection36 === void 0 ? void 0 : _data$waterConnection36.hospitalBeds) || ((_data$useDetails14 = data.useDetails) === null || _data$useDetails14 === void 0 ? void 0 : _data$useDetails14.hospitalBeds),
|
|
6161
6164
|
owners: [...data.owners.map((owner, index) => {
|
|
6162
6165
|
var _owner$gender6, _owner$ownerType4, _owner$relationship4, _owner$inistitutetype4;
|
|
6163
6166
|
return {
|
|
@@ -13999,10 +14002,11 @@ function PropertyDocuments({
|
|
|
13999
14002
|
const [filesArray, setFilesArray] = useState(() => []);
|
|
14000
14003
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
14001
14004
|
const [pdfFiles, setPdfFiles] = useState({});
|
|
14005
|
+
const [modalFile, setModalFile] = useState(null);
|
|
14002
14006
|
useEffect(() => {
|
|
14003
14007
|
var _acc;
|
|
14004
14008
|
let acc = [];
|
|
14005
|
-
documents === null || documents === void 0 ? void 0 : documents.forEach(
|
|
14009
|
+
documents === null || documents === void 0 ? void 0 : documents.forEach(element => {
|
|
14006
14010
|
acc = [...acc, ...(element.values ? element.values : [])];
|
|
14007
14011
|
});
|
|
14008
14012
|
setFilesArray((_acc = acc) === null || _acc === void 0 ? void 0 : _acc.map(value => value === null || value === void 0 ? void 0 : value.fileStoreId));
|
|
@@ -14020,12 +14024,170 @@ function PropertyDocuments({
|
|
|
14020
14024
|
}
|
|
14021
14025
|
}, [filesArray]);
|
|
14022
14026
|
const checkLocation = window.location.href.includes("employee/tl") || window.location.href.includes("/obps") || window.location.href.includes("employee/ws");
|
|
14027
|
+
const isWSLocation = window.location.href.includes("employee/ws");
|
|
14023
14028
|
const isStakeholderApplication = window.location.href.includes("stakeholder");
|
|
14029
|
+
const getDocSubType = documentType => {
|
|
14030
|
+
if (!documentType) return "";
|
|
14031
|
+
const parts = documentType.split(".");
|
|
14032
|
+
const last = parts[parts.length - 1] || "";
|
|
14033
|
+
return last.replace(/_/g, " ").replace(/\b\w/g, c => c.toUpperCase());
|
|
14034
|
+
};
|
|
14035
|
+
const renderModal = () => {
|
|
14036
|
+
if (!modalFile) return null;
|
|
14037
|
+
const isPdf = modalFile.toLowerCase().includes(".pdf") || modalFile.toLowerCase().includes("pdf");
|
|
14038
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
14039
|
+
headerBarMain: /*#__PURE__*/React.createElement("h1", {
|
|
14040
|
+
className: "heading-m"
|
|
14041
|
+
}, "Document Preview"),
|
|
14042
|
+
headerBarEnd: /*#__PURE__*/React.createElement("div", {
|
|
14043
|
+
onClick: () => setModalFile(null),
|
|
14044
|
+
style: {
|
|
14045
|
+
cursor: "pointer",
|
|
14046
|
+
padding: "5px",
|
|
14047
|
+
marginTop: "-5px"
|
|
14048
|
+
}
|
|
14049
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
14050
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14051
|
+
viewBox: "0 0 24 24",
|
|
14052
|
+
fill: "#000000",
|
|
14053
|
+
width: "24px",
|
|
14054
|
+
height: "24px"
|
|
14055
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
14056
|
+
d: "M0 0h24v24H0V0z",
|
|
14057
|
+
fill: "none"
|
|
14058
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
14059
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
14060
|
+
}))),
|
|
14061
|
+
hideSubmit: true,
|
|
14062
|
+
popupStyles: {
|
|
14063
|
+
maxWidth: "80vw",
|
|
14064
|
+
width: "100%"
|
|
14065
|
+
},
|
|
14066
|
+
popupModuleMianStyles: {
|
|
14067
|
+
display: "flex",
|
|
14068
|
+
justifyContent: "center",
|
|
14069
|
+
alignItems: "center",
|
|
14070
|
+
padding: "0",
|
|
14071
|
+
overflowY: "hidden"
|
|
14072
|
+
}
|
|
14073
|
+
}, isPdf ? /*#__PURE__*/React.createElement("iframe", {
|
|
14074
|
+
src: modalFile,
|
|
14075
|
+
title: "Document Preview",
|
|
14076
|
+
style: {
|
|
14077
|
+
width: "100%",
|
|
14078
|
+
height: "80vh",
|
|
14079
|
+
border: "none",
|
|
14080
|
+
display: "block"
|
|
14081
|
+
}
|
|
14082
|
+
}) : /*#__PURE__*/React.createElement("img", {
|
|
14083
|
+
src: modalFile,
|
|
14084
|
+
alt: "Document Preview",
|
|
14085
|
+
style: {
|
|
14086
|
+
maxWidth: "100%",
|
|
14087
|
+
maxHeight: "80vh",
|
|
14088
|
+
objectFit: "contain",
|
|
14089
|
+
display: "block"
|
|
14090
|
+
}
|
|
14091
|
+
}));
|
|
14092
|
+
};
|
|
14093
|
+
const renderDocumentRow = (value, index) => {
|
|
14094
|
+
var _pdfFiles$value$fileS;
|
|
14095
|
+
const fileUrl = (_pdfFiles$value$fileS = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS === void 0 ? void 0 : _pdfFiles$value$fileS.split(",")[0];
|
|
14096
|
+
const docSubType = getDocSubType(value === null || value === void 0 ? void 0 : value.documentType);
|
|
14097
|
+
const docUid = (value === null || value === void 0 ? void 0 : value.documentUid) || "";
|
|
14098
|
+
const isPhoto = value === null || value === void 0 ? void 0 : value.isPhoto;
|
|
14099
|
+
let typeLabel = "";
|
|
14100
|
+
let numLabel = "";
|
|
14101
|
+
let uploadLabel = "";
|
|
14102
|
+
if (value.title === "WS_IDENTITY_PROOF") {
|
|
14103
|
+
typeLabel = "Identity Proof*";
|
|
14104
|
+
numLabel = "Identity Proof Document Number";
|
|
14105
|
+
uploadLabel = "Upload Identity Proof Document*";
|
|
14106
|
+
} else if (value.title === "WS_OWNERSHIP_PROOF") {
|
|
14107
|
+
typeLabel = "Ownership Proof*";
|
|
14108
|
+
numLabel = "Ownership Proof Document Number";
|
|
14109
|
+
uploadLabel = "Upload Ownership Proof*";
|
|
14110
|
+
} else if (value.title === "WS_OTHER_DOCUMENTS") {
|
|
14111
|
+
typeLabel = "Other Documents*";
|
|
14112
|
+
numLabel = "Other Document Number";
|
|
14113
|
+
uploadLabel = "Upload Other Documents*";
|
|
14114
|
+
} else if (value.title === "WS_APPLICANT_PHOTO") {
|
|
14115
|
+
uploadLabel = "Upload Applicant Photo*";
|
|
14116
|
+
} else {
|
|
14117
|
+
typeLabel = ((value === null || value === void 0 ? void 0 : value.categoryLabel) || "Document") + "*";
|
|
14118
|
+
numLabel = "Document Number";
|
|
14119
|
+
uploadLabel = "Upload Document*";
|
|
14120
|
+
}
|
|
14121
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
14122
|
+
key: index,
|
|
14123
|
+
style: {
|
|
14124
|
+
marginBottom: "24px"
|
|
14125
|
+
}
|
|
14126
|
+
}, /*#__PURE__*/React.createElement(StatusTable, null, !isPhoto && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
14127
|
+
label: typeLabel,
|
|
14128
|
+
text: docSubType || t("NA")
|
|
14129
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
14130
|
+
label: numLabel,
|
|
14131
|
+
text: docUid || t("NA")
|
|
14132
|
+
})), /*#__PURE__*/React.createElement(Row, {
|
|
14133
|
+
label: uploadLabel,
|
|
14134
|
+
text: /*#__PURE__*/React.createElement("div", {
|
|
14135
|
+
style: {
|
|
14136
|
+
display: "flex",
|
|
14137
|
+
alignItems: "center",
|
|
14138
|
+
gap: "16px"
|
|
14139
|
+
}
|
|
14140
|
+
}, isPhoto ? fileUrl ? /*#__PURE__*/React.createElement("div", {
|
|
14141
|
+
style: {
|
|
14142
|
+
position: "relative"
|
|
14143
|
+
}
|
|
14144
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
14145
|
+
src: fileUrl,
|
|
14146
|
+
alt: "Applicant Photo",
|
|
14147
|
+
style: {
|
|
14148
|
+
width: "100px",
|
|
14149
|
+
height: "100px",
|
|
14150
|
+
objectFit: "cover",
|
|
14151
|
+
borderRadius: "4px",
|
|
14152
|
+
border: "1px solid #ccc"
|
|
14153
|
+
}
|
|
14154
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
|
14155
|
+
style: {
|
|
14156
|
+
fontSize: "14px",
|
|
14157
|
+
color: "#505A5F"
|
|
14158
|
+
}
|
|
14159
|
+
}, t("NA")) : /*#__PURE__*/React.createElement("div", {
|
|
14160
|
+
onClick: () => {
|
|
14161
|
+
if (fileUrl) setModalFile(fileUrl);
|
|
14162
|
+
},
|
|
14163
|
+
disabled: !fileUrl,
|
|
14164
|
+
style: {
|
|
14165
|
+
cursor: "pointer"
|
|
14166
|
+
}
|
|
14167
|
+
}, /*#__PURE__*/React.createElement(ViewsIcon, null)), !isPhoto && /*#__PURE__*/React.createElement("label", {
|
|
14168
|
+
style: {
|
|
14169
|
+
display: "flex",
|
|
14170
|
+
alignItems: "center",
|
|
14171
|
+
gap: "8px",
|
|
14172
|
+
fontSize: "14px",
|
|
14173
|
+
color: "#0B0C0C",
|
|
14174
|
+
margin: 0
|
|
14175
|
+
}
|
|
14176
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
14177
|
+
type: "checkbox",
|
|
14178
|
+
style: {
|
|
14179
|
+
width: "18px",
|
|
14180
|
+
height: "18px",
|
|
14181
|
+
accentColor: "#F47738"
|
|
14182
|
+
}
|
|
14183
|
+
}), "Check Verified"))
|
|
14184
|
+
})));
|
|
14185
|
+
};
|
|
14024
14186
|
return /*#__PURE__*/React.createElement("div", {
|
|
14025
14187
|
style: {
|
|
14026
14188
|
marginTop: "19px"
|
|
14027
14189
|
}
|
|
14028
|
-
}, !isStakeholderApplication && (documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
|
|
14190
|
+
}, renderModal(), !isStakeholderApplication && (documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
|
|
14029
14191
|
var _document$values;
|
|
14030
14192
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
14031
14193
|
key: index
|
|
@@ -14033,7 +14195,7 @@ function PropertyDocuments({
|
|
|
14033
14195
|
style: checkLocation ? {
|
|
14034
14196
|
marginTop: "32px",
|
|
14035
14197
|
marginBottom: "18px",
|
|
14036
|
-
color: "#0B0C0C
|
|
14198
|
+
color: "#0B0C0C",
|
|
14037
14199
|
fontSize: "24px",
|
|
14038
14200
|
lineHeight: "30px"
|
|
14039
14201
|
} : {
|
|
@@ -14042,17 +14204,21 @@ function PropertyDocuments({
|
|
|
14042
14204
|
color: "#505A5F",
|
|
14043
14205
|
fontSize: "24px"
|
|
14044
14206
|
}
|
|
14045
|
-
}, t(document === null || document === void 0 ? void 0 : document.title)) : null, /*#__PURE__*/React.createElement("div", {
|
|
14207
|
+
}, t(document === null || document === void 0 ? void 0 : document.title)) : null, isWSLocation ? /*#__PURE__*/React.createElement("div", {
|
|
14208
|
+
style: {
|
|
14209
|
+
marginTop: "8px"
|
|
14210
|
+
}
|
|
14211
|
+
}, document !== null && document !== void 0 && document.values && (document === null || document === void 0 ? void 0 : document.values.length) > 0 ? document.values.map((value, idx) => renderDocumentRow(value, idx)) : !window.location.href.includes("citizen") && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, t("BPA_NO_DOCUMENTS_UPLOADED_LABEL")))) : /*#__PURE__*/React.createElement("div", {
|
|
14046
14212
|
style: {
|
|
14047
14213
|
display: "flex",
|
|
14048
14214
|
flexWrap: "wrap",
|
|
14049
14215
|
justifyContent: "flex-start"
|
|
14050
14216
|
}
|
|
14051
14217
|
}, document !== null && document !== void 0 && document.values && (document === null || document === void 0 ? void 0 : document.values.length) > 0 ? document === null || document === void 0 ? void 0 : (_document$values = document.values) === null || _document$values === void 0 ? void 0 : _document$values.map((value, index) => {
|
|
14052
|
-
var _pdfFiles$value$
|
|
14218
|
+
var _pdfFiles$value$fileS2, _value$documentType;
|
|
14053
14219
|
return /*#__PURE__*/React.createElement("a", {
|
|
14054
14220
|
target: "_",
|
|
14055
|
-
href: (_pdfFiles$value$
|
|
14221
|
+
href: (_pdfFiles$value$fileS2 = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS2 === void 0 ? void 0 : _pdfFiles$value$fileS2.split(",")[0],
|
|
14056
14222
|
style: {
|
|
14057
14223
|
minWidth: "80px",
|
|
14058
14224
|
marginRight: "10px",
|
|
@@ -14099,10 +14265,10 @@ function PropertyDocuments({
|
|
|
14099
14265
|
fontSize: "24px"
|
|
14100
14266
|
}
|
|
14101
14267
|
}, t(document === null || document === void 0 ? void 0 : document.title)) : null, /*#__PURE__*/React.createElement("div", null, document !== null && document !== void 0 && document.values && (document === null || document === void 0 ? void 0 : document.values.length) > 0 ? document === null || document === void 0 ? void 0 : (_document$values2 = document.values) === null || _document$values2 === void 0 ? void 0 : _document$values2.map((value, index) => {
|
|
14102
|
-
var _pdfFiles$value$
|
|
14268
|
+
var _pdfFiles$value$fileS3;
|
|
14103
14269
|
return /*#__PURE__*/React.createElement("a", {
|
|
14104
14270
|
target: "_",
|
|
14105
|
-
href: (_pdfFiles$value$
|
|
14271
|
+
href: (_pdfFiles$value$fileS3 = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS3 === void 0 ? void 0 : _pdfFiles$value$fileS3.split(",")[0],
|
|
14106
14272
|
style: {
|
|
14107
14273
|
minWidth: svgStyles !== null && svgStyles !== void 0 && svgStyles.minWidth ? svgStyles === null || svgStyles === void 0 ? void 0 : svgStyles.minWidth : "160px",
|
|
14108
14274
|
marginRight: "20px"
|
|
@@ -14865,12 +15031,11 @@ const WSAdditonalDetails = ({
|
|
|
14865
15031
|
wsAdditionalDetails,
|
|
14866
15032
|
oldValue
|
|
14867
15033
|
}) => {
|
|
14868
|
-
var _wsAdditionalDetails
|
|
15034
|
+
var _wsAdditionalDetails$;
|
|
14869
15035
|
const {
|
|
14870
15036
|
t
|
|
14871
15037
|
} = useTranslation();
|
|
14872
15038
|
let filters = getQueryStringParams(location.search);
|
|
14873
|
-
const isModify = filters === null || filters === void 0 ? void 0 : filters.mode;
|
|
14874
15039
|
var {
|
|
14875
15040
|
connectionDetails,
|
|
14876
15041
|
plumberDetails,
|
|
@@ -14899,50 +15064,6 @@ const WSAdditonalDetails = ({
|
|
|
14899
15064
|
label: `${t(`${value.title}`)}`,
|
|
14900
15065
|
text: value !== null && value !== void 0 && value.oldValue ? value === null || value === void 0 ? void 0 : value.oldValue : value !== null && value !== void 0 && value.value ? value === null || value === void 0 ? void 0 : value.value : ""
|
|
14901
15066
|
}));
|
|
14902
|
-
})))), (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$2 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$2 === void 0 ? void 0 : _wsAdditionalDetails$2.plumberDetails) && isModify != "MODIFY" && /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
14903
|
-
style: cardSubHeaderStyles()
|
|
14904
|
-
}, t("WS_COMMON_PLUMBER_DETAILS")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
14905
|
-
className: "plumber-details-new-value-wrapper"
|
|
14906
|
-
}, plumberDetails === null || plumberDetails === void 0 ? void 0 : plumberDetails.map((value, index) => {
|
|
14907
|
-
return /*#__PURE__*/React.createElement(Row, {
|
|
14908
|
-
className: "border-none",
|
|
14909
|
-
key: `${value.title}`,
|
|
14910
|
-
label: `${t(`${value.title}`)}`,
|
|
14911
|
-
text: value !== null && value !== void 0 && value.oldValue ? value === null || value === void 0 ? void 0 : value.oldValue : value !== null && value !== void 0 && value.value ? value === null || value === void 0 ? void 0 : value.value : "",
|
|
14912
|
-
privacy: value.privacy
|
|
14913
|
-
});
|
|
14914
|
-
})))), (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$3 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$3 === void 0 ? void 0 : _wsAdditionalDetails$3.roadCuttingDetails) && isModify != "MODIFY" && /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
14915
|
-
style: cardSubHeaderStyles()
|
|
14916
|
-
}, t("WS_ROAD_CUTTING_DETAILS")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
14917
|
-
className: "plumber-details-new-value-wrapper"
|
|
14918
|
-
}, roadCuttingDetails === null || roadCuttingDetails === void 0 ? void 0 : roadCuttingDetails.map((value, index) => {
|
|
14919
|
-
var _value$values;
|
|
14920
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
14921
|
-
key: index,
|
|
14922
|
-
style: (roadCuttingDetails === null || roadCuttingDetails === void 0 ? void 0 : roadCuttingDetails.length) > 1 ? {
|
|
14923
|
-
border: "1px solid #D6D5D4",
|
|
14924
|
-
background: "#FAFAFA",
|
|
14925
|
-
borderRadius: "4px",
|
|
14926
|
-
padding: "10px 10px 0px 10px",
|
|
14927
|
-
margin: "5px 0px"
|
|
14928
|
-
} : {}
|
|
14929
|
-
}, value === null || value === void 0 ? void 0 : (_value$values = value.values) === null || _value$values === void 0 ? void 0 : _value$values.map(roadValue => /*#__PURE__*/React.createElement(Row, {
|
|
14930
|
-
className: "border-none",
|
|
14931
|
-
key: `${roadValue.title}`,
|
|
14932
|
-
label: `${t(`${roadValue.title}`)}`,
|
|
14933
|
-
text: roadValue !== null && roadValue !== void 0 && roadValue.oldValue ? roadValue === null || roadValue === void 0 ? void 0 : roadValue.oldValue : roadValue !== null && roadValue !== void 0 && roadValue.value ? roadValue === null || roadValue === void 0 ? void 0 : roadValue.value : ""
|
|
14934
|
-
})));
|
|
14935
|
-
})))), (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$4 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$4 === void 0 ? void 0 : _wsAdditionalDetails$4.activationDetails) && /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
14936
|
-
style: cardSubHeaderStyles()
|
|
14937
|
-
}, t("WS_ACTIVATION_DETAILS")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
14938
|
-
className: "plumber-details-new-value-wrapper"
|
|
14939
|
-
}, activationDetails === null || activationDetails === void 0 ? void 0 : activationDetails.map((value, index) => {
|
|
14940
|
-
return /*#__PURE__*/React.createElement(Row, {
|
|
14941
|
-
className: "border-none",
|
|
14942
|
-
key: `${value.title}`,
|
|
14943
|
-
label: `${t(`${value.title}`)}`,
|
|
14944
|
-
text: value !== null && value !== void 0 && value.oldValue ? value === null || value === void 0 ? void 0 : value.oldValue : value !== null && value !== void 0 && value.value ? value === null || value === void 0 ? void 0 : value.value : ""
|
|
14945
|
-
});
|
|
14946
15067
|
}))))));
|
|
14947
15068
|
};
|
|
14948
15069
|
|
|
@@ -15861,6 +15982,122 @@ const RenewPopup = ({
|
|
|
15861
15982
|
})))));
|
|
15862
15983
|
};
|
|
15863
15984
|
|
|
15985
|
+
const DueVerification = () => {
|
|
15986
|
+
const {
|
|
15987
|
+
t
|
|
15988
|
+
} = useTranslation();
|
|
15989
|
+
const [kno, setKno] = useState("");
|
|
15990
|
+
const [tableData, setTableData] = useState([]);
|
|
15991
|
+
const columns = useMemo(() => [{
|
|
15992
|
+
Header: t("K No."),
|
|
15993
|
+
accessor: "kno"
|
|
15994
|
+
}, {
|
|
15995
|
+
Header: t("Full Name"),
|
|
15996
|
+
accessor: "fullName"
|
|
15997
|
+
}, {
|
|
15998
|
+
Header: t("Full Address"),
|
|
15999
|
+
accessor: "fullAddress"
|
|
16000
|
+
}, {
|
|
16001
|
+
Header: t("Due Amount"),
|
|
16002
|
+
accessor: "dueAmount"
|
|
16003
|
+
}, {
|
|
16004
|
+
Header: t("Total Amount"),
|
|
16005
|
+
accessor: "totalAmount"
|
|
16006
|
+
}], [t]);
|
|
16007
|
+
const handleAdd = () => {
|
|
16008
|
+
if (kno) {
|
|
16009
|
+
const mockData = {
|
|
16010
|
+
kno: kno,
|
|
16011
|
+
fullName: "John Doe",
|
|
16012
|
+
fullAddress: "123 Main St, New Delhi, Delhi 110001",
|
|
16013
|
+
dueAmount: "1500",
|
|
16014
|
+
totalAmount: "1500"
|
|
16015
|
+
};
|
|
16016
|
+
setTableData([...tableData, mockData]);
|
|
16017
|
+
setKno("");
|
|
16018
|
+
}
|
|
16019
|
+
};
|
|
16020
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
16021
|
+
style: {
|
|
16022
|
+
marginBottom: "20px"
|
|
16023
|
+
}
|
|
16024
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
16025
|
+
style: {
|
|
16026
|
+
fontSize: "24px",
|
|
16027
|
+
fontWeight: "bold",
|
|
16028
|
+
color: "#4f6cfc",
|
|
16029
|
+
marginBottom: "16px"
|
|
16030
|
+
}
|
|
16031
|
+
}, t("Due Verification")), /*#__PURE__*/React.createElement("div", {
|
|
16032
|
+
style: {
|
|
16033
|
+
display: "flex",
|
|
16034
|
+
alignItems: "flex-end",
|
|
16035
|
+
gap: "20px",
|
|
16036
|
+
marginBottom: "20px"
|
|
16037
|
+
}
|
|
16038
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
16039
|
+
style: {
|
|
16040
|
+
flex: 1
|
|
16041
|
+
}
|
|
16042
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
16043
|
+
style: {
|
|
16044
|
+
fontSize: "16px",
|
|
16045
|
+
color: "#0B0C0C",
|
|
16046
|
+
marginBottom: "8px",
|
|
16047
|
+
display: "inline-block"
|
|
16048
|
+
}
|
|
16049
|
+
}, t("K No.(Existing KNo of same property)"), " ", /*#__PURE__*/React.createElement("span", {
|
|
16050
|
+
style: {
|
|
16051
|
+
color: "red"
|
|
16052
|
+
}
|
|
16053
|
+
}, "*")), /*#__PURE__*/React.createElement(TextInput, {
|
|
16054
|
+
type: "number",
|
|
16055
|
+
value: kno,
|
|
16056
|
+
onChange: e => setKno(e.target.value),
|
|
16057
|
+
style: {
|
|
16058
|
+
width: "100%",
|
|
16059
|
+
marginBottom: "0"
|
|
16060
|
+
}
|
|
16061
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
16062
|
+
style: {
|
|
16063
|
+
flex: 1,
|
|
16064
|
+
paddingBottom: "2px"
|
|
16065
|
+
}
|
|
16066
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
16067
|
+
type: "button",
|
|
16068
|
+
onClick: handleAdd,
|
|
16069
|
+
style: {
|
|
16070
|
+
backgroundColor: "#4f6cfc",
|
|
16071
|
+
color: "white",
|
|
16072
|
+
padding: "8px 24px",
|
|
16073
|
+
borderRadius: "4px",
|
|
16074
|
+
border: "none",
|
|
16075
|
+
cursor: "pointer"
|
|
16076
|
+
}
|
|
16077
|
+
}, t("Add")))), tableData.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
16078
|
+
style: {
|
|
16079
|
+
marginTop: "30px",
|
|
16080
|
+
overflowX: "auto"
|
|
16081
|
+
}
|
|
16082
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
16083
|
+
className: "customTable table-fixed-first-column table-border-style",
|
|
16084
|
+
t: t,
|
|
16085
|
+
disableSort: false,
|
|
16086
|
+
autoSort: true,
|
|
16087
|
+
manualPagination: false,
|
|
16088
|
+
isPaginationRequired: false,
|
|
16089
|
+
data: tableData,
|
|
16090
|
+
columns: columns,
|
|
16091
|
+
getCellProps: cellInfo => {
|
|
16092
|
+
return {
|
|
16093
|
+
style: {
|
|
16094
|
+
padding: "12px"
|
|
16095
|
+
}
|
|
16096
|
+
};
|
|
16097
|
+
}
|
|
16098
|
+
})));
|
|
16099
|
+
};
|
|
16100
|
+
|
|
15864
16101
|
function ApplicationDetailsContent({
|
|
15865
16102
|
applicationDetails,
|
|
15866
16103
|
workflowDetails,
|
|
@@ -16359,7 +16596,7 @@ function ApplicationDetailsContent({
|
|
|
16359
16596
|
}), (detail === null || detail === void 0 ? void 0 : detail.isWaterConnectionDetails) && /*#__PURE__*/React.createElement(WSAdditonalDetails, {
|
|
16360
16597
|
wsAdditionalDetails: detail,
|
|
16361
16598
|
oldValue: oldValue
|
|
16362
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet23 = detail.additionalDetails) === null || _detail$additionalDet23 === void 0 ? void 0 : _detail$additionalDet23.redirectUrl) && /*#__PURE__*/React.createElement(Link, {
|
|
16599
|
+
}), (detail === null || detail === void 0 ? void 0 : detail.isDueVerification) && (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "PENDING_FOR_FIELD_INSPECTION" && /*#__PURE__*/React.createElement(DueVerification, null), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet23 = detail.additionalDetails) === null || _detail$additionalDet23 === void 0 ? void 0 : _detail$additionalDet23.redirectUrl) && /*#__PURE__*/React.createElement(Link, {
|
|
16363
16600
|
to: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet24 = detail.additionalDetails) === null || _detail$additionalDet24 === void 0 ? void 0 : (_detail$additionalDet25 = _detail$additionalDet24.redirectUrl) === null || _detail$additionalDet25 === void 0 ? void 0 : _detail$additionalDet25.url
|
|
16364
16601
|
}, /*#__PURE__*/React.createElement("span", {
|
|
16365
16602
|
className: "add-details-link hover-button"
|
|
@@ -16998,17 +17235,46 @@ const ViewProperty = () => {
|
|
|
16998
17235
|
const App = ({
|
|
16999
17236
|
stateCode
|
|
17000
17237
|
}) => {
|
|
17238
|
+
const {
|
|
17239
|
+
t
|
|
17240
|
+
} = useTranslation();
|
|
17001
17241
|
const {
|
|
17002
17242
|
path,
|
|
17003
17243
|
url,
|
|
17004
17244
|
...match
|
|
17005
17245
|
} = useRouteMatch();
|
|
17006
|
-
|
|
17246
|
+
const getBreadcrumbLabel = () => {
|
|
17247
|
+
const pathname = location.pathname;
|
|
17248
|
+
if (pathname.includes("/commonpt/search")) return "SEARCH_PROPERTY";else if (pathname.includes("/view-property")) return "PT_PROPERTY_INFORMATION";
|
|
17249
|
+
return "ES_COMMON_INBOX";
|
|
17250
|
+
};
|
|
17251
|
+
const breadcrumbs = [{
|
|
17252
|
+
icon: HomeIcon,
|
|
17253
|
+
path: "/digit-ui/employee"
|
|
17254
|
+
}, {
|
|
17255
|
+
label: t(getBreadcrumbLabel())
|
|
17256
|
+
}];
|
|
17257
|
+
return /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement("div", {
|
|
17258
|
+
className: "ground-container employee-app-container form-container"
|
|
17259
|
+
}, /*#__PURE__*/React.createElement(ModuleHeader, {
|
|
17260
|
+
leftContent: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ArrowLeft, {
|
|
17261
|
+
className: "icon"
|
|
17262
|
+
}), "Back"),
|
|
17263
|
+
onLeftClick: () => window.history.back(),
|
|
17264
|
+
breadcrumbs: breadcrumbs
|
|
17265
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
17266
|
+
className: "employee-form"
|
|
17267
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
17268
|
+
className: "employee-form-content"
|
|
17269
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
17007
17270
|
className: "pt-citizen",
|
|
17008
17271
|
style: {
|
|
17009
17272
|
width: "100%"
|
|
17010
17273
|
}
|
|
17011
|
-
}, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(
|
|
17274
|
+
}, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
|
|
17275
|
+
path: `${path}/search`,
|
|
17276
|
+
component: SearchProperty$1
|
|
17277
|
+
}), /*#__PURE__*/React.createElement(Route, {
|
|
17012
17278
|
path: `${path}/property/citizen-search`,
|
|
17013
17279
|
component: SearchProperty$1
|
|
17014
17280
|
}), /*#__PURE__*/React.createElement(Route, {
|
|
@@ -17028,7 +17294,7 @@ const App = ({
|
|
|
17028
17294
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
17029
17295
|
path: `${path}/view-property`,
|
|
17030
17296
|
component: () => /*#__PURE__*/React.createElement(ViewProperty, null)
|
|
17031
|
-
}))));
|
|
17297
|
+
})))))));
|
|
17032
17298
|
};
|
|
17033
17299
|
|
|
17034
17300
|
const NewApplication = ({
|
|
@@ -17270,45 +17536,30 @@ const EmployeeApp = ({
|
|
|
17270
17536
|
const location = useLocation();
|
|
17271
17537
|
const urlpropertyId = new URLSearchParams(useLocation().search).get("propertyId");
|
|
17272
17538
|
const urltenantId = new URLSearchParams(useLocation().search).get("tenantId");
|
|
17273
|
-
const
|
|
17274
|
-
|
|
17275
|
-
|
|
17276
|
-
|
|
17277
|
-
if (redirectUrl.includes("employee/tl/new-application")) return t("ES_TITLE_NEW_TRADE_LICESE_APPLICATION");else if (redirectUrl.includes("employee/ws/new-application")) return t("ES_COMMON_WS_NEW_CONNECTION");else if (redirectUrl.includes("employee/ws/modify-application")) return t("WS_WATER_AND_SEWERAGE_MODIFY_CONNECTION_LABEL");else return t("WF_EMPLOYEE_NEWTL_RENEWAL_SUBMIT_BUTTON");
|
|
17539
|
+
const getBreadcrumbLabel = () => {
|
|
17540
|
+
const pathname = location.pathname;
|
|
17541
|
+
if (pathname.includes("/commonpt/search")) return "SEARCH_PROPERTY";else if (pathname.includes("/view-property")) return "PT_PROPERTY_INFORMATION";
|
|
17542
|
+
return "ES_COMMON_INBOX";
|
|
17278
17543
|
};
|
|
17279
|
-
const
|
|
17280
|
-
|
|
17281
|
-
|
|
17282
|
-
const crumbs = [{
|
|
17283
|
-
path: "/digit-ui/employee",
|
|
17284
|
-
content: t("ES_COMMON_HOME"),
|
|
17285
|
-
show: true
|
|
17286
|
-
}, {
|
|
17287
|
-
path: {
|
|
17288
|
-
pathname: urlpropertyId ? `${redirectUrl}?propertyId=${urlpropertyId}&tenantId=${urltenantId}` : redirectUrl,
|
|
17289
|
-
state: {
|
|
17290
|
-
...location.state
|
|
17291
|
-
}
|
|
17292
|
-
},
|
|
17293
|
-
content: redirectUrl ? getRedirectBreadCrumb(redirectUrl) : fromScreen && t(fromScreen) || "NONE",
|
|
17294
|
-
show: (redirectUrl || fromScreen) && true,
|
|
17295
|
-
isBack: fromScreen && true,
|
|
17296
|
-
isredirected: true
|
|
17544
|
+
const breadcrumbs = [{
|
|
17545
|
+
icon: HomeIcon,
|
|
17546
|
+
path: "/digit-ui/employee"
|
|
17297
17547
|
}, {
|
|
17298
|
-
|
|
17299
|
-
content: getBreadCrumb(),
|
|
17300
|
-
show: true
|
|
17548
|
+
label: t(getBreadcrumbLabel())
|
|
17301
17549
|
}];
|
|
17302
|
-
|
|
17303
|
-
|
|
17304
|
-
|
|
17550
|
+
return /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement("div", {
|
|
17551
|
+
className: "ground-container employee-app-container form-container"
|
|
17552
|
+
}, /*#__PURE__*/React.createElement(ModuleHeader, {
|
|
17553
|
+
leftContent: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ArrowLeft, {
|
|
17554
|
+
className: "icon"
|
|
17555
|
+
}), "Back"),
|
|
17556
|
+
onLeftClick: () => window.history.back(),
|
|
17557
|
+
breadcrumbs: breadcrumbs
|
|
17558
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
17559
|
+
className: "employee-form"
|
|
17305
17560
|
}, /*#__PURE__*/React.createElement("div", {
|
|
17306
|
-
|
|
17307
|
-
|
|
17308
|
-
} : {}
|
|
17309
|
-
}, /*#__PURE__*/React.createElement(BreadCrumb, {
|
|
17310
|
-
crumbs: crumbs
|
|
17311
|
-
})), /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
17561
|
+
className: "employee-form-content"
|
|
17562
|
+
}, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
17312
17563
|
exact: true,
|
|
17313
17564
|
path: `${path}/`,
|
|
17314
17565
|
component: () => /*#__PURE__*/React.createElement(CommonPTLinks, {
|
|
@@ -17317,18 +17568,14 @@ const EmployeeApp = ({
|
|
|
17317
17568
|
})
|
|
17318
17569
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
17319
17570
|
path: `${path}/new-application`,
|
|
17320
|
-
component:
|
|
17321
|
-
layoutClass: "action"
|
|
17322
|
-
}, /*#__PURE__*/React.createElement(NewApplication, {
|
|
17323
|
-
path: path
|
|
17324
|
-
}))
|
|
17571
|
+
component: NewApplication
|
|
17325
17572
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
17326
17573
|
path: `${path}/search`,
|
|
17327
17574
|
component: Search
|
|
17328
17575
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
17329
17576
|
path: `${path}/view-property`,
|
|
17330
17577
|
component: ViewProperty
|
|
17331
|
-
})));
|
|
17578
|
+
}))))));
|
|
17332
17579
|
};
|
|
17333
17580
|
|
|
17334
17581
|
const PropertyAssemblyDetails = ({
|
|
@@ -17596,16 +17843,10 @@ const PropertyLocationDetails = ({
|
|
|
17596
17843
|
formData: formDataProp,
|
|
17597
17844
|
...props
|
|
17598
17845
|
}) => {
|
|
17599
|
-
var _formDataProp$
|
|
17846
|
+
var _formDataProp$cpt2;
|
|
17600
17847
|
const {
|
|
17601
17848
|
t
|
|
17602
17849
|
} = useTranslation();
|
|
17603
|
-
const {
|
|
17604
|
-
data: allCities
|
|
17605
|
-
} = Digit.Hooks.useTenants();
|
|
17606
|
-
const {
|
|
17607
|
-
handleSubmit
|
|
17608
|
-
} = useForm();
|
|
17609
17850
|
const [showToast, setShowToast] = useState(null);
|
|
17610
17851
|
const [formData, setFormData] = useState({
|
|
17611
17852
|
addressType: (address === null || address === void 0 ? void 0 : address.addressType) || "",
|
|
@@ -17623,19 +17864,25 @@ const PropertyLocationDetails = ({
|
|
|
17623
17864
|
assembly: (address === null || address === void 0 ? void 0 : address.assembly) || "",
|
|
17624
17865
|
block: (address === null || address === void 0 ? void 0 : address.block) || "",
|
|
17625
17866
|
zone: (address === null || address === void 0 ? void 0 : address.zone) || "",
|
|
17626
|
-
|
|
17867
|
+
zroLocation: (address === null || address === void 0 ? void 0 : address.zroLocation) || ""
|
|
17627
17868
|
});
|
|
17628
|
-
const isPropertyFound =
|
|
17869
|
+
const isPropertyFound = window.location.href.includes("ws/old-application");
|
|
17629
17870
|
useEffect(() => {
|
|
17630
|
-
var _formDataProp$
|
|
17631
|
-
if (formDataProp !== null && formDataProp !== void 0 && (_formDataProp$
|
|
17632
|
-
var _addressData$locality, _addressData$geoLocat, _addressData$geoLocat2, _addressData$locality2, _addressData$geoLocat3, _addressData$geoLocat4, _addressData$locality3, _addressData$addition, _addressData$addition2, _addressData$addition3, _addressData$addition4, _addressData$addition5, _addressData$addition6, _addressData$addition7
|
|
17871
|
+
var _formDataProp$cpt;
|
|
17872
|
+
if (formDataProp !== null && formDataProp !== void 0 && (_formDataProp$cpt = formDataProp.cpt) !== null && _formDataProp$cpt !== void 0 && _formDataProp$cpt.details) {
|
|
17873
|
+
var _addressData$locality, _addressData$geoLocat, _addressData$geoLocat2, _addressData$locality2, _addressData$geoLocat3, _addressData$geoLocat4, _addressData$locality3, _addressData$addition, _addressData$addition2, _addressData$addition3, _addressData$addition4, _addressData$addition5, _addressData$addition6, _addressData$addition7;
|
|
17633
17874
|
const details = formDataProp.cpt.details;
|
|
17634
17875
|
const addressData = details.address || {};
|
|
17635
17876
|
const additionalDetails = details.additionalDetails || {};
|
|
17636
17877
|
const localityCode = ((_addressData$locality = addressData.locality) === null || _addressData$locality === void 0 ? void 0 : _addressData$locality.code) || addressData.locality || "";
|
|
17637
17878
|
const lat = (_addressData$geoLocat = addressData.geoLocation) !== null && _addressData$geoLocat !== void 0 && _addressData$geoLocat.latitude && ((_addressData$geoLocat2 = addressData.geoLocation) === null || _addressData$geoLocat2 === void 0 ? void 0 : _addressData$geoLocat2.latitude) !== 0 ? addressData.geoLocation.latitude : ((_addressData$locality2 = addressData.locality) === null || _addressData$locality2 === void 0 ? void 0 : _addressData$locality2.latitude) || addressData.latitude || "";
|
|
17638
17879
|
const lng = (_addressData$geoLocat3 = addressData.geoLocation) !== null && _addressData$geoLocat3 !== void 0 && _addressData$geoLocat3.longitude && ((_addressData$geoLocat4 = addressData.geoLocation) === null || _addressData$geoLocat4 === void 0 ? void 0 : _addressData$geoLocat4.longitude) !== 0 ? addressData.geoLocation.longitude : ((_addressData$locality3 = addressData.locality) === null || _addressData$locality3 === void 0 ? void 0 : _addressData$locality3.longitude) || addressData.longitude || "";
|
|
17880
|
+
const zroCode = addressData.zroLocation || additionalDetails.zroLocation || ((_addressData$addition = addressData.additionalDetails) === null || _addressData$addition === void 0 ? void 0 : _addressData$addition.zroLocation) || "";
|
|
17881
|
+
const zroValue = zroCode ? {
|
|
17882
|
+
code: zroCode,
|
|
17883
|
+
name: zroCode,
|
|
17884
|
+
i18nKey: zroCode
|
|
17885
|
+
} : "";
|
|
17639
17886
|
setFormData({
|
|
17640
17887
|
pincode: addressData.pincode || "",
|
|
17641
17888
|
city: addressData.city || "",
|
|
@@ -17645,10 +17892,11 @@ const PropertyLocationDetails = ({
|
|
|
17645
17892
|
landmark: addressData.landmark || "",
|
|
17646
17893
|
latitude: lat,
|
|
17647
17894
|
longitude: lng,
|
|
17648
|
-
assembly: additionalDetails.assembly || ((_addressData$
|
|
17649
|
-
block: additionalDetails.block || ((_addressData$
|
|
17650
|
-
zone: additionalDetails.zone || ((_addressData$
|
|
17651
|
-
|
|
17895
|
+
assembly: additionalDetails.assembly || ((_addressData$addition2 = addressData.additionalDetails) === null || _addressData$addition2 === void 0 ? void 0 : _addressData$addition2.assembly) || "",
|
|
17896
|
+
block: additionalDetails.block || ((_addressData$addition3 = addressData.additionalDetails) === null || _addressData$addition3 === void 0 ? void 0 : _addressData$addition3.block) || "",
|
|
17897
|
+
zone: additionalDetails.zone || ((_addressData$addition4 = addressData.additionalDetails) === null || _addressData$addition4 === void 0 ? void 0 : _addressData$addition4.zone) || "",
|
|
17898
|
+
zroLocation: zroCode,
|
|
17899
|
+
zro: zroValue,
|
|
17652
17900
|
address: {
|
|
17653
17901
|
...addressData,
|
|
17654
17902
|
city: addressData.city || "",
|
|
@@ -17659,14 +17907,15 @@ const PropertyLocationDetails = ({
|
|
|
17659
17907
|
addressLine1: addressData.street || "",
|
|
17660
17908
|
latitude: lat,
|
|
17661
17909
|
longitude: lng,
|
|
17662
|
-
|
|
17663
|
-
|
|
17664
|
-
|
|
17665
|
-
|
|
17910
|
+
zroLocation: zroCode,
|
|
17911
|
+
zro: zroValue,
|
|
17912
|
+
assembly: additionalDetails.assembly || ((_addressData$addition5 = addressData.additionalDetails) === null || _addressData$addition5 === void 0 ? void 0 : _addressData$addition5.assembly) || "",
|
|
17913
|
+
block: additionalDetails.block || ((_addressData$addition6 = addressData.additionalDetails) === null || _addressData$addition6 === void 0 ? void 0 : _addressData$addition6.block) || "",
|
|
17914
|
+
zone: additionalDetails.zone || ((_addressData$addition7 = addressData.additionalDetails) === null || _addressData$addition7 === void 0 ? void 0 : _addressData$addition7.zone) || ""
|
|
17666
17915
|
}
|
|
17667
17916
|
});
|
|
17668
17917
|
}
|
|
17669
|
-
}, [formDataProp === null || formDataProp === void 0 ? void 0 : (_formDataProp$
|
|
17918
|
+
}, [formDataProp === null || formDataProp === void 0 ? void 0 : (_formDataProp$cpt2 = formDataProp.cpt) === null || _formDataProp$cpt2 === void 0 ? void 0 : _formDataProp$cpt2.details]);
|
|
17670
17919
|
useEffect(() => {
|
|
17671
17920
|
if (showToast) {
|
|
17672
17921
|
const timer = setTimeout(() => {
|
|
@@ -17675,10 +17924,6 @@ const PropertyLocationDetails = ({
|
|
|
17675
17924
|
return () => clearTimeout(timer);
|
|
17676
17925
|
}
|
|
17677
17926
|
}, [showToast]);
|
|
17678
|
-
const {
|
|
17679
|
-
createAddress,
|
|
17680
|
-
updateAddress: updateAddressMutation
|
|
17681
|
-
} = Digit.Hooks.useAddress(null, Digit.ULBService.getCurrentTenantId());
|
|
17682
17927
|
return /*#__PURE__*/React.createElement(CollapsibleCardPage, {
|
|
17683
17928
|
title: t("PT_LOCATION_DETAILS"),
|
|
17684
17929
|
defaultOpen: true
|
|
@@ -18169,7 +18414,7 @@ const PropertyWaterConnection = ({
|
|
|
18169
18414
|
clearErrors,
|
|
18170
18415
|
...props
|
|
18171
18416
|
}) => {
|
|
18172
|
-
var _formData$
|
|
18417
|
+
var _formData$cpt2, _errors$useDetails, _errors$useDetails2, _errors$useDetails3, _errors$useDetails4, _errors$useDetails5, _errors$useDetails6, _errors$useDetails7, _errors$useDetails8, _errors$useDetails9, _errors$useDetails0;
|
|
18173
18418
|
const {
|
|
18174
18419
|
control,
|
|
18175
18420
|
register,
|
|
@@ -18200,7 +18445,7 @@ const PropertyWaterConnection = ({
|
|
|
18200
18445
|
isLoading: isWSServicesMastersLoading,
|
|
18201
18446
|
data: ptServicesMastersData
|
|
18202
18447
|
} = Digit.Hooks.pt.usePropertyMDMS(tenantId, "PropertyTax", ["PropertyCategory", "PropertyType", "NoOfFloors", "PropertyNewUsageType"]);
|
|
18203
|
-
const isPropertyFound =
|
|
18448
|
+
const isPropertyFound = window.location.href.includes("ws/old-application");
|
|
18204
18449
|
const formValue = watch();
|
|
18205
18450
|
const watchPropertyType = watch("useDetails.propertyType");
|
|
18206
18451
|
const watchPropertyCategory = watch("useDetails.propertyCategory");
|
|
@@ -18225,11 +18470,29 @@ const PropertyWaterConnection = ({
|
|
|
18225
18470
|
}, [ptServicesMastersData]);
|
|
18226
18471
|
const propertyTypeOptions = useMemo(() => {
|
|
18227
18472
|
var _ptServicesMastersDat3, _ptServicesMastersDat4;
|
|
18228
|
-
|
|
18473
|
+
let options = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat3 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat3 === void 0 ? void 0 : (_ptServicesMastersDat4 = _ptServicesMastersDat3.PropertyType) === null || _ptServicesMastersDat4 === void 0 ? void 0 : _ptServicesMastersDat4.filter(item => item.active)) || [];
|
|
18474
|
+
if (watchPropertyCategory !== null && watchPropertyCategory !== void 0 && watchPropertyCategory.code) {
|
|
18475
|
+
var _watchPropertyCategor;
|
|
18476
|
+
if ((watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : (_watchPropertyCategor = watchPropertyCategory.code) === null || _watchPropertyCategor === void 0 ? void 0 : _watchPropertyCategor.toUpperCase()) !== "MIXED") {
|
|
18477
|
+
options = options.filter(item => {
|
|
18478
|
+
var _item$type, _watchPropertyCategor2;
|
|
18479
|
+
return ((_item$type = item.type) === null || _item$type === void 0 ? void 0 : _item$type.toUpperCase()) === ((_watchPropertyCategor2 = watchPropertyCategory.code) === null || _watchPropertyCategor2 === void 0 ? void 0 : _watchPropertyCategor2.toUpperCase());
|
|
18480
|
+
});
|
|
18481
|
+
}
|
|
18482
|
+
}
|
|
18483
|
+
return options.map(item => ({
|
|
18229
18484
|
code: item.code,
|
|
18230
18485
|
name: item.name
|
|
18231
|
-
}))
|
|
18232
|
-
}, [ptServicesMastersData]);
|
|
18486
|
+
}));
|
|
18487
|
+
}, [ptServicesMastersData, watchPropertyCategory]);
|
|
18488
|
+
useEffect(() => {
|
|
18489
|
+
if (watchPropertyCategory && watchPropertyType) {
|
|
18490
|
+
const isTypeValid = propertyTypeOptions.some(opt => opt.code === watchPropertyType.code);
|
|
18491
|
+
if (!isTypeValid) {
|
|
18492
|
+
setValue("useDetails.propertyType", null);
|
|
18493
|
+
}
|
|
18494
|
+
}
|
|
18495
|
+
}, [watchPropertyCategory, propertyTypeOptions, setValue, watchPropertyType]);
|
|
18233
18496
|
const usageTypeOptions = useMemo(() => {
|
|
18234
18497
|
var _ptServicesMastersDat5, _ptServicesMastersDat6;
|
|
18235
18498
|
return ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat5 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat5 === void 0 ? void 0 : (_ptServicesMastersDat6 = _ptServicesMastersDat5.PropertyNewUsageType) === null || _ptServicesMastersDat6 === void 0 ? void 0 : _ptServicesMastersDat6.filter(item => item.active).map(item => ({
|
|
@@ -18252,8 +18515,8 @@ const PropertyWaterConnection = ({
|
|
|
18252
18515
|
}
|
|
18253
18516
|
}, [formValue, config.key, onSelect]);
|
|
18254
18517
|
useEffect(() => {
|
|
18255
|
-
var _formData$
|
|
18256
|
-
if (formData !== null && formData !== void 0 && (_formData$
|
|
18518
|
+
var _formData$cpt;
|
|
18519
|
+
if (formData !== null && formData !== void 0 && (_formData$cpt = formData.cpt) !== null && _formData$cpt !== void 0 && _formData$cpt.details) {
|
|
18257
18520
|
const details = formData.cpt.details;
|
|
18258
18521
|
const additionalDetails = (details === null || details === void 0 ? void 0 : details.additionalDetails) || {};
|
|
18259
18522
|
setValue("useDetails.propertyCategory", (categoryOptions === null || categoryOptions === void 0 ? void 0 : categoryOptions.find(o => o.code === additionalDetails.propertyCategory)) || null);
|
|
@@ -18269,7 +18532,7 @@ const PropertyWaterConnection = ({
|
|
|
18269
18532
|
setValue("useDetails.NumberofDwellingUnits", additionalDetails.numberOfDwellingUnits || "");
|
|
18270
18533
|
setValue("useDetails.NumberofRooms", additionalDetails.numberOfRooms || "");
|
|
18271
18534
|
}
|
|
18272
|
-
}, [formData === null || formData === void 0 ? void 0 : (_formData$
|
|
18535
|
+
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt2 = formData.cpt) === null || _formData$cpt2 === void 0 ? void 0 : _formData$cpt2.details, categoryOptions, propertyTypeOptions, usageTypeOptions, floorOptions, yearOptions, setValue]);
|
|
18273
18536
|
const lastErrorState = React.useRef(null);
|
|
18274
18537
|
useEffect(() => {
|
|
18275
18538
|
const hasErrors = Object.keys(errors).length > 0;
|
|
@@ -18354,14 +18617,11 @@ const PropertyWaterConnection = ({
|
|
|
18354
18617
|
})
|
|
18355
18618
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails3 = errors.useDetails) === null || _errors$useDetails3 === void 0 ? void 0 : _errors$useDetails3.WaterConnectionUsageType) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
18356
18619
|
style: errorStyle
|
|
18357
|
-
}, errors.useDetails.WaterConnectionUsageType.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_NUMBER_OF_FLOORS")}
|
|
18620
|
+
}, errors.useDetails.WaterConnectionUsageType.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_NUMBER_OF_FLOORS")}`), /*#__PURE__*/React.createElement("div", {
|
|
18358
18621
|
className: "form-field"
|
|
18359
18622
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
18360
18623
|
control: control,
|
|
18361
18624
|
name: "useDetails.noOfFloors",
|
|
18362
|
-
rules: {
|
|
18363
|
-
required: t("REQUIRED_FIELD")
|
|
18364
|
-
},
|
|
18365
18625
|
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
18366
18626
|
option: floorOptions,
|
|
18367
18627
|
optionKey: "name",
|
|
@@ -18373,7 +18633,7 @@ const PropertyWaterConnection = ({
|
|
|
18373
18633
|
})
|
|
18374
18634
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails4 = errors.useDetails) === null || _errors$useDetails4 === void 0 ? void 0 : _errors$useDetails4.noOfFloors) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
18375
18635
|
style: errorStyle
|
|
18376
|
-
}, errors.useDetails.noOfFloors.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_PLOT_AREA")}
|
|
18636
|
+
}, errors.useDetails.noOfFloors.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_PLOT_AREA")}`), /*#__PURE__*/React.createElement("div", {
|
|
18377
18637
|
className: "form-field"
|
|
18378
18638
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
18379
18639
|
t: t,
|
|
@@ -18381,14 +18641,13 @@ const PropertyWaterConnection = ({
|
|
|
18381
18641
|
pattern: {
|
|
18382
18642
|
value: DECIMAL_PATTERN,
|
|
18383
18643
|
message: t("ERR_INVALID_DECIMAL")
|
|
18384
|
-
}
|
|
18385
|
-
required: t("REQUIRED_FIELD")
|
|
18644
|
+
}
|
|
18386
18645
|
}),
|
|
18387
18646
|
name: "useDetails.plotArea",
|
|
18388
18647
|
disabled: isPropertyFound
|
|
18389
18648
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails5 = errors.useDetails) === null || _errors$useDetails5 === void 0 ? void 0 : _errors$useDetails5.plotArea) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
18390
18649
|
style: errorStyle
|
|
18391
|
-
}, errors.useDetails.plotArea.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_BUILT_UP_AREA")}
|
|
18650
|
+
}, errors.useDetails.plotArea.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_BUILT_UP_AREA")}`), /*#__PURE__*/React.createElement("div", {
|
|
18392
18651
|
className: "form-field"
|
|
18393
18652
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
18394
18653
|
t: t,
|
|
@@ -18396,8 +18655,7 @@ const PropertyWaterConnection = ({
|
|
|
18396
18655
|
pattern: {
|
|
18397
18656
|
value: DECIMAL_PATTERN,
|
|
18398
18657
|
message: t("ERR_INVALID_DECIMAL")
|
|
18399
|
-
}
|
|
18400
|
-
required: t("REQUIRED_FIELD")
|
|
18658
|
+
}
|
|
18401
18659
|
}),
|
|
18402
18660
|
name: "useDetails.builtUpArea",
|
|
18403
18661
|
disabled: isPropertyFound
|
|
@@ -18527,7 +18785,9 @@ const SearchPTID = ({
|
|
|
18527
18785
|
onReset: onReset,
|
|
18528
18786
|
t: t,
|
|
18529
18787
|
onSwitch: setSearchBy
|
|
18530
|
-
}),
|
|
18788
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
18789
|
+
className: "formcomposer-section-grid"
|
|
18790
|
+
}, fields && Object.keys(fields).map(key => {
|
|
18531
18791
|
var _field$validation, _formState$errors, _formState$errors$key;
|
|
18532
18792
|
let field = fields[key];
|
|
18533
18793
|
let validation = (field === null || field === void 0 ? void 0 : field.validation) || {};
|
|
@@ -18560,22 +18820,20 @@ const SearchPTID = ({
|
|
|
18560
18820
|
shouldUnregister: true,
|
|
18561
18821
|
...validation
|
|
18562
18822
|
})
|
|
18563
|
-
})), /*#__PURE__*/React.createElement(CardLabelError,
|
|
18564
|
-
|
|
18565
|
-
|
|
18566
|
-
|
|
18567
|
-
|
|
18568
|
-
}
|
|
18569
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
18570
|
-
className: "pt-search-action"
|
|
18823
|
+
})), /*#__PURE__*/React.createElement(CardLabelError, null, t(formState === null || formState === void 0 ? void 0 : (_formState$errors = formState.errors) === null || _formState$errors === void 0 ? void 0 : (_formState$errors$key = _formState$errors[key]) === null || _formState$errors$key === void 0 ? void 0 : _formState$errors$key.message)));
|
|
18824
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
18825
|
+
className: "formcomposer-section-button",
|
|
18826
|
+
style: {
|
|
18827
|
+
marginTop: "16px"
|
|
18828
|
+
}
|
|
18571
18829
|
}, /*#__PURE__*/React.createElement(SearchField, {
|
|
18572
|
-
className: "pt-search-action-reset"
|
|
18830
|
+
className: "pt-search-action-reset generic-button clear-search"
|
|
18573
18831
|
}, /*#__PURE__*/React.createElement("p", {
|
|
18574
18832
|
onClick: () => {
|
|
18575
18833
|
onReset({});
|
|
18576
18834
|
}
|
|
18577
18835
|
}, t(`ES_COMMON_CLEAR_ALL`))), /*#__PURE__*/React.createElement(SearchField, {
|
|
18578
|
-
className: "pt-search-action-submit"
|
|
18836
|
+
className: "pt-search-action-submit submit-bar generic-button"
|
|
18579
18837
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
18580
18838
|
label: t("ES_COMMON_SEARCH"),
|
|
18581
18839
|
submit: true
|
|
@@ -18631,7 +18889,8 @@ const SearchPTID$1 = ({
|
|
|
18631
18889
|
className: "link"
|
|
18632
18890
|
}, /*#__PURE__*/React.createElement("span", {
|
|
18633
18891
|
onClick: () => {
|
|
18634
|
-
|
|
18892
|
+
const userType = window.location.href.includes("/citizen/") ? "citizen" : "employee";
|
|
18893
|
+
history.push(`/digit-ui/${userType}/commonpt/view-property?propertyId=${row.original["propertyId"]}&tenantId=${tenantId}&redirectToUrl=${redirectToUrl}`, {
|
|
18635
18894
|
...state
|
|
18636
18895
|
});
|
|
18637
18896
|
}
|
|
@@ -18658,23 +18917,14 @@ const SearchPTID$1 = ({
|
|
|
18658
18917
|
return GetCell(t((row === null || row === void 0 ? void 0 : (_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.status) || "NA"));
|
|
18659
18918
|
},
|
|
18660
18919
|
disableSortBy: true
|
|
18661
|
-
}, {
|
|
18662
|
-
Header: t("PT_AMOUNT_DUE"),
|
|
18663
|
-
Cell: ({
|
|
18664
|
-
row
|
|
18665
|
-
}) => {
|
|
18666
|
-
var _row$original2, _row$original3;
|
|
18667
|
-
return GetCell(row !== null && row !== void 0 && (_row$original2 = row.original) !== null && _row$original2 !== void 0 && _row$original2.due ? `₹ ${row === null || row === void 0 ? void 0 : (_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.due}` : t("PT_NA"));
|
|
18668
|
-
},
|
|
18669
|
-
disableSortBy: true
|
|
18670
18920
|
}, {
|
|
18671
18921
|
Header: t("ES_SEARCH_ACTION"),
|
|
18672
18922
|
disableSortBy: true,
|
|
18673
18923
|
Cell: ({
|
|
18674
18924
|
row
|
|
18675
18925
|
}) => {
|
|
18676
|
-
var _row$
|
|
18677
|
-
return /*#__PURE__*/React.createElement("div", null, (row === null || row === void 0 ? void 0 : (_row$
|
|
18926
|
+
var _row$original2;
|
|
18927
|
+
return /*#__PURE__*/React.createElement("div", null, (row === null || row === void 0 ? void 0 : (_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.status) !== "INACTIVE" ? /*#__PURE__*/React.createElement("span", {
|
|
18678
18928
|
className: "link"
|
|
18679
18929
|
}, redirectToUrl ? /*#__PURE__*/React.createElement("span", {
|
|
18680
18930
|
onClick: () => {
|
|
@@ -19244,14 +19494,15 @@ const CommonPTCard = () => {
|
|
|
19244
19494
|
const {
|
|
19245
19495
|
t
|
|
19246
19496
|
} = useTranslation();
|
|
19247
|
-
if (!Digit.Utils.ptAccess()) {
|
|
19248
|
-
return null;
|
|
19249
|
-
}
|
|
19250
19497
|
const propsForModuleCard = {
|
|
19251
19498
|
Icon: /*#__PURE__*/React.createElement(PropertyHouse, null),
|
|
19252
19499
|
moduleName: t("ACTION_TEST_COMMON_PROPERTY_TAX"),
|
|
19500
|
+
kpis: [{
|
|
19501
|
+
label: t("PT_TOTAL_APPLICATIONS"),
|
|
19502
|
+
value: 0
|
|
19503
|
+
}],
|
|
19253
19504
|
links: [{
|
|
19254
|
-
label: t("
|
|
19505
|
+
label: t("PT_SEARCH"),
|
|
19255
19506
|
link: `/digit-ui/employee/commonpt/search`
|
|
19256
19507
|
}]
|
|
19257
19508
|
};
|
|
@@ -19265,28 +19516,7 @@ const CommonPTCard = () => {
|
|
|
19265
19516
|
return /*#__PURE__*/React.createElement(EmployeeModuleCard, propsForModuleCard);
|
|
19266
19517
|
};
|
|
19267
19518
|
|
|
19268
|
-
const componentsToRegister = {
|
|
19269
|
-
CPTPropertySearchForm: SearchPTID,
|
|
19270
|
-
CPTPropertySearchResults: SearchPTID$1,
|
|
19271
|
-
CPTSearchProperty: SearchProperty$1,
|
|
19272
|
-
CPTPropertyAssemblyDetails: PropertyAssemblyDetails,
|
|
19273
|
-
CPTPropertyLocationDetails: PropertyLocationDetails,
|
|
19274
|
-
CPTPropertyOwnerDetails: PropertyOwnerDetails,
|
|
19275
|
-
PropertyWaterConnection,
|
|
19276
|
-
CPTKnowYourProperty: KnowYourProperty,
|
|
19277
|
-
CPTPropertyDetails: PropertyDetails,
|
|
19278
|
-
CPTPropertySearchNSummary: PropertySearchNSummary,
|
|
19279
|
-
CPTSearchResults: SearchResultsComponent,
|
|
19280
|
-
CPTCreateProperty: CreatePropertyForm,
|
|
19281
|
-
CPTAcknowledgement: PTAcknowledgement
|
|
19282
|
-
};
|
|
19283
|
-
const addComponentsToRegistry = () => {
|
|
19284
|
-
Object.entries(componentsToRegister).forEach(([key, value]) => {
|
|
19285
|
-
Digit.ComponentRegistryService.setComponent(key, value);
|
|
19286
|
-
});
|
|
19287
|
-
};
|
|
19288
19519
|
const CommonPTModule = ({
|
|
19289
|
-
stateCode,
|
|
19290
19520
|
userType,
|
|
19291
19521
|
tenants
|
|
19292
19522
|
}) => {
|
|
@@ -19294,27 +19524,29 @@ const CommonPTModule = ({
|
|
|
19294
19524
|
path,
|
|
19295
19525
|
url
|
|
19296
19526
|
} = useRouteMatch();
|
|
19297
|
-
const moduleCode = "PT";
|
|
19527
|
+
const moduleCode = ["PT", "ws"];
|
|
19298
19528
|
const language = Digit.StoreData.getCurrentLanguage();
|
|
19299
19529
|
const {
|
|
19300
19530
|
isLoading,
|
|
19301
19531
|
data: store
|
|
19302
19532
|
} = Digit.Services.useStore({
|
|
19303
|
-
stateCode,
|
|
19304
19533
|
moduleCode,
|
|
19305
19534
|
language
|
|
19306
19535
|
});
|
|
19307
|
-
addComponentsToRegistry();
|
|
19308
19536
|
Digit.SessionStorage.set("PT_TENANTS", tenants);
|
|
19537
|
+
useEffect(() => userType === "employee" && Digit.LocalizationService.getLocale({
|
|
19538
|
+
modules: [`rainmaker-${Digit.ULBService.getCurrentTenantId()}`],
|
|
19539
|
+
locale: Digit.StoreData.getCurrentLanguage(),
|
|
19540
|
+
tenantId: Digit.ULBService.getCurrentTenantId()
|
|
19541
|
+
}), []);
|
|
19309
19542
|
if (userType === "employee") {
|
|
19310
19543
|
return /*#__PURE__*/React.createElement(EmployeeApp, {
|
|
19311
19544
|
path: path,
|
|
19312
19545
|
url: url,
|
|
19313
|
-
userType: userType
|
|
19546
|
+
userType: userType,
|
|
19547
|
+
tenants: tenants
|
|
19314
19548
|
});
|
|
19315
|
-
} else return /*#__PURE__*/React.createElement(App,
|
|
19316
|
-
stateCode: stateCode
|
|
19317
|
-
});
|
|
19549
|
+
} else return /*#__PURE__*/React.createElement(App, null);
|
|
19318
19550
|
};
|
|
19319
19551
|
const CommonPTLinks = ({
|
|
19320
19552
|
matchPath,
|
|
@@ -19323,10 +19555,6 @@ const CommonPTLinks = ({
|
|
|
19323
19555
|
const {
|
|
19324
19556
|
t
|
|
19325
19557
|
} = useTranslation();
|
|
19326
|
-
const [params, setParams, clearParams] = Digit.Hooks.useSessionStorage("CPT_CREATE_PROPERTY", {});
|
|
19327
|
-
useEffect(() => {
|
|
19328
|
-
clearParams();
|
|
19329
|
-
}, []);
|
|
19330
19558
|
const links = [{
|
|
19331
19559
|
link: `${matchPath}/property/citizen-search`,
|
|
19332
19560
|
i18nKey: t("PT_SEARCH_AND_PAY")
|
|
@@ -19343,13 +19571,30 @@ const CommonPTLinks = ({
|
|
|
19343
19571
|
});
|
|
19344
19572
|
};
|
|
19345
19573
|
const CommonPTComponents = {
|
|
19346
|
-
|
|
19574
|
+
CommonPTCard,
|
|
19575
|
+
CommonPTModule,
|
|
19576
|
+
CommonPTLinks
|
|
19577
|
+
};
|
|
19578
|
+
const componentsToRegister = {
|
|
19347
19579
|
CommonPTModule,
|
|
19348
|
-
|
|
19349
|
-
|
|
19580
|
+
CommonPTCard,
|
|
19581
|
+
CommonPTLinks,
|
|
19582
|
+
CPTPropertySearchForm: SearchPTID,
|
|
19583
|
+
CPTPropertySearchResults: SearchPTID$1,
|
|
19584
|
+
CPTSearchProperty: SearchProperty$1,
|
|
19585
|
+
CPTPropertyAssemblyDetails: PropertyAssemblyDetails,
|
|
19586
|
+
CPTPropertyLocationDetails: PropertyLocationDetails,
|
|
19587
|
+
CPTPropertyOwnerDetails: PropertyOwnerDetails,
|
|
19588
|
+
PropertyWaterConnection,
|
|
19589
|
+
CPTKnowYourProperty: KnowYourProperty,
|
|
19590
|
+
CPTPropertyDetails: PropertyDetails,
|
|
19591
|
+
CPTPropertySearchNSummary: PropertySearchNSummary,
|
|
19592
|
+
CPTSearchResults: SearchResultsComponent,
|
|
19593
|
+
CPTCreateProperty: CreatePropertyForm,
|
|
19594
|
+
CPTAcknowledgement: PTAcknowledgement
|
|
19350
19595
|
};
|
|
19351
19596
|
const initCommonPTComponents = () => {
|
|
19352
|
-
Object.entries(
|
|
19597
|
+
Object.entries(componentsToRegister).forEach(([key, value]) => {
|
|
19353
19598
|
Digit.ComponentRegistryService.setComponent(key, value);
|
|
19354
19599
|
});
|
|
19355
19600
|
};
|