@djb25/digit-ui-module-commonpt 1.0.11 → 1.0.12

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, 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, InfoBannerIcon, EditIcon, CheckPoint, ConnectingCheckPoints, ActionBar, Menu, ButtonSelector, HomeIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, CollapsibleCardPage, Label, AddressDetails, DeleteIcon, MobileNumber, RadioOrSelect, TextArea, SearchForm, SearchField, DetailsCard, TickMark, PropertyHouse, EmployeeModuleCard, CitizenHomeCard, PTIcon } from '@djb25/digit-ui-react-components';
1
+ import { Loader, VerticalTimeline, FormComposer, Toast, Card, CardText, StatusTable, Row, SubmitBar, Banner, Header, ResponseComposer, Table, Modal, KeyNote, Dropdown, 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, InfoBannerIcon, EditIcon, CheckPoint, ConnectingCheckPoints, ActionBar, Menu, ButtonSelector, HomeIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, CollapsibleCardPage, AddressDetails, DeleteIcon, MobileNumber, RadioOrSelect, TextArea, SearchForm, SearchField, DetailsCard, TickMark, Label, PropertyHouse, EmployeeModuleCard, CitizenHomeCard, PTIcon } from '@djb25/digit-ui-react-components';
2
2
  import React, { useState, useEffect, 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';
@@ -9238,9 +9238,7 @@ const configWSApproverApplication = ({
9238
9238
  error
9239
9239
  }) => {
9240
9240
  var _action$action;
9241
- let checkCondtions = true;
9242
- if (action !== null && action !== void 0 && (_action$action = action.action) !== null && _action$action !== void 0 && _action$action.includes("SEND_BACK") || (action === null || action === void 0 ? void 0 : action.action) == "APPROVE_FOR_CONNECTION") checkCondtions = false;
9243
- if (action.isTerminateState) checkCondtions = false;
9241
+ if (action !== null && action !== void 0 && (_action$action = action.action) !== null && _action$action !== void 0 && _action$action.includes("SEND_BACK") || (action === null || action === void 0 ? void 0 : action.action) == "APPROVE_FOR_CONNECTION") ;
9244
9242
  return {
9245
9243
  label: {
9246
9244
  heading: `WF_${action === null || action === void 0 ? void 0 : action.action}_APPLICATION`,
@@ -9249,18 +9247,6 @@ const configWSApproverApplication = ({
9249
9247
  },
9250
9248
  form: [{
9251
9249
  body: [{
9252
- label: !checkCondtions ? null : t("WF_ASSIGNEE_NAME_LABEL"),
9253
- placeholder: !checkCondtions ? null : t("WF_ASSIGNEE_NAME_PLACEHOLDER"),
9254
- type: "dropdown",
9255
- populators: !checkCondtions ? null : /*#__PURE__*/React.createElement(Dropdown, {
9256
- option: approvers,
9257
- autoComplete: "off",
9258
- optionKey: "name",
9259
- id: "fieldInspector",
9260
- select: setSelectedApprover,
9261
- selected: selectedApprover
9262
- })
9263
- }, {
9264
9250
  label: t("WF_COMMON_COMMENTS"),
9265
9251
  type: "textarea",
9266
9252
  populators: {
@@ -9300,10 +9286,8 @@ const configWSDisConnectApplication = ({
9300
9286
  error
9301
9287
  }) => {
9302
9288
  var _action$action;
9303
- let checkCondtions = true,
9304
- isDatePickerDisplay = false;
9305
- if (action !== null && action !== void 0 && (_action$action = action.action) !== null && _action$action !== void 0 && _action$action.includes("SEND_BACK") || (action === null || action === void 0 ? void 0 : action.action) == "APPROVE_FOR_DISCONNECTION" || (action === null || action === void 0 ? void 0 : action.action) == "RESUBMIT_APPLICATION") checkCondtions = false;
9306
- if (action.isTerminateState) checkCondtions = false;
9289
+ let isDatePickerDisplay = false;
9290
+ if (action !== null && action !== void 0 && (_action$action = action.action) !== null && _action$action !== void 0 && _action$action.includes("SEND_BACK") || (action === null || action === void 0 ? void 0 : action.action) == "APPROVE_FOR_DISCONNECTION" || (action === null || action === void 0 ? void 0 : action.action) == "RESUBMIT_APPLICATION") ;
9307
9291
  if ((action === null || action === void 0 ? void 0 : action.action) == "EXECUTE_DISCONNECTION" || (action === null || action === void 0 ? void 0 : action.action) == "DISCONNECTION_EXECUTED") isDatePickerDisplay = true;
9308
9292
  return {
9309
9293
  label: {
@@ -9312,19 +9296,7 @@ const configWSDisConnectApplication = ({
9312
9296
  cancel: "CS_COMMON_CANCEL"
9313
9297
  },
9314
9298
  form: [{
9315
- body: [{
9316
- label: !checkCondtions ? null : t("WF_ASSIGNEE_NAME_LABEL"),
9317
- placeholder: !checkCondtions ? null : t("WF_ASSIGNEE_NAME_PLACEHOLDER"),
9318
- type: "dropdown",
9319
- populators: !checkCondtions ? null : /*#__PURE__*/React.createElement(Dropdown, {
9320
- option: approvers,
9321
- autoComplete: "off",
9322
- optionKey: "name",
9323
- id: "fieldInspector",
9324
- select: setSelectedApprover,
9325
- selected: selectedApprover
9326
- })
9327
- }, isDatePickerDisplay && {
9299
+ body: [isDatePickerDisplay && {
9328
9300
  label: t("ES_FSM_ACTION_SERVICE_DATE"),
9329
9301
  isMandatory: isDatePickerDisplay ? true : false,
9330
9302
  type: "custom",
@@ -14029,7 +14001,7 @@ function PropertyDocuments({
14029
14001
  }));
14030
14002
  };
14031
14003
  const renderDocumentRow = (value, index) => {
14032
- var _pdfFiles$value$fileS;
14004
+ var _pdfFiles$value$fileS, _value$originalDoc, _value$originalDoc$ad;
14033
14005
  const fileUrl = (_pdfFiles$value$fileS = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS === void 0 ? void 0 : _pdfFiles$value$fileS.split(",")[0];
14034
14006
  const docSubType = getDocSubType(value === null || value === void 0 ? void 0 : value.documentType);
14035
14007
  const docUid = (value === null || value === void 0 ? void 0 : value.documentUid) || "";
@@ -14117,6 +14089,15 @@ function PropertyDocuments({
14117
14089
  width: "18px",
14118
14090
  height: "18px",
14119
14091
  accentColor: "#F47738"
14092
+ },
14093
+ defaultChecked: value === null || value === void 0 ? void 0 : (_value$originalDoc = value.originalDoc) === null || _value$originalDoc === void 0 ? void 0 : (_value$originalDoc$ad = _value$originalDoc.additionalDetails) === null || _value$originalDoc$ad === void 0 ? void 0 : _value$originalDoc$ad.isDocumentVerified,
14094
+ onChange: e => {
14095
+ if (value !== null && value !== void 0 && value.originalDoc) {
14096
+ if (!value.originalDoc.additionalDetails) {
14097
+ value.originalDoc.additionalDetails = {};
14098
+ }
14099
+ value.originalDoc.additionalDetails.isDocumentVerified = e.target.checked;
14100
+ }
14120
14101
  }
14121
14102
  }), "Check Verified"))
14122
14103
  })));
@@ -17773,390 +17754,133 @@ const PropertyAssemblyDetails = ({
17773
17754
  }, errors === null || errors === void 0 ? void 0 : (_errors$usageCategory2 = errors.usageCategoryMajor) === null || _errors$usageCategory2 === void 0 ? void 0 : _errors$usageCategory2.message));
17774
17755
  };
17775
17756
 
17776
- const getAddress = (address, t) => {
17777
- return `${address !== null && address !== void 0 && address.doorNo ? `${address === null || address === void 0 ? void 0 : address.doorNo}, ` : ""} ${address !== null && address !== void 0 && address.street ? `${address === null || address === void 0 ? void 0 : address.street}, ` : ""}${address !== null && address !== void 0 && address.landmark ? `${address === null || address === void 0 ? void 0 : address.landmark}, ` : ""}${t(Digit.Utils.pt.getMohallaLocale(address === null || address === void 0 ? void 0 : address.locality.code, address === null || address === void 0 ? void 0 : address.tenantId))}, ${t(Digit.Utils.pt.getCityLocale(address === null || address === void 0 ? void 0 : address.tenantId))}${address !== null && address !== void 0 && address.pincode && t(address === null || address === void 0 ? void 0 : address.pincode) ? `, ${address.pincode}` : " "}`;
17778
- };
17779
- const PropertySearchNSummary = ({
17780
- config,
17757
+ const PropertyLocationDetails = ({
17758
+ address,
17759
+ actionCancelOnSubmit,
17760
+ isEdit,
17781
17761
  onSelect,
17782
- userType,
17783
- formData,
17784
- setError,
17785
- formState,
17786
- clearErrors
17762
+ config,
17763
+ hideZRO,
17764
+ formData: formDataProp,
17765
+ ...props
17787
17766
  }) => {
17788
- var _formData$cptId, _formData$tradedetils, _formData$tradedetils2, _formData$tradedetils3, _propertyDetails$Prop3, _propertyDetails$Prop4, _propertyDetails$Prop5, _propertyDetails$Prop6, _propertyDetails$Prop7, _propertyDetails$Prop8;
17767
+ var _formDataProp$cpt2;
17789
17768
  const {
17790
17769
  t
17791
17770
  } = useTranslation();
17792
- const history = useHistory();
17793
- let {
17794
- pathname,
17795
- state
17796
- } = useLocation();
17797
- state = state && (typeof state === "string" || state instanceof String) ? JSON.parse(state) : state;
17798
- const isEditScreen = pathname.includes("/modify-application/");
17799
- const tenantId = Digit.ULBService.getCurrentTenantId();
17800
- const isEmpNewApplication = window.location.href.includes("/employee/tl/new-application");
17801
- const isEmpRenewLicense = window.location.href.includes("/employee/tl/renew-application-details") || window.location.href.includes("/employee/tl/edit-application-details");
17802
- const search = useLocation().search;
17803
- const urlPropertyId = new URLSearchParams(search).get("propertyId");
17804
- const [propertyId, setPropertyId] = useState((formData === null || formData === void 0 ? void 0 : (_formData$cptId = formData.cptId) === null || _formData$cptId === void 0 ? void 0 : _formData$cptId.id) || (urlPropertyId !== "null" ? urlPropertyId : "") || "");
17805
- const [searchPropertyId, setSearchPropertyId] = useState(urlPropertyId !== "null" ? urlPropertyId : "");
17806
17771
  const [showToast, setShowToast] = useState(null);
17807
- const isMobile = window.Digit.Utils.browser.isMobile();
17808
- const serachParams = window.location.href.includes("?") ? window.location.href.substring(window.location.href.indexOf("?") + 1, window.location.href.length) : "";
17809
- const {
17810
- isLoading,
17811
- isError,
17812
- error,
17813
- data: propertyDetails
17814
- } = Digit.Hooks.pt.usePropertySearch({
17815
- filters: {
17816
- propertyIds: searchPropertyId
17817
- },
17818
- tenantId: tenantId
17819
- }, {
17820
- filters: {
17821
- propertyIds: searchPropertyId
17822
- },
17823
- tenantId: tenantId,
17824
- enabled: searchPropertyId ? true : false,
17825
- privacy: Digit.Utils.getPrivacyObject()
17772
+ const [formData, setFormData] = useState({
17773
+ addressType: (address === null || address === void 0 ? void 0 : address.addressType) || "",
17774
+ pincode: (address === null || address === void 0 ? void 0 : address.pinCode) || "",
17775
+ city: (address === null || address === void 0 ? void 0 : address.city) || "",
17776
+ locality: (address === null || address === void 0 ? void 0 : address.locality) || "",
17777
+ streetName: (address === null || address === void 0 ? void 0 : address.streetName) || "",
17778
+ houseNo: (address === null || address === void 0 ? void 0 : address.houseNumber) || "",
17779
+ houseName: (address === null || address === void 0 ? void 0 : address.houseName) || "",
17780
+ landmark: (address === null || address === void 0 ? void 0 : address.landmark) || "",
17781
+ addressLine1: (address === null || address === void 0 ? void 0 : address.address) || "",
17782
+ addressLine2: (address === null || address === void 0 ? void 0 : address.address2) || "",
17783
+ latitude: (address === null || address === void 0 ? void 0 : address.latitude) || "",
17784
+ longitude: (address === null || address === void 0 ? void 0 : address.longitude) || "",
17785
+ assembly: (address === null || address === void 0 ? void 0 : address.assembly) || "",
17786
+ block: (address === null || address === void 0 ? void 0 : address.block) || "",
17787
+ zone: (address === null || address === void 0 ? void 0 : address.zone) || "",
17788
+ zroLocation: (address === null || address === void 0 ? void 0 : address.zroLocation) || "",
17789
+ subLocality: (address === null || address === void 0 ? void 0 : address.subLocality) || "",
17790
+ actualAssembly: (address === null || address === void 0 ? void 0 : address.actualAssembly) || "",
17791
+ actualWard: (address === null || address === void 0 ? void 0 : address.actualWard) || "",
17792
+ actualZone: (address === null || address === void 0 ? void 0 : address.actualZone) || ""
17826
17793
  });
17794
+ const isPropertyFound = window.location.href.includes("ws/old-application");
17827
17795
  useEffect(() => {
17828
- if (propertyId && (window.location.href.includes("/renew-application-details/") || window.location.href.includes("/edit-application-details/"))) setSearchPropertyId(propertyId);
17829
- }, [propertyId]);
17830
- useEffect(() => {
17831
- var _propertyDetails$Prop;
17832
- if (isLoading == false && error && error == true || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop = propertyDetails.Properties) === null || _propertyDetails$Prop === void 0 ? void 0 : _propertyDetails$Prop.length) == 0) {
17833
- setShowToast({
17834
- error: true,
17835
- label: "PT_ENTER_VALID_PROPERTY_ID"
17796
+ if (props.register) {
17797
+ props.register({
17798
+ name: "cpt"
17799
+ });
17800
+ props.register({
17801
+ name: "cptId"
17836
17802
  });
17837
17803
  }
17838
- }, [error, propertyDetails]);
17804
+ }, [props.register]);
17839
17805
  useEffect(() => {
17840
- onSelect("cpt", {
17841
- details: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties[0]
17842
- });
17843
- sessionStorage.setItem("Digit_FSM_PT", JSON.stringify(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties[0]));
17844
- localStorage.setItem("pgrProperty", JSON.stringify(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties[0]));
17845
- }, [propertyDetails, pathname]);
17846
- const searchProperty = () => {
17847
- if (!propertyId) {
17848
- setShowToast({
17849
- error: true,
17850
- label: "PT_ENTER_PROPERTY_ID_AND_SEARCH"
17806
+ var _formDataProp$cpt;
17807
+ if (formDataProp !== null && formDataProp !== void 0 && (_formDataProp$cpt = formDataProp.cpt) !== null && _formDataProp$cpt !== void 0 && _formDataProp$cpt.details) {
17808
+ var _addressData$locality, _addressData$geoLocat, _addressData$geoLocat2, _addressData$locality2, _addressData$geoLocat3, _addressData$geoLocat4, _addressData$locality3, _addressData$addition, _addressData$addition2, _addressData$addition3, _addressData$addition4, _addressData$addition5, _addressData$addition6, _addressData$addition7, _addressData$addition8, _addressData$addition9, _addressData$addition0, _addressData$addition1, _addressData$addition10, _addressData$addition11;
17809
+ const details = formDataProp.cpt.details;
17810
+ const addressData = details.address || {};
17811
+ const additionalDetails = details.additionalDetails || {};
17812
+ const localityCode = ((_addressData$locality = addressData.locality) === null || _addressData$locality === void 0 ? void 0 : _addressData$locality.code) || addressData.locality || "";
17813
+ const lat = (_addressData$geoLocat = addressData.geoLocation) !== null && _addressData$geoLocat !== void 0 && _addressData$geoLocat.latitude && ((_addressData$geoLocat2 = addressData.geoLocation) === null || _addressData$geoLocat2 === void 0 ? void 0 : _addressData$geoLocat2.latitude) !== 0 ? addressData.geoLocation.latitude : ((_addressData$locality2 = addressData.locality) === null || _addressData$locality2 === void 0 ? void 0 : _addressData$locality2.latitude) || addressData.latitude || "";
17814
+ const lng = (_addressData$geoLocat3 = addressData.geoLocation) !== null && _addressData$geoLocat3 !== void 0 && _addressData$geoLocat3.longitude && ((_addressData$geoLocat4 = addressData.geoLocation) === null || _addressData$geoLocat4 === void 0 ? void 0 : _addressData$geoLocat4.longitude) !== 0 ? addressData.geoLocation.longitude : ((_addressData$locality3 = addressData.locality) === null || _addressData$locality3 === void 0 ? void 0 : _addressData$locality3.longitude) || addressData.longitude || "";
17815
+ const zroCode = addressData.zroLocation || additionalDetails.zroLocation || ((_addressData$addition = addressData.additionalDetails) === null || _addressData$addition === void 0 ? void 0 : _addressData$addition.zroLocation) || "";
17816
+ const zroValue = zroCode ? {
17817
+ code: zroCode,
17818
+ name: zroCode,
17819
+ i18nKey: zroCode
17820
+ } : "";
17821
+ setFormData({
17822
+ pincode: addressData.pincode || "",
17823
+ city: addressData.city || "",
17824
+ locality: localityCode,
17825
+ streetName: addressData.street || "",
17826
+ houseNo: addressData.houseNo || "",
17827
+ landmark: addressData.landmark || "",
17828
+ latitude: lat,
17829
+ longitude: lng,
17830
+ assembly: additionalDetails.assembly || ((_addressData$addition2 = addressData.additionalDetails) === null || _addressData$addition2 === void 0 ? void 0 : _addressData$addition2.assembly) || "",
17831
+ block: additionalDetails.block || ((_addressData$addition3 = addressData.additionalDetails) === null || _addressData$addition3 === void 0 ? void 0 : _addressData$addition3.block) || "",
17832
+ zone: additionalDetails.zone || ((_addressData$addition4 = addressData.additionalDetails) === null || _addressData$addition4 === void 0 ? void 0 : _addressData$addition4.zone) || "",
17833
+ zroLocation: zroCode,
17834
+ zro: zroValue,
17835
+ subLocality: addressData.subLocality || "",
17836
+ actualAssembly: addressData.actualAssembly || additionalDetails.actualAssembly || ((_addressData$addition5 = addressData.additionalDetails) === null || _addressData$addition5 === void 0 ? void 0 : _addressData$addition5.actualAssembly) || "",
17837
+ actualWard: addressData.actualWard || additionalDetails.actualWard || ((_addressData$addition6 = addressData.additionalDetails) === null || _addressData$addition6 === void 0 ? void 0 : _addressData$addition6.actualWard) || "",
17838
+ actualZone: addressData.actualZone || additionalDetails.actualZone || ((_addressData$addition7 = addressData.additionalDetails) === null || _addressData$addition7 === void 0 ? void 0 : _addressData$addition7.actualZone) || "",
17839
+ address: {
17840
+ ...addressData,
17841
+ city: addressData.city || "",
17842
+ pincode: addressData.pincode || "",
17843
+ locality: localityCode,
17844
+ streetName: addressData.street || "",
17845
+ houseNo: addressData.houseNo || "",
17846
+ addressLine1: addressData.street || "",
17847
+ latitude: lat,
17848
+ longitude: lng,
17849
+ zroLocation: zroCode,
17850
+ zro: zroValue,
17851
+ assembly: additionalDetails.assembly || ((_addressData$addition8 = addressData.additionalDetails) === null || _addressData$addition8 === void 0 ? void 0 : _addressData$addition8.assembly) || "",
17852
+ block: additionalDetails.block || ((_addressData$addition9 = addressData.additionalDetails) === null || _addressData$addition9 === void 0 ? void 0 : _addressData$addition9.block) || "",
17853
+ zone: additionalDetails.zone || ((_addressData$addition0 = addressData.additionalDetails) === null || _addressData$addition0 === void 0 ? void 0 : _addressData$addition0.zone) || "",
17854
+ subLocality: addressData.subLocality || "",
17855
+ actualWard: addressData.actualWard || additionalDetails.actualWard || ((_addressData$addition1 = addressData.additionalDetails) === null || _addressData$addition1 === void 0 ? void 0 : _addressData$addition1.actualWard) || "",
17856
+ actualZone: addressData.actualZone || additionalDetails.actualZone || ((_addressData$addition10 = addressData.additionalDetails) === null || _addressData$addition10 === void 0 ? void 0 : _addressData$addition10.actualZone) || "",
17857
+ actualAssembly: addressData.actualAssembly || additionalDetails.actualAssembly || ((_addressData$addition11 = addressData.additionalDetails) === null || _addressData$addition11 === void 0 ? void 0 : _addressData$addition11.actualAssembly) || ""
17858
+ }
17851
17859
  });
17852
- }
17853
- setSearchPropertyId(propertyId);
17854
- if (window.location.pathname.includes("/tl/new-application")) {
17855
- history.push(`/digit-ui/employee/tl/new-application?propertyId=${propertyId}`);
17856
- const scrollConst = 1600;
17857
- setTimeout(() => window.scrollTo(0, scrollConst), 0);
17858
- } else if (window.location.pathname.includes("/ws/new-application")) history.push(`/digit-ui/employee/ws/new-application?propertyId=${propertyId}`);
17859
- };
17860
- const clearSearch = () => {
17861
- setPropertyId("");
17862
- setSearchPropertyId("");
17863
- onSelect(config === null || config === void 0 ? void 0 : config.key, {
17864
- id: ""
17865
- });
17866
- onSelect("cpt", null);
17867
- };
17868
- if (isEditScreen) {
17869
- return /*#__PURE__*/React.createElement(React.Fragment, null);
17870
- }
17871
- let propertyAddress = "";
17872
- if (propertyDetails && propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.Properties.length) {
17873
- var _propertyDetails$Prop2;
17874
- propertyAddress = getAddress(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop2 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop2 === void 0 ? void 0 : _propertyDetails$Prop2.address, t);
17875
- }
17876
- const getInputStyles = () => {
17877
- if (window.location.href.includes("/ws/")) {
17878
- return {
17879
- fontWeight: "700"
17880
- };
17881
- } else return {};
17882
- };
17883
- const getOwnerNames = propertyData => {
17884
- var _propertyData$owners, _getActiveOwners$sort, _getActiveOwners$sort2;
17885
- 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);
17886
- const getOwnersList = (_getActiveOwners$sort = getActiveOwners.sort((a, b) => {
17887
- var _a$additionalDetails, _b$additionalDetails;
17888
- return (a === null || a === void 0 ? void 0 : (_a$additionalDetails = a.additionalDetails) === null || _a$additionalDetails === void 0 ? void 0 : _a$additionalDetails.ownerSequence) - (b === null || b === void 0 ? void 0 : (_b$additionalDetails = b.additionalDetails) === null || _b$additionalDetails === void 0 ? void 0 : _b$additionalDetails.ownerSequence);
17889
- })) === null || _getActiveOwners$sort === void 0 ? void 0 : (_getActiveOwners$sort2 = _getActiveOwners$sort.map(activeOwner => activeOwner === null || activeOwner === void 0 ? void 0 : activeOwner.name)) === null || _getActiveOwners$sort2 === void 0 ? void 0 : _getActiveOwners$sort2.join(",");
17890
- return getOwnersList ? getOwnersList : t("NA");
17891
- };
17892
- if (window.location.href.includes("/ws/")) ;
17893
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CollapsibleCardPage, {
17894
- title: t("PT_PROPERTY_SEARCH"),
17895
- defaultOpen: true
17896
- }, (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, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(Label, {
17897
- style: getInputStyles()
17898
- }, `${t(`PROPERTY_ID`)}`), /*#__PURE__*/React.createElement("div", {
17899
- style: {
17900
- display: "flex",
17901
- gap: "12px"
17902
- }
17903
- }, /*#__PURE__*/React.createElement(TextInput, {
17904
- key: config === null || config === void 0 ? void 0 : config.key,
17905
- value: propertyId,
17906
- onChange: e => {
17907
- setPropertyId(e.target.value);
17908
- onSelect(config === null || config === void 0 ? void 0 : config.key, {
17909
- id: e.target.value
17910
- });
17911
- },
17912
- style: {
17913
- width: "80%",
17914
- float: "left"
17915
- },
17916
- placeholder: `${t("PT_ENTER_PROPERTY_ID")}`
17917
- }), /*#__PURE__*/React.createElement("button", {
17918
- className: "submit-bar",
17919
- type: "button",
17920
- style: {
17921
- color: "white"
17922
- },
17923
- onClick: searchProperty
17924
- }, `${t("PT_SEARCH")}`), /*#__PURE__*/React.createElement("button", {
17925
- className: "submit-bar",
17926
- type: "button",
17927
- style: {
17928
- color: "white"
17929
- },
17930
- onClick: clearSearch
17931
- }, `${t("CLEAR")}`), /*#__PURE__*/React.createElement("span", {
17932
- onClick: () => history.push(`/digit-ui/${userType}/${pathname.split("/")[3]}/create-application/create-property`, {
17933
- ...state,
17934
- ...formData
17935
- })
17936
- }, /*#__PURE__*/React.createElement("button", {
17937
- className: "submit-bar",
17938
- type: "button",
17939
- style: {
17940
- color: "white"
17941
- }
17942
- }, t("CPT_CREATE_PROPERTY"))))), searchPropertyId && propertyDetails && propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.Properties.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
17943
- className: "card-with-background",
17944
- style: {
17945
- margin: "16px 0px",
17946
- padding: "20px",
17947
- boxShadow: "none"
17948
- }
17949
- }, /*#__PURE__*/React.createElement(StatusTable, {
17950
- style: {
17951
- padding: "0",
17952
- margin: "0"
17953
- }
17954
- }, /*#__PURE__*/React.createElement("div", {
17955
- className: "formcomposer-section-grid",
17956
- style: isMobile ? {} : {}
17957
- }, /*#__PURE__*/React.createElement(Row, {
17958
- className: "border-none",
17959
- labelStyle: isMobile ? {
17960
- width: "40%"
17961
- } : {
17962
- width: "30%",
17963
- color: "#505a5f",
17964
- fontWeight: "600"
17965
- },
17966
- textStyle: {
17967
- color: "#000"
17968
- },
17969
- label: t(`PROPERTY_ID`),
17970
- text: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop3 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop3 === void 0 ? void 0 : _propertyDetails$Prop3.propertyId
17971
- }), /*#__PURE__*/React.createElement(Row, {
17972
- className: "border-none",
17973
- labelStyle: isMobile ? {
17974
- width: "40%"
17975
- } : {
17976
- width: "30%",
17977
- color: "#505a5f",
17978
- fontWeight: "600"
17979
- },
17980
- textStyle: {
17981
- color: "#000"
17982
- },
17983
- label: t(`OWNER_NAME`),
17984
- text: getOwnerNames(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties[0])
17985
- }), /*#__PURE__*/React.createElement(Row, {
17986
- className: "border-none",
17987
- labelStyle: isMobile ? {
17988
- width: "40%"
17989
- } : {
17990
- width: "30%",
17991
- color: "#505a5f",
17992
- fontWeight: "600"
17993
- },
17994
- textStyle: {
17995
- wordBreak: "break-word",
17996
- color: "#000"
17997
- },
17998
- label: t(`PROPERTY_ADDRESS`),
17999
- text: propertyAddress,
18000
- privacy: {
18001
- uuid: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop4 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop4 === void 0 ? void 0 : (_propertyDetails$Prop5 = _propertyDetails$Prop4.owners) === null || _propertyDetails$Prop5 === void 0 ? void 0 : (_propertyDetails$Prop6 = _propertyDetails$Prop5[0]) === null || _propertyDetails$Prop6 === void 0 ? void 0 : _propertyDetails$Prop6.uuid,
18002
- fieldName: ["doorNo", "street", "landmark"],
18003
- model: "Property",
18004
- showValue: true,
18005
- loadData: {
18006
- serviceName: "/property-services/property/_search",
18007
- requestBody: {},
18008
- requestParam: {
18009
- tenantId: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop7 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop7 === void 0 ? void 0 : _propertyDetails$Prop7.tenantId,
18010
- propertyIds: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop8 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop8 === void 0 ? void 0 : _propertyDetails$Prop8.propertyId
18011
- },
18012
- jsonPath: "Properties[0].address.street",
18013
- d: res => {
18014
- let resultString = (lodash.get(res, "Properties[0].address.doorNo") ? `${lodash.get(res, "Properties[0].address.doorNo")}, ` : "") + (lodash.get(res, "Properties[0].address.street") ? `${lodash.get(res, "Properties[0].address.street")}, ` : "") + (lodash.get(res, "Properties[0].address.landmark") ? `${lodash.get(res, "Properties[0].address.landmark")}` : "");
18015
- return resultString;
18016
- },
18017
- isArray: false
18018
- }
18019
- }
18020
- }))))) : null, showToast && /*#__PURE__*/React.createElement(Toast, {
18021
- isDleteBtn: true,
18022
- labelstyle: {
18023
- width: "100%"
18024
- },
18025
- error: showToast.error,
18026
- warning: showToast.warning,
18027
- label: t(showToast.label),
18028
- onClose: () => {
18029
- setShowToast(null);
18030
- }
18031
- }))));
18032
- };
18033
-
18034
- const PropertyLocationDetails = ({
18035
- address,
18036
- actionCancelOnSubmit,
18037
- isEdit,
18038
- onSelect,
18039
- config,
18040
- formData: formDataProp,
18041
- ...props
18042
- }) => {
18043
- var _formDataProp$cpt2;
18044
- const {
18045
- t
18046
- } = useTranslation();
18047
- const [showToast, setShowToast] = useState(null);
18048
- const [formData, setFormData] = useState({
18049
- addressType: (address === null || address === void 0 ? void 0 : address.addressType) || "",
18050
- pincode: (address === null || address === void 0 ? void 0 : address.pinCode) || "",
18051
- city: (address === null || address === void 0 ? void 0 : address.city) || "",
18052
- locality: (address === null || address === void 0 ? void 0 : address.locality) || "",
18053
- streetName: (address === null || address === void 0 ? void 0 : address.streetName) || "",
18054
- houseNo: (address === null || address === void 0 ? void 0 : address.houseNumber) || "",
18055
- houseName: (address === null || address === void 0 ? void 0 : address.houseName) || "",
18056
- landmark: (address === null || address === void 0 ? void 0 : address.landmark) || "",
18057
- addressLine1: (address === null || address === void 0 ? void 0 : address.address) || "",
18058
- addressLine2: (address === null || address === void 0 ? void 0 : address.address2) || "",
18059
- latitude: (address === null || address === void 0 ? void 0 : address.latitude) || "",
18060
- longitude: (address === null || address === void 0 ? void 0 : address.longitude) || "",
18061
- assembly: (address === null || address === void 0 ? void 0 : address.assembly) || "",
18062
- block: (address === null || address === void 0 ? void 0 : address.block) || "",
18063
- zone: (address === null || address === void 0 ? void 0 : address.zone) || "",
18064
- zroLocation: (address === null || address === void 0 ? void 0 : address.zroLocation) || "",
18065
- subLocality: (address === null || address === void 0 ? void 0 : address.subLocality) || "",
18066
- actualAssembly: (address === null || address === void 0 ? void 0 : address.actualAssembly) || "",
18067
- actualWard: (address === null || address === void 0 ? void 0 : address.actualWard) || "",
18068
- actualZone: (address === null || address === void 0 ? void 0 : address.actualZone) || ""
18069
- });
18070
- const isPropertyFound = window.location.href.includes("ws/old-application");
18071
- useEffect(() => {
18072
- if (props.register) {
18073
- props.register({
18074
- name: "cpt"
18075
- });
18076
- props.register({
18077
- name: "cptId"
18078
- });
18079
- }
18080
- }, [props.register]);
18081
- useEffect(() => {
18082
- var _formDataProp$cpt;
18083
- if (formDataProp !== null && formDataProp !== void 0 && (_formDataProp$cpt = formDataProp.cpt) !== null && _formDataProp$cpt !== void 0 && _formDataProp$cpt.details) {
18084
- var _addressData$locality, _addressData$geoLocat, _addressData$geoLocat2, _addressData$locality2, _addressData$geoLocat3, _addressData$geoLocat4, _addressData$locality3, _addressData$addition, _addressData$addition2, _addressData$addition3, _addressData$addition4, _addressData$addition5, _addressData$addition6, _addressData$addition7, _addressData$addition8, _addressData$addition9, _addressData$addition0, _addressData$addition1, _addressData$addition10, _addressData$addition11;
18085
- const details = formDataProp.cpt.details;
18086
- const addressData = details.address || {};
18087
- const additionalDetails = details.additionalDetails || {};
18088
- const localityCode = ((_addressData$locality = addressData.locality) === null || _addressData$locality === void 0 ? void 0 : _addressData$locality.code) || addressData.locality || "";
18089
- const lat = (_addressData$geoLocat = addressData.geoLocation) !== null && _addressData$geoLocat !== void 0 && _addressData$geoLocat.latitude && ((_addressData$geoLocat2 = addressData.geoLocation) === null || _addressData$geoLocat2 === void 0 ? void 0 : _addressData$geoLocat2.latitude) !== 0 ? addressData.geoLocation.latitude : ((_addressData$locality2 = addressData.locality) === null || _addressData$locality2 === void 0 ? void 0 : _addressData$locality2.latitude) || addressData.latitude || "";
18090
- const lng = (_addressData$geoLocat3 = addressData.geoLocation) !== null && _addressData$geoLocat3 !== void 0 && _addressData$geoLocat3.longitude && ((_addressData$geoLocat4 = addressData.geoLocation) === null || _addressData$geoLocat4 === void 0 ? void 0 : _addressData$geoLocat4.longitude) !== 0 ? addressData.geoLocation.longitude : ((_addressData$locality3 = addressData.locality) === null || _addressData$locality3 === void 0 ? void 0 : _addressData$locality3.longitude) || addressData.longitude || "";
18091
- const zroCode = addressData.zroLocation || additionalDetails.zroLocation || ((_addressData$addition = addressData.additionalDetails) === null || _addressData$addition === void 0 ? void 0 : _addressData$addition.zroLocation) || "";
18092
- const zroValue = zroCode ? {
18093
- code: zroCode,
18094
- name: zroCode,
18095
- i18nKey: zroCode
18096
- } : "";
18097
- setFormData({
18098
- pincode: addressData.pincode || "",
18099
- city: addressData.city || "",
18100
- locality: localityCode,
18101
- streetName: addressData.street || "",
18102
- houseNo: addressData.houseNo || "",
18103
- landmark: addressData.landmark || "",
18104
- latitude: lat,
18105
- longitude: lng,
18106
- assembly: additionalDetails.assembly || ((_addressData$addition2 = addressData.additionalDetails) === null || _addressData$addition2 === void 0 ? void 0 : _addressData$addition2.assembly) || "",
18107
- block: additionalDetails.block || ((_addressData$addition3 = addressData.additionalDetails) === null || _addressData$addition3 === void 0 ? void 0 : _addressData$addition3.block) || "",
18108
- zone: additionalDetails.zone || ((_addressData$addition4 = addressData.additionalDetails) === null || _addressData$addition4 === void 0 ? void 0 : _addressData$addition4.zone) || "",
18109
- zroLocation: zroCode,
18110
- zro: zroValue,
18111
- subLocality: addressData.subLocality || "",
18112
- actualAssembly: addressData.actualAssembly || additionalDetails.actualAssembly || ((_addressData$addition5 = addressData.additionalDetails) === null || _addressData$addition5 === void 0 ? void 0 : _addressData$addition5.actualAssembly) || "",
18113
- actualWard: addressData.actualWard || additionalDetails.actualWard || ((_addressData$addition6 = addressData.additionalDetails) === null || _addressData$addition6 === void 0 ? void 0 : _addressData$addition6.actualWard) || "",
18114
- actualZone: addressData.actualZone || additionalDetails.actualZone || ((_addressData$addition7 = addressData.additionalDetails) === null || _addressData$addition7 === void 0 ? void 0 : _addressData$addition7.actualZone) || "",
18115
- address: {
18116
- ...addressData,
18117
- city: addressData.city || "",
18118
- pincode: addressData.pincode || "",
18119
- locality: localityCode,
18120
- streetName: addressData.street || "",
18121
- houseNo: addressData.houseNo || "",
18122
- addressLine1: addressData.street || "",
18123
- latitude: lat,
18124
- longitude: lng,
18125
- zroLocation: zroCode,
18126
- zro: zroValue,
18127
- assembly: additionalDetails.assembly || ((_addressData$addition8 = addressData.additionalDetails) === null || _addressData$addition8 === void 0 ? void 0 : _addressData$addition8.assembly) || "",
18128
- block: additionalDetails.block || ((_addressData$addition9 = addressData.additionalDetails) === null || _addressData$addition9 === void 0 ? void 0 : _addressData$addition9.block) || "",
18129
- zone: additionalDetails.zone || ((_addressData$addition0 = addressData.additionalDetails) === null || _addressData$addition0 === void 0 ? void 0 : _addressData$addition0.zone) || "",
18130
- subLocality: addressData.subLocality || "",
18131
- actualWard: addressData.actualWard || additionalDetails.actualWard || ((_addressData$addition1 = addressData.additionalDetails) === null || _addressData$addition1 === void 0 ? void 0 : _addressData$addition1.actualWard) || "",
18132
- actualZone: addressData.actualZone || additionalDetails.actualZone || ((_addressData$addition10 = addressData.additionalDetails) === null || _addressData$addition10 === void 0 ? void 0 : _addressData$addition10.actualZone) || "",
18133
- actualAssembly: addressData.actualAssembly || additionalDetails.actualAssembly || ((_addressData$addition11 = addressData.additionalDetails) === null || _addressData$addition11 === void 0 ? void 0 : _addressData$addition11.actualAssembly) || ""
18134
- }
18135
- });
18136
- } else if ((formDataProp === null || formDataProp === void 0 ? void 0 : formDataProp.cpt) === null) {
18137
- const clearedData = {
18138
- addressType: "",
18139
- pincode: "",
18140
- city: "",
18141
- locality: "",
18142
- streetName: "",
18143
- houseNo: "",
18144
- houseName: "",
18145
- landmark: "",
18146
- addressLine1: "",
18147
- addressLine2: "",
18148
- latitude: "",
18149
- longitude: "",
18150
- assembly: "",
18151
- block: "",
18152
- zone: "",
18153
- zroLocation: "",
18154
- subLocality: "",
18155
- actualWard: "",
18156
- actualZone: "",
18157
- actualAssembly: "",
18158
- zro: "",
18159
- address: {}
17860
+ } else if ((formDataProp === null || formDataProp === void 0 ? void 0 : formDataProp.cpt) === null) {
17861
+ const clearedData = {
17862
+ addressType: "",
17863
+ pincode: "",
17864
+ city: "",
17865
+ locality: "",
17866
+ streetName: "",
17867
+ houseNo: "",
17868
+ houseName: "",
17869
+ landmark: "",
17870
+ addressLine1: "",
17871
+ addressLine2: "",
17872
+ latitude: "",
17873
+ longitude: "",
17874
+ assembly: "",
17875
+ block: "",
17876
+ zone: "",
17877
+ zroLocation: "",
17878
+ subLocality: "",
17879
+ actualWard: "",
17880
+ actualZone: "",
17881
+ actualAssembly: "",
17882
+ zro: "",
17883
+ address: {}
18160
17884
  };
18161
17885
  setFormData(clearedData);
18162
17886
  onSelect((config === null || config === void 0 ? void 0 : config.key) || "address", clearedData);
@@ -18173,6 +17897,15 @@ const PropertyLocationDetails = ({
18173
17897
  return /*#__PURE__*/React.createElement(CollapsibleCardPage, {
18174
17898
  title: t("PT_LOCATION_DETAILS"),
18175
17899
  defaultOpen: true
17900
+ }, /*#__PURE__*/React.createElement("div", {
17901
+ style: {
17902
+ boxShadow: "none",
17903
+ ...props.style
17904
+ }
17905
+ }, /*#__PURE__*/React.createElement("div", {
17906
+ style: {
17907
+ marginTop: "20px"
17908
+ }
18176
17909
  }, /*#__PURE__*/React.createElement(AddressDetails, {
18177
17910
  t: t,
18178
17911
  formData: formData,
@@ -18188,11 +17921,11 @@ const PropertyLocationDetails = ({
18188
17921
  ...config
18189
17922
  },
18190
17923
  isEdit: isEdit,
18191
- showZRO: true,
17924
+ showZRO: hideZRO ? false : true,
18192
17925
  showMapActualLocation: true,
18193
17926
  disable: isPropertyFound,
18194
17927
  hideNextButton: true
18195
- }));
17928
+ }))));
18196
17929
  };
18197
17930
 
18198
17931
  const PropertyOwnerDetails = ({
@@ -19427,84 +19160,363 @@ const PropertyDetails = ({
19427
19160
  filters: {
19428
19161
  propertyIds: (_formData4 = formData) !== null && _formData4 !== void 0 && (_formData4$cptId = _formData4.cptId) !== null && _formData4$cptId !== void 0 && _formData4$cptId.id || (_formData5 = formData) !== null && _formData5 !== void 0 && (_formData5$cpt = _formData5.cpt) !== null && _formData5$cpt !== void 0 && (_formData5$cpt$detail = _formData5$cpt.details) !== null && _formData5$cpt$detail !== void 0 && _formData5$cpt$detail.propertyId ? ((_formData6 = formData) === null || _formData6 === void 0 ? void 0 : (_formData6$knowyourpr = _formData6.knowyourproperty) === null || _formData6$knowyourpr === void 0 ? void 0 : (_formData6$knowyourpr2 = _formData6$knowyourpr.KnowProperty) === null || _formData6$knowyourpr2 === void 0 ? void 0 : _formData6$knowyourpr2.code) === "YES" || sessionStorage.getItem("VisitedLightCreate") === "false" ? (_formData7 = formData) === null || _formData7 === void 0 ? void 0 : (_formData7$cptId = _formData7.cptId) === null || _formData7$cptId === void 0 ? void 0 : _formData7$cptId.id : (_formData8 = formData) === null || _formData8 === void 0 ? void 0 : (_formData8$cpt = _formData8.cpt) === null || _formData8$cpt === void 0 ? void 0 : (_formData8$cpt$detail = _formData8$cpt.details) === null || _formData8$cpt$detail === void 0 ? void 0 : _formData8$cpt$detail.propertyId : window.location.href.includes("/tl/tradelicence/edit-application") || window.location.href.includes("/renew-trade/") ? (_formData9 = formData) === null || _formData9 === void 0 ? void 0 : (_formData9$tradeLicen = _formData9.tradeLicenseDetail) === null || _formData9$tradeLicen === void 0 ? void 0 : (_formData9$tradeLicen2 = _formData9$tradeLicen.additionalDetail) === null || _formData9$tradeLicen2 === void 0 ? void 0 : _formData9$tradeLicen2.propertyId : ((_formData0 = formData) === null || _formData0 === void 0 ? void 0 : (_formData0$cptId = _formData0.cptId) === null || _formData0$cptId === void 0 ? void 0 : _formData0$cptId.id) || ((_formData1 = formData) === null || _formData1 === void 0 ? void 0 : (_formData1$cpt = _formData1.cpt) === null || _formData1$cpt === void 0 ? void 0 : (_formData1$cpt$detail = _formData1$cpt.details) === null || _formData1$cpt$detail === void 0 ? void 0 : _formData1$cpt$detail.propertyId)
19429
19162
  },
19430
- tenantId: tenantId,
19431
- privacy: Digit.Utils.getPrivacyObject()
19163
+ tenantId: tenantId,
19164
+ privacy: Digit.Utils.getPrivacyObject()
19165
+ }, {
19166
+ filters: {
19167
+ propertyIds: (_formData10 = formData) !== null && _formData10 !== void 0 && (_formData10$cptId = _formData10.cptId) !== null && _formData10$cptId !== void 0 && _formData10$cptId.id || (_formData11 = formData) !== null && _formData11 !== void 0 && (_formData11$cpt = _formData11.cpt) !== null && _formData11$cpt !== void 0 && (_formData11$cpt$detai = _formData11$cpt.details) !== null && _formData11$cpt$detai !== void 0 && _formData11$cpt$detai.propertyId ? ((_formData12 = formData) === null || _formData12 === void 0 ? void 0 : (_formData12$knowyourp = _formData12.knowyourproperty) === null || _formData12$knowyourp === void 0 ? void 0 : (_formData12$knowyourp2 = _formData12$knowyourp.KnowProperty) === null || _formData12$knowyourp2 === void 0 ? void 0 : _formData12$knowyourp2.code) === "YES" || sessionStorage.getItem("VisitedLightCreate") === "false" ? (_formData13 = formData) === null || _formData13 === void 0 ? void 0 : (_formData13$cptId = _formData13.cptId) === null || _formData13$cptId === void 0 ? void 0 : _formData13$cptId.id : (_formData14 = formData) === null || _formData14 === void 0 ? void 0 : (_formData14$cpt = _formData14.cpt) === null || _formData14$cpt === void 0 ? void 0 : (_formData14$cpt$detai = _formData14$cpt.details) === null || _formData14$cpt$detai === void 0 ? void 0 : _formData14$cpt$detai.propertyId : window.location.href.includes("/tl/tradelicence/edit-application") || window.location.href.includes("/renew-trade/") ? (_formData15 = formData) === null || _formData15 === void 0 ? void 0 : (_formData15$tradeLice = _formData15.tradeLicenseDetail) === null || _formData15$tradeLice === void 0 ? void 0 : (_formData15$tradeLice2 = _formData15$tradeLice.additionalDetail) === null || _formData15$tradeLice2 === void 0 ? void 0 : _formData15$tradeLice2.propertyId : ((_formData16 = formData) === null || _formData16 === void 0 ? void 0 : (_formData16$cptId = _formData16.cptId) === null || _formData16$cptId === void 0 ? void 0 : _formData16$cptId.id) || ((_formData17 = formData) === null || _formData17 === void 0 ? void 0 : (_formData17$cpt = _formData17.cpt) === null || _formData17$cpt === void 0 ? void 0 : (_formData17$cpt$detai = _formData17$cpt.details) === null || _formData17$cpt$detai === void 0 ? void 0 : _formData17$cpt$detai.propertyId)
19168
+ },
19169
+ tenantId: tenantId,
19170
+ privacy: Digit.Utils.getPrivacyObject()
19171
+ });
19172
+ const onSkip = () => onSelect();
19173
+ const goNext = () => {
19174
+ sessionStorage.setItem("cpt", propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties[0]);
19175
+ onSelect("cpt", {
19176
+ details: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties[0]
19177
+ });
19178
+ };
19179
+ 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() : [];
19180
+ let propAddArr = [];
19181
+ if (propertyDetails && propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.Properties.length) {
19182
+ 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;
19183
+ 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) {
19184
+ var _propertyDetails$Prop7, _propertyDetails$Prop8;
19185
+ 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);
19186
+ }
19187
+ 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) {
19188
+ var _propertyDetails$Prop11, _propertyDetails$Prop12, _propertyDetails$Prop13, _propertyDetails$Prop14;
19189
+ 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));
19190
+ }
19191
+ 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) {
19192
+ var _propertyDetails$Prop17, _propertyDetails$Prop18;
19193
+ 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);
19194
+ }
19195
+ 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) {
19196
+ var _propertyDetails$Prop22, _propertyDetails$Prop23, _propertyDetails$Prop24, _propertyDetails$Prop25;
19197
+ 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)));
19198
+ }
19199
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop26 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop26 !== void 0 && _propertyDetails$Prop26.tenantId) {
19200
+ var _propertyDetails$Prop27;
19201
+ 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)));
19202
+ }
19203
+ 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) {
19204
+ var _propertyDetails$Prop30, _propertyDetails$Prop31;
19205
+ 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);
19206
+ }
19207
+ }
19208
+ if (isLoading) {
19209
+ return /*#__PURE__*/React.createElement(Loader, null);
19210
+ }
19211
+ function getChangePropertyPath() {
19212
+ var _formData18, _formData19, _formData20, _formData21, _formData22, _formData23;
19213
+ if (window.location.href.includes("/ws/modify-connection/")) return `/digit-ui/citizen/ws/modify-connection/${(_formData18 = formData) === null || _formData18 === void 0 ? void 0 : _formData18.tenantId}/search-property`;else if (window.location.href.includes("/ws/edit-application/")) return `/digit-ui/citizen/ws/edit-application/${(_formData19 = formData) === null || _formData19 === void 0 ? void 0 : _formData19.tenantId}/search-property`;else if (window.location.href.includes("/ws/")) return `/digit-ui/citizen/ws/create-application/search-property`;else if (window.location.href.includes("/renew-trade/")) return `/digit-ui/citizen/tl/tradelicence/renew-trade/${(_formData20 = formData) === null || _formData20 === void 0 ? void 0 : _formData20.applicationNumber}/${(_formData21 = formData) === null || _formData21 === void 0 ? void 0 : _formData21.tenantId}/know-your-property`;else if (window.location.href.includes("/edit-application/")) return `/digit-ui/citizen/tl/tradelicence/edit-application/${(_formData22 = formData) === null || _formData22 === void 0 ? void 0 : _formData22.applicationNumber}/${(_formData23 = formData) === null || _formData23 === void 0 ? void 0 : _formData23.tenantId}/know-your-property`;else return `/digit-ui/citizen/tl/tradelicence/new-application/know-your-property`;
19214
+ }
19215
+ return /*#__PURE__*/React.createElement(React.Fragment, null, window.location.href.includes("/citizen") ? /*#__PURE__*/React.createElement(CPTTimeline, {
19216
+ currentStep: window.location.href.includes("/ws/") ? 1 : 2,
19217
+ flow: window.location.href.includes("/ws/") ? "WS" : "",
19218
+ businessService: "WS"
19219
+ }) : null, /*#__PURE__*/React.createElement(FormStep, {
19220
+ t: t,
19221
+ config: config,
19222
+ onSelect: goNext,
19223
+ onSkip: onSkip
19224
+ }, 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, {
19225
+ className: "border-none",
19226
+ label: t(`PROPERTY_ID`),
19227
+ text: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop32 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop32 === void 0 ? void 0 : _propertyDetails$Prop32.propertyId
19228
+ }), /*#__PURE__*/React.createElement(Row, {
19229
+ className: "border-none",
19230
+ label: t(`OWNER_NAME`),
19231
+ text: reversedOwners === null || reversedOwners === void 0 ? void 0 : (_reversedOwners$ = reversedOwners[0]) === null || _reversedOwners$ === void 0 ? void 0 : _reversedOwners$.name
19232
+ }), /*#__PURE__*/React.createElement(Row, {
19233
+ className: "border-none",
19234
+ textStyle: {
19235
+ wordBreak: "break-word"
19236
+ },
19237
+ label: t(`PROPERTY_ADDRESS`),
19238
+ text: propAddArr.join(', '),
19239
+ privacy: {
19240
+ 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,
19241
+ fieldName: ["doorNo", "street", "landmark"],
19242
+ model: "Property",
19243
+ showValue: true,
19244
+ loadData: {
19245
+ serviceName: "/property-services/property/_search",
19246
+ requestBody: {},
19247
+ requestParam: {
19248
+ tenantId: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop37 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop37 === void 0 ? void 0 : _propertyDetails$Prop37.tenantId,
19249
+ propertyIds: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop38 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop38 === void 0 ? void 0 : _propertyDetails$Prop38.propertyId
19250
+ },
19251
+ jsonPath: "Properties[0].address.street",
19252
+ d: res => {
19253
+ let resultString = (_.get(res, "Properties[0].address.doorNo") ? `${_.get(res, "Properties[0].address.doorNo")}, ` : "") + (_.get(res, "Properties[0].address.street") ? `${_.get(res, "Properties[0].address.street")}, ` : "") + (_.get(res, "Properties[0].address.landmark") ? `${_.get(res, "Properties[0].address.landmark")}` : "");
19254
+ return resultString;
19255
+ },
19256
+ isArray: false
19257
+ }
19258
+ }
19259
+ }), /*#__PURE__*/React.createElement(Row, {
19260
+ className: "border-none",
19261
+ label: t(`PT_MUTATION_STATUS`),
19262
+ text: t(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop39 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop39 === void 0 ? void 0 : _propertyDetails$Prop39.status)
19263
+ }), /*#__PURE__*/React.createElement("div", {
19264
+ style: {
19265
+ textAlign: "left"
19266
+ }
19267
+ }, /*#__PURE__*/React.createElement(Link, {
19268
+ 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}`
19269
+ }, /*#__PURE__*/React.createElement(LinkButton, {
19270
+ style: {
19271
+ textAlign: "left"
19272
+ },
19273
+ label: t("PT_VIEW_MORE_DETAILS")
19274
+ })), /*#__PURE__*/React.createElement(Link, {
19275
+ to: getChangePropertyPath()
19276
+ }, /*#__PURE__*/React.createElement(LinkButton, {
19277
+ style: {
19278
+ textAlign: "left"
19279
+ },
19280
+ label: t("PT_CHANGE_PROPERTY"),
19281
+ onClick: () => {
19282
+ sessionStorage.setItem("changePropertySelected", "yes");
19283
+ sessionStorage.setItem("EditFormData", JSON.stringify(formData));
19284
+ }
19285
+ })))), /*#__PURE__*/React.createElement(SubmitBar, {
19286
+ style: {
19287
+ marginTop: "10px"
19288
+ },
19289
+ onSubmit: goNext,
19290
+ label: t("CS_COMMON_NEXT")
19291
+ }))));
19292
+ };
19293
+
19294
+ const getAddress = (address, t) => {
19295
+ return `${address !== null && address !== void 0 && address.doorNo ? `${address === null || address === void 0 ? void 0 : address.doorNo}, ` : ""} ${address !== null && address !== void 0 && address.street ? `${address === null || address === void 0 ? void 0 : address.street}, ` : ""}${address !== null && address !== void 0 && address.landmark ? `${address === null || address === void 0 ? void 0 : address.landmark}, ` : ""}${t(Digit.Utils.pt.getMohallaLocale(address === null || address === void 0 ? void 0 : address.locality.code, address === null || address === void 0 ? void 0 : address.tenantId))}, ${t(Digit.Utils.pt.getCityLocale(address === null || address === void 0 ? void 0 : address.tenantId))}${address !== null && address !== void 0 && address.pincode && t(address === null || address === void 0 ? void 0 : address.pincode) ? `, ${address.pincode}` : " "}`;
19296
+ };
19297
+ const PropertySearchNSummary = ({
19298
+ config,
19299
+ onSelect,
19300
+ userType,
19301
+ formData,
19302
+ setError,
19303
+ formState,
19304
+ clearErrors
19305
+ }) => {
19306
+ var _formData$cptId, _formData$tradedetils, _formData$tradedetils2, _formData$tradedetils3, _propertyDetails$Prop3, _propertyDetails$Prop4, _propertyDetails$Prop5, _propertyDetails$Prop6, _propertyDetails$Prop7, _propertyDetails$Prop8;
19307
+ const {
19308
+ t
19309
+ } = useTranslation();
19310
+ const history = useHistory();
19311
+ let {
19312
+ pathname,
19313
+ state
19314
+ } = useLocation();
19315
+ state = state && (typeof state === "string" || state instanceof String) ? JSON.parse(state) : state;
19316
+ const isEditScreen = pathname.includes("/modify-application/");
19317
+ const tenantId = Digit.ULBService.getCurrentTenantId();
19318
+ const isEmpNewApplication = window.location.href.includes("/employee/tl/new-application");
19319
+ const isEmpRenewLicense = window.location.href.includes("/employee/tl/renew-application-details") || window.location.href.includes("/employee/tl/edit-application-details");
19320
+ const search = useLocation().search;
19321
+ const urlPropertyId = new URLSearchParams(search).get("propertyId");
19322
+ const [propertyId, setPropertyId] = useState((formData === null || formData === void 0 ? void 0 : (_formData$cptId = formData.cptId) === null || _formData$cptId === void 0 ? void 0 : _formData$cptId.id) || (urlPropertyId !== "null" ? urlPropertyId : "") || "");
19323
+ const [searchPropertyId, setSearchPropertyId] = useState(urlPropertyId !== "null" ? urlPropertyId : "");
19324
+ const [showToast, setShowToast] = useState(null);
19325
+ const isMobile = window.Digit.Utils.browser.isMobile();
19326
+ const serachParams = window.location.href.includes("?") ? window.location.href.substring(window.location.href.indexOf("?") + 1, window.location.href.length) : "";
19327
+ const {
19328
+ isLoading,
19329
+ isError,
19330
+ error,
19331
+ data: propertyDetails
19332
+ } = Digit.Hooks.pt.usePropertySearch({
19333
+ filters: {
19334
+ propertyIds: searchPropertyId
19335
+ },
19336
+ tenantId: tenantId
19432
19337
  }, {
19433
19338
  filters: {
19434
- propertyIds: (_formData10 = formData) !== null && _formData10 !== void 0 && (_formData10$cptId = _formData10.cptId) !== null && _formData10$cptId !== void 0 && _formData10$cptId.id || (_formData11 = formData) !== null && _formData11 !== void 0 && (_formData11$cpt = _formData11.cpt) !== null && _formData11$cpt !== void 0 && (_formData11$cpt$detai = _formData11$cpt.details) !== null && _formData11$cpt$detai !== void 0 && _formData11$cpt$detai.propertyId ? ((_formData12 = formData) === null || _formData12 === void 0 ? void 0 : (_formData12$knowyourp = _formData12.knowyourproperty) === null || _formData12$knowyourp === void 0 ? void 0 : (_formData12$knowyourp2 = _formData12$knowyourp.KnowProperty) === null || _formData12$knowyourp2 === void 0 ? void 0 : _formData12$knowyourp2.code) === "YES" || sessionStorage.getItem("VisitedLightCreate") === "false" ? (_formData13 = formData) === null || _formData13 === void 0 ? void 0 : (_formData13$cptId = _formData13.cptId) === null || _formData13$cptId === void 0 ? void 0 : _formData13$cptId.id : (_formData14 = formData) === null || _formData14 === void 0 ? void 0 : (_formData14$cpt = _formData14.cpt) === null || _formData14$cpt === void 0 ? void 0 : (_formData14$cpt$detai = _formData14$cpt.details) === null || _formData14$cpt$detai === void 0 ? void 0 : _formData14$cpt$detai.propertyId : window.location.href.includes("/tl/tradelicence/edit-application") || window.location.href.includes("/renew-trade/") ? (_formData15 = formData) === null || _formData15 === void 0 ? void 0 : (_formData15$tradeLice = _formData15.tradeLicenseDetail) === null || _formData15$tradeLice === void 0 ? void 0 : (_formData15$tradeLice2 = _formData15$tradeLice.additionalDetail) === null || _formData15$tradeLice2 === void 0 ? void 0 : _formData15$tradeLice2.propertyId : ((_formData16 = formData) === null || _formData16 === void 0 ? void 0 : (_formData16$cptId = _formData16.cptId) === null || _formData16$cptId === void 0 ? void 0 : _formData16$cptId.id) || ((_formData17 = formData) === null || _formData17 === void 0 ? void 0 : (_formData17$cpt = _formData17.cpt) === null || _formData17$cpt === void 0 ? void 0 : (_formData17$cpt$detai = _formData17$cpt.details) === null || _formData17$cpt$detai === void 0 ? void 0 : _formData17$cpt$detai.propertyId)
19339
+ propertyIds: searchPropertyId
19435
19340
  },
19436
19341
  tenantId: tenantId,
19342
+ enabled: searchPropertyId ? true : false,
19437
19343
  privacy: Digit.Utils.getPrivacyObject()
19438
19344
  });
19439
- const onSkip = () => onSelect();
19440
- const goNext = () => {
19441
- sessionStorage.setItem("cpt", propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties[0]);
19345
+ useEffect(() => {
19346
+ if (propertyId && (window.location.href.includes("/renew-application-details/") || window.location.href.includes("/edit-application-details/"))) setSearchPropertyId(propertyId);
19347
+ }, [propertyId]);
19348
+ useEffect(() => {
19349
+ var _propertyDetails$Prop;
19350
+ if (isLoading == false && error && error == true || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop = propertyDetails.Properties) === null || _propertyDetails$Prop === void 0 ? void 0 : _propertyDetails$Prop.length) == 0) {
19351
+ setShowToast({
19352
+ error: true,
19353
+ label: "PT_ENTER_VALID_PROPERTY_ID"
19354
+ });
19355
+ }
19356
+ }, [error, propertyDetails]);
19357
+ useEffect(() => {
19442
19358
  onSelect("cpt", {
19443
19359
  details: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties[0]
19444
19360
  });
19361
+ sessionStorage.setItem("Digit_FSM_PT", JSON.stringify(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties[0]));
19362
+ localStorage.setItem("pgrProperty", JSON.stringify(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties[0]));
19363
+ }, [propertyDetails, pathname]);
19364
+ const searchProperty = () => {
19365
+ if (!propertyId) {
19366
+ setShowToast({
19367
+ error: true,
19368
+ label: "PT_ENTER_PROPERTY_ID_AND_SEARCH"
19369
+ });
19370
+ }
19371
+ setSearchPropertyId(propertyId);
19372
+ if (window.location.pathname.includes("/tl/new-application")) {
19373
+ history.push(`/digit-ui/employee/tl/new-application?propertyId=${propertyId}`);
19374
+ const scrollConst = 1600;
19375
+ setTimeout(() => window.scrollTo(0, scrollConst), 0);
19376
+ } else if (window.location.pathname.includes("/ws/new-application")) history.push(`/digit-ui/employee/ws/new-application?propertyId=${propertyId}`);
19377
+ };
19378
+ const clearSearch = () => {
19379
+ setPropertyId("");
19380
+ setSearchPropertyId("");
19381
+ onSelect(config === null || config === void 0 ? void 0 : config.key, {
19382
+ id: ""
19383
+ });
19384
+ onSelect("cpt", null);
19445
19385
  };
19446
- 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() : [];
19447
- let propAddArr = [];
19386
+ if (isEditScreen) {
19387
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
19388
+ }
19389
+ let propertyAddress = "";
19448
19390
  if (propertyDetails && propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.Properties.length) {
19449
- 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;
19450
- 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) {
19451
- var _propertyDetails$Prop7, _propertyDetails$Prop8;
19452
- 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);
19453
- }
19454
- 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) {
19455
- var _propertyDetails$Prop11, _propertyDetails$Prop12, _propertyDetails$Prop13, _propertyDetails$Prop14;
19456
- 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));
19457
- }
19458
- 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) {
19459
- var _propertyDetails$Prop17, _propertyDetails$Prop18;
19460
- 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);
19391
+ var _propertyDetails$Prop2;
19392
+ propertyAddress = getAddress(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop2 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop2 === void 0 ? void 0 : _propertyDetails$Prop2.address, t);
19393
+ }
19394
+ const getInputStyles = () => {
19395
+ if (window.location.href.includes("/ws/")) {
19396
+ return {
19397
+ fontWeight: "700"
19398
+ };
19399
+ } else return {};
19400
+ };
19401
+ const getOwnerNames = propertyData => {
19402
+ var _propertyData$owners, _getActiveOwners$sort, _getActiveOwners$sort2;
19403
+ 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);
19404
+ const getOwnersList = (_getActiveOwners$sort = getActiveOwners.sort((a, b) => {
19405
+ var _a$additionalDetails, _b$additionalDetails;
19406
+ return (a === null || a === void 0 ? void 0 : (_a$additionalDetails = a.additionalDetails) === null || _a$additionalDetails === void 0 ? void 0 : _a$additionalDetails.ownerSequence) - (b === null || b === void 0 ? void 0 : (_b$additionalDetails = b.additionalDetails) === null || _b$additionalDetails === void 0 ? void 0 : _b$additionalDetails.ownerSequence);
19407
+ })) === null || _getActiveOwners$sort === void 0 ? void 0 : (_getActiveOwners$sort2 = _getActiveOwners$sort.map(activeOwner => activeOwner === null || activeOwner === void 0 ? void 0 : activeOwner.name)) === null || _getActiveOwners$sort2 === void 0 ? void 0 : _getActiveOwners$sort2.join(",");
19408
+ return getOwnersList ? getOwnersList : t("NA");
19409
+ };
19410
+ if (window.location.href.includes("/ws/")) ;
19411
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CollapsibleCardPage, {
19412
+ title: t("PT_PROPERTY_SEARCH"),
19413
+ defaultOpen: true
19414
+ }, (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, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(Label, {
19415
+ style: getInputStyles()
19416
+ }, `${t(`PROPERTY_ID`)}`), /*#__PURE__*/React.createElement("div", {
19417
+ style: {
19418
+ display: "flex",
19419
+ gap: "12px"
19461
19420
  }
19462
- 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) {
19463
- var _propertyDetails$Prop22, _propertyDetails$Prop23, _propertyDetails$Prop24, _propertyDetails$Prop25;
19464
- 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)));
19421
+ }, /*#__PURE__*/React.createElement(TextInput, {
19422
+ key: config === null || config === void 0 ? void 0 : config.key,
19423
+ value: propertyId,
19424
+ onChange: e => {
19425
+ setPropertyId(e.target.value);
19426
+ onSelect(config === null || config === void 0 ? void 0 : config.key, {
19427
+ id: e.target.value
19428
+ });
19429
+ },
19430
+ style: {
19431
+ width: "80%",
19432
+ float: "left"
19433
+ },
19434
+ placeholder: `${t("PT_ENTER_PROPERTY_ID")}`
19435
+ }), /*#__PURE__*/React.createElement("button", {
19436
+ className: "submit-bar",
19437
+ type: "button",
19438
+ style: {
19439
+ color: "white"
19440
+ },
19441
+ onClick: searchProperty
19442
+ }, `${t("PT_SEARCH")}`), /*#__PURE__*/React.createElement("button", {
19443
+ className: "submit-bar",
19444
+ type: "button",
19445
+ style: {
19446
+ color: "white"
19447
+ },
19448
+ onClick: clearSearch
19449
+ }, `${t("CLEAR")}`), /*#__PURE__*/React.createElement("span", {
19450
+ onClick: () => history.push(`/digit-ui/${userType}/${pathname.split("/")[3]}/create-application/create-property`, {
19451
+ ...state,
19452
+ ...formData
19453
+ })
19454
+ }, /*#__PURE__*/React.createElement("button", {
19455
+ className: "submit-bar",
19456
+ type: "button",
19457
+ style: {
19458
+ color: "white"
19465
19459
  }
19466
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop26 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop26 !== void 0 && _propertyDetails$Prop26.tenantId) {
19467
- var _propertyDetails$Prop27;
19468
- 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)));
19460
+ }, t("CPT_CREATE_PROPERTY"))))), searchPropertyId && propertyDetails && propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.Properties.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
19461
+ className: "card-with-background",
19462
+ style: {
19463
+ margin: "16px 0px",
19464
+ padding: "20px",
19465
+ boxShadow: "none"
19469
19466
  }
19470
- 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) {
19471
- var _propertyDetails$Prop30, _propertyDetails$Prop31;
19472
- 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);
19467
+ }, /*#__PURE__*/React.createElement(StatusTable, {
19468
+ style: {
19469
+ padding: "0",
19470
+ margin: "0"
19473
19471
  }
19474
- }
19475
- if (isLoading) {
19476
- return /*#__PURE__*/React.createElement(Loader, null);
19477
- }
19478
- function getChangePropertyPath() {
19479
- var _formData18, _formData19, _formData20, _formData21, _formData22, _formData23;
19480
- if (window.location.href.includes("/ws/modify-connection/")) return `/digit-ui/citizen/ws/modify-connection/${(_formData18 = formData) === null || _formData18 === void 0 ? void 0 : _formData18.tenantId}/search-property`;else if (window.location.href.includes("/ws/edit-application/")) return `/digit-ui/citizen/ws/edit-application/${(_formData19 = formData) === null || _formData19 === void 0 ? void 0 : _formData19.tenantId}/search-property`;else if (window.location.href.includes("/ws/")) return `/digit-ui/citizen/ws/create-application/search-property`;else if (window.location.href.includes("/renew-trade/")) return `/digit-ui/citizen/tl/tradelicence/renew-trade/${(_formData20 = formData) === null || _formData20 === void 0 ? void 0 : _formData20.applicationNumber}/${(_formData21 = formData) === null || _formData21 === void 0 ? void 0 : _formData21.tenantId}/know-your-property`;else if (window.location.href.includes("/edit-application/")) return `/digit-ui/citizen/tl/tradelicence/edit-application/${(_formData22 = formData) === null || _formData22 === void 0 ? void 0 : _formData22.applicationNumber}/${(_formData23 = formData) === null || _formData23 === void 0 ? void 0 : _formData23.tenantId}/know-your-property`;else return `/digit-ui/citizen/tl/tradelicence/new-application/know-your-property`;
19481
- }
19482
- return /*#__PURE__*/React.createElement(React.Fragment, null, window.location.href.includes("/citizen") ? /*#__PURE__*/React.createElement(CPTTimeline, {
19483
- currentStep: window.location.href.includes("/ws/") ? 1 : 2,
19484
- flow: window.location.href.includes("/ws/") ? "WS" : "",
19485
- businessService: "WS"
19486
- }) : null, /*#__PURE__*/React.createElement(FormStep, {
19487
- t: t,
19488
- config: config,
19489
- onSelect: goNext,
19490
- onSkip: onSkip
19491
- }, 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, {
19472
+ }, /*#__PURE__*/React.createElement("div", {
19473
+ className: "formcomposer-section-grid",
19474
+ style: isMobile ? {} : {}
19475
+ }, /*#__PURE__*/React.createElement(Row, {
19492
19476
  className: "border-none",
19477
+ labelStyle: isMobile ? {
19478
+ width: "40%"
19479
+ } : {
19480
+ width: "30%",
19481
+ color: "#505a5f",
19482
+ fontWeight: "600"
19483
+ },
19484
+ textStyle: {
19485
+ color: "#000"
19486
+ },
19493
19487
  label: t(`PROPERTY_ID`),
19494
- text: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop32 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop32 === void 0 ? void 0 : _propertyDetails$Prop32.propertyId
19488
+ text: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop3 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop3 === void 0 ? void 0 : _propertyDetails$Prop3.propertyId
19495
19489
  }), /*#__PURE__*/React.createElement(Row, {
19496
19490
  className: "border-none",
19491
+ labelStyle: isMobile ? {
19492
+ width: "40%"
19493
+ } : {
19494
+ width: "30%",
19495
+ color: "#505a5f",
19496
+ fontWeight: "600"
19497
+ },
19498
+ textStyle: {
19499
+ color: "#000"
19500
+ },
19497
19501
  label: t(`OWNER_NAME`),
19498
- text: reversedOwners === null || reversedOwners === void 0 ? void 0 : (_reversedOwners$ = reversedOwners[0]) === null || _reversedOwners$ === void 0 ? void 0 : _reversedOwners$.name
19502
+ text: getOwnerNames(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties[0])
19499
19503
  }), /*#__PURE__*/React.createElement(Row, {
19500
19504
  className: "border-none",
19505
+ labelStyle: isMobile ? {
19506
+ width: "40%"
19507
+ } : {
19508
+ width: "30%",
19509
+ color: "#505a5f",
19510
+ fontWeight: "600"
19511
+ },
19501
19512
  textStyle: {
19502
- wordBreak: "break-word"
19513
+ wordBreak: "break-word",
19514
+ color: "#000"
19503
19515
  },
19504
19516
  label: t(`PROPERTY_ADDRESS`),
19505
- text: propAddArr.join(', '),
19517
+ text: propertyAddress,
19506
19518
  privacy: {
19507
- 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,
19519
+ uuid: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop4 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop4 === void 0 ? void 0 : (_propertyDetails$Prop5 = _propertyDetails$Prop4.owners) === null || _propertyDetails$Prop5 === void 0 ? void 0 : (_propertyDetails$Prop6 = _propertyDetails$Prop5[0]) === null || _propertyDetails$Prop6 === void 0 ? void 0 : _propertyDetails$Prop6.uuid,
19508
19520
  fieldName: ["doorNo", "street", "landmark"],
19509
19521
  model: "Property",
19510
19522
  showValue: true,
@@ -19512,49 +19524,28 @@ const PropertyDetails = ({
19512
19524
  serviceName: "/property-services/property/_search",
19513
19525
  requestBody: {},
19514
19526
  requestParam: {
19515
- tenantId: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop37 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop37 === void 0 ? void 0 : _propertyDetails$Prop37.tenantId,
19516
- propertyIds: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop38 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop38 === void 0 ? void 0 : _propertyDetails$Prop38.propertyId
19527
+ tenantId: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop7 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop7 === void 0 ? void 0 : _propertyDetails$Prop7.tenantId,
19528
+ propertyIds: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop8 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop8 === void 0 ? void 0 : _propertyDetails$Prop8.propertyId
19517
19529
  },
19518
19530
  jsonPath: "Properties[0].address.street",
19519
19531
  d: res => {
19520
- let resultString = (_.get(res, "Properties[0].address.doorNo") ? `${_.get(res, "Properties[0].address.doorNo")}, ` : "") + (_.get(res, "Properties[0].address.street") ? `${_.get(res, "Properties[0].address.street")}, ` : "") + (_.get(res, "Properties[0].address.landmark") ? `${_.get(res, "Properties[0].address.landmark")}` : "");
19532
+ let resultString = (lodash.get(res, "Properties[0].address.doorNo") ? `${lodash.get(res, "Properties[0].address.doorNo")}, ` : "") + (lodash.get(res, "Properties[0].address.street") ? `${lodash.get(res, "Properties[0].address.street")}, ` : "") + (lodash.get(res, "Properties[0].address.landmark") ? `${lodash.get(res, "Properties[0].address.landmark")}` : "");
19521
19533
  return resultString;
19522
19534
  },
19523
19535
  isArray: false
19524
19536
  }
19525
19537
  }
19526
- }), /*#__PURE__*/React.createElement(Row, {
19527
- className: "border-none",
19528
- label: t(`PT_MUTATION_STATUS`),
19529
- text: t(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop39 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop39 === void 0 ? void 0 : _propertyDetails$Prop39.status)
19530
- }), /*#__PURE__*/React.createElement("div", {
19531
- style: {
19532
- textAlign: "left"
19533
- }
19534
- }, /*#__PURE__*/React.createElement(Link, {
19535
- 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}`
19536
- }, /*#__PURE__*/React.createElement(LinkButton, {
19537
- style: {
19538
- textAlign: "left"
19539
- },
19540
- label: t("PT_VIEW_MORE_DETAILS")
19541
- })), /*#__PURE__*/React.createElement(Link, {
19542
- to: getChangePropertyPath()
19543
- }, /*#__PURE__*/React.createElement(LinkButton, {
19544
- style: {
19545
- textAlign: "left"
19538
+ }))))) : null, showToast && /*#__PURE__*/React.createElement(Toast, {
19539
+ isDleteBtn: true,
19540
+ labelstyle: {
19541
+ width: "100%"
19546
19542
  },
19547
- label: t("PT_CHANGE_PROPERTY"),
19548
- onClick: () => {
19549
- sessionStorage.setItem("changePropertySelected", "yes");
19550
- sessionStorage.setItem("EditFormData", JSON.stringify(formData));
19543
+ error: showToast.error,
19544
+ warning: showToast.warning,
19545
+ label: t(showToast.label),
19546
+ onClose: () => {
19547
+ setShowToast(null);
19551
19548
  }
19552
- })))), /*#__PURE__*/React.createElement(SubmitBar, {
19553
- style: {
19554
- marginTop: "10px"
19555
- },
19556
- onSubmit: goNext,
19557
- label: t("CS_COMMON_NEXT")
19558
19549
  }))));
19559
19550
  };
19560
19551