@mseva/digit-ui-module-rentandlease 1.0.20 → 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 +161 -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
|
}, {
|
|
@@ -7560,7 +7563,7 @@ const RALApplicationDetails = () => {
|
|
|
7560
7563
|
})), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
7561
7564
|
className: "ral-card-subheader-24"
|
|
7562
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) => {
|
|
7563
|
-
var _applicationData$Owne2, _owner$correspondence, _owner$permanentAddre;
|
|
7566
|
+
var _applicationData$Owne2, _owner$correspondence, _owner$permanentAddre, _owner$correspondence2, _owner$permanentAddre2;
|
|
7564
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;
|
|
7565
7568
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
7566
7569
|
key: owner.ownerId || index
|
|
@@ -7575,9 +7578,12 @@ const RALApplicationDetails = () => {
|
|
|
7575
7578
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7576
7579
|
label: t("CORE_MOBILE_NUMBER"),
|
|
7577
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")
|
|
7578
7584
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7579
7585
|
label: t("CORE_COMMON_PINCODE"),
|
|
7580
|
-
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")
|
|
7581
7587
|
}));
|
|
7582
7588
|
}) : /*#__PURE__*/React.createElement(Row, {
|
|
7583
7589
|
label: t("OWNER"),
|
|
@@ -7606,8 +7612,8 @@ const RALApplicationDetails = () => {
|
|
|
7606
7612
|
label: t("RAL_PROPERTY_AMOUNT"),
|
|
7607
7613
|
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.baseRent) || t("CS_NA")
|
|
7608
7614
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7609
|
-
label: t("
|
|
7610
|
-
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")
|
|
7611
7617
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7612
7618
|
label: t("RAL_FEE_CYCLE"),
|
|
7613
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")
|
|
@@ -7623,6 +7629,18 @@ const RALApplicationDetails = () => {
|
|
|
7623
7629
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7624
7630
|
label: t("RAL_END_DATE"),
|
|
7625
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
|
|
7626
7644
|
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) && /*#__PURE__*/React.createElement(Row, {
|
|
7627
7645
|
label: t("RENT_LEASE_TRADE_LICENSE_NUMBER"),
|
|
7628
7646
|
text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) || t("CS_NA")
|
|
@@ -8660,7 +8678,7 @@ const ModalConfig = ({
|
|
|
8660
8678
|
assigneeLabel,
|
|
8661
8679
|
businessService
|
|
8662
8680
|
}) => {
|
|
8663
|
-
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";
|
|
8664
8682
|
if (action !== null && action !== void 0 && action.isTerminateState) checkAssigneeMandatory = false;
|
|
8665
8683
|
if (action.isTerminateState) {
|
|
8666
8684
|
checkAssigneeVisible = false;
|
|
@@ -8728,9 +8746,15 @@ const ModalConfig = ({
|
|
|
8728
8746
|
onDelete: () => {
|
|
8729
8747
|
setUploadedFile(null);
|
|
8730
8748
|
},
|
|
8731
|
-
message: uploadedFile ? `1 ${t(
|
|
8749
|
+
message: uploadedFile ? `1 ${t("ES_PT_ACTION_FILEUPLOADED")}` : t("CS_ACTION_NO_FILEUPLOADED")
|
|
8732
8750
|
})
|
|
8733
|
-
}
|
|
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
|
+
}] : [])]
|
|
8734
8758
|
}]
|
|
8735
8759
|
};
|
|
8736
8760
|
};
|
|
@@ -8881,7 +8905,8 @@ const RALModal = ({
|
|
|
8881
8905
|
closeModal();
|
|
8882
8906
|
return;
|
|
8883
8907
|
}
|
|
8884
|
-
|
|
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";
|
|
8885
8910
|
if (action !== null && action !== void 0 && action.isTerminateState) checkAssigneeMandatory = false;
|
|
8886
8911
|
if (checkAssigneeMandatory && !(selectedApprover !== null && selectedApprover !== void 0 && selectedApprover.uuid)) {
|
|
8887
8912
|
setShowToast({
|
|
@@ -8900,6 +8925,7 @@ const RALModal = ({
|
|
|
8900
8925
|
}
|
|
8901
8926
|
applicationData = {
|
|
8902
8927
|
...applicationData,
|
|
8928
|
+
...data,
|
|
8903
8929
|
action: action === null || action === void 0 ? void 0 : action.action,
|
|
8904
8930
|
comment: data === null || data === void 0 ? void 0 : data.comments,
|
|
8905
8931
|
assignee: !(selectedApprover !== null && selectedApprover !== void 0 && selectedApprover.uuid) ? null : [selectedApprover === null || selectedApprover === void 0 ? void 0 : selectedApprover.uuid],
|
|
@@ -8928,6 +8954,13 @@ const RALModal = ({
|
|
|
8928
8954
|
}));
|
|
8929
8955
|
}
|
|
8930
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]);
|
|
8931
8964
|
if (!action || !config.form) return null;
|
|
8932
8965
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
8933
8966
|
headerBarMain: /*#__PURE__*/React.createElement(Heading, {
|
|
@@ -8962,7 +8995,7 @@ const RALModal = ({
|
|
|
8962
8995
|
};
|
|
8963
8996
|
|
|
8964
8997
|
const RALApplicationDetails$1 = () => {
|
|
8965
|
-
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;
|
|
8966
8999
|
const {
|
|
8967
9000
|
t
|
|
8968
9001
|
} = useTranslation();
|
|
@@ -9034,11 +9067,21 @@ const RALApplicationDetails$1 = () => {
|
|
|
9034
9067
|
return (_e$roles2 = e.roles) === null || _e$roles2 === void 0 ? void 0 : _e$roles2.includes(role);
|
|
9035
9068
|
})) || !e.roles;
|
|
9036
9069
|
}));
|
|
9037
|
-
if ((_actions = actions) !== null && _actions !== void 0 && _actions.some(action => action.action === "REQUEST_FOR_DISCONNECTION") && Date.now() >= (applicationData === null || applicationData === void 0 ? void 0 : applicationData.endDate) - 15 * 24 * 60 * 60 * 1000) {
|
|
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) {
|
|
9038
9071
|
actions = [...(actions || []), {
|
|
9039
9072
|
action: "RENEWAL"
|
|
9040
9073
|
}];
|
|
9041
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);
|
|
9042
9085
|
const closeToast = () => {
|
|
9043
9086
|
setShowToast(null);
|
|
9044
9087
|
};
|
|
@@ -9061,9 +9104,9 @@ const RALApplicationDetails$1 = () => {
|
|
|
9061
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);
|
|
9062
9105
|
});
|
|
9063
9106
|
setEmployees((filterRoles === null || filterRoles === void 0 ? void 0 : (_filterRoles$ = filterRoles[0]) === null || _filterRoles$ === void 0 ? void 0 : _filterRoles$.actions) || []);
|
|
9064
|
-
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") {
|
|
9065
9108
|
submitAction(payload);
|
|
9066
|
-
} 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") {
|
|
9067
9110
|
const appNo = acknowledgementIds;
|
|
9068
9111
|
history.push(`/digit-ui/employee/payment/collect/rl-services/${appNo}/${tenantId}`);
|
|
9069
9112
|
} else if ((action === null || action === void 0 ? void 0 : action.action) === "RAL_RENEWAL") {
|
|
@@ -9075,7 +9118,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
9075
9118
|
}
|
|
9076
9119
|
}
|
|
9077
9120
|
const submitAction = async data => {
|
|
9078
|
-
var _applicationData$audi, _filtData, _filtData2, _filtData3, _filtData4;
|
|
9121
|
+
var _applicationData$audi, _filtData, _filtData2, _filtData3, _filtData4, _filtData5;
|
|
9079
9122
|
const payloadData = applicationData;
|
|
9080
9123
|
const updatedApplicant = {
|
|
9081
9124
|
...payloadData,
|
|
@@ -9099,6 +9142,9 @@ const RALApplicationDetails$1 = () => {
|
|
|
9099
9142
|
comments: (_filtData2 = filtData) === null || _filtData2 === void 0 ? void 0 : _filtData2.comment,
|
|
9100
9143
|
documents: (_filtData3 = filtData) !== null && _filtData3 !== void 0 && _filtData3.wfDocuments ? (_filtData4 = filtData) === null || _filtData4 === void 0 ? void 0 : _filtData4.wfDocuments : null
|
|
9101
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
|
+
}
|
|
9102
9148
|
const finalPayload = {
|
|
9103
9149
|
AllotmentDetails: updatedApplicant
|
|
9104
9150
|
};
|
|
@@ -9165,6 +9211,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
9165
9211
|
previousApplicationNumber: data === null || data === void 0 ? void 0 : data.applicationNumber,
|
|
9166
9212
|
OwnerInfo: sanitizedOwners,
|
|
9167
9213
|
tradeLicenseNumber: data === null || data === void 0 ? void 0 : data.tradeLicenseNumber,
|
|
9214
|
+
registrationNumber: data === null || data === void 0 ? void 0 : data.registrationNumber,
|
|
9168
9215
|
additionalDetails: data === null || data === void 0 ? void 0 : data.additionalDetails,
|
|
9169
9216
|
startDate: newStart.getTime(),
|
|
9170
9217
|
endDate: newEnd.getTime(),
|
|
@@ -9230,7 +9277,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
9230
9277
|
}, t("RENT_LEASE_APPLICATION_DETAILS"))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
9231
9278
|
className: "ral-card-subheader-24"
|
|
9232
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) => {
|
|
9233
|
-
var _owner$correspondence, _owner$permanentAddre;
|
|
9280
|
+
var _owner$correspondence, _owner$permanentAddre, _owner$correspondence2, _owner$permanentAddre2;
|
|
9234
9281
|
const multipleOwners = applicationData.OwnerInfo.length > 1;
|
|
9235
9282
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
9236
9283
|
key: owner.ownerId || index
|
|
@@ -9245,9 +9292,12 @@ const RALApplicationDetails$1 = () => {
|
|
|
9245
9292
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9246
9293
|
label: t("CORE_MOBILE_NUMBER"),
|
|
9247
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")
|
|
9248
9298
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9249
9299
|
label: t("CORE_COMMON_PINCODE"),
|
|
9250
|
-
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")
|
|
9251
9301
|
}));
|
|
9252
9302
|
}) : /*#__PURE__*/React.createElement(Row, {
|
|
9253
9303
|
label: t("OWNER"),
|
|
@@ -9279,8 +9329,8 @@ const RALApplicationDetails$1 = () => {
|
|
|
9279
9329
|
label: t("RAL_PROPERTY_AMOUNT"),
|
|
9280
9330
|
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.baseRent) || t("CS_NA")
|
|
9281
9331
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9282
|
-
label: t("
|
|
9283
|
-
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")
|
|
9284
9334
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9285
9335
|
label: t("RAL_FEE_CYCLE"),
|
|
9286
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")
|
|
@@ -9296,6 +9346,18 @@ const RALApplicationDetails$1 = () => {
|
|
|
9296
9346
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9297
9347
|
label: t("RAL_END_DATE"),
|
|
9298
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
|
|
9299
9361
|
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) && /*#__PURE__*/React.createElement(Row, {
|
|
9300
9362
|
label: t("RENT_LEASE_TRADE_LICENSE_NUMBER"),
|
|
9301
9363
|
text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) || t("CS_NA")
|
|
@@ -9312,7 +9374,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
9312
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, {
|
|
9313
9375
|
workflowDetails: workflowDetails,
|
|
9314
9376
|
t: t
|
|
9315
|
-
}), (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", {
|
|
9316
9378
|
ref: menuRef
|
|
9317
9379
|
}, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
|
|
9318
9380
|
localeKeyPrefix: `WF_EMPLOYEE_${"PTR"}`,
|
|
@@ -10130,6 +10192,7 @@ const RentAndLeasePropertyDetails = ({
|
|
|
10130
10192
|
baseRent: "",
|
|
10131
10193
|
securityDeposit: "",
|
|
10132
10194
|
refundApplicableOnDiscontinuation: null,
|
|
10195
|
+
penaltyType: "",
|
|
10133
10196
|
startDate: "",
|
|
10134
10197
|
endDate: "",
|
|
10135
10198
|
incrementApplicable: "",
|
|
@@ -10160,7 +10223,7 @@ const RentAndLeasePropertyDetails = ({
|
|
|
10160
10223
|
};
|
|
10161
10224
|
const handlePropertySelect = property => {
|
|
10162
10225
|
if (!property) return;
|
|
10163
|
-
const fieldsToPrefill = ["propertyId", "propertyName", "baseRent", "securityDeposit", "refundApplicableOnDiscontinuation"];
|
|
10226
|
+
const fieldsToPrefill = ["propertyId", "propertyName", "baseRent", "securityDeposit", "refundApplicableOnDiscontinuation", "penaltyType"];
|
|
10164
10227
|
setValue("selectedProperty", property);
|
|
10165
10228
|
fieldsToPrefill === null || fieldsToPrefill === void 0 ? void 0 : fieldsToPrefill.forEach(field => {
|
|
10166
10229
|
setValue(field, (property === null || property === void 0 ? void 0 : property[field]) ?? null, {
|
|
@@ -10442,7 +10505,27 @@ const RentAndLeasePropertyDetails = ({
|
|
|
10442
10505
|
})
|
|
10443
10506
|
}))), errors.baseRent && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
10444
10507
|
className: "ral-error-label"
|
|
10445
|
-
}, 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", {
|
|
10446
10529
|
className: "form-field"
|
|
10447
10530
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
10448
10531
|
control: control,
|
|
@@ -11563,7 +11646,8 @@ function RentAndLeaseSummary({
|
|
|
11563
11646
|
baseRent: t("RENT_AMOUNT "),
|
|
11564
11647
|
securityDeposit: t("SECURITY_DEPOSIT"),
|
|
11565
11648
|
tax_applicable: t("GST_APPLICABLE"),
|
|
11566
|
-
refundApplicableOnDiscontinuation: t("REFUND_APPLICABLE")
|
|
11649
|
+
refundApplicableOnDiscontinuation: t("REFUND_APPLICABLE"),
|
|
11650
|
+
penaltyType: t("PENALTY_TYPE")
|
|
11567
11651
|
};
|
|
11568
11652
|
return /*#__PURE__*/React.createElement("div", {
|
|
11569
11653
|
className: "application-summary"
|
|
@@ -13333,6 +13417,8 @@ const MyProperties = ({
|
|
|
13333
13417
|
offset: 0,
|
|
13334
13418
|
mobileNumber: userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info = userInfo.info) === null || _userInfo$info === void 0 ? void 0 : _userInfo$info.mobileNumber
|
|
13335
13419
|
});
|
|
13420
|
+
const [selectedProperty, setSelectedProperty] = useState(null);
|
|
13421
|
+
const [showToast, setShowToast] = useState(null);
|
|
13336
13422
|
const fetchProperties = async () => {
|
|
13337
13423
|
setLoader(true);
|
|
13338
13424
|
try {
|
|
@@ -13357,6 +13443,12 @@ const MyProperties = ({
|
|
|
13357
13443
|
useEffect(() => {
|
|
13358
13444
|
fetchProperties();
|
|
13359
13445
|
}, [filters.offset]);
|
|
13446
|
+
useEffect(() => {
|
|
13447
|
+
if (showToast) {
|
|
13448
|
+
const timer = setTimeout(() => setShowToast(null), 2000);
|
|
13449
|
+
return () => clearTimeout(timer);
|
|
13450
|
+
}
|
|
13451
|
+
}, [showToast]);
|
|
13360
13452
|
const handleLoadMore = () => {
|
|
13361
13453
|
setFilters(prev => ({
|
|
13362
13454
|
...prev,
|
|
@@ -13366,12 +13458,51 @@ const MyProperties = ({
|
|
|
13366
13458
|
const handleMakePayment = id => {
|
|
13367
13459
|
history.push(`/digit-ui/citizen/payment/collect/rl-services/${id}/${tenantId}?tenantId=${tenantId}`);
|
|
13368
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
|
+
};
|
|
13369
13499
|
return /*#__PURE__*/React.createElement("div", {
|
|
13370
13500
|
className: "ral-my-properties-container"
|
|
13371
13501
|
}, /*#__PURE__*/React.createElement("div", null, header && /*#__PURE__*/React.createElement(Header, {
|
|
13372
13502
|
className: "ral-my-properties-header"
|
|
13373
13503
|
}, t(header), " (", totalCount, ")"), getPropertiesData === null || getPropertiesData === void 0 ? void 0 : getPropertiesData.map((property, index) => {
|
|
13374
13504
|
var _property$additionalD, _property$additionalD2;
|
|
13505
|
+
console.log("property", property);
|
|
13375
13506
|
return /*#__PURE__*/React.createElement(Card, {
|
|
13376
13507
|
key: index
|
|
13377
13508
|
}, (property === null || property === void 0 ? void 0 : property.registrationNumber) && /*#__PURE__*/React.createElement(KeyNote, {
|
|
@@ -13395,9 +13526,12 @@ const MyProperties = ({
|
|
|
13395
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}`
|
|
13396
13527
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
13397
13528
|
label: t("CS_VIEW_DETAILS")
|
|
13398
|
-
})), ((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, {
|
|
13399
13530
|
label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT"),
|
|
13400
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)
|
|
13401
13535
|
})));
|
|
13402
13536
|
}), (getPropertiesData === null || getPropertiesData === void 0 ? void 0 : getPropertiesData.length) === 0 && !loader && /*#__PURE__*/React.createElement("p", {
|
|
13403
13537
|
className: "ral-my-properties-no-result"
|
|
@@ -13408,6 +13542,11 @@ const MyProperties = ({
|
|
|
13408
13542
|
onClick: handleLoadMore
|
|
13409
13543
|
}, t("CHB_LOAD_MORE_MSG")))), loader && /*#__PURE__*/React.createElement(Loader, {
|
|
13410
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)
|
|
13411
13550
|
}));
|
|
13412
13551
|
};
|
|
13413
13552
|
MyProperties.propTypes = {
|