@mseva/digit-ui-module-rentandlease 1.0.12 → 1.0.14
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 +57 -40
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.modern.js
CHANGED
|
@@ -6297,7 +6297,7 @@ const getAcknowledgementData = async (application, tenantInfo, t) => {
|
|
|
6297
6297
|
name: `${t(tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.i18nKey)} ${ulbCamel(t(`ULBGRADE_${tenantInfo === null || tenantInfo === void 0 ? void 0 : (_tenantInfo$city = tenantInfo.city) === null || _tenantInfo$city === void 0 ? void 0 : _tenantInfo$city.ulbGrade.toUpperCase().replace(" ", "_").replace(".", "_")}`))}`,
|
|
6298
6298
|
email: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.emailId,
|
|
6299
6299
|
phoneNumber: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.contactNumber,
|
|
6300
|
-
heading: t("
|
|
6300
|
+
heading: t("Allotment letter for Rent and Lease Services"),
|
|
6301
6301
|
applicationNumber: (application === null || application === void 0 ? void 0 : application.applicationNumber) || "NA",
|
|
6302
6302
|
details,
|
|
6303
6303
|
imageURL
|
|
@@ -9052,13 +9052,20 @@ Loader.defaultProps = {
|
|
|
9052
9052
|
page: false
|
|
9053
9053
|
};
|
|
9054
9054
|
|
|
9055
|
-
const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, t) => {
|
|
9055
|
+
const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, pdfFiles = {}, t) => {
|
|
9056
9056
|
var _workflowDetails$data, _workflowDetails$data2, _processInstances$, _processInstances$2, _processInstances$3, _timeline$, _timeline$2, _timeline$3, _timeline$4;
|
|
9057
|
+
console.log('pdfFiles', pdfFiles);
|
|
9057
9058
|
const timeline = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.timeline) || [];
|
|
9058
9059
|
const processInstances = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.processInstances) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.processInstances) || [];
|
|
9059
9060
|
const businessId = (processInstances === null || processInstances === void 0 ? void 0 : (_processInstances$ = processInstances[0]) === null || _processInstances$ === void 0 ? void 0 : _processInstances$.businessId) || "N/A";
|
|
9060
9061
|
const businessService = (processInstances === null || processInstances === void 0 ? void 0 : (_processInstances$2 = processInstances[0]) === null || _processInstances$2 === void 0 ? void 0 : _processInstances$2.businessService) || "N/A";
|
|
9061
9062
|
const moduleName = (processInstances === null || processInstances === void 0 ? void 0 : (_processInstances$3 = processInstances[0]) === null || _processInstances$3 === void 0 ? void 0 : _processInstances$3.moduleName) || "N/A";
|
|
9063
|
+
const pdfDownloadLink = (documents, fileStoreId) => {
|
|
9064
|
+
var _downloadLink$split;
|
|
9065
|
+
const downloadLink = (documents === null || documents === void 0 ? void 0 : documents[fileStoreId]) || "";
|
|
9066
|
+
const formats = (downloadLink === null || downloadLink === void 0 ? void 0 : (_downloadLink$split = downloadLink.split(",")) === null || _downloadLink$split === void 0 ? void 0 : _downloadLink$split.filter(Boolean)) || [];
|
|
9067
|
+
return (formats === null || formats === void 0 ? void 0 : formats.find(link => !(link !== null && link !== void 0 && link.includes("large")) && !(link !== null && link !== void 0 && link.includes("medium")) && !(link !== null && link !== void 0 && link.includes("small")))) || (formats === null || formats === void 0 ? void 0 : formats[0]) || "";
|
|
9068
|
+
};
|
|
9062
9069
|
const timelineRows = timeline.map((item, index) => {
|
|
9063
9070
|
var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$assigner2, _item$assigner3, _item$wfComment;
|
|
9064
9071
|
const createdDate = (item === null || item === void 0 ? void 0 : (_item$auditDetails = item.auditDetails) === null || _item$auditDetails === void 0 ? void 0 : _item$auditDetails.created) || "N/A";
|
|
@@ -9085,7 +9092,8 @@ const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, t) => {
|
|
|
9085
9092
|
documents: documents.map(doc => ({
|
|
9086
9093
|
name: (doc === null || doc === void 0 ? void 0 : doc.fileName) || (doc === null || doc === void 0 ? void 0 : doc.documentType) || "Document",
|
|
9087
9094
|
type: (doc === null || doc === void 0 ? void 0 : doc.documentType) || "Document",
|
|
9088
|
-
fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId
|
|
9095
|
+
fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
|
|
9096
|
+
link: pdfDownloadLink(pdfFiles, doc === null || doc === void 0 ? void 0 : doc.fileStoreId)
|
|
9089
9097
|
})),
|
|
9090
9098
|
hasDocuments: documents.length > 0
|
|
9091
9099
|
};
|
|
@@ -9269,18 +9277,30 @@ const ApplicationTimeline = ({
|
|
|
9269
9277
|
workflowDetails,
|
|
9270
9278
|
t
|
|
9271
9279
|
}) => {
|
|
9272
|
-
var _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _timeline$;
|
|
9280
|
+
var _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _timeline$;
|
|
9273
9281
|
const details = (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.data) || workflowDetails;
|
|
9274
9282
|
const timeline = useMemo(() => normalizeTimeline({
|
|
9275
9283
|
data: details
|
|
9276
9284
|
}), [details]);
|
|
9277
9285
|
const currentState = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : (_workflowDetails$data3 = _workflowDetails$data2.timeline) === null || _workflowDetails$data3 === void 0 ? void 0 : (_workflowDetails$data4 = _workflowDetails$data3[0]) === null || _workflowDetails$data4 === void 0 ? void 0 : _workflowDetails$data4.state;
|
|
9286
|
+
const {
|
|
9287
|
+
isLoading,
|
|
9288
|
+
data
|
|
9289
|
+
} = Digit.Hooks.ads.useADSDocumentSearch({
|
|
9290
|
+
value: (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data5 = workflowDetails.data) === null || _workflowDetails$data5 === void 0 ? void 0 : (_workflowDetails$data6 = _workflowDetails$data5.timeline) === null || _workflowDetails$data6 === void 0 ? void 0 : _workflowDetails$data6.flatMap(item => item === null || item === void 0 ? void 0 : item.wfDocuments)) || []
|
|
9291
|
+
}, {
|
|
9292
|
+
value: (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data7 = workflowDetails.data) === null || _workflowDetails$data7 === void 0 ? void 0 : (_workflowDetails$data8 = _workflowDetails$data7.timeline) === null || _workflowDetails$data8 === void 0 ? void 0 : _workflowDetails$data8.flatMap(item => item === null || item === void 0 ? void 0 : item.wfDocuments)) || []
|
|
9293
|
+
}, null, 0);
|
|
9294
|
+
console.log('data of doc hook', data);
|
|
9278
9295
|
const handleDownloadPDF = useCallback(() => {
|
|
9279
|
-
|
|
9280
|
-
|
|
9281
|
-
|
|
9282
|
-
|
|
9296
|
+
if (!isLoading) {
|
|
9297
|
+
const tenantInfo = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY") || {};
|
|
9298
|
+
const acknowledgementData = getTimelineAcknowledgementData(workflowDetails, tenantInfo, (data === null || data === void 0 ? void 0 : data.pdfFiles) || {}, t);
|
|
9299
|
+
Digit.Utils.pdf.generateTimelinePDF(acknowledgementData);
|
|
9300
|
+
}
|
|
9301
|
+
}, [workflowDetails, data, t]);
|
|
9283
9302
|
if (!(timeline !== null && timeline !== void 0 && timeline.length)) return null;
|
|
9303
|
+
if (isLoading) return /*#__PURE__*/React.createElement(Loader$2, null);
|
|
9284
9304
|
return /*#__PURE__*/React.createElement("div", {
|
|
9285
9305
|
className: "timeline-hoc-container"
|
|
9286
9306
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -9667,9 +9687,6 @@ const MyProperties = ({
|
|
|
9667
9687
|
const handleMakePayment = id => {
|
|
9668
9688
|
history.push(`/digit-ui/citizen/payment/collect/rl-services/${id}/${tenantId}?tenantId=${tenantId}`);
|
|
9669
9689
|
};
|
|
9670
|
-
const handleDisConnection = id => {
|
|
9671
|
-
console.log(id);
|
|
9672
|
-
};
|
|
9673
9690
|
return /*#__PURE__*/React.createElement("div", {
|
|
9674
9691
|
style: {
|
|
9675
9692
|
marginTop: "16px"
|
|
@@ -9706,9 +9723,6 @@ const MyProperties = ({
|
|
|
9706
9723
|
})), ((property === null || property === void 0 ? void 0 : property.status) == "PENDINGPAYMENT" || (property === null || property === void 0 ? void 0 : property.status) == "PENDING_FOR_PAYMENT") && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
9707
9724
|
label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT"),
|
|
9708
9725
|
onSubmit: () => handleMakePayment(property === null || property === void 0 ? void 0 : property.applicationNumber)
|
|
9709
|
-
}), (property === null || property === void 0 ? void 0 : property.status) == "APPROVED" && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
9710
|
-
label: t("RAL_END_TENANCY"),
|
|
9711
|
-
onSubmit: () => handleDisConnection(property === null || property === void 0 ? void 0 : property.applicationNumber)
|
|
9712
9726
|
})));
|
|
9713
9727
|
}), (getPropertiesData === null || getPropertiesData === void 0 ? void 0 : getPropertiesData.length) === 0 && !loader && /*#__PURE__*/React.createElement("p", {
|
|
9714
9728
|
style: {
|
|
@@ -11877,7 +11891,7 @@ const ModalConfig = ({
|
|
|
11877
11891
|
assigneeLabel,
|
|
11878
11892
|
businessService
|
|
11879
11893
|
}) => {
|
|
11880
|
-
let checkAssigneeVisible = (action === null || action === void 0 ? void 0 : action.action)
|
|
11894
|
+
let checkAssigneeVisible = (action === null || action === void 0 ? void 0 : action.action) === "SENDBACKTOOVERIFIER" || (action === null || action === void 0 ? void 0 : action.action) === "VERIFY" || (action === null || action === void 0 ? void 0 : action.action) === "FORWARD" || (action === null || action === void 0 ? void 0 : action.action) === "FORWARDFORFIELDINSPECTION" || (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) === "FORWARDFORAPPROVAL" || (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";
|
|
11881
11895
|
if (action !== null && action !== void 0 && action.isTerminateState) checkAssigneeMandatory = false;
|
|
11882
11896
|
if (action.isTerminateState) {
|
|
11883
11897
|
checkAssigneeVisible = false;
|
|
@@ -11952,19 +11966,13 @@ const RALModal = ({
|
|
|
11952
11966
|
t,
|
|
11953
11967
|
action,
|
|
11954
11968
|
tenantId,
|
|
11955
|
-
state,
|
|
11956
|
-
id,
|
|
11957
11969
|
closeModal,
|
|
11958
11970
|
submitAction,
|
|
11959
|
-
actionData,
|
|
11960
|
-
applicationDetails,
|
|
11961
11971
|
applicationData,
|
|
11962
11972
|
businessService,
|
|
11963
11973
|
moduleCode,
|
|
11964
|
-
workflowDetails,
|
|
11965
11974
|
showToast,
|
|
11966
11975
|
closeToast,
|
|
11967
|
-
errors,
|
|
11968
11976
|
setShowToast,
|
|
11969
11977
|
getEmployees
|
|
11970
11978
|
}) => {
|
|
@@ -11974,10 +11982,7 @@ const RALModal = ({
|
|
|
11974
11982
|
const [selectedApprover, setSelectedApprover] = useState({});
|
|
11975
11983
|
const [file, setFile] = useState(null);
|
|
11976
11984
|
const [uploadedFile, setUploadedFile] = useState(null);
|
|
11977
|
-
const [error, setError] = useState(null);
|
|
11978
11985
|
const [financialYears, setFinancialYears] = useState([]);
|
|
11979
|
-
const [selectedFinancialYear, setSelectedFinancialYear] = useState(null);
|
|
11980
|
-
const [formErrors, setFormErrors] = useState({});
|
|
11981
11986
|
const allRolesNew = [...new Set(getEmployees === null || getEmployees === void 0 ? void 0 : getEmployees.flatMap(a => a.roles))];
|
|
11982
11987
|
const {
|
|
11983
11988
|
data: approverData,
|
|
@@ -12038,7 +12043,10 @@ const RALModal = ({
|
|
|
12038
12043
|
(async () => {
|
|
12039
12044
|
if (file) {
|
|
12040
12045
|
if (file.size >= 5242880) {
|
|
12041
|
-
|
|
12046
|
+
setShowToast({
|
|
12047
|
+
key: true,
|
|
12048
|
+
label: t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED")
|
|
12049
|
+
});
|
|
12042
12050
|
} else {
|
|
12043
12051
|
try {
|
|
12044
12052
|
var _response$data, _response$data$files;
|
|
@@ -12047,30 +12055,36 @@ const RALModal = ({
|
|
|
12047
12055
|
var _response$data2, _response$data2$files;
|
|
12048
12056
|
setUploadedFile(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId);
|
|
12049
12057
|
} else {
|
|
12050
|
-
|
|
12058
|
+
setShowToast({
|
|
12059
|
+
key: true,
|
|
12060
|
+
label: t("CS_FILE_UPLOAD_ERROR")
|
|
12061
|
+
});
|
|
12051
12062
|
}
|
|
12052
12063
|
} catch (err) {
|
|
12053
|
-
|
|
12064
|
+
setShowToast({
|
|
12065
|
+
key: true,
|
|
12066
|
+
label: t("CS_FILE_UPLOAD_ERROR")
|
|
12067
|
+
});
|
|
12054
12068
|
}
|
|
12055
12069
|
}
|
|
12056
12070
|
}
|
|
12057
12071
|
})();
|
|
12058
12072
|
}, [file]);
|
|
12059
12073
|
function submit(data) {
|
|
12060
|
-
let checkAssigneeMandatory = (action === null || action === void 0 ? void 0 : action.action) === "
|
|
12074
|
+
let checkAssigneeMandatory = (action === null || action === void 0 ? void 0 : action.action) === "SENDBACKTOOVERIFIER" || (action === null || action === void 0 ? void 0 : action.action) === "VERIFY" || (action === null || action === void 0 ? void 0 : action.action) === "FORWARD" || (action === null || action === void 0 ? void 0 : action.action) === "FORWARDFORFIELDINSPECTION" || (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) === "FORWARDFORAPPROVAL" || (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";
|
|
12061
12075
|
if (action !== null && action !== void 0 && action.isTerminateState) checkAssigneeMandatory = false;
|
|
12062
12076
|
if (checkAssigneeMandatory && !(selectedApprover !== null && selectedApprover !== void 0 && selectedApprover.uuid)) {
|
|
12063
|
-
setError("Assignee is required");
|
|
12064
12077
|
setShowToast({
|
|
12065
|
-
key:
|
|
12078
|
+
key: true,
|
|
12079
|
+
label: t("Assignee is required")
|
|
12066
12080
|
});
|
|
12067
12081
|
return;
|
|
12068
12082
|
}
|
|
12069
12083
|
const commentsText = data === null || data === void 0 ? void 0 : data.comments;
|
|
12070
12084
|
if (!commentsText) {
|
|
12071
|
-
setError("Comments are required");
|
|
12072
12085
|
setShowToast({
|
|
12073
|
-
key:
|
|
12086
|
+
key: true,
|
|
12087
|
+
label: t("Comments are required")
|
|
12074
12088
|
});
|
|
12075
12089
|
return;
|
|
12076
12090
|
}
|
|
@@ -12103,7 +12117,7 @@ const RALModal = ({
|
|
|
12103
12117
|
businessService
|
|
12104
12118
|
}));
|
|
12105
12119
|
}
|
|
12106
|
-
}, [action, approvers, financialYears,
|
|
12120
|
+
}, [action, approvers, financialYears, uploadedFile]);
|
|
12107
12121
|
if (!action || !config.form) return null;
|
|
12108
12122
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
12109
12123
|
headerBarMain: /*#__PURE__*/React.createElement(Heading$1, {
|
|
@@ -12302,11 +12316,11 @@ const RALApplicationDetails$1 = () => {
|
|
|
12302
12316
|
AllotmentDetails: updatedApplicant
|
|
12303
12317
|
};
|
|
12304
12318
|
try {
|
|
12305
|
-
var _response$
|
|
12319
|
+
var _response$ResponseInf;
|
|
12306
12320
|
const response = await Digit.RentAndLeaseService.update({
|
|
12307
12321
|
...finalPayload
|
|
12308
12322
|
});
|
|
12309
|
-
if ((response === null || response === void 0 ? void 0 : (_response$
|
|
12323
|
+
if ((response === null || response === void 0 ? void 0 : (_response$ResponseInf = response.ResponseInfo) === null || _response$ResponseInf === void 0 ? void 0 : _response$ResponseInf.status) == "successful") {
|
|
12310
12324
|
setShowToast({
|
|
12311
12325
|
key: false,
|
|
12312
12326
|
label: "Successfully updated the status"
|
|
@@ -12483,7 +12497,10 @@ const RALApplicationDetails$1 = () => {
|
|
|
12483
12497
|
error: showToast.key,
|
|
12484
12498
|
label: t(showToast.label),
|
|
12485
12499
|
isDleteBtn: true,
|
|
12486
|
-
onClose: closeToast
|
|
12500
|
+
onClose: closeToast,
|
|
12501
|
+
style: {
|
|
12502
|
+
zIndex: 1000
|
|
12503
|
+
}
|
|
12487
12504
|
}), (loader || (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.isLoading)) && /*#__PURE__*/React.createElement(Loader, {
|
|
12488
12505
|
page: true
|
|
12489
12506
|
}));
|
|
@@ -15563,11 +15580,11 @@ const RentAndLeaseCitizenDetails = ({
|
|
|
15563
15580
|
}
|
|
15564
15581
|
triggerLoader(true);
|
|
15565
15582
|
try {
|
|
15566
|
-
var _response$
|
|
15583
|
+
var _response$ResponseInf;
|
|
15567
15584
|
const response = await Digit.RentAndLeaseService.create({
|
|
15568
15585
|
allotmentDetails: payload
|
|
15569
15586
|
}, tenantId);
|
|
15570
|
-
const status = response === null || response === void 0 ? void 0 : (_response$
|
|
15587
|
+
const status = response === null || response === void 0 ? void 0 : (_response$ResponseInf = response.ResponseInfo) === null || _response$ResponseInf === void 0 ? void 0 : _response$ResponseInf.status;
|
|
15571
15588
|
const isSuccess = typeof status === "string" && status.toLowerCase() === "successful";
|
|
15572
15589
|
if (isSuccess) {
|
|
15573
15590
|
const appData = Array.isArray(response === null || response === void 0 ? void 0 : response.allotment) ? response.allotment[0] : response === null || response === void 0 ? void 0 : response.allotment;
|
|
@@ -16094,7 +16111,7 @@ const NewRentAndLeaseStepFormFour = ({
|
|
|
16094
16111
|
id
|
|
16095
16112
|
} = useParams();
|
|
16096
16113
|
const onSubmit = async (data, selectedAction) => {
|
|
16097
|
-
var _response$
|
|
16114
|
+
var _response$ResponseInf;
|
|
16098
16115
|
const {
|
|
16099
16116
|
CreatedResponse
|
|
16100
16117
|
} = data;
|
|
@@ -16244,7 +16261,7 @@ const NewRentAndLeaseStepFormFour = ({
|
|
|
16244
16261
|
RentAndLeaseApplications: response.AllotmentDetails
|
|
16245
16262
|
}
|
|
16246
16263
|
};
|
|
16247
|
-
} else if ((response === null || response === void 0 ? void 0 : (_response$
|
|
16264
|
+
} else if ((response === null || response === void 0 ? void 0 : (_response$ResponseInf = response.ResponseInfo) === null || _response$ResponseInf === void 0 ? void 0 : _response$ResponseInf.status) === "successful") {
|
|
16248
16265
|
return {
|
|
16249
16266
|
isSuccess: true,
|
|
16250
16267
|
response
|