@djb25/digit-ui-module-commonpt 1.0.4 → 1.0.5
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 +235 -132
- 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, AppContainer, BackButton, PrivateRoute, BreadCrumb, LayoutWrapper, 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;
|
|
@@ -13999,10 +13999,11 @@ function PropertyDocuments({
|
|
|
13999
13999
|
const [filesArray, setFilesArray] = useState(() => []);
|
|
14000
14000
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
14001
14001
|
const [pdfFiles, setPdfFiles] = useState({});
|
|
14002
|
+
const [modalFile, setModalFile] = useState(null);
|
|
14002
14003
|
useEffect(() => {
|
|
14003
14004
|
var _acc;
|
|
14004
14005
|
let acc = [];
|
|
14005
|
-
documents === null || documents === void 0 ? void 0 : documents.forEach(
|
|
14006
|
+
documents === null || documents === void 0 ? void 0 : documents.forEach(element => {
|
|
14006
14007
|
acc = [...acc, ...(element.values ? element.values : [])];
|
|
14007
14008
|
});
|
|
14008
14009
|
setFilesArray((_acc = acc) === null || _acc === void 0 ? void 0 : _acc.map(value => value === null || value === void 0 ? void 0 : value.fileStoreId));
|
|
@@ -14020,12 +14021,170 @@ function PropertyDocuments({
|
|
|
14020
14021
|
}
|
|
14021
14022
|
}, [filesArray]);
|
|
14022
14023
|
const checkLocation = window.location.href.includes("employee/tl") || window.location.href.includes("/obps") || window.location.href.includes("employee/ws");
|
|
14024
|
+
const isWSLocation = window.location.href.includes("employee/ws");
|
|
14023
14025
|
const isStakeholderApplication = window.location.href.includes("stakeholder");
|
|
14026
|
+
const getDocSubType = documentType => {
|
|
14027
|
+
if (!documentType) return "";
|
|
14028
|
+
const parts = documentType.split(".");
|
|
14029
|
+
const last = parts[parts.length - 1] || "";
|
|
14030
|
+
return last.replace(/_/g, " ").replace(/\b\w/g, c => c.toUpperCase());
|
|
14031
|
+
};
|
|
14032
|
+
const renderModal = () => {
|
|
14033
|
+
if (!modalFile) return null;
|
|
14034
|
+
const isPdf = modalFile.toLowerCase().includes(".pdf") || modalFile.toLowerCase().includes("pdf");
|
|
14035
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
14036
|
+
headerBarMain: /*#__PURE__*/React.createElement("h1", {
|
|
14037
|
+
className: "heading-m"
|
|
14038
|
+
}, "Document Preview"),
|
|
14039
|
+
headerBarEnd: /*#__PURE__*/React.createElement("div", {
|
|
14040
|
+
onClick: () => setModalFile(null),
|
|
14041
|
+
style: {
|
|
14042
|
+
cursor: "pointer",
|
|
14043
|
+
padding: "5px",
|
|
14044
|
+
marginTop: "-5px"
|
|
14045
|
+
}
|
|
14046
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
14047
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14048
|
+
viewBox: "0 0 24 24",
|
|
14049
|
+
fill: "#000000",
|
|
14050
|
+
width: "24px",
|
|
14051
|
+
height: "24px"
|
|
14052
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
14053
|
+
d: "M0 0h24v24H0V0z",
|
|
14054
|
+
fill: "none"
|
|
14055
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
14056
|
+
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"
|
|
14057
|
+
}))),
|
|
14058
|
+
hideSubmit: true,
|
|
14059
|
+
popupStyles: {
|
|
14060
|
+
maxWidth: "80vw",
|
|
14061
|
+
width: "100%"
|
|
14062
|
+
},
|
|
14063
|
+
popupModuleMianStyles: {
|
|
14064
|
+
display: "flex",
|
|
14065
|
+
justifyContent: "center",
|
|
14066
|
+
alignItems: "center",
|
|
14067
|
+
padding: "0",
|
|
14068
|
+
overflowY: "hidden"
|
|
14069
|
+
}
|
|
14070
|
+
}, isPdf ? /*#__PURE__*/React.createElement("iframe", {
|
|
14071
|
+
src: modalFile,
|
|
14072
|
+
title: "Document Preview",
|
|
14073
|
+
style: {
|
|
14074
|
+
width: "100%",
|
|
14075
|
+
height: "80vh",
|
|
14076
|
+
border: "none",
|
|
14077
|
+
display: "block"
|
|
14078
|
+
}
|
|
14079
|
+
}) : /*#__PURE__*/React.createElement("img", {
|
|
14080
|
+
src: modalFile,
|
|
14081
|
+
alt: "Document Preview",
|
|
14082
|
+
style: {
|
|
14083
|
+
maxWidth: "100%",
|
|
14084
|
+
maxHeight: "80vh",
|
|
14085
|
+
objectFit: "contain",
|
|
14086
|
+
display: "block"
|
|
14087
|
+
}
|
|
14088
|
+
}));
|
|
14089
|
+
};
|
|
14090
|
+
const renderDocumentRow = (value, index) => {
|
|
14091
|
+
var _pdfFiles$value$fileS;
|
|
14092
|
+
const fileUrl = (_pdfFiles$value$fileS = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS === void 0 ? void 0 : _pdfFiles$value$fileS.split(",")[0];
|
|
14093
|
+
const docSubType = getDocSubType(value === null || value === void 0 ? void 0 : value.documentType);
|
|
14094
|
+
const docUid = (value === null || value === void 0 ? void 0 : value.documentUid) || "";
|
|
14095
|
+
const isPhoto = value === null || value === void 0 ? void 0 : value.isPhoto;
|
|
14096
|
+
let typeLabel = "";
|
|
14097
|
+
let numLabel = "";
|
|
14098
|
+
let uploadLabel = "";
|
|
14099
|
+
if (value.title === "WS_IDENTITY_PROOF") {
|
|
14100
|
+
typeLabel = "Identity Proof*";
|
|
14101
|
+
numLabel = "Identity Proof Document Number";
|
|
14102
|
+
uploadLabel = "Upload Identity Proof Document*";
|
|
14103
|
+
} else if (value.title === "WS_OWNERSHIP_PROOF") {
|
|
14104
|
+
typeLabel = "Ownership Proof*";
|
|
14105
|
+
numLabel = "Ownership Proof Document Number";
|
|
14106
|
+
uploadLabel = "Upload Ownership Proof*";
|
|
14107
|
+
} else if (value.title === "WS_OTHER_DOCUMENTS") {
|
|
14108
|
+
typeLabel = "Other Documents*";
|
|
14109
|
+
numLabel = "Other Document Number";
|
|
14110
|
+
uploadLabel = "Upload Other Documents*";
|
|
14111
|
+
} else if (value.title === "WS_APPLICANT_PHOTO") {
|
|
14112
|
+
uploadLabel = "Upload Applicant Photo*";
|
|
14113
|
+
} else {
|
|
14114
|
+
typeLabel = ((value === null || value === void 0 ? void 0 : value.categoryLabel) || "Document") + "*";
|
|
14115
|
+
numLabel = "Document Number";
|
|
14116
|
+
uploadLabel = "Upload Document*";
|
|
14117
|
+
}
|
|
14118
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
14119
|
+
key: index,
|
|
14120
|
+
style: {
|
|
14121
|
+
marginBottom: "24px"
|
|
14122
|
+
}
|
|
14123
|
+
}, /*#__PURE__*/React.createElement(StatusTable, null, !isPhoto && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
14124
|
+
label: typeLabel,
|
|
14125
|
+
text: docSubType || t("NA")
|
|
14126
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
14127
|
+
label: numLabel,
|
|
14128
|
+
text: docUid || t("NA")
|
|
14129
|
+
})), /*#__PURE__*/React.createElement(Row, {
|
|
14130
|
+
label: uploadLabel,
|
|
14131
|
+
text: /*#__PURE__*/React.createElement("div", {
|
|
14132
|
+
style: {
|
|
14133
|
+
display: "flex",
|
|
14134
|
+
alignItems: "center",
|
|
14135
|
+
gap: "16px"
|
|
14136
|
+
}
|
|
14137
|
+
}, isPhoto ? fileUrl ? /*#__PURE__*/React.createElement("div", {
|
|
14138
|
+
style: {
|
|
14139
|
+
position: "relative"
|
|
14140
|
+
}
|
|
14141
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
14142
|
+
src: fileUrl,
|
|
14143
|
+
alt: "Applicant Photo",
|
|
14144
|
+
style: {
|
|
14145
|
+
width: "100px",
|
|
14146
|
+
height: "100px",
|
|
14147
|
+
objectFit: "cover",
|
|
14148
|
+
borderRadius: "4px",
|
|
14149
|
+
border: "1px solid #ccc"
|
|
14150
|
+
}
|
|
14151
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
|
14152
|
+
style: {
|
|
14153
|
+
fontSize: "14px",
|
|
14154
|
+
color: "#505A5F"
|
|
14155
|
+
}
|
|
14156
|
+
}, t("NA")) : /*#__PURE__*/React.createElement("div", {
|
|
14157
|
+
onClick: () => {
|
|
14158
|
+
if (fileUrl) setModalFile(fileUrl);
|
|
14159
|
+
},
|
|
14160
|
+
disabled: !fileUrl,
|
|
14161
|
+
style: {
|
|
14162
|
+
cursor: "pointer"
|
|
14163
|
+
}
|
|
14164
|
+
}, /*#__PURE__*/React.createElement(ViewsIcon, null)), !isPhoto && /*#__PURE__*/React.createElement("label", {
|
|
14165
|
+
style: {
|
|
14166
|
+
display: "flex",
|
|
14167
|
+
alignItems: "center",
|
|
14168
|
+
gap: "8px",
|
|
14169
|
+
fontSize: "14px",
|
|
14170
|
+
color: "#0B0C0C",
|
|
14171
|
+
margin: 0
|
|
14172
|
+
}
|
|
14173
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
14174
|
+
type: "checkbox",
|
|
14175
|
+
style: {
|
|
14176
|
+
width: "18px",
|
|
14177
|
+
height: "18px",
|
|
14178
|
+
accentColor: "#F47738"
|
|
14179
|
+
}
|
|
14180
|
+
}), "Check Verified"))
|
|
14181
|
+
})));
|
|
14182
|
+
};
|
|
14024
14183
|
return /*#__PURE__*/React.createElement("div", {
|
|
14025
14184
|
style: {
|
|
14026
14185
|
marginTop: "19px"
|
|
14027
14186
|
}
|
|
14028
|
-
}, !isStakeholderApplication && (documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
|
|
14187
|
+
}, renderModal(), !isStakeholderApplication && (documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
|
|
14029
14188
|
var _document$values;
|
|
14030
14189
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
14031
14190
|
key: index
|
|
@@ -14033,7 +14192,7 @@ function PropertyDocuments({
|
|
|
14033
14192
|
style: checkLocation ? {
|
|
14034
14193
|
marginTop: "32px",
|
|
14035
14194
|
marginBottom: "18px",
|
|
14036
|
-
color: "#0B0C0C
|
|
14195
|
+
color: "#0B0C0C",
|
|
14037
14196
|
fontSize: "24px",
|
|
14038
14197
|
lineHeight: "30px"
|
|
14039
14198
|
} : {
|
|
@@ -14042,17 +14201,21 @@ function PropertyDocuments({
|
|
|
14042
14201
|
color: "#505A5F",
|
|
14043
14202
|
fontSize: "24px"
|
|
14044
14203
|
}
|
|
14045
|
-
}, t(document === null || document === void 0 ? void 0 : document.title)) : null, /*#__PURE__*/React.createElement("div", {
|
|
14204
|
+
}, t(document === null || document === void 0 ? void 0 : document.title)) : null, isWSLocation ? /*#__PURE__*/React.createElement("div", {
|
|
14205
|
+
style: {
|
|
14206
|
+
marginTop: "8px"
|
|
14207
|
+
}
|
|
14208
|
+
}, 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
14209
|
style: {
|
|
14047
14210
|
display: "flex",
|
|
14048
14211
|
flexWrap: "wrap",
|
|
14049
14212
|
justifyContent: "flex-start"
|
|
14050
14213
|
}
|
|
14051
14214
|
}, 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$
|
|
14215
|
+
var _pdfFiles$value$fileS2, _value$documentType;
|
|
14053
14216
|
return /*#__PURE__*/React.createElement("a", {
|
|
14054
14217
|
target: "_",
|
|
14055
|
-
href: (_pdfFiles$value$
|
|
14218
|
+
href: (_pdfFiles$value$fileS2 = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS2 === void 0 ? void 0 : _pdfFiles$value$fileS2.split(",")[0],
|
|
14056
14219
|
style: {
|
|
14057
14220
|
minWidth: "80px",
|
|
14058
14221
|
marginRight: "10px",
|
|
@@ -14099,10 +14262,10 @@ function PropertyDocuments({
|
|
|
14099
14262
|
fontSize: "24px"
|
|
14100
14263
|
}
|
|
14101
14264
|
}, 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$
|
|
14265
|
+
var _pdfFiles$value$fileS3;
|
|
14103
14266
|
return /*#__PURE__*/React.createElement("a", {
|
|
14104
14267
|
target: "_",
|
|
14105
|
-
href: (_pdfFiles$value$
|
|
14268
|
+
href: (_pdfFiles$value$fileS3 = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS3 === void 0 ? void 0 : _pdfFiles$value$fileS3.split(",")[0],
|
|
14106
14269
|
style: {
|
|
14107
14270
|
minWidth: svgStyles !== null && svgStyles !== void 0 && svgStyles.minWidth ? svgStyles === null || svgStyles === void 0 ? void 0 : svgStyles.minWidth : "160px",
|
|
14108
14271
|
marginRight: "20px"
|
|
@@ -14865,12 +15028,11 @@ const WSAdditonalDetails = ({
|
|
|
14865
15028
|
wsAdditionalDetails,
|
|
14866
15029
|
oldValue
|
|
14867
15030
|
}) => {
|
|
14868
|
-
var _wsAdditionalDetails
|
|
15031
|
+
var _wsAdditionalDetails$;
|
|
14869
15032
|
const {
|
|
14870
15033
|
t
|
|
14871
15034
|
} = useTranslation();
|
|
14872
15035
|
let filters = getQueryStringParams(location.search);
|
|
14873
|
-
const isModify = filters === null || filters === void 0 ? void 0 : filters.mode;
|
|
14874
15036
|
var {
|
|
14875
15037
|
connectionDetails,
|
|
14876
15038
|
plumberDetails,
|
|
@@ -14899,50 +15061,6 @@ const WSAdditonalDetails = ({
|
|
|
14899
15061
|
label: `${t(`${value.title}`)}`,
|
|
14900
15062
|
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
15063
|
}));
|
|
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
15064
|
}))))));
|
|
14947
15065
|
};
|
|
14948
15066
|
|
|
@@ -17596,16 +17714,10 @@ const PropertyLocationDetails = ({
|
|
|
17596
17714
|
formData: formDataProp,
|
|
17597
17715
|
...props
|
|
17598
17716
|
}) => {
|
|
17599
|
-
var _formDataProp$
|
|
17717
|
+
var _formDataProp$cpt2;
|
|
17600
17718
|
const {
|
|
17601
17719
|
t
|
|
17602
17720
|
} = useTranslation();
|
|
17603
|
-
const {
|
|
17604
|
-
data: allCities
|
|
17605
|
-
} = Digit.Hooks.useTenants();
|
|
17606
|
-
const {
|
|
17607
|
-
handleSubmit
|
|
17608
|
-
} = useForm();
|
|
17609
17721
|
const [showToast, setShowToast] = useState(null);
|
|
17610
17722
|
const [formData, setFormData] = useState({
|
|
17611
17723
|
addressType: (address === null || address === void 0 ? void 0 : address.addressType) || "",
|
|
@@ -17623,19 +17735,25 @@ const PropertyLocationDetails = ({
|
|
|
17623
17735
|
assembly: (address === null || address === void 0 ? void 0 : address.assembly) || "",
|
|
17624
17736
|
block: (address === null || address === void 0 ? void 0 : address.block) || "",
|
|
17625
17737
|
zone: (address === null || address === void 0 ? void 0 : address.zone) || "",
|
|
17626
|
-
|
|
17738
|
+
zroLocation: (address === null || address === void 0 ? void 0 : address.zroLocation) || ""
|
|
17627
17739
|
});
|
|
17628
|
-
const isPropertyFound =
|
|
17740
|
+
const isPropertyFound = window.location.href.includes("ws/old-application");
|
|
17629
17741
|
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
|
|
17742
|
+
var _formDataProp$cpt;
|
|
17743
|
+
if (formDataProp !== null && formDataProp !== void 0 && (_formDataProp$cpt = formDataProp.cpt) !== null && _formDataProp$cpt !== void 0 && _formDataProp$cpt.details) {
|
|
17744
|
+
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
17745
|
const details = formDataProp.cpt.details;
|
|
17634
17746
|
const addressData = details.address || {};
|
|
17635
17747
|
const additionalDetails = details.additionalDetails || {};
|
|
17636
17748
|
const localityCode = ((_addressData$locality = addressData.locality) === null || _addressData$locality === void 0 ? void 0 : _addressData$locality.code) || addressData.locality || "";
|
|
17637
17749
|
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
17750
|
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 || "";
|
|
17751
|
+
const zroCode = addressData.zroLocation || additionalDetails.zroLocation || ((_addressData$addition = addressData.additionalDetails) === null || _addressData$addition === void 0 ? void 0 : _addressData$addition.zroLocation) || "";
|
|
17752
|
+
const zroValue = zroCode ? {
|
|
17753
|
+
code: zroCode,
|
|
17754
|
+
name: zroCode,
|
|
17755
|
+
i18nKey: zroCode
|
|
17756
|
+
} : "";
|
|
17639
17757
|
setFormData({
|
|
17640
17758
|
pincode: addressData.pincode || "",
|
|
17641
17759
|
city: addressData.city || "",
|
|
@@ -17645,10 +17763,11 @@ const PropertyLocationDetails = ({
|
|
|
17645
17763
|
landmark: addressData.landmark || "",
|
|
17646
17764
|
latitude: lat,
|
|
17647
17765
|
longitude: lng,
|
|
17648
|
-
assembly: additionalDetails.assembly || ((_addressData$
|
|
17649
|
-
block: additionalDetails.block || ((_addressData$
|
|
17650
|
-
zone: additionalDetails.zone || ((_addressData$
|
|
17651
|
-
|
|
17766
|
+
assembly: additionalDetails.assembly || ((_addressData$addition2 = addressData.additionalDetails) === null || _addressData$addition2 === void 0 ? void 0 : _addressData$addition2.assembly) || "",
|
|
17767
|
+
block: additionalDetails.block || ((_addressData$addition3 = addressData.additionalDetails) === null || _addressData$addition3 === void 0 ? void 0 : _addressData$addition3.block) || "",
|
|
17768
|
+
zone: additionalDetails.zone || ((_addressData$addition4 = addressData.additionalDetails) === null || _addressData$addition4 === void 0 ? void 0 : _addressData$addition4.zone) || "",
|
|
17769
|
+
zroLocation: zroCode,
|
|
17770
|
+
zro: zroValue,
|
|
17652
17771
|
address: {
|
|
17653
17772
|
...addressData,
|
|
17654
17773
|
city: addressData.city || "",
|
|
@@ -17659,14 +17778,15 @@ const PropertyLocationDetails = ({
|
|
|
17659
17778
|
addressLine1: addressData.street || "",
|
|
17660
17779
|
latitude: lat,
|
|
17661
17780
|
longitude: lng,
|
|
17662
|
-
|
|
17663
|
-
|
|
17664
|
-
|
|
17665
|
-
|
|
17781
|
+
zroLocation: zroCode,
|
|
17782
|
+
zro: zroValue,
|
|
17783
|
+
assembly: additionalDetails.assembly || ((_addressData$addition5 = addressData.additionalDetails) === null || _addressData$addition5 === void 0 ? void 0 : _addressData$addition5.assembly) || "",
|
|
17784
|
+
block: additionalDetails.block || ((_addressData$addition6 = addressData.additionalDetails) === null || _addressData$addition6 === void 0 ? void 0 : _addressData$addition6.block) || "",
|
|
17785
|
+
zone: additionalDetails.zone || ((_addressData$addition7 = addressData.additionalDetails) === null || _addressData$addition7 === void 0 ? void 0 : _addressData$addition7.zone) || ""
|
|
17666
17786
|
}
|
|
17667
17787
|
});
|
|
17668
17788
|
}
|
|
17669
|
-
}, [formDataProp === null || formDataProp === void 0 ? void 0 : (_formDataProp$
|
|
17789
|
+
}, [formDataProp === null || formDataProp === void 0 ? void 0 : (_formDataProp$cpt2 = formDataProp.cpt) === null || _formDataProp$cpt2 === void 0 ? void 0 : _formDataProp$cpt2.details]);
|
|
17670
17790
|
useEffect(() => {
|
|
17671
17791
|
if (showToast) {
|
|
17672
17792
|
const timer = setTimeout(() => {
|
|
@@ -17675,10 +17795,6 @@ const PropertyLocationDetails = ({
|
|
|
17675
17795
|
return () => clearTimeout(timer);
|
|
17676
17796
|
}
|
|
17677
17797
|
}, [showToast]);
|
|
17678
|
-
const {
|
|
17679
|
-
createAddress,
|
|
17680
|
-
updateAddress: updateAddressMutation
|
|
17681
|
-
} = Digit.Hooks.useAddress(null, Digit.ULBService.getCurrentTenantId());
|
|
17682
17798
|
return /*#__PURE__*/React.createElement(CollapsibleCardPage, {
|
|
17683
17799
|
title: t("PT_LOCATION_DETAILS"),
|
|
17684
17800
|
defaultOpen: true
|
|
@@ -18169,7 +18285,7 @@ const PropertyWaterConnection = ({
|
|
|
18169
18285
|
clearErrors,
|
|
18170
18286
|
...props
|
|
18171
18287
|
}) => {
|
|
18172
|
-
var _formData$
|
|
18288
|
+
var _formData$cpt2, _errors$useDetails, _errors$useDetails2, _errors$useDetails3, _errors$useDetails4, _errors$useDetails5, _errors$useDetails6, _errors$useDetails7, _errors$useDetails8, _errors$useDetails9, _errors$useDetails0;
|
|
18173
18289
|
const {
|
|
18174
18290
|
control,
|
|
18175
18291
|
register,
|
|
@@ -18200,7 +18316,7 @@ const PropertyWaterConnection = ({
|
|
|
18200
18316
|
isLoading: isWSServicesMastersLoading,
|
|
18201
18317
|
data: ptServicesMastersData
|
|
18202
18318
|
} = Digit.Hooks.pt.usePropertyMDMS(tenantId, "PropertyTax", ["PropertyCategory", "PropertyType", "NoOfFloors", "PropertyNewUsageType"]);
|
|
18203
|
-
const isPropertyFound =
|
|
18319
|
+
const isPropertyFound = window.location.href.includes("ws/old-application");
|
|
18204
18320
|
const formValue = watch();
|
|
18205
18321
|
const watchPropertyType = watch("useDetails.propertyType");
|
|
18206
18322
|
const watchPropertyCategory = watch("useDetails.propertyCategory");
|
|
@@ -18252,8 +18368,8 @@ const PropertyWaterConnection = ({
|
|
|
18252
18368
|
}
|
|
18253
18369
|
}, [formValue, config.key, onSelect]);
|
|
18254
18370
|
useEffect(() => {
|
|
18255
|
-
var _formData$
|
|
18256
|
-
if (formData !== null && formData !== void 0 && (_formData$
|
|
18371
|
+
var _formData$cpt;
|
|
18372
|
+
if (formData !== null && formData !== void 0 && (_formData$cpt = formData.cpt) !== null && _formData$cpt !== void 0 && _formData$cpt.details) {
|
|
18257
18373
|
const details = formData.cpt.details;
|
|
18258
18374
|
const additionalDetails = (details === null || details === void 0 ? void 0 : details.additionalDetails) || {};
|
|
18259
18375
|
setValue("useDetails.propertyCategory", (categoryOptions === null || categoryOptions === void 0 ? void 0 : categoryOptions.find(o => o.code === additionalDetails.propertyCategory)) || null);
|
|
@@ -18269,7 +18385,7 @@ const PropertyWaterConnection = ({
|
|
|
18269
18385
|
setValue("useDetails.NumberofDwellingUnits", additionalDetails.numberOfDwellingUnits || "");
|
|
18270
18386
|
setValue("useDetails.NumberofRooms", additionalDetails.numberOfRooms || "");
|
|
18271
18387
|
}
|
|
18272
|
-
}, [formData === null || formData === void 0 ? void 0 : (_formData$
|
|
18388
|
+
}, [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
18389
|
const lastErrorState = React.useRef(null);
|
|
18274
18390
|
useEffect(() => {
|
|
18275
18391
|
const hasErrors = Object.keys(errors).length > 0;
|
|
@@ -19240,53 +19356,25 @@ const PropertySearchNSummary = ({
|
|
|
19240
19356
|
};
|
|
19241
19357
|
|
|
19242
19358
|
const CommonPTCard = () => {
|
|
19243
|
-
var _propsForModuleCard$l;
|
|
19244
19359
|
const {
|
|
19245
19360
|
t
|
|
19246
19361
|
} = useTranslation();
|
|
19247
|
-
if (!Digit.Utils.ptAccess()) {
|
|
19248
|
-
return null;
|
|
19249
|
-
}
|
|
19250
19362
|
const propsForModuleCard = {
|
|
19251
19363
|
Icon: /*#__PURE__*/React.createElement(PropertyHouse, null),
|
|
19252
19364
|
moduleName: t("ACTION_TEST_COMMON_PROPERTY_TAX"),
|
|
19365
|
+
kpis: [{
|
|
19366
|
+
label: t("PT_TOTAL_APPLICATIONS"),
|
|
19367
|
+
value: 0
|
|
19368
|
+
}],
|
|
19253
19369
|
links: [{
|
|
19254
19370
|
label: t("PT_SEARCH_AND_PAY"),
|
|
19255
19371
|
link: `/digit-ui/employee/commonpt/search`
|
|
19256
19372
|
}]
|
|
19257
19373
|
};
|
|
19258
|
-
const PT_CEMP = Digit.UserService.hasAccess(["PT_CEMP"]) || false;
|
|
19259
|
-
if (PT_CEMP && !((_propsForModuleCard$l = propsForModuleCard.links) !== null && _propsForModuleCard$l !== void 0 && _propsForModuleCard$l[1])) {
|
|
19260
|
-
propsForModuleCard.links.push({
|
|
19261
|
-
label: t("PT_CREATE_PROPERTY"),
|
|
19262
|
-
link: `/digit-ui/employee/commonpt/new-application`
|
|
19263
|
-
});
|
|
19264
|
-
}
|
|
19265
19374
|
return /*#__PURE__*/React.createElement(EmployeeModuleCard, propsForModuleCard);
|
|
19266
19375
|
};
|
|
19267
19376
|
|
|
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
19377
|
const CommonPTModule = ({
|
|
19289
|
-
stateCode,
|
|
19290
19378
|
userType,
|
|
19291
19379
|
tenants
|
|
19292
19380
|
}) => {
|
|
@@ -19300,21 +19388,23 @@ const CommonPTModule = ({
|
|
|
19300
19388
|
isLoading,
|
|
19301
19389
|
data: store
|
|
19302
19390
|
} = Digit.Services.useStore({
|
|
19303
|
-
stateCode,
|
|
19304
19391
|
moduleCode,
|
|
19305
19392
|
language
|
|
19306
19393
|
});
|
|
19307
|
-
addComponentsToRegistry();
|
|
19308
19394
|
Digit.SessionStorage.set("PT_TENANTS", tenants);
|
|
19395
|
+
useEffect(() => userType === "employee" && Digit.LocalizationService.getLocale({
|
|
19396
|
+
modules: [`rainmaker-${Digit.ULBService.getCurrentTenantId()}`],
|
|
19397
|
+
locale: Digit.StoreData.getCurrentLanguage(),
|
|
19398
|
+
tenantId: Digit.ULBService.getCurrentTenantId()
|
|
19399
|
+
}), []);
|
|
19309
19400
|
if (userType === "employee") {
|
|
19310
19401
|
return /*#__PURE__*/React.createElement(EmployeeApp, {
|
|
19311
19402
|
path: path,
|
|
19312
19403
|
url: url,
|
|
19313
|
-
userType: userType
|
|
19404
|
+
userType: userType,
|
|
19405
|
+
tenants: tenants
|
|
19314
19406
|
});
|
|
19315
|
-
} else return /*#__PURE__*/React.createElement(App,
|
|
19316
|
-
stateCode: stateCode
|
|
19317
|
-
});
|
|
19407
|
+
} else return /*#__PURE__*/React.createElement(App, null);
|
|
19318
19408
|
};
|
|
19319
19409
|
const CommonPTLinks = ({
|
|
19320
19410
|
matchPath,
|
|
@@ -19323,10 +19413,6 @@ const CommonPTLinks = ({
|
|
|
19323
19413
|
const {
|
|
19324
19414
|
t
|
|
19325
19415
|
} = useTranslation();
|
|
19326
|
-
const [params, setParams, clearParams] = Digit.Hooks.useSessionStorage("CPT_CREATE_PROPERTY", {});
|
|
19327
|
-
useEffect(() => {
|
|
19328
|
-
clearParams();
|
|
19329
|
-
}, []);
|
|
19330
19416
|
const links = [{
|
|
19331
19417
|
link: `${matchPath}/property/citizen-search`,
|
|
19332
19418
|
i18nKey: t("PT_SEARCH_AND_PAY")
|
|
@@ -19343,13 +19429,30 @@ const CommonPTLinks = ({
|
|
|
19343
19429
|
});
|
|
19344
19430
|
};
|
|
19345
19431
|
const CommonPTComponents = {
|
|
19346
|
-
|
|
19432
|
+
CommonPTCard,
|
|
19433
|
+
CommonPTModule,
|
|
19434
|
+
CommonPTLinks
|
|
19435
|
+
};
|
|
19436
|
+
const componentsToRegister = {
|
|
19347
19437
|
CommonPTModule,
|
|
19348
|
-
|
|
19349
|
-
|
|
19438
|
+
CommonPTCard,
|
|
19439
|
+
CommonPTLinks,
|
|
19440
|
+
CPTPropertySearchForm: SearchPTID,
|
|
19441
|
+
CPTPropertySearchResults: SearchPTID$1,
|
|
19442
|
+
CPTSearchProperty: SearchProperty$1,
|
|
19443
|
+
CPTPropertyAssemblyDetails: PropertyAssemblyDetails,
|
|
19444
|
+
CPTPropertyLocationDetails: PropertyLocationDetails,
|
|
19445
|
+
CPTPropertyOwnerDetails: PropertyOwnerDetails,
|
|
19446
|
+
PropertyWaterConnection,
|
|
19447
|
+
CPTKnowYourProperty: KnowYourProperty,
|
|
19448
|
+
CPTPropertyDetails: PropertyDetails,
|
|
19449
|
+
CPTPropertySearchNSummary: PropertySearchNSummary,
|
|
19450
|
+
CPTSearchResults: SearchResultsComponent,
|
|
19451
|
+
CPTCreateProperty: CreatePropertyForm,
|
|
19452
|
+
CPTAcknowledgement: PTAcknowledgement
|
|
19350
19453
|
};
|
|
19351
19454
|
const initCommonPTComponents = () => {
|
|
19352
|
-
Object.entries(
|
|
19455
|
+
Object.entries(componentsToRegister).forEach(([key, value]) => {
|
|
19353
19456
|
Digit.ComponentRegistryService.setComponent(key, value);
|
|
19354
19457
|
});
|
|
19355
19458
|
};
|