@djb25/digit-ui-module-commonpt 1.0.13 → 1.0.15

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.
@@ -1,4 +1,4 @@
1
- import { Loader, VerticalTimeline, FormComposer, Toast, Card, CardText, StatusTable, Row, SubmitBar, Banner, Header, ResponseComposer, Table, Modal, KeyNote, Dropdown, InfoBannerIcon, Localities, OTPInput, CardLabelError, FormStep, UploadFile, RadioButtons, DatePicker, CardSubHeader, PDFSvg, LabelFieldPair, CardLabel, MultiUploadWrapper, CardHeader, CardSectionHeader, CheckBox, TextInput, LinkButton, Close as Close$e, ViewsIcon, BreakLine, 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';
1
+ import { Loader, VerticalTimeline, FormComposer, Toast, Card, CardText, StatusTable, Row, SubmitBar, Banner, LayoutWrapper, Header, ResponseComposer, Table, Modal, KeyNote, Dropdown, InfoBannerIcon, Localities, OTPInput, CardLabelError, FormStep, UploadFile, RadioButtons, DatePicker, CardSubHeader, PDFSvg, LabelFieldPair, CardLabel, MultiUploadWrapper, CardHeader, CardSectionHeader, CheckBox, TextInput, LinkButton, Close as Close$e, ViewsIcon, BreakLine, TelePhone, DisplayPhotos, EditIcon, CheckPoint, ConnectingCheckPoints, ActionBar, Menu, ButtonSelector, HomeIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, CollapsibleCardPage, AddressDetails, DeleteIcon, MobileNumber, RadioOrSelect, TextArea, SearchForm, SearchField, DetailsCard, TickMark, PropertyHouse, EmployeeModuleCard, CitizenHomeCard, PTIcon } from '@djb25/digit-ui-react-components';
2
2
  import React, { useState, useEffect, useRef, useLayoutEffect, useMemo, 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';
@@ -6246,9 +6246,9 @@ const CreatePropertyForm = ({
6246
6246
  } = useTranslation();
6247
6247
  const location = useLocation();
6248
6248
  const [canSubmit, setCanSubmit] = useState(true);
6249
- const defaultValues = {
6249
+ const defaultValues = React.useMemo(() => ({
6250
6250
  ...value
6251
- };
6251
+ }), []);
6252
6252
  const history = useHistory();
6253
6253
  const match = useRouteMatch();
6254
6254
  sessionStorage.setItem("VisitedCommonPTSearch", true);
@@ -6323,22 +6323,48 @@ const CreatePropertyForm = ({
6323
6323
  setMutationHappened(false);
6324
6324
  clearSuccessData();
6325
6325
  }, []);
6326
+ const currentConfig = React.useMemo(() => {
6327
+ const isEmployee = userType === "employee" || window.location.href.includes("/employee/");
6328
+ return newConfig.filter(step => {
6329
+ if (step.head === "PT_OWNERSHIP_DETAILS" && !isEmployee) {
6330
+ return false;
6331
+ }
6332
+ return true;
6333
+ });
6334
+ }, [userType]);
6326
6335
  if (isLoading) {
6327
6336
  return /*#__PURE__*/React.createElement(Loader, null);
6328
6337
  }
6329
6338
  const onSubmit = async () => {
6330
6339
  var _formValue$owners, _formValue$owners$own, _formValue$owners2, _formValue$owners2$, _formValue$owners2$$o, _formValue$owners2$$o2, _formValue$owners3;
6331
- const ownersArray = owners && owners.length > 0 ? owners : formValue === null || formValue === void 0 ? void 0 : formValue.owners;
6340
+ let ownersArray = owners && owners.length > 0 ? owners : formValue === null || formValue === void 0 ? void 0 : formValue.owners;
6341
+ if (!ownersArray || ownersArray.length === 0) {
6342
+ var _Digit$UserService$ge;
6343
+ const userInfo = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info;
6344
+ ownersArray = [{
6345
+ name: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || "Citizen",
6346
+ mobileNumber: userInfo === null || userInfo === void 0 ? void 0 : userInfo.mobileNumber,
6347
+ gender: {
6348
+ code: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.gender) || "MALE",
6349
+ name: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.gender) || "Male"
6350
+ },
6351
+ fatherOrHusbandName: "NA",
6352
+ relationship: {
6353
+ code: "FATHER",
6354
+ name: "Father"
6355
+ },
6356
+ ownerType: {
6357
+ code: "NONE",
6358
+ name: "None"
6359
+ },
6360
+ ownershipCategory: "INDIVIDUAL.SINGLEOWNER"
6361
+ }];
6362
+ }
6332
6363
  if ((formValue !== null && formValue !== void 0 && (_formValue$owners = formValue.owners) !== null && _formValue$owners !== void 0 && (_formValue$owners$own = _formValue$owners.ownershipCategory) !== null && _formValue$owners$own !== void 0 && _formValue$owners$own.includes("MULTIPLEOWNERS") || formValue !== null && formValue !== void 0 && (_formValue$owners2 = formValue.owners) !== null && _formValue$owners2 !== void 0 && (_formValue$owners2$ = _formValue$owners2[0]) !== null && _formValue$owners2$ !== void 0 && (_formValue$owners2$$o = _formValue$owners2$.ownershipCategory) !== null && _formValue$owners2$$o !== void 0 && (_formValue$owners2$$o2 = _formValue$owners2$$o.code) !== null && _formValue$owners2$$o2 !== void 0 && _formValue$owners2$$o2.includes("MULTIPLEOWNERS")) && (formValue === null || formValue === void 0 ? void 0 : (_formValue$owners3 = formValue.owners) === null || _formValue$owners3 === void 0 ? void 0 : _formValue$owners3.length) == 1) {
6333
6364
  setShowToast({
6334
6365
  key: true,
6335
6366
  label: "PT_COMMON_ONE_MORE_OWNER_INFROMATION_REQUIRED"
6336
6367
  });
6337
- } else if (!ownersArray || ownersArray.length === 0) {
6338
- setShowToast({
6339
- key: true,
6340
- label: t("PT_COMMON_OWNER_DETAILS_REQUIRED")
6341
- });
6342
6368
  } else {
6343
6369
  const payload = convertToPropertyLightWeight({
6344
6370
  ...formValue,
@@ -6360,12 +6386,19 @@ const CreatePropertyForm = ({
6360
6386
  key: false,
6361
6387
  label: `${t("CS_NEW_PROPERTY_APPLICATION_CREATED_SUCCESS")} - ${data === null || data === void 0 ? void 0 : (_data$Properties = data.Properties) === null || _data$Properties === void 0 ? void 0 : (_data$Properties$ = _data$Properties[0]) === null || _data$Properties$ === void 0 ? void 0 : _data$Properties$.propertyId}`
6362
6388
  });
6363
- if (onSelect) {
6364
- var _data$Properties2;
6365
- onSelect("cptNewProperty", {
6366
- property: data === null || data === void 0 ? void 0 : (_data$Properties2 = data.Properties) === null || _data$Properties2 === void 0 ? void 0 : _data$Properties2[0]
6367
- });
6368
- }
6389
+ setTimeout(() => {
6390
+ if (onSelect) {
6391
+ var _data$Properties2;
6392
+ onSelect("cptNewProperty", {
6393
+ property: data === null || data === void 0 ? void 0 : (_data$Properties2 = data.Properties) === null || _data$Properties2 === void 0 ? void 0 : _data$Properties2[0]
6394
+ });
6395
+ } else {
6396
+ var _data$Properties3;
6397
+ history.push(`${match.path}/save-property?redirectToUrl=${redirectUrl || ""}`, {
6398
+ property: data === null || data === void 0 ? void 0 : (_data$Properties3 = data.Properties) === null || _data$Properties3 === void 0 ? void 0 : _data$Properties3[0]
6399
+ });
6400
+ }
6401
+ }, 3000);
6369
6402
  },
6370
6403
  onError: error => {
6371
6404
  var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
@@ -6412,7 +6445,7 @@ const CreatePropertyForm = ({
6412
6445
  onSubmit: onSubmit,
6413
6446
  noBoxShadow: true,
6414
6447
  inline: true,
6415
- config: newConfig,
6448
+ config: currentConfig,
6416
6449
  label: t("SUBMIT"),
6417
6450
  isDisabled: !canSubmit,
6418
6451
  defaultValues: defaultValues,
@@ -6631,11 +6664,13 @@ const CreateProperty = ({
6631
6664
  return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
6632
6665
  exact: true,
6633
6666
  path: `${match.path}`
6667
+ }, /*#__PURE__*/React.createElement(LayoutWrapper, {
6668
+ layoutClass: "action"
6634
6669
  }, /*#__PURE__*/React.createElement(CreatePropertyForm, {
6635
6670
  onSelect: createProperty,
6636
6671
  value: params,
6637
6672
  userType: "citizen"
6638
- })), /*#__PURE__*/React.createElement(Route, {
6673
+ }))), /*#__PURE__*/React.createElement(Route, {
6639
6674
  exact: true,
6640
6675
  path: `${match.path}/save-property`
6641
6676
  }, /*#__PURE__*/React.createElement(PTAcknowledgement, {
@@ -7868,7 +7903,16 @@ const PropertySearchResults = ({
7868
7903
  columns: [{
7869
7904
  Header: t("PT_PROPERTY_PTUID"),
7870
7905
  disableSortBy: true,
7871
- accessor: "property_id"
7906
+ accessor: "property_id",
7907
+ Cell: ({
7908
+ row
7909
+ }) => {
7910
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
7911
+ className: "link"
7912
+ }, /*#__PURE__*/React.createElement(Link, {
7913
+ to: `/digit-ui/citizen/commonpt/view-property?propertyId=${row.original.property_id}&tenantId=${tenantId}`
7914
+ }, row.original.property_id)));
7915
+ }
7872
7916
  }, {
7873
7917
  Header: t("PT_OWNER_NAME"),
7874
7918
  disableSortBy: true,
@@ -13976,7 +14020,8 @@ const PermissionCheck = ({
13976
14020
  function PropertyDocuments({
13977
14021
  documents,
13978
14022
  svgStyles = {},
13979
- isSendBackFlow = false
14023
+ isSendBackFlow = false,
14024
+ applicationStatus
13980
14025
  }) {
13981
14026
  const {
13982
14027
  t
@@ -13985,6 +14030,29 @@ function PropertyDocuments({
13985
14030
  const tenantId = Digit.ULBService.getCurrentTenantId();
13986
14031
  const [pdfFiles, setPdfFiles] = useState({});
13987
14032
  const [modalFile, setModalFile] = useState(null);
14033
+ const [checkedMap, setCheckedMap] = useState({});
14034
+ useEffect(() => {
14035
+ let requiredDocsCount = 0;
14036
+ let checkedCount = 0;
14037
+ documents === null || documents === void 0 ? void 0 : documents.forEach(document => {
14038
+ var _document$values;
14039
+ document === null || document === void 0 ? void 0 : (_document$values = document.values) === null || _document$values === void 0 ? void 0 : _document$values.forEach(value => {
14040
+ if (!value.isPhoto) {
14041
+ var _value$originalDoc, _value$originalDoc2;
14042
+ requiredDocsCount++;
14043
+ const isChecked = checkedMap[value === null || value === void 0 ? void 0 : (_value$originalDoc = value.originalDoc) === null || _value$originalDoc === void 0 ? void 0 : _value$originalDoc.id] ?? (value === null || value === void 0 ? void 0 : (_value$originalDoc2 = value.originalDoc) === null || _value$originalDoc2 === void 0 ? void 0 : _value$originalDoc2.isVerified) ?? false;
14044
+ if (isChecked) {
14045
+ checkedCount++;
14046
+ }
14047
+ }
14048
+ });
14049
+ });
14050
+ const allChecked = requiredDocsCount === 0 || checkedCount === requiredDocsCount;
14051
+ window.isDocumentsVerified = allChecked;
14052
+ window.dispatchEvent(new CustomEvent("DOCUMENTS_VERIFIED", {
14053
+ detail: allChecked
14054
+ }));
14055
+ }, [checkedMap, documents]);
13988
14056
  useEffect(() => {
13989
14057
  var _acc;
13990
14058
  let acc = [];
@@ -14014,6 +14082,32 @@ function PropertyDocuments({
14014
14082
  const last = parts[parts.length - 1] || "";
14015
14083
  return last.replace(/_/g, " ").replace(/\b\w/g, c => c.toUpperCase());
14016
14084
  };
14085
+ const forceDownload = async (url, fileName) => {
14086
+ try {
14087
+ const response = await fetch(url);
14088
+ if (!response.ok) {
14089
+ throw new Error(`HTTP error! status: ${response.status}`);
14090
+ }
14091
+ const blob = await response.blob();
14092
+ const contentType = response.headers.get("content-type") || blob.type;
14093
+ const blobUrl = window.URL.createObjectURL(blob);
14094
+ const baseFileName = fileName.replace(/\.[^/.]+$/, "");
14095
+ let extension = "pdf";
14096
+ if (contentType) {
14097
+ if (contentType.includes("image/jpeg")) extension = "jpg";else if (contentType.includes("image/png")) extension = "png";else if (contentType.includes("image/webp")) extension = "webp";else if (contentType.includes("application/pdf")) extension = "pdf";else if (contentType.includes("text/plain")) extension = "txt";
14098
+ }
14099
+ const link = document.createElement("a");
14100
+ link.href = blobUrl;
14101
+ link.setAttribute("download", `${baseFileName}.${extension}`);
14102
+ document.body.appendChild(link);
14103
+ link.click();
14104
+ link.parentNode.removeChild(link);
14105
+ setTimeout(() => window.URL.revokeObjectURL(blobUrl), 100);
14106
+ } catch (err) {
14107
+ console.error("Error downloading file", err);
14108
+ window.open(url, "_blank");
14109
+ }
14110
+ };
14017
14111
  const renderModal = () => {
14018
14112
  if (!modalFile) return null;
14019
14113
  const isPdf = modalFile.toLowerCase().includes(".pdf") || modalFile.toLowerCase().includes("pdf");
@@ -14022,11 +14116,47 @@ function PropertyDocuments({
14022
14116
  className: "heading-m"
14023
14117
  }, "Document Preview"),
14024
14118
  headerBarEnd: /*#__PURE__*/React.createElement("div", {
14119
+ style: {
14120
+ display: "flex",
14121
+ gap: "15px",
14122
+ alignItems: "center",
14123
+ paddingRight: "10px"
14124
+ }
14125
+ }, /*#__PURE__*/React.createElement("div", {
14126
+ onClick: () => {
14127
+ forceDownload(modalFile, "Document.pdf");
14128
+ },
14129
+ style: {
14130
+ cursor: "pointer",
14131
+ display: "flex",
14132
+ alignItems: "center"
14133
+ },
14134
+ title: "Download Document"
14135
+ }, /*#__PURE__*/React.createElement("svg", {
14136
+ xmlns: "http://www.w3.org/2000/svg",
14137
+ width: "20",
14138
+ height: "20",
14139
+ viewBox: "0 0 24 24",
14140
+ fill: "none",
14141
+ stroke: "currentColor",
14142
+ strokeWidth: "2",
14143
+ strokeLinecap: "round",
14144
+ strokeLinejoin: "round"
14145
+ }, /*#__PURE__*/React.createElement("path", {
14146
+ d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
14147
+ }), /*#__PURE__*/React.createElement("polyline", {
14148
+ points: "7 10 12 15 17 10"
14149
+ }), /*#__PURE__*/React.createElement("line", {
14150
+ x1: "12",
14151
+ y1: "15",
14152
+ x2: "12",
14153
+ y2: "3"
14154
+ }))), /*#__PURE__*/React.createElement("div", {
14025
14155
  onClick: () => setModalFile(null),
14026
14156
  style: {
14027
14157
  cursor: "pointer",
14028
- padding: "5px",
14029
- marginTop: "-5px"
14158
+ display: "flex",
14159
+ alignItems: "center"
14030
14160
  }
14031
14161
  }, /*#__PURE__*/React.createElement("svg", {
14032
14162
  xmlns: "http://www.w3.org/2000/svg",
@@ -14039,7 +14169,7 @@ function PropertyDocuments({
14039
14169
  fill: "none"
14040
14170
  }), /*#__PURE__*/React.createElement("path", {
14041
14171
  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"
14042
- }))),
14172
+ })))),
14043
14173
  hideSubmit: true,
14044
14174
  popupStyles: {
14045
14175
  maxWidth: "80vw",
@@ -14073,7 +14203,7 @@ function PropertyDocuments({
14073
14203
  }));
14074
14204
  };
14075
14205
  const renderDocumentRow = (value, index) => {
14076
- var _pdfFiles$value$fileS, _value$originalDoc, _value$originalDoc2, _value$originalDoc3;
14206
+ var _pdfFiles$value$fileS;
14077
14207
  const fileUrl = (_pdfFiles$value$fileS = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS === void 0 ? void 0 : _pdfFiles$value$fileS.split(",")[0];
14078
14208
  const docSubType = getDocSubType(value === null || value === void 0 ? void 0 : value.documentType);
14079
14209
  const docUid = (value === null || value === void 0 ? void 0 : value.documentUid) || "";
@@ -14146,30 +14276,74 @@ function PropertyDocuments({
14146
14276
  style: {
14147
14277
  cursor: "pointer"
14148
14278
  }
14149
- }, /*#__PURE__*/React.createElement(ViewsIcon, null)), !isPhoto && /*#__PURE__*/React.createElement("label", {
14150
- style: {
14151
- display: "flex",
14152
- alignItems: "center",
14153
- gap: "8px",
14154
- fontSize: "14px",
14155
- color: "#0B0C0C",
14156
- margin: 0
14157
- }
14158
- }, /*#__PURE__*/React.createElement("input", {
14159
- key: `chk-${value === null || value === void 0 ? void 0 : (_value$originalDoc = value.originalDoc) === null || _value$originalDoc === void 0 ? void 0 : _value$originalDoc.id}-${value === null || value === void 0 ? void 0 : (_value$originalDoc2 = value.originalDoc) === null || _value$originalDoc2 === void 0 ? void 0 : _value$originalDoc2.isVerified}`,
14160
- type: "checkbox",
14161
- style: {
14162
- width: "18px",
14163
- height: "18px",
14164
- accentColor: "#F47738"
14165
- },
14166
- defaultChecked: value === null || value === void 0 ? void 0 : (_value$originalDoc3 = value.originalDoc) === null || _value$originalDoc3 === void 0 ? void 0 : _value$originalDoc3.isVerified,
14167
- onChange: e => {
14168
- if (value !== null && value !== void 0 && value.originalDoc) {
14169
- value.originalDoc.isVerified = e.target.checked;
14279
+ }, /*#__PURE__*/React.createElement(ViewsIcon, null)), !isPhoto && ((_value$originalDoc3, _value$originalDoc4, _value$originalDoc5, _value$originalDoc6, _value$originalDoc7) => {
14280
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
14281
+ onClick: () => {
14282
+ if (fileUrl) {
14283
+ forceDownload(fileUrl, `${docSubType || "Document"}.pdf`);
14284
+ }
14285
+ },
14286
+ title: "Download Document",
14287
+ style: {
14288
+ cursor: "pointer",
14289
+ display: "flex",
14290
+ alignItems: "center"
14170
14291
  }
14171
- }
14172
- }), "Check Verified"))
14292
+ }, /*#__PURE__*/React.createElement("svg", {
14293
+ xmlns: "http://www.w3.org/2000/svg",
14294
+ width: "24",
14295
+ height: "24",
14296
+ viewBox: "0 0 24 24",
14297
+ fill: "none",
14298
+ stroke: "currentColor",
14299
+ strokeWidth: "2",
14300
+ strokeLinecap: "round",
14301
+ strokeLinejoin: "round"
14302
+ }, /*#__PURE__*/React.createElement("path", {
14303
+ d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
14304
+ }), /*#__PURE__*/React.createElement("polyline", {
14305
+ points: "7 10 12 15 17 10"
14306
+ }), /*#__PURE__*/React.createElement("line", {
14307
+ x1: "12",
14308
+ y1: "15",
14309
+ x2: "12",
14310
+ y2: "3"
14311
+ }))), /*#__PURE__*/React.createElement("label", {
14312
+ style: {
14313
+ display: "flex",
14314
+ alignItems: "center",
14315
+ gap: "8px",
14316
+ fontSize: "14px",
14317
+ color: "#0B0C0C",
14318
+ margin: 0
14319
+ }
14320
+ }, /*#__PURE__*/React.createElement("input", {
14321
+ key: `chk-${value === null || value === void 0 ? void 0 : (_value$originalDoc5 = value.originalDoc) === null || _value$originalDoc5 === void 0 ? void 0 : _value$originalDoc5.id}-${value === null || value === void 0 ? void 0 : (_value$originalDoc6 = value.originalDoc) === null || _value$originalDoc6 === void 0 ? void 0 : _value$originalDoc6.isVerified}`,
14322
+ type: "checkbox",
14323
+ className: "verify-doc-checkbox",
14324
+ style: {
14325
+ width: "18px",
14326
+ height: "18px",
14327
+ accentColor: "#F47738",
14328
+ cursor: applicationStatus && applicationStatus !== "PENDING_FOR_DOCUMENT_VERIFICATION" ? "not-allowed" : "pointer"
14329
+ },
14330
+ disabled: applicationStatus && applicationStatus !== "PENDING_FOR_DOCUMENT_VERIFICATION",
14331
+ defaultChecked: value === null || value === void 0 ? void 0 : (_value$originalDoc7 = value.originalDoc) === null || _value$originalDoc7 === void 0 ? void 0 : _value$originalDoc7.isVerified,
14332
+ onChange: e => {
14333
+ var _value$originalDoc8;
14334
+ const checked = e.target.checked;
14335
+ if (value !== null && value !== void 0 && value.originalDoc) {
14336
+ value.originalDoc.isVerified = checked;
14337
+ }
14338
+ if (value !== null && value !== void 0 && (_value$originalDoc8 = value.originalDoc) !== null && _value$originalDoc8 !== void 0 && _value$originalDoc8.id) {
14339
+ setCheckedMap(prev => ({
14340
+ ...prev,
14341
+ [value.originalDoc.id]: checked
14342
+ }));
14343
+ }
14344
+ }
14345
+ }), "Check Verified"));
14346
+ })())
14173
14347
  })));
14174
14348
  };
14175
14349
  return /*#__PURE__*/React.createElement("div", {
@@ -14177,7 +14351,7 @@ function PropertyDocuments({
14177
14351
  marginTop: "19px"
14178
14352
  }
14179
14353
  }, renderModal(), !isStakeholderApplication && (documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
14180
- var _document$values;
14354
+ var _document$values2;
14181
14355
  return /*#__PURE__*/React.createElement(React.Fragment, {
14182
14356
  key: index
14183
14357
  }, document !== null && document !== void 0 && document.title ? /*#__PURE__*/React.createElement(CardSubHeader, {
@@ -14203,7 +14377,7 @@ function PropertyDocuments({
14203
14377
  flexWrap: "wrap",
14204
14378
  justifyContent: "flex-start"
14205
14379
  }
14206
- }, 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) => {
14380
+ }, 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) => {
14207
14381
  var _pdfFiles$value$fileS2, _value$documentType;
14208
14382
  return /*#__PURE__*/React.createElement("a", {
14209
14383
  target: "_",
@@ -14243,7 +14417,7 @@ function PropertyDocuments({
14243
14417
  }, t(value === null || value === void 0 ? void 0 : value.documentType)) : "");
14244
14418
  }) : !window.location.href.includes("citizen") && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, t("BPA_NO_DOCUMENTS_UPLOADED_LABEL")))));
14245
14419
  })), isStakeholderApplication && (documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
14246
- var _document$values2;
14420
+ var _document$values3;
14247
14421
  return /*#__PURE__*/React.createElement(React.Fragment, {
14248
14422
  key: index
14249
14423
  }, document !== null && document !== void 0 && document.title ? /*#__PURE__*/React.createElement(CardSubHeader, {
@@ -14253,7 +14427,7 @@ function PropertyDocuments({
14253
14427
  color: "#505A5F",
14254
14428
  fontSize: "24px"
14255
14429
  }
14256
- }, 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) => {
14430
+ }, 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$values3 = document.values) === null || _document$values3 === void 0 ? void 0 : _document$values3.map((value, index) => {
14257
14431
  var _pdfFiles$value$fileS3;
14258
14432
  return /*#__PURE__*/React.createElement("a", {
14259
14433
  target: "_",
@@ -14422,131 +14596,6 @@ function PropertyFloors({
14422
14596
  }));
14423
14597
  }
14424
14598
 
14425
- function PropertyOwners({
14426
- owners
14427
- }) {
14428
- let ownerSequences = {};
14429
- if (window.location.href.includes("/employee/pt/")) {
14430
- ownerSequences = owners.slice().reverse();
14431
- } else {
14432
- ownerSequences = owners;
14433
- }
14434
- const {
14435
- t
14436
- } = useTranslation();
14437
- const checkOwnerLength = (owners === null || owners === void 0 ? void 0 : owners.length) || 1;
14438
- let cardStyles = {
14439
- marginTop: "19px"
14440
- };
14441
- let statusTableStyles = {
14442
- position: "relative",
14443
- padding: "8px"
14444
- };
14445
- let rowContainerStyle = {
14446
- justifyContent: "space-between",
14447
- fontSize: "16px",
14448
- lineHeight: "19px",
14449
- color: "#0B0C0C"
14450
- };
14451
- if ( Number(checkOwnerLength) > 1) {
14452
- cardStyles = {
14453
- marginTop: "19px",
14454
- background: "#FAFAFA",
14455
- border: "1px solid #D6D5D4",
14456
- borderRadius: "4px",
14457
- padding: "8px",
14458
- lineHeight: "19px",
14459
- maxWidth: "600px",
14460
- minWidth: "280px"
14461
- };
14462
- } else if ( !(Number(checkOwnerLength) > 1)) {
14463
- cardStyles = {
14464
- marginTop: "19px",
14465
- lineHeight: "19px",
14466
- maxWidth: "600px",
14467
- minWidth: "280px"
14468
- };
14469
- statusTableStyles = {
14470
- position: "relative",
14471
- marginTop: "19px"
14472
- };
14473
- }
14474
- if (window.location.href.includes("obps")) {
14475
- cardStyles = {
14476
- ...cardStyles,
14477
- maxWidth: "950px"
14478
- };
14479
- cardStyles = {
14480
- ...cardStyles,
14481
- maxWidth: "950px"
14482
- };
14483
- rowContainerStyle = {};
14484
- }
14485
- let owners1 = owners.sort((item, item2) => {
14486
- var _item$additionalDetai, _item2$additionalDeta;
14487
- return (item === null || item === void 0 ? void 0 : (_item$additionalDetai = item.additionalDetails) === null || _item$additionalDetai === void 0 ? void 0 : _item$additionalDetai.ownerSequence) - (item2 === null || item2 === void 0 ? void 0 : (_item2$additionalDeta = item2.additionalDetails) === null || _item2$additionalDeta === void 0 ? void 0 : _item2$additionalDeta.ownerSequence);
14488
- });
14489
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
14490
- className: "owner-details"
14491
- }, ownerSequences.map((owner, index) => {
14492
- var _owner$values;
14493
- return /*#__PURE__*/React.createElement("div", {
14494
- key: t(owner === null || owner === void 0 ? void 0 : owner.title),
14495
- style: cardStyles,
14496
- className: "owner-details-child"
14497
- }, /*#__PURE__*/React.createElement(CardSubHeader, {
14498
- style: Number(checkOwnerLength) > 1 ? {
14499
- marginBottom: "8px",
14500
- paddingBottom: "9px",
14501
- color: "#0B0C0C",
14502
- fontSize: "16px",
14503
- lineHeight: "19px"
14504
- } : {
14505
- marginBottom: "8px",
14506
- color: "#505A5F",
14507
- fontSize: "24px"
14508
- }
14509
- }, Number(checkOwnerLength) > 1 ? `${t(owner === null || owner === void 0 ? void 0 : owner.title)} ${index + 1}` : t(owner === null || owner === void 0 ? void 0 : owner.title)), /*#__PURE__*/React.createElement(React.Fragment, {
14510
- key: index
14511
- }, /*#__PURE__*/React.createElement(StatusTable, {
14512
- style: statusTableStyles
14513
- }, /*#__PURE__*/React.createElement("div", {
14514
- style: {
14515
- maxWidth: "640px",
14516
- top: 0,
14517
- left: 0,
14518
- bottom: 0,
14519
- right: 0,
14520
- width: "auto"
14521
- }
14522
- }), owner === null || owner === void 0 ? void 0 : (_owner$values = owner.values) === null || _owner$values === void 0 ? void 0 : _owner$values.map((value, index) => {
14523
- var _value$values;
14524
- if (value.map === true && value.value !== "N/A") {
14525
- return /*#__PURE__*/React.createElement(Row, {
14526
- key: t(value.title),
14527
- label: t(value.title),
14528
- text: /*#__PURE__*/React.createElement("img", {
14529
- src: t(value.value),
14530
- alt: "",
14531
- privacy: value === null || value === void 0 ? void 0 : value.privacy
14532
- })
14533
- });
14534
- }
14535
- return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Row, {
14536
- key: t(value.title),
14537
- label: `${t(value.title)}`,
14538
- text: t(value.value) || "N/A",
14539
- last: index === (value === null || value === void 0 ? void 0 : (_value$values = value.values) === null || _value$values === void 0 ? void 0 : _value$values.length) - 1,
14540
- caption: value.caption,
14541
- className: "border-none",
14542
- textStyle: value.textStyle,
14543
- privacy: value === null || value === void 0 ? void 0 : value.privacy,
14544
- rowContainerStyle: rowContainerStyle
14545
- }));
14546
- }))));
14547
- })));
14548
- }
14549
-
14550
14599
  const ScruntinyDetails = ({
14551
14600
  scrutinyDetails,
14552
14601
  paymentsList: _paymentsList = []
@@ -16348,7 +16397,7 @@ function ApplicationDetailsContent({
16348
16397
  infoClickInfoLabel: getClickInfoDetails(),
16349
16398
  infoClickInfoLabel1: getClickInfoDetails1()
16350
16399
  }) : null, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationDetails) === null || _applicationDetails$a === void 0 ? void 0 : _applicationDetails$a.map((detail, index) => {
16351
- var _detail$title, _detail$values, _detail$additionalDet, _applicationDetails$a2, _applicationDetails$a3, _applicationDetails$a4, _detail$additionalDet2, _applicationDetails$a5, _applicationDetails$a6, _detail$additionalDet3, _detail$additionalDet4, _detail$additionalDet5, _detail$additionalDet6, _detail$additionalDet7, _detail$additionalDet8, _detail$additionalDet9, _detail$additionalDet0, _detail$additionalDet1, _workflowDetails$data, _workflowDetails$data2, _detail$additionalDet10, _detail$additionalDet11, _detail$additionalDet12, _detail$additionalDet13, _detail$additionalDet14, _detail$additionalDet15, _detail$additionalDet16, _detail$additionalDet17, _detail$additionalDet18, _detail$additionalDet19, _detail$additionalDet20, _detail$additionalDet21, _detail$additionalDet22, _detail$additionalDet23, _detail$additionalDet24, _detail$additionalDet25, _detail$additionalDet26, _detail$additionalDet27, _detail$additionalDet28, _detail$additionalDet29;
16400
+ var _detail$title, _detail$values, _detail$additionalDet, _applicationDetails$a2, _applicationDetails$a3, _applicationDetails$a4, _detail$additionalDet2, _applicationDetails$a5, _applicationDetails$a6, _detail$additionalDet3, _detail$additionalDet4, _detail$additionalDet5, _detail$additionalDet6, _detail$additionalDet7, _detail$additionalDet8, _detail$additionalDet9, _workflowDetails$data, _workflowDetails$data2, _detail$additionalDet0, _detail$additionalDet1, _detail$additionalDet10, _detail$additionalDet11, _detail$additionalDet12, _detail$additionalDet13, _detail$additionalDet14, _detail$additionalDet15, _detail$additionalDet16, _detail$additionalDet17, _detail$additionalDet18, _detail$additionalDet19, _detail$additionalDet20, _detail$additionalDet21, _detail$additionalDet22, _detail$additionalDet23, _detail$additionalDet24, _detail$additionalDet25, _detail$additionalDet26, _detail$additionalDet27;
16352
16401
  return /*#__PURE__*/React.createElement(React.Fragment, {
16353
16402
  key: index
16354
16403
  }, /*#__PURE__*/React.createElement("div", {
@@ -16546,53 +16595,52 @@ function ApplicationDetailsContent({
16546
16595
  fiReport: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a5 = applicationDetails.applicationData) === null || _applicationDetails$a5 === void 0 ? void 0 : (_applicationDetails$a6 = _applicationDetails$a5.additionalDetails) === null || _applicationDetails$a6 === void 0 ? void 0 : _applicationDetails$a6.fieldinspection_pending
16547
16596
  }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet3 = detail.additionalDetails) === null || _detail$additionalDet3 === void 0 ? void 0 : _detail$additionalDet3.floors) && /*#__PURE__*/React.createElement(PropertyFloors, {
16548
16597
  floors: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet4 = detail.additionalDetails) === null || _detail$additionalDet4 === void 0 ? void 0 : _detail$additionalDet4.floors
16549
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet5 = detail.additionalDetails) === null || _detail$additionalDet5 === void 0 ? void 0 : _detail$additionalDet5.owners) && /*#__PURE__*/React.createElement(PropertyOwners, {
16550
- owners: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet6 = detail.additionalDetails) === null || _detail$additionalDet6 === void 0 ? void 0 : _detail$additionalDet6.owners
16551
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet7 = detail.additionalDetails) === null || _detail$additionalDet7 === void 0 ? void 0 : _detail$additionalDet7.units) && /*#__PURE__*/React.createElement(TLTradeUnits, {
16552
- units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet8 = detail.additionalDetails) === null || _detail$additionalDet8 === void 0 ? void 0 : _detail$additionalDet8.units
16553
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet9 = detail.additionalDetails) === null || _detail$additionalDet9 === void 0 ? void 0 : _detail$additionalDet9.accessories) && /*#__PURE__*/React.createElement(TLTradeAccessories, {
16554
- units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet0 = detail.additionalDetails) === null || _detail$additionalDet0 === void 0 ? void 0 : _detail$additionalDet0.accessories
16555
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet1 = detail.additionalDetails) === null || _detail$additionalDet1 === void 0 ? void 0 : _detail$additionalDet1.permissions) && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.nextActions) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.length) > 0 && /*#__PURE__*/React.createElement(PermissionCheck, {
16598
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet5 = detail.additionalDetails) === null || _detail$additionalDet5 === void 0 ? void 0 : _detail$additionalDet5.units) && /*#__PURE__*/React.createElement(TLTradeUnits, {
16599
+ units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet6 = detail.additionalDetails) === null || _detail$additionalDet6 === void 0 ? void 0 : _detail$additionalDet6.units
16600
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet7 = detail.additionalDetails) === null || _detail$additionalDet7 === void 0 ? void 0 : _detail$additionalDet7.accessories) && /*#__PURE__*/React.createElement(TLTradeAccessories, {
16601
+ units: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet8 = detail.additionalDetails) === null || _detail$additionalDet8 === void 0 ? void 0 : _detail$additionalDet8.accessories
16602
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet9 = detail.additionalDetails) === null || _detail$additionalDet9 === void 0 ? void 0 : _detail$additionalDet9.permissions) && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.nextActions) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.length) > 0 && /*#__PURE__*/React.createElement(PermissionCheck, {
16556
16603
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
16557
16604
  t: t,
16558
- permissions: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet10 = detail.additionalDetails) === null || _detail$additionalDet10 === void 0 ? void 0 : _detail$additionalDet10.permissions
16559
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet11 = detail.additionalDetails) === null || _detail$additionalDet11 === void 0 ? void 0 : _detail$additionalDet11.obpsDocuments) && /*#__PURE__*/React.createElement(BPADocuments, {
16605
+ permissions: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet0 = detail.additionalDetails) === null || _detail$additionalDet0 === void 0 ? void 0 : _detail$additionalDet0.permissions
16606
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet1 = detail.additionalDetails) === null || _detail$additionalDet1 === void 0 ? void 0 : _detail$additionalDet1.obpsDocuments) && /*#__PURE__*/React.createElement(BPADocuments, {
16560
16607
  t: t,
16561
16608
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
16562
16609
  docs: detail.additionalDetails.obpsDocuments,
16563
16610
  bpaActionsDetails: workflowDetails
16564
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet12 = detail.additionalDetails) === null || _detail$additionalDet12 === void 0 ? void 0 : _detail$additionalDet12.noc) && /*#__PURE__*/React.createElement(NOCDocuments, {
16611
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet10 = detail.additionalDetails) === null || _detail$additionalDet10 === void 0 ? void 0 : _detail$additionalDet10.noc) && /*#__PURE__*/React.createElement(NOCDocuments, {
16565
16612
  t: t,
16566
16613
  isNoc: true,
16567
16614
  NOCdata: detail.values,
16568
16615
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
16569
16616
  docs: detail.additionalDetails.noc,
16570
- noc: (_detail$additionalDet13 = detail.additionalDetails) === null || _detail$additionalDet13 === void 0 ? void 0 : _detail$additionalDet13.data,
16617
+ noc: (_detail$additionalDet11 = detail.additionalDetails) === null || _detail$additionalDet11 === void 0 ? void 0 : _detail$additionalDet11.data,
16571
16618
  bpaActionsDetails: workflowDetails
16572
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet14 = detail.additionalDetails) === null || _detail$additionalDet14 === void 0 ? void 0 : _detail$additionalDet14.scruntinyDetails) && /*#__PURE__*/React.createElement(ScruntinyDetails, {
16619
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet12 = detail.additionalDetails) === null || _detail$additionalDet12 === void 0 ? void 0 : _detail$additionalDet12.scruntinyDetails) && /*#__PURE__*/React.createElement(ScruntinyDetails, {
16573
16620
  scrutinyDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails
16574
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet15 = detail.additionalDetails) === null || _detail$additionalDet15 === void 0 ? void 0 : _detail$additionalDet15.buildingExtractionDetails) && /*#__PURE__*/React.createElement(ScruntinyDetails, {
16621
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet13 = detail.additionalDetails) === null || _detail$additionalDet13 === void 0 ? void 0 : _detail$additionalDet13.buildingExtractionDetails) && /*#__PURE__*/React.createElement(ScruntinyDetails, {
16575
16622
  scrutinyDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails
16576
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet16 = detail.additionalDetails) === null || _detail$additionalDet16 === void 0 ? void 0 : _detail$additionalDet16.subOccupancyTableDetails) && /*#__PURE__*/React.createElement(SubOccupancyTable, {
16623
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet14 = detail.additionalDetails) === null || _detail$additionalDet14 === void 0 ? void 0 : _detail$additionalDet14.subOccupancyTableDetails) && /*#__PURE__*/React.createElement(SubOccupancyTable, {
16577
16624
  edcrDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails,
16578
16625
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData
16579
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet17 = detail.additionalDetails) === null || _detail$additionalDet17 === void 0 ? void 0 : _detail$additionalDet17.documentsWithUrl) && /*#__PURE__*/React.createElement(DocumentsPreview, {
16580
- documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet18 = detail.additionalDetails) === null || _detail$additionalDet18 === void 0 ? void 0 : _detail$additionalDet18.documentsWithUrl
16581
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.documents) && /*#__PURE__*/React.createElement(PropertyDocuments, {
16582
- documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.documents
16583
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet21 = detail.additionalDetails) === null || _detail$additionalDet21 === void 0 ? void 0 : _detail$additionalDet21.taxHeadEstimatesCalculation) && /*#__PURE__*/React.createElement(PropertyEstimates, {
16584
- taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet22 = detail.additionalDetails) === null || _detail$additionalDet22 === void 0 ? void 0 : _detail$additionalDet22.taxHeadEstimatesCalculation
16626
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet15 = detail.additionalDetails) === null || _detail$additionalDet15 === void 0 ? void 0 : _detail$additionalDet15.documentsWithUrl) && /*#__PURE__*/React.createElement(DocumentsPreview, {
16627
+ documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet16 = detail.additionalDetails) === null || _detail$additionalDet16 === void 0 ? void 0 : _detail$additionalDet16.documentsWithUrl
16628
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet17 = detail.additionalDetails) === null || _detail$additionalDet17 === void 0 ? void 0 : _detail$additionalDet17.documents) && /*#__PURE__*/React.createElement(PropertyDocuments, {
16629
+ documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet18 = detail.additionalDetails) === null || _detail$additionalDet18 === void 0 ? void 0 : _detail$additionalDet18.documents,
16630
+ applicationStatus: applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus
16631
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.taxHeadEstimatesCalculation) && /*#__PURE__*/React.createElement(PropertyEstimates, {
16632
+ taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.taxHeadEstimatesCalculation
16585
16633
  }), (detail === null || detail === void 0 ? void 0 : detail.isWaterConnectionDetails) && /*#__PURE__*/React.createElement(WSAdditonalDetails, {
16586
16634
  wsAdditionalDetails: detail,
16587
16635
  oldValue: oldValue
16588
- }), (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, {
16589
- 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
16636
+ }), (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$additionalDet21 = detail.additionalDetails) === null || _detail$additionalDet21 === void 0 ? void 0 : _detail$additionalDet21.redirectUrl) && /*#__PURE__*/React.createElement(Link, {
16637
+ to: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet22 = detail.additionalDetails) === null || _detail$additionalDet22 === void 0 ? void 0 : (_detail$additionalDet23 = _detail$additionalDet22.redirectUrl) === null || _detail$additionalDet23 === void 0 ? void 0 : _detail$additionalDet23.url
16590
16638
  }, /*#__PURE__*/React.createElement("span", {
16591
16639
  className: "add-details-link hover-button"
16592
- }, detail === null || detail === void 0 ? void 0 : (_detail$additionalDet26 = detail.additionalDetails) === null || _detail$additionalDet26 === void 0 ? void 0 : (_detail$additionalDet27 = _detail$additionalDet26.redirectUrl) === null || _detail$additionalDet27 === void 0 ? void 0 : _detail$additionalDet27.title)), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet28 = detail.additionalDetails) === null || _detail$additionalDet28 === void 0 ? void 0 : _detail$additionalDet28.estimationDetails) && /*#__PURE__*/React.createElement(WSFeeEstimation, {
16640
+ }, 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.title)), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet26 = detail.additionalDetails) === null || _detail$additionalDet26 === void 0 ? void 0 : _detail$additionalDet26.estimationDetails) && /*#__PURE__*/React.createElement(WSFeeEstimation, {
16593
16641
  wsAdditionalDetails: detail,
16594
16642
  workflowDetails: workflowDetails
16595
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet29 = detail.additionalDetails) === null || _detail$additionalDet29 === void 0 ? void 0 : _detail$additionalDet29.estimationDetails) && /*#__PURE__*/React.createElement(ViewBreakup, {
16643
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet27 = detail.additionalDetails) === null || _detail$additionalDet27 === void 0 ? void 0 : _detail$additionalDet27.estimationDetails) && /*#__PURE__*/React.createElement(ViewBreakup, {
16596
16644
  wsAdditionalDetails: detail,
16597
16645
  workflowDetails: workflowDetails
16598
16646
  }));
@@ -16741,7 +16789,22 @@ function ApplicationDetailsActionBar({
16741
16789
  t
16742
16790
  } = useTranslation();
16743
16791
  let user = Digit.UserService.getUser();
16744
- const menuRef = useRef();
16792
+ const menuRef = React.useRef();
16793
+ const [isSubmitDisabled, setIsSubmitDisabled] = React.useState(() => {
16794
+ if (typeof window !== "undefined" && typeof window.isDocumentsVerified !== "undefined") {
16795
+ return !window.isDocumentsVerified;
16796
+ }
16797
+ return false;
16798
+ });
16799
+ React.useEffect(() => {
16800
+ const handleDocVerification = e => {
16801
+ setIsSubmitDisabled(!e.detail);
16802
+ };
16803
+ if (typeof window !== "undefined") {
16804
+ window.addEventListener("DOCUMENTS_VERIFIED", handleDocVerification);
16805
+ return () => window.removeEventListener("DOCUMENTS_VERIFIED", handleDocVerification);
16806
+ }
16807
+ }, []);
16745
16808
  if (window.location.href.includes("/obps") || window.location.href.includes("/noc")) {
16746
16809
  const userInfos = sessionStorage.getItem("Digit.citizen.userRequestObject");
16747
16810
  const userInfo = userInfos ? JSON.parse(userInfos) : {};
@@ -16789,7 +16852,8 @@ function ApplicationDetailsActionBar({
16789
16852
  }) : null, businessService === "ewst" ? modified === uuid || modified == null ? /*#__PURE__*/React.createElement(SubmitBar, {
16790
16853
  ref: menuRef,
16791
16854
  label: t("WF_TAKE_ACTION"),
16792
- onSubmit: () => setDisplayMenu(!displayMenu)
16855
+ onSubmit: () => setDisplayMenu(!displayMenu),
16856
+ disabled: isSubmitDisabled
16793
16857
  }) : /*#__PURE__*/React.createElement(CardLabel, {
16794
16858
  style: {
16795
16859
  color: "red",
@@ -16799,7 +16863,8 @@ function ApplicationDetailsActionBar({
16799
16863
  }, `${t("EW_ALERT_ANOTHER_VENDOR")}`) : /*#__PURE__*/React.createElement(SubmitBar, {
16800
16864
  ref: menuRef,
16801
16865
  label: t("WF_TAKE_ACTION"),
16802
- onSubmit: () => setDisplayMenu(!displayMenu)
16866
+ onSubmit: () => setDisplayMenu(!displayMenu),
16867
+ disabled: isSubmitDisabled
16803
16868
  })), !(workflowDetails !== null && workflowDetails !== void 0 && workflowDetails.isLoading) && !isMenuBotton && isSingleButton && !isAction && /*#__PURE__*/React.createElement(ActionBar, {
16804
16869
  style: {
16805
16870
  ...ActionBarStyle
@@ -17202,7 +17267,7 @@ const ViewProperty = () => {
17202
17267
  history.replace("/digit-ui/employee");
17203
17268
  } else sessionStorage.removeItem("isCreateEnabledEmployee");
17204
17269
  });
17205
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Header, null, t("PT_PROPERTY_INFO_HEADER"))), /*#__PURE__*/React.createElement(ApplicationDetails, {
17270
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ApplicationDetails, {
17206
17271
  applicationDetails: applicationDetails,
17207
17272
  isLoading: isLoading,
17208
17273
  isDataLoading: isLoading,
@@ -17261,21 +17326,22 @@ const App = ({
17261
17326
  style: {
17262
17327
  width: "100%"
17263
17328
  }
17264
- }, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
17329
+ }, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(PrivateRoute, {
17265
17330
  path: `${path}/search`,
17266
17331
  component: SearchProperty$1
17267
- }), /*#__PURE__*/React.createElement(Route, {
17332
+ }), /*#__PURE__*/React.createElement(PrivateRoute, {
17268
17333
  path: `${path}/property/citizen-search`,
17269
17334
  component: SearchProperty$1
17335
+ }), /*#__PURE__*/React.createElement(PrivateRoute, {
17336
+ path: `${path}/property/search-results`,
17337
+ component: props => /*#__PURE__*/React.createElement(SearchResultsComponent, Object.assign({}, props, {
17338
+ stateCode: stateCode
17339
+ }))
17270
17340
  }), /*#__PURE__*/React.createElement(Route, {
17271
- path: `${path}/property/search-results`
17272
- }, /*#__PURE__*/React.createElement(SearchResultsComponent, {
17273
- stateCode: stateCode
17274
- })), /*#__PURE__*/React.createElement(Route, {
17275
17341
  path: `${path}/property/citizen-otp`
17276
17342
  }, /*#__PURE__*/React.createElement(CitizenOtp, {
17277
17343
  stateCode: stateCode
17278
- }), " "), /*#__PURE__*/React.createElement(PrivateRoute, {
17344
+ })), /*#__PURE__*/React.createElement(PrivateRoute, {
17279
17345
  path: `${path}/property/link-success/:propertyIds`,
17280
17346
  component: PropertyLinkSuccess
17281
17347
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
@@ -17283,7 +17349,7 @@ const App = ({
17283
17349
  component: CreateProperty
17284
17350
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
17285
17351
  path: `${path}/view-property`,
17286
- component: () => /*#__PURE__*/React.createElement(ViewProperty, null)
17352
+ component: ViewProperty
17287
17353
  })))))));
17288
17354
  };
17289
17355
 
@@ -17564,7 +17630,9 @@ const EmployeeApp = ({
17564
17630
  })
17565
17631
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
17566
17632
  path: `${path}/new-application`,
17567
- component: NewApplication
17633
+ component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
17634
+ layoutClass: "action"
17635
+ }, /*#__PURE__*/React.createElement(NewApplication, props))
17568
17636
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
17569
17637
  path: `${path}/search`,
17570
17638
  component: Search
@@ -17971,8 +18039,8 @@ const PropertyLocationDetails = ({
17971
18039
  }
17972
18040
  }, [showToast]);
17973
18041
  return /*#__PURE__*/React.createElement(CollapsibleCardPage, {
17974
- title: t("PT_LOCATION_DETAILS"),
17975
- defaultOpen: true
18042
+ title: t("PT_LOCATION_DETAILS") + (config !== null && config !== void 0 && config.isAutomaticFill ? " (Automatic Fill by Property )" : ""),
18043
+ defaultOpen: config !== null && config !== void 0 && config.isAutomaticFill ? false : true
17976
18044
  }, /*#__PURE__*/React.createElement("div", {
17977
18045
  style: {
17978
18046
  boxShadow: "none",
@@ -18030,11 +18098,19 @@ const PropertyOwnerDetails = ({
18030
18098
  name: formData.owners && formData.owners[index] && formData.owners[index].name || (formData === null || formData === void 0 ? void 0 : (_formData$owners = formData.owners) === null || _formData$owners === void 0 ? void 0 : _formData$owners.name) || "",
18031
18099
  gender: formData.owners && formData.owners[index] && formData.owners[index].gender || (formData === null || formData === void 0 ? void 0 : (_formData$owners2 = formData.owners) === null || _formData$owners2 === void 0 ? void 0 : _formData$owners2.gender),
18032
18100
  mobileNumber: formData.owners && formData.owners[index] && formData.owners[index].mobileNumber || (formData === null || formData === void 0 ? void 0 : (_formData$owners3 = formData.owners) === null || _formData$owners3 === void 0 ? void 0 : _formData$owners3.mobileNumber) || "",
18033
- fatherOrHusbandName: formData.owners && formData.owners[index] && formData.owners[index].fatherOrHusbandName || (formData === null || formData === void 0 ? void 0 : (_formData$owners4 = formData.owners) === null || _formData$owners4 === void 0 ? void 0 : _formData$owners4.fatherOrHusbandName) || "",
18034
- relationship: formData.owners && formData.owners[index] && formData.owners[index].relationship || (formData === null || formData === void 0 ? void 0 : (_formData$owners5 = formData.owners) === null || _formData$owners5 === void 0 ? void 0 : _formData$owners5.relationship),
18101
+ fatherOrHusbandName: formData.owners && formData.owners[index] && formData.owners[index].fatherOrHusbandName || (formData === null || formData === void 0 ? void 0 : (_formData$owners4 = formData.owners) === null || _formData$owners4 === void 0 ? void 0 : _formData$owners4.fatherOrHusbandName) || "NA",
18102
+ relationship: formData.owners && formData.owners[index] && formData.owners[index].relationship || (formData === null || formData === void 0 ? void 0 : (_formData$owners5 = formData.owners) === null || _formData$owners5 === void 0 ? void 0 : _formData$owners5.relationship) || {
18103
+ code: "FATHER",
18104
+ name: "Father",
18105
+ i18nKey: "PT_RELATION_FATHER"
18106
+ },
18035
18107
  ownershipCategory: ownershipCategory,
18036
- ownerType: formData.owners && formData.owners[index] && ((_formData$owners$inde = formData.owners[index]) === null || _formData$owners$inde === void 0 ? void 0 : _formData$owners$inde.ownerType) || ((_formData$owners6 = formData.owners) === null || _formData$owners6 === void 0 ? void 0 : _formData$owners6.ownerType),
18037
- permanentAddress: formData.owners && formData.owners[index] && formData.owners[index].permanentAddress || (formData === null || formData === void 0 ? void 0 : (_formData$owners7 = formData.owners) === null || _formData$owners7 === void 0 ? void 0 : _formData$owners7.permanentAddress) || "",
18108
+ ownerType: formData.owners && formData.owners[index] && ((_formData$owners$inde = formData.owners[index]) === null || _formData$owners$inde === void 0 ? void 0 : _formData$owners$inde.ownerType) || ((_formData$owners6 = formData.owners) === null || _formData$owners6 === void 0 ? void 0 : _formData$owners6.ownerType) || {
18109
+ code: "NONE",
18110
+ name: "None",
18111
+ i18nKey: "PT_OWNERSHIP_CATEGORY_NONE"
18112
+ },
18113
+ permanentAddress: formData.owners && formData.owners[index] && formData.owners[index].permanentAddress || (formData === null || formData === void 0 ? void 0 : (_formData$owners7 = formData.owners) === null || _formData$owners7 === void 0 ? void 0 : _formData$owners7.permanentAddress) || "NA",
18038
18114
  email: formData.owners && formData.owners[index] && formData.owners[index].email || (formData === null || formData === void 0 ? void 0 : (_formData$owners8 = formData.owners) === null || _formData$owners8 === void 0 ? void 0 : _formData$owners8.emailId) || "",
18039
18115
  isCoresAddr: false
18040
18116
  }]);
@@ -18316,7 +18392,11 @@ const PropertyOwnerDetails = ({
18316
18392
  })
18317
18393
  }))), (touched === null || touched === void 0 ? void 0 : touched["gender" + index]) && (errors === null || errors === void 0 ? void 0 : (_errors5 = errors["gender" + index]) === null || _errors5 === void 0 ? void 0 : _errors5.message) && /*#__PURE__*/React.createElement(CardLabelError, {
18318
18394
  style: errorStyle
18319
- }, errors === null || errors === void 0 ? void 0 : (_errors6 = errors["gender" + index]) === null || _errors6 === void 0 ? void 0 : _errors6.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PT_FORM3_GUARDIAN_NAME")}*`), /*#__PURE__*/React.createElement("div", {
18395
+ }, errors === null || errors === void 0 ? void 0 : (_errors6 = errors["gender" + index]) === null || _errors6 === void 0 ? void 0 : _errors6.message), /*#__PURE__*/React.createElement("div", {
18396
+ style: {
18397
+ display: "none"
18398
+ }
18399
+ }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PT_FORM3_GUARDIAN_NAME")}*`), /*#__PURE__*/React.createElement("div", {
18320
18400
  className: "form-field"
18321
18401
  }, /*#__PURE__*/React.createElement(Controller, {
18322
18402
  key: "fatherOrHusbandName" + index,
@@ -18422,7 +18502,7 @@ const PropertyOwnerDetails = ({
18422
18502
  }
18423
18503
  },
18424
18504
  value: ownerDetails === null || ownerDetails === void 0 ? void 0 : (_ownerDetails$index3 = ownerDetails[index]) === null || _ownerDetails$index3 === void 0 ? void 0 : _ownerDetails$index3.permanentAddress
18425
- }))))));
18505
+ })))))));
18426
18506
  }), ismultiple ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
18427
18507
  style: {
18428
18508
  display: "flex",
@@ -18438,11 +18518,19 @@ const PropertyOwnerDetails = ({
18438
18518
  name: "",
18439
18519
  gender: "",
18440
18520
  mobileNumber: "",
18441
- fatherOrHusbandName: "",
18442
- relationship: "",
18521
+ fatherOrHusbandName: "NA",
18522
+ relationship: {
18523
+ code: "FATHER",
18524
+ name: "Father",
18525
+ i18nKey: "PT_RELATION_FATHER"
18526
+ },
18443
18527
  ownershipCategory: ownershipCategory,
18444
- ownerType: "",
18445
- permanentAddress: "",
18528
+ ownerType: {
18529
+ code: "NONE",
18530
+ name: "None",
18531
+ i18nKey: "PT_OWNERSHIP_CATEGORY_NONE"
18532
+ },
18533
+ permanentAddress: "NA",
18446
18534
  email: "",
18447
18535
  isCoresAddr: false
18448
18536
  }])
@@ -18642,12 +18730,12 @@ const PropertyWaterConnection = ({
18642
18730
  if (lastErrorState.current !== hasErrors) {
18643
18731
  lastErrorState.current = hasErrors;
18644
18732
  if (hasErrors) {
18645
- setError(config.key, {
18733
+ if (setError) setError(config.key, {
18646
18734
  type: "custom",
18647
18735
  message: "Validation failed"
18648
18736
  });
18649
18737
  } else {
18650
- clearErrors(config.key);
18738
+ if (clearErrors) clearErrors(config.key);
18651
18739
  }
18652
18740
  }
18653
18741
  }, [errors, config.key, setError, clearErrors]);
@@ -18658,8 +18746,8 @@ const PropertyWaterConnection = ({
18658
18746
  marginTop: "-21px"
18659
18747
  };
18660
18748
  return /*#__PURE__*/React.createElement(CollapsibleCardPage, {
18661
- title: t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS"),
18662
- defaultOpen: true,
18749
+ title: t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS") + (config !== null && config !== void 0 && config.isAutomaticFill ? " (Automatic Fill by Property )" : ""),
18750
+ defaultOpen: config !== null && config !== void 0 && config.isAutomaticFill ? false : true,
18663
18751
  style: props.style
18664
18752
  }, /*#__PURE__*/React.createElement("div", {
18665
18753
  className: "formcomposer-section-grid"
@@ -19245,7 +19333,7 @@ const PropertyDetails = ({
19245
19333
  userType,
19246
19334
  formData
19247
19335
  }) => {
19248
- var _formData, _formData$knowyourpro, _formData$knowyourpro2, _formData2, _formData2$cptSearchQ, _formData3, _formData3$cpt, _formData3$cpt$detail, _formData4, _formData4$cptId, _formData5, _formData5$cpt, _formData5$cpt$detail, _formData6, _formData6$knowyourpr, _formData6$knowyourpr2, _formData7, _formData7$cptId, _formData8, _formData8$cpt, _formData8$cpt$detail, _formData9, _formData9$tradeLicen, _formData9$tradeLicen2, _formData0, _formData0$cptId, _formData1, _formData1$cpt, _formData1$cpt$detail, _formData10, _formData10$cptId, _formData11, _formData11$cpt, _formData11$cpt$detai, _formData12, _formData12$knowyourp, _formData12$knowyourp2, _formData13, _formData13$cptId, _formData14, _formData14$cpt, _formData14$cpt$detai, _formData15, _formData15$tradeLice, _formData15$tradeLice2, _formData16, _formData16$cptId, _formData17, _formData17$cpt, _formData17$cpt$detai, _propertyDetails$Prop, _propertyDetails$Prop2, _propertyDetails$Prop3, _propertyDetails$Prop4, _propertyDetails$Prop32, _reversedOwners$, _propertyDetails$Prop33, _propertyDetails$Prop34, _propertyDetails$Prop35, _propertyDetails$Prop36, _propertyDetails$Prop37, _propertyDetails$Prop38, _propertyDetails$Prop39, _propertyDetails$Prop40, _propertyDetails$Prop41;
19336
+ var _formData, _formData$knowyourpro, _formData$knowyourpro2, _formData2, _formData2$cptSearchQ, _formData3, _formData3$cpt, _formData3$cpt$detail, _formData4, _formData4$cptId, _formData5, _formData5$cpt, _formData5$cpt$detail, _formData6, _formData6$knowyourpr, _formData6$knowyourpr2, _formData7, _formData7$cptId, _formData8, _formData8$cpt, _formData8$cpt$detail, _formData9, _formData9$tradeLicen, _formData9$tradeLicen2, _formData0, _formData0$cptId, _formData1, _formData1$cpt, _formData1$cpt$detail, _formData10, _formData10$cptId, _formData11, _formData11$cpt, _formData11$cpt$detai, _formData12, _formData12$knowyourp, _formData12$knowyourp2, _formData13, _formData13$cptId, _formData14, _formData14$cpt, _formData14$cpt$detai, _formData15, _formData15$tradeLice, _formData15$tradeLice2, _formData16, _formData16$cptId, _formData17, _formData17$cpt, _formData17$cpt$detai, _propertyDetails$Prop, _propertyDetails$Prop2, _propertyDetails$Prop3, _propertyDetails$Prop4, _propertyDetails$Prop5, _propertyDetails$Prop33, _propertyDetails$Prop34, _reversedOwners$, _propertyDetails$Prop35, _propertyDetails$Prop36, _propertyDetails$Prop37, _propertyDetails$Prop38, _propertyDetails$Prop39, _propertyDetails$Prop40, _propertyDetails$Prop41, _propertyDetails$Prop42, _propertyDetails$Prop43;
19249
19337
  const tenantId = (((_formData = formData) === null || _formData === void 0 ? void 0 : (_formData$knowyourpro = _formData.knowyourproperty) === null || _formData$knowyourpro === void 0 ? void 0 : (_formData$knowyourpro2 = _formData$knowyourpro.KnowProperty) === null || _formData$knowyourpro2 === void 0 ? void 0 : _formData$knowyourpro2.code) === "YES" || sessionStorage.getItem("VisitedLightCreate") === "false" ? (_formData2 = formData) === null || _formData2 === void 0 ? void 0 : (_formData2$cptSearchQ = _formData2.cptSearchQuery) === null || _formData2$cptSearchQ === void 0 ? void 0 : _formData2$cptSearchQ.city : (_formData3 = formData) === null || _formData3 === void 0 ? void 0 : (_formData3$cpt = _formData3.cpt) === null || _formData3$cpt === void 0 ? void 0 : (_formData3$cpt$detail = _formData3$cpt.details) === null || _formData3$cpt$detail === void 0 ? void 0 : _formData3$cpt$detail.tenantId) || Digit.ULBService.getCitizenCurrentTenant();
19250
19338
  if (window.location.href.includes("/tl/tradelicence/edit-application/") || window.location.href.includes("/renew-trade/") && JSON.parse(sessionStorage.getItem("EditFormData"))) {
19251
19339
  let EditformData = JSON.parse(sessionStorage.getItem("EditFormData"));
@@ -19281,31 +19369,31 @@ const PropertyDetails = ({
19281
19369
  };
19282
19370
  const reversedOwners = Array.isArray(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop = propertyDetails.Properties) === null || _propertyDetails$Prop === void 0 ? void 0 : (_propertyDetails$Prop2 = _propertyDetails$Prop[0]) === null || _propertyDetails$Prop2 === void 0 ? void 0 : _propertyDetails$Prop2.owners) ? propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop3 = propertyDetails.Properties) === null || _propertyDetails$Prop3 === void 0 ? void 0 : (_propertyDetails$Prop4 = _propertyDetails$Prop3[0]) === null || _propertyDetails$Prop4 === void 0 ? void 0 : _propertyDetails$Prop4.owners.slice().reverse() : [];
19283
19371
  let propAddArr = [];
19284
- if (propertyDetails && propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.Properties.length) {
19285
- var _propertyDetails$Prop5, _propertyDetails$Prop6, _propertyDetails$Prop9, _propertyDetails$Prop0, _propertyDetails$Prop1, _propertyDetails$Prop10, _propertyDetails$Prop15, _propertyDetails$Prop16, _propertyDetails$Prop19, _propertyDetails$Prop20, _propertyDetails$Prop21, _propertyDetails$Prop26, _propertyDetails$Prop28, _propertyDetails$Prop29;
19286
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop5 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop5 !== void 0 && (_propertyDetails$Prop6 = _propertyDetails$Prop5.address) !== null && _propertyDetails$Prop6 !== void 0 && _propertyDetails$Prop6.doorNo) {
19287
- var _propertyDetails$Prop7, _propertyDetails$Prop8;
19288
- propAddArr.push(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop7 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop7 === void 0 ? void 0 : (_propertyDetails$Prop8 = _propertyDetails$Prop7.address) === null || _propertyDetails$Prop8 === void 0 ? void 0 : _propertyDetails$Prop8.doorNo);
19372
+ if (propertyDetails && propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop5 = propertyDetails.Properties) !== null && _propertyDetails$Prop5 !== void 0 && _propertyDetails$Prop5.length) {
19373
+ var _propertyDetails$Prop6, _propertyDetails$Prop7, _propertyDetails$Prop0, _propertyDetails$Prop1, _propertyDetails$Prop10, _propertyDetails$Prop11, _propertyDetails$Prop16, _propertyDetails$Prop17, _propertyDetails$Prop20, _propertyDetails$Prop21, _propertyDetails$Prop22, _propertyDetails$Prop27, _propertyDetails$Prop29, _propertyDetails$Prop30;
19374
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop6 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop6 !== void 0 && (_propertyDetails$Prop7 = _propertyDetails$Prop6.address) !== null && _propertyDetails$Prop7 !== void 0 && _propertyDetails$Prop7.doorNo) {
19375
+ var _propertyDetails$Prop8, _propertyDetails$Prop9;
19376
+ propAddArr.push(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop8 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop8 === void 0 ? void 0 : (_propertyDetails$Prop9 = _propertyDetails$Prop8.address) === null || _propertyDetails$Prop9 === void 0 ? void 0 : _propertyDetails$Prop9.doorNo);
19289
19377
  }
19290
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop9 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop9 !== void 0 && (_propertyDetails$Prop0 = _propertyDetails$Prop9.address) !== null && _propertyDetails$Prop0 !== void 0 && _propertyDetails$Prop0.street || propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop1 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop1 !== void 0 && (_propertyDetails$Prop10 = _propertyDetails$Prop1.address) !== null && _propertyDetails$Prop10 !== void 0 && _propertyDetails$Prop10.buildingName) {
19291
- var _propertyDetails$Prop11, _propertyDetails$Prop12, _propertyDetails$Prop13, _propertyDetails$Prop14;
19292
- propAddArr.push((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop11 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop11 === void 0 ? void 0 : (_propertyDetails$Prop12 = _propertyDetails$Prop11.address) === null || _propertyDetails$Prop12 === void 0 ? void 0 : _propertyDetails$Prop12.street) || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop13 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop13 === void 0 ? void 0 : (_propertyDetails$Prop14 = _propertyDetails$Prop13.address) === null || _propertyDetails$Prop14 === void 0 ? void 0 : _propertyDetails$Prop14.buildingName));
19378
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop0 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop0 !== void 0 && (_propertyDetails$Prop1 = _propertyDetails$Prop0.address) !== null && _propertyDetails$Prop1 !== void 0 && _propertyDetails$Prop1.street || propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop10 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop10 !== void 0 && (_propertyDetails$Prop11 = _propertyDetails$Prop10.address) !== null && _propertyDetails$Prop11 !== void 0 && _propertyDetails$Prop11.buildingName) {
19379
+ var _propertyDetails$Prop12, _propertyDetails$Prop13, _propertyDetails$Prop14, _propertyDetails$Prop15;
19380
+ propAddArr.push((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop12 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop12 === void 0 ? void 0 : (_propertyDetails$Prop13 = _propertyDetails$Prop12.address) === null || _propertyDetails$Prop13 === void 0 ? void 0 : _propertyDetails$Prop13.street) || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop14 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop14 === void 0 ? void 0 : (_propertyDetails$Prop15 = _propertyDetails$Prop14.address) === null || _propertyDetails$Prop15 === void 0 ? void 0 : _propertyDetails$Prop15.buildingName));
19293
19381
  }
19294
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop15 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop15 !== void 0 && (_propertyDetails$Prop16 = _propertyDetails$Prop15.address) !== null && _propertyDetails$Prop16 !== void 0 && _propertyDetails$Prop16.landmark) {
19295
- var _propertyDetails$Prop17, _propertyDetails$Prop18;
19296
- propAddArr.push(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop17 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop17 === void 0 ? void 0 : (_propertyDetails$Prop18 = _propertyDetails$Prop17.address) === null || _propertyDetails$Prop18 === void 0 ? void 0 : _propertyDetails$Prop18.landmark);
19382
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop16 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop16 !== void 0 && (_propertyDetails$Prop17 = _propertyDetails$Prop16.address) !== null && _propertyDetails$Prop17 !== void 0 && _propertyDetails$Prop17.landmark) {
19383
+ var _propertyDetails$Prop18, _propertyDetails$Prop19;
19384
+ propAddArr.push(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop18 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop18 === void 0 ? void 0 : (_propertyDetails$Prop19 = _propertyDetails$Prop18.address) === null || _propertyDetails$Prop19 === void 0 ? void 0 : _propertyDetails$Prop19.landmark);
19297
19385
  }
19298
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop19 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop19 !== void 0 && (_propertyDetails$Prop20 = _propertyDetails$Prop19.address) !== null && _propertyDetails$Prop20 !== void 0 && (_propertyDetails$Prop21 = _propertyDetails$Prop20.locality) !== null && _propertyDetails$Prop21 !== void 0 && _propertyDetails$Prop21.code) {
19299
- var _propertyDetails$Prop22, _propertyDetails$Prop23, _propertyDetails$Prop24, _propertyDetails$Prop25;
19300
- propAddArr.push(t(Digit.Utils.pt.getMohallaLocale(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop22 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop22 === void 0 ? void 0 : (_propertyDetails$Prop23 = _propertyDetails$Prop22.address) === null || _propertyDetails$Prop23 === void 0 ? void 0 : (_propertyDetails$Prop24 = _propertyDetails$Prop23.locality) === null || _propertyDetails$Prop24 === void 0 ? void 0 : _propertyDetails$Prop24.code, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop25 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop25 === void 0 ? void 0 : _propertyDetails$Prop25.tenantId)));
19386
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop20 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop20 !== void 0 && (_propertyDetails$Prop21 = _propertyDetails$Prop20.address) !== null && _propertyDetails$Prop21 !== void 0 && (_propertyDetails$Prop22 = _propertyDetails$Prop21.locality) !== null && _propertyDetails$Prop22 !== void 0 && _propertyDetails$Prop22.code) {
19387
+ var _propertyDetails$Prop23, _propertyDetails$Prop24, _propertyDetails$Prop25, _propertyDetails$Prop26;
19388
+ propAddArr.push(t(Digit.Utils.pt.getMohallaLocale(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop23 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop23 === void 0 ? void 0 : (_propertyDetails$Prop24 = _propertyDetails$Prop23.address) === null || _propertyDetails$Prop24 === void 0 ? void 0 : (_propertyDetails$Prop25 = _propertyDetails$Prop24.locality) === null || _propertyDetails$Prop25 === void 0 ? void 0 : _propertyDetails$Prop25.code, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop26 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop26 === void 0 ? void 0 : _propertyDetails$Prop26.tenantId)));
19301
19389
  }
19302
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop26 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop26 !== void 0 && _propertyDetails$Prop26.tenantId) {
19303
- var _propertyDetails$Prop27;
19304
- propAddArr.push(t(Digit.Utils.pt.getCityLocale(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop27 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop27 === void 0 ? void 0 : _propertyDetails$Prop27.tenantId)));
19390
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop27 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop27 !== void 0 && _propertyDetails$Prop27.tenantId) {
19391
+ var _propertyDetails$Prop28;
19392
+ propAddArr.push(t(Digit.Utils.pt.getCityLocale(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop28 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop28 === void 0 ? void 0 : _propertyDetails$Prop28.tenantId)));
19305
19393
  }
19306
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop28 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop28 !== void 0 && (_propertyDetails$Prop29 = _propertyDetails$Prop28.address) !== null && _propertyDetails$Prop29 !== void 0 && _propertyDetails$Prop29.pincode) {
19307
- var _propertyDetails$Prop30, _propertyDetails$Prop31;
19308
- propAddArr.push(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop30 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop30 === void 0 ? void 0 : (_propertyDetails$Prop31 = _propertyDetails$Prop30.address) === null || _propertyDetails$Prop31 === void 0 ? void 0 : _propertyDetails$Prop31.pincode);
19394
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop29 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop29 !== void 0 && (_propertyDetails$Prop30 = _propertyDetails$Prop29.address) !== null && _propertyDetails$Prop30 !== void 0 && _propertyDetails$Prop30.pincode) {
19395
+ var _propertyDetails$Prop31, _propertyDetails$Prop32;
19396
+ propAddArr.push(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop31 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop31 === void 0 ? void 0 : (_propertyDetails$Prop32 = _propertyDetails$Prop31.address) === null || _propertyDetails$Prop32 === void 0 ? void 0 : _propertyDetails$Prop32.pincode);
19309
19397
  }
19310
19398
  }
19311
19399
  if (isLoading) {
@@ -19324,10 +19412,10 @@ const PropertyDetails = ({
19324
19412
  config: config,
19325
19413
  onSelect: goNext,
19326
19414
  onSkip: onSkip
19327
- }, propertyDetails && (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties.length) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardHeader, null, t("PT_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
19415
+ }, propertyDetails && (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop33 = propertyDetails.Properties) === null || _propertyDetails$Prop33 === void 0 ? void 0 : _propertyDetails$Prop33.length) > 0 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardHeader, null, t("PT_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
19328
19416
  className: "border-none",
19329
19417
  label: t(`PROPERTY_ID`),
19330
- text: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop32 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop32 === void 0 ? void 0 : _propertyDetails$Prop32.propertyId
19418
+ text: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop34 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop34 === void 0 ? void 0 : _propertyDetails$Prop34.propertyId
19331
19419
  }), /*#__PURE__*/React.createElement(Row, {
19332
19420
  className: "border-none",
19333
19421
  label: t(`OWNER_NAME`),
@@ -19340,7 +19428,7 @@ const PropertyDetails = ({
19340
19428
  label: t(`PROPERTY_ADDRESS`),
19341
19429
  text: propAddArr.join(', '),
19342
19430
  privacy: {
19343
- uuid: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop33 = propertyDetails.Properties) === null || _propertyDetails$Prop33 === void 0 ? void 0 : (_propertyDetails$Prop34 = _propertyDetails$Prop33[0]) === null || _propertyDetails$Prop34 === void 0 ? void 0 : (_propertyDetails$Prop35 = _propertyDetails$Prop34.owners) === null || _propertyDetails$Prop35 === void 0 ? void 0 : (_propertyDetails$Prop36 = _propertyDetails$Prop35[0]) === null || _propertyDetails$Prop36 === void 0 ? void 0 : _propertyDetails$Prop36.uuid,
19431
+ uuid: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop35 = propertyDetails.Properties) === null || _propertyDetails$Prop35 === void 0 ? void 0 : (_propertyDetails$Prop36 = _propertyDetails$Prop35[0]) === null || _propertyDetails$Prop36 === void 0 ? void 0 : (_propertyDetails$Prop37 = _propertyDetails$Prop36.owners) === null || _propertyDetails$Prop37 === void 0 ? void 0 : (_propertyDetails$Prop38 = _propertyDetails$Prop37[0]) === null || _propertyDetails$Prop38 === void 0 ? void 0 : _propertyDetails$Prop38.uuid,
19344
19432
  fieldName: ["doorNo", "street", "landmark"],
19345
19433
  model: "Property",
19346
19434
  showValue: true,
@@ -19348,8 +19436,8 @@ const PropertyDetails = ({
19348
19436
  serviceName: "/property-services/property/_search",
19349
19437
  requestBody: {},
19350
19438
  requestParam: {
19351
- tenantId: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop37 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop37 === void 0 ? void 0 : _propertyDetails$Prop37.tenantId,
19352
- propertyIds: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop38 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop38 === void 0 ? void 0 : _propertyDetails$Prop38.propertyId
19439
+ tenantId: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop39 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop39 === void 0 ? void 0 : _propertyDetails$Prop39.tenantId,
19440
+ propertyIds: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop40 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop40 === void 0 ? void 0 : _propertyDetails$Prop40.propertyId
19353
19441
  },
19354
19442
  jsonPath: "Properties[0].address.street",
19355
19443
  d: res => {
@@ -19362,13 +19450,13 @@ const PropertyDetails = ({
19362
19450
  }), /*#__PURE__*/React.createElement(Row, {
19363
19451
  className: "border-none",
19364
19452
  label: t(`PT_MUTATION_STATUS`),
19365
- text: t(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop39 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop39 === void 0 ? void 0 : _propertyDetails$Prop39.status)
19453
+ text: t(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop41 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop41 === void 0 ? void 0 : _propertyDetails$Prop41.status)
19366
19454
  }), /*#__PURE__*/React.createElement("div", {
19367
19455
  style: {
19368
19456
  textAlign: "left"
19369
19457
  }
19370
19458
  }, /*#__PURE__*/React.createElement(Link, {
19371
- to: `/digit-ui/citizen/commonpt/view-property?propertyId=${propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop40 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop40 === void 0 ? void 0 : _propertyDetails$Prop40.propertyId}&tenantId=${propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop41 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop41 === void 0 ? void 0 : _propertyDetails$Prop41.tenantId}`
19459
+ to: `/digit-ui/citizen/commonpt/view-property?propertyId=${propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop42 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop42 === void 0 ? void 0 : _propertyDetails$Prop42.propertyId}&tenantId=${propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop43 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop43 === void 0 ? void 0 : _propertyDetails$Prop43.tenantId}`
19372
19460
  }, /*#__PURE__*/React.createElement(LinkButton, {
19373
19461
  style: {
19374
19462
  textAlign: "left"
@@ -19406,7 +19494,7 @@ const PropertySearchNSummary = ({
19406
19494
  formState,
19407
19495
  clearErrors
19408
19496
  }) => {
19409
- var _formData$cptId, _Digit$UserService$ge, _Digit$UserService$ge2, _Digit$UserService$ge3, _Digit$UserService$ge4, _formData$cpt, _formData$cpt3, _formData$cpt3$detail, _propertyDetails$Prop2, _formData$tradedetils, _formData$tradedetils2, _formData$tradedetils3, _propertyDetails$Prop3, _propertyDetails$Prop4, _activeProperty$owner, _activeProperty$owner2;
19497
+ var _formData$cptId, _Digit$UserService$ge, _Digit$UserService$ge2, _Digit$UserService$ge3, _Digit$UserService$ge4, _formData$cpt, _formData$cpt3, _formData$cpt3$detail, _propertyDetails$Prop2, _formData$tradedetils, _formData$tradedetils2, _formData$tradedetils3, _activeProperty$owner, _activeProperty$owner2;
19410
19498
  const {
19411
19499
  t
19412
19500
  } = useTranslation();
@@ -19468,6 +19556,20 @@ const PropertySearchNSummary = ({
19468
19556
  var _formData$cpt2, _formData$cpt2$detail, _propertyDetails$Prop;
19469
19557
  const currentCptId = formData === null || formData === void 0 ? void 0 : (_formData$cpt2 = formData.cpt) === null || _formData$cpt2 === void 0 ? void 0 : (_formData$cpt2$detail = _formData$cpt2.details) === null || _formData$cpt2$detail === void 0 ? void 0 : _formData$cpt2$detail.propertyId;
19470
19558
  if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop = propertyDetails.Properties) === null || _propertyDetails$Prop === void 0 ? void 0 : _propertyDetails$Prop.length) > 0) {
19559
+ if (urlPropertyId && (!selectedProperty || selectedProperty.propertyId !== urlPropertyId)) {
19560
+ const matchingProp = propertyDetails.Properties.find(p => p.propertyId === urlPropertyId);
19561
+ if (matchingProp) {
19562
+ setSelectedProperty(matchingProp);
19563
+ if (currentCptId !== urlPropertyId) {
19564
+ onSelect("cpt", {
19565
+ details: matchingProp
19566
+ });
19567
+ sessionStorage.setItem("Digit_FSM_PT", JSON.stringify(matchingProp));
19568
+ localStorage.setItem("pgrProperty", JSON.stringify(matchingProp));
19569
+ }
19570
+ return;
19571
+ }
19572
+ }
19471
19573
  if (propertyDetails.Properties.length === 1 && !selectedProperty) {
19472
19574
  const fetchedId = propertyDetails.Properties[0].propertyId;
19473
19575
  setSelectedProperty(propertyDetails.Properties[0]);
@@ -19480,18 +19582,7 @@ const PropertySearchNSummary = ({
19480
19582
  }
19481
19583
  }
19482
19584
  }
19483
- }, [propertyDetails, pathname, isCitizen, isWsApplication, formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : (_formData$cpt3$detail = _formData$cpt3.details) === null || _formData$cpt3$detail === void 0 ? void 0 : _formData$cpt3$detail.propertyId]);
19484
- const clearSearch = () => {
19485
- setPropertyId("");
19486
- setSearchPropertyId("");
19487
- setMobileNumber("");
19488
- setSearchMobileNumber("");
19489
- setSelectedProperty(null);
19490
- onSelect(config === null || config === void 0 ? void 0 : config.key, {
19491
- id: ""
19492
- });
19493
- onSelect("cpt", null);
19494
- };
19585
+ }, [propertyDetails, pathname, isCitizen, isWsApplication, formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : (_formData$cpt3$detail = _formData$cpt3.details) === null || _formData$cpt3$detail === void 0 ? void 0 : _formData$cpt3$detail.propertyId, urlPropertyId, selectedProperty]);
19495
19586
  if (isEditScreen) {
19496
19587
  return /*#__PURE__*/React.createElement(React.Fragment, null);
19497
19588
  }
@@ -19500,13 +19591,6 @@ const PropertySearchNSummary = ({
19500
19591
  if (activeProperty) {
19501
19592
  propertyAddress = getAddress(activeProperty === null || activeProperty === void 0 ? void 0 : activeProperty.address, t);
19502
19593
  }
19503
- const getInputStyles = () => {
19504
- if (window.location.href.includes("/ws/")) {
19505
- return {
19506
- fontWeight: "700"
19507
- };
19508
- } else return {};
19509
- };
19510
19594
  const getOwnerNames = propertyData => {
19511
19595
  var _propertyData$owners, _getActiveOwners$sort, _getActiveOwners$sort2;
19512
19596
  const getActiveOwners = propertyData === null || propertyData === void 0 ? void 0 : (_propertyData$owners = propertyData.owners) === null || _propertyData$owners === void 0 ? void 0 : _propertyData$owners.filter(owner => owner === null || owner === void 0 ? void 0 : owner.active);
@@ -19517,141 +19601,12 @@ const PropertySearchNSummary = ({
19517
19601
  return getOwnersList ? getOwnersList : t("NA");
19518
19602
  };
19519
19603
  if (window.location.href.includes("/ws/")) ;
19520
- const onPropertySelect = property => {
19521
- setSelectedProperty(property);
19522
- onSelect("cpt", {
19523
- details: property
19524
- });
19525
- sessionStorage.setItem("Digit_FSM_PT", JSON.stringify(property));
19526
- localStorage.setItem("pgrProperty", JSON.stringify(property));
19527
- };
19528
19604
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CollapsibleCardPage, {
19529
19605
  title: t("PT_PROPERTY_SEARCH"),
19530
19606
  defaultOpen: true
19531
- }, (window.location.href.includes("/tl/") ? !((formData === null || formData === void 0 ? void 0 : (_formData$tradedetils = formData.tradedetils) === null || _formData$tradedetils === void 0 ? void 0 : (_formData$tradedetils2 = _formData$tradedetils[0]) === null || _formData$tradedetils2 === void 0 ? void 0 : (_formData$tradedetils3 = _formData$tradedetils2.structureType) === null || _formData$tradedetils3 === void 0 ? void 0 : _formData$tradedetils3.code) === "MOVABLE") && (isEmpNewApplication || isEmpRenewLicense) : true) && /*#__PURE__*/React.createElement(React.Fragment, null, isCitizen && isWsApplication ? /*#__PURE__*/React.createElement("div", {
19532
- className: "formcomposer-section-grid",
19533
- style: isMobile ? {} : {}
19534
- }, /*#__PURE__*/React.createElement("div", {
19535
- style: {
19536
- marginBottom: "16px"
19537
- }
19538
- }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(Label, {
19539
- style: getInputStyles()
19540
- }, `${t("PROPERTY_ID")}`), /*#__PURE__*/React.createElement("div", {
19541
- style: {
19542
- display: "flex",
19543
- gap: "12px",
19544
- width: "100%",
19545
- flexDirection: "column"
19546
- }
19547
- }, isLoading ? /*#__PURE__*/React.createElement("div", null, t("CS_COMMON_LOADING")) : propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.Properties && (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop3 = propertyDetails.Properties) === null || _propertyDetails$Prop3 === void 0 ? void 0 : _propertyDetails$Prop3.length) > 0 ? /*#__PURE__*/React.createElement(Dropdown, {
19548
- option: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties,
19549
- optionKey: "propertyId",
19550
- id: "propertyId",
19551
- selected: selectedProperty,
19552
- select: onPropertySelect,
19553
- t: t,
19554
- placeholder: t("PT_SELECT_PROPERTY")
19555
- }) : /*#__PURE__*/React.createElement("span", {
19556
- onClick: () => history.push(`/digit-ui/${userType}/${pathname.split("/")[3]}/create-application/create-property?redirectToUrl=${window.location.pathname}`, {
19557
- ...state,
19558
- ...formData
19559
- })
19560
- }, /*#__PURE__*/React.createElement("button", {
19561
- className: "submit-bar",
19562
- type: "button",
19563
- style: {
19564
- color: "white"
19565
- }
19566
- }, t("CPT_CREATE_PROPERTY"))))))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
19567
- style: {
19568
- display: "flex",
19569
- flexDirection: isMobile ? "column" : "row",
19570
- gap: "16px",
19571
- width: "100%",
19572
- alignItems: "flex-end",
19573
- marginBottom: "16px"
19574
- }
19575
- }, /*#__PURE__*/React.createElement("div", {
19576
- style: {
19577
- flex: 1
19578
- }
19579
- }, /*#__PURE__*/React.createElement(Label, null, `${t("CORE_COMMON_MOBILE_NUMBER")}`), /*#__PURE__*/React.createElement(TextInput, {
19580
- value: mobileNumber,
19581
- onChange: e => {
19582
- const val = e.target.value;
19583
- if (val.length <= 10) {
19584
- setMobileNumber(val);
19585
- if (val.length === 10) {
19586
- setSearchMobileNumber(val);
19587
- }
19588
- }
19589
- },
19590
- style: {
19591
- width: "100%"
19592
- },
19593
- placeholder: `${t("PT_ENTER_MOBILE_NUMBER")}`,
19594
- maxLength: 10
19595
- })), /*#__PURE__*/React.createElement("div", {
19596
- style: {
19597
- flex: 1
19598
- }
19599
- }, /*#__PURE__*/React.createElement(Label, null, `${t("PROPERTY_ID")}`), isLoading ? /*#__PURE__*/React.createElement("div", null, t("CS_COMMON_LOADING")) : /*#__PURE__*/React.createElement(Dropdown, {
19600
- option: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties) || [],
19601
- optionKey: "propertyId",
19602
- id: "propertyId",
19603
- selected: selectedProperty,
19604
- select: onPropertySelect,
19605
- t: t,
19606
- placeholder: t("PT_SELECT_PROPERTY")
19607
- })), /*#__PURE__*/React.createElement("div", {
19608
- style: {
19609
- flex: 1
19610
- }
19611
- }, /*#__PURE__*/React.createElement("button", {
19612
- className: "submit-bar",
19613
- type: "button",
19614
- style: {
19615
- color: "white",
19616
- width: "100%",
19617
- margin: 0
19618
- },
19619
- onClick: clearSearch
19620
- }, `${t("CLEAR")}`)), /*#__PURE__*/React.createElement("div", {
19621
- style: {
19622
- flex: 1
19623
- }
19624
- }, searchMobileNumber && (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop4 = propertyDetails.Properties) === null || _propertyDetails$Prop4 === void 0 ? void 0 : _propertyDetails$Prop4.length) === 0 && /*#__PURE__*/React.createElement("div", {
19625
- style: {
19626
- display: "flex",
19627
- flexDirection: "column",
19628
- gap: "8px"
19629
- }
19630
- }, /*#__PURE__*/React.createElement("span", {
19631
- style: {
19632
- color: "#d60505",
19633
- fontWeight: "bold",
19634
- fontSize: "12px",
19635
- lineHeight: "1"
19636
- }
19637
- }, "No property created this number"), /*#__PURE__*/React.createElement("span", {
19638
- onClick: () => history.push(`/digit-ui/${userType}/${pathname.split("/")[3]}/create-application/create-property?redirectToUrl=${window.location.pathname}`, {
19639
- ...state,
19640
- ...formData
19641
- })
19642
- }, /*#__PURE__*/React.createElement("button", {
19643
- className: "submit-bar",
19644
- type: "button",
19645
- style: {
19646
- color: "white",
19647
- width: "100%",
19648
- margin: 0
19649
- }
19650
- }, t("CPT_CREATE_PROPERTY"))))))), activeProperty ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
19607
+ }, (window.location.href.includes("/tl/") ? !((formData === null || formData === void 0 ? void 0 : (_formData$tradedetils = formData.tradedetils) === null || _formData$tradedetils === void 0 ? void 0 : (_formData$tradedetils2 = _formData$tradedetils[0]) === null || _formData$tradedetils2 === void 0 ? void 0 : (_formData$tradedetils3 = _formData$tradedetils2.structureType) === null || _formData$tradedetils3 === void 0 ? void 0 : _formData$tradedetils3.code) === "MOVABLE") && (isEmpNewApplication || isEmpRenewLicense) : true) && /*#__PURE__*/React.createElement(React.Fragment, null, activeProperty ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
19651
19608
  className: "card-with-background",
19652
19609
  style: {
19653
- margin: "16px 0px",
19654
- padding: "20px",
19655
19610
  boxShadow: "none"
19656
19611
  }
19657
19612
  }, /*#__PURE__*/React.createElement(StatusTable, {