@djb25/digit-ui-module-commonpt 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +303 -113
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Loader, VerticalTimeline, FormComposer, Toast, Card, CardText, StatusTable, Row, SubmitBar, Banner, 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,
|
|
1
|
+
import { Loader, VerticalTimeline, FormComposer, Toast, Card, CardText, StatusTable, Row, SubmitBar, Banner, Header, ResponseComposer, Table, Modal, KeyNote, Dropdown, InfoBannerIcon, Localities, OTPInput, CardLabelError, FormStep, UploadFile, RadioButtons, DatePicker, CardSubHeader, PDFSvg, LabelFieldPair, CardLabel, MultiUploadWrapper, CardHeader, CardSectionHeader, CheckBox, TextInput, LinkButton, Close as Close$e, ViewsIcon, BreakLine, TelePhone, DisplayPhotos, EditIcon, CheckPoint, ConnectingCheckPoints, ActionBar, Menu, ButtonSelector, HomeIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, CollapsibleCardPage, AddressDetails, DeleteIcon, MobileNumber, RadioOrSelect, TextArea, SearchForm, SearchField, DetailsCard, TickMark, Label, PropertyHouse, EmployeeModuleCard, CitizenHomeCard, PTIcon } from '@djb25/digit-ui-react-components';
|
|
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';
|
|
@@ -6460,7 +6460,7 @@ const PTAcknowledgement = ({
|
|
|
6460
6460
|
redirectUrl,
|
|
6461
6461
|
userType
|
|
6462
6462
|
}) => {
|
|
6463
|
-
var _location$state, _location$state2, _formData$cptNewPrope2, _formData$cptNewPrope3, _mdmsConfig$PropertyT, _data, _data$locationDet, _data$locationDet2, _data$locationDet2$ci, _data2, _data2$locationDet, _data$locationDet3, _data$locationDet3$ci, _responseData$
|
|
6463
|
+
var _location$state, _location$state2, _formData$cptNewPrope2, _formData$cptNewPrope3, _mdmsConfig$PropertyT, _data, _data$locationDet, _data$locationDet2, _data$locationDet2$ci, _data2, _data2$locationDet, _data$locationDet3, _data$locationDet3$ci, _responseData$Propert6;
|
|
6464
6464
|
const {
|
|
6465
6465
|
t
|
|
6466
6466
|
} = useTranslation();
|
|
@@ -6534,13 +6534,24 @@ const PTAcknowledgement = ({
|
|
|
6534
6534
|
Properties: [propertyFromState]
|
|
6535
6535
|
} : mutation.data;
|
|
6536
6536
|
const onNext = () => {
|
|
6537
|
-
if (
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6537
|
+
if (isMutationSuccess) {
|
|
6538
|
+
var _responseData$Propert, _responseData$Propert2;
|
|
6539
|
+
sessionStorage.setItem("Digit_OBPS_PT", JSON.stringify(responseData === null || responseData === void 0 ? void 0 : (_responseData$Propert = responseData.Properties) === null || _responseData$Propert === void 0 ? void 0 : _responseData$Propert[0]));
|
|
6540
|
+
sessionStorage.setItem("Digit_FSM_PT", JSON.stringify(responseData === null || responseData === void 0 ? void 0 : (_responseData$Propert2 = responseData.Properties) === null || _responseData$Propert2 === void 0 ? void 0 : _responseData$Propert2[0]));
|
|
6541
|
+
const queryParams = new URLSearchParams(location.search);
|
|
6542
|
+
const redirectUrlFromQuery = queryParams.get("redirectToUrl");
|
|
6543
|
+
const finalRedirectUrl = redirectUrl && redirectUrl !== "undefined" ? redirectUrl : redirectUrlFromQuery && redirectUrlFromQuery !== "undefined" ? redirectUrlFromQuery : null;
|
|
6544
|
+
if (finalRedirectUrl) {
|
|
6545
|
+
var _responseData$Propert3, _responseData$Propert4, _location$state3;
|
|
6546
|
+
history.push(`${finalRedirectUrl}?propertyId=${responseData === null || responseData === void 0 ? void 0 : (_responseData$Propert3 = responseData.Properties[0]) === null || _responseData$Propert3 === void 0 ? void 0 : _responseData$Propert3.propertyId}&tenantId=${responseData === null || responseData === void 0 ? void 0 : (_responseData$Propert4 = responseData.Properties[0]) === null || _responseData$Propert4 === void 0 ? void 0 : _responseData$Propert4.tenantId}`, {
|
|
6547
|
+
...(location === null || location === void 0 ? void 0 : (_location$state3 = location.state) === null || _location$state3 === void 0 ? void 0 : _location$state3.prevState)
|
|
6548
|
+
});
|
|
6549
|
+
return;
|
|
6550
|
+
}
|
|
6551
|
+
if (onSelect) {
|
|
6552
|
+
var _responseData$Propert5;
|
|
6542
6553
|
onSelect("cpt", {
|
|
6543
|
-
details: responseData === null || responseData === void 0 ? void 0 : (_responseData$
|
|
6554
|
+
details: responseData === null || responseData === void 0 ? void 0 : (_responseData$Propert5 = responseData.Properties) === null || _responseData$Propert5 === void 0 ? void 0 : _responseData$Propert5[0]
|
|
6544
6555
|
});
|
|
6545
6556
|
}
|
|
6546
6557
|
}
|
|
@@ -6554,7 +6565,7 @@ const PTAcknowledgement = ({
|
|
|
6554
6565
|
rowContainerStyle: rowContainerStyle,
|
|
6555
6566
|
last: true,
|
|
6556
6567
|
label: t("PT_COMMON_TABLE_COL_PT_ID"),
|
|
6557
|
-
text: responseData === null || responseData === void 0 ? void 0 : (_responseData$
|
|
6568
|
+
text: responseData === null || responseData === void 0 ? void 0 : (_responseData$Propert6 = responseData.Properties[0]) === null || _responseData$Propert6 === void 0 ? void 0 : _responseData$Propert6.propertyId,
|
|
6558
6569
|
textStyle: {
|
|
6559
6570
|
whiteSpace: "pre",
|
|
6560
6571
|
width: "200%"
|
|
@@ -6569,10 +6580,12 @@ const PTAcknowledgement = ({
|
|
|
6569
6580
|
const redirectUrlFromQuery = queryParams.get("redirectToUrl");
|
|
6570
6581
|
const finalRedirectUrl = redirectUrl && redirectUrl !== "undefined" ? redirectUrl : redirectUrlFromQuery && redirectUrlFromQuery !== "undefined" ? redirectUrlFromQuery : null;
|
|
6571
6582
|
if (finalRedirectUrl) {
|
|
6572
|
-
var _responseData$
|
|
6573
|
-
history.push(`${finalRedirectUrl}?propertyId=${responseData === null || responseData === void 0 ? void 0 : (_responseData$
|
|
6574
|
-
...(location === null || location === void 0 ? void 0 : (_location$
|
|
6583
|
+
var _responseData$Propert7, _responseData$Propert8, _location$state4;
|
|
6584
|
+
history.push(`${finalRedirectUrl}?propertyId=${responseData === null || responseData === void 0 ? void 0 : (_responseData$Propert7 = responseData.Properties[0]) === null || _responseData$Propert7 === void 0 ? void 0 : _responseData$Propert7.propertyId}&tenantId=${responseData === null || responseData === void 0 ? void 0 : (_responseData$Propert8 = responseData.Properties[0]) === null || _responseData$Propert8 === void 0 ? void 0 : _responseData$Propert8.tenantId}`, {
|
|
6585
|
+
...(location === null || location === void 0 ? void 0 : (_location$state4 = location.state) === null || _location$state4 === void 0 ? void 0 : _location$state4.prevState)
|
|
6575
6586
|
});
|
|
6587
|
+
} else {
|
|
6588
|
+
history.push(window.location.href.includes("/employee/") ? "/digit-ui/employee" : "/digit-ui/citizen");
|
|
6576
6589
|
}
|
|
6577
6590
|
}
|
|
6578
6591
|
})));
|
|
@@ -6599,8 +6612,14 @@ const CreateProperty = ({
|
|
|
6599
6612
|
} = Digit.Hooks.pt.useMDMS(stateId, "PropertyTax", "CommonFieldsConfig");
|
|
6600
6613
|
const search = useLocation().search;
|
|
6601
6614
|
const redirectUrl = new URLSearchParams(search).get('redirectUrl');
|
|
6602
|
-
const createProperty = async () => {
|
|
6603
|
-
history.push(
|
|
6615
|
+
const createProperty = async (key, data) => {
|
|
6616
|
+
history.push({
|
|
6617
|
+
pathname: `${match.path}/save-property`,
|
|
6618
|
+
search: search,
|
|
6619
|
+
state: {
|
|
6620
|
+
property: data === null || data === void 0 ? void 0 : data.property
|
|
6621
|
+
}
|
|
6622
|
+
});
|
|
6604
6623
|
};
|
|
6605
6624
|
const onSuccess = () => {
|
|
6606
6625
|
clearParams();
|
|
@@ -6613,7 +6632,7 @@ const CreateProperty = ({
|
|
|
6613
6632
|
exact: true,
|
|
6614
6633
|
path: `${match.path}`
|
|
6615
6634
|
}, /*#__PURE__*/React.createElement(CreatePropertyForm, {
|
|
6616
|
-
|
|
6635
|
+
onSelect: createProperty,
|
|
6617
6636
|
value: params,
|
|
6618
6637
|
userType: "citizen"
|
|
6619
6638
|
})), /*#__PURE__*/React.createElement(Route, {
|
|
@@ -7620,12 +7639,10 @@ const PropertySearchResults = ({
|
|
|
7620
7639
|
t1 = 5;
|
|
7621
7640
|
}
|
|
7622
7641
|
let filter1 = !isNaN(parseInt(OfsetForSearch)) ? {
|
|
7623
|
-
limit: "5",
|
|
7624
7642
|
sortOrder: "ASC",
|
|
7625
7643
|
sortBy: "createdTime",
|
|
7626
7644
|
offset: off
|
|
7627
7645
|
} : {
|
|
7628
|
-
limit: "5",
|
|
7629
7646
|
sortOrder: "ASC",
|
|
7630
7647
|
sortBy: "createdTime",
|
|
7631
7648
|
offset: "0"
|
|
@@ -7846,6 +7863,8 @@ const PropertySearchResults = ({
|
|
|
7846
7863
|
data: searchResults,
|
|
7847
7864
|
totalCount: searchResults === null || searchResults === void 0 ? void 0 : searchResults.length,
|
|
7848
7865
|
totalRecords: searchResults === null || searchResults === void 0 ? void 0 : searchResults.length,
|
|
7866
|
+
manualPagination: false,
|
|
7867
|
+
disableSort: true,
|
|
7849
7868
|
columns: [{
|
|
7850
7869
|
Header: t("PT_PROPERTY_PTUID"),
|
|
7851
7870
|
disableSortBy: true,
|
|
@@ -7931,14 +7950,14 @@ const SearchProperty = ({
|
|
|
7931
7950
|
} = Digit.Hooks.useQueryParams();
|
|
7932
7951
|
const [searchData, setSearchData] = useState(() => {
|
|
7933
7952
|
var _Digit$UserService$ge, _Digit$UserService$ge2;
|
|
7934
|
-
const isFirstVisit = sessionStorage.getItem("VisitedCitizenSearchRedirect");
|
|
7935
7953
|
const mobileNumber = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.mobileNumber;
|
|
7936
|
-
|
|
7937
|
-
|
|
7954
|
+
const tenantId = Digit.ULBService.getCurrentTenantId() || Digit.ULBService.getStateId() || "dl";
|
|
7955
|
+
if (mobileNumber && window.location.href.includes("digit-ui/citizen/commonpt/property/citizen-search")) {
|
|
7938
7956
|
return {
|
|
7939
7957
|
filters: {
|
|
7940
7958
|
mobileNumber
|
|
7941
|
-
}
|
|
7959
|
+
},
|
|
7960
|
+
city: tenantId
|
|
7942
7961
|
};
|
|
7943
7962
|
}
|
|
7944
7963
|
return {};
|
|
@@ -8179,6 +8198,35 @@ const SearchProperty = ({
|
|
|
8179
8198
|
validation: mobileNumber === null || mobileNumber === void 0 ? void 0 : mobileNumber.validation
|
|
8180
8199
|
},
|
|
8181
8200
|
isMandatory: false
|
|
8201
|
+
}, {
|
|
8202
|
+
label: "",
|
|
8203
|
+
labelChildren: /*#__PURE__*/React.createElement("div", {
|
|
8204
|
+
className: "tooltip"
|
|
8205
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
8206
|
+
style: {
|
|
8207
|
+
display: "flex",
|
|
8208
|
+
gap: "0 4px"
|
|
8209
|
+
}
|
|
8210
|
+
}, /*#__PURE__*/React.createElement("h2", null, t(property.label)), /*#__PURE__*/React.createElement(InfoBannerIcon, {
|
|
8211
|
+
fill: "#0b0c0c"
|
|
8212
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
8213
|
+
className: "tooltiptext",
|
|
8214
|
+
style: {
|
|
8215
|
+
position: "absolute",
|
|
8216
|
+
width: "72%",
|
|
8217
|
+
marginLeft: "50%",
|
|
8218
|
+
fontSize: "medium"
|
|
8219
|
+
}
|
|
8220
|
+
}, t(property.description) + " " + "PG-PT-xxxx-xxxxxx"))),
|
|
8221
|
+
type: property.type,
|
|
8222
|
+
populators: {
|
|
8223
|
+
name: property.name,
|
|
8224
|
+
defaultValue: "",
|
|
8225
|
+
validation: property === null || property === void 0 ? void 0 : property.validation
|
|
8226
|
+
},
|
|
8227
|
+
isMandatory: false,
|
|
8228
|
+
isInsideBox: true,
|
|
8229
|
+
placementinbox: 1
|
|
8182
8230
|
}],
|
|
8183
8231
|
body1: [{
|
|
8184
8232
|
label: "PT_SELECT_CITY",
|
|
@@ -8470,8 +8518,20 @@ const SearchProperty = ({
|
|
|
8470
8518
|
fontWeight: action == 0 ? "bold" : "normal"
|
|
8471
8519
|
},
|
|
8472
8520
|
onClick: () => {
|
|
8521
|
+
var _Digit$UserService$ge5, _Digit$UserService$ge6;
|
|
8473
8522
|
history.replace(`${history.location.pathname}?action=0`);
|
|
8474
|
-
|
|
8523
|
+
const mobileNumber = (_Digit$UserService$ge5 = Digit.UserService.getUser()) === null || _Digit$UserService$ge5 === void 0 ? void 0 : (_Digit$UserService$ge6 = _Digit$UserService$ge5.info) === null || _Digit$UserService$ge6 === void 0 ? void 0 : _Digit$UserService$ge6.mobileNumber;
|
|
8524
|
+
const tenantId = Digit.ULBService.getCurrentTenantId() || Digit.ULBService.getStateId() || "dl";
|
|
8525
|
+
if (mobileNumber) {
|
|
8526
|
+
setSearchData({
|
|
8527
|
+
filters: {
|
|
8528
|
+
mobileNumber
|
|
8529
|
+
},
|
|
8530
|
+
city: tenantId
|
|
8531
|
+
});
|
|
8532
|
+
} else {
|
|
8533
|
+
setSearchData({});
|
|
8534
|
+
}
|
|
8475
8535
|
}
|
|
8476
8536
|
}, t("PT_KNOW_PTID")), /*#__PURE__*/React.createElement("div", {
|
|
8477
8537
|
className: `search-tab ${action == 1 ? "active" : ""}`,
|
|
@@ -8483,8 +8543,20 @@ const SearchProperty = ({
|
|
|
8483
8543
|
fontWeight: action == 1 ? "bold" : "normal"
|
|
8484
8544
|
},
|
|
8485
8545
|
onClick: () => {
|
|
8546
|
+
var _Digit$UserService$ge7, _Digit$UserService$ge8;
|
|
8486
8547
|
history.replace(`${history.location.pathname}?action=1`);
|
|
8487
|
-
|
|
8548
|
+
const mobileNumber = (_Digit$UserService$ge7 = Digit.UserService.getUser()) === null || _Digit$UserService$ge7 === void 0 ? void 0 : (_Digit$UserService$ge8 = _Digit$UserService$ge7.info) === null || _Digit$UserService$ge8 === void 0 ? void 0 : _Digit$UserService$ge8.mobileNumber;
|
|
8549
|
+
const tenantId = Digit.ULBService.getCurrentTenantId() || Digit.ULBService.getStateId() || "dl";
|
|
8550
|
+
if (mobileNumber) {
|
|
8551
|
+
setSearchData({
|
|
8552
|
+
filters: {
|
|
8553
|
+
mobileNumber
|
|
8554
|
+
},
|
|
8555
|
+
city: tenantId
|
|
8556
|
+
});
|
|
8557
|
+
} else {
|
|
8558
|
+
setSearchData({});
|
|
8559
|
+
}
|
|
8488
8560
|
}
|
|
8489
8561
|
}, t("PT_SEARCH_DOOR_NO")), /*#__PURE__*/React.createElement("div", {
|
|
8490
8562
|
style: {
|
|
@@ -14001,7 +14073,7 @@ function PropertyDocuments({
|
|
|
14001
14073
|
}));
|
|
14002
14074
|
};
|
|
14003
14075
|
const renderDocumentRow = (value, index) => {
|
|
14004
|
-
var _pdfFiles$value$fileS, _value$originalDoc, _value$
|
|
14076
|
+
var _pdfFiles$value$fileS, _value$originalDoc, _value$originalDoc2, _value$originalDoc3;
|
|
14005
14077
|
const fileUrl = (_pdfFiles$value$fileS = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS === void 0 ? void 0 : _pdfFiles$value$fileS.split(",")[0];
|
|
14006
14078
|
const docSubType = getDocSubType(value === null || value === void 0 ? void 0 : value.documentType);
|
|
14007
14079
|
const docUid = (value === null || value === void 0 ? void 0 : value.documentUid) || "";
|
|
@@ -14084,19 +14156,17 @@ function PropertyDocuments({
|
|
|
14084
14156
|
margin: 0
|
|
14085
14157
|
}
|
|
14086
14158
|
}, /*#__PURE__*/React.createElement("input", {
|
|
14159
|
+
key: `chk-${value === null || value === void 0 ? void 0 : (_value$originalDoc = value.originalDoc) === null || _value$originalDoc === void 0 ? void 0 : _value$originalDoc.id}-${value === null || value === void 0 ? void 0 : (_value$originalDoc2 = value.originalDoc) === null || _value$originalDoc2 === void 0 ? void 0 : _value$originalDoc2.isVerified}`,
|
|
14087
14160
|
type: "checkbox",
|
|
14088
14161
|
style: {
|
|
14089
14162
|
width: "18px",
|
|
14090
14163
|
height: "18px",
|
|
14091
14164
|
accentColor: "#F47738"
|
|
14092
14165
|
},
|
|
14093
|
-
defaultChecked: value === null || value === void 0 ? void 0 : (_value$
|
|
14166
|
+
defaultChecked: value === null || value === void 0 ? void 0 : (_value$originalDoc3 = value.originalDoc) === null || _value$originalDoc3 === void 0 ? void 0 : _value$originalDoc3.isVerified,
|
|
14094
14167
|
onChange: e => {
|
|
14095
14168
|
if (value !== null && value !== void 0 && value.originalDoc) {
|
|
14096
|
-
|
|
14097
|
-
value.originalDoc.additionalDetails = {};
|
|
14098
|
-
}
|
|
14099
|
-
value.originalDoc.additionalDetails.isDocumentVerified = e.target.checked;
|
|
14169
|
+
value.originalDoc.isVerified = e.target.checked;
|
|
14100
14170
|
}
|
|
14101
14171
|
}
|
|
14102
14172
|
}), "Check Verified"))
|
|
@@ -17238,8 +17308,14 @@ const NewApplication = ({
|
|
|
17238
17308
|
} = Digit.Hooks.pt.useMDMS(stateId, "PropertyTax", "CommonFieldsConfig");
|
|
17239
17309
|
const search = useLocation().search;
|
|
17240
17310
|
const redirectUrl = new URLSearchParams(search).get('redirectToUrl');
|
|
17241
|
-
const createProperty = async () => {
|
|
17242
|
-
history.push(
|
|
17311
|
+
const createProperty = async (key, data) => {
|
|
17312
|
+
history.push({
|
|
17313
|
+
pathname: `${match.path}/save-property`,
|
|
17314
|
+
search: search,
|
|
17315
|
+
state: {
|
|
17316
|
+
property: data === null || data === void 0 ? void 0 : data.property
|
|
17317
|
+
}
|
|
17318
|
+
});
|
|
17243
17319
|
};
|
|
17244
17320
|
const onSuccess = () => {
|
|
17245
17321
|
clearParams();
|
|
@@ -17252,7 +17328,7 @@ const NewApplication = ({
|
|
|
17252
17328
|
exact: true,
|
|
17253
17329
|
path: `${match.path}`
|
|
17254
17330
|
}, /*#__PURE__*/React.createElement(CreatePropertyForm, {
|
|
17255
|
-
|
|
17331
|
+
onSelect: createProperty,
|
|
17256
17332
|
value: params,
|
|
17257
17333
|
userType: "employee"
|
|
17258
17334
|
})), /*#__PURE__*/React.createElement(Route, {
|
|
@@ -17416,7 +17492,7 @@ const Search = ({
|
|
|
17416
17492
|
}
|
|
17417
17493
|
});
|
|
17418
17494
|
if (isLoading) return /*#__PURE__*/React.createElement(Loader, null);
|
|
17419
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
17495
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(SearchComponent, {
|
|
17420
17496
|
t: t,
|
|
17421
17497
|
payload: formData,
|
|
17422
17498
|
searchBy: searchBy,
|
|
@@ -17425,7 +17501,7 @@ const Search = ({
|
|
|
17425
17501
|
tenantId: tenantId,
|
|
17426
17502
|
onSubmit: onSubmit,
|
|
17427
17503
|
onReset: onReset
|
|
17428
|
-
}), Object.keys(payload).length > 0 && /*#__PURE__*/React.createElement(SearchResultComponent, {
|
|
17504
|
+
})), Object.keys(payload).length > 0 && /*#__PURE__*/React.createElement(SearchResultComponent, {
|
|
17429
17505
|
t: t,
|
|
17430
17506
|
showToast: showToast,
|
|
17431
17507
|
setShowToast: setShowToast,
|
|
@@ -18775,17 +18851,34 @@ const PropertyWaterConnection = ({
|
|
|
18775
18851
|
|
|
18776
18852
|
const SwitchComponent = props => {
|
|
18777
18853
|
return /*#__PURE__*/React.createElement("div", {
|
|
18778
|
-
className: "
|
|
18779
|
-
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
|
|
18783
|
-
|
|
18784
|
-
|
|
18785
|
-
props.onSwitch(key);
|
|
18786
|
-
props.onReset();
|
|
18854
|
+
className: "search-tabs-container PropertySearchFormSwitcher",
|
|
18855
|
+
style: {
|
|
18856
|
+
marginBottom: "16px",
|
|
18857
|
+
display: "flex",
|
|
18858
|
+
gap: "24px",
|
|
18859
|
+
justifyContent: "flex-start",
|
|
18860
|
+
borderBottom: "1px solid #ccc"
|
|
18787
18861
|
}
|
|
18788
|
-
}, props.
|
|
18862
|
+
}, props.keys.map(key => {
|
|
18863
|
+
const isSelected = props.searchBy === key;
|
|
18864
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
18865
|
+
key: key,
|
|
18866
|
+
className: `search-tab ${isSelected ? "active" : ""}`,
|
|
18867
|
+
style: {
|
|
18868
|
+
padding: "8px 16px",
|
|
18869
|
+
cursor: "pointer",
|
|
18870
|
+
borderBottom: isSelected ? "2px solid #f47738" : "2px solid transparent",
|
|
18871
|
+
color: isSelected ? "#f47738" : "#0b0c0c",
|
|
18872
|
+
fontWeight: isSelected ? "bold" : "normal"
|
|
18873
|
+
},
|
|
18874
|
+
onClick: () => {
|
|
18875
|
+
key === "searchDetail" && !sessionStorage.getItem("searchDetailValue") ? sessionStorage.setItem("searchDetailValue", 1) : "";
|
|
18876
|
+
key === "searchId" && sessionStorage.getItem("searchDetailValue") == 1 ? sessionStorage.setItem("searchDetailValue", 2) : "";
|
|
18877
|
+
props.onSwitch(key);
|
|
18878
|
+
props.onReset();
|
|
18879
|
+
}
|
|
18880
|
+
}, props.t(`PT_SEARCH_BY_${key === null || key === void 0 ? void 0 : key.toUpperCase()}`));
|
|
18881
|
+
}));
|
|
18789
18882
|
};
|
|
18790
18883
|
const SearchPTID = ({
|
|
18791
18884
|
tenantId,
|
|
@@ -18869,16 +18962,26 @@ const SearchPTID = ({
|
|
|
18869
18962
|
})), /*#__PURE__*/React.createElement("div", {
|
|
18870
18963
|
className: "formcomposer-section-button",
|
|
18871
18964
|
style: {
|
|
18872
|
-
marginTop: "16px"
|
|
18965
|
+
marginTop: "16px",
|
|
18966
|
+
display: "flex",
|
|
18967
|
+
justifyContent: "space-between",
|
|
18968
|
+
alignItems: "center",
|
|
18969
|
+
width: "100%"
|
|
18970
|
+
}
|
|
18971
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
18972
|
+
className: "pt-search-action-reset generic-button clear-search",
|
|
18973
|
+
style: {
|
|
18974
|
+
margin: 0
|
|
18873
18975
|
}
|
|
18874
|
-
}, /*#__PURE__*/React.createElement(SearchField, {
|
|
18875
|
-
className: "pt-search-action-reset generic-button clear-search"
|
|
18876
18976
|
}, /*#__PURE__*/React.createElement("p", {
|
|
18877
18977
|
onClick: () => {
|
|
18878
18978
|
onReset({});
|
|
18879
18979
|
}
|
|
18880
|
-
}, t(`
|
|
18881
|
-
className: "pt-search-action-submit submit-bar generic-button"
|
|
18980
|
+
}, t(`ES_COMMON_CLEAR_SEARCH`))), /*#__PURE__*/React.createElement("div", {
|
|
18981
|
+
className: "pt-search-action-submit submit-bar generic-button",
|
|
18982
|
+
style: {
|
|
18983
|
+
margin: 0
|
|
18984
|
+
}
|
|
18882
18985
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
18883
18986
|
label: t("ES_COMMON_SEARCH"),
|
|
18884
18987
|
submit: true
|
|
@@ -19303,7 +19406,7 @@ const PropertySearchNSummary = ({
|
|
|
19303
19406
|
formState,
|
|
19304
19407
|
clearErrors
|
|
19305
19408
|
}) => {
|
|
19306
|
-
var _formData$cptId, _formData$
|
|
19409
|
+
var _formData$cptId, _Digit$UserService$ge, _Digit$UserService$ge2, _Digit$UserService$ge3, _Digit$UserService$ge4, _formData$cpt, _formData$cpt3, _formData$cpt3$detail, _propertyDetails$Prop2, _formData$tradedetils, _formData$tradedetils2, _formData$tradedetils3, _propertyDetails$Prop3, _propertyDetails$Prop4, _activeProperty$owner, _activeProperty$owner2;
|
|
19307
19410
|
const {
|
|
19308
19411
|
t
|
|
19309
19412
|
} = useTranslation();
|
|
@@ -19321,33 +19424,40 @@ const PropertySearchNSummary = ({
|
|
|
19321
19424
|
const urlPropertyId = new URLSearchParams(search).get("propertyId");
|
|
19322
19425
|
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
19426
|
const [searchPropertyId, setSearchPropertyId] = useState(urlPropertyId !== "null" ? urlPropertyId : "");
|
|
19427
|
+
const [mobileNumber, setMobileNumber] = useState("");
|
|
19428
|
+
const [searchMobileNumber, setSearchMobileNumber] = useState("");
|
|
19324
19429
|
const [showToast, setShowToast] = useState(null);
|
|
19325
19430
|
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
19326
|
-
const
|
|
19431
|
+
const userMobileNumber = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.mobileNumber;
|
|
19432
|
+
const isCitizen = ((_Digit$UserService$ge3 = Digit.UserService.getUser()) === null || _Digit$UserService$ge3 === void 0 ? void 0 : (_Digit$UserService$ge4 = _Digit$UserService$ge3.info) === null || _Digit$UserService$ge4 === void 0 ? void 0 : _Digit$UserService$ge4.type) === "CITIZEN";
|
|
19433
|
+
const isWsApplication = window.location.href.includes("/ws/");
|
|
19434
|
+
const [selectedProperty, setSelectedProperty] = useState((formData === null || formData === void 0 ? void 0 : (_formData$cpt = formData.cpt) === null || _formData$cpt === void 0 ? void 0 : _formData$cpt.details) || null);
|
|
19435
|
+
const searchFilters = isCitizen && isWsApplication ? {
|
|
19436
|
+
mobileNumber: userMobileNumber
|
|
19437
|
+
} : searchMobileNumber ? {
|
|
19438
|
+
mobileNumber: searchMobileNumber
|
|
19439
|
+
} : {
|
|
19440
|
+
propertyIds: searchPropertyId
|
|
19441
|
+
};
|
|
19327
19442
|
const {
|
|
19328
19443
|
isLoading,
|
|
19329
19444
|
isError,
|
|
19330
19445
|
error,
|
|
19331
19446
|
data: propertyDetails
|
|
19332
19447
|
} = Digit.Hooks.pt.usePropertySearch({
|
|
19333
|
-
filters:
|
|
19334
|
-
propertyIds: searchPropertyId
|
|
19335
|
-
},
|
|
19448
|
+
filters: searchFilters,
|
|
19336
19449
|
tenantId: tenantId
|
|
19337
19450
|
}, {
|
|
19338
|
-
filters:
|
|
19339
|
-
propertyIds: searchPropertyId
|
|
19340
|
-
},
|
|
19451
|
+
filters: searchFilters,
|
|
19341
19452
|
tenantId: tenantId,
|
|
19342
|
-
enabled: searchPropertyId ? true : false,
|
|
19453
|
+
enabled: isCitizen && isWsApplication && userMobileNumber || !isCitizen && (searchPropertyId || searchMobileNumber) || isCitizen && !isWsApplication && (searchPropertyId || searchMobileNumber) ? true : false,
|
|
19343
19454
|
privacy: Digit.Utils.getPrivacyObject()
|
|
19344
19455
|
});
|
|
19345
19456
|
useEffect(() => {
|
|
19346
19457
|
if (propertyId && (window.location.href.includes("/renew-application-details/") || window.location.href.includes("/edit-application-details/"))) setSearchPropertyId(propertyId);
|
|
19347
19458
|
}, [propertyId]);
|
|
19348
19459
|
useEffect(() => {
|
|
19349
|
-
|
|
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) {
|
|
19460
|
+
if (isLoading == false && error && error == true) {
|
|
19351
19461
|
setShowToast({
|
|
19352
19462
|
error: true,
|
|
19353
19463
|
label: "PT_ENTER_VALID_PROPERTY_ID"
|
|
@@ -19355,29 +19465,28 @@ const PropertySearchNSummary = ({
|
|
|
19355
19465
|
}
|
|
19356
19466
|
}, [error, propertyDetails]);
|
|
19357
19467
|
useEffect(() => {
|
|
19358
|
-
|
|
19359
|
-
|
|
19360
|
-
|
|
19361
|
-
|
|
19362
|
-
|
|
19363
|
-
|
|
19364
|
-
|
|
19365
|
-
|
|
19366
|
-
|
|
19367
|
-
|
|
19368
|
-
|
|
19369
|
-
|
|
19468
|
+
var _formData$cpt2, _formData$cpt2$detail, _propertyDetails$Prop;
|
|
19469
|
+
const currentCptId = formData === null || formData === void 0 ? void 0 : (_formData$cpt2 = formData.cpt) === null || _formData$cpt2 === void 0 ? void 0 : (_formData$cpt2$detail = _formData$cpt2.details) === null || _formData$cpt2$detail === void 0 ? void 0 : _formData$cpt2$detail.propertyId;
|
|
19470
|
+
if ((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop = propertyDetails.Properties) === null || _propertyDetails$Prop === void 0 ? void 0 : _propertyDetails$Prop.length) > 0) {
|
|
19471
|
+
if (propertyDetails.Properties.length === 1 && !selectedProperty) {
|
|
19472
|
+
const fetchedId = propertyDetails.Properties[0].propertyId;
|
|
19473
|
+
setSelectedProperty(propertyDetails.Properties[0]);
|
|
19474
|
+
if (currentCptId !== fetchedId) {
|
|
19475
|
+
onSelect("cpt", {
|
|
19476
|
+
details: propertyDetails.Properties[0]
|
|
19477
|
+
});
|
|
19478
|
+
sessionStorage.setItem("Digit_FSM_PT", JSON.stringify(propertyDetails.Properties[0]));
|
|
19479
|
+
localStorage.setItem("pgrProperty", JSON.stringify(propertyDetails.Properties[0]));
|
|
19480
|
+
}
|
|
19481
|
+
}
|
|
19370
19482
|
}
|
|
19371
|
-
|
|
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
|
-
};
|
|
19483
|
+
}, [propertyDetails, pathname, isCitizen, isWsApplication, formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : (_formData$cpt3$detail = _formData$cpt3.details) === null || _formData$cpt3$detail === void 0 ? void 0 : _formData$cpt3$detail.propertyId]);
|
|
19378
19484
|
const clearSearch = () => {
|
|
19379
19485
|
setPropertyId("");
|
|
19380
19486
|
setSearchPropertyId("");
|
|
19487
|
+
setMobileNumber("");
|
|
19488
|
+
setSearchMobileNumber("");
|
|
19489
|
+
setSelectedProperty(null);
|
|
19381
19490
|
onSelect(config === null || config === void 0 ? void 0 : config.key, {
|
|
19382
19491
|
id: ""
|
|
19383
19492
|
});
|
|
@@ -19387,9 +19496,9 @@ const PropertySearchNSummary = ({
|
|
|
19387
19496
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
19388
19497
|
}
|
|
19389
19498
|
let propertyAddress = "";
|
|
19390
|
-
|
|
19391
|
-
|
|
19392
|
-
propertyAddress = getAddress(
|
|
19499
|
+
const activeProperty = selectedProperty ? selectedProperty : (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop2 = propertyDetails.Properties) === null || _propertyDetails$Prop2 === void 0 ? void 0 : _propertyDetails$Prop2.length) === 1 ? propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties[0] : null;
|
|
19500
|
+
if (activeProperty) {
|
|
19501
|
+
propertyAddress = getAddress(activeProperty === null || activeProperty === void 0 ? void 0 : activeProperty.address, t);
|
|
19393
19502
|
}
|
|
19394
19503
|
const getInputStyles = () => {
|
|
19395
19504
|
if (window.location.href.includes("/ws/")) {
|
|
@@ -19401,53 +19510,132 @@ const PropertySearchNSummary = ({
|
|
|
19401
19510
|
const getOwnerNames = propertyData => {
|
|
19402
19511
|
var _propertyData$owners, _getActiveOwners$sort, _getActiveOwners$sort2;
|
|
19403
19512
|
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) => {
|
|
19513
|
+
const getOwnersList = getActiveOwners === null || getActiveOwners === void 0 ? void 0 : (_getActiveOwners$sort = getActiveOwners.sort((a, b) => {
|
|
19405
19514
|
var _a$additionalDetails, _b$additionalDetails;
|
|
19406
19515
|
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
19516
|
})) === 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
19517
|
return getOwnersList ? getOwnersList : t("NA");
|
|
19409
19518
|
};
|
|
19410
19519
|
if (window.location.href.includes("/ws/")) ;
|
|
19520
|
+
const onPropertySelect = property => {
|
|
19521
|
+
setSelectedProperty(property);
|
|
19522
|
+
onSelect("cpt", {
|
|
19523
|
+
details: property
|
|
19524
|
+
});
|
|
19525
|
+
sessionStorage.setItem("Digit_FSM_PT", JSON.stringify(property));
|
|
19526
|
+
localStorage.setItem("pgrProperty", JSON.stringify(property));
|
|
19527
|
+
};
|
|
19411
19528
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CollapsibleCardPage, {
|
|
19412
19529
|
title: t("PT_PROPERTY_SEARCH"),
|
|
19413
19530
|
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,
|
|
19531
|
+
}, (window.location.href.includes("/tl/") ? !((formData === null || formData === void 0 ? void 0 : (_formData$tradedetils = formData.tradedetils) === null || _formData$tradedetils === void 0 ? void 0 : (_formData$tradedetils2 = _formData$tradedetils[0]) === null || _formData$tradedetils2 === void 0 ? void 0 : (_formData$tradedetils3 = _formData$tradedetils2.structureType) === null || _formData$tradedetils3 === void 0 ? void 0 : _formData$tradedetils3.code) === "MOVABLE") && (isEmpNewApplication || isEmpRenewLicense) : true) && /*#__PURE__*/React.createElement(React.Fragment, null, isCitizen && isWsApplication ? /*#__PURE__*/React.createElement("div", {
|
|
19532
|
+
className: "formcomposer-section-grid",
|
|
19533
|
+
style: isMobile ? {} : {}
|
|
19534
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19535
|
+
style: {
|
|
19536
|
+
marginBottom: "16px"
|
|
19537
|
+
}
|
|
19538
|
+
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(Label, {
|
|
19415
19539
|
style: getInputStyles()
|
|
19416
|
-
}, `${t(
|
|
19540
|
+
}, `${t("PROPERTY_ID")}`), /*#__PURE__*/React.createElement("div", {
|
|
19541
|
+
style: {
|
|
19542
|
+
display: "flex",
|
|
19543
|
+
gap: "12px",
|
|
19544
|
+
width: "100%",
|
|
19545
|
+
flexDirection: "column"
|
|
19546
|
+
}
|
|
19547
|
+
}, isLoading ? /*#__PURE__*/React.createElement("div", null, t("CS_COMMON_LOADING")) : propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.Properties && (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop3 = propertyDetails.Properties) === null || _propertyDetails$Prop3 === void 0 ? void 0 : _propertyDetails$Prop3.length) > 0 ? /*#__PURE__*/React.createElement(Dropdown, {
|
|
19548
|
+
option: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties,
|
|
19549
|
+
optionKey: "propertyId",
|
|
19550
|
+
id: "propertyId",
|
|
19551
|
+
selected: selectedProperty,
|
|
19552
|
+
select: onPropertySelect,
|
|
19553
|
+
t: t,
|
|
19554
|
+
placeholder: t("PT_SELECT_PROPERTY")
|
|
19555
|
+
}) : /*#__PURE__*/React.createElement("span", {
|
|
19556
|
+
onClick: () => history.push(`/digit-ui/${userType}/${pathname.split("/")[3]}/create-application/create-property?redirectToUrl=${window.location.pathname}`, {
|
|
19557
|
+
...state,
|
|
19558
|
+
...formData
|
|
19559
|
+
})
|
|
19560
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
19561
|
+
className: "submit-bar",
|
|
19562
|
+
type: "button",
|
|
19563
|
+
style: {
|
|
19564
|
+
color: "white"
|
|
19565
|
+
}
|
|
19566
|
+
}, t("CPT_CREATE_PROPERTY"))))))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
19417
19567
|
style: {
|
|
19418
19568
|
display: "flex",
|
|
19419
|
-
|
|
19569
|
+
flexDirection: isMobile ? "column" : "row",
|
|
19570
|
+
gap: "16px",
|
|
19571
|
+
width: "100%",
|
|
19572
|
+
alignItems: "flex-end",
|
|
19573
|
+
marginBottom: "16px"
|
|
19420
19574
|
}
|
|
19421
|
-
}, /*#__PURE__*/React.createElement(
|
|
19422
|
-
|
|
19423
|
-
|
|
19575
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19576
|
+
style: {
|
|
19577
|
+
flex: 1
|
|
19578
|
+
}
|
|
19579
|
+
}, /*#__PURE__*/React.createElement(Label, null, `${t("CORE_COMMON_MOBILE_NUMBER")}`), /*#__PURE__*/React.createElement(TextInput, {
|
|
19580
|
+
value: mobileNumber,
|
|
19424
19581
|
onChange: e => {
|
|
19425
|
-
|
|
19426
|
-
|
|
19427
|
-
|
|
19428
|
-
|
|
19582
|
+
const val = e.target.value;
|
|
19583
|
+
if (val.length <= 10) {
|
|
19584
|
+
setMobileNumber(val);
|
|
19585
|
+
if (val.length === 10) {
|
|
19586
|
+
setSearchMobileNumber(val);
|
|
19587
|
+
}
|
|
19588
|
+
}
|
|
19429
19589
|
},
|
|
19430
19590
|
style: {
|
|
19431
|
-
width: "
|
|
19432
|
-
float: "left"
|
|
19591
|
+
width: "100%"
|
|
19433
19592
|
},
|
|
19434
|
-
placeholder: `${t("
|
|
19435
|
-
|
|
19436
|
-
|
|
19437
|
-
type: "button",
|
|
19593
|
+
placeholder: `${t("PT_ENTER_MOBILE_NUMBER")}`,
|
|
19594
|
+
maxLength: 10
|
|
19595
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
19438
19596
|
style: {
|
|
19439
|
-
|
|
19440
|
-
}
|
|
19441
|
-
|
|
19442
|
-
|
|
19597
|
+
flex: 1
|
|
19598
|
+
}
|
|
19599
|
+
}, /*#__PURE__*/React.createElement(Label, null, `${t("PROPERTY_ID")}`), isLoading ? /*#__PURE__*/React.createElement("div", null, t("CS_COMMON_LOADING")) : /*#__PURE__*/React.createElement(Dropdown, {
|
|
19600
|
+
option: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties) || [],
|
|
19601
|
+
optionKey: "propertyId",
|
|
19602
|
+
id: "propertyId",
|
|
19603
|
+
selected: selectedProperty,
|
|
19604
|
+
select: onPropertySelect,
|
|
19605
|
+
t: t,
|
|
19606
|
+
placeholder: t("PT_SELECT_PROPERTY")
|
|
19607
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
19608
|
+
style: {
|
|
19609
|
+
flex: 1
|
|
19610
|
+
}
|
|
19611
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
19443
19612
|
className: "submit-bar",
|
|
19444
19613
|
type: "button",
|
|
19445
19614
|
style: {
|
|
19446
|
-
color: "white"
|
|
19615
|
+
color: "white",
|
|
19616
|
+
width: "100%",
|
|
19617
|
+
margin: 0
|
|
19447
19618
|
},
|
|
19448
19619
|
onClick: clearSearch
|
|
19449
|
-
}, `${t("CLEAR")}`), /*#__PURE__*/React.createElement("
|
|
19450
|
-
|
|
19620
|
+
}, `${t("CLEAR")}`)), /*#__PURE__*/React.createElement("div", {
|
|
19621
|
+
style: {
|
|
19622
|
+
flex: 1
|
|
19623
|
+
}
|
|
19624
|
+
}, searchMobileNumber && (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop4 = propertyDetails.Properties) === null || _propertyDetails$Prop4 === void 0 ? void 0 : _propertyDetails$Prop4.length) === 0 && /*#__PURE__*/React.createElement("div", {
|
|
19625
|
+
style: {
|
|
19626
|
+
display: "flex",
|
|
19627
|
+
flexDirection: "column",
|
|
19628
|
+
gap: "8px"
|
|
19629
|
+
}
|
|
19630
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
19631
|
+
style: {
|
|
19632
|
+
color: "#d60505",
|
|
19633
|
+
fontWeight: "bold",
|
|
19634
|
+
fontSize: "12px",
|
|
19635
|
+
lineHeight: "1"
|
|
19636
|
+
}
|
|
19637
|
+
}, "No property created this number"), /*#__PURE__*/React.createElement("span", {
|
|
19638
|
+
onClick: () => history.push(`/digit-ui/${userType}/${pathname.split("/")[3]}/create-application/create-property?redirectToUrl=${window.location.pathname}`, {
|
|
19451
19639
|
...state,
|
|
19452
19640
|
...formData
|
|
19453
19641
|
})
|
|
@@ -19455,9 +19643,11 @@ const PropertySearchNSummary = ({
|
|
|
19455
19643
|
className: "submit-bar",
|
|
19456
19644
|
type: "button",
|
|
19457
19645
|
style: {
|
|
19458
|
-
color: "white"
|
|
19646
|
+
color: "white",
|
|
19647
|
+
width: "100%",
|
|
19648
|
+
margin: 0
|
|
19459
19649
|
}
|
|
19460
|
-
}, t("CPT_CREATE_PROPERTY"))))),
|
|
19650
|
+
}, t("CPT_CREATE_PROPERTY"))))))), activeProperty ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
|
|
19461
19651
|
className: "card-with-background",
|
|
19462
19652
|
style: {
|
|
19463
19653
|
margin: "16px 0px",
|
|
@@ -19485,7 +19675,7 @@ const PropertySearchNSummary = ({
|
|
|
19485
19675
|
color: "#000"
|
|
19486
19676
|
},
|
|
19487
19677
|
label: t(`PROPERTY_ID`),
|
|
19488
|
-
text:
|
|
19678
|
+
text: activeProperty === null || activeProperty === void 0 ? void 0 : activeProperty.propertyId
|
|
19489
19679
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
19490
19680
|
className: "border-none",
|
|
19491
19681
|
labelStyle: isMobile ? {
|
|
@@ -19499,7 +19689,7 @@ const PropertySearchNSummary = ({
|
|
|
19499
19689
|
color: "#000"
|
|
19500
19690
|
},
|
|
19501
19691
|
label: t(`OWNER_NAME`),
|
|
19502
|
-
text: getOwnerNames(
|
|
19692
|
+
text: getOwnerNames(activeProperty)
|
|
19503
19693
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
19504
19694
|
className: "border-none",
|
|
19505
19695
|
labelStyle: isMobile ? {
|
|
@@ -19516,7 +19706,7 @@ const PropertySearchNSummary = ({
|
|
|
19516
19706
|
label: t(`PROPERTY_ADDRESS`),
|
|
19517
19707
|
text: propertyAddress,
|
|
19518
19708
|
privacy: {
|
|
19519
|
-
uuid:
|
|
19709
|
+
uuid: activeProperty === null || activeProperty === void 0 ? void 0 : (_activeProperty$owner = activeProperty.owners) === null || _activeProperty$owner === void 0 ? void 0 : (_activeProperty$owner2 = _activeProperty$owner[0]) === null || _activeProperty$owner2 === void 0 ? void 0 : _activeProperty$owner2.uuid,
|
|
19520
19710
|
fieldName: ["doorNo", "street", "landmark"],
|
|
19521
19711
|
model: "Property",
|
|
19522
19712
|
showValue: true,
|
|
@@ -19524,8 +19714,8 @@ const PropertySearchNSummary = ({
|
|
|
19524
19714
|
serviceName: "/property-services/property/_search",
|
|
19525
19715
|
requestBody: {},
|
|
19526
19716
|
requestParam: {
|
|
19527
|
-
tenantId:
|
|
19528
|
-
propertyIds:
|
|
19717
|
+
tenantId: activeProperty === null || activeProperty === void 0 ? void 0 : activeProperty.tenantId,
|
|
19718
|
+
propertyIds: activeProperty === null || activeProperty === void 0 ? void 0 : activeProperty.propertyId
|
|
19529
19719
|
},
|
|
19530
19720
|
jsonPath: "Properties[0].address.street",
|
|
19531
19721
|
d: res => {
|