@mseva/digit-ui-module-rentandlease 1.0.51-dev.1.1 → 1.0.51-dev.1.2
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 +160 -1666
- 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, Header, MultiLink, Card, CardSubHeader, StatusTable, CardSectionHeader, Row, AppContainer, PrivateRoute, BreadCrumb, Table, Label, MobileNumber, TextInput, DatePicker, LinkLabel, ActionBar, DetailsCard, SearchAction, FilterAction, PopUp, ShippingTruck, Dropdown, UploadFile, Modal, FormComposer, Toast, Menu, CardHeader, LabelFieldPair, CardLabel, CardLabelError, TextArea, FormStep, Banner, KeyNote, CitizenHomeCard } from '@mseva/digit-ui-react-components';
|
|
1
|
+
import { CheckBox, Loader as Loader$2, CloseSvg, RefreshSVG, RadioButtons, SubmitBar, PTIcon, EmployeeModuleCard, Header, MultiLink, Card, CardSubHeader, StatusTable, CardSectionHeader, Row, AppContainer, PrivateRoute, BreadCrumb, Table, Label, MobileNumber, TextInput, DatePicker, LinkLabel, ActionBar, DetailsCard, SearchAction, FilterAction, PopUp, ShippingTruck, Dropdown, UploadFile, Modal, FormComposer, Toast, Menu, BackButton, CardHeader, LabelFieldPair, CardLabel, CardLabelError, TextArea, FormStep, Banner, KeyNote, CitizenHomeCard } from '@mseva/digit-ui-react-components';
|
|
2
2
|
import React, { useState, useMemo, useEffect, useCallback, useRef } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useParams, useLocation, useRouteMatch, Switch, Link, useHistory } from 'react-router-dom';
|
|
@@ -6103,18 +6103,6 @@ const RentAndLeaseCard = () => {
|
|
|
6103
6103
|
return /*#__PURE__*/React.createElement(EmployeeModuleCard, propsForModuleCard);
|
|
6104
6104
|
};
|
|
6105
6105
|
|
|
6106
|
-
const convertEpochToDate = dateEpoch => {
|
|
6107
|
-
if (dateEpoch == null || dateEpoch == undefined || dateEpoch == "") {
|
|
6108
|
-
return "NA";
|
|
6109
|
-
}
|
|
6110
|
-
const dateFromApi = new Date(dateEpoch);
|
|
6111
|
-
let month = dateFromApi.getMonth() + 1;
|
|
6112
|
-
let day = dateFromApi.getDate();
|
|
6113
|
-
let year = dateFromApi.getFullYear();
|
|
6114
|
-
month = (month > 9 ? "" : "0") + month;
|
|
6115
|
-
day = (day > 9 ? "" : "0") + day;
|
|
6116
|
-
return `${day}/${month}/${year}`;
|
|
6117
|
-
};
|
|
6118
6106
|
const pdfDownloadLink = (documents = {}, fileStoreId = "", format = "") => {
|
|
6119
6107
|
let downloadLink = documents[fileStoreId] || "";
|
|
6120
6108
|
let differentFormats = (downloadLink === null || downloadLink === void 0 ? void 0 : downloadLink.split(",")) || [];
|
|
@@ -6129,7 +6117,7 @@ const pdfDownloadLink = (documents = {}, fileStoreId = "", format = "") => {
|
|
|
6129
6117
|
const capitalize = text => text.substr(0, 1).toUpperCase() + text.substr(1);
|
|
6130
6118
|
const ulbCamel = ulb => ulb.toLowerCase().split(" ").map(capitalize).join(" ");
|
|
6131
6119
|
const getAcknowledgementData = async (application, tenantInfo, t) => {
|
|
6132
|
-
var _application$OwnerInf, _application$addition, _application$addition2, _application$addition3, _application$addition4, _application$addition5, _application$addition6, _application$addition7, _application$addition8, _application$addition9, _application$addition0, _application$
|
|
6120
|
+
var _application$OwnerInf, _application$addition, _application$addition2, _application$addition3, _application$addition4, _application$addition5, _application$addition6, _application$addition7, _application$addition8, _application$addition9, _application$addition0, _application$Document, _application$addition1, _tenantInfo$city;
|
|
6133
6121
|
const details = [];
|
|
6134
6122
|
application === null || application === void 0 ? void 0 : (_application$OwnerInf = application.OwnerInfo) === null || _application$OwnerInf === void 0 ? void 0 : _application$OwnerInf.forEach((owner, index) => {
|
|
6135
6123
|
var _owner$permanentAddre, _owner$permanentAddre2, _owner$correspondence, _owner$correspondence2;
|
|
@@ -6163,67 +6151,41 @@ const getAcknowledgementData = async (application, tenantInfo, t) => {
|
|
|
6163
6151
|
value: t(application === null || application === void 0 ? void 0 : (_application$addition = application.additionalDetails) === null || _application$addition === void 0 ? void 0 : _application$addition.propertyId) || "NA"
|
|
6164
6152
|
}, {
|
|
6165
6153
|
title: t("PT_ACK_LOCALIZATION_PROPERTY_ADDRESS"),
|
|
6166
|
-
value: (application === null || application === void 0 ? void 0 : (_application$addition2 = application.additionalDetails) === null || _application$addition2 === void 0 ? void 0 :
|
|
6154
|
+
value: (application === null || application === void 0 ? void 0 : (_application$addition2 = application.additionalDetails) === null || _application$addition2 === void 0 ? void 0 : _application$addition2.address) || "NA"
|
|
6167
6155
|
}, {
|
|
6168
6156
|
title: t("Allotment Type"),
|
|
6169
|
-
value: (application === null || application === void 0 ? void 0 : (_application$
|
|
6157
|
+
value: (application === null || application === void 0 ? void 0 : (_application$addition3 = application.additionalDetails) === null || _application$addition3 === void 0 ? void 0 : _application$addition3.allotmentType) || "NA"
|
|
6170
6158
|
}, {
|
|
6171
6159
|
title: t("Property Name"),
|
|
6172
|
-
value: (application === null || application === void 0 ? void 0 : (_application$
|
|
6160
|
+
value: (application === null || application === void 0 ? void 0 : (_application$addition4 = application.additionalDetails) === null || _application$addition4 === void 0 ? void 0 : _application$addition4.propertyName) || "NA"
|
|
6173
6161
|
}, {
|
|
6174
6162
|
title: t("Property Area"),
|
|
6175
|
-
value: `${(application === null || application === void 0 ? void 0 : (_application$
|
|
6163
|
+
value: `${(application === null || application === void 0 ? void 0 : (_application$addition5 = application.additionalDetails) === null || _application$addition5 === void 0 ? void 0 : _application$addition5.propertySizeOrArea) || "NA"} sq. meters`
|
|
6176
6164
|
}, {
|
|
6177
6165
|
title: t("PDF_STATIC_LABEL_WS_CONSOLIDATED_ACKNOWELDGMENT_PROPERTY_TYPE"),
|
|
6178
|
-
value: (application === null || application === void 0 ? void 0 : (_application$
|
|
6166
|
+
value: (application === null || application === void 0 ? void 0 : (_application$addition6 = application.additionalDetails) === null || _application$addition6 === void 0 ? void 0 : _application$addition6.propertyType) || "NA"
|
|
6179
6167
|
}, {
|
|
6180
6168
|
title: t("Location Type"),
|
|
6181
|
-
value: (application === null || application === void 0 ? void 0 : (_application$
|
|
6169
|
+
value: (application === null || application === void 0 ? void 0 : (_application$addition7 = application.additionalDetails) === null || _application$addition7 === void 0 ? void 0 : _application$addition7.locationType) || "NA"
|
|
6182
6170
|
}, {
|
|
6183
6171
|
title: t("Security Deposit"),
|
|
6184
|
-
value: `Rs. ${(application === null || application === void 0 ? void 0 : (_application$
|
|
6172
|
+
value: `Rs. ${(application === null || application === void 0 ? void 0 : (_application$addition8 = application.additionalDetails) === null || _application$addition8 === void 0 ? void 0 : _application$addition8.securityDeposit) || "NA"}`
|
|
6185
6173
|
}, {
|
|
6186
6174
|
title: t("Base Rent"),
|
|
6187
|
-
value: `Rs. ${(application === null || application === void 0 ? void 0 : (_application$
|
|
6175
|
+
value: `Rs. ${(application === null || application === void 0 ? void 0 : (_application$addition9 = application.additionalDetails) === null || _application$addition9 === void 0 ? void 0 : _application$addition9.baseRent) || "NA"}`
|
|
6188
6176
|
}, ...(application !== null && application !== void 0 && application.amountToBeDeducted ? [{
|
|
6189
6177
|
title: t("Penalty Amount"),
|
|
6190
6178
|
value: `Rs. ${application === null || application === void 0 ? void 0 : application.amountToBeDeducted}`
|
|
6191
6179
|
}, {
|
|
6192
6180
|
title: t("Penalty Amount (After Security Deposit)"),
|
|
6193
|
-
value: `Rs. ${(application === null || application === void 0 ? void 0 : application.amountToBeDeducted) - ((application === null || application === void 0 ? void 0 : (_application$
|
|
6181
|
+
value: `Rs. ${(application === null || application === void 0 ? void 0 : application.amountToBeDeducted) - ((application === null || application === void 0 ? void 0 : (_application$addition0 = application.additionalDetails) === null || _application$addition0 === void 0 ? void 0 : _application$addition0.securityDeposit) || 0)}`
|
|
6194
6182
|
}] : [])]
|
|
6195
6183
|
});
|
|
6196
|
-
|
|
6197
|
-
var _application$addition12, _application$addition13, _application$addition14, _application$addition15, _application$addition16, _application$addition17;
|
|
6198
|
-
details.push({
|
|
6199
|
-
title: t("RAL_ARREAR_DETAILS"),
|
|
6200
|
-
values: [{
|
|
6201
|
-
title: t("Arrears"),
|
|
6202
|
-
value: (application === null || application === void 0 ? void 0 : (_application$addition12 = application.additionalDetails) === null || _application$addition12 === void 0 ? void 0 : _application$addition12.arrear) || "NA"
|
|
6203
|
-
}, {
|
|
6204
|
-
title: t("RAL_START_DATE"),
|
|
6205
|
-
value: convertEpochToDate(application === null || application === void 0 ? void 0 : (_application$addition13 = application.additionalDetails) === null || _application$addition13 === void 0 ? void 0 : _application$addition13.arrearStartDate) || "NA"
|
|
6206
|
-
}, {
|
|
6207
|
-
title: t("RAL_END_DATE"),
|
|
6208
|
-
value: convertEpochToDate(application === null || application === void 0 ? void 0 : (_application$addition14 = application.additionalDetails) === null || _application$addition14 === void 0 ? void 0 : _application$addition14.arrearEndDate) || "NA"
|
|
6209
|
-
}, {
|
|
6210
|
-
title: t("Reason"),
|
|
6211
|
-
value: (application === null || application === void 0 ? void 0 : (_application$addition15 = application.additionalDetails) === null || _application$addition15 === void 0 ? void 0 : (_application$addition16 = _application$addition15.arrearReason) === null || _application$addition16 === void 0 ? void 0 : _application$addition16.name) || "NA"
|
|
6212
|
-
}, {
|
|
6213
|
-
title: t("Remarks"),
|
|
6214
|
-
value: (application === null || application === void 0 ? void 0 : (_application$addition17 = application.additionalDetails) === null || _application$addition17 === void 0 ? void 0 : _application$addition17.remarks) || "NA"
|
|
6215
|
-
}]
|
|
6216
|
-
});
|
|
6217
|
-
}
|
|
6218
|
-
const standardDocs = (application === null || application === void 0 ? void 0 : (_application$Document = application.Document) === null || _application$Document === void 0 ? void 0 : _application$Document.map((doc, index) => ({
|
|
6184
|
+
const docDetails = application === null || application === void 0 ? void 0 : (_application$Document = application.Document) === null || _application$Document === void 0 ? void 0 : _application$Document.map((doc, index) => ({
|
|
6219
6185
|
title: t(`${doc.documentType}`) || "NA",
|
|
6220
|
-
value: " "
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
title: t("Arrear Doc"),
|
|
6224
|
-
value: " "
|
|
6225
|
-
}] : [];
|
|
6226
|
-
const docDetails = [...standardDocs, ...arrearDoc];
|
|
6186
|
+
value: " ",
|
|
6187
|
+
link: doc.fileStoreId ? Digit.Utils.getFileUrl(doc.fileStoreId) : ""
|
|
6188
|
+
}));
|
|
6227
6189
|
details.push({
|
|
6228
6190
|
title: t("BPA_APPLICATION_DOCUMENTS"),
|
|
6229
6191
|
values: docDetails !== null && docDetails !== void 0 && docDetails.length ? docDetails : [{
|
|
@@ -6231,6 +6193,7 @@ const getAcknowledgementData = async (application, tenantInfo, t) => {
|
|
|
6231
6193
|
value: "NA"
|
|
6232
6194
|
}]
|
|
6233
6195
|
});
|
|
6196
|
+
const imageURL = application === null || application === void 0 ? void 0 : (_application$addition1 = application.additionalDetails) === null || _application$addition1 === void 0 ? void 0 : _application$addition1.propertyImage;
|
|
6234
6197
|
return {
|
|
6235
6198
|
t: t,
|
|
6236
6199
|
tenantId: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code,
|
|
@@ -6239,7 +6202,8 @@ const getAcknowledgementData = async (application, tenantInfo, t) => {
|
|
|
6239
6202
|
phoneNumber: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.contactNumber,
|
|
6240
6203
|
heading: t("Allotment letter for Rent and Lease Services"),
|
|
6241
6204
|
applicationNumber: (application === null || application === void 0 ? void 0 : application.applicationNumber) || "NA",
|
|
6242
|
-
details
|
|
6205
|
+
details,
|
|
6206
|
+
imageURL
|
|
6243
6207
|
};
|
|
6244
6208
|
};
|
|
6245
6209
|
|
|
@@ -6325,7 +6289,7 @@ var b = "function" === typeof Symbol && Symbol.for,
|
|
|
6325
6289
|
k = b ? Symbol.for("react.context") : 60110,
|
|
6326
6290
|
l = b ? Symbol.for("react.async_mode") : 60111,
|
|
6327
6291
|
m = b ? Symbol.for("react.concurrent_mode") : 60111,
|
|
6328
|
-
n
|
|
6292
|
+
n = b ? Symbol.for("react.forward_ref") : 60112,
|
|
6329
6293
|
p = b ? Symbol.for("react.suspense") : 60113,
|
|
6330
6294
|
q = b ? Symbol.for("react.suspense_list") : 60120,
|
|
6331
6295
|
r = b ? Symbol.for("react.memo") : 60115,
|
|
@@ -6350,7 +6314,7 @@ function z(a) {
|
|
|
6350
6314
|
default:
|
|
6351
6315
|
switch (a = a && a.$$typeof, a) {
|
|
6352
6316
|
case k:
|
|
6353
|
-
case n
|
|
6317
|
+
case n:
|
|
6354
6318
|
case t:
|
|
6355
6319
|
case r:
|
|
6356
6320
|
case h:
|
|
@@ -6372,7 +6336,7 @@ var ConcurrentMode = m;
|
|
|
6372
6336
|
var ContextConsumer = k;
|
|
6373
6337
|
var ContextProvider = h;
|
|
6374
6338
|
var Element = c;
|
|
6375
|
-
var ForwardRef = n
|
|
6339
|
+
var ForwardRef = n;
|
|
6376
6340
|
var Fragment = e;
|
|
6377
6341
|
var Lazy = t;
|
|
6378
6342
|
var Memo = r;
|
|
@@ -6394,7 +6358,7 @@ var isElement = function (a) {
|
|
|
6394
6358
|
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
6395
6359
|
};
|
|
6396
6360
|
var isForwardRef = function (a) {
|
|
6397
|
-
return z(a) === n
|
|
6361
|
+
return z(a) === n;
|
|
6398
6362
|
};
|
|
6399
6363
|
var isFragment = function (a) {
|
|
6400
6364
|
return z(a) === e;
|
|
@@ -6418,7 +6382,7 @@ var isSuspense = function (a) {
|
|
|
6418
6382
|
return z(a) === p;
|
|
6419
6383
|
};
|
|
6420
6384
|
var isValidElementType = function (a) {
|
|
6421
|
-
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n
|
|
6385
|
+
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
6422
6386
|
};
|
|
6423
6387
|
var typeOf = z;
|
|
6424
6388
|
var reactIs_production_min = {
|
|
@@ -7263,7 +7227,6 @@ const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, pdfFiles =
|
|
|
7263
7227
|
const formats = (downloadLink === null || downloadLink === void 0 ? void 0 : (_downloadLink$split = downloadLink.split(",")) === null || _downloadLink$split === void 0 ? void 0 : _downloadLink$split.filter(Boolean)) || [];
|
|
7264
7228
|
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]) || "";
|
|
7265
7229
|
};
|
|
7266
|
-
const pattern = /\[#\?.*?\*\*\]/;
|
|
7267
7230
|
const timelineRows = timeline.map((item, index) => {
|
|
7268
7231
|
var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$assigner2, _item$assigner3, _item$wfComment;
|
|
7269
7232
|
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";
|
|
@@ -7273,8 +7236,7 @@ const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, pdfFiles =
|
|
|
7273
7236
|
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";
|
|
7274
7237
|
const action = (item === null || item === void 0 ? void 0 : item.performedAction) || "N/A";
|
|
7275
7238
|
const status = (item === null || item === void 0 ? void 0 : item.status) || (item === null || item === void 0 ? void 0 : item.state) || "N/A";
|
|
7276
|
-
const
|
|
7277
|
-
const comment = typeof rawComment === "string" ? rawComment.split(pattern)[0] : rawComment;
|
|
7239
|
+
const comment = (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "-";
|
|
7278
7240
|
const documents = (item === null || item === void 0 ? void 0 : item.wfDocuments) || [];
|
|
7279
7241
|
const sla = (item === null || item === void 0 ? void 0 : item.sla) || "N/A";
|
|
7280
7242
|
const assignedTo = Array.isArray(item === null || item === void 0 ? void 0 : item.assignes) ? item.assignes.map(a => a === null || a === void 0 ? void 0 : a.name).filter(Boolean).join(", ") : "";
|
|
@@ -7528,13 +7490,13 @@ function NewApplicationTimeline({
|
|
|
7528
7490
|
className: "custom-officer-info"
|
|
7529
7491
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7530
7492
|
className: "custom-officer-name"
|
|
7531
|
-
}, (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.name) || t("CS_COMMON_NA"),
|
|
7532
|
-
className: "custom-officer-name"
|
|
7533
|
-
}, "- ", t(deptMap[item === null || item === void 0 ? void 0 : (_item$assigner4 = item.assigner) === null || _item$assigner4 === void 0 ? void 0 : _item$assigner4.userName]))), (item === null || item === void 0 ? void 0 : (_item$assigner5 = item.assigner) === null || _item$assigner5 === void 0 ? void 0 : _item$assigner5.emailId) && /*#__PURE__*/React.createElement("div", {
|
|
7493
|
+
}, (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.name) || t("CS_COMMON_NA")), (item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.emailId) && /*#__PURE__*/React.createElement("div", {
|
|
7534
7494
|
className: "custom-officer-email"
|
|
7535
7495
|
}, /*#__PURE__*/React.createElement("span", {
|
|
7536
7496
|
className: "custom-email-label"
|
|
7537
|
-
}, t("Email")), " ", item === null || item === void 0 ? void 0 : (_item$
|
|
7497
|
+
}, t("Email")), " ", item === null || item === void 0 ? void 0 : (_item$assigner4 = item.assigner) === null || _item$assigner4 === void 0 ? void 0 : _item$assigner4.emailId), deptMap[item === null || item === void 0 ? void 0 : (_item$assigner5 = item.assigner) === null || _item$assigner5 === void 0 ? void 0 : _item$assigner5.userName] && /*#__PURE__*/React.createElement("div", {
|
|
7498
|
+
className: "custom-officer-name"
|
|
7499
|
+
}, t(deptMap[item === null || item === void 0 ? void 0 : (_item$assigner6 = item.assigner) === null || _item$assigner6 === void 0 ? void 0 : _item$assigner6.userName])))), /*#__PURE__*/React.createElement("div", {
|
|
7538
7500
|
className: "custom-card-column custom-card-column-mid"
|
|
7539
7501
|
}, (item === null || item === void 0 ? void 0 : item.sla) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h3", {
|
|
7540
7502
|
className: "custom-action-title"
|
|
@@ -7556,13 +7518,9 @@ function NewApplicationTimeline({
|
|
|
7556
7518
|
className: "custom-comments-title"
|
|
7557
7519
|
}, t("Officer Comments")), /*#__PURE__*/React.createElement("div", {
|
|
7558
7520
|
className: "custom-comment-text"
|
|
7559
|
-
}, item === null || item === void 0 ? void 0 : (_item$wfComment3 = item.wfComment) === null || _item$wfComment3 === void 0 ? void 0 : _item$wfComment3.map((comment, idx) => {
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
return /*#__PURE__*/React.createElement("p", {
|
|
7563
|
-
key: idx
|
|
7564
|
-
}, truncatedComment);
|
|
7565
|
-
}))), (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", {
|
|
7521
|
+
}, 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", {
|
|
7522
|
+
key: idx
|
|
7523
|
+
}, comment)))), (item === null || item === void 0 ? void 0 : (_item$assignes = item.assignes) === null || _item$assignes === void 0 ? void 0 : _item$assignes.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
7566
7524
|
className: "custom-assigned-to-footer"
|
|
7567
7525
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
7568
7526
|
className: "custom-comments-title"
|
|
@@ -7570,9 +7528,9 @@ function NewApplicationTimeline({
|
|
|
7570
7528
|
className: "custom-officer-info"
|
|
7571
7529
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7572
7530
|
className: "custom-officer-name"
|
|
7573
|
-
}, (_item$assignes$ = item.assignes[0]) === null || _item$assignes$ === void 0 ? void 0 : _item$assignes$.name, deptMap[(_item$assignes$2 = item.assignes[0]) === null || _item$assignes$2 === void 0 ? void 0 : _item$assignes$2.userName] && /*#__PURE__*/React.createElement("
|
|
7531
|
+
}, (_item$assignes$ = item.assignes[0]) === null || _item$assignes$ === void 0 ? void 0 : _item$assignes$.name), deptMap[(_item$assignes$2 = item.assignes[0]) === null || _item$assignes$2 === void 0 ? void 0 : _item$assignes$2.userName] && /*#__PURE__*/React.createElement("div", {
|
|
7574
7532
|
className: "custom-officer-email"
|
|
7575
|
-
},
|
|
7533
|
+
}, t(deptMap[(_item$assignes$3 = item.assignes[0]) === null || _item$assignes$3 === void 0 ? void 0 : _item$assignes$3.userName]))))), (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", {
|
|
7576
7534
|
className: "custom-comments-section-no-border"
|
|
7577
7535
|
}, /*#__PURE__*/React.createElement("h4", {
|
|
7578
7536
|
className: "custom-comments-title"
|
|
@@ -7588,7 +7546,7 @@ function NewApplicationTimeline({
|
|
|
7588
7546
|
}
|
|
7589
7547
|
|
|
7590
7548
|
const RALApplicationDetails = () => {
|
|
7591
|
-
var _applicationData$Owne, _propertyDetails$fees, _propertyDetails$fees2, _propertyDetails$fees3, _propertyDetails$fees4;
|
|
7549
|
+
var _applicationData$Owne, _propertyDetails$fees, _propertyDetails$fees2, _propertyDetails$fees3, _propertyDetails$fees4, _applicationData$Docu;
|
|
7592
7550
|
const {
|
|
7593
7551
|
t
|
|
7594
7552
|
} = useTranslation();
|
|
@@ -7638,10 +7596,11 @@ const RALApplicationDetails = () => {
|
|
|
7638
7596
|
...applications
|
|
7639
7597
|
}, tenantInfo, t);
|
|
7640
7598
|
setTimeout(() => {
|
|
7641
|
-
Digit.Utils.pdf.
|
|
7599
|
+
Digit.Utils.pdf.generateFormatted(acknowldgementDataAPI);
|
|
7642
7600
|
setLoader(false);
|
|
7643
7601
|
}, 0);
|
|
7644
7602
|
} catch (error) {
|
|
7603
|
+
console.error("Error generating acknowledgement:", error);
|
|
7645
7604
|
setLoader(false);
|
|
7646
7605
|
}
|
|
7647
7606
|
};
|
|
@@ -7664,11 +7623,9 @@ const RALApplicationDetails = () => {
|
|
|
7664
7623
|
filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
|
|
7665
7624
|
};
|
|
7666
7625
|
} else {
|
|
7667
|
-
var _payments$Payments;
|
|
7668
7626
|
response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
7669
7627
|
Payments: [{
|
|
7670
|
-
...
|
|
7671
|
-
...applicationData
|
|
7628
|
+
...payments
|
|
7672
7629
|
}]
|
|
7673
7630
|
}, "rentandlease-receipt");
|
|
7674
7631
|
}
|
|
@@ -7711,21 +7668,8 @@ const RALApplicationDetails = () => {
|
|
|
7711
7668
|
const getDate = epoch => {
|
|
7712
7669
|
return Digit.DateUtils.ConvertEpochToDate(epoch);
|
|
7713
7670
|
};
|
|
7714
|
-
const tValue = value => {
|
|
7715
|
-
if (value === 0 || value === "0") return "0";
|
|
7716
|
-
if (!value) return t("CS_NA");
|
|
7717
|
-
if (typeof value === "object" && value !== null) {
|
|
7718
|
-
return t((value === null || value === void 0 ? void 0 : value.name) || (value === null || value === void 0 ? void 0 : value.code) || "CS_NA");
|
|
7719
|
-
}
|
|
7720
|
-
return t(value);
|
|
7721
|
-
};
|
|
7722
7671
|
const rawAdditionalDetails = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.additionalDetails) || {};
|
|
7723
|
-
const propertyDetails = Array.isArray(rawAdditionalDetails
|
|
7724
|
-
const arrearDoc = rawAdditionalDetails !== null && rawAdditionalDetails !== void 0 && rawAdditionalDetails.arrearDoc ? [{
|
|
7725
|
-
documentType: "Arrear Doc",
|
|
7726
|
-
fileStoreId: rawAdditionalDetails.arrearDoc
|
|
7727
|
-
}] : [];
|
|
7728
|
-
const allDocuments = [...((applicationData === null || applicationData === void 0 ? void 0 : applicationData.Document) || []), ...arrearDoc];
|
|
7672
|
+
const propertyDetails = Array.isArray(rawAdditionalDetails) ? rawAdditionalDetails[0] : rawAdditionalDetails;
|
|
7729
7673
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
7730
7674
|
className: "cardHeaderWithOptions ral-app-details-header"
|
|
7731
7675
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
@@ -7746,19 +7690,19 @@ const RALApplicationDetails = () => {
|
|
|
7746
7690
|
className: "ral-app-details-owner-header"
|
|
7747
7691
|
}, t("RAL_APPLICANT"), " ", index + 1), /*#__PURE__*/React.createElement(Row, {
|
|
7748
7692
|
label: t("PT_OWNERSHIP_INFO_NAME"),
|
|
7749
|
-
text:
|
|
7693
|
+
text: (owner === null || owner === void 0 ? void 0 : owner.name) || t("CS_NA")
|
|
7750
7694
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7751
7695
|
label: t("CORE_COMMON_PROFILE_EMAIL"),
|
|
7752
|
-
text:
|
|
7696
|
+
text: (owner === null || owner === void 0 ? void 0 : owner.emailId) || t("CS_NA")
|
|
7753
7697
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7754
7698
|
label: t("CORE_MOBILE_NUMBER"),
|
|
7755
|
-
text:
|
|
7699
|
+
text: (owner === null || owner === void 0 ? void 0 : owner.mobileNo) || t("CS_NA")
|
|
7756
7700
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7757
7701
|
label: t("PT_COMMON_COL_ADDRESS"),
|
|
7758
|
-
text:
|
|
7702
|
+
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")
|
|
7759
7703
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7760
7704
|
label: t("CORE_COMMON_PINCODE"),
|
|
7761
|
-
text:
|
|
7705
|
+
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")
|
|
7762
7706
|
}));
|
|
7763
7707
|
}) : /*#__PURE__*/React.createElement(Row, {
|
|
7764
7708
|
label: t("OWNER"),
|
|
@@ -7767,83 +7711,66 @@ const RALApplicationDetails = () => {
|
|
|
7767
7711
|
className: "ral-card-subheader-24"
|
|
7768
7712
|
}, t("ES_TITILE_PROPERTY_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
7769
7713
|
label: t("APPLICATION_NUMBER"),
|
|
7770
|
-
text:
|
|
7714
|
+
text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationNumber) || t("CS_NA")
|
|
7771
7715
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7772
7716
|
label: t("RENT_LEASE_PROPERTY_ID"),
|
|
7773
|
-
text:
|
|
7717
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyId) || t("CS_NA")
|
|
7774
7718
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7775
7719
|
label: t("RENT_LEASE_PROPERTY_NAME"),
|
|
7776
|
-
text:
|
|
7720
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyName) || t("CS_NA")
|
|
7777
7721
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7778
7722
|
label: t("RAL_ALLOTMENT_TYPE"),
|
|
7779
|
-
text:
|
|
7723
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.allotmentType) || t("CS_NA")
|
|
7780
7724
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7781
7725
|
label: t("RENT_LEASE_PROPERTY_TYPE"),
|
|
7782
|
-
text:
|
|
7726
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyType) || t("CS_NA")
|
|
7783
7727
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7784
7728
|
label: t("WS_PROPERTY_ADDRESS_LABEL"),
|
|
7785
|
-
text:
|
|
7729
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address) || t("CS_NA")
|
|
7786
7730
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7787
7731
|
label: t("RAL_PROPERTY_AMOUNT"),
|
|
7788
|
-
text:
|
|
7732
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.baseRent) || t("CS_NA")
|
|
7789
7733
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7790
7734
|
label: t("PENALTY_TYPE"),
|
|
7791
|
-
text:
|
|
7735
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.penaltyType) || t("CS_NA")
|
|
7792
7736
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7793
7737
|
label: t("RAL_FEE_CYCLE"),
|
|
7794
|
-
text:
|
|
7738
|
+
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")
|
|
7795
7739
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7796
7740
|
label: t("PROPERTY_SIZE"),
|
|
7797
|
-
text:
|
|
7741
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertySizeOrArea) || t("CS_NA")
|
|
7798
7742
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7799
7743
|
label: t("RENT_LEASE_LOCATION_TYPE"),
|
|
7800
|
-
text:
|
|
7744
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.locationType) || t("CS_NA")
|
|
7801
7745
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7802
7746
|
label: t("RAL_START_DATE"),
|
|
7803
|
-
text:
|
|
7747
|
+
text: getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.startDate) || t("CS_NA")
|
|
7804
7748
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
7805
7749
|
label: t("RAL_END_DATE"),
|
|
7806
|
-
text:
|
|
7750
|
+
text: getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.endDate) || t("CS_NA")
|
|
7807
7751
|
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) > 0 && /*#__PURE__*/React.createElement(Row, {
|
|
7808
7752
|
label: t("RAL_PROPERTY_PENALTY"),
|
|
7809
|
-
text:
|
|
7810
|
-
}),
|
|
7753
|
+
text: applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted
|
|
7754
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
7811
7755
|
label: t("SECURITY_DEPOSIT"),
|
|
7812
|
-
text:
|
|
7756
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit) || t("CS_NA")
|
|
7813
7757
|
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) - (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit) > 0 && /*#__PURE__*/React.createElement(Row, {
|
|
7814
7758
|
label: t("RAL_AMOUNT_TO_TAKE_FROM_CITIZEN"),
|
|
7815
|
-
text:
|
|
7759
|
+
text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) - (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit)
|
|
7816
7760
|
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund) > 0 && /*#__PURE__*/React.createElement(Row, {
|
|
7817
7761
|
label: t("RAL_AMOUNT_TO_REFUND"),
|
|
7818
|
-
text:
|
|
7762
|
+
text: applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund
|
|
7819
7763
|
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) && /*#__PURE__*/React.createElement(Row, {
|
|
7820
7764
|
label: t("RENT_LEASE_TRADE_LICENSE_NUMBER"),
|
|
7821
|
-
text:
|
|
7822
|
-
})),
|
|
7823
|
-
className: "ral-card-subheader-24"
|
|
7824
|
-
}, t("RAL_ARREAR_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
7825
|
-
label: t("Arrears"),
|
|
7826
|
-
text: tValue(rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.arrear)
|
|
7827
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
7828
|
-
label: t("RAL_START_DATE"),
|
|
7829
|
-
text: rawAdditionalDetails !== null && rawAdditionalDetails !== void 0 && rawAdditionalDetails.arrearStartDate ? getDate(rawAdditionalDetails.arrearStartDate) : t("CS_NA")
|
|
7830
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
7831
|
-
label: t("RAL_END_DATE"),
|
|
7832
|
-
text: rawAdditionalDetails !== null && rawAdditionalDetails !== void 0 && rawAdditionalDetails.arrearEndDate ? getDate(rawAdditionalDetails.arrearEndDate) : t("CS_NA")
|
|
7833
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
7834
|
-
label: t("Reason"),
|
|
7835
|
-
text: tValue(rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.arrearReason)
|
|
7836
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
7837
|
-
label: t("Remarks"),
|
|
7838
|
-
text: tValue(rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.remarks)
|
|
7839
|
-
}))), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
7765
|
+
text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) || t("CS_NA")
|
|
7766
|
+
})), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
7840
7767
|
className: "ral-card-subheader-24-margin"
|
|
7841
7768
|
}, t("CS_COMMON_DOCUMENTS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Card, {
|
|
7842
7769
|
className: "ral-app-details-docs-card"
|
|
7843
|
-
}, (
|
|
7770
|
+
}, (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$Docu = applicationData.Document) === null || _applicationData$Docu === void 0 ? void 0 : _applicationData$Docu.length) > 0 ? applicationData.Document.map((doc, index) => /*#__PURE__*/React.createElement("div", {
|
|
7844
7771
|
key: index
|
|
7845
7772
|
}, /*#__PURE__*/React.createElement(RALDocuments, {
|
|
7846
|
-
value:
|
|
7773
|
+
value: applicationData.Document,
|
|
7847
7774
|
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
7848
7775
|
index: index
|
|
7849
7776
|
}), t(doc === null || doc === void 0 ? void 0 : doc.documentType))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
@@ -8248,8 +8175,8 @@ const DesktopInbox = ({
|
|
|
8248
8175
|
Cell: ({
|
|
8249
8176
|
row
|
|
8250
8177
|
}) => {
|
|
8251
|
-
var _row$original4, _row$original4$search, _row$original4$search2, _row$original4$search3
|
|
8252
|
-
return GetCell(`${(_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : (_row$original4$search = _row$original4.searchData) === null || _row$original4$search === void 0 ? void 0 : (_row$original4$search2 = _row$original4$search.additionalDetails) === null || _row$original4$search2 === void 0 ? void 0 : (_row$original4$search3 = _row$original4$search2
|
|
8178
|
+
var _row$original4, _row$original4$search, _row$original4$search2, _row$original4$search3;
|
|
8179
|
+
return GetCell(`${(_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : (_row$original4$search = _row$original4.searchData) === null || _row$original4$search === void 0 ? void 0 : (_row$original4$search2 = _row$original4$search.additionalDetails) === null || _row$original4$search2 === void 0 ? void 0 : (_row$original4$search3 = _row$original4$search2[0]) === null || _row$original4$search3 === void 0 ? void 0 : _row$original4$search3["propertyName"]}`);
|
|
8253
8180
|
},
|
|
8254
8181
|
mobileCell: original => {
|
|
8255
8182
|
var _original$searchData2, _original$searchData3, _original$searchData4;
|
|
@@ -8261,11 +8188,11 @@ const DesktopInbox = ({
|
|
|
8261
8188
|
row
|
|
8262
8189
|
}) => {
|
|
8263
8190
|
var _row$original5, _row$original5$search, _row$original5$search2, _row$original5$search3;
|
|
8264
|
-
return GetCell(`${(_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : (_row$original5$search = _row$original5.searchData) === null || _row$original5$search === void 0 ? void 0 : (_row$original5$search2 = _row$original5$search.additionalDetails) === null || _row$original5$search2 === void 0 ? void 0 : (_row$original5$search3 = _row$original5$search2
|
|
8191
|
+
return GetCell(`${(_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : (_row$original5$search = _row$original5.searchData) === null || _row$original5$search === void 0 ? void 0 : (_row$original5$search2 = _row$original5$search.additionalDetails) === null || _row$original5$search2 === void 0 ? void 0 : (_row$original5$search3 = _row$original5$search2[0]) === null || _row$original5$search3 === void 0 ? void 0 : _row$original5$search3["allotmentType"]}`);
|
|
8265
8192
|
},
|
|
8266
8193
|
mobileCell: original => {
|
|
8267
8194
|
var _original$searchData5, _original$searchData6, _original$searchData7;
|
|
8268
|
-
return GetMobCell(`${original === null || original === void 0 ? void 0 : (_original$searchData5 = original.searchData) === null || _original$searchData5 === void 0 ? void 0 : (_original$searchData6 = _original$searchData5.additionalDetails) === null || _original$searchData6 === void 0 ? void 0 : (_original$searchData7 = _original$searchData6
|
|
8195
|
+
return GetMobCell(`${original === null || original === void 0 ? void 0 : (_original$searchData5 = original.searchData) === null || _original$searchData5 === void 0 ? void 0 : (_original$searchData6 = _original$searchData5.additionalDetails) === null || _original$searchData6 === void 0 ? void 0 : (_original$searchData7 = _original$searchData6[0]) === null || _original$searchData7 === void 0 ? void 0 : _original$searchData7["allotmentType"]}`);
|
|
8269
8196
|
}
|
|
8270
8197
|
}, {
|
|
8271
8198
|
Header: t("RENT_AMOUNT "),
|
|
@@ -8273,11 +8200,11 @@ const DesktopInbox = ({
|
|
|
8273
8200
|
row
|
|
8274
8201
|
}) => {
|
|
8275
8202
|
var _row$original6, _row$original6$search, _row$original6$search2, _row$original6$search3;
|
|
8276
|
-
return GetCell(`${(_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : (_row$original6$search = _row$original6.searchData) === null || _row$original6$search === void 0 ? void 0 : (_row$original6$search2 = _row$original6$search.additionalDetails) === null || _row$original6$search2 === void 0 ? void 0 : (_row$original6$search3 = _row$original6$search2
|
|
8203
|
+
return GetCell(`${(_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : (_row$original6$search = _row$original6.searchData) === null || _row$original6$search === void 0 ? void 0 : (_row$original6$search2 = _row$original6$search.additionalDetails) === null || _row$original6$search2 === void 0 ? void 0 : (_row$original6$search3 = _row$original6$search2[0]) === null || _row$original6$search3 === void 0 ? void 0 : _row$original6$search3["baseRent"]}`);
|
|
8277
8204
|
},
|
|
8278
8205
|
mobileCell: original => {
|
|
8279
8206
|
var _original$searchData8, _original$searchData9, _original$searchData0;
|
|
8280
|
-
return GetMobCell(original === null || original === void 0 ? void 0 : (_original$searchData8 = original.searchData) === null || _original$searchData8 === void 0 ? void 0 : (_original$searchData9 = _original$searchData8.additionalDetails) === null || _original$searchData9 === void 0 ? void 0 : (_original$searchData0 = _original$searchData9
|
|
8207
|
+
return GetMobCell(original === null || original === void 0 ? void 0 : (_original$searchData8 = original.searchData) === null || _original$searchData8 === void 0 ? void 0 : (_original$searchData9 = _original$searchData8.additionalDetails) === null || _original$searchData9 === void 0 ? void 0 : (_original$searchData0 = _original$searchData9[0]) === null || _original$searchData0 === void 0 ? void 0 : _original$searchData0["baseRent"]) || "-";
|
|
8281
8208
|
}
|
|
8282
8209
|
}, {
|
|
8283
8210
|
Header: t("CS_CREATED_DATE"),
|
|
@@ -8583,19 +8510,19 @@ const MobileInbox = ({
|
|
|
8583
8510
|
Header: t("RENT_LEASE_PROPERTY_NAME"),
|
|
8584
8511
|
mobileCell: original => {
|
|
8585
8512
|
var _original$searchData2, _original$searchData3, _original$searchData4;
|
|
8586
|
-
return GetMobCell(original === null || original === void 0 ? void 0 : (_original$searchData2 = original.searchData) === null || _original$searchData2 === void 0 ? void 0 : (_original$searchData3 = _original$searchData2.additionalDetails) === null || _original$searchData3 === void 0 ? void 0 : (_original$searchData4 = _original$searchData3
|
|
8513
|
+
return GetMobCell(original === null || original === void 0 ? void 0 : (_original$searchData2 = original.searchData) === null || _original$searchData2 === void 0 ? void 0 : (_original$searchData3 = _original$searchData2.additionalDetails) === null || _original$searchData3 === void 0 ? void 0 : (_original$searchData4 = _original$searchData3[0]) === null || _original$searchData4 === void 0 ? void 0 : _original$searchData4["propertyName"]);
|
|
8587
8514
|
}
|
|
8588
8515
|
}, {
|
|
8589
8516
|
Header: t("RAL_ALLOTMENT_TYPE"),
|
|
8590
8517
|
mobileCell: original => {
|
|
8591
8518
|
var _original$searchData5, _original$searchData6, _original$searchData7;
|
|
8592
|
-
return GetMobCell(original === null || original === void 0 ? void 0 : (_original$searchData5 = original.searchData) === null || _original$searchData5 === void 0 ? void 0 : (_original$searchData6 = _original$searchData5.additionalDetails) === null || _original$searchData6 === void 0 ? void 0 : (_original$searchData7 = _original$searchData6
|
|
8519
|
+
return GetMobCell(original === null || original === void 0 ? void 0 : (_original$searchData5 = original.searchData) === null || _original$searchData5 === void 0 ? void 0 : (_original$searchData6 = _original$searchData5.additionalDetails) === null || _original$searchData6 === void 0 ? void 0 : (_original$searchData7 = _original$searchData6[0]) === null || _original$searchData7 === void 0 ? void 0 : _original$searchData7["allotmentType"]);
|
|
8593
8520
|
}
|
|
8594
8521
|
}, {
|
|
8595
8522
|
Header: t("RENT_AMOUNT "),
|
|
8596
8523
|
mobileCell: original => {
|
|
8597
8524
|
var _original$searchData8, _original$searchData9, _original$searchData0;
|
|
8598
|
-
return GetMobCell((original === null || original === void 0 ? void 0 : (_original$searchData8 = original.searchData) === null || _original$searchData8 === void 0 ? void 0 : (_original$searchData9 = _original$searchData8.additionalDetails) === null || _original$searchData9 === void 0 ? void 0 : (_original$searchData0 = _original$searchData9
|
|
8525
|
+
return GetMobCell((original === null || original === void 0 ? void 0 : (_original$searchData8 = original.searchData) === null || _original$searchData8 === void 0 ? void 0 : (_original$searchData9 = _original$searchData8.additionalDetails) === null || _original$searchData9 === void 0 ? void 0 : (_original$searchData0 = _original$searchData9[0]) === null || _original$searchData0 === void 0 ? void 0 : _original$searchData0["baseRent"]) || "-");
|
|
8599
8526
|
}
|
|
8600
8527
|
}, {
|
|
8601
8528
|
Header: t("CS_CREATED_DATE"),
|
|
@@ -9218,7 +9145,7 @@ const RALModal = ({
|
|
|
9218
9145
|
};
|
|
9219
9146
|
|
|
9220
9147
|
const RALApplicationDetails$1 = () => {
|
|
9221
|
-
var _workflowDetails$data, _user$info, _user$info$roles, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _actions, _actions2, _applicationData$Owne, _propertyDetails$fees, _propertyDetails$fees2, _propertyDetails$fees3, _propertyDetails$fees4, _actions3, _workflowDetails$data7;
|
|
9148
|
+
var _workflowDetails$data, _user$info, _user$info$roles, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _actions, _actions2, _applicationData$Owne, _propertyDetails$fees, _propertyDetails$fees2, _propertyDetails$fees3, _propertyDetails$fees4, _applicationData$Docu2, _actions3, _workflowDetails$data7;
|
|
9222
9149
|
const {
|
|
9223
9150
|
t
|
|
9224
9151
|
} = useTranslation();
|
|
@@ -9270,6 +9197,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
9270
9197
|
moduleCode: "RENT_N_LEASE_NEW",
|
|
9271
9198
|
role: "EMPLOYEE"
|
|
9272
9199
|
});
|
|
9200
|
+
console.log("workflowDetails", workflowDetails);
|
|
9273
9201
|
if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data = workflowDetails.data) !== null && _workflowDetails$data !== void 0 && _workflowDetails$data.actionState && !workflowDetails.isLoading) {
|
|
9274
9202
|
workflowDetails.data.actionState.nextActions = workflowDetails.data.nextActions;
|
|
9275
9203
|
}
|
|
@@ -9280,12 +9208,7 @@ const RALApplicationDetails$1 = () => {
|
|
|
9280
9208
|
return () => clearTimeout(timer);
|
|
9281
9209
|
};
|
|
9282
9210
|
const rawAdditionalDetails = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.additionalDetails) || {};
|
|
9283
|
-
const propertyDetails = Array.isArray(rawAdditionalDetails
|
|
9284
|
-
const arrearDoc = rawAdditionalDetails !== null && rawAdditionalDetails !== void 0 && rawAdditionalDetails.arrearDoc ? [{
|
|
9285
|
-
documentType: "Arrear Doc",
|
|
9286
|
-
fileStoreId: rawAdditionalDetails.arrearDoc
|
|
9287
|
-
}] : [];
|
|
9288
|
-
const allDocuments = [...((applicationData === null || applicationData === void 0 ? void 0 : applicationData.Document) || []), ...arrearDoc];
|
|
9211
|
+
const propertyDetails = Array.isArray(rawAdditionalDetails) ? rawAdditionalDetails[0] : rawAdditionalDetails;
|
|
9289
9212
|
let user = Digit.UserService.getUser();
|
|
9290
9213
|
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);
|
|
9291
9214
|
let actions = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : (_workflowDetails$data3 = _workflowDetails$data2.actionState) === null || _workflowDetails$data3 === void 0 ? void 0 : (_workflowDetails$data4 = _workflowDetails$data3.nextActions) === null || _workflowDetails$data4 === void 0 ? void 0 : _workflowDetails$data4.filter(e => {
|
|
@@ -9327,14 +9250,6 @@ const RALApplicationDetails$1 = () => {
|
|
|
9327
9250
|
const getDate = epoch => {
|
|
9328
9251
|
return Digit.DateUtils.ConvertEpochToDate(epoch);
|
|
9329
9252
|
};
|
|
9330
|
-
const tValue = value => {
|
|
9331
|
-
if (value === 0 || value === "0") return "0";
|
|
9332
|
-
if (!value) return t("CS_NA");
|
|
9333
|
-
if (typeof value === "object" && value !== null) {
|
|
9334
|
-
return t((value === null || value === void 0 ? void 0 : value.name) || (value === null || value === void 0 ? void 0 : value.code) || "CS_NA");
|
|
9335
|
-
}
|
|
9336
|
-
return t(value);
|
|
9337
|
-
};
|
|
9338
9253
|
function onActionSelect(action) {
|
|
9339
9254
|
var _ref, _action$state, _filterRoles$;
|
|
9340
9255
|
const payload = {
|
|
@@ -9533,19 +9448,19 @@ const RALApplicationDetails$1 = () => {
|
|
|
9533
9448
|
className: "ral-app-details-owner-header"
|
|
9534
9449
|
}, t("RAL_APPLICANT"), " ", index + 1), /*#__PURE__*/React.createElement(Row, {
|
|
9535
9450
|
label: t("PT_OWNERSHIP_INFO_NAME"),
|
|
9536
|
-
text:
|
|
9451
|
+
text: (owner === null || owner === void 0 ? void 0 : owner.name) || t("CS_NA")
|
|
9537
9452
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9538
9453
|
label: t("CORE_COMMON_PROFILE_EMAIL"),
|
|
9539
|
-
text:
|
|
9454
|
+
text: (owner === null || owner === void 0 ? void 0 : owner.emailId) || t("CS_NA")
|
|
9540
9455
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9541
9456
|
label: t("CORE_MOBILE_NUMBER"),
|
|
9542
|
-
text:
|
|
9457
|
+
text: (owner === null || owner === void 0 ? void 0 : owner.mobileNo) || t("CS_NA")
|
|
9543
9458
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9544
9459
|
label: t("PT_COMMON_COL_ADDRESS"),
|
|
9545
|
-
text:
|
|
9460
|
+
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")
|
|
9546
9461
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9547
9462
|
label: t("CORE_COMMON_PINCODE"),
|
|
9548
|
-
text:
|
|
9463
|
+
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")
|
|
9549
9464
|
}));
|
|
9550
9465
|
}) : /*#__PURE__*/React.createElement(Row, {
|
|
9551
9466
|
label: t("OWNER"),
|
|
@@ -9554,86 +9469,69 @@ const RALApplicationDetails$1 = () => {
|
|
|
9554
9469
|
className: "ral-card-subheader-24"
|
|
9555
9470
|
}, t("ES_TITILE_PROPERTY_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, (applicationData === null || applicationData === void 0 ? void 0 : applicationData.registrationNumber) && /*#__PURE__*/React.createElement(Row, {
|
|
9556
9471
|
label: t("RAL_REGISTRATION_NUMBER"),
|
|
9557
|
-
text:
|
|
9472
|
+
text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.registrationNumber) || t("CS_NA")
|
|
9558
9473
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9559
9474
|
label: t("APPLICATION_NUMBER"),
|
|
9560
|
-
text:
|
|
9475
|
+
text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationNumber) || t("CS_NA")
|
|
9561
9476
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9562
9477
|
label: t("RENT_LEASE_PROPERTY_ID"),
|
|
9563
|
-
text:
|
|
9478
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyId) || t("CS_NA")
|
|
9564
9479
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9565
9480
|
label: t("RENT_LEASE_PROPERTY_NAME"),
|
|
9566
|
-
text:
|
|
9481
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyName) || t("CS_NA")
|
|
9567
9482
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9568
9483
|
label: t("RAL_ALLOTMENT_TYPE"),
|
|
9569
|
-
text:
|
|
9484
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.allotmentType) || t("CS_NA")
|
|
9570
9485
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9571
9486
|
label: t("RENT_LEASE_PROPERTY_TYPE"),
|
|
9572
|
-
text:
|
|
9487
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyType) || t("CS_NA")
|
|
9573
9488
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9574
9489
|
label: t("WS_PROPERTY_ADDRESS_LABEL"),
|
|
9575
|
-
text:
|
|
9490
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address) || t("CS_NA")
|
|
9576
9491
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9577
9492
|
label: t("RAL_PROPERTY_AMOUNT"),
|
|
9578
|
-
text:
|
|
9493
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.baseRent) || t("CS_NA")
|
|
9579
9494
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9580
9495
|
label: t("PENALTY_TYPE"),
|
|
9581
|
-
text:
|
|
9496
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.penaltyType) || t("CS_NA")
|
|
9582
9497
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9583
9498
|
label: t("RAL_FEE_CYCLE"),
|
|
9584
|
-
text:
|
|
9499
|
+
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")
|
|
9585
9500
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9586
9501
|
label: t("PROPERTY_SIZE"),
|
|
9587
|
-
text:
|
|
9502
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertySizeOrArea) || t("CS_NA")
|
|
9588
9503
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9589
9504
|
label: t("RENT_LEASE_LOCATION_TYPE"),
|
|
9590
|
-
text:
|
|
9505
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.locationType) || t("CS_NA")
|
|
9591
9506
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9592
9507
|
label: t("RAL_START_DATE"),
|
|
9593
|
-
text:
|
|
9508
|
+
text: getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.startDate) || t("CS_NA")
|
|
9594
9509
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
9595
9510
|
label: t("RAL_END_DATE"),
|
|
9596
|
-
text:
|
|
9511
|
+
text: getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.endDate) || t("CS_NA")
|
|
9597
9512
|
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) > 0 && /*#__PURE__*/React.createElement(Row, {
|
|
9598
9513
|
label: t("RAL_PROPERTY_PENALTY"),
|
|
9599
|
-
text:
|
|
9600
|
-
}),
|
|
9514
|
+
text: applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted
|
|
9515
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
9601
9516
|
label: t("SECURITY_DEPOSIT"),
|
|
9602
|
-
text:
|
|
9517
|
+
text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit) || t("CS_NA")
|
|
9603
9518
|
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) - (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit) > 0 && /*#__PURE__*/React.createElement(Row, {
|
|
9604
9519
|
label: t("RAL_AMOUNT_TO_TAKE_FROM_CITIZEN"),
|
|
9605
|
-
text:
|
|
9520
|
+
text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) - (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit)
|
|
9606
9521
|
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund) > 0 && /*#__PURE__*/React.createElement(Row, {
|
|
9607
9522
|
label: t("RAL_AMOUNT_TO_REFUND"),
|
|
9608
|
-
text:
|
|
9523
|
+
text: applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund
|
|
9609
9524
|
}), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) && /*#__PURE__*/React.createElement(Row, {
|
|
9610
9525
|
label: t("RENT_LEASE_TRADE_LICENSE_NUMBER"),
|
|
9611
|
-
text:
|
|
9612
|
-
})),
|
|
9613
|
-
className: "ral-card-subheader-24"
|
|
9614
|
-
}, t("RAL_ARREAR_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
9615
|
-
label: t("Arrears"),
|
|
9616
|
-
text: tValue(rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.arrear)
|
|
9617
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
9618
|
-
label: t("RAL_START_DATE"),
|
|
9619
|
-
text: rawAdditionalDetails !== null && rawAdditionalDetails !== void 0 && rawAdditionalDetails.arrearStartDate ? getDate(rawAdditionalDetails.arrearStartDate) : t("CS_NA")
|
|
9620
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
9621
|
-
label: t("RAL_END_DATE"),
|
|
9622
|
-
text: rawAdditionalDetails !== null && rawAdditionalDetails !== void 0 && rawAdditionalDetails.arrearEndDate ? getDate(rawAdditionalDetails.arrearEndDate) : t("CS_NA")
|
|
9623
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
9624
|
-
label: t("Reason"),
|
|
9625
|
-
text: tValue(rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.arrearReason)
|
|
9626
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
9627
|
-
label: t("Remarks"),
|
|
9628
|
-
text: tValue(rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.remarks)
|
|
9629
|
-
}))), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
9526
|
+
text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) || t("CS_NA")
|
|
9527
|
+
})), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
9630
9528
|
className: "ral-card-subheader-24-margin"
|
|
9631
9529
|
}, t("CS_COMMON_DOCUMENTS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Card, {
|
|
9632
9530
|
className: "ral-app-details-docs-card"
|
|
9633
|
-
}, (
|
|
9531
|
+
}, (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", {
|
|
9634
9532
|
key: index
|
|
9635
9533
|
}, /*#__PURE__*/React.createElement(RALDocuments, {
|
|
9636
|
-
value:
|
|
9534
|
+
value: applicationData.Document,
|
|
9637
9535
|
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
9638
9536
|
index: index
|
|
9639
9537
|
}), t(doc === null || doc === void 0 ? void 0 : doc.documentType))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
@@ -9689,40 +9587,12 @@ const RALApplicationDetails$1 = () => {
|
|
|
9689
9587
|
}));
|
|
9690
9588
|
};
|
|
9691
9589
|
|
|
9692
|
-
const RALBreadCrumbs = ({
|
|
9693
|
-
location,
|
|
9694
|
-
t
|
|
9695
|
-
}) => {
|
|
9696
|
-
const crumbs = [{
|
|
9697
|
-
path: "/digit-ui/employee",
|
|
9698
|
-
content: t("ES_COMMON_HOME"),
|
|
9699
|
-
show: true
|
|
9700
|
-
}, {
|
|
9701
|
-
path: "/digit-ui/employee/rentandlease/inbox",
|
|
9702
|
-
content: t("CS_COMMON_INBOX"),
|
|
9703
|
-
show: location.pathname.includes("/rentandlease/inbox") || location.pathname.includes("/rentAndLease/inbox") ? true : false
|
|
9704
|
-
}, {
|
|
9705
|
-
path: "/digit-ui/employee/rentandlease/allot-property",
|
|
9706
|
-
content: "Allot Property",
|
|
9707
|
-
show: location.pathname.includes("/rentandlease/allot-property") || location.pathname.includes("/rentAndLease/allot-property") ? true : false
|
|
9708
|
-
}, {
|
|
9709
|
-
path: "/digit-ui/employee/rentandlease/property",
|
|
9710
|
-
content: "Application Overview",
|
|
9711
|
-
show: location.pathname.includes("/rentandlease/property") || location.pathname.includes("/rentAndLease/property") ? true : false
|
|
9712
|
-
}];
|
|
9713
|
-
return /*#__PURE__*/React.createElement(BreadCrumb, {
|
|
9714
|
-
crumbs: crumbs
|
|
9715
|
-
});
|
|
9716
|
-
};
|
|
9717
9590
|
const EmployeeApp = ({
|
|
9718
9591
|
path,
|
|
9719
9592
|
url,
|
|
9720
9593
|
userType
|
|
9721
9594
|
}) => {
|
|
9722
9595
|
var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi;
|
|
9723
|
-
const {
|
|
9724
|
-
t
|
|
9725
|
-
} = useTranslation();
|
|
9726
9596
|
const location = useLocation();
|
|
9727
9597
|
const inboxInitialState = {
|
|
9728
9598
|
searchParams: {
|
|
@@ -9730,22 +9600,23 @@ const EmployeeApp = ({
|
|
|
9730
9600
|
code: "ASSIGNED_TO_ALL",
|
|
9731
9601
|
name: "ES_INBOX_ASSIGNED_TO_ALL"
|
|
9732
9602
|
},
|
|
9733
|
-
services: ["RENT_N_LEASE_NEW"
|
|
9603
|
+
services: ["RENT_N_LEASE_NEW"],
|
|
9734
9604
|
applicationStatus: [],
|
|
9735
9605
|
locality: []
|
|
9736
9606
|
}
|
|
9737
9607
|
};
|
|
9738
9608
|
const NewRentAndLeaseStepperForm = (_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ComponentRegis = _Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent("NewRentAndLeaseStepperForm");
|
|
9739
9609
|
const RALResponse = (_Digit2 = Digit) === null || _Digit2 === void 0 ? void 0 : (_Digit2$ComponentRegi = _Digit2.ComponentRegistryService) === null || _Digit2$ComponentRegi === void 0 ? void 0 : _Digit2$ComponentRegi.getComponent("RALResponse");
|
|
9740
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
9610
|
+
return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
9741
9611
|
className: "ground-container"
|
|
9742
9612
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9743
9613
|
style: {
|
|
9744
|
-
marginLeft: "
|
|
9614
|
+
marginLeft: "-4px",
|
|
9615
|
+
display: "flex",
|
|
9616
|
+
alignItems: "center"
|
|
9745
9617
|
}
|
|
9746
|
-
}, /*#__PURE__*/React.createElement(
|
|
9747
|
-
location: location
|
|
9748
|
-
t: t
|
|
9618
|
+
}, /*#__PURE__*/React.createElement(BackButton, {
|
|
9619
|
+
location: location
|
|
9749
9620
|
})), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
9750
9621
|
exact: true,
|
|
9751
9622
|
path: `${path}/`,
|
|
@@ -9758,7 +9629,7 @@ const EmployeeApp = ({
|
|
|
9758
9629
|
component: () => /*#__PURE__*/React.createElement(Inbox, {
|
|
9759
9630
|
useNewInboxAPI: true,
|
|
9760
9631
|
parentRoute: path,
|
|
9761
|
-
businessService: "RENT_N_LEASE_NEW
|
|
9632
|
+
businessService: "RENT_N_LEASE_NEW",
|
|
9762
9633
|
moduleCode: "RAL",
|
|
9763
9634
|
filterComponent: "RAL_INBOX_FILTER",
|
|
9764
9635
|
initialStates: inboxInitialState,
|
|
@@ -9773,7 +9644,7 @@ const EmployeeApp = ({
|
|
|
9773
9644
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
9774
9645
|
path: `${path}/response/:applicationNumber`,
|
|
9775
9646
|
component: RALResponse
|
|
9776
|
-
})));
|
|
9647
|
+
}))));
|
|
9777
9648
|
};
|
|
9778
9649
|
|
|
9779
9650
|
const UPDATE_RENTANDLEASE_NEW_APPLICATION_FORMType = "UPDATE_RENTANDLEASE_NEW_APPLICATION_FORM";
|
|
@@ -10442,1086 +10313,29 @@ const NewRentAndLeaseStepperForm = ({
|
|
|
10442
10313
|
}));
|
|
10443
10314
|
};
|
|
10444
10315
|
|
|
10445
|
-
var exif = createCommonjsModule(function (module, exports) {
|
|
10446
|
-
(function () {
|
|
10447
|
-
var debug = false;
|
|
10448
|
-
var EXIF = function (obj) {
|
|
10449
|
-
if (obj instanceof EXIF) return obj;
|
|
10450
|
-
if (!(this instanceof EXIF)) return new EXIF(obj);
|
|
10451
|
-
this.EXIFwrapped = obj;
|
|
10452
|
-
};
|
|
10453
|
-
{
|
|
10454
|
-
if ( module.exports) {
|
|
10455
|
-
exports = module.exports = EXIF;
|
|
10456
|
-
}
|
|
10457
|
-
exports.EXIF = EXIF;
|
|
10458
|
-
}
|
|
10459
|
-
var ExifTags = EXIF.Tags = {
|
|
10460
|
-
0x9000: "ExifVersion",
|
|
10461
|
-
0xA000: "FlashpixVersion",
|
|
10462
|
-
0xA001: "ColorSpace",
|
|
10463
|
-
0xA002: "PixelXDimension",
|
|
10464
|
-
0xA003: "PixelYDimension",
|
|
10465
|
-
0x9101: "ComponentsConfiguration",
|
|
10466
|
-
0x9102: "CompressedBitsPerPixel",
|
|
10467
|
-
0x927C: "MakerNote",
|
|
10468
|
-
0x9286: "UserComment",
|
|
10469
|
-
0xA004: "RelatedSoundFile",
|
|
10470
|
-
0x9003: "DateTimeOriginal",
|
|
10471
|
-
0x9004: "DateTimeDigitized",
|
|
10472
|
-
0x9290: "SubsecTime",
|
|
10473
|
-
0x9291: "SubsecTimeOriginal",
|
|
10474
|
-
0x9292: "SubsecTimeDigitized",
|
|
10475
|
-
0x829A: "ExposureTime",
|
|
10476
|
-
0x829D: "FNumber",
|
|
10477
|
-
0x8822: "ExposureProgram",
|
|
10478
|
-
0x8824: "SpectralSensitivity",
|
|
10479
|
-
0x8827: "ISOSpeedRatings",
|
|
10480
|
-
0x8828: "OECF",
|
|
10481
|
-
0x9201: "ShutterSpeedValue",
|
|
10482
|
-
0x9202: "ApertureValue",
|
|
10483
|
-
0x9203: "BrightnessValue",
|
|
10484
|
-
0x9204: "ExposureBias",
|
|
10485
|
-
0x9205: "MaxApertureValue",
|
|
10486
|
-
0x9206: "SubjectDistance",
|
|
10487
|
-
0x9207: "MeteringMode",
|
|
10488
|
-
0x9208: "LightSource",
|
|
10489
|
-
0x9209: "Flash",
|
|
10490
|
-
0x9214: "SubjectArea",
|
|
10491
|
-
0x920A: "FocalLength",
|
|
10492
|
-
0xA20B: "FlashEnergy",
|
|
10493
|
-
0xA20C: "SpatialFrequencyResponse",
|
|
10494
|
-
0xA20E: "FocalPlaneXResolution",
|
|
10495
|
-
0xA20F: "FocalPlaneYResolution",
|
|
10496
|
-
0xA210: "FocalPlaneResolutionUnit",
|
|
10497
|
-
0xA214: "SubjectLocation",
|
|
10498
|
-
0xA215: "ExposureIndex",
|
|
10499
|
-
0xA217: "SensingMethod",
|
|
10500
|
-
0xA300: "FileSource",
|
|
10501
|
-
0xA301: "SceneType",
|
|
10502
|
-
0xA302: "CFAPattern",
|
|
10503
|
-
0xA401: "CustomRendered",
|
|
10504
|
-
0xA402: "ExposureMode",
|
|
10505
|
-
0xA403: "WhiteBalance",
|
|
10506
|
-
0xA404: "DigitalZoomRation",
|
|
10507
|
-
0xA405: "FocalLengthIn35mmFilm",
|
|
10508
|
-
0xA406: "SceneCaptureType",
|
|
10509
|
-
0xA407: "GainControl",
|
|
10510
|
-
0xA408: "Contrast",
|
|
10511
|
-
0xA409: "Saturation",
|
|
10512
|
-
0xA40A: "Sharpness",
|
|
10513
|
-
0xA40B: "DeviceSettingDescription",
|
|
10514
|
-
0xA40C: "SubjectDistanceRange",
|
|
10515
|
-
0xA005: "InteroperabilityIFDPointer",
|
|
10516
|
-
0xA420: "ImageUniqueID"
|
|
10517
|
-
};
|
|
10518
|
-
var TiffTags = EXIF.TiffTags = {
|
|
10519
|
-
0x0100: "ImageWidth",
|
|
10520
|
-
0x0101: "ImageHeight",
|
|
10521
|
-
0x8769: "ExifIFDPointer",
|
|
10522
|
-
0x8825: "GPSInfoIFDPointer",
|
|
10523
|
-
0xA005: "InteroperabilityIFDPointer",
|
|
10524
|
-
0x0102: "BitsPerSample",
|
|
10525
|
-
0x0103: "Compression",
|
|
10526
|
-
0x0106: "PhotometricInterpretation",
|
|
10527
|
-
0x0112: "Orientation",
|
|
10528
|
-
0x0115: "SamplesPerPixel",
|
|
10529
|
-
0x011C: "PlanarConfiguration",
|
|
10530
|
-
0x0212: "YCbCrSubSampling",
|
|
10531
|
-
0x0213: "YCbCrPositioning",
|
|
10532
|
-
0x011A: "XResolution",
|
|
10533
|
-
0x011B: "YResolution",
|
|
10534
|
-
0x0128: "ResolutionUnit",
|
|
10535
|
-
0x0111: "StripOffsets",
|
|
10536
|
-
0x0116: "RowsPerStrip",
|
|
10537
|
-
0x0117: "StripByteCounts",
|
|
10538
|
-
0x0201: "JPEGInterchangeFormat",
|
|
10539
|
-
0x0202: "JPEGInterchangeFormatLength",
|
|
10540
|
-
0x012D: "TransferFunction",
|
|
10541
|
-
0x013E: "WhitePoint",
|
|
10542
|
-
0x013F: "PrimaryChromaticities",
|
|
10543
|
-
0x0211: "YCbCrCoefficients",
|
|
10544
|
-
0x0214: "ReferenceBlackWhite",
|
|
10545
|
-
0x0132: "DateTime",
|
|
10546
|
-
0x010E: "ImageDescription",
|
|
10547
|
-
0x010F: "Make",
|
|
10548
|
-
0x0110: "Model",
|
|
10549
|
-
0x0131: "Software",
|
|
10550
|
-
0x013B: "Artist",
|
|
10551
|
-
0x8298: "Copyright"
|
|
10552
|
-
};
|
|
10553
|
-
var GPSTags = EXIF.GPSTags = {
|
|
10554
|
-
0x0000: "GPSVersionID",
|
|
10555
|
-
0x0001: "GPSLatitudeRef",
|
|
10556
|
-
0x0002: "GPSLatitude",
|
|
10557
|
-
0x0003: "GPSLongitudeRef",
|
|
10558
|
-
0x0004: "GPSLongitude",
|
|
10559
|
-
0x0005: "GPSAltitudeRef",
|
|
10560
|
-
0x0006: "GPSAltitude",
|
|
10561
|
-
0x0007: "GPSTimeStamp",
|
|
10562
|
-
0x0008: "GPSSatellites",
|
|
10563
|
-
0x0009: "GPSStatus",
|
|
10564
|
-
0x000A: "GPSMeasureMode",
|
|
10565
|
-
0x000B: "GPSDOP",
|
|
10566
|
-
0x000C: "GPSSpeedRef",
|
|
10567
|
-
0x000D: "GPSSpeed",
|
|
10568
|
-
0x000E: "GPSTrackRef",
|
|
10569
|
-
0x000F: "GPSTrack",
|
|
10570
|
-
0x0010: "GPSImgDirectionRef",
|
|
10571
|
-
0x0011: "GPSImgDirection",
|
|
10572
|
-
0x0012: "GPSMapDatum",
|
|
10573
|
-
0x0013: "GPSDestLatitudeRef",
|
|
10574
|
-
0x0014: "GPSDestLatitude",
|
|
10575
|
-
0x0015: "GPSDestLongitudeRef",
|
|
10576
|
-
0x0016: "GPSDestLongitude",
|
|
10577
|
-
0x0017: "GPSDestBearingRef",
|
|
10578
|
-
0x0018: "GPSDestBearing",
|
|
10579
|
-
0x0019: "GPSDestDistanceRef",
|
|
10580
|
-
0x001A: "GPSDestDistance",
|
|
10581
|
-
0x001B: "GPSProcessingMethod",
|
|
10582
|
-
0x001C: "GPSAreaInformation",
|
|
10583
|
-
0x001D: "GPSDateStamp",
|
|
10584
|
-
0x001E: "GPSDifferential"
|
|
10585
|
-
};
|
|
10586
|
-
var IFD1Tags = EXIF.IFD1Tags = {
|
|
10587
|
-
0x0100: "ImageWidth",
|
|
10588
|
-
0x0101: "ImageHeight",
|
|
10589
|
-
0x0102: "BitsPerSample",
|
|
10590
|
-
0x0103: "Compression",
|
|
10591
|
-
0x0106: "PhotometricInterpretation",
|
|
10592
|
-
0x0111: "StripOffsets",
|
|
10593
|
-
0x0112: "Orientation",
|
|
10594
|
-
0x0115: "SamplesPerPixel",
|
|
10595
|
-
0x0116: "RowsPerStrip",
|
|
10596
|
-
0x0117: "StripByteCounts",
|
|
10597
|
-
0x011A: "XResolution",
|
|
10598
|
-
0x011B: "YResolution",
|
|
10599
|
-
0x011C: "PlanarConfiguration",
|
|
10600
|
-
0x0128: "ResolutionUnit",
|
|
10601
|
-
0x0201: "JpegIFOffset",
|
|
10602
|
-
0x0202: "JpegIFByteCount",
|
|
10603
|
-
0x0211: "YCbCrCoefficients",
|
|
10604
|
-
0x0212: "YCbCrSubSampling",
|
|
10605
|
-
0x0213: "YCbCrPositioning",
|
|
10606
|
-
0x0214: "ReferenceBlackWhite"
|
|
10607
|
-
};
|
|
10608
|
-
var StringValues = EXIF.StringValues = {
|
|
10609
|
-
ExposureProgram: {
|
|
10610
|
-
0: "Not defined",
|
|
10611
|
-
1: "Manual",
|
|
10612
|
-
2: "Normal program",
|
|
10613
|
-
3: "Aperture priority",
|
|
10614
|
-
4: "Shutter priority",
|
|
10615
|
-
5: "Creative program",
|
|
10616
|
-
6: "Action program",
|
|
10617
|
-
7: "Portrait mode",
|
|
10618
|
-
8: "Landscape mode"
|
|
10619
|
-
},
|
|
10620
|
-
MeteringMode: {
|
|
10621
|
-
0: "Unknown",
|
|
10622
|
-
1: "Average",
|
|
10623
|
-
2: "CenterWeightedAverage",
|
|
10624
|
-
3: "Spot",
|
|
10625
|
-
4: "MultiSpot",
|
|
10626
|
-
5: "Pattern",
|
|
10627
|
-
6: "Partial",
|
|
10628
|
-
255: "Other"
|
|
10629
|
-
},
|
|
10630
|
-
LightSource: {
|
|
10631
|
-
0: "Unknown",
|
|
10632
|
-
1: "Daylight",
|
|
10633
|
-
2: "Fluorescent",
|
|
10634
|
-
3: "Tungsten (incandescent light)",
|
|
10635
|
-
4: "Flash",
|
|
10636
|
-
9: "Fine weather",
|
|
10637
|
-
10: "Cloudy weather",
|
|
10638
|
-
11: "Shade",
|
|
10639
|
-
12: "Daylight fluorescent (D 5700 - 7100K)",
|
|
10640
|
-
13: "Day white fluorescent (N 4600 - 5400K)",
|
|
10641
|
-
14: "Cool white fluorescent (W 3900 - 4500K)",
|
|
10642
|
-
15: "White fluorescent (WW 3200 - 3700K)",
|
|
10643
|
-
17: "Standard light A",
|
|
10644
|
-
18: "Standard light B",
|
|
10645
|
-
19: "Standard light C",
|
|
10646
|
-
20: "D55",
|
|
10647
|
-
21: "D65",
|
|
10648
|
-
22: "D75",
|
|
10649
|
-
23: "D50",
|
|
10650
|
-
24: "ISO studio tungsten",
|
|
10651
|
-
255: "Other"
|
|
10652
|
-
},
|
|
10653
|
-
Flash: {
|
|
10654
|
-
0x0000: "Flash did not fire",
|
|
10655
|
-
0x0001: "Flash fired",
|
|
10656
|
-
0x0005: "Strobe return light not detected",
|
|
10657
|
-
0x0007: "Strobe return light detected",
|
|
10658
|
-
0x0009: "Flash fired, compulsory flash mode",
|
|
10659
|
-
0x000D: "Flash fired, compulsory flash mode, return light not detected",
|
|
10660
|
-
0x000F: "Flash fired, compulsory flash mode, return light detected",
|
|
10661
|
-
0x0010: "Flash did not fire, compulsory flash mode",
|
|
10662
|
-
0x0018: "Flash did not fire, auto mode",
|
|
10663
|
-
0x0019: "Flash fired, auto mode",
|
|
10664
|
-
0x001D: "Flash fired, auto mode, return light not detected",
|
|
10665
|
-
0x001F: "Flash fired, auto mode, return light detected",
|
|
10666
|
-
0x0020: "No flash function",
|
|
10667
|
-
0x0041: "Flash fired, red-eye reduction mode",
|
|
10668
|
-
0x0045: "Flash fired, red-eye reduction mode, return light not detected",
|
|
10669
|
-
0x0047: "Flash fired, red-eye reduction mode, return light detected",
|
|
10670
|
-
0x0049: "Flash fired, compulsory flash mode, red-eye reduction mode",
|
|
10671
|
-
0x004D: "Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",
|
|
10672
|
-
0x004F: "Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",
|
|
10673
|
-
0x0059: "Flash fired, auto mode, red-eye reduction mode",
|
|
10674
|
-
0x005D: "Flash fired, auto mode, return light not detected, red-eye reduction mode",
|
|
10675
|
-
0x005F: "Flash fired, auto mode, return light detected, red-eye reduction mode"
|
|
10676
|
-
},
|
|
10677
|
-
SensingMethod: {
|
|
10678
|
-
1: "Not defined",
|
|
10679
|
-
2: "One-chip color area sensor",
|
|
10680
|
-
3: "Two-chip color area sensor",
|
|
10681
|
-
4: "Three-chip color area sensor",
|
|
10682
|
-
5: "Color sequential area sensor",
|
|
10683
|
-
7: "Trilinear sensor",
|
|
10684
|
-
8: "Color sequential linear sensor"
|
|
10685
|
-
},
|
|
10686
|
-
SceneCaptureType: {
|
|
10687
|
-
0: "Standard",
|
|
10688
|
-
1: "Landscape",
|
|
10689
|
-
2: "Portrait",
|
|
10690
|
-
3: "Night scene"
|
|
10691
|
-
},
|
|
10692
|
-
SceneType: {
|
|
10693
|
-
1: "Directly photographed"
|
|
10694
|
-
},
|
|
10695
|
-
CustomRendered: {
|
|
10696
|
-
0: "Normal process",
|
|
10697
|
-
1: "Custom process"
|
|
10698
|
-
},
|
|
10699
|
-
WhiteBalance: {
|
|
10700
|
-
0: "Auto white balance",
|
|
10701
|
-
1: "Manual white balance"
|
|
10702
|
-
},
|
|
10703
|
-
GainControl: {
|
|
10704
|
-
0: "None",
|
|
10705
|
-
1: "Low gain up",
|
|
10706
|
-
2: "High gain up",
|
|
10707
|
-
3: "Low gain down",
|
|
10708
|
-
4: "High gain down"
|
|
10709
|
-
},
|
|
10710
|
-
Contrast: {
|
|
10711
|
-
0: "Normal",
|
|
10712
|
-
1: "Soft",
|
|
10713
|
-
2: "Hard"
|
|
10714
|
-
},
|
|
10715
|
-
Saturation: {
|
|
10716
|
-
0: "Normal",
|
|
10717
|
-
1: "Low saturation",
|
|
10718
|
-
2: "High saturation"
|
|
10719
|
-
},
|
|
10720
|
-
Sharpness: {
|
|
10721
|
-
0: "Normal",
|
|
10722
|
-
1: "Soft",
|
|
10723
|
-
2: "Hard"
|
|
10724
|
-
},
|
|
10725
|
-
SubjectDistanceRange: {
|
|
10726
|
-
0: "Unknown",
|
|
10727
|
-
1: "Macro",
|
|
10728
|
-
2: "Close view",
|
|
10729
|
-
3: "Distant view"
|
|
10730
|
-
},
|
|
10731
|
-
FileSource: {
|
|
10732
|
-
3: "DSC"
|
|
10733
|
-
},
|
|
10734
|
-
Components: {
|
|
10735
|
-
0: "",
|
|
10736
|
-
1: "Y",
|
|
10737
|
-
2: "Cb",
|
|
10738
|
-
3: "Cr",
|
|
10739
|
-
4: "R",
|
|
10740
|
-
5: "G",
|
|
10741
|
-
6: "B"
|
|
10742
|
-
}
|
|
10743
|
-
};
|
|
10744
|
-
function imageHasData(img) {
|
|
10745
|
-
return !!img.exifdata;
|
|
10746
|
-
}
|
|
10747
|
-
function base64ToArrayBuffer(base64, contentType) {
|
|
10748
|
-
contentType = contentType || base64.match(/^data\:([^\;]+)\;base64,/mi)[1] || '';
|
|
10749
|
-
base64 = base64.replace(/^data\:([^\;]+)\;base64,/gmi, '');
|
|
10750
|
-
var binary = atob(base64);
|
|
10751
|
-
var len = binary.length;
|
|
10752
|
-
var buffer = new ArrayBuffer(len);
|
|
10753
|
-
var view = new Uint8Array(buffer);
|
|
10754
|
-
for (var i = 0; i < len; i++) {
|
|
10755
|
-
view[i] = binary.charCodeAt(i);
|
|
10756
|
-
}
|
|
10757
|
-
return buffer;
|
|
10758
|
-
}
|
|
10759
|
-
function objectURLToBlob(url, callback) {
|
|
10760
|
-
var http = new XMLHttpRequest();
|
|
10761
|
-
http.open("GET", url, true);
|
|
10762
|
-
http.responseType = "blob";
|
|
10763
|
-
http.onload = function (e) {
|
|
10764
|
-
if (this.status == 200 || this.status === 0) {
|
|
10765
|
-
callback(this.response);
|
|
10766
|
-
}
|
|
10767
|
-
};
|
|
10768
|
-
http.send();
|
|
10769
|
-
}
|
|
10770
|
-
function getImageData(img, callback) {
|
|
10771
|
-
function handleBinaryFile(binFile) {
|
|
10772
|
-
var data = findEXIFinJPEG(binFile);
|
|
10773
|
-
img.exifdata = data || {};
|
|
10774
|
-
var iptcdata = findIPTCinJPEG(binFile);
|
|
10775
|
-
img.iptcdata = iptcdata || {};
|
|
10776
|
-
if (EXIF.isXmpEnabled) {
|
|
10777
|
-
var xmpdata = findXMPinJPEG(binFile);
|
|
10778
|
-
img.xmpdata = xmpdata || {};
|
|
10779
|
-
}
|
|
10780
|
-
if (callback) {
|
|
10781
|
-
callback.call(img);
|
|
10782
|
-
}
|
|
10783
|
-
}
|
|
10784
|
-
if (img.src) {
|
|
10785
|
-
if (/^data\:/i.test(img.src)) {
|
|
10786
|
-
var arrayBuffer = base64ToArrayBuffer(img.src);
|
|
10787
|
-
handleBinaryFile(arrayBuffer);
|
|
10788
|
-
} else if (/^blob\:/i.test(img.src)) {
|
|
10789
|
-
var fileReader = new FileReader();
|
|
10790
|
-
fileReader.onload = function (e) {
|
|
10791
|
-
handleBinaryFile(e.target.result);
|
|
10792
|
-
};
|
|
10793
|
-
objectURLToBlob(img.src, function (blob) {
|
|
10794
|
-
fileReader.readAsArrayBuffer(blob);
|
|
10795
|
-
});
|
|
10796
|
-
} else {
|
|
10797
|
-
var http = new XMLHttpRequest();
|
|
10798
|
-
http.onload = function () {
|
|
10799
|
-
if (this.status == 200 || this.status === 0) {
|
|
10800
|
-
handleBinaryFile(http.response);
|
|
10801
|
-
} else {
|
|
10802
|
-
throw "Could not load image";
|
|
10803
|
-
}
|
|
10804
|
-
http = null;
|
|
10805
|
-
};
|
|
10806
|
-
http.open("GET", img.src, true);
|
|
10807
|
-
http.responseType = "arraybuffer";
|
|
10808
|
-
http.send(null);
|
|
10809
|
-
}
|
|
10810
|
-
} else if (self.FileReader && (img instanceof self.Blob || img instanceof self.File)) {
|
|
10811
|
-
var fileReader = new FileReader();
|
|
10812
|
-
fileReader.onload = function (e) {
|
|
10813
|
-
handleBinaryFile(e.target.result);
|
|
10814
|
-
};
|
|
10815
|
-
fileReader.readAsArrayBuffer(img);
|
|
10816
|
-
}
|
|
10817
|
-
}
|
|
10818
|
-
function findEXIFinJPEG(file) {
|
|
10819
|
-
var dataView = new DataView(file);
|
|
10820
|
-
if (dataView.getUint8(0) != 0xFF || dataView.getUint8(1) != 0xD8) {
|
|
10821
|
-
return false;
|
|
10822
|
-
}
|
|
10823
|
-
var offset = 2,
|
|
10824
|
-
length = file.byteLength,
|
|
10825
|
-
marker;
|
|
10826
|
-
while (offset < length) {
|
|
10827
|
-
if (dataView.getUint8(offset) != 0xFF) {
|
|
10828
|
-
return false;
|
|
10829
|
-
}
|
|
10830
|
-
marker = dataView.getUint8(offset + 1);
|
|
10831
|
-
if (marker == 225) {
|
|
10832
|
-
return readEXIFData(dataView, offset + 4, dataView.getUint16(offset + 2) - 2);
|
|
10833
|
-
} else {
|
|
10834
|
-
offset += 2 + dataView.getUint16(offset + 2);
|
|
10835
|
-
}
|
|
10836
|
-
}
|
|
10837
|
-
}
|
|
10838
|
-
function findIPTCinJPEG(file) {
|
|
10839
|
-
var dataView = new DataView(file);
|
|
10840
|
-
if (dataView.getUint8(0) != 0xFF || dataView.getUint8(1) != 0xD8) {
|
|
10841
|
-
return false;
|
|
10842
|
-
}
|
|
10843
|
-
var offset = 2,
|
|
10844
|
-
length = file.byteLength;
|
|
10845
|
-
var isFieldSegmentStart = function (dataView, offset) {
|
|
10846
|
-
return dataView.getUint8(offset) === 0x38 && dataView.getUint8(offset + 1) === 0x42 && dataView.getUint8(offset + 2) === 0x49 && dataView.getUint8(offset + 3) === 0x4D && dataView.getUint8(offset + 4) === 0x04 && dataView.getUint8(offset + 5) === 0x04;
|
|
10847
|
-
};
|
|
10848
|
-
while (offset < length) {
|
|
10849
|
-
if (isFieldSegmentStart(dataView, offset)) {
|
|
10850
|
-
var nameHeaderLength = dataView.getUint8(offset + 7);
|
|
10851
|
-
if (nameHeaderLength % 2 !== 0) nameHeaderLength += 1;
|
|
10852
|
-
if (nameHeaderLength === 0) {
|
|
10853
|
-
nameHeaderLength = 4;
|
|
10854
|
-
}
|
|
10855
|
-
var startOffset = offset + 8 + nameHeaderLength;
|
|
10856
|
-
var sectionLength = dataView.getUint16(offset + 6 + nameHeaderLength);
|
|
10857
|
-
return readIPTCData(file, startOffset, sectionLength);
|
|
10858
|
-
}
|
|
10859
|
-
offset++;
|
|
10860
|
-
}
|
|
10861
|
-
}
|
|
10862
|
-
var IptcFieldMap = {
|
|
10863
|
-
0x78: 'caption',
|
|
10864
|
-
0x6E: 'credit',
|
|
10865
|
-
0x19: 'keywords',
|
|
10866
|
-
0x37: 'dateCreated',
|
|
10867
|
-
0x50: 'byline',
|
|
10868
|
-
0x55: 'bylineTitle',
|
|
10869
|
-
0x7A: 'captionWriter',
|
|
10870
|
-
0x69: 'headline',
|
|
10871
|
-
0x74: 'copyright',
|
|
10872
|
-
0x0F: 'category'
|
|
10873
|
-
};
|
|
10874
|
-
function readIPTCData(file, startOffset, sectionLength) {
|
|
10875
|
-
var dataView = new DataView(file);
|
|
10876
|
-
var data = {};
|
|
10877
|
-
var fieldValue, fieldName, dataSize, segmentType;
|
|
10878
|
-
var segmentStartPos = startOffset;
|
|
10879
|
-
while (segmentStartPos < startOffset + sectionLength) {
|
|
10880
|
-
if (dataView.getUint8(segmentStartPos) === 0x1C && dataView.getUint8(segmentStartPos + 1) === 0x02) {
|
|
10881
|
-
segmentType = dataView.getUint8(segmentStartPos + 2);
|
|
10882
|
-
if (segmentType in IptcFieldMap) {
|
|
10883
|
-
dataSize = dataView.getInt16(segmentStartPos + 3);
|
|
10884
|
-
fieldName = IptcFieldMap[segmentType];
|
|
10885
|
-
fieldValue = getStringFromDB(dataView, segmentStartPos + 5, dataSize);
|
|
10886
|
-
if (data.hasOwnProperty(fieldName)) {
|
|
10887
|
-
if (data[fieldName] instanceof Array) {
|
|
10888
|
-
data[fieldName].push(fieldValue);
|
|
10889
|
-
} else {
|
|
10890
|
-
data[fieldName] = [data[fieldName], fieldValue];
|
|
10891
|
-
}
|
|
10892
|
-
} else {
|
|
10893
|
-
data[fieldName] = fieldValue;
|
|
10894
|
-
}
|
|
10895
|
-
}
|
|
10896
|
-
}
|
|
10897
|
-
segmentStartPos++;
|
|
10898
|
-
}
|
|
10899
|
-
return data;
|
|
10900
|
-
}
|
|
10901
|
-
function readTags(file, tiffStart, dirStart, strings, bigEnd) {
|
|
10902
|
-
var entries = file.getUint16(dirStart, !bigEnd),
|
|
10903
|
-
tags = {},
|
|
10904
|
-
entryOffset,
|
|
10905
|
-
tag,
|
|
10906
|
-
i;
|
|
10907
|
-
for (i = 0; i < entries; i++) {
|
|
10908
|
-
entryOffset = dirStart + i * 12 + 2;
|
|
10909
|
-
tag = strings[file.getUint16(entryOffset, !bigEnd)];
|
|
10910
|
-
if (!tag && debug) console.log("Unknown tag: " + file.getUint16(entryOffset, !bigEnd));
|
|
10911
|
-
tags[tag] = readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd);
|
|
10912
|
-
}
|
|
10913
|
-
return tags;
|
|
10914
|
-
}
|
|
10915
|
-
function readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd) {
|
|
10916
|
-
var type = file.getUint16(entryOffset + 2, !bigEnd),
|
|
10917
|
-
numValues = file.getUint32(entryOffset + 4, !bigEnd),
|
|
10918
|
-
valueOffset = file.getUint32(entryOffset + 8, !bigEnd) + tiffStart,
|
|
10919
|
-
offset,
|
|
10920
|
-
vals,
|
|
10921
|
-
val,
|
|
10922
|
-
n,
|
|
10923
|
-
numerator,
|
|
10924
|
-
denominator;
|
|
10925
|
-
switch (type) {
|
|
10926
|
-
case 1:
|
|
10927
|
-
case 7:
|
|
10928
|
-
if (numValues == 1) {
|
|
10929
|
-
return file.getUint8(entryOffset + 8, !bigEnd);
|
|
10930
|
-
} else {
|
|
10931
|
-
offset = numValues > 4 ? valueOffset : entryOffset + 8;
|
|
10932
|
-
vals = [];
|
|
10933
|
-
for (n = 0; n < numValues; n++) {
|
|
10934
|
-
vals[n] = file.getUint8(offset + n);
|
|
10935
|
-
}
|
|
10936
|
-
return vals;
|
|
10937
|
-
}
|
|
10938
|
-
case 2:
|
|
10939
|
-
offset = numValues > 4 ? valueOffset : entryOffset + 8;
|
|
10940
|
-
return getStringFromDB(file, offset, numValues - 1);
|
|
10941
|
-
case 3:
|
|
10942
|
-
if (numValues == 1) {
|
|
10943
|
-
return file.getUint16(entryOffset + 8, !bigEnd);
|
|
10944
|
-
} else {
|
|
10945
|
-
offset = numValues > 2 ? valueOffset : entryOffset + 8;
|
|
10946
|
-
vals = [];
|
|
10947
|
-
for (n = 0; n < numValues; n++) {
|
|
10948
|
-
vals[n] = file.getUint16(offset + 2 * n, !bigEnd);
|
|
10949
|
-
}
|
|
10950
|
-
return vals;
|
|
10951
|
-
}
|
|
10952
|
-
case 4:
|
|
10953
|
-
if (numValues == 1) {
|
|
10954
|
-
return file.getUint32(entryOffset + 8, !bigEnd);
|
|
10955
|
-
} else {
|
|
10956
|
-
vals = [];
|
|
10957
|
-
for (n = 0; n < numValues; n++) {
|
|
10958
|
-
vals[n] = file.getUint32(valueOffset + 4 * n, !bigEnd);
|
|
10959
|
-
}
|
|
10960
|
-
return vals;
|
|
10961
|
-
}
|
|
10962
|
-
case 5:
|
|
10963
|
-
if (numValues == 1) {
|
|
10964
|
-
numerator = file.getUint32(valueOffset, !bigEnd);
|
|
10965
|
-
denominator = file.getUint32(valueOffset + 4, !bigEnd);
|
|
10966
|
-
val = new Number(numerator / denominator);
|
|
10967
|
-
val.numerator = numerator;
|
|
10968
|
-
val.denominator = denominator;
|
|
10969
|
-
return val;
|
|
10970
|
-
} else {
|
|
10971
|
-
vals = [];
|
|
10972
|
-
for (n = 0; n < numValues; n++) {
|
|
10973
|
-
numerator = file.getUint32(valueOffset + 8 * n, !bigEnd);
|
|
10974
|
-
denominator = file.getUint32(valueOffset + 4 + 8 * n, !bigEnd);
|
|
10975
|
-
vals[n] = new Number(numerator / denominator);
|
|
10976
|
-
vals[n].numerator = numerator;
|
|
10977
|
-
vals[n].denominator = denominator;
|
|
10978
|
-
}
|
|
10979
|
-
return vals;
|
|
10980
|
-
}
|
|
10981
|
-
case 9:
|
|
10982
|
-
if (numValues == 1) {
|
|
10983
|
-
return file.getInt32(entryOffset + 8, !bigEnd);
|
|
10984
|
-
} else {
|
|
10985
|
-
vals = [];
|
|
10986
|
-
for (n = 0; n < numValues; n++) {
|
|
10987
|
-
vals[n] = file.getInt32(valueOffset + 4 * n, !bigEnd);
|
|
10988
|
-
}
|
|
10989
|
-
return vals;
|
|
10990
|
-
}
|
|
10991
|
-
case 10:
|
|
10992
|
-
if (numValues == 1) {
|
|
10993
|
-
return file.getInt32(valueOffset, !bigEnd) / file.getInt32(valueOffset + 4, !bigEnd);
|
|
10994
|
-
} else {
|
|
10995
|
-
vals = [];
|
|
10996
|
-
for (n = 0; n < numValues; n++) {
|
|
10997
|
-
vals[n] = file.getInt32(valueOffset + 8 * n, !bigEnd) / file.getInt32(valueOffset + 4 + 8 * n, !bigEnd);
|
|
10998
|
-
}
|
|
10999
|
-
return vals;
|
|
11000
|
-
}
|
|
11001
|
-
}
|
|
11002
|
-
}
|
|
11003
|
-
function getNextIFDOffset(dataView, dirStart, bigEnd) {
|
|
11004
|
-
var entries = dataView.getUint16(dirStart, !bigEnd);
|
|
11005
|
-
return dataView.getUint32(dirStart + 2 + entries * 12, !bigEnd);
|
|
11006
|
-
}
|
|
11007
|
-
function readThumbnailImage(dataView, tiffStart, firstIFDOffset, bigEnd) {
|
|
11008
|
-
var IFD1OffsetPointer = getNextIFDOffset(dataView, tiffStart + firstIFDOffset, bigEnd);
|
|
11009
|
-
if (!IFD1OffsetPointer) {
|
|
11010
|
-
return {};
|
|
11011
|
-
} else if (IFD1OffsetPointer > dataView.byteLength) {
|
|
11012
|
-
return {};
|
|
11013
|
-
}
|
|
11014
|
-
var thumbTags = readTags(dataView, tiffStart, tiffStart + IFD1OffsetPointer, IFD1Tags, bigEnd);
|
|
11015
|
-
if (thumbTags['Compression']) {
|
|
11016
|
-
switch (thumbTags['Compression']) {
|
|
11017
|
-
case 6:
|
|
11018
|
-
if (thumbTags.JpegIFOffset && thumbTags.JpegIFByteCount) {
|
|
11019
|
-
var tOffset = tiffStart + thumbTags.JpegIFOffset;
|
|
11020
|
-
var tLength = thumbTags.JpegIFByteCount;
|
|
11021
|
-
thumbTags['blob'] = new Blob([new Uint8Array(dataView.buffer, tOffset, tLength)], {
|
|
11022
|
-
type: 'image/jpeg'
|
|
11023
|
-
});
|
|
11024
|
-
}
|
|
11025
|
-
break;
|
|
11026
|
-
case 1:
|
|
11027
|
-
console.log("Thumbnail image format is TIFF, which is not implemented.");
|
|
11028
|
-
break;
|
|
11029
|
-
default:
|
|
11030
|
-
console.log("Unknown thumbnail image format '%s'", thumbTags['Compression']);
|
|
11031
|
-
}
|
|
11032
|
-
} else if (thumbTags['PhotometricInterpretation'] == 2) {
|
|
11033
|
-
console.log("Thumbnail image format is RGB, which is not implemented.");
|
|
11034
|
-
}
|
|
11035
|
-
return thumbTags;
|
|
11036
|
-
}
|
|
11037
|
-
function getStringFromDB(buffer, start, length) {
|
|
11038
|
-
var outstr = "";
|
|
11039
|
-
for (n = start; n < start + length; n++) {
|
|
11040
|
-
outstr += String.fromCharCode(buffer.getUint8(n));
|
|
11041
|
-
}
|
|
11042
|
-
return outstr;
|
|
11043
|
-
}
|
|
11044
|
-
function readEXIFData(file, start) {
|
|
11045
|
-
if (getStringFromDB(file, start, 4) != "Exif") {
|
|
11046
|
-
return false;
|
|
11047
|
-
}
|
|
11048
|
-
var bigEnd,
|
|
11049
|
-
tags,
|
|
11050
|
-
tag,
|
|
11051
|
-
exifData,
|
|
11052
|
-
gpsData,
|
|
11053
|
-
tiffOffset = start + 6;
|
|
11054
|
-
if (file.getUint16(tiffOffset) == 0x4949) {
|
|
11055
|
-
bigEnd = false;
|
|
11056
|
-
} else if (file.getUint16(tiffOffset) == 0x4D4D) {
|
|
11057
|
-
bigEnd = true;
|
|
11058
|
-
} else {
|
|
11059
|
-
return false;
|
|
11060
|
-
}
|
|
11061
|
-
if (file.getUint16(tiffOffset + 2, !bigEnd) != 0x002A) {
|
|
11062
|
-
return false;
|
|
11063
|
-
}
|
|
11064
|
-
var firstIFDOffset = file.getUint32(tiffOffset + 4, !bigEnd);
|
|
11065
|
-
if (firstIFDOffset < 0x00000008) {
|
|
11066
|
-
return false;
|
|
11067
|
-
}
|
|
11068
|
-
tags = readTags(file, tiffOffset, tiffOffset + firstIFDOffset, TiffTags, bigEnd);
|
|
11069
|
-
if (tags.ExifIFDPointer) {
|
|
11070
|
-
exifData = readTags(file, tiffOffset, tiffOffset + tags.ExifIFDPointer, ExifTags, bigEnd);
|
|
11071
|
-
for (tag in exifData) {
|
|
11072
|
-
switch (tag) {
|
|
11073
|
-
case "LightSource":
|
|
11074
|
-
case "Flash":
|
|
11075
|
-
case "MeteringMode":
|
|
11076
|
-
case "ExposureProgram":
|
|
11077
|
-
case "SensingMethod":
|
|
11078
|
-
case "SceneCaptureType":
|
|
11079
|
-
case "SceneType":
|
|
11080
|
-
case "CustomRendered":
|
|
11081
|
-
case "WhiteBalance":
|
|
11082
|
-
case "GainControl":
|
|
11083
|
-
case "Contrast":
|
|
11084
|
-
case "Saturation":
|
|
11085
|
-
case "Sharpness":
|
|
11086
|
-
case "SubjectDistanceRange":
|
|
11087
|
-
case "FileSource":
|
|
11088
|
-
exifData[tag] = StringValues[tag][exifData[tag]];
|
|
11089
|
-
break;
|
|
11090
|
-
case "ExifVersion":
|
|
11091
|
-
case "FlashpixVersion":
|
|
11092
|
-
exifData[tag] = String.fromCharCode(exifData[tag][0], exifData[tag][1], exifData[tag][2], exifData[tag][3]);
|
|
11093
|
-
break;
|
|
11094
|
-
case "ComponentsConfiguration":
|
|
11095
|
-
exifData[tag] = StringValues.Components[exifData[tag][0]] + StringValues.Components[exifData[tag][1]] + StringValues.Components[exifData[tag][2]] + StringValues.Components[exifData[tag][3]];
|
|
11096
|
-
break;
|
|
11097
|
-
}
|
|
11098
|
-
tags[tag] = exifData[tag];
|
|
11099
|
-
}
|
|
11100
|
-
}
|
|
11101
|
-
if (tags.GPSInfoIFDPointer) {
|
|
11102
|
-
gpsData = readTags(file, tiffOffset, tiffOffset + tags.GPSInfoIFDPointer, GPSTags, bigEnd);
|
|
11103
|
-
for (tag in gpsData) {
|
|
11104
|
-
switch (tag) {
|
|
11105
|
-
case "GPSVersionID":
|
|
11106
|
-
gpsData[tag] = gpsData[tag][0] + "." + gpsData[tag][1] + "." + gpsData[tag][2] + "." + gpsData[tag][3];
|
|
11107
|
-
break;
|
|
11108
|
-
}
|
|
11109
|
-
tags[tag] = gpsData[tag];
|
|
11110
|
-
}
|
|
11111
|
-
}
|
|
11112
|
-
tags['thumbnail'] = readThumbnailImage(file, tiffOffset, firstIFDOffset, bigEnd);
|
|
11113
|
-
return tags;
|
|
11114
|
-
}
|
|
11115
|
-
function findXMPinJPEG(file) {
|
|
11116
|
-
if (!('DOMParser' in self)) {
|
|
11117
|
-
return;
|
|
11118
|
-
}
|
|
11119
|
-
var dataView = new DataView(file);
|
|
11120
|
-
if (dataView.getUint8(0) != 0xFF || dataView.getUint8(1) != 0xD8) {
|
|
11121
|
-
return false;
|
|
11122
|
-
}
|
|
11123
|
-
var offset = 2,
|
|
11124
|
-
length = file.byteLength,
|
|
11125
|
-
dom = new DOMParser();
|
|
11126
|
-
while (offset < length - 4) {
|
|
11127
|
-
if (getStringFromDB(dataView, offset, 4) == "http") {
|
|
11128
|
-
var startOffset = offset - 1;
|
|
11129
|
-
var sectionLength = dataView.getUint16(offset - 2) - 1;
|
|
11130
|
-
var xmpString = getStringFromDB(dataView, startOffset, sectionLength);
|
|
11131
|
-
var xmpEndIndex = xmpString.indexOf('xmpmeta>') + 8;
|
|
11132
|
-
xmpString = xmpString.substring(xmpString.indexOf('<x:xmpmeta'), xmpEndIndex);
|
|
11133
|
-
var indexOfXmp = xmpString.indexOf('x:xmpmeta') + 10;
|
|
11134
|
-
xmpString = xmpString.slice(0, indexOfXmp) + 'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" ' + 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' + 'xmlns:tiff="http://ns.adobe.com/tiff/1.0/" ' + 'xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" ' + 'xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" ' + 'xmlns:exif="http://ns.adobe.com/exif/1.0/" ' + 'xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" ' + 'xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" ' + 'xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" ' + 'xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" ' + 'xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" ' + xmpString.slice(indexOfXmp);
|
|
11135
|
-
var domDocument = dom.parseFromString(xmpString, 'text/xml');
|
|
11136
|
-
return xml2Object(domDocument);
|
|
11137
|
-
} else {
|
|
11138
|
-
offset++;
|
|
11139
|
-
}
|
|
11140
|
-
}
|
|
11141
|
-
}
|
|
11142
|
-
function xml2json(xml) {
|
|
11143
|
-
var json = {};
|
|
11144
|
-
if (xml.nodeType == 1) {
|
|
11145
|
-
if (xml.attributes.length > 0) {
|
|
11146
|
-
json['@attributes'] = {};
|
|
11147
|
-
for (var j = 0; j < xml.attributes.length; j++) {
|
|
11148
|
-
var attribute = xml.attributes.item(j);
|
|
11149
|
-
json['@attributes'][attribute.nodeName] = attribute.nodeValue;
|
|
11150
|
-
}
|
|
11151
|
-
}
|
|
11152
|
-
} else if (xml.nodeType == 3) {
|
|
11153
|
-
return xml.nodeValue;
|
|
11154
|
-
}
|
|
11155
|
-
if (xml.hasChildNodes()) {
|
|
11156
|
-
for (var i = 0; i < xml.childNodes.length; i++) {
|
|
11157
|
-
var child = xml.childNodes.item(i);
|
|
11158
|
-
var nodeName = child.nodeName;
|
|
11159
|
-
if (json[nodeName] == null) {
|
|
11160
|
-
json[nodeName] = xml2json(child);
|
|
11161
|
-
} else {
|
|
11162
|
-
if (json[nodeName].push == null) {
|
|
11163
|
-
var old = json[nodeName];
|
|
11164
|
-
json[nodeName] = [];
|
|
11165
|
-
json[nodeName].push(old);
|
|
11166
|
-
}
|
|
11167
|
-
json[nodeName].push(xml2json(child));
|
|
11168
|
-
}
|
|
11169
|
-
}
|
|
11170
|
-
}
|
|
11171
|
-
return json;
|
|
11172
|
-
}
|
|
11173
|
-
function xml2Object(xml) {
|
|
11174
|
-
try {
|
|
11175
|
-
var obj = {};
|
|
11176
|
-
if (xml.children.length > 0) {
|
|
11177
|
-
for (var i = 0; i < xml.children.length; i++) {
|
|
11178
|
-
var item = xml.children.item(i);
|
|
11179
|
-
var attributes = item.attributes;
|
|
11180
|
-
for (var idx in attributes) {
|
|
11181
|
-
var itemAtt = attributes[idx];
|
|
11182
|
-
var dataKey = itemAtt.nodeName;
|
|
11183
|
-
var dataValue = itemAtt.nodeValue;
|
|
11184
|
-
if (dataKey !== undefined) {
|
|
11185
|
-
obj[dataKey] = dataValue;
|
|
11186
|
-
}
|
|
11187
|
-
}
|
|
11188
|
-
var nodeName = item.nodeName;
|
|
11189
|
-
if (typeof obj[nodeName] == "undefined") {
|
|
11190
|
-
obj[nodeName] = xml2json(item);
|
|
11191
|
-
} else {
|
|
11192
|
-
if (typeof obj[nodeName].push == "undefined") {
|
|
11193
|
-
var old = obj[nodeName];
|
|
11194
|
-
obj[nodeName] = [];
|
|
11195
|
-
obj[nodeName].push(old);
|
|
11196
|
-
}
|
|
11197
|
-
obj[nodeName].push(xml2json(item));
|
|
11198
|
-
}
|
|
11199
|
-
}
|
|
11200
|
-
} else {
|
|
11201
|
-
obj = xml.textContent;
|
|
11202
|
-
}
|
|
11203
|
-
return obj;
|
|
11204
|
-
} catch (e) {
|
|
11205
|
-
console.log(e.message);
|
|
11206
|
-
}
|
|
11207
|
-
}
|
|
11208
|
-
EXIF.enableXmp = function () {
|
|
11209
|
-
EXIF.isXmpEnabled = true;
|
|
11210
|
-
};
|
|
11211
|
-
EXIF.disableXmp = function () {
|
|
11212
|
-
EXIF.isXmpEnabled = false;
|
|
11213
|
-
};
|
|
11214
|
-
EXIF.getData = function (img, callback) {
|
|
11215
|
-
if ((self.Image && img instanceof self.Image || self.HTMLImageElement && img instanceof self.HTMLImageElement) && !img.complete) return false;
|
|
11216
|
-
if (!imageHasData(img)) {
|
|
11217
|
-
getImageData(img, callback);
|
|
11218
|
-
} else {
|
|
11219
|
-
if (callback) {
|
|
11220
|
-
callback.call(img);
|
|
11221
|
-
}
|
|
11222
|
-
}
|
|
11223
|
-
return true;
|
|
11224
|
-
};
|
|
11225
|
-
EXIF.getTag = function (img, tag) {
|
|
11226
|
-
if (!imageHasData(img)) return;
|
|
11227
|
-
return img.exifdata[tag];
|
|
11228
|
-
};
|
|
11229
|
-
EXIF.getIptcTag = function (img, tag) {
|
|
11230
|
-
if (!imageHasData(img)) return;
|
|
11231
|
-
return img.iptcdata[tag];
|
|
11232
|
-
};
|
|
11233
|
-
EXIF.getAllTags = function (img) {
|
|
11234
|
-
if (!imageHasData(img)) return {};
|
|
11235
|
-
var a,
|
|
11236
|
-
data = img.exifdata,
|
|
11237
|
-
tags = {};
|
|
11238
|
-
for (a in data) {
|
|
11239
|
-
if (data.hasOwnProperty(a)) {
|
|
11240
|
-
tags[a] = data[a];
|
|
11241
|
-
}
|
|
11242
|
-
}
|
|
11243
|
-
return tags;
|
|
11244
|
-
};
|
|
11245
|
-
EXIF.getAllIptcTags = function (img) {
|
|
11246
|
-
if (!imageHasData(img)) return {};
|
|
11247
|
-
var a,
|
|
11248
|
-
data = img.iptcdata,
|
|
11249
|
-
tags = {};
|
|
11250
|
-
for (a in data) {
|
|
11251
|
-
if (data.hasOwnProperty(a)) {
|
|
11252
|
-
tags[a] = data[a];
|
|
11253
|
-
}
|
|
11254
|
-
}
|
|
11255
|
-
return tags;
|
|
11256
|
-
};
|
|
11257
|
-
EXIF.pretty = function (img) {
|
|
11258
|
-
if (!imageHasData(img)) return "";
|
|
11259
|
-
var a,
|
|
11260
|
-
data = img.exifdata,
|
|
11261
|
-
strPretty = "";
|
|
11262
|
-
for (a in data) {
|
|
11263
|
-
if (data.hasOwnProperty(a)) {
|
|
11264
|
-
if (typeof data[a] == "object") {
|
|
11265
|
-
if (data[a] instanceof Number) {
|
|
11266
|
-
strPretty += a + " : " + data[a] + " [" + data[a].numerator + "/" + data[a].denominator + "]\r\n";
|
|
11267
|
-
} else {
|
|
11268
|
-
strPretty += a + " : [" + data[a].length + " values]\r\n";
|
|
11269
|
-
}
|
|
11270
|
-
} else {
|
|
11271
|
-
strPretty += a + " : " + data[a] + "\r\n";
|
|
11272
|
-
}
|
|
11273
|
-
}
|
|
11274
|
-
}
|
|
11275
|
-
return strPretty;
|
|
11276
|
-
};
|
|
11277
|
-
EXIF.readFromBinaryFile = function (file) {
|
|
11278
|
-
return findEXIFinJPEG(file);
|
|
11279
|
-
};
|
|
11280
|
-
}).call(commonjsGlobal);
|
|
11281
|
-
});
|
|
11282
|
-
|
|
11283
|
-
const ChallanDocuments = ({
|
|
11284
|
-
t,
|
|
11285
|
-
config,
|
|
11286
|
-
onSelect,
|
|
11287
|
-
userType,
|
|
11288
|
-
formData,
|
|
11289
|
-
setError: setFormError,
|
|
11290
|
-
clearErrors: clearFormErrors,
|
|
11291
|
-
formState,
|
|
11292
|
-
data,
|
|
11293
|
-
isLoading,
|
|
11294
|
-
error,
|
|
11295
|
-
setError
|
|
11296
|
-
}) => {
|
|
11297
|
-
var _formData$documents, _data$Challan2, _data$Challan2$Docume;
|
|
11298
|
-
const [documents, setDocuments] = useState((formData === null || formData === void 0 ? void 0 : (_formData$documents = formData.documents) === null || _formData$documents === void 0 ? void 0 : _formData$documents.documents) || []);
|
|
11299
|
-
const [enableSubmit, setEnableSubmit] = useState(true);
|
|
11300
|
-
const [checkRequiredFields, setCheckRequiredFields] = useState(false);
|
|
11301
|
-
const tenantId = window.location.href.includes("employee") ? Digit.ULBService.getCurrentPermanentCity() : localStorage.getItem("CITIZEN.CITY");
|
|
11302
|
-
const handleSubmit = () => {
|
|
11303
|
-
let document = formData.documents;
|
|
11304
|
-
let documentStep;
|
|
11305
|
-
documentStep = {
|
|
11306
|
-
...document,
|
|
11307
|
-
documents: documents
|
|
11308
|
-
};
|
|
11309
|
-
onSelect(config.key, documentStep);
|
|
11310
|
-
};
|
|
11311
|
-
useEffect(() => {
|
|
11312
|
-
if (documents) onSelect(documents);
|
|
11313
|
-
}, [documents]);
|
|
11314
|
-
useEffect(() => {
|
|
11315
|
-
var _formData$documents2;
|
|
11316
|
-
const incomingDocs = (formData === null || formData === void 0 ? void 0 : (_formData$documents2 = formData.documents) === null || _formData$documents2 === void 0 ? void 0 : _formData$documents2.documents) || [];
|
|
11317
|
-
if (Array.isArray(incomingDocs) && incomingDocs.length > 0 && documents.length === 0) {
|
|
11318
|
-
setDocuments(incomingDocs);
|
|
11319
|
-
}
|
|
11320
|
-
}, [formData]);
|
|
11321
|
-
useEffect(() => {
|
|
11322
|
-
var _data$Challan, _data$Challan$Documen;
|
|
11323
|
-
let count = 0;
|
|
11324
|
-
data === null || data === void 0 ? void 0 : (_data$Challan = data.Challan) === null || _data$Challan === void 0 ? void 0 : (_data$Challan$Documen = _data$Challan.Documents) === null || _data$Challan$Documen === void 0 ? void 0 : _data$Challan$Documen.map(doc => {
|
|
11325
|
-
doc.hasDropdown = true;
|
|
11326
|
-
let isRequired = false;
|
|
11327
|
-
documents === null || documents === void 0 ? void 0 : documents.map(data => {
|
|
11328
|
-
if (doc.required && data !== null && data !== void 0 && data.documentType.includes(doc.code)) isRequired = true;
|
|
11329
|
-
});
|
|
11330
|
-
if (!isRequired && doc.required) count = count + 1;
|
|
11331
|
-
});
|
|
11332
|
-
if ((count == "0" || count == 0) && (documents === null || documents === void 0 ? void 0 : documents.length) > 0) setEnableSubmit(false);else setEnableSubmit(true);
|
|
11333
|
-
}, [documents, checkRequiredFields]);
|
|
11334
|
-
return /*#__PURE__*/React.createElement("div", null, !isLoading ? /*#__PURE__*/React.createElement("div", null, data === null || data === void 0 ? void 0 : (_data$Challan2 = data.Challan) === null || _data$Challan2 === void 0 ? void 0 : (_data$Challan2$Docume = _data$Challan2.Documents) === null || _data$Challan2$Docume === void 0 ? void 0 : _data$Challan2$Docume.map((document, index) => {
|
|
11335
|
-
return /*#__PURE__*/React.createElement(PTRSelectDocument, {
|
|
11336
|
-
key: index,
|
|
11337
|
-
document: document,
|
|
11338
|
-
t: t,
|
|
11339
|
-
error: error,
|
|
11340
|
-
setError: setError,
|
|
11341
|
-
setDocuments: setDocuments,
|
|
11342
|
-
documents: documents,
|
|
11343
|
-
setCheckRequiredFields: setCheckRequiredFields,
|
|
11344
|
-
handleSubmit: handleSubmit
|
|
11345
|
-
});
|
|
11346
|
-
}), error && /*#__PURE__*/React.createElement(Toast, {
|
|
11347
|
-
isDleteBtn: true,
|
|
11348
|
-
label: error,
|
|
11349
|
-
onClose: () => setError(null),
|
|
11350
|
-
error: true
|
|
11351
|
-
})) : /*#__PURE__*/React.createElement(Loader$1, null));
|
|
11352
|
-
};
|
|
11353
|
-
function PTRSelectDocument({
|
|
11354
|
-
t,
|
|
11355
|
-
document: doc,
|
|
11356
|
-
setDocuments,
|
|
11357
|
-
setError,
|
|
11358
|
-
documents,
|
|
11359
|
-
action,
|
|
11360
|
-
formData,
|
|
11361
|
-
handleSubmit,
|
|
11362
|
-
id
|
|
11363
|
-
}) {
|
|
11364
|
-
const filteredDocument = documents === null || documents === void 0 ? void 0 : documents.filter(item => {
|
|
11365
|
-
var _item$documentType;
|
|
11366
|
-
return item === null || item === void 0 ? void 0 : (_item$documentType = item.documentType) === null || _item$documentType === void 0 ? void 0 : _item$documentType.includes(doc === null || doc === void 0 ? void 0 : doc.code);
|
|
11367
|
-
})[0];
|
|
11368
|
-
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
11369
|
-
const [selectedDocument, setSelectedDocument] = useState(() => {
|
|
11370
|
-
var _doc$dropdownData2;
|
|
11371
|
-
if (filteredDocument) {
|
|
11372
|
-
var _doc$dropdownData, _match$code;
|
|
11373
|
-
const match = doc === null || doc === void 0 ? void 0 : (_doc$dropdownData = doc.dropdownData) === null || _doc$dropdownData === void 0 ? void 0 : _doc$dropdownData.find(e => e.code === filteredDocument.documentType);
|
|
11374
|
-
return match ? {
|
|
11375
|
-
...match,
|
|
11376
|
-
i18nKey: (_match$code = match.code) === null || _match$code === void 0 ? void 0 : _match$code.replaceAll(".", "_")
|
|
11377
|
-
} : {};
|
|
11378
|
-
}
|
|
11379
|
-
if ((doc === null || doc === void 0 ? void 0 : (_doc$dropdownData2 = doc.dropdownData) === null || _doc$dropdownData2 === void 0 ? void 0 : _doc$dropdownData2.length) === 1) {
|
|
11380
|
-
var _onlyOption$code;
|
|
11381
|
-
const onlyOption = doc.dropdownData[0];
|
|
11382
|
-
return {
|
|
11383
|
-
...onlyOption,
|
|
11384
|
-
i18nKey: (_onlyOption$code = onlyOption.code) === null || _onlyOption$code === void 0 ? void 0 : _onlyOption$code.replaceAll(".", "_")
|
|
11385
|
-
};
|
|
11386
|
-
}
|
|
11387
|
-
return {};
|
|
11388
|
-
});
|
|
11389
|
-
const [file, setFile] = useState(null);
|
|
11390
|
-
const [uploadedFile, setUploadedFile] = useState(() => (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.filestoreId) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null);
|
|
11391
|
-
useEffect(() => {
|
|
11392
|
-
const fsId = (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.filestoreId) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId);
|
|
11393
|
-
if (fsId && fsId !== uploadedFile) {
|
|
11394
|
-
setUploadedFile(fsId);
|
|
11395
|
-
}
|
|
11396
|
-
}, [filteredDocument]);
|
|
11397
|
-
function selectfile(e) {
|
|
11398
|
-
const file = e.target.files[0];
|
|
11399
|
-
if (!file) return;
|
|
11400
|
-
setFile(file);
|
|
11401
|
-
updateDocument(selectedDocument, {});
|
|
11402
|
-
}
|
|
11403
|
-
function updateDocument(selectedDocument, extraFields = {}) {
|
|
11404
|
-
setDocuments(() => [{
|
|
11405
|
-
documentType: "arrearDoc",
|
|
11406
|
-
filestoreId: extraFields.filestoreId || null,
|
|
11407
|
-
documentUid: extraFields.documentUid || null
|
|
11408
|
-
}]);
|
|
11409
|
-
}
|
|
11410
|
-
const {
|
|
11411
|
-
dropdownData
|
|
11412
|
-
} = doc;
|
|
11413
|
-
var dropDownData = dropdownData;
|
|
11414
|
-
const [isHidden, setHidden] = useState(false);
|
|
11415
|
-
const [getLoading, setLoading] = useState(false);
|
|
11416
|
-
useEffect(() => {
|
|
11417
|
-
if (action === "update") {
|
|
11418
|
-
var _formData$originalDat, _formData$originalDat2;
|
|
11419
|
-
const originalDoc = formData === null || formData === void 0 ? void 0 : (_formData$originalDat = formData.originalData) === null || _formData$originalDat === void 0 ? void 0 : (_formData$originalDat2 = _formData$originalDat.documents) === null || _formData$originalDat2 === void 0 ? void 0 : _formData$originalDat2.filter(e => e.documentType.includes(doc === null || doc === void 0 ? void 0 : doc.code))[0];
|
|
11420
|
-
const docType = dropDownData.filter(e => e.code === (originalDoc === null || originalDoc === void 0 ? void 0 : originalDoc.documentType)).map(e => {
|
|
11421
|
-
var _e$code;
|
|
11422
|
-
return {
|
|
11423
|
-
...e,
|
|
11424
|
-
i18nKey: e === null || e === void 0 ? void 0 : (_e$code = e.code) === null || _e$code === void 0 ? void 0 : _e$code.replaceAll(".", "_")
|
|
11425
|
-
};
|
|
11426
|
-
})[0];
|
|
11427
|
-
if (!docType) setHidden(true);else {
|
|
11428
|
-
setSelectedDocument(docType);
|
|
11429
|
-
setUploadedFile(originalDoc === null || originalDoc === void 0 ? void 0 : originalDoc.fileStoreId);
|
|
11430
|
-
}
|
|
11431
|
-
}
|
|
11432
|
-
}, []);
|
|
11433
|
-
useEffect(() => {
|
|
11434
|
-
if (!(doc !== null && doc !== void 0 && doc.hasDropdown)) {
|
|
11435
|
-
var _doc$code;
|
|
11436
|
-
setSelectedDocument({
|
|
11437
|
-
code: doc === null || doc === void 0 ? void 0 : doc.code,
|
|
11438
|
-
i18nKey: doc === null || doc === void 0 ? void 0 : (_doc$code = doc.code) === null || _doc$code === void 0 ? void 0 : _doc$code.replaceAll(".", "_")
|
|
11439
|
-
});
|
|
11440
|
-
}
|
|
11441
|
-
}, []);
|
|
11442
|
-
useEffect(() => {
|
|
11443
|
-
(async () => {
|
|
11444
|
-
setError(null);
|
|
11445
|
-
if (file) {
|
|
11446
|
-
setLoading(true);
|
|
11447
|
-
if (file.size >= 5242880) {
|
|
11448
|
-
setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
11449
|
-
} else {
|
|
11450
|
-
try {
|
|
11451
|
-
var _response$data, _response$data$files;
|
|
11452
|
-
setUploadedFile(null);
|
|
11453
|
-
const response = await Digit.UploadServices.Filestorage("PTR", file, Digit.ULBService.getStateId());
|
|
11454
|
-
setLoading(false);
|
|
11455
|
-
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
11456
|
-
const fsId = response.data.files[0].fileStoreId;
|
|
11457
|
-
setUploadedFile(fsId);
|
|
11458
|
-
updateDocument(selectedDocument, {
|
|
11459
|
-
filestoreId: fsId,
|
|
11460
|
-
documentUid: fsId
|
|
11461
|
-
});
|
|
11462
|
-
} else {
|
|
11463
|
-
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
11464
|
-
}
|
|
11465
|
-
} catch (err) {
|
|
11466
|
-
setLoading(false);
|
|
11467
|
-
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
11468
|
-
}
|
|
11469
|
-
}
|
|
11470
|
-
}
|
|
11471
|
-
})();
|
|
11472
|
-
}, [file]);
|
|
11473
|
-
useEffect(() => {
|
|
11474
|
-
if (isHidden) setUploadedFile(null);
|
|
11475
|
-
}, [isHidden]);
|
|
11476
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
11477
|
-
className: "challan-documents"
|
|
11478
|
-
}, /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
11479
|
-
className: "challan-label-field"
|
|
11480
|
-
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
11481
|
-
className: "challan-card-label"
|
|
11482
|
-
}, t(doc === null || doc === void 0 ? void 0 : doc.code), " ", /*#__PURE__*/React.createElement("span", {
|
|
11483
|
-
className: "requiredField"
|
|
11484
|
-
}, " ", (doc === null || doc === void 0 ? void 0 : doc.required) && " *")), /*#__PURE__*/React.createElement("div", {
|
|
11485
|
-
className: "field",
|
|
11486
|
-
style: {
|
|
11487
|
-
width: "100%"
|
|
11488
|
-
}
|
|
11489
|
-
}, /*#__PURE__*/React.createElement(UploadFile, {
|
|
11490
|
-
onUpload: selectfile,
|
|
11491
|
-
onDelete: () => {
|
|
11492
|
-
setUploadedFile(null);
|
|
11493
|
-
},
|
|
11494
|
-
id: id,
|
|
11495
|
-
message: uploadedFile ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`CS_ACTION_NO_FILEUPLOADED`),
|
|
11496
|
-
textStyles: {
|
|
11497
|
-
width: "100%"
|
|
11498
|
-
},
|
|
11499
|
-
inputStyles: {
|
|
11500
|
-
width: "280px"
|
|
11501
|
-
},
|
|
11502
|
-
accept: ".pdf, .jpeg, .jpg, .png",
|
|
11503
|
-
buttonType: "button",
|
|
11504
|
-
error: !uploadedFile
|
|
11505
|
-
}))), getLoading && /*#__PURE__*/React.createElement(Loader$1, {
|
|
11506
|
-
page: true
|
|
11507
|
-
}));
|
|
11508
|
-
}
|
|
11509
|
-
|
|
11510
10316
|
const RentAndLeasePropertyDetails = ({
|
|
11511
10317
|
onGoBack,
|
|
11512
10318
|
goNext,
|
|
11513
10319
|
currentStepData,
|
|
10320
|
+
t,
|
|
11514
10321
|
validateStep,
|
|
11515
10322
|
config
|
|
11516
10323
|
}) => {
|
|
11517
|
-
var _watch, _watch2;
|
|
11518
10324
|
const dispatch = useDispatch();
|
|
11519
10325
|
const tenantId = window.localStorage.getItem("Employee.tenant-id");
|
|
11520
|
-
const
|
|
11521
|
-
|
|
10326
|
+
const filters = {
|
|
10327
|
+
tenantId,
|
|
10328
|
+
searchType: "1"
|
|
10329
|
+
};
|
|
11522
10330
|
const {
|
|
11523
|
-
|
|
11524
|
-
|
|
10331
|
+
data,
|
|
10332
|
+
isLoading,
|
|
10333
|
+
isError
|
|
10334
|
+
} = Digit.Hooks.rentandlease.useRentAndLeaseProperties(filters);
|
|
10335
|
+
const {
|
|
10336
|
+
triggerLoader,
|
|
10337
|
+
triggerToast
|
|
10338
|
+
} = config === null || config === void 0 ? void 0 : config.currStepConfig[0];
|
|
11525
10339
|
const propertyTypeOptions = [{
|
|
11526
10340
|
name: t("ON_RENT"),
|
|
11527
10341
|
code: "rent",
|
|
@@ -11530,17 +10344,6 @@ const RentAndLeasePropertyDetails = ({
|
|
|
11530
10344
|
name: t("ON_LEASE"),
|
|
11531
10345
|
code: "lease",
|
|
11532
10346
|
i18nKey: "lease"
|
|
11533
|
-
}, {
|
|
11534
|
-
name: t("ON_DEED"),
|
|
11535
|
-
code: "deed",
|
|
11536
|
-
i18nKey: "deed"
|
|
11537
|
-
}];
|
|
11538
|
-
const applicationTypeOptions = [{
|
|
11539
|
-
name: t("Legacy"),
|
|
11540
|
-
code: "Legacy"
|
|
11541
|
-
}, {
|
|
11542
|
-
name: t("New"),
|
|
11543
|
-
code: "new"
|
|
11544
10347
|
}];
|
|
11545
10348
|
const propertySpecificOptions = [{
|
|
11546
10349
|
name: t("COMMERCIAL"),
|
|
@@ -11560,44 +10363,16 @@ const RentAndLeasePropertyDetails = ({
|
|
|
11560
10363
|
code: "Non-Prime",
|
|
11561
10364
|
i18nKey: "Non-Prime"
|
|
11562
10365
|
}];
|
|
11563
|
-
const arrearReasonOptions = [{
|
|
11564
|
-
name: t("PREVIOUS DUES"),
|
|
11565
|
-
code: "PREVIOUS DUES"
|
|
11566
|
-
}, {
|
|
11567
|
-
name: t("UNDER DISPUTE"),
|
|
11568
|
-
code: "UNDER DISPUTE"
|
|
11569
|
-
}, {
|
|
11570
|
-
name: t("COURT CASE"),
|
|
11571
|
-
code: "COURT CASE"
|
|
11572
|
-
}];
|
|
11573
|
-
const filters = {
|
|
11574
|
-
tenantId,
|
|
11575
|
-
searchType: "1"
|
|
11576
|
-
};
|
|
11577
|
-
const {
|
|
11578
|
-
data,
|
|
11579
|
-
isLoading,
|
|
11580
|
-
isError
|
|
11581
|
-
} = Digit.Hooks.rentandlease.useRentAndLeaseProperties(filters);
|
|
11582
|
-
const {
|
|
11583
|
-
triggerLoader,
|
|
11584
|
-
triggerToast
|
|
11585
|
-
} = config === null || config === void 0 ? void 0 : config.currStepConfig[0];
|
|
11586
10366
|
const {
|
|
11587
10367
|
control,
|
|
11588
10368
|
handleSubmit,
|
|
11589
10369
|
setValue,
|
|
11590
10370
|
watch,
|
|
11591
|
-
clearErrors,
|
|
11592
10371
|
formState: {
|
|
11593
10372
|
errors
|
|
11594
10373
|
}
|
|
11595
10374
|
} = useForm({
|
|
11596
10375
|
defaultValues: {
|
|
11597
|
-
applicationType: {
|
|
11598
|
-
name: t("Legacy"),
|
|
11599
|
-
code: "Legacy"
|
|
11600
|
-
},
|
|
11601
10376
|
propertyId: "",
|
|
11602
10377
|
propertyName: "",
|
|
11603
10378
|
propertyType: "",
|
|
@@ -11618,19 +10393,6 @@ const RentAndLeasePropertyDetails = ({
|
|
|
11618
10393
|
duration: ""
|
|
11619
10394
|
}
|
|
11620
10395
|
});
|
|
11621
|
-
const docUploadData = {
|
|
11622
|
-
Challan: {
|
|
11623
|
-
Documents: [{
|
|
11624
|
-
code: "arrearDoc",
|
|
11625
|
-
documentType: "ID_PROOF",
|
|
11626
|
-
required: watch("arrear") > 0 ? true : false,
|
|
11627
|
-
active: true,
|
|
11628
|
-
description: "ID proof of offender",
|
|
11629
|
-
maxSizeMB: 2,
|
|
11630
|
-
hasDropdown: true
|
|
11631
|
-
}]
|
|
11632
|
-
}
|
|
11633
|
-
};
|
|
11634
10396
|
const selectedPropertyType = watch("propertyType");
|
|
11635
10397
|
const selectedPropertySpecific = watch("propertySpecific");
|
|
11636
10398
|
const selectedLocationType = watch("locationType");
|
|
@@ -11644,16 +10406,6 @@ const RentAndLeasePropertyDetails = ({
|
|
|
11644
10406
|
setFilteredProperties(properties);
|
|
11645
10407
|
}
|
|
11646
10408
|
}, [data, selectedPropertyType, selectedPropertySpecific, selectedLocationType]);
|
|
11647
|
-
useEffect(() => {
|
|
11648
|
-
const startDate = watch("arrearStartDate");
|
|
11649
|
-
if (startDate) {
|
|
11650
|
-
const end = new Date(startDate);
|
|
11651
|
-
end.setFullYear(end.getFullYear() + 1);
|
|
11652
|
-
setValue("arrearEndDate", end.toISOString().split("T")[0], {
|
|
11653
|
-
shouldValidate: true
|
|
11654
|
-
});
|
|
11655
|
-
}
|
|
11656
|
-
}, [watch("arrearStartDate")]);
|
|
11657
10409
|
const todayISO = new Date().toISOString().split("T")[0];
|
|
11658
10410
|
const minStartDate = new Date();
|
|
11659
10411
|
minStartDate.setMonth(minStartDate.getMonth() - 11);
|
|
@@ -11675,18 +10427,6 @@ const RentAndLeasePropertyDetails = ({
|
|
|
11675
10427
|
});
|
|
11676
10428
|
};
|
|
11677
10429
|
const onSubmit = async data => {
|
|
11678
|
-
var _data$applicationType, _documentsData$;
|
|
11679
|
-
const applicationType = data === null || data === void 0 ? void 0 : (_data$applicationType = data.applicationType) === null || _data$applicationType === void 0 ? void 0 : _data$applicationType.code;
|
|
11680
|
-
if (applicationType === "Legacy" && (data === null || data === void 0 ? void 0 : data.arrear) > 0 && !(documentsData !== null && documentsData !== void 0 && (_documentsData$ = documentsData[0]) !== null && _documentsData$ !== void 0 && _documentsData$.filestoreId)) {
|
|
11681
|
-
alert("Please upload arrear document");
|
|
11682
|
-
return;
|
|
11683
|
-
}
|
|
11684
|
-
if (applicationType === "Legacy") {
|
|
11685
|
-
var _documentsData$2;
|
|
11686
|
-
data["arrearDoc"] = documentsData === null || documentsData === void 0 ? void 0 : (_documentsData$2 = documentsData[0]) === null || _documentsData$2 === void 0 ? void 0 : _documentsData$2.filestoreId;
|
|
11687
|
-
} else {
|
|
11688
|
-
delete data["arrearDoc"];
|
|
11689
|
-
}
|
|
11690
10430
|
if (validateStep) {
|
|
11691
10431
|
const validationErrors = validateStep(data);
|
|
11692
10432
|
if (Object.keys(validationErrors).length > 0) return;
|
|
@@ -11709,13 +10449,6 @@ const RentAndLeasePropertyDetails = ({
|
|
|
11709
10449
|
shouldValidate: true
|
|
11710
10450
|
});
|
|
11711
10451
|
});
|
|
11712
|
-
if (propertyDetails.arrearDoc) {
|
|
11713
|
-
setDocumentsData([{
|
|
11714
|
-
documentType: "arrearDoc",
|
|
11715
|
-
filestoreId: propertyDetails.arrearDoc,
|
|
11716
|
-
documentUid: propertyDetails.arrearDoc
|
|
11717
|
-
}]);
|
|
11718
|
-
}
|
|
11719
10452
|
}
|
|
11720
10453
|
}, [currentStepData, setValue]);
|
|
11721
10454
|
useEffect(() => {
|
|
@@ -11760,41 +10493,12 @@ const RentAndLeasePropertyDetails = ({
|
|
|
11760
10493
|
triggerToast("ERROR_WHILE_FETCHING_PROPERTIES", true);
|
|
11761
10494
|
}
|
|
11762
10495
|
}, [isError, triggerToast]);
|
|
11763
|
-
const handleDocumentsSelect = data => {
|
|
11764
|
-
setDocumentsData(data);
|
|
11765
|
-
};
|
|
11766
|
-
useEffect(() => {
|
|
11767
|
-
if (watch("arrear") <= 0) {
|
|
11768
|
-
clearErrors(["arrearStartDate", "arrearEndDate", "arrearReason", "remarks"]);
|
|
11769
|
-
}
|
|
11770
|
-
}, [watch("arrear")]);
|
|
11771
10496
|
return /*#__PURE__*/React.createElement("form", {
|
|
11772
10497
|
onSubmit: handleSubmit(onSubmit)
|
|
11773
10498
|
}, /*#__PURE__*/React.createElement(CardSectionHeader, {
|
|
11774
10499
|
className: "card-section-header"
|
|
11775
10500
|
}, t("ES_TITILE_PROPERTY_DETAILS")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
11776
10501
|
className: "card-label-smaller"
|
|
11777
|
-
}, t("PT_COMMON_TABLE_COL_APP_TYPE"), " ", /*#__PURE__*/React.createElement("span", {
|
|
11778
|
-
className: "mandatory-asterisk"
|
|
11779
|
-
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
11780
|
-
control: control,
|
|
11781
|
-
name: "applicationType",
|
|
11782
|
-
rules: {
|
|
11783
|
-
required: t("RENT_LEASE_APPLICATION_TYPE_REQUIRED")
|
|
11784
|
-
},
|
|
11785
|
-
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
11786
|
-
className: "form-field",
|
|
11787
|
-
select: props.onChange,
|
|
11788
|
-
selected: props.value,
|
|
11789
|
-
option: applicationTypeOptions,
|
|
11790
|
-
defaultValues: true,
|
|
11791
|
-
optionKey: "name",
|
|
11792
|
-
t: t
|
|
11793
|
-
})
|
|
11794
|
-
})), errors.applicationType && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
11795
|
-
className: "ral-error-label"
|
|
11796
|
-
}, getErrorMessage("applicationType")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
11797
|
-
className: "card-label-smaller"
|
|
11798
10502
|
}, t("RENT_LEASE_PROPERTY_TYPE"), " ", /*#__PURE__*/React.createElement("span", {
|
|
11799
10503
|
className: "mandatory-asterisk"
|
|
11800
10504
|
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
@@ -12041,7 +10745,7 @@ const RentAndLeasePropertyDetails = ({
|
|
|
12041
10745
|
t: t,
|
|
12042
10746
|
disabled: true
|
|
12043
10747
|
})
|
|
12044
|
-
}))), errors.penaltyType && /*#__PURE__*/React.createElement(CardLabelError, null, getErrorMessage("penaltyType")),
|
|
10748
|
+
}))), 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", {
|
|
12045
10749
|
className: "mandatory-asterisk"
|
|
12046
10750
|
}, "*")), /*#__PURE__*/React.createElement("div", {
|
|
12047
10751
|
className: "form-field"
|
|
@@ -12062,158 +10766,7 @@ const RentAndLeasePropertyDetails = ({
|
|
|
12062
10766
|
})
|
|
12063
10767
|
}))), errors.securityDeposit && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
12064
10768
|
className: "ral-error-label"
|
|
12065
|
-
}, getErrorMessage("securityDeposit"))
|
|
12066
|
-
className: "mandatory-asterisk"
|
|
12067
|
-
}, "*")), /*#__PURE__*/React.createElement("div", {
|
|
12068
|
-
className: "form-field"
|
|
12069
|
-
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12070
|
-
control: control,
|
|
12071
|
-
name: "arrear",
|
|
12072
|
-
rules: {
|
|
12073
|
-
required: t("RENT_LEASE_ARREAR_REQUIRED")
|
|
12074
|
-
},
|
|
12075
|
-
render: ({
|
|
12076
|
-
value,
|
|
12077
|
-
onChange
|
|
12078
|
-
}) => /*#__PURE__*/React.createElement(TextInput, {
|
|
12079
|
-
type: "number",
|
|
12080
|
-
value: value || "",
|
|
12081
|
-
onChange: e => onChange(e.target.value)
|
|
12082
|
-
})
|
|
12083
|
-
}))), errors.arrear && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
12084
|
-
className: "ral-error-label"
|
|
12085
|
-
}, getErrorMessage("arrear")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("RAL_START_DATE"), " ", watch("arrear") > 0 && /*#__PURE__*/React.createElement("span", {
|
|
12086
|
-
className: "mandatory-asterisk"
|
|
12087
|
-
}, "*")), /*#__PURE__*/React.createElement("div", {
|
|
12088
|
-
className: "form-field"
|
|
12089
|
-
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12090
|
-
control: control,
|
|
12091
|
-
name: "arrearStartDate",
|
|
12092
|
-
rules: {
|
|
12093
|
-
validate: value => {
|
|
12094
|
-
const arrear = watch("arrear");
|
|
12095
|
-
if (arrear > 0 && !value) {
|
|
12096
|
-
return t("RENT_LEASE_RAL_START_DATE_REQUIRED");
|
|
12097
|
-
}
|
|
12098
|
-
return true;
|
|
12099
|
-
}
|
|
12100
|
-
},
|
|
12101
|
-
render: ({
|
|
12102
|
-
value,
|
|
12103
|
-
onChange
|
|
12104
|
-
}) => /*#__PURE__*/React.createElement(TextInput, {
|
|
12105
|
-
type: "date",
|
|
12106
|
-
min: minStartDateISO,
|
|
12107
|
-
value: value || "",
|
|
12108
|
-
onChange: e => {
|
|
12109
|
-
onChange(e);
|
|
12110
|
-
}
|
|
12111
|
-
})
|
|
12112
|
-
}))), errors.arrearStartDate && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
12113
|
-
className: "ral-error-label"
|
|
12114
|
-
}, getErrorMessage("arrearStartDate")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("RAL_END_DATE"), " ", watch("arrear") > 0 && /*#__PURE__*/React.createElement("span", {
|
|
12115
|
-
className: "mandatory-asterisk"
|
|
12116
|
-
}, "*")), /*#__PURE__*/React.createElement("div", {
|
|
12117
|
-
className: "form-field"
|
|
12118
|
-
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12119
|
-
control: control,
|
|
12120
|
-
name: "arrearEndDate",
|
|
12121
|
-
rules: {
|
|
12122
|
-
validate: value => {
|
|
12123
|
-
const arrear = watch("arrear");
|
|
12124
|
-
if (arrear > 0 && !value) {
|
|
12125
|
-
return t("RENT_LEASE_RAL_END_DATE_REQUIRED");
|
|
12126
|
-
}
|
|
12127
|
-
return true;
|
|
12128
|
-
}
|
|
12129
|
-
},
|
|
12130
|
-
render: ({
|
|
12131
|
-
value,
|
|
12132
|
-
onChange
|
|
12133
|
-
}) => {
|
|
12134
|
-
return /*#__PURE__*/React.createElement(TextInput, {
|
|
12135
|
-
type: "date",
|
|
12136
|
-
value: value || "",
|
|
12137
|
-
onChange: e => onChange(e.target.value)
|
|
12138
|
-
});
|
|
12139
|
-
}
|
|
12140
|
-
}))), errors.arrearEndDate && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
12141
|
-
className: "ral-error-label"
|
|
12142
|
-
}, getErrorMessage("arrearEndDate")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12143
|
-
className: "card-label-smaller"
|
|
12144
|
-
}, t("Reason"), " ", watch("arrear") > 0 && /*#__PURE__*/React.createElement("span", {
|
|
12145
|
-
className: "mandatory-asterisk"
|
|
12146
|
-
}, "*")), /*#__PURE__*/React.createElement(Controller, {
|
|
12147
|
-
control: control,
|
|
12148
|
-
name: "arrearReason",
|
|
12149
|
-
rules: {
|
|
12150
|
-
validate: value => {
|
|
12151
|
-
const arrear = watch("arrear");
|
|
12152
|
-
if (arrear > 0 && !value) {
|
|
12153
|
-
return t("RENT_LEASE_REASON_REQUIRED");
|
|
12154
|
-
}
|
|
12155
|
-
return true;
|
|
12156
|
-
}
|
|
12157
|
-
},
|
|
12158
|
-
render: props => /*#__PURE__*/React.createElement(Dropdown, {
|
|
12159
|
-
className: "form-field",
|
|
12160
|
-
select: props.onChange,
|
|
12161
|
-
selected: props.value,
|
|
12162
|
-
option: arrearReasonOptions,
|
|
12163
|
-
defaultValues: true,
|
|
12164
|
-
optionKey: "name",
|
|
12165
|
-
t: t
|
|
12166
|
-
})
|
|
12167
|
-
})), errors.arrearReason && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
12168
|
-
className: "ral-error-label"
|
|
12169
|
-
}, getErrorMessage("arrearReason")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
12170
|
-
className: "card-label-smaller"
|
|
12171
|
-
}, t("Remarks"), " ", watch("arrear") > 0 && /*#__PURE__*/React.createElement("span", {
|
|
12172
|
-
className: "mandatory-asterisk"
|
|
12173
|
-
}, "*")), /*#__PURE__*/React.createElement("div", {
|
|
12174
|
-
className: "form-field"
|
|
12175
|
-
}, /*#__PURE__*/React.createElement(Controller, {
|
|
12176
|
-
control: control,
|
|
12177
|
-
name: "remarks",
|
|
12178
|
-
rules: {
|
|
12179
|
-
validate: value => {
|
|
12180
|
-
const arrear = watch("arrear");
|
|
12181
|
-
if (arrear > 0 && !(value !== null && value !== void 0 && value.trim())) {
|
|
12182
|
-
return t("RENT_LEASE_REMARKS_REQUIRED");
|
|
12183
|
-
}
|
|
12184
|
-
return true;
|
|
12185
|
-
}
|
|
12186
|
-
},
|
|
12187
|
-
render: ({
|
|
12188
|
-
value,
|
|
12189
|
-
onChange
|
|
12190
|
-
}) => /*#__PURE__*/React.createElement(TextInput, {
|
|
12191
|
-
type: "text",
|
|
12192
|
-
value: value || "",
|
|
12193
|
-
onChange: e => onChange(e.target.value),
|
|
12194
|
-
t: t
|
|
12195
|
-
})
|
|
12196
|
-
}))), errors.remarks && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
12197
|
-
className: "ral-error-label"
|
|
12198
|
-
}, getErrorMessage("remarks")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ChallanDocuments, {
|
|
12199
|
-
t: t,
|
|
12200
|
-
config: {
|
|
12201
|
-
key: "documents"
|
|
12202
|
-
},
|
|
12203
|
-
onSelect: handleDocumentsSelect,
|
|
12204
|
-
userType: "CITIZEN",
|
|
12205
|
-
formData: {
|
|
12206
|
-
documents: {
|
|
12207
|
-
documents: documentsData
|
|
12208
|
-
}
|
|
12209
|
-
},
|
|
12210
|
-
setError: setError,
|
|
12211
|
-
error: error,
|
|
12212
|
-
clearErrors: () => {},
|
|
12213
|
-
formState: {},
|
|
12214
|
-
data: docUploadData,
|
|
12215
|
-
isLoading: isLoading
|
|
12216
|
-
}))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
10769
|
+
}, getErrorMessage("securityDeposit")), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
12217
10770
|
label: t("Back"),
|
|
12218
10771
|
className: "ral-back-btn",
|
|
12219
10772
|
onSubmit: onGoBack
|
|
@@ -12304,11 +10857,9 @@ const RentAndLeaseCitizenDetails = ({
|
|
|
12304
10857
|
const buildAllotmentPayload = ({
|
|
12305
10858
|
propertyDetails,
|
|
12306
10859
|
applicants,
|
|
12307
|
-
additionalDetails,
|
|
12308
10860
|
tenantId,
|
|
12309
10861
|
previousApplicationNumber: _previousApplicationNumber = null
|
|
12310
10862
|
}) => {
|
|
12311
|
-
var _propertyDetails$pena;
|
|
12312
10863
|
const startDateEpoch = propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.startDate ? new Date(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.startDate).getTime() : null;
|
|
12313
10864
|
const endDateEpoch = propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.endDate ? new Date(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.endDate).getTime() : null;
|
|
12314
10865
|
return {
|
|
@@ -12317,7 +10868,7 @@ const RentAndLeaseCitizenDetails = ({
|
|
|
12317
10868
|
previousApplicationNumber: _previousApplicationNumber,
|
|
12318
10869
|
startDate: startDateEpoch,
|
|
12319
10870
|
endDate: endDateEpoch,
|
|
12320
|
-
penaltyType:
|
|
10871
|
+
penaltyType: propertyDetails.penaltyType,
|
|
12321
10872
|
workflow: {
|
|
12322
10873
|
action: "INITIATE",
|
|
12323
10874
|
comments: "",
|
|
@@ -12339,14 +10890,11 @@ const RentAndLeaseCitizenDetails = ({
|
|
|
12339
10890
|
addressId: a === null || a === void 0 ? void 0 : a.address
|
|
12340
10891
|
}
|
|
12341
10892
|
};
|
|
12342
|
-
})
|
|
12343
|
-
...(additionalDetails ? {
|
|
12344
|
-
additionalDetails: additionalDetails
|
|
12345
|
-
} : {})
|
|
10893
|
+
})
|
|
12346
10894
|
};
|
|
12347
10895
|
};
|
|
12348
10896
|
const onSubmit = async data => {
|
|
12349
|
-
var _currentStepData$
|
|
10897
|
+
var _currentStepData$Crea, _currentStepData$Crea2, _currentStepData$Crea3;
|
|
12350
10898
|
if (validateStep) {
|
|
12351
10899
|
var _Object$keys;
|
|
12352
10900
|
const validationErrors = validateStep(data);
|
|
@@ -12358,20 +10906,9 @@ const RentAndLeaseCitizenDetails = ({
|
|
|
12358
10906
|
triggerToast(t("RAL_DUPLICATE_MOBILE_ERROR"), true);
|
|
12359
10907
|
return;
|
|
12360
10908
|
}
|
|
12361
|
-
const applicationType = currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$prop = currentStepData.propertyDetails) === null || _currentStepData$prop === void 0 ? void 0 : (_currentStepData$prop2 = _currentStepData$prop.applicationType) === null || _currentStepData$prop2 === void 0 ? void 0 : _currentStepData$prop2.code;
|
|
12362
|
-
const additionalDetails = applicationType === "Legacy" ? {
|
|
12363
|
-
arrear: currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$prop3 = currentStepData.propertyDetails) === null || _currentStepData$prop3 === void 0 ? void 0 : _currentStepData$prop3.arrear,
|
|
12364
|
-
arrearDoc: currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$prop4 = currentStepData.propertyDetails) === null || _currentStepData$prop4 === void 0 ? void 0 : _currentStepData$prop4.arrearDoc,
|
|
12365
|
-
arrearEndDate: currentStepData !== null && currentStepData !== void 0 && (_currentStepData$prop5 = currentStepData.propertyDetails) !== null && _currentStepData$prop5 !== void 0 && _currentStepData$prop5.arrearEndDate ? new Date(currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$prop6 = currentStepData.propertyDetails) === null || _currentStepData$prop6 === void 0 ? void 0 : _currentStepData$prop6.arrearEndDate).getTime() : null,
|
|
12366
|
-
arrearStartDate: currentStepData !== null && currentStepData !== void 0 && (_currentStepData$prop7 = currentStepData.propertyDetails) !== null && _currentStepData$prop7 !== void 0 && _currentStepData$prop7.arrearStartDate ? new Date(currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$prop8 = currentStepData.propertyDetails) === null || _currentStepData$prop8 === void 0 ? void 0 : _currentStepData$prop8.arrearStartDate).getTime() : null,
|
|
12367
|
-
arrearReason: currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$prop9 = currentStepData.propertyDetails) === null || _currentStepData$prop9 === void 0 ? void 0 : (_currentStepData$prop0 = _currentStepData$prop9.arrearReason) === null || _currentStepData$prop0 === void 0 ? void 0 : _currentStepData$prop0.code,
|
|
12368
|
-
applicationType: applicationType,
|
|
12369
|
-
remarks: currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$prop1 = currentStepData.propertyDetails) === null || _currentStepData$prop1 === void 0 ? void 0 : _currentStepData$prop1.remarks
|
|
12370
|
-
} : null;
|
|
12371
10909
|
const payload = buildAllotmentPayload({
|
|
12372
10910
|
propertyDetails: currentStepData === null || currentStepData === void 0 ? void 0 : currentStepData.propertyDetails,
|
|
12373
10911
|
applicants: data === null || data === void 0 ? void 0 : data.applicants,
|
|
12374
|
-
additionalDetails,
|
|
12375
10912
|
tenantId
|
|
12376
10913
|
});
|
|
12377
10914
|
const existingPropertyAlloted = currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$Crea = currentStepData.CreatedResponse) === null || _currentStepData$Crea === void 0 ? void 0 : (_currentStepData$Crea2 = _currentStepData$Crea.AllotmentDetails) === null || _currentStepData$Crea2 === void 0 ? void 0 : (_currentStepData$Crea3 = _currentStepData$Crea2[0]) === null || _currentStepData$Crea3 === void 0 ? void 0 : _currentStepData$Crea3.applicationNumber;
|
|
@@ -12884,7 +11421,7 @@ const NewRentAndLeaseStepFormFour = ({
|
|
|
12884
11421
|
} = CreatedResponse || {};
|
|
12885
11422
|
let formData = {};
|
|
12886
11423
|
if (id) {
|
|
12887
|
-
var _CreatedResponse$Allo, _CreatedResponse$Allo2, _CreatedResponse$Allo3, _CreatedResponse$Allo4, _updatedPropertyDetai, _updatedPropertyDetai2, _updatedPropertyDetai3,
|
|
11424
|
+
var _CreatedResponse$Allo, _CreatedResponse$Allo2, _CreatedResponse$Allo3, _CreatedResponse$Allo4, _updatedPropertyDetai, _updatedPropertyDetai2, _updatedPropertyDetai3, _CreatedResponse$Allo5, _CreatedResponse$Allo6, _CreatedResponse$Allo7, _CreatedResponse$Allo8, _CreatedResponse$Allo9, _CreatedResponse$Allo0, _CreatedResponse$Allo1, _CreatedResponse$Allo10, _CreatedResponse$Allo11, _updatedPropertyDetai4;
|
|
12888
11425
|
const originalOwners = (CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo === void 0 ? void 0 : (_CreatedResponse$Allo2 = _CreatedResponse$Allo[0]) === null || _CreatedResponse$Allo2 === void 0 ? void 0 : _CreatedResponse$Allo2.OwnerInfo) || [];
|
|
12889
11426
|
const updatedApplicants = (updatedApplicantDetails === null || updatedApplicantDetails === void 0 ? void 0 : updatedApplicantDetails.applicants) || [];
|
|
12890
11427
|
const mergedOwnerInfo = updatedApplicants.map((applicant, index) => {
|
|
@@ -12910,33 +11447,22 @@ const NewRentAndLeaseStepFormFour = ({
|
|
|
12910
11447
|
});
|
|
12911
11448
|
const rawAdditionalDetails = (CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo3 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo3 === void 0 ? void 0 : (_CreatedResponse$Allo4 = _CreatedResponse$Allo3[0]) === null || _CreatedResponse$Allo4 === void 0 ? void 0 : _CreatedResponse$Allo4.additionalDetails) || {};
|
|
12912
11449
|
const originalAdditionalDetails = Array.isArray(rawAdditionalDetails) ? rawAdditionalDetails[0] : rawAdditionalDetails;
|
|
12913
|
-
const
|
|
12914
|
-
const additionalDetails = applicationType === "Legacy" ? {
|
|
11450
|
+
const mergedAdditionalDetails = {
|
|
12915
11451
|
...originalAdditionalDetails,
|
|
12916
11452
|
...updatedPropertyDetails,
|
|
12917
|
-
|
|
12918
|
-
|
|
12919
|
-
|
|
12920
|
-
|
|
12921
|
-
propertyType: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai3 = updatedPropertyDetails.propertySpecific) === null || _updatedPropertyDetai3 === void 0 ? void 0 : _updatedPropertyDetai3.code) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.propertyType),
|
|
12922
|
-
locationType: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai4 = updatedPropertyDetails.locationType) === null || _updatedPropertyDetai4 === void 0 ? void 0 : _updatedPropertyDetai4.code) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.locationType),
|
|
12923
|
-
applicationType: applicationType,
|
|
12924
|
-
securityDeposit: null
|
|
12925
|
-
} : null;
|
|
11453
|
+
allotmentType: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai = updatedPropertyDetails.propertyType) === null || _updatedPropertyDetai === void 0 ? void 0 : _updatedPropertyDetai.code) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.allotmentType),
|
|
11454
|
+
propertyType: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai2 = updatedPropertyDetails.propertySpecific) === null || _updatedPropertyDetai2 === void 0 ? void 0 : _updatedPropertyDetai2.code) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.propertyType),
|
|
11455
|
+
locationType: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai3 = updatedPropertyDetails.locationType) === null || _updatedPropertyDetai3 === void 0 ? void 0 : _updatedPropertyDetai3.code) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.locationType)
|
|
11456
|
+
};
|
|
12926
11457
|
const allotmentIdForNewDocs = CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo5 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo5 === void 0 ? void 0 : (_CreatedResponse$Allo6 = _CreatedResponse$Allo5[0]) === null || _CreatedResponse$Allo6 === void 0 ? void 0 : _CreatedResponse$Allo6.id;
|
|
12927
11458
|
formData = {
|
|
12928
11459
|
...(CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo7 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo7 === void 0 ? void 0 : _CreatedResponse$Allo7[0]),
|
|
12929
11460
|
startDate: updatedPropertyDetails !== null && updatedPropertyDetails !== void 0 && updatedPropertyDetails.startDate ? new Date(updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.startDate).getTime() : CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo8 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo8 === void 0 ? void 0 : (_CreatedResponse$Allo9 = _CreatedResponse$Allo8[0]) === null || _CreatedResponse$Allo9 === void 0 ? void 0 : _CreatedResponse$Allo9.startDate,
|
|
12930
11461
|
endDate: updatedPropertyDetails !== null && updatedPropertyDetails !== void 0 && updatedPropertyDetails.endDate ? new Date(updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.endDate).getTime() : CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo0 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo0 === void 0 ? void 0 : (_CreatedResponse$Allo1 = _CreatedResponse$Allo0[0]) === null || _CreatedResponse$Allo1 === void 0 ? void 0 : _CreatedResponse$Allo1.endDate,
|
|
12931
|
-
penaltyType:
|
|
11462
|
+
penaltyType: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.penaltyType) || (CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo10 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo10 === void 0 ? void 0 : (_CreatedResponse$Allo11 = _CreatedResponse$Allo10[0]) === null || _CreatedResponse$Allo11 === void 0 ? void 0 : _CreatedResponse$Allo11.penaltyType),
|
|
12932
11463
|
OwnerInfo: mergedOwnerInfo,
|
|
12933
|
-
|
|
12934
|
-
|
|
12935
|
-
}),
|
|
12936
|
-
propertyId: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.propertyId) || (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai6 = updatedPropertyDetails.selectedProperty) === null || _updatedPropertyDetai6 === void 0 ? void 0 : _updatedPropertyDetai6.propertyId),
|
|
12937
|
-
...(applicationType === "Legacy" && {
|
|
12938
|
-
securityDeposit: null
|
|
12939
|
-
}),
|
|
11464
|
+
additionalDetails: [mergedAdditionalDetails],
|
|
11465
|
+
propertyId: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.propertyId) || (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai4 = updatedPropertyDetails.selectedProperty) === null || _updatedPropertyDetai4 === void 0 ? void 0 : _updatedPropertyDetai4.propertyId),
|
|
12940
11466
|
Document: updatedDocuments.map(doc => {
|
|
12941
11467
|
var _ref, _CreatedResponse$Allo12, _CreatedResponse$Allo13;
|
|
12942
11468
|
const originalDoc = ((_ref = (CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo12 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo12 === void 0 ? void 0 : (_CreatedResponse$Allo13 = _CreatedResponse$Allo12[0]) === null || _CreatedResponse$Allo13 === void 0 ? void 0 : _CreatedResponse$Allo13.Document) || []) === null || _ref === void 0 ? void 0 : _ref.find(d => d.documentUid === (doc === null || doc === void 0 ? void 0 : doc.documentUid) || d.fileStoreId === (doc === null || doc === void 0 ? void 0 : doc.fileStoreId) || d.documentType === (doc === null || doc === void 0 ? void 0 : doc.documentType))) || {};
|
|
@@ -12966,7 +11492,7 @@ const NewRentAndLeaseStepFormFour = ({
|
|
|
12966
11492
|
}
|
|
12967
11493
|
};
|
|
12968
11494
|
} else {
|
|
12969
|
-
var _CreatedResponse$Allo14, _CreatedResponse$Allo15, _CreatedResponse$Allo16, _CreatedResponse$Allo17,
|
|
11495
|
+
var _CreatedResponse$Allo14, _CreatedResponse$Allo15, _CreatedResponse$Allo16, _CreatedResponse$Allo17, _updatedPropertyDetai5, _updatedPropertyDetai6, _updatedPropertyDetai7, _CreatedResponse$Allo18, _CreatedResponse$Allo19, _CreatedResponse$Allo20, _CreatedResponse$Allo21, _CreatedResponse$Allo22, _CreatedResponse$Allo23, _CreatedResponse$Allo24, _updatedPropertyDetai8;
|
|
12970
11496
|
const originalOwners = (CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo14 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo14 === void 0 ? void 0 : (_CreatedResponse$Allo15 = _CreatedResponse$Allo14[0]) === null || _CreatedResponse$Allo15 === void 0 ? void 0 : _CreatedResponse$Allo15.OwnerInfo) || [];
|
|
12971
11497
|
const updatedApplicants = (updatedApplicantDetails === null || updatedApplicantDetails === void 0 ? void 0 : updatedApplicantDetails.applicants) || [];
|
|
12972
11498
|
const mergedOwnerInfo = updatedApplicants.map((applicant, index) => {
|
|
@@ -12992,28 +11518,21 @@ const NewRentAndLeaseStepFormFour = ({
|
|
|
12992
11518
|
});
|
|
12993
11519
|
const rawAdditionalDetails = (CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo16 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo16 === void 0 ? void 0 : (_CreatedResponse$Allo17 = _CreatedResponse$Allo16[0]) === null || _CreatedResponse$Allo17 === void 0 ? void 0 : _CreatedResponse$Allo17.additionalDetails) || {};
|
|
12994
11520
|
const originalAdditionalDetails = Array.isArray(rawAdditionalDetails) ? rawAdditionalDetails[0] : rawAdditionalDetails;
|
|
12995
|
-
const
|
|
12996
|
-
const additionalDetails = applicationType === "Legacy" ? {
|
|
11521
|
+
const mergedAdditionalDetails = {
|
|
12997
11522
|
...originalAdditionalDetails,
|
|
12998
11523
|
...updatedPropertyDetails,
|
|
12999
|
-
|
|
13000
|
-
|
|
13001
|
-
|
|
13002
|
-
|
|
13003
|
-
propertyType: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai9 = updatedPropertyDetails.propertySpecific) === null || _updatedPropertyDetai9 === void 0 ? void 0 : _updatedPropertyDetai9.code) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.propertyType),
|
|
13004
|
-
locationType: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai0 = updatedPropertyDetails.locationType) === null || _updatedPropertyDetai0 === void 0 ? void 0 : _updatedPropertyDetai0.code) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.locationType),
|
|
13005
|
-
applicationType: applicationType
|
|
13006
|
-
} : null;
|
|
11524
|
+
allotmentType: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai5 = updatedPropertyDetails.propertyType) === null || _updatedPropertyDetai5 === void 0 ? void 0 : _updatedPropertyDetai5.code) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.allotmentType),
|
|
11525
|
+
propertyType: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai6 = updatedPropertyDetails.propertySpecific) === null || _updatedPropertyDetai6 === void 0 ? void 0 : _updatedPropertyDetai6.code) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.propertyType),
|
|
11526
|
+
locationType: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai7 = updatedPropertyDetails.locationType) === null || _updatedPropertyDetai7 === void 0 ? void 0 : _updatedPropertyDetai7.code) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.locationType)
|
|
11527
|
+
};
|
|
13007
11528
|
formData = {
|
|
13008
11529
|
...(CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo18 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo18 === void 0 ? void 0 : _CreatedResponse$Allo18[0]),
|
|
13009
11530
|
startDate: updatedPropertyDetails !== null && updatedPropertyDetails !== void 0 && updatedPropertyDetails.startDate ? new Date(updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.startDate).getTime() : CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo19 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo19 === void 0 ? void 0 : (_CreatedResponse$Allo20 = _CreatedResponse$Allo19[0]) === null || _CreatedResponse$Allo20 === void 0 ? void 0 : _CreatedResponse$Allo20.startDate,
|
|
13010
11531
|
endDate: updatedPropertyDetails !== null && updatedPropertyDetails !== void 0 && updatedPropertyDetails.endDate ? new Date(updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.endDate).getTime() : CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo21 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo21 === void 0 ? void 0 : (_CreatedResponse$Allo22 = _CreatedResponse$Allo21[0]) === null || _CreatedResponse$Allo22 === void 0 ? void 0 : _CreatedResponse$Allo22.endDate,
|
|
13011
|
-
penaltyType:
|
|
11532
|
+
penaltyType: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.penaltyType) || (CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo23 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo23 === void 0 ? void 0 : (_CreatedResponse$Allo24 = _CreatedResponse$Allo23[0]) === null || _CreatedResponse$Allo24 === void 0 ? void 0 : _CreatedResponse$Allo24.penaltyType),
|
|
13012
11533
|
OwnerInfo: mergedOwnerInfo,
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
}),
|
|
13016
|
-
propertyId: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.propertyId) || (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai10 = updatedPropertyDetails.selectedProperty) === null || _updatedPropertyDetai10 === void 0 ? void 0 : _updatedPropertyDetai10.propertyId),
|
|
11534
|
+
additionalDetails: [mergedAdditionalDetails],
|
|
11535
|
+
propertyId: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.propertyId) || (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai8 = updatedPropertyDetails.selectedProperty) === null || _updatedPropertyDetai8 === void 0 ? void 0 : _updatedPropertyDetai8.propertyId),
|
|
13017
11536
|
Document: updatedDocuments.map(doc => {
|
|
13018
11537
|
var _ref2, _CreatedResponse$Allo25, _CreatedResponse$Allo26;
|
|
13019
11538
|
const originalDoc = ((_ref2 = (CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo25 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo25 === void 0 ? void 0 : (_CreatedResponse$Allo26 = _CreatedResponse$Allo25[0]) === null || _CreatedResponse$Allo26 === void 0 ? void 0 : _CreatedResponse$Allo26.Document) || []) === null || _ref2 === void 0 ? void 0 : _ref2.find(d => d.documentUid === (doc === null || doc === void 0 ? void 0 : doc.documentUid) || d.fileStoreId === (doc === null || doc === void 0 ? void 0 : doc.fileStoreId) || d.documentType === (doc === null || doc === void 0 ? void 0 : doc.documentType))) || {};
|
|
@@ -13342,26 +11861,14 @@ function RentAndLeaseSelectDocument({
|
|
|
13342
11861
|
function RentAndLeaseSummary({
|
|
13343
11862
|
t
|
|
13344
11863
|
}) {
|
|
13345
|
-
var _formData$applicantDe, _formData$applicantDe2, _formData$applicantDe3, _formData$applicantDe4, _formData$documents, _formData$documents$d
|
|
11864
|
+
var _formData$applicantDe, _formData$applicantDe2, _formData$applicantDe3, _formData$applicantDe4, _formData$documents, _formData$documents$d;
|
|
13346
11865
|
const formData = useSelector(state => {
|
|
13347
11866
|
var _state$rentAndLease, _state$rentAndLease$R;
|
|
13348
11867
|
return ((_state$rentAndLease = state.rentAndLease) === null || _state$rentAndLease === void 0 ? void 0 : (_state$rentAndLease$R = _state$rentAndLease.RentAndLeaseNewApplicationFormReducer) === null || _state$rentAndLease$R === void 0 ? void 0 : _state$rentAndLease$R.formData) || {};
|
|
13349
11868
|
});
|
|
13350
11869
|
const applicantDetails = Array.isArray(formData === null || formData === void 0 ? void 0 : (_formData$applicantDe = formData.applicantDetails) === null || _formData$applicantDe === void 0 ? void 0 : _formData$applicantDe.applicants) ? (_formData$applicantDe2 = formData.applicantDetails) === null || _formData$applicantDe2 === void 0 ? void 0 : _formData$applicantDe2.applicants : formData !== null && formData !== void 0 && (_formData$applicantDe3 = formData.applicantDetails) !== null && _formData$applicantDe3 !== void 0 && _formData$applicantDe3.applicants ? [(_formData$applicantDe4 = formData.applicantDetails) === null || _formData$applicantDe4 === void 0 ? void 0 : _formData$applicantDe4.applicants] : [];
|
|
13351
11870
|
const property = (formData === null || formData === void 0 ? void 0 : formData.propertyDetails) || {};
|
|
13352
|
-
const
|
|
13353
|
-
const arrearDoc = property.arrearDoc ? [{
|
|
13354
|
-
documentType: "Arrear Doc",
|
|
13355
|
-
fileStoreId: property.arrearDoc
|
|
13356
|
-
}] : [];
|
|
13357
|
-
const docs = [...standardDocs, ...arrearDoc];
|
|
13358
|
-
const mergedDocsObject = {
|
|
13359
|
-
...(formData === null || formData === void 0 ? void 0 : formData.documents),
|
|
13360
|
-
documents: {
|
|
13361
|
-
...(formData === null || formData === void 0 ? void 0 : (_formData$documents2 = formData.documents) === null || _formData$documents2 === void 0 ? void 0 : _formData$documents2.documents),
|
|
13362
|
-
documents: docs
|
|
13363
|
-
}
|
|
13364
|
-
};
|
|
11871
|
+
const docs = (formData === null || formData === void 0 ? void 0 : (_formData$documents = formData.documents) === null || _formData$documents === void 0 ? void 0 : (_formData$documents$d = _formData$documents.documents) === null || _formData$documents$d === void 0 ? void 0 : _formData$documents$d.documents) || [];
|
|
13365
11872
|
const renderRow = (label, value) => /*#__PURE__*/React.createElement("div", {
|
|
13366
11873
|
className: "ral-summary-row"
|
|
13367
11874
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -13379,9 +11886,7 @@ function RentAndLeaseSummary({
|
|
|
13379
11886
|
securityDeposit: t("SECURITY_DEPOSIT"),
|
|
13380
11887
|
tax_applicable: t("GST_APPLICABLE"),
|
|
13381
11888
|
refundApplicableOnDiscontinuation: t("REFUND_APPLICABLE"),
|
|
13382
|
-
penaltyType: t("PENALTY_TYPE")
|
|
13383
|
-
startDate: t("RAL_START_DATE"),
|
|
13384
|
-
endDate: t("RAL_END_DATE")
|
|
11889
|
+
penaltyType: t("PENALTY_TYPE")
|
|
13385
11890
|
};
|
|
13386
11891
|
return /*#__PURE__*/React.createElement("div", {
|
|
13387
11892
|
className: "application-summary"
|
|
@@ -13402,10 +11907,7 @@ function RentAndLeaseSummary({
|
|
|
13402
11907
|
className: "ral-summary-header-row"
|
|
13403
11908
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
13404
11909
|
className: "ral-summary-heading"
|
|
13405
|
-
}, t("Properties Details"))), Object.entries(propertyLabels).
|
|
13406
|
-
var _property$application;
|
|
13407
|
-
return (property === null || property === void 0 ? void 0 : (_property$application = property.applicationType) === null || _property$application === void 0 ? void 0 : _property$application.code) !== "Legacy" || key !== "securityDeposit";
|
|
13408
|
-
}).map(([key, label]) => {
|
|
11910
|
+
}, t("Properties Details"))), Object.entries(propertyLabels).map(([key, label]) => {
|
|
13409
11911
|
var _property$selectedPro, _value, _value2;
|
|
13410
11912
|
let value = (property === null || property === void 0 ? void 0 : (_property$selectedPro = property.selectedProperty) === null || _property$selectedPro === void 0 ? void 0 : _property$selectedPro[key]) || (property === null || property === void 0 ? void 0 : property[key]);
|
|
13411
11913
|
if ((_value = value) !== null && _value !== void 0 && _value.name) value = value.name;else if ((_value2 = value) !== null && _value2 !== void 0 && _value2.code) value = value.code;
|
|
@@ -13415,17 +11917,8 @@ function RentAndLeaseSummary({
|
|
|
13415
11917
|
if (key === "tax_applicable") {
|
|
13416
11918
|
value = value === true ? t("YES") : t("NO");
|
|
13417
11919
|
}
|
|
13418
|
-
if (typeof value === "number" && (key === "startDate" || key === "endDate")) {
|
|
13419
|
-
value = Digit.DateUtils.ConvertEpochToDate(value);
|
|
13420
|
-
}
|
|
13421
11920
|
return renderRow(label, value || "NA");
|
|
13422
|
-
}))),
|
|
13423
|
-
className: "summary-section"
|
|
13424
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
13425
|
-
className: "ral-summary-header-row"
|
|
13426
|
-
}, /*#__PURE__*/React.createElement("h3", {
|
|
13427
|
-
className: "ral-summary-heading"
|
|
13428
|
-
}, t("Additional Details"))), renderRow(t("Arrears"), property === null || property === void 0 ? void 0 : property.arrear), (property === null || property === void 0 ? void 0 : property.arrearStartDate) && renderRow(t("RAL_START_DATE"), typeof property.arrearStartDate === "number" ? Digit.DateUtils.ConvertEpochToDate(property.arrearStartDate) : property.arrearStartDate), (property === null || property === void 0 ? void 0 : property.arrearEndDate) && renderRow(t("RAL_END_DATE"), typeof property.arrearEndDate === "number" ? Digit.DateUtils.ConvertEpochToDate(property.arrearEndDate) : property.arrearEndDate), (property === null || property === void 0 ? void 0 : (_property$arrearReaso = property.arrearReason) === null || _property$arrearReaso === void 0 ? void 0 : _property$arrearReaso.name) && renderRow(t("Reason"), property === null || property === void 0 ? void 0 : (_property$arrearReaso2 = property.arrearReason) === null || _property$arrearReaso2 === void 0 ? void 0 : _property$arrearReaso2.name), (property === null || property === void 0 ? void 0 : property.remarks) && renderRow(t("Remarks"), property === null || property === void 0 ? void 0 : property.remarks))), /*#__PURE__*/React.createElement(Card, {
|
|
11921
|
+
}))), /*#__PURE__*/React.createElement(Card, {
|
|
13429
11922
|
className: "summary-section"
|
|
13430
11923
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
13431
11924
|
className: "ral-summary-header-row"
|
|
@@ -13437,7 +11930,7 @@ function RentAndLeaseSummary({
|
|
|
13437
11930
|
key: index,
|
|
13438
11931
|
className: "ral-summary-doc-card"
|
|
13439
11932
|
}, /*#__PURE__*/React.createElement(RALDocuments, {
|
|
13440
|
-
value:
|
|
11933
|
+
value: formData === null || formData === void 0 ? void 0 : formData.documents,
|
|
13441
11934
|
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
13442
11935
|
index: index
|
|
13443
11936
|
})))) : /*#__PURE__*/React.createElement("div", null, t("CS_NO_DOCUMENTS_UPLOADED"))))));
|
|
@@ -15238,7 +13731,8 @@ const MyProperties = ({
|
|
|
15238
13731
|
}, /*#__PURE__*/React.createElement("div", null, header && /*#__PURE__*/React.createElement(Header, {
|
|
15239
13732
|
className: "ral-my-properties-header"
|
|
15240
13733
|
}, t(header), " (", totalCount, ")"), getPropertiesData === null || getPropertiesData === void 0 ? void 0 : getPropertiesData.map((property, index) => {
|
|
15241
|
-
var _ref,
|
|
13734
|
+
var _ref, _ref2;
|
|
13735
|
+
console.log("property", property);
|
|
15242
13736
|
return /*#__PURE__*/React.createElement(Card, {
|
|
15243
13737
|
key: index
|
|
15244
13738
|
}, (property === null || property === void 0 ? void 0 : property.registrationNumber) && /*#__PURE__*/React.createElement(KeyNote, {
|
|
@@ -15249,13 +13743,13 @@ const MyProperties = ({
|
|
|
15249
13743
|
note: (property === null || property === void 0 ? void 0 : property.applicationNumber) || t("CS_NA")
|
|
15250
13744
|
}), /*#__PURE__*/React.createElement(KeyNote, {
|
|
15251
13745
|
keyValue: t("RAL_ALLOTMENT_TYPE"),
|
|
15252
|
-
note: ((_ref = Array.isArray(property === null || property === void 0 ? void 0 :
|
|
13746
|
+
note: ((_ref = Array.isArray(property === null || property === void 0 ? void 0 : property.additionalDetails) ? property === null || property === void 0 ? void 0 : property.additionalDetails[0] : property === null || property === void 0 ? void 0 : property.additionalDetails) === null || _ref === void 0 ? void 0 : _ref.allotmentType) || t("CS_NA")
|
|
15253
13747
|
}), /*#__PURE__*/React.createElement(KeyNote, {
|
|
15254
13748
|
keyValue: t("STATUS"),
|
|
15255
13749
|
note: t(property !== null && property !== void 0 && property.expireFlag ? "Renewed" : property.status)
|
|
15256
13750
|
}), /*#__PURE__*/React.createElement(KeyNote, {
|
|
15257
13751
|
keyValue: t("RENT_LEASE_PROPERTY_NAME"),
|
|
15258
|
-
note: ((_ref2 = Array.isArray(property === null || property === void 0 ? void 0 :
|
|
13752
|
+
note: ((_ref2 = Array.isArray(property === null || property === void 0 ? void 0 : property.additionalDetails) ? property === null || property === void 0 ? void 0 : property.additionalDetails[0] : property === null || property === void 0 ? void 0 : property.additionalDetails) === null || _ref2 === void 0 ? void 0 : _ref2.propertyName) || t("CS_NA")
|
|
15259
13753
|
}), /*#__PURE__*/React.createElement("div", {
|
|
15260
13754
|
className: "ral-my-properties-actions"
|
|
15261
13755
|
}, /*#__PURE__*/React.createElement(Link, {
|