@djb25/digit-ui-module-commonpt 1.0.14 → 1.0.16

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.
@@ -43,6 +43,24 @@ const newConfig = [{
43
43
  withoutLabel: true,
44
44
  colSpan: "span 2"
45
45
  }]
46
+ }, {
47
+ head: "PT_OWNERSHIP_DETAILS",
48
+ body: [{
49
+ type: "component",
50
+ route: "institutional-owner-address",
51
+ isMandatory: false,
52
+ component: "CPTPropertyOwnerDetails",
53
+ texts: {
54
+ headerCaption: "PT_OWNERS_DETAILS",
55
+ header: "PT_OWNERS_ADDRESS",
56
+ cardText: "",
57
+ submitBarLabel: "PT_COMMON_NEXT"
58
+ },
59
+ key: "owners",
60
+ withoutLabel: true,
61
+ nextStep: "institutional-proof-of-identity",
62
+ colSpan: "span 2"
63
+ }]
46
64
  }];
47
65
 
48
66
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -6305,6 +6323,15 @@ const CreatePropertyForm = ({
6305
6323
  setMutationHappened(false);
6306
6324
  clearSuccessData();
6307
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]);
6308
6335
  if (isLoading) {
6309
6336
  return /*#__PURE__*/React.createElement(Loader, null);
6310
6337
  }
@@ -6359,12 +6386,19 @@ const CreatePropertyForm = ({
6359
6386
  key: false,
6360
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}`
6361
6388
  });
6362
- if (onSelect) {
6363
- var _data$Properties2;
6364
- onSelect("cptNewProperty", {
6365
- property: data === null || data === void 0 ? void 0 : (_data$Properties2 = data.Properties) === null || _data$Properties2 === void 0 ? void 0 : _data$Properties2[0]
6366
- });
6367
- }
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);
6368
6402
  },
6369
6403
  onError: error => {
6370
6404
  var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
@@ -6411,7 +6445,7 @@ const CreatePropertyForm = ({
6411
6445
  onSubmit: onSubmit,
6412
6446
  noBoxShadow: true,
6413
6447
  inline: true,
6414
- config: newConfig,
6448
+ config: currentConfig,
6415
6449
  label: t("SUBMIT"),
6416
6450
  isDisabled: !canSubmit,
6417
6451
  defaultValues: defaultValues,
@@ -13986,7 +14020,8 @@ const PermissionCheck = ({
13986
14020
  function PropertyDocuments({
13987
14021
  documents,
13988
14022
  svgStyles = {},
13989
- isSendBackFlow = false
14023
+ isSendBackFlow = false,
14024
+ applicationStatus
13990
14025
  }) {
13991
14026
  const {
13992
14027
  t
@@ -13995,6 +14030,29 @@ function PropertyDocuments({
13995
14030
  const tenantId = Digit.ULBService.getCurrentTenantId();
13996
14031
  const [pdfFiles, setPdfFiles] = useState({});
13997
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]);
13998
14056
  useEffect(() => {
13999
14057
  var _acc;
14000
14058
  let acc = [];
@@ -14024,6 +14082,32 @@ function PropertyDocuments({
14024
14082
  const last = parts[parts.length - 1] || "";
14025
14083
  return last.replace(/_/g, " ").replace(/\b\w/g, c => c.toUpperCase());
14026
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
+ };
14027
14111
  const renderModal = () => {
14028
14112
  if (!modalFile) return null;
14029
14113
  const isPdf = modalFile.toLowerCase().includes(".pdf") || modalFile.toLowerCase().includes("pdf");
@@ -14032,11 +14116,47 @@ function PropertyDocuments({
14032
14116
  className: "heading-m"
14033
14117
  }, "Document Preview"),
14034
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", {
14035
14155
  onClick: () => setModalFile(null),
14036
14156
  style: {
14037
14157
  cursor: "pointer",
14038
- padding: "5px",
14039
- marginTop: "-5px"
14158
+ display: "flex",
14159
+ alignItems: "center"
14040
14160
  }
14041
14161
  }, /*#__PURE__*/React.createElement("svg", {
14042
14162
  xmlns: "http://www.w3.org/2000/svg",
@@ -14049,7 +14169,7 @@ function PropertyDocuments({
14049
14169
  fill: "none"
14050
14170
  }), /*#__PURE__*/React.createElement("path", {
14051
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"
14052
- }))),
14172
+ })))),
14053
14173
  hideSubmit: true,
14054
14174
  popupStyles: {
14055
14175
  maxWidth: "80vw",
@@ -14083,7 +14203,7 @@ function PropertyDocuments({
14083
14203
  }));
14084
14204
  };
14085
14205
  const renderDocumentRow = (value, index) => {
14086
- var _pdfFiles$value$fileS, _value$originalDoc, _value$originalDoc2, _value$originalDoc3;
14206
+ var _pdfFiles$value$fileS;
14087
14207
  const fileUrl = (_pdfFiles$value$fileS = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS === void 0 ? void 0 : _pdfFiles$value$fileS.split(",")[0];
14088
14208
  const docSubType = getDocSubType(value === null || value === void 0 ? void 0 : value.documentType);
14089
14209
  const docUid = (value === null || value === void 0 ? void 0 : value.documentUid) || "";
@@ -14156,30 +14276,74 @@ function PropertyDocuments({
14156
14276
  style: {
14157
14277
  cursor: "pointer"
14158
14278
  }
14159
- }, /*#__PURE__*/React.createElement(ViewsIcon, null)), !isPhoto && /*#__PURE__*/React.createElement("label", {
14160
- style: {
14161
- display: "flex",
14162
- alignItems: "center",
14163
- gap: "8px",
14164
- fontSize: "14px",
14165
- color: "#0B0C0C",
14166
- margin: 0
14167
- }
14168
- }, /*#__PURE__*/React.createElement("input", {
14169
- 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}`,
14170
- type: "checkbox",
14171
- style: {
14172
- width: "18px",
14173
- height: "18px",
14174
- accentColor: "#F47738"
14175
- },
14176
- defaultChecked: value === null || value === void 0 ? void 0 : (_value$originalDoc3 = value.originalDoc) === null || _value$originalDoc3 === void 0 ? void 0 : _value$originalDoc3.isVerified,
14177
- onChange: e => {
14178
- if (value !== null && value !== void 0 && value.originalDoc) {
14179
- 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"
14180
14291
  }
14181
- }
14182
- }), "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
+ })())
14183
14347
  })));
14184
14348
  };
14185
14349
  return /*#__PURE__*/React.createElement("div", {
@@ -14187,7 +14351,7 @@ function PropertyDocuments({
14187
14351
  marginTop: "19px"
14188
14352
  }
14189
14353
  }, renderModal(), !isStakeholderApplication && (documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
14190
- var _document$values;
14354
+ var _document$values2;
14191
14355
  return /*#__PURE__*/React.createElement(React.Fragment, {
14192
14356
  key: index
14193
14357
  }, document !== null && document !== void 0 && document.title ? /*#__PURE__*/React.createElement(CardSubHeader, {
@@ -14213,7 +14377,7 @@ function PropertyDocuments({
14213
14377
  flexWrap: "wrap",
14214
14378
  justifyContent: "flex-start"
14215
14379
  }
14216
- }, 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) => {
14217
14381
  var _pdfFiles$value$fileS2, _value$documentType;
14218
14382
  return /*#__PURE__*/React.createElement("a", {
14219
14383
  target: "_",
@@ -14253,7 +14417,7 @@ function PropertyDocuments({
14253
14417
  }, t(value === null || value === void 0 ? void 0 : value.documentType)) : "");
14254
14418
  }) : !window.location.href.includes("citizen") && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, t("BPA_NO_DOCUMENTS_UPLOADED_LABEL")))));
14255
14419
  })), isStakeholderApplication && (documents === null || documents === void 0 ? void 0 : documents.map((document, index) => {
14256
- var _document$values2;
14420
+ var _document$values3;
14257
14421
  return /*#__PURE__*/React.createElement(React.Fragment, {
14258
14422
  key: index
14259
14423
  }, document !== null && document !== void 0 && document.title ? /*#__PURE__*/React.createElement(CardSubHeader, {
@@ -14263,7 +14427,7 @@ function PropertyDocuments({
14263
14427
  color: "#505A5F",
14264
14428
  fontSize: "24px"
14265
14429
  }
14266
- }, 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) => {
14267
14431
  var _pdfFiles$value$fileS3;
14268
14432
  return /*#__PURE__*/React.createElement("a", {
14269
14433
  target: "_",
@@ -16462,7 +16626,8 @@ function ApplicationDetailsContent({
16462
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, {
16463
16627
  documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet16 = detail.additionalDetails) === null || _detail$additionalDet16 === void 0 ? void 0 : _detail$additionalDet16.documentsWithUrl
16464
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, {
16465
- documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet18 = detail.additionalDetails) === null || _detail$additionalDet18 === void 0 ? void 0 : _detail$additionalDet18.documents
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
16466
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, {
16467
16632
  taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.taxHeadEstimatesCalculation
16468
16633
  }), (detail === null || detail === void 0 ? void 0 : detail.isWaterConnectionDetails) && /*#__PURE__*/React.createElement(WSAdditonalDetails, {
@@ -16624,7 +16789,22 @@ function ApplicationDetailsActionBar({
16624
16789
  t
16625
16790
  } = useTranslation();
16626
16791
  let user = Digit.UserService.getUser();
16627
- 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
+ }, []);
16628
16808
  if (window.location.href.includes("/obps") || window.location.href.includes("/noc")) {
16629
16809
  const userInfos = sessionStorage.getItem("Digit.citizen.userRequestObject");
16630
16810
  const userInfo = userInfos ? JSON.parse(userInfos) : {};
@@ -16672,7 +16852,8 @@ function ApplicationDetailsActionBar({
16672
16852
  }) : null, businessService === "ewst" ? modified === uuid || modified == null ? /*#__PURE__*/React.createElement(SubmitBar, {
16673
16853
  ref: menuRef,
16674
16854
  label: t("WF_TAKE_ACTION"),
16675
- onSubmit: () => setDisplayMenu(!displayMenu)
16855
+ onSubmit: () => setDisplayMenu(!displayMenu),
16856
+ disabled: isSubmitDisabled
16676
16857
  }) : /*#__PURE__*/React.createElement(CardLabel, {
16677
16858
  style: {
16678
16859
  color: "red",
@@ -16682,7 +16863,8 @@ function ApplicationDetailsActionBar({
16682
16863
  }, `${t("EW_ALERT_ANOTHER_VENDOR")}`) : /*#__PURE__*/React.createElement(SubmitBar, {
16683
16864
  ref: menuRef,
16684
16865
  label: t("WF_TAKE_ACTION"),
16685
- onSubmit: () => setDisplayMenu(!displayMenu)
16866
+ onSubmit: () => setDisplayMenu(!displayMenu),
16867
+ disabled: isSubmitDisabled
16686
16868
  })), !(workflowDetails !== null && workflowDetails !== void 0 && workflowDetails.isLoading) && !isMenuBotton && isSingleButton && !isAction && /*#__PURE__*/React.createElement(ActionBar, {
16687
16869
  style: {
16688
16870
  ...ActionBarStyle
@@ -17233,18 +17415,7 @@ const PTSearchFields = {
17233
17415
  placeHolder: "PT_PROPERTY_UNIQUE_ID_PLACEHOLDER",
17234
17416
  validation: {
17235
17417
  pattern: {
17236
- value: "[A-Za-z]{2}\-[A-Za-z]{2}\-[0-9]{4}\-[0-9]{4}\-[0-9]{2}\-[0-9]{2}\-[0-9]{6}|[A-Za-z]{2}\-[A-Za-z]{2}\-[0-9]{4}\-[0-9]{2}\-[0-9]{2}\-[0-9]{6}",
17237
- message: "ERR_INVALID_PROPERTY_ID"
17238
- }
17239
- }
17240
- },
17241
- oldPropertyId: {
17242
- type: "text",
17243
- label: "PT_EXISTING_PROPERTY_ID",
17244
- placeholder: "PT_EXISTING_PROPERTY_ID_PLACEHOLDER",
17245
- validation: {
17246
- pattern: {
17247
- value: "[A-Za-z]{2}\-[A-Za-z]{2}\-[0-9]{4}\-[0-9]{4}\-[0-9]{2}\-[0-9]{2}\-[0-9]{6}|[A-Za-z]{2}\-[A-Za-z]{2}\-[0-9]{4}\-[0-9]{2}\-[0-9]{2}\-[0-9]{6}",
17418
+ value: "[A-Za-z]{2}-[A-Za-z]{2}-[0-9]{4}-[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{6}|[A-Za-z]{2}-[A-Za-z]{2}-[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{6}",
17248
17419
  message: "ERR_INVALID_PROPERTY_ID"
17249
17420
  }
17250
17421
  }
@@ -17338,7 +17509,7 @@ const Search = ({
17338
17509
  const [searchBy, setSearchBy] = useState("searchId");
17339
17510
  const [showToast, setShowToast] = useState(null);
17340
17511
  const search = useLocation().search;
17341
- const redirectToUrl = new URLSearchParams(search).get('redirectToUrl');
17512
+ const redirectToUrl = new URLSearchParams(search).get("redirectToUrl");
17342
17513
  const SearchComponent = memo(Digit.ComponentRegistryService.getComponent("CPTPropertySearchForm"));
17343
17514
  const SearchResultComponent = memo(Digit.ComponentRegistryService.getComponent("CPTPropertySearchResults"));
17344
17515
  const {
@@ -17418,7 +17589,7 @@ const EmployeeApp = ({
17418
17589
  const urltenantId = new URLSearchParams(useLocation().search).get("tenantId");
17419
17590
  const getBreadcrumbLabel = () => {
17420
17591
  const pathname = location.pathname;
17421
- if (pathname.includes("/commonpt/search")) return "SEARCH_PROPERTY";else if (pathname.includes("/view-property")) return "PT_PROPERTY_INFORMATION";
17592
+ if (pathname.includes("/commonpt/new-application")) return "PT_CREATE_PROPERTY";else if (pathname.includes("/commonpt/search")) return "SEARCH_PROPERTY";else if (pathname.includes("/view-property")) return "PT_PROPERTY_INFORMATION";
17422
17593
  return "ES_COMMON_INBOX";
17423
17594
  };
17424
17595
  const breadcrumbs = [{
@@ -17448,7 +17619,9 @@ const EmployeeApp = ({
17448
17619
  })
17449
17620
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
17450
17621
  path: `${path}/new-application`,
17451
- component: NewApplication
17622
+ component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
17623
+ layoutClass: "action"
17624
+ }, /*#__PURE__*/React.createElement(NewApplication, props))
17452
17625
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
17453
17626
  path: `${path}/search`,
17454
17627
  component: Search
@@ -17914,11 +18087,19 @@ const PropertyOwnerDetails = ({
17914
18087
  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) || "",
17915
18088
  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),
17916
18089
  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) || "",
17917
- 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) || "",
17918
- 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),
18090
+ 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",
18091
+ 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) || {
18092
+ code: "FATHER",
18093
+ name: "Father",
18094
+ i18nKey: "PT_RELATION_FATHER"
18095
+ },
17919
18096
  ownershipCategory: ownershipCategory,
17920
- 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),
17921
- 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) || "",
18097
+ 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) || {
18098
+ code: "NONE",
18099
+ name: "None",
18100
+ i18nKey: "PT_OWNERSHIP_CATEGORY_NONE"
18101
+ },
18102
+ 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",
17922
18103
  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) || "",
17923
18104
  isCoresAddr: false
17924
18105
  }]);
@@ -18200,7 +18381,11 @@ const PropertyOwnerDetails = ({
18200
18381
  })
18201
18382
  }))), (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, {
18202
18383
  style: errorStyle
18203
- }, 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", {
18384
+ }, errors === null || errors === void 0 ? void 0 : (_errors6 = errors["gender" + index]) === null || _errors6 === void 0 ? void 0 : _errors6.message), /*#__PURE__*/React.createElement("div", {
18385
+ style: {
18386
+ display: "none"
18387
+ }
18388
+ }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("PT_FORM3_GUARDIAN_NAME")}*`), /*#__PURE__*/React.createElement("div", {
18204
18389
  className: "form-field"
18205
18390
  }, /*#__PURE__*/React.createElement(Controller, {
18206
18391
  key: "fatherOrHusbandName" + index,
@@ -18306,7 +18491,7 @@ const PropertyOwnerDetails = ({
18306
18491
  }
18307
18492
  },
18308
18493
  value: ownerDetails === null || ownerDetails === void 0 ? void 0 : (_ownerDetails$index3 = ownerDetails[index]) === null || _ownerDetails$index3 === void 0 ? void 0 : _ownerDetails$index3.permanentAddress
18309
- }))))));
18494
+ })))))));
18310
18495
  }), ismultiple ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
18311
18496
  style: {
18312
18497
  display: "flex",
@@ -18322,11 +18507,19 @@ const PropertyOwnerDetails = ({
18322
18507
  name: "",
18323
18508
  gender: "",
18324
18509
  mobileNumber: "",
18325
- fatherOrHusbandName: "",
18326
- relationship: "",
18510
+ fatherOrHusbandName: "NA",
18511
+ relationship: {
18512
+ code: "FATHER",
18513
+ name: "Father",
18514
+ i18nKey: "PT_RELATION_FATHER"
18515
+ },
18327
18516
  ownershipCategory: ownershipCategory,
18328
- ownerType: "",
18329
- permanentAddress: "",
18517
+ ownerType: {
18518
+ code: "NONE",
18519
+ name: "None",
18520
+ i18nKey: "PT_OWNERSHIP_CATEGORY_NONE"
18521
+ },
18522
+ permanentAddress: "NA",
18330
18523
  email: "",
18331
18524
  isCoresAddr: false
18332
18525
  }])
@@ -18526,12 +18719,12 @@ const PropertyWaterConnection = ({
18526
18719
  if (lastErrorState.current !== hasErrors) {
18527
18720
  lastErrorState.current = hasErrors;
18528
18721
  if (hasErrors) {
18529
- setError(config.key, {
18722
+ if (setError) setError(config.key, {
18530
18723
  type: "custom",
18531
18724
  message: "Validation failed"
18532
18725
  });
18533
18726
  } else {
18534
- clearErrors(config.key);
18727
+ if (clearErrors) clearErrors(config.key);
18535
18728
  }
18536
18729
  }
18537
18730
  }, [errors, config.key, setError, clearErrors]);
@@ -18827,14 +19020,16 @@ const SearchPTID = ({
18827
19020
  tenantId: tenantId,
18828
19021
  selected: formValue === null || formValue === void 0 ? void 0 : formValue[key]
18829
19022
  }, field.customCompProps))
19023
+ }) : field !== null && field !== void 0 && field.componentInFront ? /*#__PURE__*/React.createElement(MobileNumber, {
19024
+ name: key,
19025
+ inputRef: register({
19026
+ value: getValues(key),
19027
+ shouldUnregister: true,
19028
+ ...validation
19029
+ })
18830
19030
  }) : /*#__PURE__*/React.createElement("div", {
18831
19031
  className: "field-container"
18832
- }, field !== null && field !== void 0 && field.componentInFront ? /*#__PURE__*/React.createElement("span", {
18833
- className: "employee-card-input employee-card-input--front",
18834
- style: {
18835
- flex: "none"
18836
- }
18837
- }, field === null || field === void 0 ? void 0 : field.componentInFront) : null, /*#__PURE__*/React.createElement(TextInput, {
19032
+ }, /*#__PURE__*/React.createElement(TextInput, {
18838
19033
  name: key,
18839
19034
  type: field === null || field === void 0 ? void 0 : field.type,
18840
19035
  inputRef: register({
@@ -18848,9 +19043,10 @@ const SearchPTID = ({
18848
19043
  style: {
18849
19044
  marginTop: "16px",
18850
19045
  display: "flex",
18851
- justifyContent: "space-between",
19046
+ justifyContent: "flex-end",
18852
19047
  alignItems: "center",
18853
- width: "100%"
19048
+ width: "100%",
19049
+ gap: "16px"
18854
19050
  }
18855
19051
  }, /*#__PURE__*/React.createElement("div", {
18856
19052
  className: "pt-search-action-reset generic-button clear-search",
@@ -19129,7 +19325,7 @@ const PropertyDetails = ({
19129
19325
  userType,
19130
19326
  formData
19131
19327
  }) => {
19132
- 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;
19328
+ 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;
19133
19329
  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();
19134
19330
  if (window.location.href.includes("/tl/tradelicence/edit-application/") || window.location.href.includes("/renew-trade/") && JSON.parse(sessionStorage.getItem("EditFormData"))) {
19135
19331
  let EditformData = JSON.parse(sessionStorage.getItem("EditFormData"));
@@ -19165,31 +19361,31 @@ const PropertyDetails = ({
19165
19361
  };
19166
19362
  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() : [];
19167
19363
  let propAddArr = [];
19168
- if (propertyDetails && propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.Properties.length) {
19169
- 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;
19170
- 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) {
19171
- var _propertyDetails$Prop7, _propertyDetails$Prop8;
19172
- 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);
19364
+ if (propertyDetails && propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop5 = propertyDetails.Properties) !== null && _propertyDetails$Prop5 !== void 0 && _propertyDetails$Prop5.length) {
19365
+ 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;
19366
+ 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) {
19367
+ var _propertyDetails$Prop8, _propertyDetails$Prop9;
19368
+ 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);
19173
19369
  }
19174
- 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) {
19175
- var _propertyDetails$Prop11, _propertyDetails$Prop12, _propertyDetails$Prop13, _propertyDetails$Prop14;
19176
- 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));
19370
+ 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) {
19371
+ var _propertyDetails$Prop12, _propertyDetails$Prop13, _propertyDetails$Prop14, _propertyDetails$Prop15;
19372
+ 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));
19177
19373
  }
19178
- 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) {
19179
- var _propertyDetails$Prop17, _propertyDetails$Prop18;
19180
- 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);
19374
+ 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) {
19375
+ var _propertyDetails$Prop18, _propertyDetails$Prop19;
19376
+ 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);
19181
19377
  }
19182
- 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) {
19183
- var _propertyDetails$Prop22, _propertyDetails$Prop23, _propertyDetails$Prop24, _propertyDetails$Prop25;
19184
- 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)));
19378
+ 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) {
19379
+ var _propertyDetails$Prop23, _propertyDetails$Prop24, _propertyDetails$Prop25, _propertyDetails$Prop26;
19380
+ 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)));
19185
19381
  }
19186
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop26 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop26 !== void 0 && _propertyDetails$Prop26.tenantId) {
19187
- var _propertyDetails$Prop27;
19188
- 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)));
19382
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop27 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop27 !== void 0 && _propertyDetails$Prop27.tenantId) {
19383
+ var _propertyDetails$Prop28;
19384
+ 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)));
19189
19385
  }
19190
- 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) {
19191
- var _propertyDetails$Prop30, _propertyDetails$Prop31;
19192
- 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);
19386
+ 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) {
19387
+ var _propertyDetails$Prop31, _propertyDetails$Prop32;
19388
+ 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);
19193
19389
  }
19194
19390
  }
19195
19391
  if (isLoading) {
@@ -19208,10 +19404,10 @@ const PropertyDetails = ({
19208
19404
  config: config,
19209
19405
  onSelect: goNext,
19210
19406
  onSkip: onSkip
19211
- }, 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, {
19407
+ }, 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, {
19212
19408
  className: "border-none",
19213
19409
  label: t(`PROPERTY_ID`),
19214
- text: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop32 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop32 === void 0 ? void 0 : _propertyDetails$Prop32.propertyId
19410
+ text: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop34 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop34 === void 0 ? void 0 : _propertyDetails$Prop34.propertyId
19215
19411
  }), /*#__PURE__*/React.createElement(Row, {
19216
19412
  className: "border-none",
19217
19413
  label: t(`OWNER_NAME`),
@@ -19224,7 +19420,7 @@ const PropertyDetails = ({
19224
19420
  label: t(`PROPERTY_ADDRESS`),
19225
19421
  text: propAddArr.join(', '),
19226
19422
  privacy: {
19227
- 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,
19423
+ 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,
19228
19424
  fieldName: ["doorNo", "street", "landmark"],
19229
19425
  model: "Property",
19230
19426
  showValue: true,
@@ -19232,8 +19428,8 @@ const PropertyDetails = ({
19232
19428
  serviceName: "/property-services/property/_search",
19233
19429
  requestBody: {},
19234
19430
  requestParam: {
19235
- tenantId: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop37 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop37 === void 0 ? void 0 : _propertyDetails$Prop37.tenantId,
19236
- propertyIds: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop38 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop38 === void 0 ? void 0 : _propertyDetails$Prop38.propertyId
19431
+ tenantId: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop39 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop39 === void 0 ? void 0 : _propertyDetails$Prop39.tenantId,
19432
+ propertyIds: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop40 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop40 === void 0 ? void 0 : _propertyDetails$Prop40.propertyId
19237
19433
  },
19238
19434
  jsonPath: "Properties[0].address.street",
19239
19435
  d: res => {
@@ -19246,13 +19442,13 @@ const PropertyDetails = ({
19246
19442
  }), /*#__PURE__*/React.createElement(Row, {
19247
19443
  className: "border-none",
19248
19444
  label: t(`PT_MUTATION_STATUS`),
19249
- text: t(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop39 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop39 === void 0 ? void 0 : _propertyDetails$Prop39.status)
19445
+ text: t(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop41 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop41 === void 0 ? void 0 : _propertyDetails$Prop41.status)
19250
19446
  }), /*#__PURE__*/React.createElement("div", {
19251
19447
  style: {
19252
19448
  textAlign: "left"
19253
19449
  }
19254
19450
  }, /*#__PURE__*/React.createElement(Link, {
19255
- 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}`
19451
+ 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}`
19256
19452
  }, /*#__PURE__*/React.createElement(LinkButton, {
19257
19453
  style: {
19258
19454
  textAlign: "left"