@djb25/digit-ui-module-commonpt 1.0.11 → 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 +631 -450
- 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: {
|
|
@@ -9238,9 +9310,7 @@ const configWSApproverApplication = ({
|
|
|
9238
9310
|
error
|
|
9239
9311
|
}) => {
|
|
9240
9312
|
var _action$action;
|
|
9241
|
-
|
|
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;
|
|
9313
|
+
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
9314
|
return {
|
|
9245
9315
|
label: {
|
|
9246
9316
|
heading: `WF_${action === null || action === void 0 ? void 0 : action.action}_APPLICATION`,
|
|
@@ -9249,18 +9319,6 @@ const configWSApproverApplication = ({
|
|
|
9249
9319
|
},
|
|
9250
9320
|
form: [{
|
|
9251
9321
|
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
9322
|
label: t("WF_COMMON_COMMENTS"),
|
|
9265
9323
|
type: "textarea",
|
|
9266
9324
|
populators: {
|
|
@@ -9300,10 +9358,8 @@ const configWSDisConnectApplication = ({
|
|
|
9300
9358
|
error
|
|
9301
9359
|
}) => {
|
|
9302
9360
|
var _action$action;
|
|
9303
|
-
let
|
|
9304
|
-
|
|
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;
|
|
9361
|
+
let isDatePickerDisplay = false;
|
|
9362
|
+
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
9363
|
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
9364
|
return {
|
|
9309
9365
|
label: {
|
|
@@ -9312,19 +9368,7 @@ const configWSDisConnectApplication = ({
|
|
|
9312
9368
|
cancel: "CS_COMMON_CANCEL"
|
|
9313
9369
|
},
|
|
9314
9370
|
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 && {
|
|
9371
|
+
body: [isDatePickerDisplay && {
|
|
9328
9372
|
label: t("ES_FSM_ACTION_SERVICE_DATE"),
|
|
9329
9373
|
isMandatory: isDatePickerDisplay ? true : false,
|
|
9330
9374
|
type: "custom",
|
|
@@ -14029,7 +14073,7 @@ function PropertyDocuments({
|
|
|
14029
14073
|
}));
|
|
14030
14074
|
};
|
|
14031
14075
|
const renderDocumentRow = (value, index) => {
|
|
14032
|
-
var _pdfFiles$value$fileS;
|
|
14076
|
+
var _pdfFiles$value$fileS, _value$originalDoc, _value$originalDoc2, _value$originalDoc3;
|
|
14033
14077
|
const fileUrl = (_pdfFiles$value$fileS = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS === void 0 ? void 0 : _pdfFiles$value$fileS.split(",")[0];
|
|
14034
14078
|
const docSubType = getDocSubType(value === null || value === void 0 ? void 0 : value.documentType);
|
|
14035
14079
|
const docUid = (value === null || value === void 0 ? void 0 : value.documentUid) || "";
|
|
@@ -14112,11 +14156,18 @@ function PropertyDocuments({
|
|
|
14112
14156
|
margin: 0
|
|
14113
14157
|
}
|
|
14114
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}`,
|
|
14115
14160
|
type: "checkbox",
|
|
14116
14161
|
style: {
|
|
14117
14162
|
width: "18px",
|
|
14118
14163
|
height: "18px",
|
|
14119
14164
|
accentColor: "#F47738"
|
|
14165
|
+
},
|
|
14166
|
+
defaultChecked: value === null || value === void 0 ? void 0 : (_value$originalDoc3 = value.originalDoc) === null || _value$originalDoc3 === void 0 ? void 0 : _value$originalDoc3.isVerified,
|
|
14167
|
+
onChange: e => {
|
|
14168
|
+
if (value !== null && value !== void 0 && value.originalDoc) {
|
|
14169
|
+
value.originalDoc.isVerified = e.target.checked;
|
|
14170
|
+
}
|
|
14120
14171
|
}
|
|
14121
14172
|
}), "Check Verified"))
|
|
14122
14173
|
})));
|
|
@@ -17257,8 +17308,14 @@ const NewApplication = ({
|
|
|
17257
17308
|
} = Digit.Hooks.pt.useMDMS(stateId, "PropertyTax", "CommonFieldsConfig");
|
|
17258
17309
|
const search = useLocation().search;
|
|
17259
17310
|
const redirectUrl = new URLSearchParams(search).get('redirectToUrl');
|
|
17260
|
-
const createProperty = async () => {
|
|
17261
|
-
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
|
+
});
|
|
17262
17319
|
};
|
|
17263
17320
|
const onSuccess = () => {
|
|
17264
17321
|
clearParams();
|
|
@@ -17271,7 +17328,7 @@ const NewApplication = ({
|
|
|
17271
17328
|
exact: true,
|
|
17272
17329
|
path: `${match.path}`
|
|
17273
17330
|
}, /*#__PURE__*/React.createElement(CreatePropertyForm, {
|
|
17274
|
-
|
|
17331
|
+
onSelect: createProperty,
|
|
17275
17332
|
value: params,
|
|
17276
17333
|
userType: "employee"
|
|
17277
17334
|
})), /*#__PURE__*/React.createElement(Route, {
|
|
@@ -17435,7 +17492,7 @@ const Search = ({
|
|
|
17435
17492
|
}
|
|
17436
17493
|
});
|
|
17437
17494
|
if (isLoading) return /*#__PURE__*/React.createElement(Loader, null);
|
|
17438
|
-
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, {
|
|
17439
17496
|
t: t,
|
|
17440
17497
|
payload: formData,
|
|
17441
17498
|
searchBy: searchBy,
|
|
@@ -17444,7 +17501,7 @@ const Search = ({
|
|
|
17444
17501
|
tenantId: tenantId,
|
|
17445
17502
|
onSubmit: onSubmit,
|
|
17446
17503
|
onReset: onReset
|
|
17447
|
-
}), Object.keys(payload).length > 0 && /*#__PURE__*/React.createElement(SearchResultComponent, {
|
|
17504
|
+
})), Object.keys(payload).length > 0 && /*#__PURE__*/React.createElement(SearchResultComponent, {
|
|
17448
17505
|
t: t,
|
|
17449
17506
|
showToast: showToast,
|
|
17450
17507
|
setShowToast: setShowToast,
|
|
@@ -17773,390 +17830,133 @@ const PropertyAssemblyDetails = ({
|
|
|
17773
17830
|
}, errors === null || errors === void 0 ? void 0 : (_errors$usageCategory2 = errors.usageCategoryMajor) === null || _errors$usageCategory2 === void 0 ? void 0 : _errors$usageCategory2.message));
|
|
17774
17831
|
};
|
|
17775
17832
|
|
|
17776
|
-
const
|
|
17777
|
-
|
|
17778
|
-
|
|
17779
|
-
|
|
17780
|
-
config,
|
|
17833
|
+
const PropertyLocationDetails = ({
|
|
17834
|
+
address,
|
|
17835
|
+
actionCancelOnSubmit,
|
|
17836
|
+
isEdit,
|
|
17781
17837
|
onSelect,
|
|
17782
|
-
|
|
17783
|
-
|
|
17784
|
-
|
|
17785
|
-
|
|
17786
|
-
clearErrors
|
|
17838
|
+
config,
|
|
17839
|
+
hideZRO,
|
|
17840
|
+
formData: formDataProp,
|
|
17841
|
+
...props
|
|
17787
17842
|
}) => {
|
|
17788
|
-
var
|
|
17843
|
+
var _formDataProp$cpt2;
|
|
17789
17844
|
const {
|
|
17790
17845
|
t
|
|
17791
17846
|
} = 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
17847
|
const [showToast, setShowToast] = useState(null);
|
|
17807
|
-
const
|
|
17808
|
-
|
|
17809
|
-
|
|
17810
|
-
|
|
17811
|
-
|
|
17812
|
-
|
|
17813
|
-
|
|
17814
|
-
|
|
17815
|
-
|
|
17816
|
-
|
|
17817
|
-
|
|
17818
|
-
|
|
17819
|
-
|
|
17820
|
-
|
|
17821
|
-
|
|
17822
|
-
|
|
17823
|
-
|
|
17824
|
-
|
|
17825
|
-
|
|
17848
|
+
const [formData, setFormData] = useState({
|
|
17849
|
+
addressType: (address === null || address === void 0 ? void 0 : address.addressType) || "",
|
|
17850
|
+
pincode: (address === null || address === void 0 ? void 0 : address.pinCode) || "",
|
|
17851
|
+
city: (address === null || address === void 0 ? void 0 : address.city) || "",
|
|
17852
|
+
locality: (address === null || address === void 0 ? void 0 : address.locality) || "",
|
|
17853
|
+
streetName: (address === null || address === void 0 ? void 0 : address.streetName) || "",
|
|
17854
|
+
houseNo: (address === null || address === void 0 ? void 0 : address.houseNumber) || "",
|
|
17855
|
+
houseName: (address === null || address === void 0 ? void 0 : address.houseName) || "",
|
|
17856
|
+
landmark: (address === null || address === void 0 ? void 0 : address.landmark) || "",
|
|
17857
|
+
addressLine1: (address === null || address === void 0 ? void 0 : address.address) || "",
|
|
17858
|
+
addressLine2: (address === null || address === void 0 ? void 0 : address.address2) || "",
|
|
17859
|
+
latitude: (address === null || address === void 0 ? void 0 : address.latitude) || "",
|
|
17860
|
+
longitude: (address === null || address === void 0 ? void 0 : address.longitude) || "",
|
|
17861
|
+
assembly: (address === null || address === void 0 ? void 0 : address.assembly) || "",
|
|
17862
|
+
block: (address === null || address === void 0 ? void 0 : address.block) || "",
|
|
17863
|
+
zone: (address === null || address === void 0 ? void 0 : address.zone) || "",
|
|
17864
|
+
zroLocation: (address === null || address === void 0 ? void 0 : address.zroLocation) || "",
|
|
17865
|
+
subLocality: (address === null || address === void 0 ? void 0 : address.subLocality) || "",
|
|
17866
|
+
actualAssembly: (address === null || address === void 0 ? void 0 : address.actualAssembly) || "",
|
|
17867
|
+
actualWard: (address === null || address === void 0 ? void 0 : address.actualWard) || "",
|
|
17868
|
+
actualZone: (address === null || address === void 0 ? void 0 : address.actualZone) || ""
|
|
17826
17869
|
});
|
|
17870
|
+
const isPropertyFound = window.location.href.includes("ws/old-application");
|
|
17827
17871
|
useEffect(() => {
|
|
17828
|
-
if (
|
|
17829
|
-
|
|
17830
|
-
|
|
17831
|
-
|
|
17832
|
-
|
|
17833
|
-
|
|
17834
|
-
error: true,
|
|
17835
|
-
label: "PT_ENTER_VALID_PROPERTY_ID"
|
|
17872
|
+
if (props.register) {
|
|
17873
|
+
props.register({
|
|
17874
|
+
name: "cpt"
|
|
17875
|
+
});
|
|
17876
|
+
props.register({
|
|
17877
|
+
name: "cptId"
|
|
17836
17878
|
});
|
|
17837
17879
|
}
|
|
17838
|
-
}, [
|
|
17880
|
+
}, [props.register]);
|
|
17839
17881
|
useEffect(() => {
|
|
17840
|
-
|
|
17841
|
-
|
|
17842
|
-
|
|
17843
|
-
|
|
17844
|
-
|
|
17845
|
-
|
|
17846
|
-
|
|
17847
|
-
|
|
17848
|
-
|
|
17849
|
-
|
|
17850
|
-
|
|
17882
|
+
var _formDataProp$cpt;
|
|
17883
|
+
if (formDataProp !== null && formDataProp !== void 0 && (_formDataProp$cpt = formDataProp.cpt) !== null && _formDataProp$cpt !== void 0 && _formDataProp$cpt.details) {
|
|
17884
|
+
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;
|
|
17885
|
+
const details = formDataProp.cpt.details;
|
|
17886
|
+
const addressData = details.address || {};
|
|
17887
|
+
const additionalDetails = details.additionalDetails || {};
|
|
17888
|
+
const localityCode = ((_addressData$locality = addressData.locality) === null || _addressData$locality === void 0 ? void 0 : _addressData$locality.code) || addressData.locality || "";
|
|
17889
|
+
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 || "";
|
|
17890
|
+
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 || "";
|
|
17891
|
+
const zroCode = addressData.zroLocation || additionalDetails.zroLocation || ((_addressData$addition = addressData.additionalDetails) === null || _addressData$addition === void 0 ? void 0 : _addressData$addition.zroLocation) || "";
|
|
17892
|
+
const zroValue = zroCode ? {
|
|
17893
|
+
code: zroCode,
|
|
17894
|
+
name: zroCode,
|
|
17895
|
+
i18nKey: zroCode
|
|
17896
|
+
} : "";
|
|
17897
|
+
setFormData({
|
|
17898
|
+
pincode: addressData.pincode || "",
|
|
17899
|
+
city: addressData.city || "",
|
|
17900
|
+
locality: localityCode,
|
|
17901
|
+
streetName: addressData.street || "",
|
|
17902
|
+
houseNo: addressData.houseNo || "",
|
|
17903
|
+
landmark: addressData.landmark || "",
|
|
17904
|
+
latitude: lat,
|
|
17905
|
+
longitude: lng,
|
|
17906
|
+
assembly: additionalDetails.assembly || ((_addressData$addition2 = addressData.additionalDetails) === null || _addressData$addition2 === void 0 ? void 0 : _addressData$addition2.assembly) || "",
|
|
17907
|
+
block: additionalDetails.block || ((_addressData$addition3 = addressData.additionalDetails) === null || _addressData$addition3 === void 0 ? void 0 : _addressData$addition3.block) || "",
|
|
17908
|
+
zone: additionalDetails.zone || ((_addressData$addition4 = addressData.additionalDetails) === null || _addressData$addition4 === void 0 ? void 0 : _addressData$addition4.zone) || "",
|
|
17909
|
+
zroLocation: zroCode,
|
|
17910
|
+
zro: zroValue,
|
|
17911
|
+
subLocality: addressData.subLocality || "",
|
|
17912
|
+
actualAssembly: addressData.actualAssembly || additionalDetails.actualAssembly || ((_addressData$addition5 = addressData.additionalDetails) === null || _addressData$addition5 === void 0 ? void 0 : _addressData$addition5.actualAssembly) || "",
|
|
17913
|
+
actualWard: addressData.actualWard || additionalDetails.actualWard || ((_addressData$addition6 = addressData.additionalDetails) === null || _addressData$addition6 === void 0 ? void 0 : _addressData$addition6.actualWard) || "",
|
|
17914
|
+
actualZone: addressData.actualZone || additionalDetails.actualZone || ((_addressData$addition7 = addressData.additionalDetails) === null || _addressData$addition7 === void 0 ? void 0 : _addressData$addition7.actualZone) || "",
|
|
17915
|
+
address: {
|
|
17916
|
+
...addressData,
|
|
17917
|
+
city: addressData.city || "",
|
|
17918
|
+
pincode: addressData.pincode || "",
|
|
17919
|
+
locality: localityCode,
|
|
17920
|
+
streetName: addressData.street || "",
|
|
17921
|
+
houseNo: addressData.houseNo || "",
|
|
17922
|
+
addressLine1: addressData.street || "",
|
|
17923
|
+
latitude: lat,
|
|
17924
|
+
longitude: lng,
|
|
17925
|
+
zroLocation: zroCode,
|
|
17926
|
+
zro: zroValue,
|
|
17927
|
+
assembly: additionalDetails.assembly || ((_addressData$addition8 = addressData.additionalDetails) === null || _addressData$addition8 === void 0 ? void 0 : _addressData$addition8.assembly) || "",
|
|
17928
|
+
block: additionalDetails.block || ((_addressData$addition9 = addressData.additionalDetails) === null || _addressData$addition9 === void 0 ? void 0 : _addressData$addition9.block) || "",
|
|
17929
|
+
zone: additionalDetails.zone || ((_addressData$addition0 = addressData.additionalDetails) === null || _addressData$addition0 === void 0 ? void 0 : _addressData$addition0.zone) || "",
|
|
17930
|
+
subLocality: addressData.subLocality || "",
|
|
17931
|
+
actualWard: addressData.actualWard || additionalDetails.actualWard || ((_addressData$addition1 = addressData.additionalDetails) === null || _addressData$addition1 === void 0 ? void 0 : _addressData$addition1.actualWard) || "",
|
|
17932
|
+
actualZone: addressData.actualZone || additionalDetails.actualZone || ((_addressData$addition10 = addressData.additionalDetails) === null || _addressData$addition10 === void 0 ? void 0 : _addressData$addition10.actualZone) || "",
|
|
17933
|
+
actualAssembly: addressData.actualAssembly || additionalDetails.actualAssembly || ((_addressData$addition11 = addressData.additionalDetails) === null || _addressData$addition11 === void 0 ? void 0 : _addressData$addition11.actualAssembly) || ""
|
|
17934
|
+
}
|
|
17851
17935
|
});
|
|
17852
|
-
}
|
|
17853
|
-
|
|
17854
|
-
|
|
17855
|
-
|
|
17856
|
-
|
|
17857
|
-
|
|
17858
|
-
|
|
17859
|
-
|
|
17860
|
-
|
|
17861
|
-
|
|
17862
|
-
|
|
17863
|
-
|
|
17864
|
-
|
|
17865
|
-
|
|
17866
|
-
|
|
17867
|
-
|
|
17868
|
-
|
|
17869
|
-
|
|
17870
|
-
|
|
17871
|
-
|
|
17872
|
-
|
|
17873
|
-
|
|
17874
|
-
|
|
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: {}
|
|
17936
|
+
} else if ((formDataProp === null || formDataProp === void 0 ? void 0 : formDataProp.cpt) === null) {
|
|
17937
|
+
const clearedData = {
|
|
17938
|
+
addressType: "",
|
|
17939
|
+
pincode: "",
|
|
17940
|
+
city: "",
|
|
17941
|
+
locality: "",
|
|
17942
|
+
streetName: "",
|
|
17943
|
+
houseNo: "",
|
|
17944
|
+
houseName: "",
|
|
17945
|
+
landmark: "",
|
|
17946
|
+
addressLine1: "",
|
|
17947
|
+
addressLine2: "",
|
|
17948
|
+
latitude: "",
|
|
17949
|
+
longitude: "",
|
|
17950
|
+
assembly: "",
|
|
17951
|
+
block: "",
|
|
17952
|
+
zone: "",
|
|
17953
|
+
zroLocation: "",
|
|
17954
|
+
subLocality: "",
|
|
17955
|
+
actualWard: "",
|
|
17956
|
+
actualZone: "",
|
|
17957
|
+
actualAssembly: "",
|
|
17958
|
+
zro: "",
|
|
17959
|
+
address: {}
|
|
18160
17960
|
};
|
|
18161
17961
|
setFormData(clearedData);
|
|
18162
17962
|
onSelect((config === null || config === void 0 ? void 0 : config.key) || "address", clearedData);
|
|
@@ -18173,6 +17973,15 @@ const PropertyLocationDetails = ({
|
|
|
18173
17973
|
return /*#__PURE__*/React.createElement(CollapsibleCardPage, {
|
|
18174
17974
|
title: t("PT_LOCATION_DETAILS"),
|
|
18175
17975
|
defaultOpen: true
|
|
17976
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
17977
|
+
style: {
|
|
17978
|
+
boxShadow: "none",
|
|
17979
|
+
...props.style
|
|
17980
|
+
}
|
|
17981
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
17982
|
+
style: {
|
|
17983
|
+
marginTop: "20px"
|
|
17984
|
+
}
|
|
18176
17985
|
}, /*#__PURE__*/React.createElement(AddressDetails, {
|
|
18177
17986
|
t: t,
|
|
18178
17987
|
formData: formData,
|
|
@@ -18188,11 +17997,11 @@ const PropertyLocationDetails = ({
|
|
|
18188
17997
|
...config
|
|
18189
17998
|
},
|
|
18190
17999
|
isEdit: isEdit,
|
|
18191
|
-
showZRO: true,
|
|
18000
|
+
showZRO: hideZRO ? false : true,
|
|
18192
18001
|
showMapActualLocation: true,
|
|
18193
18002
|
disable: isPropertyFound,
|
|
18194
18003
|
hideNextButton: true
|
|
18195
|
-
}));
|
|
18004
|
+
}))));
|
|
18196
18005
|
};
|
|
18197
18006
|
|
|
18198
18007
|
const PropertyOwnerDetails = ({
|
|
@@ -19042,17 +18851,34 @@ const PropertyWaterConnection = ({
|
|
|
19042
18851
|
|
|
19043
18852
|
const SwitchComponent = props => {
|
|
19044
18853
|
return /*#__PURE__*/React.createElement("div", {
|
|
19045
|
-
className: "
|
|
19046
|
-
|
|
19047
|
-
|
|
19048
|
-
|
|
19049
|
-
|
|
19050
|
-
|
|
19051
|
-
|
|
19052
|
-
props.onSwitch(key);
|
|
19053
|
-
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"
|
|
19054
18861
|
}
|
|
19055
|
-
}, 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
|
+
}));
|
|
19056
18882
|
};
|
|
19057
18883
|
const SearchPTID = ({
|
|
19058
18884
|
tenantId,
|
|
@@ -19136,16 +18962,26 @@ const SearchPTID = ({
|
|
|
19136
18962
|
})), /*#__PURE__*/React.createElement("div", {
|
|
19137
18963
|
className: "formcomposer-section-button",
|
|
19138
18964
|
style: {
|
|
19139
|
-
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
|
|
19140
18975
|
}
|
|
19141
|
-
}, /*#__PURE__*/React.createElement(SearchField, {
|
|
19142
|
-
className: "pt-search-action-reset generic-button clear-search"
|
|
19143
18976
|
}, /*#__PURE__*/React.createElement("p", {
|
|
19144
18977
|
onClick: () => {
|
|
19145
18978
|
onReset({});
|
|
19146
18979
|
}
|
|
19147
|
-
}, t(`
|
|
19148
|
-
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
|
+
}
|
|
19149
18985
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
19150
18986
|
label: t("ES_COMMON_SEARCH"),
|
|
19151
18987
|
submit: true
|
|
@@ -19558,6 +19394,351 @@ const PropertyDetails = ({
|
|
|
19558
19394
|
}))));
|
|
19559
19395
|
};
|
|
19560
19396
|
|
|
19397
|
+
const getAddress = (address, t) => {
|
|
19398
|
+
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}` : " "}`;
|
|
19399
|
+
};
|
|
19400
|
+
const PropertySearchNSummary = ({
|
|
19401
|
+
config,
|
|
19402
|
+
onSelect,
|
|
19403
|
+
userType,
|
|
19404
|
+
formData,
|
|
19405
|
+
setError,
|
|
19406
|
+
formState,
|
|
19407
|
+
clearErrors
|
|
19408
|
+
}) => {
|
|
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;
|
|
19410
|
+
const {
|
|
19411
|
+
t
|
|
19412
|
+
} = useTranslation();
|
|
19413
|
+
const history = useHistory();
|
|
19414
|
+
let {
|
|
19415
|
+
pathname,
|
|
19416
|
+
state
|
|
19417
|
+
} = useLocation();
|
|
19418
|
+
state = state && (typeof state === "string" || state instanceof String) ? JSON.parse(state) : state;
|
|
19419
|
+
const isEditScreen = pathname.includes("/modify-application/");
|
|
19420
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
19421
|
+
const isEmpNewApplication = window.location.href.includes("/employee/tl/new-application");
|
|
19422
|
+
const isEmpRenewLicense = window.location.href.includes("/employee/tl/renew-application-details") || window.location.href.includes("/employee/tl/edit-application-details");
|
|
19423
|
+
const search = useLocation().search;
|
|
19424
|
+
const urlPropertyId = new URLSearchParams(search).get("propertyId");
|
|
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 : "") || "");
|
|
19426
|
+
const [searchPropertyId, setSearchPropertyId] = useState(urlPropertyId !== "null" ? urlPropertyId : "");
|
|
19427
|
+
const [mobileNumber, setMobileNumber] = useState("");
|
|
19428
|
+
const [searchMobileNumber, setSearchMobileNumber] = useState("");
|
|
19429
|
+
const [showToast, setShowToast] = useState(null);
|
|
19430
|
+
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
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
|
+
};
|
|
19442
|
+
const {
|
|
19443
|
+
isLoading,
|
|
19444
|
+
isError,
|
|
19445
|
+
error,
|
|
19446
|
+
data: propertyDetails
|
|
19447
|
+
} = Digit.Hooks.pt.usePropertySearch({
|
|
19448
|
+
filters: searchFilters,
|
|
19449
|
+
tenantId: tenantId
|
|
19450
|
+
}, {
|
|
19451
|
+
filters: searchFilters,
|
|
19452
|
+
tenantId: tenantId,
|
|
19453
|
+
enabled: isCitizen && isWsApplication && userMobileNumber || !isCitizen && (searchPropertyId || searchMobileNumber) || isCitizen && !isWsApplication && (searchPropertyId || searchMobileNumber) ? true : false,
|
|
19454
|
+
privacy: Digit.Utils.getPrivacyObject()
|
|
19455
|
+
});
|
|
19456
|
+
useEffect(() => {
|
|
19457
|
+
if (propertyId && (window.location.href.includes("/renew-application-details/") || window.location.href.includes("/edit-application-details/"))) setSearchPropertyId(propertyId);
|
|
19458
|
+
}, [propertyId]);
|
|
19459
|
+
useEffect(() => {
|
|
19460
|
+
if (isLoading == false && error && error == true) {
|
|
19461
|
+
setShowToast({
|
|
19462
|
+
error: true,
|
|
19463
|
+
label: "PT_ENTER_VALID_PROPERTY_ID"
|
|
19464
|
+
});
|
|
19465
|
+
}
|
|
19466
|
+
}, [error, propertyDetails]);
|
|
19467
|
+
useEffect(() => {
|
|
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
|
+
}
|
|
19482
|
+
}
|
|
19483
|
+
}, [propertyDetails, pathname, isCitizen, isWsApplication, formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : (_formData$cpt3$detail = _formData$cpt3.details) === null || _formData$cpt3$detail === void 0 ? void 0 : _formData$cpt3$detail.propertyId]);
|
|
19484
|
+
const clearSearch = () => {
|
|
19485
|
+
setPropertyId("");
|
|
19486
|
+
setSearchPropertyId("");
|
|
19487
|
+
setMobileNumber("");
|
|
19488
|
+
setSearchMobileNumber("");
|
|
19489
|
+
setSelectedProperty(null);
|
|
19490
|
+
onSelect(config === null || config === void 0 ? void 0 : config.key, {
|
|
19491
|
+
id: ""
|
|
19492
|
+
});
|
|
19493
|
+
onSelect("cpt", null);
|
|
19494
|
+
};
|
|
19495
|
+
if (isEditScreen) {
|
|
19496
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
19497
|
+
}
|
|
19498
|
+
let propertyAddress = "";
|
|
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);
|
|
19502
|
+
}
|
|
19503
|
+
const getInputStyles = () => {
|
|
19504
|
+
if (window.location.href.includes("/ws/")) {
|
|
19505
|
+
return {
|
|
19506
|
+
fontWeight: "700"
|
|
19507
|
+
};
|
|
19508
|
+
} else return {};
|
|
19509
|
+
};
|
|
19510
|
+
const getOwnerNames = propertyData => {
|
|
19511
|
+
var _propertyData$owners, _getActiveOwners$sort, _getActiveOwners$sort2;
|
|
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);
|
|
19513
|
+
const getOwnersList = getActiveOwners === null || getActiveOwners === void 0 ? void 0 : (_getActiveOwners$sort = getActiveOwners.sort((a, b) => {
|
|
19514
|
+
var _a$additionalDetails, _b$additionalDetails;
|
|
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);
|
|
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(",");
|
|
19517
|
+
return getOwnersList ? getOwnersList : t("NA");
|
|
19518
|
+
};
|
|
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
|
+
};
|
|
19528
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CollapsibleCardPage, {
|
|
19529
|
+
title: t("PT_PROPERTY_SEARCH"),
|
|
19530
|
+
defaultOpen: true
|
|
19531
|
+
}, (window.location.href.includes("/tl/") ? !((formData === null || formData === void 0 ? void 0 : (_formData$tradedetils = formData.tradedetils) === null || _formData$tradedetils === void 0 ? void 0 : (_formData$tradedetils2 = _formData$tradedetils[0]) === null || _formData$tradedetils2 === void 0 ? void 0 : (_formData$tradedetils3 = _formData$tradedetils2.structureType) === null || _formData$tradedetils3 === void 0 ? void 0 : _formData$tradedetils3.code) === "MOVABLE") && (isEmpNewApplication || isEmpRenewLicense) : true) && /*#__PURE__*/React.createElement(React.Fragment, null, isCitizen && isWsApplication ? /*#__PURE__*/React.createElement("div", {
|
|
19532
|
+
className: "formcomposer-section-grid",
|
|
19533
|
+
style: isMobile ? {} : {}
|
|
19534
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19535
|
+
style: {
|
|
19536
|
+
marginBottom: "16px"
|
|
19537
|
+
}
|
|
19538
|
+
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(Label, {
|
|
19539
|
+
style: getInputStyles()
|
|
19540
|
+
}, `${t("PROPERTY_ID")}`), /*#__PURE__*/React.createElement("div", {
|
|
19541
|
+
style: {
|
|
19542
|
+
display: "flex",
|
|
19543
|
+
gap: "12px",
|
|
19544
|
+
width: "100%",
|
|
19545
|
+
flexDirection: "column"
|
|
19546
|
+
}
|
|
19547
|
+
}, isLoading ? /*#__PURE__*/React.createElement("div", null, t("CS_COMMON_LOADING")) : propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.Properties && (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop3 = propertyDetails.Properties) === null || _propertyDetails$Prop3 === void 0 ? void 0 : _propertyDetails$Prop3.length) > 0 ? /*#__PURE__*/React.createElement(Dropdown, {
|
|
19548
|
+
option: propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties,
|
|
19549
|
+
optionKey: "propertyId",
|
|
19550
|
+
id: "propertyId",
|
|
19551
|
+
selected: selectedProperty,
|
|
19552
|
+
select: onPropertySelect,
|
|
19553
|
+
t: t,
|
|
19554
|
+
placeholder: t("PT_SELECT_PROPERTY")
|
|
19555
|
+
}) : /*#__PURE__*/React.createElement("span", {
|
|
19556
|
+
onClick: () => history.push(`/digit-ui/${userType}/${pathname.split("/")[3]}/create-application/create-property?redirectToUrl=${window.location.pathname}`, {
|
|
19557
|
+
...state,
|
|
19558
|
+
...formData
|
|
19559
|
+
})
|
|
19560
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
19561
|
+
className: "submit-bar",
|
|
19562
|
+
type: "button",
|
|
19563
|
+
style: {
|
|
19564
|
+
color: "white"
|
|
19565
|
+
}
|
|
19566
|
+
}, t("CPT_CREATE_PROPERTY"))))))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
19567
|
+
style: {
|
|
19568
|
+
display: "flex",
|
|
19569
|
+
flexDirection: isMobile ? "column" : "row",
|
|
19570
|
+
gap: "16px",
|
|
19571
|
+
width: "100%",
|
|
19572
|
+
alignItems: "flex-end",
|
|
19573
|
+
marginBottom: "16px"
|
|
19574
|
+
}
|
|
19575
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19576
|
+
style: {
|
|
19577
|
+
flex: 1
|
|
19578
|
+
}
|
|
19579
|
+
}, /*#__PURE__*/React.createElement(Label, null, `${t("CORE_COMMON_MOBILE_NUMBER")}`), /*#__PURE__*/React.createElement(TextInput, {
|
|
19580
|
+
value: mobileNumber,
|
|
19581
|
+
onChange: e => {
|
|
19582
|
+
const val = e.target.value;
|
|
19583
|
+
if (val.length <= 10) {
|
|
19584
|
+
setMobileNumber(val);
|
|
19585
|
+
if (val.length === 10) {
|
|
19586
|
+
setSearchMobileNumber(val);
|
|
19587
|
+
}
|
|
19588
|
+
}
|
|
19589
|
+
},
|
|
19590
|
+
style: {
|
|
19591
|
+
width: "100%"
|
|
19592
|
+
},
|
|
19593
|
+
placeholder: `${t("PT_ENTER_MOBILE_NUMBER")}`,
|
|
19594
|
+
maxLength: 10
|
|
19595
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
19596
|
+
style: {
|
|
19597
|
+
flex: 1
|
|
19598
|
+
}
|
|
19599
|
+
}, /*#__PURE__*/React.createElement(Label, null, `${t("PROPERTY_ID")}`), isLoading ? /*#__PURE__*/React.createElement("div", null, t("CS_COMMON_LOADING")) : /*#__PURE__*/React.createElement(Dropdown, {
|
|
19600
|
+
option: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.Properties) || [],
|
|
19601
|
+
optionKey: "propertyId",
|
|
19602
|
+
id: "propertyId",
|
|
19603
|
+
selected: selectedProperty,
|
|
19604
|
+
select: onPropertySelect,
|
|
19605
|
+
t: t,
|
|
19606
|
+
placeholder: t("PT_SELECT_PROPERTY")
|
|
19607
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
19608
|
+
style: {
|
|
19609
|
+
flex: 1
|
|
19610
|
+
}
|
|
19611
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
19612
|
+
className: "submit-bar",
|
|
19613
|
+
type: "button",
|
|
19614
|
+
style: {
|
|
19615
|
+
color: "white",
|
|
19616
|
+
width: "100%",
|
|
19617
|
+
margin: 0
|
|
19618
|
+
},
|
|
19619
|
+
onClick: clearSearch
|
|
19620
|
+
}, `${t("CLEAR")}`)), /*#__PURE__*/React.createElement("div", {
|
|
19621
|
+
style: {
|
|
19622
|
+
flex: 1
|
|
19623
|
+
}
|
|
19624
|
+
}, searchMobileNumber && (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop4 = propertyDetails.Properties) === null || _propertyDetails$Prop4 === void 0 ? void 0 : _propertyDetails$Prop4.length) === 0 && /*#__PURE__*/React.createElement("div", {
|
|
19625
|
+
style: {
|
|
19626
|
+
display: "flex",
|
|
19627
|
+
flexDirection: "column",
|
|
19628
|
+
gap: "8px"
|
|
19629
|
+
}
|
|
19630
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
19631
|
+
style: {
|
|
19632
|
+
color: "#d60505",
|
|
19633
|
+
fontWeight: "bold",
|
|
19634
|
+
fontSize: "12px",
|
|
19635
|
+
lineHeight: "1"
|
|
19636
|
+
}
|
|
19637
|
+
}, "No property created this number"), /*#__PURE__*/React.createElement("span", {
|
|
19638
|
+
onClick: () => history.push(`/digit-ui/${userType}/${pathname.split("/")[3]}/create-application/create-property?redirectToUrl=${window.location.pathname}`, {
|
|
19639
|
+
...state,
|
|
19640
|
+
...formData
|
|
19641
|
+
})
|
|
19642
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
19643
|
+
className: "submit-bar",
|
|
19644
|
+
type: "button",
|
|
19645
|
+
style: {
|
|
19646
|
+
color: "white",
|
|
19647
|
+
width: "100%",
|
|
19648
|
+
margin: 0
|
|
19649
|
+
}
|
|
19650
|
+
}, t("CPT_CREATE_PROPERTY"))))))), activeProperty ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
|
|
19651
|
+
className: "card-with-background",
|
|
19652
|
+
style: {
|
|
19653
|
+
margin: "16px 0px",
|
|
19654
|
+
padding: "20px",
|
|
19655
|
+
boxShadow: "none"
|
|
19656
|
+
}
|
|
19657
|
+
}, /*#__PURE__*/React.createElement(StatusTable, {
|
|
19658
|
+
style: {
|
|
19659
|
+
padding: "0",
|
|
19660
|
+
margin: "0"
|
|
19661
|
+
}
|
|
19662
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19663
|
+
className: "formcomposer-section-grid",
|
|
19664
|
+
style: isMobile ? {} : {}
|
|
19665
|
+
}, /*#__PURE__*/React.createElement(Row, {
|
|
19666
|
+
className: "border-none",
|
|
19667
|
+
labelStyle: isMobile ? {
|
|
19668
|
+
width: "40%"
|
|
19669
|
+
} : {
|
|
19670
|
+
width: "30%",
|
|
19671
|
+
color: "#505a5f",
|
|
19672
|
+
fontWeight: "600"
|
|
19673
|
+
},
|
|
19674
|
+
textStyle: {
|
|
19675
|
+
color: "#000"
|
|
19676
|
+
},
|
|
19677
|
+
label: t(`PROPERTY_ID`),
|
|
19678
|
+
text: activeProperty === null || activeProperty === void 0 ? void 0 : activeProperty.propertyId
|
|
19679
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
19680
|
+
className: "border-none",
|
|
19681
|
+
labelStyle: isMobile ? {
|
|
19682
|
+
width: "40%"
|
|
19683
|
+
} : {
|
|
19684
|
+
width: "30%",
|
|
19685
|
+
color: "#505a5f",
|
|
19686
|
+
fontWeight: "600"
|
|
19687
|
+
},
|
|
19688
|
+
textStyle: {
|
|
19689
|
+
color: "#000"
|
|
19690
|
+
},
|
|
19691
|
+
label: t(`OWNER_NAME`),
|
|
19692
|
+
text: getOwnerNames(activeProperty)
|
|
19693
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
19694
|
+
className: "border-none",
|
|
19695
|
+
labelStyle: isMobile ? {
|
|
19696
|
+
width: "40%"
|
|
19697
|
+
} : {
|
|
19698
|
+
width: "30%",
|
|
19699
|
+
color: "#505a5f",
|
|
19700
|
+
fontWeight: "600"
|
|
19701
|
+
},
|
|
19702
|
+
textStyle: {
|
|
19703
|
+
wordBreak: "break-word",
|
|
19704
|
+
color: "#000"
|
|
19705
|
+
},
|
|
19706
|
+
label: t(`PROPERTY_ADDRESS`),
|
|
19707
|
+
text: propertyAddress,
|
|
19708
|
+
privacy: {
|
|
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,
|
|
19710
|
+
fieldName: ["doorNo", "street", "landmark"],
|
|
19711
|
+
model: "Property",
|
|
19712
|
+
showValue: true,
|
|
19713
|
+
loadData: {
|
|
19714
|
+
serviceName: "/property-services/property/_search",
|
|
19715
|
+
requestBody: {},
|
|
19716
|
+
requestParam: {
|
|
19717
|
+
tenantId: activeProperty === null || activeProperty === void 0 ? void 0 : activeProperty.tenantId,
|
|
19718
|
+
propertyIds: activeProperty === null || activeProperty === void 0 ? void 0 : activeProperty.propertyId
|
|
19719
|
+
},
|
|
19720
|
+
jsonPath: "Properties[0].address.street",
|
|
19721
|
+
d: res => {
|
|
19722
|
+
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")}` : "");
|
|
19723
|
+
return resultString;
|
|
19724
|
+
},
|
|
19725
|
+
isArray: false
|
|
19726
|
+
}
|
|
19727
|
+
}
|
|
19728
|
+
}))))) : null, showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
19729
|
+
isDleteBtn: true,
|
|
19730
|
+
labelstyle: {
|
|
19731
|
+
width: "100%"
|
|
19732
|
+
},
|
|
19733
|
+
error: showToast.error,
|
|
19734
|
+
warning: showToast.warning,
|
|
19735
|
+
label: t(showToast.label),
|
|
19736
|
+
onClose: () => {
|
|
19737
|
+
setShowToast(null);
|
|
19738
|
+
}
|
|
19739
|
+
}))));
|
|
19740
|
+
};
|
|
19741
|
+
|
|
19561
19742
|
const CommonPTCard = () => {
|
|
19562
19743
|
var _propsForModuleCard$l;
|
|
19563
19744
|
const {
|