@mseva/digit-ui-module-rentandlease 1.0.19 → 1.0.21
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 +185 -22
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -6164,6 +6164,9 @@ const getAcknowledgementData = async (application, tenantInfo, t) => {
|
|
|
6164
6164
|
details.push({
|
|
6165
6165
|
title: t("PT_PROPERTY_DETAILS"),
|
|
6166
6166
|
values: [{
|
|
6167
|
+
title: t("STATUS"),
|
|
6168
|
+
value: t(application === null || application === void 0 ? void 0 : application.status) || "NA"
|
|
6169
|
+
}, {
|
|
6167
6170
|
title: t("PROPERTY_ID"),
|
|
6168
6171
|
value: t(application === null || application === void 0 ? void 0 : (_application$addition = application.additionalDetails) === null || _application$addition === void 0 ? void 0 : _application$addition.propertyId) || "NA"
|
|
6169
6172
|
}, {
|
|
@@ -7544,6 +7547,9 @@ const RALApplicationDetails = () => {
|
|
|
7544
7547
|
moduleCode: "RENT_N_LEASE_NEW",
|
|
7545
7548
|
role: "EMPLOYEE"
|
|
7546
7549
|
});
|
|
7550
|
+
const getDate = epoch => {
|
|
7551
|
+
return Digit.DateUtils.ConvertEpochToDate(epoch);
|
|
7552
|
+
};
|
|
7547
7553
|
const propertyDetails = applicationData !== null && applicationData !== void 0 && applicationData.additionalDetails ? applicationData.additionalDetails : {};
|
|
7548
7554
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
7549
7555
|
className: "cardHeaderWithOptions ral-app-details-header"
|
|
@@ -7557,7 +7563,7 @@ const RALApplicationDetails = () => {
|
|
|
7557
7563
|
})), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
7558
7564
|
className: "ral-card-subheader-24"
|
|
7559
7565
|
}, t("RENT_LEASE_OWNER_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, applicationData !== null && applicationData !== void 0 && (_applicationData$Owne = applicationData.OwnerInfo) !== null && _applicationData$Owne !== void 0 && _applicationData$Owne.length ? applicationData.OwnerInfo.map((owner, index) => {
|
|
7560
|
-
var _applicationData$Owne2, _owner$correspondence, _owner$permanentAddre;
|
|
7566
|
+
var _applicationData$Owne2, _owner$correspondence, _owner$permanentAddre, _owner$correspondence2, _owner$permanentAddre2;
|
|
7561
7567
|
const multipleOwners = (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$Owne2 = applicationData.OwnerInfo) === null || _applicationData$Owne2 === void 0 ? void 0 : _applicationData$Owne2.length) > 1;
|
|
7562
7568
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
7563
7569
|
key: owner.ownerId || index
|
|
@@ -7572,9 +7578,12 @@ const RALApplicationDetails = () => {
|
|
|
7572
7578
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7573
7579
|
label: t("CORE_MOBILE_NUMBER"),
|
|
7574
7580
|
text: (owner === null || owner === void 0 ? void 0 : owner.mobileNo) || t("CS_NA")
|
|
7581
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
7582
|
+
label: t("PT_COMMON_COL_ADDRESS"),
|
|
7583
|
+
text: (owner === null || owner === void 0 ? void 0 : (_owner$correspondence = owner.correspondenceAddress) === null || _owner$correspondence === void 0 ? void 0 : _owner$correspondence.addressId) || (owner === null || owner === void 0 ? void 0 : (_owner$permanentAddre = owner.permanentAddress) === null || _owner$permanentAddre === void 0 ? void 0 : _owner$permanentAddre.addressId) || t("CS_NA")
|
|
7575
7584
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7576
7585
|
label: t("CORE_COMMON_PINCODE"),
|
|
7577
|
-
text: (owner === null || owner === void 0 ? void 0 : (_owner$
|
|
7586
|
+
text: (owner === null || owner === void 0 ? void 0 : (_owner$correspondence2 = owner.correspondenceAddress) === null || _owner$correspondence2 === void 0 ? void 0 : _owner$correspondence2.pincode) || (owner === null || owner === void 0 ? void 0 : (_owner$permanentAddre2 = owner.permanentAddress) === null || _owner$permanentAddre2 === void 0 ? void 0 : _owner$permanentAddre2.pincode) || t("CS_NA")
|
|
7578
7587
|
}));
|
|
7579
7588
|
}) : /*#__PURE__*/React.createElement(Row, {
|
|
7580
7589
|
label: t("OWNER"),
|
|
@@ -7603,8 +7612,8 @@ const RALApplicationDetails = () => {
|
|
|
7603
7612
|
label: t("RAL_PROPERTY_AMOUNT"),
|
|
7604
7613
|
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.baseRent) || t("CS_NA")
|
|
7605
7614
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7606
|
-
label: t("
|
|
7607
|
-
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.
|
|
7615
|
+
label: t("PENALTY_TYPE"),
|
|
7616
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.penaltyType) || t("CS_NA")
|
|
7608
7617
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7609
7618
|
label: t("RAL_FEE_CYCLE"),
|
|
7610
7619
|
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$fees = propertyDetails.feesPeriodCycle) === null || _propertyDetails$fees === void 0 ? void 0 : (_propertyDetails$fees2 = _propertyDetails$fees[0]) === null || _propertyDetails$fees2 === void 0 ? void 0 : _propertyDetails$fees2.toUpperCase()) + (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$fees3 = propertyDetails.feesPeriodCycle) === null || _propertyDetails$fees3 === void 0 ? void 0 : (_propertyDetails$fees4 = _propertyDetails$fees3.slice(1)) === null || _propertyDetails$fees4 === void 0 ? void 0 : _propertyDetails$fees4.toLowerCase()) || t("CS_NA")
|
|
@@ -7614,6 +7623,27 @@ const RALApplicationDetails = () => {
|
|
|
7614
7623
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7615
7624
|
label: t("RENT_LEASE_LOCATION_TYPE"),
|
|
7616
7625
|
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.locationType) || t("CS_NA")
|
|
7626
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
7627
|
+
label: t("RAL_START_DATE"),
|
|
7628
|
+
text: getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.startDate) || t("CS_NA")
|
|
7629
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
7630
|
+
label: t("RAL_END_DATE"),
|
|
7631
|
+
text: getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.endDate) || t("CS_NA")
|
|
7632
|
+
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) > 0 && /*#__PURE__*/React.createElement(Row, {
|
|
7633
|
+
label: t("RAL_PROPERTY_PENALTY"),
|
|
7634
|
+
text: applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted
|
|
7635
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
7636
|
+
label: t("SECURITY_DEPOSIT"),
|
|
7637
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit) || t("CS_NA")
|
|
7638
|
+
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) - (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit) > 0 && /*#__PURE__*/React.createElement(Row, {
|
|
7639
|
+
label: t("RAL_AMOUNT_TO_TAKE_FROM_CITIZEN"),
|
|
7640
|
+
text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) - (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit)
|
|
7641
|
+
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund) > 0 && /*#__PURE__*/React.createElement(Row, {
|
|
7642
|
+
label: t("RAL_AMOUNT_TO_REFUND"),
|
|
7643
|
+
text: applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund
|
|
7644
|
+
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) && /*#__PURE__*/React.createElement(Row, {
|
|
7645
|
+
label: t("RENT_LEASE_TRADE_LICENSE_NUMBER"),
|
|
7646
|
+
text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) || t("CS_NA")
|
|
7617
7647
|
})), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
7618
7648
|
className: "ral-card-subheader-24-margin"
|
|
7619
7649
|
}, t("CS_COMMON_DOCUMENTS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Card, {
|
|
@@ -8648,7 +8678,7 @@ const ModalConfig = ({
|
|
|
8648
8678
|
assigneeLabel,
|
|
8649
8679
|
businessService
|
|
8650
8680
|
}) => {
|
|
8651
|
-
let checkAssigneeVisible = (action === null || action === void 0 ? void 0 : action.action) === "
|
|
8681
|
+
let checkAssigneeVisible = (action === null || action === void 0 ? void 0 : action.action) === "PENDING_FOR_FIELDINSPECTION" || (action === null || action === void 0 ? void 0 : action.action) === "FORWARD_FOR_APPROVAL" || (action === null || action === void 0 ? void 0 : action.action) === "PENDING_FOR_DOCUMENT_VERIFY" || (action === null || action === void 0 ? void 0 : action.action) === "REQUEST_FOR_DISCONNECTION" || (action === null || action === void 0 ? void 0 : action.action) === "DISCONNECTION_FIELD_INSPECTION" || (action === null || action === void 0 ? void 0 : action.action) === "FORWARD_FOR_FIELDINSPECTION" || (action === null || action === void 0 ? void 0 : action.action) === "FORWARD_FOT_SETLEMENT";
|
|
8652
8682
|
if (action !== null && action !== void 0 && action.isTerminateState) checkAssigneeMandatory = false;
|
|
8653
8683
|
if (action.isTerminateState) {
|
|
8654
8684
|
checkAssigneeVisible = false;
|
|
@@ -8716,9 +8746,15 @@ const ModalConfig = ({
|
|
|
8716
8746
|
onDelete: () => {
|
|
8717
8747
|
setUploadedFile(null);
|
|
8718
8748
|
},
|
|
8719
|
-
message: uploadedFile ? `1 ${t(
|
|
8749
|
+
message: uploadedFile ? `1 ${t("ES_PT_ACTION_FILEUPLOADED")}` : t("CS_ACTION_NO_FILEUPLOADED")
|
|
8720
8750
|
})
|
|
8721
|
-
}
|
|
8751
|
+
}, ...((action === null || action === void 0 ? void 0 : action.action) === "FORWARD_FOT_SETLEMENT" ? [{
|
|
8752
|
+
label: `${t("RAL_PROPERTY_DAMAGE_PENALTY")}`,
|
|
8753
|
+
type: "number",
|
|
8754
|
+
populators: {
|
|
8755
|
+
name: "amountToBeDeducted"
|
|
8756
|
+
}
|
|
8757
|
+
}] : [])]
|
|
8722
8758
|
}]
|
|
8723
8759
|
};
|
|
8724
8760
|
};
|
|
@@ -8869,7 +8905,8 @@ const RALModal = ({
|
|
|
8869
8905
|
closeModal();
|
|
8870
8906
|
return;
|
|
8871
8907
|
}
|
|
8872
|
-
|
|
8908
|
+
if (action !== null && action !== void 0 && action.isTerminateState) checkCommentsMandatory = true;
|
|
8909
|
+
let checkAssigneeMandatory = (action === null || action === void 0 ? void 0 : action.action) === "PENDING_FOR_FIELDINSPECTION" || (action === null || action === void 0 ? void 0 : action.action) === "FORWARD_FOR_APPROVAL" || (action === null || action === void 0 ? void 0 : action.action) === "PENDING_FOR_DOCUMENT_VERIFY" || (action === null || action === void 0 ? void 0 : action.action) === "REQUEST_FOR_DISCONNECTION" || (action === null || action === void 0 ? void 0 : action.action) === "FORWARD_FOT_SETLEMENT" || (action === null || action === void 0 ? void 0 : action.action) === "DISCONNECTION_FIELD_INSPECTION" || (action === null || action === void 0 ? void 0 : action.action) === "FORWARD_FOR_FIELDINSPECTION";
|
|
8873
8910
|
if (action !== null && action !== void 0 && action.isTerminateState) checkAssigneeMandatory = false;
|
|
8874
8911
|
if (checkAssigneeMandatory && !(selectedApprover !== null && selectedApprover !== void 0 && selectedApprover.uuid)) {
|
|
8875
8912
|
setShowToast({
|
|
@@ -8888,6 +8925,7 @@ const RALModal = ({
|
|
|
8888
8925
|
}
|
|
8889
8926
|
applicationData = {
|
|
8890
8927
|
...applicationData,
|
|
8928
|
+
...data,
|
|
8891
8929
|
action: action === null || action === void 0 ? void 0 : action.action,
|
|
8892
8930
|
comment: data === null || data === void 0 ? void 0 : data.comments,
|
|
8893
8931
|
assignee: !(selectedApprover !== null && selectedApprover !== void 0 && selectedApprover.uuid) ? null : [selectedApprover === null || selectedApprover === void 0 ? void 0 : selectedApprover.uuid],
|
|
@@ -8916,6 +8954,13 @@ const RALModal = ({
|
|
|
8916
8954
|
}));
|
|
8917
8955
|
}
|
|
8918
8956
|
}, [action, approvers, financialYears, uploadedFile]);
|
|
8957
|
+
useEffect(() => {
|
|
8958
|
+
if ((action === null || action === void 0 ? void 0 : action.action) === "FORWARD_FOT_SETLEMENT") {
|
|
8959
|
+
setDefaultValues({
|
|
8960
|
+
amountToBeDeducted: 0
|
|
8961
|
+
});
|
|
8962
|
+
}
|
|
8963
|
+
}, [action]);
|
|
8919
8964
|
if (!action || !config.form) return null;
|
|
8920
8965
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
8921
8966
|
headerBarMain: /*#__PURE__*/React.createElement(Heading, {
|
|
@@ -8950,7 +8995,7 @@ const RALModal = ({
|
|
|
8950
8995
|
};
|
|
8951
8996
|
|
|
8952
8997
|
const RALApplicationDetails$1 = () => {
|
|
8953
|
-
var _user$info, _user$info$roles, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _actions, _applicationData$Owne, _propertyDetails$fees, _propertyDetails$fees2, _propertyDetails$fees3, _propertyDetails$fees4, _applicationData$Docu2,
|
|
8998
|
+
var _user$info, _user$info$roles, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _actions, _actions2, _applicationData$Owne, _propertyDetails$fees, _propertyDetails$fees2, _propertyDetails$fees3, _propertyDetails$fees4, _applicationData$Docu2, _actions3, _workflowDetails$data6;
|
|
8954
8999
|
const {
|
|
8955
9000
|
t
|
|
8956
9001
|
} = useTranslation();
|
|
@@ -9022,11 +9067,21 @@ const RALApplicationDetails$1 = () => {
|
|
|
9022
9067
|
return (_e$roles2 = e.roles) === null || _e$roles2 === void 0 ? void 0 : _e$roles2.includes(role);
|
|
9023
9068
|
})) || !e.roles;
|
|
9024
9069
|
}));
|
|
9025
|
-
if ((_actions = actions) !== null && _actions !== void 0 && _actions.some(action => action.action === "REQUEST_FOR_DISCONNECTION") && (applicationData === null || applicationData === void 0 ? void 0 : applicationData.endDate)
|
|
9070
|
+
if ((_actions = actions) !== null && _actions !== void 0 && _actions.some(action => (action === null || action === void 0 ? void 0 : action.action) === "REQUEST_FOR_DISCONNECTION") && !(applicationData !== null && applicationData !== void 0 && applicationData.expireFlag) && Date.now() >= (applicationData === null || applicationData === void 0 ? void 0 : applicationData.endDate) - 15 * 24 * 60 * 60 * 1000) {
|
|
9026
9071
|
actions = [...(actions || []), {
|
|
9027
9072
|
action: "RENEWAL"
|
|
9028
9073
|
}];
|
|
9029
9074
|
}
|
|
9075
|
+
actions = (_actions2 = actions) === null || _actions2 === void 0 ? void 0 : _actions2.filter(action => {
|
|
9076
|
+
if (action.action === "PAY_SETTLEMENT_AMOUNT") {
|
|
9077
|
+
return (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) > 0 && (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) - (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit) > 0 && (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund) == 0;
|
|
9078
|
+
}
|
|
9079
|
+
if (action.action === "CLOSE") {
|
|
9080
|
+
return (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund) > 0;
|
|
9081
|
+
}
|
|
9082
|
+
return true;
|
|
9083
|
+
});
|
|
9084
|
+
console.log("actions", actions);
|
|
9030
9085
|
const closeToast = () => {
|
|
9031
9086
|
setShowToast(null);
|
|
9032
9087
|
};
|
|
@@ -9035,6 +9090,9 @@ const RALApplicationDetails$1 = () => {
|
|
|
9035
9090
|
setShowModal(false);
|
|
9036
9091
|
setShowToast(false);
|
|
9037
9092
|
};
|
|
9093
|
+
const getDate = epoch => {
|
|
9094
|
+
return Digit.DateUtils.ConvertEpochToDate(epoch);
|
|
9095
|
+
};
|
|
9038
9096
|
function onActionSelect(action) {
|
|
9039
9097
|
var _ref, _action$state, _filterRoles$;
|
|
9040
9098
|
const payload = {
|
|
@@ -9046,9 +9104,9 @@ const RALApplicationDetails$1 = () => {
|
|
|
9046
9104
|
return (item === null || item === void 0 ? void 0 : item.uuid) == (filterNexState === null || filterNexState === void 0 ? void 0 : (_filterNexState$ = filterNexState[0]) === null || _filterNexState$ === void 0 ? void 0 : _filterNexState$.nextState);
|
|
9047
9105
|
});
|
|
9048
9106
|
setEmployees((filterRoles === null || filterRoles === void 0 ? void 0 : (_filterRoles$ = filterRoles[0]) === null || _filterRoles$ === void 0 ? void 0 : _filterRoles$.actions) || []);
|
|
9049
|
-
if ((action === null || action === void 0 ? void 0 : action.action) == "APPLY" || (action === null || action === void 0 ? void 0 : action.action) == "REJECT" || (action === null || action === void 0 ? void 0 : action.action) == "
|
|
9107
|
+
if ((action === null || action === void 0 ? void 0 : action.action) == "APPLY" || (action === null || action === void 0 ? void 0 : action.action) == "REJECT" || (action === null || action === void 0 ? void 0 : action.action) == "CLOSED" || (action === null || action === void 0 ? void 0 : action.action) == "CLOSE") {
|
|
9050
9108
|
submitAction(payload);
|
|
9051
|
-
} else if ((action === null || action === void 0 ? void 0 : action.action) == "PAY") {
|
|
9109
|
+
} else if ((action === null || action === void 0 ? void 0 : action.action) == "PAY" || (action === null || action === void 0 ? void 0 : action.action) == "PAY_SETTLEMENT_AMOUNT") {
|
|
9052
9110
|
const appNo = acknowledgementIds;
|
|
9053
9111
|
history.push(`/digit-ui/employee/payment/collect/rl-services/${appNo}/${tenantId}`);
|
|
9054
9112
|
} else if ((action === null || action === void 0 ? void 0 : action.action) === "RAL_RENEWAL") {
|
|
@@ -9060,7 +9118,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
9060
9118
|
}
|
|
9061
9119
|
}
|
|
9062
9120
|
const submitAction = async data => {
|
|
9063
|
-
var _applicationData$audi, _filtData, _filtData2, _filtData3, _filtData4;
|
|
9121
|
+
var _applicationData$audi, _filtData, _filtData2, _filtData3, _filtData4, _filtData5;
|
|
9064
9122
|
const payloadData = applicationData;
|
|
9065
9123
|
const updatedApplicant = {
|
|
9066
9124
|
...payloadData,
|
|
@@ -9084,6 +9142,9 @@ const RALApplicationDetails$1 = () => {
|
|
|
9084
9142
|
comments: (_filtData2 = filtData) === null || _filtData2 === void 0 ? void 0 : _filtData2.comment,
|
|
9085
9143
|
documents: (_filtData3 = filtData) !== null && _filtData3 !== void 0 && _filtData3.wfDocuments ? (_filtData4 = filtData) === null || _filtData4 === void 0 ? void 0 : _filtData4.wfDocuments : null
|
|
9086
9144
|
};
|
|
9145
|
+
if (filtData.action === "FORWARD_FOT_SETLEMENT" && ((_filtData5 = filtData) === null || _filtData5 === void 0 ? void 0 : _filtData5.amountToBeDeducted) !== undefined) {
|
|
9146
|
+
updatedApplicant.amountToBeDeducted = filtData.amountToBeDeducted;
|
|
9147
|
+
}
|
|
9087
9148
|
const finalPayload = {
|
|
9088
9149
|
AllotmentDetails: updatedApplicant
|
|
9089
9150
|
};
|
|
@@ -9150,6 +9211,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
9150
9211
|
previousApplicationNumber: data === null || data === void 0 ? void 0 : data.applicationNumber,
|
|
9151
9212
|
OwnerInfo: sanitizedOwners,
|
|
9152
9213
|
tradeLicenseNumber: data === null || data === void 0 ? void 0 : data.tradeLicenseNumber,
|
|
9214
|
+
registrationNumber: data === null || data === void 0 ? void 0 : data.registrationNumber,
|
|
9153
9215
|
additionalDetails: data === null || data === void 0 ? void 0 : data.additionalDetails,
|
|
9154
9216
|
startDate: newStart.getTime(),
|
|
9155
9217
|
endDate: newEnd.getTime(),
|
|
@@ -9215,7 +9277,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
9215
9277
|
}, t("RENT_LEASE_APPLICATION_DETAILS"))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
9216
9278
|
className: "ral-card-subheader-24"
|
|
9217
9279
|
}, t("RENT_LEASE_OWNER_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, applicationData !== null && applicationData !== void 0 && (_applicationData$Owne = applicationData.OwnerInfo) !== null && _applicationData$Owne !== void 0 && _applicationData$Owne.length ? applicationData.OwnerInfo.map((owner, index) => {
|
|
9218
|
-
var _owner$correspondence, _owner$permanentAddre;
|
|
9280
|
+
var _owner$correspondence, _owner$permanentAddre, _owner$correspondence2, _owner$permanentAddre2;
|
|
9219
9281
|
const multipleOwners = applicationData.OwnerInfo.length > 1;
|
|
9220
9282
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
9221
9283
|
key: owner.ownerId || index
|
|
@@ -9230,9 +9292,12 @@ const RALApplicationDetails$1 = () => {
|
|
|
9230
9292
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9231
9293
|
label: t("CORE_MOBILE_NUMBER"),
|
|
9232
9294
|
text: (owner === null || owner === void 0 ? void 0 : owner.mobileNo) || t("CS_NA")
|
|
9295
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
9296
|
+
label: t("PT_COMMON_COL_ADDRESS"),
|
|
9297
|
+
text: (owner === null || owner === void 0 ? void 0 : (_owner$correspondence = owner.correspondenceAddress) === null || _owner$correspondence === void 0 ? void 0 : _owner$correspondence.addressId) || (owner === null || owner === void 0 ? void 0 : (_owner$permanentAddre = owner.permanentAddress) === null || _owner$permanentAddre === void 0 ? void 0 : _owner$permanentAddre.addressId) || t("CS_NA")
|
|
9233
9298
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9234
9299
|
label: t("CORE_COMMON_PINCODE"),
|
|
9235
|
-
text: (owner === null || owner === void 0 ? void 0 : (_owner$
|
|
9300
|
+
text: (owner === null || owner === void 0 ? void 0 : (_owner$correspondence2 = owner.correspondenceAddress) === null || _owner$correspondence2 === void 0 ? void 0 : _owner$correspondence2.pincode) || (owner === null || owner === void 0 ? void 0 : (_owner$permanentAddre2 = owner.permanentAddress) === null || _owner$permanentAddre2 === void 0 ? void 0 : _owner$permanentAddre2.pincode) || t("CS_NA")
|
|
9236
9301
|
}));
|
|
9237
9302
|
}) : /*#__PURE__*/React.createElement(Row, {
|
|
9238
9303
|
label: t("OWNER"),
|
|
@@ -9264,8 +9329,8 @@ const RALApplicationDetails$1 = () => {
|
|
|
9264
9329
|
label: t("RAL_PROPERTY_AMOUNT"),
|
|
9265
9330
|
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.baseRent) || t("CS_NA")
|
|
9266
9331
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9267
|
-
label: t("
|
|
9268
|
-
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.
|
|
9332
|
+
label: t("PENALTY_TYPE"),
|
|
9333
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.penaltyType) || t("CS_NA")
|
|
9269
9334
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9270
9335
|
label: t("RAL_FEE_CYCLE"),
|
|
9271
9336
|
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$fees = propertyDetails.feesPeriodCycle) === null || _propertyDetails$fees === void 0 ? void 0 : (_propertyDetails$fees2 = _propertyDetails$fees[0]) === null || _propertyDetails$fees2 === void 0 ? void 0 : _propertyDetails$fees2.toUpperCase()) + (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$fees3 = propertyDetails.feesPeriodCycle) === null || _propertyDetails$fees3 === void 0 ? void 0 : (_propertyDetails$fees4 = _propertyDetails$fees3.slice(1)) === null || _propertyDetails$fees4 === void 0 ? void 0 : _propertyDetails$fees4.toLowerCase()) || t("CS_NA")
|
|
@@ -9275,6 +9340,27 @@ const RALApplicationDetails$1 = () => {
|
|
|
9275
9340
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9276
9341
|
label: t("RENT_LEASE_LOCATION_TYPE"),
|
|
9277
9342
|
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.locationType) || t("CS_NA")
|
|
9343
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
9344
|
+
label: t("RAL_START_DATE"),
|
|
9345
|
+
text: getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.startDate) || t("CS_NA")
|
|
9346
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
9347
|
+
label: t("RAL_END_DATE"),
|
|
9348
|
+
text: getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.endDate) || t("CS_NA")
|
|
9349
|
+
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) > 0 && /*#__PURE__*/React.createElement(Row, {
|
|
9350
|
+
label: t("RAL_PROPERTY_PENALTY"),
|
|
9351
|
+
text: applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted
|
|
9352
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
9353
|
+
label: t("SECURITY_DEPOSIT"),
|
|
9354
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit) || t("CS_NA")
|
|
9355
|
+
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) - (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit) > 0 && /*#__PURE__*/React.createElement(Row, {
|
|
9356
|
+
label: t("RAL_AMOUNT_TO_TAKE_FROM_CITIZEN"),
|
|
9357
|
+
text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) - (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit)
|
|
9358
|
+
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund) > 0 && /*#__PURE__*/React.createElement(Row, {
|
|
9359
|
+
label: t("RAL_AMOUNT_TO_REFUND"),
|
|
9360
|
+
text: applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund
|
|
9361
|
+
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) && /*#__PURE__*/React.createElement(Row, {
|
|
9362
|
+
label: t("RENT_LEASE_TRADE_LICENSE_NUMBER"),
|
|
9363
|
+
text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) || t("CS_NA")
|
|
9278
9364
|
})), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
9279
9365
|
className: "ral-card-subheader-24-margin"
|
|
9280
9366
|
}, t("CS_COMMON_DOCUMENTS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Card, {
|
|
@@ -9288,7 +9374,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
9288
9374
|
}), t(doc === null || doc === void 0 ? void 0 : doc.documentType))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
9289
9375
|
workflowDetails: workflowDetails,
|
|
9290
9376
|
t: t
|
|
9291
|
-
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.status) != "INITIATED" && ((
|
|
9377
|
+
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.status) != "INITIATED" && ((_actions3 = actions) === null || _actions3 === void 0 ? void 0 : _actions3.length) > 0 && !(applicationData !== null && applicationData !== void 0 && applicationData.expireFlag) && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement("div", {
|
|
9292
9378
|
ref: menuRef
|
|
9293
9379
|
}, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
|
|
9294
9380
|
localeKeyPrefix: `WF_EMPLOYEE_${"PTR"}`,
|
|
@@ -10106,6 +10192,7 @@ const RentAndLeasePropertyDetails = ({
|
|
|
10106
10192
|
baseRent: "",
|
|
10107
10193
|
securityDeposit: "",
|
|
10108
10194
|
refundApplicableOnDiscontinuation: null,
|
|
10195
|
+
penaltyType: "",
|
|
10109
10196
|
startDate: "",
|
|
10110
10197
|
endDate: "",
|
|
10111
10198
|
incrementApplicable: "",
|
|
@@ -10136,7 +10223,7 @@ const RentAndLeasePropertyDetails = ({
|
|
|
10136
10223
|
};
|
|
10137
10224
|
const handlePropertySelect = property => {
|
|
10138
10225
|
if (!property) return;
|
|
10139
|
-
const fieldsToPrefill = ["propertyId", "propertyName", "baseRent", "securityDeposit", "refundApplicableOnDiscontinuation"];
|
|
10226
|
+
const fieldsToPrefill = ["propertyId", "propertyName", "baseRent", "securityDeposit", "refundApplicableOnDiscontinuation", "penaltyType"];
|
|
10140
10227
|
setValue("selectedProperty", property);
|
|
10141
10228
|
fieldsToPrefill === null || fieldsToPrefill === void 0 ? void 0 : fieldsToPrefill.forEach(field => {
|
|
10142
10229
|
setValue(field, (property === null || property === void 0 ? void 0 : property[field]) ?? null, {
|
|
@@ -10418,7 +10505,27 @@ const RentAndLeasePropertyDetails = ({
|
|
|
10418
10505
|
})
|
|
10419
10506
|
}))), errors.baseRent && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
10420
10507
|
className: "ral-error-label"
|
|
10421
|
-
}, getErrorMessage("baseRent")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel,
|
|
10508
|
+
}, getErrorMessage("baseRent")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
10509
|
+
className: "card-label-smaller"
|
|
10510
|
+
}, t("PENALTY_TYPE"), " ", /*#__PURE__*/React.createElement("span", null, "*")), /*#__PURE__*/React.createElement("div", {
|
|
10511
|
+
className: "form-field"
|
|
10512
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
10513
|
+
control: control,
|
|
10514
|
+
name: "penaltyType",
|
|
10515
|
+
rules: {
|
|
10516
|
+
required: t("PTR_FIELD_REQUIRED")
|
|
10517
|
+
},
|
|
10518
|
+
render: ({
|
|
10519
|
+
value,
|
|
10520
|
+
onChange
|
|
10521
|
+
}) => /*#__PURE__*/React.createElement(TextInput, {
|
|
10522
|
+
type: "text",
|
|
10523
|
+
value: value || "",
|
|
10524
|
+
onChange: e => onChange(e.target.value),
|
|
10525
|
+
t: t,
|
|
10526
|
+
disabled: true
|
|
10527
|
+
})
|
|
10528
|
+
}))), errors.penaltyType && /*#__PURE__*/React.createElement(CardLabelError, null, getErrorMessage("penaltyType")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("RAL_SECURITY_AMOUNT"), " ", /*#__PURE__*/React.createElement("span", null, "*")), /*#__PURE__*/React.createElement("div", {
|
|
10422
10529
|
className: "form-field"
|
|
10423
10530
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
10424
10531
|
control: control,
|
|
@@ -11539,7 +11646,8 @@ function RentAndLeaseSummary({
|
|
|
11539
11646
|
baseRent: t("RENT_AMOUNT "),
|
|
11540
11647
|
securityDeposit: t("SECURITY_DEPOSIT"),
|
|
11541
11648
|
tax_applicable: t("GST_APPLICABLE"),
|
|
11542
|
-
refundApplicableOnDiscontinuation: t("REFUND_APPLICABLE")
|
|
11649
|
+
refundApplicableOnDiscontinuation: t("REFUND_APPLICABLE"),
|
|
11650
|
+
penaltyType: t("PENALTY_TYPE")
|
|
11543
11651
|
};
|
|
11544
11652
|
return /*#__PURE__*/React.createElement("div", {
|
|
11545
11653
|
className: "application-summary"
|
|
@@ -13309,6 +13417,8 @@ const MyProperties = ({
|
|
|
13309
13417
|
offset: 0,
|
|
13310
13418
|
mobileNumber: userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info = userInfo.info) === null || _userInfo$info === void 0 ? void 0 : _userInfo$info.mobileNumber
|
|
13311
13419
|
});
|
|
13420
|
+
const [selectedProperty, setSelectedProperty] = useState(null);
|
|
13421
|
+
const [showToast, setShowToast] = useState(null);
|
|
13312
13422
|
const fetchProperties = async () => {
|
|
13313
13423
|
setLoader(true);
|
|
13314
13424
|
try {
|
|
@@ -13333,6 +13443,12 @@ const MyProperties = ({
|
|
|
13333
13443
|
useEffect(() => {
|
|
13334
13444
|
fetchProperties();
|
|
13335
13445
|
}, [filters.offset]);
|
|
13446
|
+
useEffect(() => {
|
|
13447
|
+
if (showToast) {
|
|
13448
|
+
const timer = setTimeout(() => setShowToast(null), 2000);
|
|
13449
|
+
return () => clearTimeout(timer);
|
|
13450
|
+
}
|
|
13451
|
+
}, [showToast]);
|
|
13336
13452
|
const handleLoadMore = () => {
|
|
13337
13453
|
setFilters(prev => ({
|
|
13338
13454
|
...prev,
|
|
@@ -13342,12 +13458,51 @@ const MyProperties = ({
|
|
|
13342
13458
|
const handleMakePayment = id => {
|
|
13343
13459
|
history.push(`/digit-ui/citizen/payment/collect/rl-services/${id}/${tenantId}?tenantId=${tenantId}`);
|
|
13344
13460
|
};
|
|
13461
|
+
const submitAction = async (action, property) => {
|
|
13462
|
+
const updatedApplicant = {
|
|
13463
|
+
...property,
|
|
13464
|
+
workflow: {
|
|
13465
|
+
action: action,
|
|
13466
|
+
assignes: [],
|
|
13467
|
+
comments: "",
|
|
13468
|
+
documents: null
|
|
13469
|
+
}
|
|
13470
|
+
};
|
|
13471
|
+
const finalPayload = {
|
|
13472
|
+
AllotmentDetails: updatedApplicant
|
|
13473
|
+
};
|
|
13474
|
+
try {
|
|
13475
|
+
var _response$ResponseInf;
|
|
13476
|
+
setLoader(true);
|
|
13477
|
+
const response = await Digit.RentAndLeaseService.update(finalPayload);
|
|
13478
|
+
if ((response === null || response === void 0 ? void 0 : (_response$ResponseInf = response.ResponseInfo) === null || _response$ResponseInf === void 0 ? void 0 : _response$ResponseInf.status) == "successful") {
|
|
13479
|
+
setShowToast({
|
|
13480
|
+
key: false,
|
|
13481
|
+
label: "Successfully updated the status"
|
|
13482
|
+
});
|
|
13483
|
+
setPropertiesData([]);
|
|
13484
|
+
setFilters(prev => ({
|
|
13485
|
+
...prev,
|
|
13486
|
+
offset: 0
|
|
13487
|
+
}));
|
|
13488
|
+
fetchProperties();
|
|
13489
|
+
}
|
|
13490
|
+
} catch (err) {
|
|
13491
|
+
setShowToast({
|
|
13492
|
+
key: true,
|
|
13493
|
+
label: "Something went wrong"
|
|
13494
|
+
});
|
|
13495
|
+
} finally {
|
|
13496
|
+
setLoader(false);
|
|
13497
|
+
}
|
|
13498
|
+
};
|
|
13345
13499
|
return /*#__PURE__*/React.createElement("div", {
|
|
13346
13500
|
className: "ral-my-properties-container"
|
|
13347
13501
|
}, /*#__PURE__*/React.createElement("div", null, header && /*#__PURE__*/React.createElement(Header, {
|
|
13348
13502
|
className: "ral-my-properties-header"
|
|
13349
13503
|
}, t(header), " (", totalCount, ")"), getPropertiesData === null || getPropertiesData === void 0 ? void 0 : getPropertiesData.map((property, index) => {
|
|
13350
13504
|
var _property$additionalD, _property$additionalD2;
|
|
13505
|
+
console.log("property", property);
|
|
13351
13506
|
return /*#__PURE__*/React.createElement(Card, {
|
|
13352
13507
|
key: index
|
|
13353
13508
|
}, (property === null || property === void 0 ? void 0 : property.registrationNumber) && /*#__PURE__*/React.createElement(KeyNote, {
|
|
@@ -13371,9 +13526,12 @@ const MyProperties = ({
|
|
|
13371
13526
|
to: `/digit-ui/citizen/rentandlease/property/${property === null || property === void 0 ? void 0 : property.applicationNumber}/${property === null || property === void 0 ? void 0 : property.tenantId}`
|
|
13372
13527
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
13373
13528
|
label: t("CS_VIEW_DETAILS")
|
|
13374
|
-
})), ((property === null || property === void 0 ? void 0 : property.status) == "PENDINGPAYMENT" || (property === null || property === void 0 ? void 0 : property.status) == "PENDING_FOR_PAYMENT" || (property === null || property === void 0 ? void 0 : property.status) == "PENDING_FOT_SETLEMENT") && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
13529
|
+
})), ((property === null || property === void 0 ? void 0 : property.status) == "PENDINGPAYMENT" || (property === null || property === void 0 ? void 0 : property.status) == "PENDING_FOR_PAYMENT" || (property === null || property === void 0 ? void 0 : property.status) == "PENDING_FOT_SETLEMENT" && (property === null || property === void 0 ? void 0 : property.amountToBeDeducted) > 0) && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
13375
13530
|
label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT"),
|
|
13376
13531
|
onSubmit: () => handleMakePayment(property === null || property === void 0 ? void 0 : property.applicationNumber)
|
|
13532
|
+
}), (property === null || property === void 0 ? void 0 : property.status) == "APPROVED" && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
13533
|
+
label: t("REQUEST_FOR_DISCONNECTION"),
|
|
13534
|
+
onSubmit: () => submitAction("REQUEST_FOR_DISCONNECTION", property)
|
|
13377
13535
|
})));
|
|
13378
13536
|
}), (getPropertiesData === null || getPropertiesData === void 0 ? void 0 : getPropertiesData.length) === 0 && !loader && /*#__PURE__*/React.createElement("p", {
|
|
13379
13537
|
className: "ral-my-properties-no-result"
|
|
@@ -13384,6 +13542,11 @@ const MyProperties = ({
|
|
|
13384
13542
|
onClick: handleLoadMore
|
|
13385
13543
|
}, t("CHB_LOAD_MORE_MSG")))), loader && /*#__PURE__*/React.createElement(Loader, {
|
|
13386
13544
|
page: true
|
|
13545
|
+
}), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
13546
|
+
error: showToast.key,
|
|
13547
|
+
label: t(showToast.label),
|
|
13548
|
+
isDleteBtn: true,
|
|
13549
|
+
onClose: () => setShowToast(null)
|
|
13387
13550
|
}));
|
|
13388
13551
|
};
|
|
13389
13552
|
MyProperties.propTypes = {
|