@mseva/digit-ui-module-rentandlease 1.0.16 → 1.0.17
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 +378 -370
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CheckBox, Loader as Loader$2, CloseSvg, RefreshSVG, RadioButtons, SubmitBar, PTIcon, EmployeeModuleCard, Modal, FormComposer as FormComposer$1, Header, MultiLink, Card, StatusTable, Row, Toast, ActionBar, Menu, CardLabelError, LabelFieldPair, CardLabel, TextInput, Dropdown, CardSectionHeader, MobileNumber, DatePicker, TextArea, CardSubHeader,
|
|
1
|
+
import { CheckBox, Loader as Loader$2, CloseSvg, RefreshSVG, RadioButtons, SubmitBar, PTIcon, EmployeeModuleCard, Modal, FormComposer as FormComposer$1, Header, MultiLink, Card, StatusTable, Row, Toast, ActionBar, Menu, CardLabelError, LabelFieldPair, CardLabel, TextInput, Dropdown, CardSectionHeader, MobileNumber, DatePicker, TextArea, CardSubHeader, AppContainer, BackButton, PrivateRoute, KeyNote, FormStep, RadioOrSelect, ResponseComposer, Table, Label, LinkLabel, DetailsCard, SearchAction, FilterAction, PopUp, ShippingTruck, UploadFile, BreakLine, Banner, CardText, LinkButton, CardHeader, CitizenHomeCard } from '@mseva/digit-ui-react-components';
|
|
2
2
|
import React, { useState, useEffect, useMemo, useCallback, useRef as useRef$1 } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useParams, useHistory, useRouteMatch, useLocation, Switch, Link, Route } from 'react-router-dom';
|
|
@@ -9052,101 +9052,9 @@ Loader.defaultProps = {
|
|
|
9052
9052
|
page: false
|
|
9053
9053
|
};
|
|
9054
9054
|
|
|
9055
|
-
const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, pdfFiles = {}, t) => {
|
|
9056
|
-
var _workflowDetails$data, _workflowDetails$data2, _processInstances$, _processInstances$2, _processInstances$3, _timeline$, _timeline$2, _timeline$3, _timeline$4;
|
|
9057
|
-
console.log('pdfFiles', pdfFiles);
|
|
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) || [];
|
|
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) || [];
|
|
9060
|
-
const businessId = (processInstances === null || processInstances === void 0 ? void 0 : (_processInstances$ = processInstances[0]) === null || _processInstances$ === void 0 ? void 0 : _processInstances$.businessId) || "N/A";
|
|
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";
|
|
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
|
-
};
|
|
9069
|
-
const timelineRows = timeline.map((item, index) => {
|
|
9070
|
-
var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$assigner2, _item$assigner3, _item$wfComment;
|
|
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";
|
|
9072
|
-
const timing = (item === null || item === void 0 ? void 0 : (_item$auditDetails2 = item.auditDetails) === null || _item$auditDetails2 === void 0 ? void 0 : _item$auditDetails2.timing) || "N/A";
|
|
9073
|
-
const assignerName = (item === null || item === void 0 ? void 0 : (_item$assigner = item.assigner) === null || _item$assigner === void 0 ? void 0 : _item$assigner.name) || "N/A";
|
|
9074
|
-
const assignerType = (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.type) || "N/A";
|
|
9075
|
-
const mobileNumber = (item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.mobileNumber) || "N/A";
|
|
9076
|
-
const action = (item === null || item === void 0 ? void 0 : item.performedAction) || "N/A";
|
|
9077
|
-
const status = (item === null || item === void 0 ? void 0 : item.status) || (item === null || item === void 0 ? void 0 : item.state) || "N/A";
|
|
9078
|
-
const comment = (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "-";
|
|
9079
|
-
const documents = (item === null || item === void 0 ? void 0 : item.wfDocuments) || [];
|
|
9080
|
-
return {
|
|
9081
|
-
sNo: index + 1,
|
|
9082
|
-
action: t ? t(action) : action,
|
|
9083
|
-
status: t ? t(status) : status,
|
|
9084
|
-
assignerName,
|
|
9085
|
-
assignerType,
|
|
9086
|
-
mobileNumber,
|
|
9087
|
-
designation: assignerType,
|
|
9088
|
-
date: createdDate,
|
|
9089
|
-
time: timing,
|
|
9090
|
-
dateTime: `${createdDate} ${timing !== "N/A" ? timing : ""}`.trim(),
|
|
9091
|
-
comment,
|
|
9092
|
-
documents: documents.map(doc => ({
|
|
9093
|
-
name: (doc === null || doc === void 0 ? void 0 : doc.fileName) || (doc === null || doc === void 0 ? void 0 : doc.documentType) || "Document",
|
|
9094
|
-
type: (doc === null || doc === void 0 ? void 0 : doc.documentType) || "Document",
|
|
9095
|
-
fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
|
|
9096
|
-
link: pdfDownloadLink(pdfFiles, doc === null || doc === void 0 ? void 0 : doc.fileStoreId)
|
|
9097
|
-
})),
|
|
9098
|
-
hasDocuments: documents.length > 0
|
|
9099
|
-
};
|
|
9100
|
-
});
|
|
9101
|
-
return {
|
|
9102
|
-
t,
|
|
9103
|
-
tenantId: (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code) || "",
|
|
9104
|
-
tenantName: (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.name) || (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.i18nKey) || "Government Department",
|
|
9105
|
-
name: t ? t("TIMELINE_PDF_TITLE") : "Application Timeline",
|
|
9106
|
-
heading: t ? t("TIMELINE_PDF_HEADING") : "File Movement Report",
|
|
9107
|
-
businessId,
|
|
9108
|
-
businessService: t ? t(`CS_COMMON_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}`) : businessService,
|
|
9109
|
-
moduleName,
|
|
9110
|
-
currentStatus: t ? t((timeline === null || timeline === void 0 ? void 0 : (_timeline$ = timeline[0]) === null || _timeline$ === void 0 ? void 0 : _timeline$.status) || (timeline === null || timeline === void 0 ? void 0 : (_timeline$2 = timeline[0]) === null || _timeline$2 === void 0 ? void 0 : _timeline$2.state) || "N/A") : (timeline === null || timeline === void 0 ? void 0 : (_timeline$3 = timeline[0]) === null || _timeline$3 === void 0 ? void 0 : _timeline$3.status) || (timeline === null || timeline === void 0 ? void 0 : (_timeline$4 = timeline[0]) === null || _timeline$4 === void 0 ? void 0 : _timeline$4.state) || "N/A",
|
|
9111
|
-
generatedDate: new Date().toLocaleDateString("en-IN", {
|
|
9112
|
-
day: "2-digit",
|
|
9113
|
-
month: "long",
|
|
9114
|
-
year: "numeric"
|
|
9115
|
-
}),
|
|
9116
|
-
generatedDateTime: new Date().toLocaleString("en-IN", {
|
|
9117
|
-
day: "2-digit",
|
|
9118
|
-
month: "2-digit",
|
|
9119
|
-
year: "numeric",
|
|
9120
|
-
hour: "2-digit",
|
|
9121
|
-
minute: "2-digit",
|
|
9122
|
-
hour12: true
|
|
9123
|
-
}),
|
|
9124
|
-
timelineRows,
|
|
9125
|
-
totalSteps: timelineRows.length
|
|
9126
|
-
};
|
|
9127
|
-
};
|
|
9128
|
-
|
|
9129
|
-
const parseDate = dateStr => {
|
|
9130
|
-
if (!dateStr || dateStr === "N/A") return null;
|
|
9131
|
-
if (typeof dateStr === "string" && dateStr !== null && dateStr !== void 0 && dateStr.includes("/")) {
|
|
9132
|
-
const [day, month, year] = dateStr === null || dateStr === void 0 ? void 0 : dateStr.split("/");
|
|
9133
|
-
return new Date(year, month - 1, day);
|
|
9134
|
-
}
|
|
9135
|
-
return new Date(dateStr);
|
|
9136
|
-
};
|
|
9137
|
-
const calculateDays = (start, end) => {
|
|
9138
|
-
if (!start || !end) return "N/A";
|
|
9139
|
-
const startDate = parseDate(start);
|
|
9140
|
-
const endDate = parseDate(end);
|
|
9141
|
-
if (!startDate || !endDate || isNaN(startDate === null || startDate === void 0 ? void 0 : startDate.getTime()) || isNaN(endDate === null || endDate === void 0 ? void 0 : endDate.getTime())) {
|
|
9142
|
-
return "N/A";
|
|
9143
|
-
}
|
|
9144
|
-
const diffDays = Math.floor((endDate - startDate) / 86400000);
|
|
9145
|
-
return diffDays < 0 ? "N/A" : diffDays === 0 ? "0 Days" : `${diffDays} Days`;
|
|
9146
|
-
};
|
|
9147
9055
|
const PDFSvg$1 = React.memo(({
|
|
9148
|
-
width: _width =
|
|
9149
|
-
height: _height =
|
|
9056
|
+
width: _width = 20,
|
|
9057
|
+
height: _height = 20,
|
|
9150
9058
|
style
|
|
9151
9059
|
}) => /*#__PURE__*/React.createElement("svg", {
|
|
9152
9060
|
style: style,
|
|
@@ -9184,7 +9092,10 @@ const TimelineDocument = React.memo(({
|
|
|
9184
9092
|
}, [value, Code]);
|
|
9185
9093
|
if (isLoading) return /*#__PURE__*/React.createElement(Loader$2, null);
|
|
9186
9094
|
return /*#__PURE__*/React.createElement("div", {
|
|
9187
|
-
|
|
9095
|
+
style: {
|
|
9096
|
+
display: "inline-block",
|
|
9097
|
+
marginRight: "10px"
|
|
9098
|
+
}
|
|
9188
9099
|
}, documents === null || documents === void 0 ? void 0 : documents.map((document, idx) => {
|
|
9189
9100
|
const documentLink = pdfDownloadLink$1(data === null || data === void 0 ? void 0 : data.pdfFiles, document === null || document === void 0 ? void 0 : document.fileStoreId);
|
|
9190
9101
|
if (!documentLink) return null;
|
|
@@ -9193,143 +9104,163 @@ const TimelineDocument = React.memo(({
|
|
|
9193
9104
|
target: "_blank",
|
|
9194
9105
|
rel: "noopener noreferrer",
|
|
9195
9106
|
href: documentLink,
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9107
|
+
style: {
|
|
9108
|
+
display: "inline-flex",
|
|
9109
|
+
alignItems: "center",
|
|
9110
|
+
gap: "4px",
|
|
9111
|
+
color: "#2563eb",
|
|
9112
|
+
textDecoration: "none"
|
|
9113
|
+
}
|
|
9114
|
+
}, /*#__PURE__*/React.createElement(PDFSvg$1, null), /*#__PURE__*/React.createElement("span", {
|
|
9115
|
+
style: {
|
|
9116
|
+
fontSize: "14px",
|
|
9117
|
+
fontWeight: "600"
|
|
9118
|
+
}
|
|
9119
|
+
}, (document === null || document === void 0 ? void 0 : document.fileName) || "Document"));
|
|
9200
9120
|
}));
|
|
9201
9121
|
});
|
|
9202
|
-
|
|
9203
|
-
var _workflowDetails$data;
|
|
9204
|
-
const rawTimeline = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline;
|
|
9205
|
-
if (!rawTimeline || !Array.isArray(rawTimeline)) return [];
|
|
9206
|
-
return rawTimeline === null || rawTimeline === void 0 ? void 0 : rawTimeline.map((item, index) => {
|
|
9207
|
-
var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$wfComment;
|
|
9208
|
-
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";
|
|
9209
|
-
const lastModified = (item === null || item === void 0 ? void 0 : (_item$auditDetails2 = item.auditDetails) === null || _item$auditDetails2 === void 0 ? void 0 : _item$auditDetails2.lastModified) || "N/A";
|
|
9210
|
-
return {
|
|
9211
|
-
id: index,
|
|
9212
|
-
state: item === null || item === void 0 ? void 0 : item.state,
|
|
9213
|
-
assignerName: (item === null || item === void 0 ? void 0 : (_item$assigner = item.assigner) === null || _item$assigner === void 0 ? void 0 : _item$assigner.name) || "N/A",
|
|
9214
|
-
performedAction: item === null || item === void 0 ? void 0 : item.performedAction,
|
|
9215
|
-
comment: (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "",
|
|
9216
|
-
documents: (item === null || item === void 0 ? void 0 : item.wfDocuments) || [],
|
|
9217
|
-
createdDate,
|
|
9218
|
-
lastModified,
|
|
9219
|
-
noOfDays: calculateDays(createdDate, lastModified)
|
|
9220
|
-
};
|
|
9221
|
-
});
|
|
9222
|
-
};
|
|
9223
|
-
const HEADER_FIELDS = [{
|
|
9224
|
-
label: "CM_TIMELINE_NAME",
|
|
9225
|
-
key: "assignerName"
|
|
9226
|
-
}, {
|
|
9227
|
-
label: "CM_TIMELINE_ACTION_TAKEN",
|
|
9228
|
-
key: "performedAction"
|
|
9229
|
-
}, {
|
|
9230
|
-
label: "CM_TIMELINE_ACTION_TAKEN_ON",
|
|
9231
|
-
key: "lastModified"
|
|
9232
|
-
}, {
|
|
9233
|
-
label: "CM_TIMELINE_DATE_RECEIVED",
|
|
9234
|
-
key: "createdDate"
|
|
9235
|
-
}, {
|
|
9236
|
-
label: "CM_TIMELINE_NO_OF_DAYS",
|
|
9237
|
-
key: "noOfDays"
|
|
9238
|
-
}];
|
|
9239
|
-
const TimelineCaption = React.memo(({
|
|
9240
|
-
checkpoint,
|
|
9241
|
-
t,
|
|
9242
|
-
onDownloadPDF
|
|
9243
|
-
}) => {
|
|
9244
|
-
var _checkpoint$documents, _checkpoint$documents2;
|
|
9245
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
9246
|
-
className: "timeline-card"
|
|
9247
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
9248
|
-
className: "timeline-header"
|
|
9249
|
-
}, HEADER_FIELDS === null || HEADER_FIELDS === void 0 ? void 0 : HEADER_FIELDS.map(({
|
|
9250
|
-
label,
|
|
9251
|
-
key
|
|
9252
|
-
}) => /*#__PURE__*/React.createElement("div", {
|
|
9253
|
-
key: key,
|
|
9254
|
-
className: "timeline-header-item"
|
|
9255
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
9256
|
-
className: "timeline-label"
|
|
9257
|
-
}, t(label), ":"), /*#__PURE__*/React.createElement("span", {
|
|
9258
|
-
className: "timeline-value"
|
|
9259
|
-
}, t(checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint[key]) || "N/A")))), /*#__PURE__*/React.createElement("div", {
|
|
9260
|
-
className: "timeline-note"
|
|
9261
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
9262
|
-
className: "timeline-label"
|
|
9263
|
-
}, t("CM_TIMELINE_NOTE"), ":"), /*#__PURE__*/React.createElement("div", {
|
|
9264
|
-
className: "note-box"
|
|
9265
|
-
}, (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.comment) || t("CM_TIMELINE_NO_COMMENTS"))), (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$documents = checkpoint.documents) === null || _checkpoint$documents === void 0 ? void 0 : _checkpoint$documents.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
9266
|
-
className: "timeline-docs"
|
|
9267
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
9268
|
-
className: "timeline-label"
|
|
9269
|
-
}, t("CM_TIMELINE_DOCUMENT_ATTACHED"), ":"), checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$documents2 = checkpoint.documents) === null || _checkpoint$documents2 === void 0 ? void 0 : _checkpoint$documents2.map((doc, index) => /*#__PURE__*/React.createElement(TimelineDocument, {
|
|
9270
|
-
key: `${doc === null || doc === void 0 ? void 0 : doc.documentType}-${index}`,
|
|
9271
|
-
value: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.documents,
|
|
9272
|
-
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
9273
|
-
index: index
|
|
9274
|
-
}))));
|
|
9275
|
-
});
|
|
9276
|
-
const ApplicationTimeline = ({
|
|
9122
|
+
function NewApplicationTimeline({
|
|
9277
9123
|
workflowDetails,
|
|
9278
9124
|
t
|
|
9279
|
-
})
|
|
9280
|
-
|
|
9281
|
-
|
|
9282
|
-
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9125
|
+
}) {
|
|
9126
|
+
const normalizeTimeline = workflowDetails => {
|
|
9127
|
+
const details = (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.data) || workflowDetails;
|
|
9128
|
+
const rawTimeline = details === null || details === void 0 ? void 0 : details.timeline;
|
|
9129
|
+
if (!rawTimeline || !Array.isArray(rawTimeline)) return [];
|
|
9130
|
+
return rawTimeline === null || rawTimeline === void 0 ? void 0 : rawTimeline.map(item => {
|
|
9131
|
+
var _item$auditDetails, _item$auditDetails2, _dateObj, _dateObj2;
|
|
9132
|
+
let dateObj = null;
|
|
9133
|
+
const dateStr = (item === null || item === void 0 ? void 0 : (_item$auditDetails = item.auditDetails) === null || _item$auditDetails === void 0 ? void 0 : _item$auditDetails.lastModified) || (item === null || item === void 0 ? void 0 : (_item$auditDetails2 = item.auditDetails) === null || _item$auditDetails2 === void 0 ? void 0 : _item$auditDetails2.created);
|
|
9134
|
+
if (dateStr) {
|
|
9135
|
+
if (typeof dateStr === "string" && dateStr !== null && dateStr !== void 0 && dateStr.includes("/")) {
|
|
9136
|
+
const [day, month, year] = dateStr === null || dateStr === void 0 ? void 0 : dateStr.split("/");
|
|
9137
|
+
dateObj = new Date(year, month - 1, day);
|
|
9138
|
+
} else {
|
|
9139
|
+
dateObj = new Date(dateStr);
|
|
9140
|
+
}
|
|
9141
|
+
}
|
|
9142
|
+
const createdDate = dateObj ? (_dateObj = dateObj) === null || _dateObj === void 0 ? void 0 : _dateObj.toLocaleDateString("en-GB", {
|
|
9143
|
+
day: "2-digit",
|
|
9144
|
+
month: "long",
|
|
9145
|
+
year: "numeric"
|
|
9146
|
+
}) : "N/A";
|
|
9147
|
+
const createdTime = dateObj ? (_dateObj2 = dateObj) === null || _dateObj2 === void 0 ? void 0 : _dateObj2.toLocaleTimeString([], {
|
|
9148
|
+
hour: "2-digit",
|
|
9149
|
+
minute: "2-digit",
|
|
9150
|
+
hour12: true
|
|
9151
|
+
}) : "";
|
|
9152
|
+
return {
|
|
9153
|
+
...item,
|
|
9154
|
+
auditDetails: {
|
|
9155
|
+
...(item === null || item === void 0 ? void 0 : item.auditDetails),
|
|
9156
|
+
created: createdDate,
|
|
9157
|
+
timing: createdTime
|
|
9158
|
+
},
|
|
9159
|
+
status: item === null || item === void 0 ? void 0 : item.state,
|
|
9160
|
+
performedAction: item === null || item === void 0 ? void 0 : item.performedAction,
|
|
9161
|
+
assignes: item !== null && item !== void 0 && item.assignes ? item === null || item === void 0 ? void 0 : item.assignes : item !== null && item !== void 0 && item.assigner ? [item === null || item === void 0 ? void 0 : item.assigner] : [],
|
|
9162
|
+
wfComment: (item === null || item === void 0 ? void 0 : item.wfComment) || (item !== null && item !== void 0 && item.comment ? [item === null || item === void 0 ? void 0 : item.comment] : []),
|
|
9163
|
+
wfDocuments: (item === null || item === void 0 ? void 0 : item.wfDocuments) || []
|
|
9164
|
+
};
|
|
9165
|
+
});
|
|
9166
|
+
};
|
|
9167
|
+
const data = useMemo(() => normalizeTimeline(workflowDetails), [workflowDetails]);
|
|
9168
|
+
const sortedData = data || [];
|
|
9169
|
+
console.log("sortedData", sortedData);
|
|
9170
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
9171
|
+
className: "custom-timeline-container"
|
|
9306
9172
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9307
|
-
className: "timeline-header
|
|
9308
|
-
}, /*#__PURE__*/React.createElement(
|
|
9309
|
-
className: "
|
|
9310
|
-
},
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
|
|
9329
|
-
|
|
9330
|
-
|
|
9173
|
+
className: "custom-timeline-header"
|
|
9174
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9175
|
+
className: "custom-tracking-status-header"
|
|
9176
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9177
|
+
className: "custom-tracking-line"
|
|
9178
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
9179
|
+
className: "custom-tracking-status-text"
|
|
9180
|
+
}, "TRACKING STATUS"), /*#__PURE__*/React.createElement("div", {
|
|
9181
|
+
className: "custom-tracking-line"
|
|
9182
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
9183
|
+
className: "custom-title-bar-row"
|
|
9184
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
9185
|
+
className: "custom-timeline-title"
|
|
9186
|
+
}, "Application History"), /*#__PURE__*/React.createElement("div", {
|
|
9187
|
+
className: "custom-blue-bar"
|
|
9188
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
9189
|
+
className: "custom-timeline-entries"
|
|
9190
|
+
}, sortedData === null || sortedData === void 0 ? void 0 : sortedData.map((item, index) => {
|
|
9191
|
+
var _item$auditDetails3, _item$auditDetails4, _item$assignes, _item$assignes2, _item$assignes2$, _item$assignes3, _item$assignes3$, _item$assignes4, _item$assignes4$, _item$wfComment, _item$wfComment2, _item$wfComment3, _item$wfDocuments, _item$wfDocuments2;
|
|
9192
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
9193
|
+
key: index,
|
|
9194
|
+
className: "custom-timeline-entry"
|
|
9195
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9196
|
+
className: "custom-vertical-line"
|
|
9197
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
9198
|
+
className: "custom-date-badge"
|
|
9199
|
+
}, item === null || item === void 0 ? void 0 : (_item$auditDetails3 = item.auditDetails) === null || _item$auditDetails3 === void 0 ? void 0 : _item$auditDetails3.created, " ", item === null || item === void 0 ? void 0 : (_item$auditDetails4 = item.auditDetails) === null || _item$auditDetails4 === void 0 ? void 0 : _item$auditDetails4.timing), /*#__PURE__*/React.createElement("div", {
|
|
9200
|
+
className: "custom-entry-content"
|
|
9201
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9202
|
+
className: "custom-icon-container"
|
|
9203
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9204
|
+
className: "custom-circular-icon"
|
|
9205
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
9206
|
+
className: "custom-mail-icon",
|
|
9207
|
+
viewBox: "0 0 24 24"
|
|
9208
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
9209
|
+
x: "3",
|
|
9210
|
+
y: "5",
|
|
9211
|
+
width: "18",
|
|
9212
|
+
height: "14",
|
|
9213
|
+
rx: "2"
|
|
9214
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
9215
|
+
d: "M3 7l9 6 9-6"
|
|
9216
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
9217
|
+
className: "custom-content-card"
|
|
9218
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9219
|
+
className: "custom-card-top"
|
|
9220
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9221
|
+
className: "custom-card-left"
|
|
9222
|
+
}, /*#__PURE__*/React.createElement("h3", {
|
|
9223
|
+
className: "custom-action-title"
|
|
9224
|
+
}, "Action taken by"), (item === null || item === void 0 ? void 0 : item.assignes) && (item === null || item === void 0 ? void 0 : (_item$assignes = item.assignes) === null || _item$assignes === void 0 ? void 0 : _item$assignes.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
9225
|
+
className: "custom-officer-info"
|
|
9226
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9227
|
+
className: "custom-officer-name"
|
|
9228
|
+
}, (item === null || item === void 0 ? void 0 : (_item$assignes2 = item.assignes) === null || _item$assignes2 === void 0 ? void 0 : (_item$assignes2$ = _item$assignes2[0]) === null || _item$assignes2$ === void 0 ? void 0 : _item$assignes2$.name) || t("CS_COMMON_NA")), (item === null || item === void 0 ? void 0 : (_item$assignes3 = item.assignes) === null || _item$assignes3 === void 0 ? void 0 : (_item$assignes3$ = _item$assignes3[0]) === null || _item$assignes3$ === void 0 ? void 0 : _item$assignes3$.emailId) && /*#__PURE__*/React.createElement("div", {
|
|
9229
|
+
className: "custom-officer-email"
|
|
9230
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
9231
|
+
className: "custom-email-label"
|
|
9232
|
+
}, "Email:"), " ", item === null || item === void 0 ? void 0 : (_item$assignes4 = item.assignes) === null || _item$assignes4 === void 0 ? void 0 : (_item$assignes4$ = _item$assignes4[0]) === null || _item$assignes4$ === void 0 ? void 0 : _item$assignes4$.emailId))), /*#__PURE__*/React.createElement("div", {
|
|
9233
|
+
className: "custom-card-right"
|
|
9234
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9235
|
+
className: "custom-actions-label"
|
|
9236
|
+
}, "Action"), /*#__PURE__*/React.createElement("div", {
|
|
9237
|
+
className: "custom-status-text"
|
|
9238
|
+
}, t((item === null || item === void 0 ? void 0 : item.performedAction) || "CS_COMMON_NA")))), (item === null || item === void 0 ? void 0 : item.wfComment) && (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment.length) > 0 && (item === null || item === void 0 ? void 0 : (_item$wfComment2 = item.wfComment) === null || _item$wfComment2 === void 0 ? void 0 : _item$wfComment2.some(c => c === null || c === void 0 ? void 0 : c.trim())) && /*#__PURE__*/React.createElement("div", {
|
|
9239
|
+
className: "custom-comments-section"
|
|
9240
|
+
}, /*#__PURE__*/React.createElement("h4", {
|
|
9241
|
+
className: "custom-comments-title"
|
|
9242
|
+
}, "Officer Comments"), /*#__PURE__*/React.createElement("div", {
|
|
9243
|
+
className: "custom-comment-text"
|
|
9244
|
+
}, item === null || item === void 0 ? void 0 : (_item$wfComment3 = item.wfComment) === null || _item$wfComment3 === void 0 ? void 0 : _item$wfComment3.map((comment, idx) => /*#__PURE__*/React.createElement("p", {
|
|
9245
|
+
key: idx
|
|
9246
|
+
}, comment)))), (item === null || item === void 0 ? void 0 : item.wfDocuments) && (item === null || item === void 0 ? void 0 : (_item$wfDocuments = item.wfDocuments) === null || _item$wfDocuments === void 0 ? void 0 : _item$wfDocuments.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
9247
|
+
className: "custom-comments-section",
|
|
9248
|
+
style: {
|
|
9249
|
+
borderTop: "none",
|
|
9250
|
+
paddingTop: "0"
|
|
9251
|
+
}
|
|
9252
|
+
}, /*#__PURE__*/React.createElement("h4", {
|
|
9253
|
+
className: "custom-comments-title"
|
|
9254
|
+
}, "Document Attached:"), /*#__PURE__*/React.createElement("div", {
|
|
9255
|
+
className: "custom-comment-text"
|
|
9256
|
+
}, item === null || item === void 0 ? void 0 : (_item$wfDocuments2 = item.wfDocuments) === null || _item$wfDocuments2 === void 0 ? void 0 : _item$wfDocuments2.map((doc, index) => /*#__PURE__*/React.createElement(TimelineDocument, {
|
|
9257
|
+
key: `${doc === null || doc === void 0 ? void 0 : doc.documentType}-${index}`,
|
|
9258
|
+
value: item === null || item === void 0 ? void 0 : item.wfDocuments,
|
|
9259
|
+
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
9260
|
+
index: index
|
|
9261
|
+
})))))));
|
|
9331
9262
|
}))));
|
|
9332
|
-
}
|
|
9263
|
+
}
|
|
9333
9264
|
|
|
9334
9265
|
const RALApplicationDetails = () => {
|
|
9335
9266
|
var _applicationData$Owne, _propertyDetails$fees, _propertyDetails$fees2, _propertyDetails$fees3, _propertyDetails$fees4, _applicationData$Docu;
|
|
@@ -9526,7 +9457,7 @@ const RALApplicationDetails = () => {
|
|
|
9526
9457
|
label: t("SECURITY_DEPOSIT"),
|
|
9527
9458
|
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit) || t("CS_NA")
|
|
9528
9459
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9529
|
-
label: t("
|
|
9460
|
+
label: t("RAL_FEE_CYCLE"),
|
|
9530
9461
|
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")
|
|
9531
9462
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9532
9463
|
label: t("PROPERTY_SIZE"),
|
|
@@ -9556,7 +9487,7 @@ const RALApplicationDetails = () => {
|
|
|
9556
9487
|
marginTop: "10px",
|
|
9557
9488
|
fontSize: "15px"
|
|
9558
9489
|
}
|
|
9559
|
-
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType)))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(
|
|
9490
|
+
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType)))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
9560
9491
|
workflowDetails: workflowDetails,
|
|
9561
9492
|
t: t
|
|
9562
9493
|
})), (loader || (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.isLoading)) && /*#__PURE__*/React.createElement(Loader, {
|
|
@@ -11012,15 +10943,24 @@ const SearchApplication = ({
|
|
|
11012
10943
|
onSearch,
|
|
11013
10944
|
type,
|
|
11014
10945
|
onClose,
|
|
11015
|
-
searchFields,
|
|
11016
10946
|
searchParams,
|
|
11017
10947
|
isInboxPage,
|
|
11018
10948
|
defaultSearchParams
|
|
11019
10949
|
}) => {
|
|
11020
|
-
var _searchFields$filter;
|
|
11021
10950
|
const {
|
|
11022
10951
|
t
|
|
11023
10952
|
} = useTranslation();
|
|
10953
|
+
const searchFields = [{
|
|
10954
|
+
label: t("APPLICATION_NUMBER"),
|
|
10955
|
+
name: "applicationNumber"
|
|
10956
|
+
}, {
|
|
10957
|
+
label: t("UC_MOBILE_NO_LABEL"),
|
|
10958
|
+
name: "mobileNumber",
|
|
10959
|
+
maxlength: 10,
|
|
10960
|
+
pattern: "[6-9][0-9]{9}",
|
|
10961
|
+
title: t("ES_SEARCH_APPLICATION_MOBILE_INVALID"),
|
|
10962
|
+
componentInFront: "+91"
|
|
10963
|
+
}];
|
|
11024
10964
|
const {
|
|
11025
10965
|
register,
|
|
11026
10966
|
handleSubmit,
|
|
@@ -11093,13 +11033,35 @@ const SearchApplication = ({
|
|
|
11093
11033
|
width: "100%",
|
|
11094
11034
|
display: "grid"
|
|
11095
11035
|
}
|
|
11096
|
-
}, searchFields === null || searchFields === void 0 ? void 0 :
|
|
11036
|
+
}, searchFields === null || searchFields === void 0 ? void 0 : searchFields.map((input, index) => /*#__PURE__*/React.createElement("div", {
|
|
11097
11037
|
key: input.name,
|
|
11098
11038
|
className: "input-fields"
|
|
11099
11039
|
}, /*#__PURE__*/React.createElement("span", {
|
|
11100
11040
|
key: index,
|
|
11101
11041
|
className: "complaint-input"
|
|
11102
|
-
},
|
|
11042
|
+
}, /*#__PURE__*/React.createElement(Label, null, input.label), input.name === "mobileNumber" ? /*#__PURE__*/React.createElement("div", {
|
|
11043
|
+
className: "field-container"
|
|
11044
|
+
}, /*#__PURE__*/React.createElement(MobileNumber, {
|
|
11045
|
+
name: "mobileNumber",
|
|
11046
|
+
inputRef: register({
|
|
11047
|
+
minLength: {
|
|
11048
|
+
value: 10,
|
|
11049
|
+
message: t("CORE_COMMON_MOBILE_ERROR")
|
|
11050
|
+
},
|
|
11051
|
+
maxLength: {
|
|
11052
|
+
value: 10,
|
|
11053
|
+
message: t("CORE_COMMON_MOBILE_ERROR")
|
|
11054
|
+
},
|
|
11055
|
+
pattern: {
|
|
11056
|
+
value: /[6789][0-9]{9}/,
|
|
11057
|
+
message: t("CORE_COMMON_MOBILE_ERROR")
|
|
11058
|
+
}
|
|
11059
|
+
}),
|
|
11060
|
+
type: "number",
|
|
11061
|
+
componentInFront: /*#__PURE__*/React.createElement("div", {
|
|
11062
|
+
className: "employee-card-input employee-card-input--front"
|
|
11063
|
+
}, "+91")
|
|
11064
|
+
})) : input.type !== "date" ? /*#__PURE__*/React.createElement("div", {
|
|
11103
11065
|
className: "field-container"
|
|
11104
11066
|
}, input !== null && input !== void 0 && input.componentInFront ? /*#__PURE__*/React.createElement("span", {
|
|
11105
11067
|
className: "citizen-card-input citizen-card-input--front",
|
|
@@ -11118,7 +11080,7 @@ const SearchApplication = ({
|
|
|
11118
11080
|
name: input.name,
|
|
11119
11081
|
control: control,
|
|
11120
11082
|
defaultValue: null
|
|
11121
|
-
})
|
|
11083
|
+
})))), type === "desktop" && !mobileView && /*#__PURE__*/React.createElement("div", {
|
|
11122
11084
|
style: {
|
|
11123
11085
|
gridColumn: "2/3",
|
|
11124
11086
|
textAlign: "right",
|
|
@@ -11315,7 +11277,6 @@ const DesktopInbox = ({
|
|
|
11315
11277
|
defaultSearchParams: props.defaultSearchParams,
|
|
11316
11278
|
onSearch: props.onSearch,
|
|
11317
11279
|
type: "desktop",
|
|
11318
|
-
searchFields: props.searchFields,
|
|
11319
11280
|
isInboxPage: !(props !== null && props !== void 0 && props.isSearch),
|
|
11320
11281
|
searchParams: props.searchParams
|
|
11321
11282
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -11425,8 +11386,7 @@ const ApplicationCard = ({
|
|
|
11425
11386
|
onClose: handlePopupClose,
|
|
11426
11387
|
onSearch: onSearch,
|
|
11427
11388
|
isFstpOperator: isFstpOperator,
|
|
11428
|
-
searchParams: searchFilterParams
|
|
11429
|
-
searchFields: searchFields
|
|
11389
|
+
searchParams: searchFilterParams
|
|
11430
11390
|
}))));
|
|
11431
11391
|
};
|
|
11432
11392
|
|
|
@@ -11627,7 +11587,6 @@ const MobileInbox = ({
|
|
|
11627
11587
|
onSearch: onSearch,
|
|
11628
11588
|
onSort: onSort,
|
|
11629
11589
|
searchParams: searchParams,
|
|
11630
|
-
searchFields: searchFields,
|
|
11631
11590
|
linkPrefix: linkPrefix,
|
|
11632
11591
|
sortParams: sortParams,
|
|
11633
11592
|
serviceRequestIdKey: serviceRequestIdKey,
|
|
@@ -11797,17 +11756,6 @@ const Inbox = ({
|
|
|
11797
11756
|
}, []);
|
|
11798
11757
|
const handlePageSizeChange = e => setPageSize(Number(e.target.value));
|
|
11799
11758
|
const totalCount = data === null || data === void 0 ? void 0 : (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : _data$.totalCount;
|
|
11800
|
-
const getSearchFields = () => [{
|
|
11801
|
-
label: t("APPLICATION_NUMBER"),
|
|
11802
|
-
name: "applicationNumber"
|
|
11803
|
-
}, {
|
|
11804
|
-
label: t("UC_MOBILE_NO_LABEL"),
|
|
11805
|
-
name: "mobileNumber",
|
|
11806
|
-
maxlength: 10,
|
|
11807
|
-
pattern: "[6-9][0-9]{9}",
|
|
11808
|
-
title: t("ES_SEARCH_APPLICATION_MOBILE_INVALID"),
|
|
11809
|
-
componentInFront: "+91"
|
|
11810
|
-
}];
|
|
11811
11759
|
if ((rest === null || rest === void 0 ? void 0 : (_rest$data = rest.data) === null || _rest$data === void 0 ? void 0 : _rest$data.length) !== null) {
|
|
11812
11760
|
if (isMobile) {
|
|
11813
11761
|
return /*#__PURE__*/React.createElement(MobileInbox, {
|
|
@@ -11815,7 +11763,6 @@ const Inbox = ({
|
|
|
11815
11763
|
defaultSearchParams: _initialStates.searchParams,
|
|
11816
11764
|
isLoading: hookLoading,
|
|
11817
11765
|
isSearch: !isInbox,
|
|
11818
|
-
searchFields: getSearchFields(),
|
|
11819
11766
|
onFilterChange: handleFilterChange,
|
|
11820
11767
|
onSearch: handleFilterChange,
|
|
11821
11768
|
onSort: handleSort,
|
|
@@ -11837,7 +11784,6 @@ const Inbox = ({
|
|
|
11837
11784
|
defaultSearchParams: _initialStates.searchParams,
|
|
11838
11785
|
isSearch: !isInbox,
|
|
11839
11786
|
onFilterChange: handleFilterChange,
|
|
11840
|
-
searchFields: getSearchFields(),
|
|
11841
11787
|
onSearch: handleFilterChange,
|
|
11842
11788
|
onSort: handleSort,
|
|
11843
11789
|
onNextPage: fetchNextPage,
|
|
@@ -11896,6 +11842,31 @@ const ModalConfig = ({
|
|
|
11896
11842
|
if (action.isTerminateState) {
|
|
11897
11843
|
checkAssigneeVisible = false;
|
|
11898
11844
|
}
|
|
11845
|
+
if ((action === null || action === void 0 ? void 0 : action.action) === "RENEWAL") {
|
|
11846
|
+
return {
|
|
11847
|
+
label: {
|
|
11848
|
+
submit: t("RAL_RENEWAL_SUBMIT"),
|
|
11849
|
+
cancel: t("WF_EMPLOYEE_NEWTL_CANCEL")
|
|
11850
|
+
},
|
|
11851
|
+
form: [{
|
|
11852
|
+
body: [{
|
|
11853
|
+
label: `${t("RAL_TRADE_LICENSE_NUMBER")} *`,
|
|
11854
|
+
isMandatory: false,
|
|
11855
|
+
type: "text",
|
|
11856
|
+
validation: {
|
|
11857
|
+
message: t("CORE_COMMON_REQUIRED_ERRMSG"),
|
|
11858
|
+
pattern: {
|
|
11859
|
+
value: /^[A-Z0-9\/-]{6,20}$/,
|
|
11860
|
+
message: t("RAL_INVALID_TRADE_LICENSE_NUMBER")
|
|
11861
|
+
}
|
|
11862
|
+
},
|
|
11863
|
+
populators: {
|
|
11864
|
+
name: "tradeLicenseNumber"
|
|
11865
|
+
}
|
|
11866
|
+
}]
|
|
11867
|
+
}]
|
|
11868
|
+
};
|
|
11869
|
+
}
|
|
11899
11870
|
return {
|
|
11900
11871
|
label: {
|
|
11901
11872
|
heading: "",
|
|
@@ -11974,7 +11945,8 @@ const RALModal = ({
|
|
|
11974
11945
|
showToast,
|
|
11975
11946
|
closeToast,
|
|
11976
11947
|
setShowToast,
|
|
11977
|
-
getEmployees
|
|
11948
|
+
getEmployees,
|
|
11949
|
+
handleRenewal
|
|
11978
11950
|
}) => {
|
|
11979
11951
|
const [config, setConfig] = useState({});
|
|
11980
11952
|
const [defaultValues, setDefaultValues] = useState({});
|
|
@@ -12071,6 +12043,21 @@ const RALModal = ({
|
|
|
12071
12043
|
})();
|
|
12072
12044
|
}, [file]);
|
|
12073
12045
|
function submit(data) {
|
|
12046
|
+
if ((action === null || action === void 0 ? void 0 : action.action) === "RENEWAL") {
|
|
12047
|
+
if (!(data !== null && data !== void 0 && data.tradeLicenseNumber)) {
|
|
12048
|
+
setShowToast({
|
|
12049
|
+
key: true,
|
|
12050
|
+
label: t("Trade License Number is required")
|
|
12051
|
+
});
|
|
12052
|
+
return;
|
|
12053
|
+
}
|
|
12054
|
+
handleRenewal({
|
|
12055
|
+
...applicationData,
|
|
12056
|
+
...data
|
|
12057
|
+
});
|
|
12058
|
+
closeModal();
|
|
12059
|
+
return;
|
|
12060
|
+
}
|
|
12074
12061
|
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";
|
|
12075
12062
|
if (action !== null && action !== void 0 && action.isTerminateState) checkAssigneeMandatory = false;
|
|
12076
12063
|
if (checkAssigneeMandatory && !(selectedApprover !== null && selectedApprover !== void 0 && selectedApprover.uuid)) {
|
|
@@ -12150,7 +12137,7 @@ const RALModal = ({
|
|
|
12150
12137
|
};
|
|
12151
12138
|
|
|
12152
12139
|
const RALApplicationDetails$1 = () => {
|
|
12153
|
-
var _user$info, _user$info$roles, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _applicationData$Owne, _propertyDetails$fees, _propertyDetails$fees2, _propertyDetails$fees3, _propertyDetails$fees4, _applicationData$
|
|
12140
|
+
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, _actions2, _workflowDetails$data6;
|
|
12154
12141
|
const {
|
|
12155
12142
|
t
|
|
12156
12143
|
} = useTranslation();
|
|
@@ -12161,6 +12148,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
12161
12148
|
const [loader, setLoader] = useState(false);
|
|
12162
12149
|
const state = tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0];
|
|
12163
12150
|
const [applicationData, setApplicationData] = useState();
|
|
12151
|
+
console.log("applicationData", applicationData);
|
|
12164
12152
|
const [showToast, setShowToast] = useState(null);
|
|
12165
12153
|
const [displayMenu, setDisplayMenu] = useState(false);
|
|
12166
12154
|
const [selectedAction, setSelectedAction] = useState(null);
|
|
@@ -12201,49 +12189,6 @@ const RALApplicationDetails$1 = () => {
|
|
|
12201
12189
|
role: "EMPLOYEE"
|
|
12202
12190
|
});
|
|
12203
12191
|
const propertyDetails = applicationData !== null && applicationData !== void 0 && applicationData.additionalDetails ? applicationData.additionalDetails : {};
|
|
12204
|
-
const showNextActions = nextActions => {
|
|
12205
|
-
var _nextAction;
|
|
12206
|
-
let nextAction = (nextActions === null || nextActions === void 0 ? void 0 : nextActions.length) > 0 && nextActions[0];
|
|
12207
|
-
const next = nextActions === null || nextActions === void 0 ? void 0 : nextActions.map(action => action === null || action === void 0 ? void 0 : action.action);
|
|
12208
|
-
if (next !== null && next !== void 0 && next.includes("PAY") || next !== null && next !== void 0 && next.includes("EDIT")) {
|
|
12209
|
-
let currentIndex = next.indexOf("EDIT") || next.indexOf("PAY");
|
|
12210
|
-
currentIndex = currentIndex != -1 ? currentIndex : next.indexOf("PAY");
|
|
12211
|
-
nextAction = nextActions[currentIndex];
|
|
12212
|
-
}
|
|
12213
|
-
switch ((_nextAction = nextAction) === null || _nextAction === void 0 ? void 0 : _nextAction.action) {
|
|
12214
|
-
case "PAY":
|
|
12215
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
12216
|
-
style: {
|
|
12217
|
-
marginTop: "1em",
|
|
12218
|
-
bottom: "0px",
|
|
12219
|
-
width: "100%",
|
|
12220
|
-
marginBottom: "1.2em"
|
|
12221
|
-
}
|
|
12222
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
12223
|
-
to: {
|
|
12224
|
-
pathname: `/digit-ui/employee/payment/collect/rl-services/${acknowledgementIds}/${tenantId}?tenantId=${tenantId}`,
|
|
12225
|
-
state: {
|
|
12226
|
-
tenantId: tenantId,
|
|
12227
|
-
applicationNumber: acknowledgementIds
|
|
12228
|
-
}
|
|
12229
|
-
}
|
|
12230
|
-
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
12231
|
-
label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT")
|
|
12232
|
-
}))) ;
|
|
12233
|
-
case "SUBMIT_FEEDBACK":
|
|
12234
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
12235
|
-
style: {
|
|
12236
|
-
marginTop: "24px"
|
|
12237
|
-
}
|
|
12238
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
12239
|
-
to: `/digit-ui/citizen/fsm/rate/${acknowledgementIds}`
|
|
12240
|
-
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
12241
|
-
label: t("CS_APPLICATION_DETAILS_RATE")
|
|
12242
|
-
})));
|
|
12243
|
-
default:
|
|
12244
|
-
return null;
|
|
12245
|
-
}
|
|
12246
|
-
};
|
|
12247
12192
|
let user = Digit.UserService.getUser();
|
|
12248
12193
|
const menuRef = useRef$1();
|
|
12249
12194
|
const userRoles = user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : (_user$info$roles = _user$info.roles) === null || _user$info$roles === void 0 ? void 0 : _user$info$roles.map(e => e.code);
|
|
@@ -12258,6 +12203,11 @@ const RALApplicationDetails$1 = () => {
|
|
|
12258
12203
|
return (_e$roles2 = e.roles) === null || _e$roles2 === void 0 ? void 0 : _e$roles2.includes(role);
|
|
12259
12204
|
})) || !e.roles;
|
|
12260
12205
|
}));
|
|
12206
|
+
if ((_actions = actions) !== null && _actions !== void 0 && _actions.some(action => action.action === "REQUEST_FOR_DISCONNECTION") && (applicationData === null || applicationData === void 0 ? void 0 : applicationData.endDate) > Date.now()) {
|
|
12207
|
+
actions = [...(actions || []), {
|
|
12208
|
+
action: "RENEWAL"
|
|
12209
|
+
}];
|
|
12210
|
+
}
|
|
12261
12211
|
const closeToast = () => {
|
|
12262
12212
|
setShowToast(null);
|
|
12263
12213
|
};
|
|
@@ -12277,11 +12227,14 @@ const RALApplicationDetails$1 = () => {
|
|
|
12277
12227
|
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);
|
|
12278
12228
|
});
|
|
12279
12229
|
setEmployees((filterRoles === null || filterRoles === void 0 ? void 0 : (_filterRoles$ = filterRoles[0]) === null || _filterRoles$ === void 0 ? void 0 : _filterRoles$.actions) || []);
|
|
12280
|
-
if ((action === null || action === void 0 ? void 0 : action.action) == "APPLY" || (action === null || action === void 0 ? void 0 : action.action) == "REJECT") {
|
|
12230
|
+
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) == "CASH_REFUND") {
|
|
12281
12231
|
submitAction(payload);
|
|
12282
12232
|
} else if ((action === null || action === void 0 ? void 0 : action.action) == "PAY") {
|
|
12283
12233
|
const appNo = acknowledgementIds;
|
|
12284
12234
|
history.push(`/digit-ui/employee/payment/collect/rl-services/${appNo}/${tenantId}`);
|
|
12235
|
+
} else if ((action === null || action === void 0 ? void 0 : action.action) === "RENEWAL") {
|
|
12236
|
+
setShowModal(true);
|
|
12237
|
+
setSelectedAction(action);
|
|
12285
12238
|
} else {
|
|
12286
12239
|
setShowModal(true);
|
|
12287
12240
|
setSelectedAction(action);
|
|
@@ -12361,6 +12314,82 @@ const RALApplicationDetails$1 = () => {
|
|
|
12361
12314
|
return () => clearTimeout(timer);
|
|
12362
12315
|
}
|
|
12363
12316
|
}, [showToast]);
|
|
12317
|
+
const handleRenewal = async data => {
|
|
12318
|
+
var _data$OwnerInfo;
|
|
12319
|
+
setLoader(true);
|
|
12320
|
+
const oldStart = new Date(data === null || data === void 0 ? void 0 : data.startDate);
|
|
12321
|
+
const oldEnd = new Date(data === null || data === void 0 ? void 0 : data.endDate);
|
|
12322
|
+
const duration = oldEnd - oldStart;
|
|
12323
|
+
const newStart = new Date(oldEnd);
|
|
12324
|
+
const newEnd = new Date(newStart.getTime() + duration);
|
|
12325
|
+
const sanitizedOwners = data === null || data === void 0 ? void 0 : (_data$OwnerInfo = data.OwnerInfo) === null || _data$OwnerInfo === void 0 ? void 0 : _data$OwnerInfo.map(({
|
|
12326
|
+
ownerId,
|
|
12327
|
+
...rest
|
|
12328
|
+
}) => rest);
|
|
12329
|
+
const payload = {
|
|
12330
|
+
AllotmentDetails: {
|
|
12331
|
+
tenantId: data === null || data === void 0 ? void 0 : data.tenantId,
|
|
12332
|
+
propertyId: data === null || data === void 0 ? void 0 : data.propertyId,
|
|
12333
|
+
previousApplicationNumber: data === null || data === void 0 ? void 0 : data.applicationNumber,
|
|
12334
|
+
OwnerInfo: sanitizedOwners,
|
|
12335
|
+
tradeLicenseNumber: data === null || data === void 0 ? void 0 : data.tradeLicenseNumber,
|
|
12336
|
+
additionalDetails: data === null || data === void 0 ? void 0 : data.additionalDetails,
|
|
12337
|
+
startDate: newStart.getTime(),
|
|
12338
|
+
endDate: newEnd.getTime(),
|
|
12339
|
+
workflow: {
|
|
12340
|
+
action: "INITIATE"
|
|
12341
|
+
},
|
|
12342
|
+
Document: null
|
|
12343
|
+
}
|
|
12344
|
+
};
|
|
12345
|
+
try {
|
|
12346
|
+
const response = await Digit.RentAndLeaseService.create(payload);
|
|
12347
|
+
updateApplication(response === null || response === void 0 ? void 0 : response.AllotmentDetails);
|
|
12348
|
+
} catch (error) {
|
|
12349
|
+
setLoader(false);
|
|
12350
|
+
setShowToast({
|
|
12351
|
+
key: true,
|
|
12352
|
+
label: "Error creating renewal application"
|
|
12353
|
+
});
|
|
12354
|
+
}
|
|
12355
|
+
};
|
|
12356
|
+
const updateApplication = async response => {
|
|
12357
|
+
var _applicationData$Docu;
|
|
12358
|
+
const sanitizedDocuments = applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$Docu = applicationData.Document) === null || _applicationData$Docu === void 0 ? void 0 : _applicationData$Docu.map(({
|
|
12359
|
+
docId,
|
|
12360
|
+
id,
|
|
12361
|
+
...rest
|
|
12362
|
+
}) => rest);
|
|
12363
|
+
const payload = {
|
|
12364
|
+
AllotmentDetails: {
|
|
12365
|
+
...response,
|
|
12366
|
+
Document: sanitizedDocuments,
|
|
12367
|
+
workflow: {
|
|
12368
|
+
action: "SAVEASDRAFT"
|
|
12369
|
+
}
|
|
12370
|
+
}
|
|
12371
|
+
};
|
|
12372
|
+
try {
|
|
12373
|
+
await Digit.RentAndLeaseService.update(payload);
|
|
12374
|
+
if (acknowledgementIds) {
|
|
12375
|
+
const filters = {
|
|
12376
|
+
applicationNumbers: acknowledgementIds
|
|
12377
|
+
};
|
|
12378
|
+
fetchApplications(filters);
|
|
12379
|
+
}
|
|
12380
|
+
setLoader(false);
|
|
12381
|
+
setShowToast({
|
|
12382
|
+
key: false,
|
|
12383
|
+
label: "Renewal application submitted successfully"
|
|
12384
|
+
});
|
|
12385
|
+
} catch (error) {
|
|
12386
|
+
setLoader(false);
|
|
12387
|
+
setShowToast({
|
|
12388
|
+
key: true,
|
|
12389
|
+
label: "Error updating renewal application"
|
|
12390
|
+
});
|
|
12391
|
+
}
|
|
12392
|
+
};
|
|
12364
12393
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
12365
12394
|
className: "cardHeaderWithOptions",
|
|
12366
12395
|
style: {
|
|
@@ -12430,7 +12459,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
12430
12459
|
label: t("SECURITY_DEPOSIT"),
|
|
12431
12460
|
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit) || t("CS_NA")
|
|
12432
12461
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
12433
|
-
label: t("
|
|
12462
|
+
label: t("RAL_FEE_CYCLE"),
|
|
12434
12463
|
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")
|
|
12435
12464
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
12436
12465
|
label: t("PROPERTY_SIZE"),
|
|
@@ -12449,7 +12478,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
12449
12478
|
flexDirection: "row",
|
|
12450
12479
|
gap: "30px"
|
|
12451
12480
|
}
|
|
12452
|
-
}, (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$
|
|
12481
|
+
}, (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$Docu2 = applicationData.Document) === null || _applicationData$Docu2 === void 0 ? void 0 : _applicationData$Docu2.length) > 0 ? applicationData.Document.map((doc, index) => /*#__PURE__*/React.createElement("div", {
|
|
12453
12482
|
key: index
|
|
12454
12483
|
}, /*#__PURE__*/React.createElement(RALDocuments, {
|
|
12455
12484
|
value: applicationData.Document,
|
|
@@ -12460,10 +12489,10 @@ const RALApplicationDetails$1 = () => {
|
|
|
12460
12489
|
marginTop: "10px",
|
|
12461
12490
|
fontSize: "15px"
|
|
12462
12491
|
}
|
|
12463
|
-
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType)))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(
|
|
12492
|
+
}, t(doc === null || doc === void 0 ? void 0 : doc.documentType)))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
12464
12493
|
workflowDetails: workflowDetails,
|
|
12465
12494
|
t: t
|
|
12466
|
-
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.status) != "INITIATED" && (
|
|
12495
|
+
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.status) != "INITIATED" && ((_actions2 = actions) === null || _actions2 === void 0 ? void 0 : _actions2.length) > 0 && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
|
|
12467
12496
|
localeKeyPrefix: `WF_EMPLOYEE_${"PTR"}`,
|
|
12468
12497
|
options: actions,
|
|
12469
12498
|
optionKey: "action",
|
|
@@ -12492,8 +12521,10 @@ const RALApplicationDetails$1 = () => {
|
|
|
12492
12521
|
showToast: showToast,
|
|
12493
12522
|
closeToast: closeToast,
|
|
12494
12523
|
getEmployees: getEmployees,
|
|
12495
|
-
setShowToast: setShowToast
|
|
12496
|
-
|
|
12524
|
+
setShowToast: setShowToast,
|
|
12525
|
+
applicationData: applicationData,
|
|
12526
|
+
handleRenewal: handleRenewal
|
|
12527
|
+
}) : null), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
12497
12528
|
error: showToast.key,
|
|
12498
12529
|
label: t(showToast.label),
|
|
12499
12530
|
isDleteBtn: true,
|
|
@@ -14394,60 +14425,59 @@ const StepWrapper = ({
|
|
|
14394
14425
|
const {
|
|
14395
14426
|
t
|
|
14396
14427
|
} = useTranslation();
|
|
14397
|
-
const stepStyle = isActive => ({
|
|
14428
|
+
const stepStyle = (isActive, isLast) => ({
|
|
14398
14429
|
display: "flex",
|
|
14399
14430
|
alignItems: "center",
|
|
14400
14431
|
justifyContent: "flex-end",
|
|
14401
|
-
flex:
|
|
14402
|
-
color: isActive ? "#
|
|
14403
|
-
padding: "
|
|
14404
|
-
width: "260px"
|
|
14432
|
+
flex: "0 0 auto",
|
|
14433
|
+
color: isActive ? "#0D43A7" : "#9CA3AF",
|
|
14434
|
+
padding: "14px 12px",
|
|
14435
|
+
width: "260px",
|
|
14436
|
+
marginBottom: isLast ? "6px" : "18px"
|
|
14405
14437
|
});
|
|
14406
14438
|
const circleStyle = stepNumber => {
|
|
14407
|
-
|
|
14408
|
-
if (stepNumber <= _currentStep) {
|
|
14409
|
-
backgroundColor = "#0D43A7";
|
|
14410
|
-
} else {
|
|
14411
|
-
backgroundColor = "#FFFFFF";
|
|
14412
|
-
}
|
|
14439
|
+
const completed = stepNumber <= _currentStep;
|
|
14413
14440
|
return {
|
|
14414
|
-
width: "
|
|
14415
|
-
height: "
|
|
14441
|
+
width: "56px",
|
|
14442
|
+
height: "56px",
|
|
14416
14443
|
borderRadius: "50%",
|
|
14417
|
-
|
|
14418
|
-
color:
|
|
14444
|
+
background: completed ? "linear-gradient(135deg,#2563eb,#7c3aed)" : "#ffffff",
|
|
14445
|
+
color: completed ? "#ffffff" : "#0f172a",
|
|
14419
14446
|
display: "flex",
|
|
14420
14447
|
alignItems: "center",
|
|
14421
14448
|
justifyContent: "center",
|
|
14422
|
-
marginBottom: "
|
|
14423
|
-
fontWeight:
|
|
14449
|
+
marginBottom: "8px",
|
|
14450
|
+
fontWeight: 600,
|
|
14424
14451
|
fontSize: "18px",
|
|
14425
|
-
border:
|
|
14452
|
+
border: completed ? "none" : "1px solid rgba(15,23,42,0.08)",
|
|
14453
|
+
boxShadow: completed ? "0 6px 18px rgba(37,99,235,0.18)" : "0 2px 6px rgba(2,6,23,0.04)",
|
|
14426
14454
|
position: "relative"
|
|
14427
14455
|
};
|
|
14428
14456
|
};
|
|
14429
14457
|
const labelStyle = {
|
|
14430
|
-
fontSize: "
|
|
14431
|
-
color: "#
|
|
14432
|
-
fontWeight:
|
|
14433
|
-
fontFamily: "Noto Sans,sans-serif",
|
|
14434
|
-
marginRight: "
|
|
14458
|
+
fontSize: "16px",
|
|
14459
|
+
color: "#0f172a",
|
|
14460
|
+
fontWeight: 600,
|
|
14461
|
+
fontFamily: "Noto Sans, sans-serif",
|
|
14462
|
+
marginRight: "8px",
|
|
14463
|
+
textAlign: "right"
|
|
14435
14464
|
};
|
|
14436
14465
|
const stepNumberStyle = {
|
|
14437
|
-
fontSize: "
|
|
14438
|
-
color: "#
|
|
14439
|
-
fontWeight:
|
|
14440
|
-
fontFamily: "Noto Sans,sans-serif",
|
|
14441
|
-
margin: "
|
|
14466
|
+
fontSize: "14px",
|
|
14467
|
+
color: "#6b7280",
|
|
14468
|
+
fontWeight: 500,
|
|
14469
|
+
fontFamily: "Noto Sans, sans-serif",
|
|
14470
|
+
margin: "0 6px 0 0"
|
|
14442
14471
|
};
|
|
14443
14472
|
const lineStyle = {
|
|
14444
14473
|
position: "absolute",
|
|
14445
|
-
width: "
|
|
14446
|
-
height: "
|
|
14447
|
-
backgroundColor: "
|
|
14474
|
+
width: "3px",
|
|
14475
|
+
height: "56px",
|
|
14476
|
+
backgroundColor: "rgba(15,23,42,0.06)",
|
|
14448
14477
|
left: "50%",
|
|
14449
14478
|
top: "100%",
|
|
14450
|
-
transform: "translateX(-50%)"
|
|
14479
|
+
transform: "translateX(-50%)",
|
|
14480
|
+
borderRadius: "2px"
|
|
14451
14481
|
};
|
|
14452
14482
|
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
14453
14483
|
const totalSteps = _stepsList.length;
|
|
@@ -14457,22 +14487,25 @@ const StepWrapper = ({
|
|
|
14457
14487
|
width: "100%",
|
|
14458
14488
|
display: "flex",
|
|
14459
14489
|
flexDirection: "row",
|
|
14460
|
-
alignItems: "
|
|
14461
|
-
justifyContent: "flex-start"
|
|
14490
|
+
alignItems: "flex-start",
|
|
14491
|
+
justifyContent: "flex-start",
|
|
14492
|
+
gap: "24px"
|
|
14462
14493
|
}
|
|
14463
14494
|
}, /*#__PURE__*/React.createElement("div", {
|
|
14464
14495
|
className: "stepper-navigation-bar",
|
|
14465
14496
|
style: {
|
|
14466
14497
|
display: "flex",
|
|
14467
14498
|
flexDirection: "column",
|
|
14468
|
-
|
|
14469
|
-
|
|
14499
|
+
alignItems: "center",
|
|
14500
|
+
padding: "18px",
|
|
14501
|
+
minWidth: "120px",
|
|
14502
|
+
maxWidth: "320px",
|
|
14470
14503
|
marginBottom: "20px"
|
|
14471
14504
|
}
|
|
14472
14505
|
}, [...Array(totalSteps)].map((_, index) => /*#__PURE__*/React.createElement("div", {
|
|
14473
14506
|
className: "step-content",
|
|
14474
14507
|
key: index,
|
|
14475
|
-
style: stepStyle(index + 1 <= _currentStep)
|
|
14508
|
+
style: stepStyle(index + 1 <= _currentStep, index === totalSteps - 1)
|
|
14476
14509
|
}, /*#__PURE__*/React.createElement("div", {
|
|
14477
14510
|
className: "step-sub-content",
|
|
14478
14511
|
style: {
|
|
@@ -14496,7 +14529,8 @@ const StepWrapper = ({
|
|
|
14496
14529
|
className: "stepper-body",
|
|
14497
14530
|
style: {
|
|
14498
14531
|
width: "100%",
|
|
14499
|
-
marginBottom: "20px"
|
|
14532
|
+
marginBottom: "20px",
|
|
14533
|
+
background: "transparent"
|
|
14500
14534
|
}
|
|
14501
14535
|
}, children));
|
|
14502
14536
|
};
|
|
@@ -15041,7 +15075,6 @@ const RentAndLeasePropertyDetails = ({
|
|
|
15041
15075
|
baseRent: "",
|
|
15042
15076
|
securityDeposit: "",
|
|
15043
15077
|
refundApplicableOnDiscontinuation: null,
|
|
15044
|
-
penaltyType: "",
|
|
15045
15078
|
startDate: "",
|
|
15046
15079
|
endDate: "",
|
|
15047
15080
|
incrementApplicable: "",
|
|
@@ -15072,7 +15105,7 @@ const RentAndLeasePropertyDetails = ({
|
|
|
15072
15105
|
};
|
|
15073
15106
|
const handlePropertySelect = property => {
|
|
15074
15107
|
if (!property) return;
|
|
15075
|
-
const fieldsToPrefill = ["propertyId", "propertyName", "baseRent", "securityDeposit", "
|
|
15108
|
+
const fieldsToPrefill = ["propertyId", "propertyName", "baseRent", "securityDeposit", "refundApplicableOnDiscontinuation"];
|
|
15076
15109
|
setValue("selectedProperty", property);
|
|
15077
15110
|
fieldsToPrefill === null || fieldsToPrefill === void 0 ? void 0 : fieldsToPrefill.forEach(field => {
|
|
15078
15111
|
setValue(field, (property === null || property === void 0 ? void 0 : property[field]) ?? null, {
|
|
@@ -15378,31 +15411,7 @@ const RentAndLeasePropertyDetails = ({
|
|
|
15378
15411
|
})
|
|
15379
15412
|
}))), errors.baseRent && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
15380
15413
|
style: errorStyle
|
|
15381
|
-
}, getErrorMessage("baseRent")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
15382
|
-
className: "card-label-smaller"
|
|
15383
|
-
}, t("PENALTY_TYPE"), " ", /*#__PURE__*/React.createElement("span", {
|
|
15384
|
-
style: mandatoryStyle
|
|
15385
|
-
}, "*")), /*#__PURE__*/React.createElement("div", {
|
|
15386
|
-
className: "form-field"
|
|
15387
|
-
}, /*#__PURE__*/React.createElement(Controller, {
|
|
15388
|
-
control: control,
|
|
15389
|
-
name: "penaltyType",
|
|
15390
|
-
rules: {
|
|
15391
|
-
required: t("PTR_FIELD_REQUIRED")
|
|
15392
|
-
},
|
|
15393
|
-
render: ({
|
|
15394
|
-
value,
|
|
15395
|
-
onChange
|
|
15396
|
-
}) => /*#__PURE__*/React.createElement(TextInput, {
|
|
15397
|
-
type: "text",
|
|
15398
|
-
value: value || "",
|
|
15399
|
-
onChange: e => onChange(e.target.value),
|
|
15400
|
-
t: t,
|
|
15401
|
-
disabled: true
|
|
15402
|
-
})
|
|
15403
|
-
}))), errors.penaltyType && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
15404
|
-
style: errorStyle
|
|
15405
|
-
}, getErrorMessage("penaltyType")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("RAL_SECURITY_AMOUNT"), " ", /*#__PURE__*/React.createElement("span", {
|
|
15414
|
+
}, getErrorMessage("baseRent")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("RAL_SECURITY_AMOUNT"), " ", /*#__PURE__*/React.createElement("span", {
|
|
15406
15415
|
style: mandatoryStyle
|
|
15407
15416
|
}, "*")), /*#__PURE__*/React.createElement("div", {
|
|
15408
15417
|
className: "form-field"
|
|
@@ -16659,8 +16668,7 @@ function RentAndLeaseSummary({
|
|
|
16659
16668
|
baseRent: t("RENT_AMOUNT "),
|
|
16660
16669
|
securityDeposit: t("SECURITY_DEPOSIT"),
|
|
16661
16670
|
tax_applicable: t("GST_APPLICABLE"),
|
|
16662
|
-
refundApplicableOnDiscontinuation: t("REFUND_APPLICABLE")
|
|
16663
|
-
penaltyType: t("PENALTY_TYPE")
|
|
16671
|
+
refundApplicableOnDiscontinuation: t("REFUND_APPLICABLE")
|
|
16664
16672
|
};
|
|
16665
16673
|
return /*#__PURE__*/React.createElement("div", {
|
|
16666
16674
|
className: "application-summary"
|