@mseva/digit-ui-module-rentandlease 1.0.18 → 1.0.19
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 +51 -23
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.modern.js
CHANGED
|
@@ -6138,7 +6138,6 @@ const capitalize = text => text.substr(0, 1).toUpperCase() + text.substr(1);
|
|
|
6138
6138
|
const ulbCamel = ulb => ulb.toLowerCase().split(" ").map(capitalize).join(" ");
|
|
6139
6139
|
const getAcknowledgementData = async (application, tenantInfo, t) => {
|
|
6140
6140
|
var _application$OwnerInf, _application$addition, _application$addition2, _application$addition3, _application$addition4, _application$addition5, _application$addition6, _application$addition7, _application$addition8, _application$addition9, _application$Document, _application$addition0, _tenantInfo$city;
|
|
6141
|
-
console.log("application in getAcknowledgement", application);
|
|
6142
6141
|
const details = [];
|
|
6143
6142
|
application === null || application === void 0 ? void 0 : (_application$OwnerInf = application.OwnerInfo) === null || _application$OwnerInf === void 0 ? void 0 : _application$OwnerInf.forEach((owner, index) => {
|
|
6144
6143
|
var _owner$permanentAddre, _owner$permanentAddre2, _owner$correspondence, _owner$correspondence2;
|
|
@@ -6157,7 +6156,7 @@ const getAcknowledgementData = async (application, tenantInfo, t) => {
|
|
|
6157
6156
|
title: t("Permanent Address"),
|
|
6158
6157
|
value: `${(owner === null || owner === void 0 ? void 0 : (_owner$permanentAddre = owner.permanentAddress) === null || _owner$permanentAddre === void 0 ? void 0 : _owner$permanentAddre.addressId) || t("CS_NA")} , ${(owner === null || owner === void 0 ? void 0 : (_owner$permanentAddre2 = owner.permanentAddress) === null || _owner$permanentAddre2 === void 0 ? void 0 : _owner$permanentAddre2.pincode) || t("CS_NA")}`
|
|
6159
6158
|
}, {
|
|
6160
|
-
title: t("
|
|
6159
|
+
title: t("Correspondence Address"),
|
|
6161
6160
|
value: `${(owner === null || owner === void 0 ? void 0 : (_owner$correspondence = owner.correspondenceAddress) === null || _owner$correspondence === void 0 ? void 0 : _owner$correspondence.addressId) || t("CS_NA")} , ${(owner === null || owner === void 0 ? void 0 : (_owner$correspondence2 = owner.correspondenceAddress) === null || _owner$correspondence2 === void 0 ? void 0 : _owner$correspondence2.pincode) || t("CS_NA")}`
|
|
6162
6161
|
}]
|
|
6163
6162
|
});
|
|
@@ -7397,7 +7396,7 @@ function NewApplicationTimeline({
|
|
|
7397
7396
|
}, t("Action")), /*#__PURE__*/React.createElement("div", {
|
|
7398
7397
|
className: "custom-status-text"
|
|
7399
7398
|
}, t((item === null || item === void 0 ? void 0 : item.performedAction) || "CS_COMMON_NA")))), (item === null || item === void 0 ? void 0 : item.wfComment) && (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment.length) > 0 && (item === null || item === void 0 ? void 0 : (_item$wfComment2 = item.wfComment) === null || _item$wfComment2 === void 0 ? void 0 : _item$wfComment2.some(c => c === null || c === void 0 ? void 0 : c.trim())) && /*#__PURE__*/React.createElement("div", {
|
|
7400
|
-
className: "custom-
|
|
7399
|
+
className: "custom-comments-section"
|
|
7401
7400
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7402
7401
|
className: "custom-comment-text"
|
|
7403
7402
|
}, /*#__PURE__*/React.createElement("h4", {
|
|
@@ -7405,13 +7404,13 @@ function NewApplicationTimeline({
|
|
|
7405
7404
|
}, t("Officer Comments")), item === null || item === void 0 ? void 0 : (_item$wfComment3 = item.wfComment) === null || _item$wfComment3 === void 0 ? void 0 : _item$wfComment3.map((comment, idx) => /*#__PURE__*/React.createElement("p", {
|
|
7406
7405
|
key: idx
|
|
7407
7406
|
}, comment))), (item === null || item === void 0 ? void 0 : (_item$assignes = item.assignes) === null || _item$assignes === void 0 ? void 0 : _item$assignes.length) > 0 && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", {
|
|
7408
|
-
className: "custom-
|
|
7407
|
+
className: "custom-comments-title"
|
|
7409
7408
|
}, t("Assigned To")), /*#__PURE__*/React.createElement("div", {
|
|
7410
7409
|
className: "custom-officer-info"
|
|
7411
7410
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7412
7411
|
className: "custom-officer-name"
|
|
7413
7412
|
}, (_item$assignes$ = item.assignes[0]) === null || _item$assignes$ === void 0 ? void 0 : _item$assignes$.name)))), (item === null || item === void 0 ? void 0 : item.wfDocuments) && (item === null || item === void 0 ? void 0 : (_item$wfDocuments = item.wfDocuments) === null || _item$wfDocuments === void 0 ? void 0 : _item$wfDocuments.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
7414
|
-
className: "custom-comments-section
|
|
7413
|
+
className: "custom-comments-section-no-border"
|
|
7415
7414
|
}, /*#__PURE__*/React.createElement("h4", {
|
|
7416
7415
|
className: "custom-comments-title"
|
|
7417
7416
|
}, "Document Attached:"), /*#__PURE__*/React.createElement("div", {
|
|
@@ -8962,7 +8961,6 @@ const RALApplicationDetails$1 = () => {
|
|
|
8962
8961
|
const [loader, setLoader] = useState(false);
|
|
8963
8962
|
const state = tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0];
|
|
8964
8963
|
const [applicationData, setApplicationData] = useState();
|
|
8965
|
-
console.log("applicationData", applicationData);
|
|
8966
8964
|
const [showToast, setShowToast] = useState(null);
|
|
8967
8965
|
const [displayMenu, setDisplayMenu] = useState(false);
|
|
8968
8966
|
const [selectedAction, setSelectedAction] = useState(null);
|
|
@@ -8970,6 +8968,8 @@ const RALApplicationDetails$1 = () => {
|
|
|
8970
8968
|
const [getEmployees, setEmployees] = useState([]);
|
|
8971
8969
|
const history = useHistory();
|
|
8972
8970
|
const [getWorkflowService, setWorkflowService] = useState([]);
|
|
8971
|
+
const menuRef = useRef();
|
|
8972
|
+
Digit.Hooks.useClickOutside(menuRef, () => setDisplayMenu(false), displayMenu);
|
|
8973
8973
|
const fetchApplications = async filters => {
|
|
8974
8974
|
setLoader(true);
|
|
8975
8975
|
try {
|
|
@@ -9002,9 +9002,14 @@ const RALApplicationDetails$1 = () => {
|
|
|
9002
9002
|
moduleCode: "RENT_N_LEASE_NEW",
|
|
9003
9003
|
role: "EMPLOYEE"
|
|
9004
9004
|
});
|
|
9005
|
+
const handleNavigation = () => {
|
|
9006
|
+
const timer = setTimeout(() => {
|
|
9007
|
+
history.push("/digit-ui/employee/rentandlease/inbox");
|
|
9008
|
+
}, 2000);
|
|
9009
|
+
return () => clearTimeout(timer);
|
|
9010
|
+
};
|
|
9005
9011
|
const propertyDetails = applicationData !== null && applicationData !== void 0 && applicationData.additionalDetails ? applicationData.additionalDetails : {};
|
|
9006
9012
|
let user = Digit.UserService.getUser();
|
|
9007
|
-
const menuRef = useRef();
|
|
9008
9013
|
const userRoles = user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : (_user$info$roles = _user$info.roles) === null || _user$info$roles === void 0 ? void 0 : _user$info$roles.map(e => e.code);
|
|
9009
9014
|
let actions = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.actionState) === null || _workflowDetails$data2 === void 0 ? void 0 : (_workflowDetails$data3 = _workflowDetails$data2.nextActions) === null || _workflowDetails$data3 === void 0 ? void 0 : _workflowDetails$data3.filter(e => {
|
|
9010
9015
|
return (userRoles === null || userRoles === void 0 ? void 0 : userRoles.some(role => {
|
|
@@ -9046,7 +9051,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
9046
9051
|
} else if ((action === null || action === void 0 ? void 0 : action.action) == "PAY") {
|
|
9047
9052
|
const appNo = acknowledgementIds;
|
|
9048
9053
|
history.push(`/digit-ui/employee/payment/collect/rl-services/${appNo}/${tenantId}`);
|
|
9049
|
-
} else if ((action === null || action === void 0 ? void 0 : action.action) === "
|
|
9054
|
+
} else if ((action === null || action === void 0 ? void 0 : action.action) === "RAL_RENEWAL") {
|
|
9050
9055
|
setShowModal(true);
|
|
9051
9056
|
setSelectedAction(action);
|
|
9052
9057
|
} else {
|
|
@@ -9092,9 +9097,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
9092
9097
|
key: false,
|
|
9093
9098
|
label: "Successfully updated the status"
|
|
9094
9099
|
});
|
|
9095
|
-
|
|
9096
|
-
history.push("/digit-ui/employee/rentandlease/inbox");
|
|
9097
|
-
}, 2000);
|
|
9100
|
+
handleNavigation();
|
|
9098
9101
|
setSelectedAction(null);
|
|
9099
9102
|
setShowModal(false);
|
|
9100
9103
|
}
|
|
@@ -9179,7 +9182,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
9179
9182
|
...response,
|
|
9180
9183
|
Document: sanitizedDocuments,
|
|
9181
9184
|
workflow: {
|
|
9182
|
-
action: "
|
|
9185
|
+
action: "APPLY"
|
|
9183
9186
|
}
|
|
9184
9187
|
}
|
|
9185
9188
|
};
|
|
@@ -9196,6 +9199,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
9196
9199
|
key: false,
|
|
9197
9200
|
label: "Renewal application submitted successfully"
|
|
9198
9201
|
});
|
|
9202
|
+
handleNavigation();
|
|
9199
9203
|
} catch (error) {
|
|
9200
9204
|
setLoader(false);
|
|
9201
9205
|
setShowToast({
|
|
@@ -9235,7 +9239,10 @@ const RALApplicationDetails$1 = () => {
|
|
|
9235
9239
|
text: t("CS_NA")
|
|
9236
9240
|
})), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
9237
9241
|
className: "ral-card-subheader-24"
|
|
9238
|
-
}, t("ES_TITILE_PROPERTY_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
9242
|
+
}, t("ES_TITILE_PROPERTY_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, (applicationData === null || applicationData === void 0 ? void 0 : applicationData.registrationNumber) && /*#__PURE__*/React.createElement(Row, {
|
|
9243
|
+
label: t("RAL_REGISTRATION_NUMBER"),
|
|
9244
|
+
text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.registrationNumber) || t("CS_NA")
|
|
9245
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
9239
9246
|
label: t("APPLICATION_NUMBER"),
|
|
9240
9247
|
text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationNumber) || t("CS_NA")
|
|
9241
9248
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
@@ -9281,17 +9288,18 @@ const RALApplicationDetails$1 = () => {
|
|
|
9281
9288
|
}), t(doc === null || doc === void 0 ? void 0 : doc.documentType))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
9282
9289
|
workflowDetails: workflowDetails,
|
|
9283
9290
|
t: t
|
|
9284
|
-
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.status) != "INITIATED" && ((_actions2 = actions) === null || _actions2 === void 0 ? void 0 : _actions2.length) > 0 && /*#__PURE__*/React.createElement(ActionBar, null,
|
|
9291
|
+
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.status) != "INITIATED" && ((_actions2 = actions) === null || _actions2 === void 0 ? void 0 : _actions2.length) > 0 && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement("div", {
|
|
9292
|
+
ref: menuRef
|
|
9293
|
+
}, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
|
|
9285
9294
|
localeKeyPrefix: `WF_EMPLOYEE_${"PTR"}`,
|
|
9286
9295
|
options: actions,
|
|
9287
9296
|
optionKey: "action",
|
|
9288
9297
|
t: t,
|
|
9289
9298
|
onSelect: onActionSelect
|
|
9290
9299
|
}) : null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
9291
|
-
ref: menuRef,
|
|
9292
9300
|
label: t("WF_TAKE_ACTION"),
|
|
9293
9301
|
onSubmit: () => setDisplayMenu(!displayMenu)
|
|
9294
|
-
})), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.status) == "INITIATED" && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
9302
|
+
}))), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.status) == "INITIATED" && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
9295
9303
|
label: t("COMMON_EDIT"),
|
|
9296
9304
|
onSubmit: () => {
|
|
9297
9305
|
history.push(`/digit-ui/employee/rentandlease/allot-property/${acknowledgementIds}`);
|
|
@@ -10028,12 +10036,29 @@ const RentAndLeasePropertyDetails = ({
|
|
|
10028
10036
|
}) => {
|
|
10029
10037
|
const dispatch = useDispatch();
|
|
10030
10038
|
const tenantId = window.location.href.includes("citizen") ? window.localStorage.getItem("CITIZEN.CITY") : window.localStorage.getItem("Employee.tenant-id");
|
|
10039
|
+
const filters = {
|
|
10040
|
+
tenantId,
|
|
10041
|
+
searchType: "1"
|
|
10042
|
+
};
|
|
10031
10043
|
const {
|
|
10032
|
-
data
|
|
10033
|
-
|
|
10044
|
+
data,
|
|
10045
|
+
isLoading,
|
|
10046
|
+
isError
|
|
10047
|
+
} = Digit.Hooks.rentandlease.useRentAndLeaseProperties(filters);
|
|
10034
10048
|
const {
|
|
10035
|
-
triggerLoader
|
|
10049
|
+
triggerLoader,
|
|
10050
|
+
triggerToast
|
|
10036
10051
|
} = config === null || config === void 0 ? void 0 : config.currStepConfig[0];
|
|
10052
|
+
useEffect(() => {
|
|
10053
|
+
if (triggerLoader) {
|
|
10054
|
+
triggerLoader(isLoading);
|
|
10055
|
+
}
|
|
10056
|
+
}, [isLoading, triggerLoader]);
|
|
10057
|
+
useEffect(() => {
|
|
10058
|
+
if (isError && triggerToast) {
|
|
10059
|
+
triggerToast("ERROR_WHILE_FETCHING_PROPERTIES", true);
|
|
10060
|
+
}
|
|
10061
|
+
}, [isError, triggerToast]);
|
|
10037
10062
|
const propertyTypeOptions = [{
|
|
10038
10063
|
name: t("ON_RENT"),
|
|
10039
10064
|
code: "rent",
|
|
@@ -10095,14 +10120,14 @@ const RentAndLeasePropertyDetails = ({
|
|
|
10095
10120
|
const selectedLocationType = watch("locationType");
|
|
10096
10121
|
const [filteredProperties, setFilteredProperties] = useState([]);
|
|
10097
10122
|
useEffect(() => {
|
|
10098
|
-
if (
|
|
10099
|
-
let properties =
|
|
10123
|
+
if (data !== null && data !== void 0 && data.property) {
|
|
10124
|
+
let properties = data === null || data === void 0 ? void 0 : data.property;
|
|
10100
10125
|
if (selectedPropertyType && selectedPropertySpecific && selectedLocationType) {
|
|
10101
10126
|
properties = properties.filter(p => p.allotmentType === (selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code) && p.propertyType === (selectedPropertySpecific === null || selectedPropertySpecific === void 0 ? void 0 : selectedPropertySpecific.code) && p.locationType === (selectedLocationType === null || selectedLocationType === void 0 ? void 0 : selectedLocationType.code));
|
|
10102
10127
|
}
|
|
10103
10128
|
setFilteredProperties(properties);
|
|
10104
10129
|
}
|
|
10105
|
-
}, [
|
|
10130
|
+
}, [data, selectedPropertyType, selectedPropertySpecific, selectedLocationType]);
|
|
10106
10131
|
const todayISO = new Date().toISOString().split("T")[0];
|
|
10107
10132
|
const getErrorMessage = fieldName => {
|
|
10108
10133
|
var _errors$fieldName;
|
|
@@ -13325,7 +13350,10 @@ const MyProperties = ({
|
|
|
13325
13350
|
var _property$additionalD, _property$additionalD2;
|
|
13326
13351
|
return /*#__PURE__*/React.createElement(Card, {
|
|
13327
13352
|
key: index
|
|
13328
|
-
}, /*#__PURE__*/React.createElement(KeyNote, {
|
|
13353
|
+
}, (property === null || property === void 0 ? void 0 : property.registrationNumber) && /*#__PURE__*/React.createElement(KeyNote, {
|
|
13354
|
+
keyValue: t("RAL_REGISTRATION_NUMBER"),
|
|
13355
|
+
note: (property === null || property === void 0 ? void 0 : property.registrationNumber) || t("CS_NA")
|
|
13356
|
+
}), /*#__PURE__*/React.createElement(KeyNote, {
|
|
13329
13357
|
keyValue: t("RAL_APPLICATION_NUMBER"),
|
|
13330
13358
|
note: (property === null || property === void 0 ? void 0 : property.applicationNumber) || t("CS_NA")
|
|
13331
13359
|
}), /*#__PURE__*/React.createElement(KeyNote, {
|