@mseva/digit-ui-module-rentandlease 1.0.46 → 1.0.47

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.
@@ -6103,6 +6103,18 @@ 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
+ };
6106
6118
  const pdfDownloadLink = (documents = {}, fileStoreId = "", format = "") => {
6107
6119
  let downloadLink = documents[fileStoreId] || "";
6108
6120
  let differentFormats = (downloadLink === null || downloadLink === void 0 ? void 0 : downloadLink.split(",")) || [];
@@ -6117,7 +6129,7 @@ const pdfDownloadLink = (documents = {}, fileStoreId = "", format = "") => {
6117
6129
  const capitalize = text => text.substr(0, 1).toUpperCase() + text.substr(1);
6118
6130
  const ulbCamel = ulb => ulb.toLowerCase().split(" ").map(capitalize).join(" ");
6119
6131
  const getAcknowledgementData = async (application, tenantInfo, t) => {
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;
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$addition1, _application$Document, _application$addition15, _application$addition16, _tenantInfo$city;
6121
6133
  const details = [];
6122
6134
  application === null || application === void 0 ? void 0 : (_application$OwnerInf = application.OwnerInfo) === null || _application$OwnerInf === void 0 ? void 0 : _application$OwnerInf.forEach((owner, index) => {
6123
6135
  var _owner$permanentAddre, _owner$permanentAddre2, _owner$correspondence, _owner$correspondence2;
@@ -6181,11 +6193,39 @@ const getAcknowledgementData = async (application, tenantInfo, t) => {
6181
6193
  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)}`
6182
6194
  }] : [])]
6183
6195
  });
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) => ({
6196
+ if ((application === null || application === void 0 ? void 0 : (_application$addition1 = application.additionalDetails) === null || _application$addition1 === void 0 ? void 0 : _application$addition1.applicationType) === "Legacy") {
6197
+ var _application$addition10, _application$addition11, _application$addition12, _application$addition13, _application$addition14;
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$addition10 = application.additionalDetails) === null || _application$addition10 === void 0 ? void 0 : _application$addition10.arrear) || "NA"
6203
+ }, {
6204
+ title: t("RAL_START_DATE"),
6205
+ value: convertEpochToDate(application === null || application === void 0 ? void 0 : (_application$addition11 = application.additionalDetails) === null || _application$addition11 === void 0 ? void 0 : _application$addition11.arrearStartDate) || "NA"
6206
+ }, {
6207
+ title: t("RAL_END_DATE"),
6208
+ value: convertEpochToDate(application === null || application === void 0 ? void 0 : (_application$addition12 = application.additionalDetails) === null || _application$addition12 === void 0 ? void 0 : _application$addition12.arrearEndDate) || "NA"
6209
+ }, {
6210
+ title: t("Reason"),
6211
+ value: (application === null || application === void 0 ? void 0 : (_application$addition13 = application.additionalDetails) === null || _application$addition13 === void 0 ? void 0 : _application$addition13.arrearReason) || "NA"
6212
+ }, {
6213
+ title: t("Remarks"),
6214
+ value: (application === null || application === void 0 ? void 0 : (_application$addition14 = application.additionalDetails) === null || _application$addition14 === void 0 ? void 0 : _application$addition14.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) => ({
6185
6219
  title: t(`${doc.documentType}`) || "NA",
6186
6220
  value: " ",
6187
6221
  link: doc.fileStoreId ? Digit.Utils.getFileUrl(doc.fileStoreId) : ""
6188
- }));
6222
+ }))) || [];
6223
+ const arrearDoc = application !== null && application !== void 0 && (_application$addition15 = application.additionalDetails) !== null && _application$addition15 !== void 0 && _application$addition15.arrearDoc ? [{
6224
+ title: t("Arrear Doc"),
6225
+ value: " ",
6226
+ link: Digit.Utils.getFileUrl(application.additionalDetails.arrearDoc)
6227
+ }] : [];
6228
+ const docDetails = [...standardDocs, ...arrearDoc];
6189
6229
  details.push({
6190
6230
  title: t("BPA_APPLICATION_DOCUMENTS"),
6191
6231
  values: docDetails !== null && docDetails !== void 0 && docDetails.length ? docDetails : [{
@@ -6193,7 +6233,7 @@ const getAcknowledgementData = async (application, tenantInfo, t) => {
6193
6233
  value: "NA"
6194
6234
  }]
6195
6235
  });
6196
- const imageURL = application === null || application === void 0 ? void 0 : (_application$addition1 = application.additionalDetails) === null || _application$addition1 === void 0 ? void 0 : _application$addition1.propertyImage;
6236
+ const imageURL = application === null || application === void 0 ? void 0 : (_application$addition16 = application.additionalDetails) === null || _application$addition16 === void 0 ? void 0 : _application$addition16.propertyImage;
6197
6237
  return {
6198
6238
  t: t,
6199
6239
  tenantId: tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code,
@@ -6289,7 +6329,7 @@ var b = "function" === typeof Symbol && Symbol.for,
6289
6329
  k = b ? Symbol.for("react.context") : 60110,
6290
6330
  l = b ? Symbol.for("react.async_mode") : 60111,
6291
6331
  m = b ? Symbol.for("react.concurrent_mode") : 60111,
6292
- n = b ? Symbol.for("react.forward_ref") : 60112,
6332
+ n$1 = b ? Symbol.for("react.forward_ref") : 60112,
6293
6333
  p = b ? Symbol.for("react.suspense") : 60113,
6294
6334
  q = b ? Symbol.for("react.suspense_list") : 60120,
6295
6335
  r = b ? Symbol.for("react.memo") : 60115,
@@ -6314,7 +6354,7 @@ function z(a) {
6314
6354
  default:
6315
6355
  switch (a = a && a.$$typeof, a) {
6316
6356
  case k:
6317
- case n:
6357
+ case n$1:
6318
6358
  case t:
6319
6359
  case r:
6320
6360
  case h:
@@ -6336,7 +6376,7 @@ var ConcurrentMode = m;
6336
6376
  var ContextConsumer = k;
6337
6377
  var ContextProvider = h;
6338
6378
  var Element = c;
6339
- var ForwardRef = n;
6379
+ var ForwardRef = n$1;
6340
6380
  var Fragment = e;
6341
6381
  var Lazy = t;
6342
6382
  var Memo = r;
@@ -6358,7 +6398,7 @@ var isElement = function (a) {
6358
6398
  return "object" === typeof a && null !== a && a.$$typeof === c;
6359
6399
  };
6360
6400
  var isForwardRef = function (a) {
6361
- return z(a) === n;
6401
+ return z(a) === n$1;
6362
6402
  };
6363
6403
  var isFragment = function (a) {
6364
6404
  return z(a) === e;
@@ -6382,7 +6422,7 @@ var isSuspense = function (a) {
6382
6422
  return z(a) === p;
6383
6423
  };
6384
6424
  var isValidElementType = function (a) {
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);
6425
+ 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$1 || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
6386
6426
  };
6387
6427
  var typeOf = z;
6388
6428
  var reactIs_production_min = {
@@ -7546,7 +7586,7 @@ function NewApplicationTimeline({
7546
7586
  }
7547
7587
 
7548
7588
  const RALApplicationDetails = () => {
7549
- var _applicationData$Owne, _propertyDetails$fees, _propertyDetails$fees2, _propertyDetails$fees3, _propertyDetails$fees4, _applicationData$Docu;
7589
+ var _applicationData$Owne, _propertyDetails$fees, _propertyDetails$fees2, _propertyDetails$fees3, _propertyDetails$fees4;
7550
7590
  const {
7551
7591
  t
7552
7592
  } = useTranslation();
@@ -7600,7 +7640,6 @@ const RALApplicationDetails = () => {
7600
7640
  setLoader(false);
7601
7641
  }, 0);
7602
7642
  } catch (error) {
7603
- console.error("Error generating acknowledgement:", error);
7604
7643
  setLoader(false);
7605
7644
  }
7606
7645
  };
@@ -7668,8 +7707,22 @@ const RALApplicationDetails = () => {
7668
7707
  const getDate = epoch => {
7669
7708
  return Digit.DateUtils.ConvertEpochToDate(epoch);
7670
7709
  };
7710
+ const tValue = value => {
7711
+ if (value === 0 || value === "0") return "0";
7712
+ if (!value) return t("CS_NA");
7713
+ if (typeof value === "object" && value !== null) {
7714
+ return t((value === null || value === void 0 ? void 0 : value.name) || (value === null || value === void 0 ? void 0 : value.code) || "CS_NA");
7715
+ }
7716
+ return t(value);
7717
+ };
7671
7718
  const rawAdditionalDetails = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.additionalDetails) || {};
7672
- const propertyDetails = Array.isArray(rawAdditionalDetails) ? rawAdditionalDetails[0] : rawAdditionalDetails;
7719
+ console.log("rawAdditionalDetails", rawAdditionalDetails);
7720
+ const propertyDetails = Array.isArray(rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.propertyDetails) ? rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.propertyDetails[0] : rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.propertyDetails;
7721
+ const arrearDoc = rawAdditionalDetails !== null && rawAdditionalDetails !== void 0 && rawAdditionalDetails.arrearDoc ? [{
7722
+ documentType: "Arrear Doc",
7723
+ fileStoreId: rawAdditionalDetails.arrearDoc
7724
+ }] : [];
7725
+ const allDocuments = [...((applicationData === null || applicationData === void 0 ? void 0 : applicationData.Document) || []), ...arrearDoc];
7673
7726
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
7674
7727
  className: "cardHeaderWithOptions ral-app-details-header"
7675
7728
  }, /*#__PURE__*/React.createElement(Header, {
@@ -7690,19 +7743,19 @@ const RALApplicationDetails = () => {
7690
7743
  className: "ral-app-details-owner-header"
7691
7744
  }, t("RAL_APPLICANT"), " ", index + 1), /*#__PURE__*/React.createElement(Row, {
7692
7745
  label: t("PT_OWNERSHIP_INFO_NAME"),
7693
- text: (owner === null || owner === void 0 ? void 0 : owner.name) || t("CS_NA")
7746
+ text: tValue(owner === null || owner === void 0 ? void 0 : owner.name)
7694
7747
  }), /*#__PURE__*/React.createElement(Row, {
7695
7748
  label: t("CORE_COMMON_PROFILE_EMAIL"),
7696
- text: (owner === null || owner === void 0 ? void 0 : owner.emailId) || t("CS_NA")
7749
+ text: tValue(owner === null || owner === void 0 ? void 0 : owner.emailId)
7697
7750
  }), /*#__PURE__*/React.createElement(Row, {
7698
7751
  label: t("CORE_MOBILE_NUMBER"),
7699
- text: (owner === null || owner === void 0 ? void 0 : owner.mobileNo) || t("CS_NA")
7752
+ text: tValue(owner === null || owner === void 0 ? void 0 : owner.mobileNo)
7700
7753
  }), /*#__PURE__*/React.createElement(Row, {
7701
7754
  label: t("PT_COMMON_COL_ADDRESS"),
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")
7755
+ text: tValue((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))
7703
7756
  }), /*#__PURE__*/React.createElement(Row, {
7704
7757
  label: t("CORE_COMMON_PINCODE"),
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")
7758
+ text: tValue((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))
7706
7759
  }));
7707
7760
  }) : /*#__PURE__*/React.createElement(Row, {
7708
7761
  label: t("OWNER"),
@@ -7711,66 +7764,83 @@ const RALApplicationDetails = () => {
7711
7764
  className: "ral-card-subheader-24"
7712
7765
  }, t("ES_TITILE_PROPERTY_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
7713
7766
  label: t("APPLICATION_NUMBER"),
7714
- text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationNumber) || t("CS_NA")
7767
+ text: tValue(applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationNumber)
7715
7768
  }), /*#__PURE__*/React.createElement(Row, {
7716
7769
  label: t("RENT_LEASE_PROPERTY_ID"),
7717
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyId) || t("CS_NA")
7770
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyId)
7718
7771
  }), /*#__PURE__*/React.createElement(Row, {
7719
7772
  label: t("RENT_LEASE_PROPERTY_NAME"),
7720
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyName) || t("CS_NA")
7773
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyName)
7721
7774
  }), /*#__PURE__*/React.createElement(Row, {
7722
7775
  label: t("RAL_ALLOTMENT_TYPE"),
7723
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.allotmentType) || t("CS_NA")
7776
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.allotmentType)
7724
7777
  }), /*#__PURE__*/React.createElement(Row, {
7725
7778
  label: t("RENT_LEASE_PROPERTY_TYPE"),
7726
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyType) || t("CS_NA")
7779
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyType)
7727
7780
  }), /*#__PURE__*/React.createElement(Row, {
7728
7781
  label: t("WS_PROPERTY_ADDRESS_LABEL"),
7729
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address) || t("CS_NA")
7782
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address)
7730
7783
  }), /*#__PURE__*/React.createElement(Row, {
7731
7784
  label: t("RAL_PROPERTY_AMOUNT"),
7732
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.baseRent) || t("CS_NA")
7785
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.baseRent)
7733
7786
  }), /*#__PURE__*/React.createElement(Row, {
7734
7787
  label: t("PENALTY_TYPE"),
7735
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.penaltyType) || t("CS_NA")
7788
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.penaltyType)
7736
7789
  }), /*#__PURE__*/React.createElement(Row, {
7737
7790
  label: t("RAL_FEE_CYCLE"),
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")
7791
+ text: propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.feesPeriodCycle ? tValue((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")
7739
7792
  }), /*#__PURE__*/React.createElement(Row, {
7740
7793
  label: t("PROPERTY_SIZE"),
7741
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertySizeOrArea) || t("CS_NA")
7794
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertySizeOrArea)
7742
7795
  }), /*#__PURE__*/React.createElement(Row, {
7743
7796
  label: t("RENT_LEASE_LOCATION_TYPE"),
7744
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.locationType) || t("CS_NA")
7797
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.locationType)
7745
7798
  }), /*#__PURE__*/React.createElement(Row, {
7746
7799
  label: t("RAL_START_DATE"),
7747
- text: getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.startDate) || t("CS_NA")
7800
+ text: tValue(getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.startDate))
7748
7801
  }), /*#__PURE__*/React.createElement(Row, {
7749
7802
  label: t("RAL_END_DATE"),
7750
- text: getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.endDate) || t("CS_NA")
7803
+ text: tValue(getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.endDate))
7751
7804
  }), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) > 0 && /*#__PURE__*/React.createElement(Row, {
7752
7805
  label: t("RAL_PROPERTY_PENALTY"),
7753
- text: applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted
7806
+ text: tValue(applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted)
7754
7807
  }), /*#__PURE__*/React.createElement(Row, {
7755
7808
  label: t("SECURITY_DEPOSIT"),
7756
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit) || t("CS_NA")
7809
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit)
7757
7810
  }), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) - (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit) > 0 && /*#__PURE__*/React.createElement(Row, {
7758
7811
  label: t("RAL_AMOUNT_TO_TAKE_FROM_CITIZEN"),
7759
- text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) - (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit)
7812
+ text: tValue((applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) - (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit))
7760
7813
  }), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund) > 0 && /*#__PURE__*/React.createElement(Row, {
7761
7814
  label: t("RAL_AMOUNT_TO_REFUND"),
7762
- text: applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund
7815
+ text: tValue(applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund)
7763
7816
  }), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) && /*#__PURE__*/React.createElement(Row, {
7764
7817
  label: t("RENT_LEASE_TRADE_LICENSE_NUMBER"),
7765
- text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) || t("CS_NA")
7766
- })), /*#__PURE__*/React.createElement(CardSubHeader, {
7818
+ text: tValue(applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber)
7819
+ })), (rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.applicationType) === "Legacy" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardSubHeader, {
7820
+ className: "ral-card-subheader-24"
7821
+ }, t("RAL_ARREAR_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
7822
+ label: t("Arrears"),
7823
+ text: tValue(rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.arrear)
7824
+ }), /*#__PURE__*/React.createElement(Row, {
7825
+ label: t("RAL_START_DATE"),
7826
+ text: rawAdditionalDetails !== null && rawAdditionalDetails !== void 0 && rawAdditionalDetails.arrearStartDate ? getDate(rawAdditionalDetails.arrearStartDate) : t("CS_NA")
7827
+ }), /*#__PURE__*/React.createElement(Row, {
7828
+ label: t("RAL_END_DATE"),
7829
+ text: rawAdditionalDetails !== null && rawAdditionalDetails !== void 0 && rawAdditionalDetails.arrearEndDate ? getDate(rawAdditionalDetails.arrearEndDate) : t("CS_NA")
7830
+ }), /*#__PURE__*/React.createElement(Row, {
7831
+ label: t("Reason"),
7832
+ text: tValue(rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.arrearReason)
7833
+ }), /*#__PURE__*/React.createElement(Row, {
7834
+ label: t("Remarks"),
7835
+ text: tValue(rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.remarks)
7836
+ }))), /*#__PURE__*/React.createElement(CardSubHeader, {
7767
7837
  className: "ral-card-subheader-24-margin"
7768
7838
  }, t("CS_COMMON_DOCUMENTS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Card, {
7769
7839
  className: "ral-app-details-docs-card"
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", {
7840
+ }, (allDocuments === null || allDocuments === void 0 ? void 0 : allDocuments.length) > 0 ? allDocuments.map((doc, index) => /*#__PURE__*/React.createElement("div", {
7771
7841
  key: index
7772
7842
  }, /*#__PURE__*/React.createElement(RALDocuments, {
7773
- value: applicationData.Document,
7843
+ value: allDocuments,
7774
7844
  Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
7775
7845
  index: index
7776
7846
  }), t(doc === null || doc === void 0 ? void 0 : doc.documentType))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
@@ -8175,8 +8245,8 @@ const DesktopInbox = ({
8175
8245
  Cell: ({
8176
8246
  row
8177
8247
  }) => {
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"]}`);
8248
+ var _row$original4, _row$original4$search, _row$original4$search2, _row$original4$search3, _row$original4$search4;
8249
+ 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.propertyDetails) === null || _row$original4$search3 === void 0 ? void 0 : (_row$original4$search4 = _row$original4$search3[0]) === null || _row$original4$search4 === void 0 ? void 0 : _row$original4$search4["propertyName"]}`);
8180
8250
  },
8181
8251
  mobileCell: original => {
8182
8252
  var _original$searchData2, _original$searchData3, _original$searchData4;
@@ -8188,11 +8258,11 @@ const DesktopInbox = ({
8188
8258
  row
8189
8259
  }) => {
8190
8260
  var _row$original5, _row$original5$search, _row$original5$search2, _row$original5$search3;
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"]}`);
8261
+ 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.propertyDetails[0]) === null || _row$original5$search3 === void 0 ? void 0 : _row$original5$search3["allotmentType"]}`);
8192
8262
  },
8193
8263
  mobileCell: original => {
8194
8264
  var _original$searchData5, _original$searchData6, _original$searchData7;
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"]}`);
8265
+ 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.propertyDetails[0]) === null || _original$searchData7 === void 0 ? void 0 : _original$searchData7["allotmentType"]}`);
8196
8266
  }
8197
8267
  }, {
8198
8268
  Header: t("RENT_AMOUNT "),
@@ -8200,11 +8270,11 @@ const DesktopInbox = ({
8200
8270
  row
8201
8271
  }) => {
8202
8272
  var _row$original6, _row$original6$search, _row$original6$search2, _row$original6$search3;
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"]}`);
8273
+ 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.propertyDetails[0]) === null || _row$original6$search3 === void 0 ? void 0 : _row$original6$search3["baseRent"]}`);
8204
8274
  },
8205
8275
  mobileCell: original => {
8206
8276
  var _original$searchData8, _original$searchData9, _original$searchData0;
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"]) || "-";
8277
+ 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.propertyDetails[0]) === null || _original$searchData0 === void 0 ? void 0 : _original$searchData0["baseRent"]) || "-";
8208
8278
  }
8209
8279
  }, {
8210
8280
  Header: t("CS_CREATED_DATE"),
@@ -8510,19 +8580,19 @@ const MobileInbox = ({
8510
8580
  Header: t("RENT_LEASE_PROPERTY_NAME"),
8511
8581
  mobileCell: original => {
8512
8582
  var _original$searchData2, _original$searchData3, _original$searchData4;
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"]);
8583
+ 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.propertyDetails[0]) === null || _original$searchData4 === void 0 ? void 0 : _original$searchData4["propertyName"]);
8514
8584
  }
8515
8585
  }, {
8516
8586
  Header: t("RAL_ALLOTMENT_TYPE"),
8517
8587
  mobileCell: original => {
8518
8588
  var _original$searchData5, _original$searchData6, _original$searchData7;
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"]);
8589
+ 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.propertyDetails[0]) === null || _original$searchData7 === void 0 ? void 0 : _original$searchData7["allotmentType"]);
8520
8590
  }
8521
8591
  }, {
8522
8592
  Header: t("RENT_AMOUNT "),
8523
8593
  mobileCell: original => {
8524
8594
  var _original$searchData8, _original$searchData9, _original$searchData0;
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"]) || "-");
8595
+ 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.propertyDetails[0]) === null || _original$searchData0 === void 0 ? void 0 : _original$searchData0["baseRent"]) || "-");
8526
8596
  }
8527
8597
  }, {
8528
8598
  Header: t("CS_CREATED_DATE"),
@@ -9145,7 +9215,7 @@ const RALModal = ({
9145
9215
  };
9146
9216
 
9147
9217
  const RALApplicationDetails$1 = () => {
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;
9218
+ 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;
9149
9219
  const {
9150
9220
  t
9151
9221
  } = useTranslation();
@@ -9207,7 +9277,12 @@ const RALApplicationDetails$1 = () => {
9207
9277
  return () => clearTimeout(timer);
9208
9278
  };
9209
9279
  const rawAdditionalDetails = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.additionalDetails) || {};
9210
- const propertyDetails = Array.isArray(rawAdditionalDetails) ? rawAdditionalDetails[0] : rawAdditionalDetails;
9280
+ const propertyDetails = Array.isArray(rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.propertyDetails) ? rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.propertyDetails[0] : rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.propertyDetails;
9281
+ const arrearDoc = rawAdditionalDetails !== null && rawAdditionalDetails !== void 0 && rawAdditionalDetails.arrearDoc ? [{
9282
+ documentType: "Arrear Doc",
9283
+ fileStoreId: rawAdditionalDetails.arrearDoc
9284
+ }] : [];
9285
+ const allDocuments = [...((applicationData === null || applicationData === void 0 ? void 0 : applicationData.Document) || []), ...arrearDoc];
9211
9286
  let user = Digit.UserService.getUser();
9212
9287
  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);
9213
9288
  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 => {
@@ -9249,6 +9324,14 @@ const RALApplicationDetails$1 = () => {
9249
9324
  const getDate = epoch => {
9250
9325
  return Digit.DateUtils.ConvertEpochToDate(epoch);
9251
9326
  };
9327
+ const tValue = value => {
9328
+ if (value === 0 || value === "0") return "0";
9329
+ if (!value) return t("CS_NA");
9330
+ if (typeof value === "object" && value !== null) {
9331
+ return t((value === null || value === void 0 ? void 0 : value.name) || (value === null || value === void 0 ? void 0 : value.code) || "CS_NA");
9332
+ }
9333
+ return t(value);
9334
+ };
9252
9335
  function onActionSelect(action) {
9253
9336
  var _ref, _action$state, _filterRoles$;
9254
9337
  const payload = {
@@ -9432,6 +9515,7 @@ const RALApplicationDetails$1 = () => {
9432
9515
  });
9433
9516
  }
9434
9517
  };
9518
+ console.log("rawAdditionalDetails", rawAdditionalDetails);
9435
9519
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
9436
9520
  className: "cardHeaderWithOptions ral-app-details-header"
9437
9521
  }, /*#__PURE__*/React.createElement(Header, {
@@ -9447,19 +9531,19 @@ const RALApplicationDetails$1 = () => {
9447
9531
  className: "ral-app-details-owner-header"
9448
9532
  }, t("RAL_APPLICANT"), " ", index + 1), /*#__PURE__*/React.createElement(Row, {
9449
9533
  label: t("PT_OWNERSHIP_INFO_NAME"),
9450
- text: (owner === null || owner === void 0 ? void 0 : owner.name) || t("CS_NA")
9534
+ text: tValue(owner === null || owner === void 0 ? void 0 : owner.name)
9451
9535
  }), /*#__PURE__*/React.createElement(Row, {
9452
9536
  label: t("CORE_COMMON_PROFILE_EMAIL"),
9453
- text: (owner === null || owner === void 0 ? void 0 : owner.emailId) || t("CS_NA")
9537
+ text: tValue(owner === null || owner === void 0 ? void 0 : owner.emailId)
9454
9538
  }), /*#__PURE__*/React.createElement(Row, {
9455
9539
  label: t("CORE_MOBILE_NUMBER"),
9456
- text: (owner === null || owner === void 0 ? void 0 : owner.mobileNo) || t("CS_NA")
9540
+ text: tValue(owner === null || owner === void 0 ? void 0 : owner.mobileNo)
9457
9541
  }), /*#__PURE__*/React.createElement(Row, {
9458
9542
  label: t("PT_COMMON_COL_ADDRESS"),
9459
- 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")
9543
+ text: tValue((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))
9460
9544
  }), /*#__PURE__*/React.createElement(Row, {
9461
9545
  label: t("CORE_COMMON_PINCODE"),
9462
- 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")
9546
+ text: tValue((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))
9463
9547
  }));
9464
9548
  }) : /*#__PURE__*/React.createElement(Row, {
9465
9549
  label: t("OWNER"),
@@ -9468,69 +9552,86 @@ const RALApplicationDetails$1 = () => {
9468
9552
  className: "ral-card-subheader-24"
9469
9553
  }, t("ES_TITILE_PROPERTY_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, (applicationData === null || applicationData === void 0 ? void 0 : applicationData.registrationNumber) && /*#__PURE__*/React.createElement(Row, {
9470
9554
  label: t("RAL_REGISTRATION_NUMBER"),
9471
- text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.registrationNumber) || t("CS_NA")
9555
+ text: tValue(applicationData === null || applicationData === void 0 ? void 0 : applicationData.registrationNumber)
9472
9556
  }), /*#__PURE__*/React.createElement(Row, {
9473
9557
  label: t("APPLICATION_NUMBER"),
9474
- text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationNumber) || t("CS_NA")
9558
+ text: tValue(applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationNumber)
9475
9559
  }), /*#__PURE__*/React.createElement(Row, {
9476
9560
  label: t("RENT_LEASE_PROPERTY_ID"),
9477
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyId) || t("CS_NA")
9561
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyId)
9478
9562
  }), /*#__PURE__*/React.createElement(Row, {
9479
9563
  label: t("RENT_LEASE_PROPERTY_NAME"),
9480
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyName) || t("CS_NA")
9564
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyName)
9481
9565
  }), /*#__PURE__*/React.createElement(Row, {
9482
9566
  label: t("RAL_ALLOTMENT_TYPE"),
9483
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.allotmentType) || t("CS_NA")
9567
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.allotmentType)
9484
9568
  }), /*#__PURE__*/React.createElement(Row, {
9485
9569
  label: t("RENT_LEASE_PROPERTY_TYPE"),
9486
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyType) || t("CS_NA")
9570
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertyType)
9487
9571
  }), /*#__PURE__*/React.createElement(Row, {
9488
9572
  label: t("WS_PROPERTY_ADDRESS_LABEL"),
9489
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address) || t("CS_NA")
9573
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.address)
9490
9574
  }), /*#__PURE__*/React.createElement(Row, {
9491
9575
  label: t("RAL_PROPERTY_AMOUNT"),
9492
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.baseRent) || t("CS_NA")
9576
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.baseRent)
9493
9577
  }), /*#__PURE__*/React.createElement(Row, {
9494
9578
  label: t("PENALTY_TYPE"),
9495
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.penaltyType) || t("CS_NA")
9579
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.penaltyType)
9496
9580
  }), /*#__PURE__*/React.createElement(Row, {
9497
9581
  label: t("RAL_FEE_CYCLE"),
9498
- 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")
9582
+ text: propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.feesPeriodCycle ? tValue((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")
9499
9583
  }), /*#__PURE__*/React.createElement(Row, {
9500
9584
  label: t("PROPERTY_SIZE"),
9501
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertySizeOrArea) || t("CS_NA")
9585
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.propertySizeOrArea)
9502
9586
  }), /*#__PURE__*/React.createElement(Row, {
9503
9587
  label: t("RENT_LEASE_LOCATION_TYPE"),
9504
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.locationType) || t("CS_NA")
9588
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.locationType)
9505
9589
  }), /*#__PURE__*/React.createElement(Row, {
9506
9590
  label: t("RAL_START_DATE"),
9507
- text: getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.startDate) || t("CS_NA")
9591
+ text: tValue(getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.startDate))
9508
9592
  }), /*#__PURE__*/React.createElement(Row, {
9509
9593
  label: t("RAL_END_DATE"),
9510
- text: getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.endDate) || t("CS_NA")
9594
+ text: tValue(getDate(applicationData === null || applicationData === void 0 ? void 0 : applicationData.endDate))
9511
9595
  }), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) > 0 && /*#__PURE__*/React.createElement(Row, {
9512
9596
  label: t("RAL_PROPERTY_PENALTY"),
9513
- text: applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted
9597
+ text: tValue(applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted)
9514
9598
  }), /*#__PURE__*/React.createElement(Row, {
9515
9599
  label: t("SECURITY_DEPOSIT"),
9516
- text: (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit) || t("CS_NA")
9600
+ text: tValue(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit)
9517
9601
  }), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) - (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit) > 0 && /*#__PURE__*/React.createElement(Row, {
9518
9602
  label: t("RAL_AMOUNT_TO_TAKE_FROM_CITIZEN"),
9519
- text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) - (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit)
9603
+ text: tValue((applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeDeducted) - (propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.securityDeposit))
9520
9604
  }), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund) > 0 && /*#__PURE__*/React.createElement(Row, {
9521
9605
  label: t("RAL_AMOUNT_TO_REFUND"),
9522
- text: applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund
9606
+ text: tValue(applicationData === null || applicationData === void 0 ? void 0 : applicationData.amountToBeRefund)
9523
9607
  }), (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) && /*#__PURE__*/React.createElement(Row, {
9524
9608
  label: t("RENT_LEASE_TRADE_LICENSE_NUMBER"),
9525
- text: (applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber) || t("CS_NA")
9526
- })), /*#__PURE__*/React.createElement(CardSubHeader, {
9609
+ text: tValue(applicationData === null || applicationData === void 0 ? void 0 : applicationData.tradeLicenseNumber)
9610
+ })), (rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.applicationType) === "Legacy" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardSubHeader, {
9611
+ className: "ral-card-subheader-24"
9612
+ }, t("RAL_ARREAR_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
9613
+ label: t("Arrears"),
9614
+ text: tValue(rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.arrear)
9615
+ }), /*#__PURE__*/React.createElement(Row, {
9616
+ label: t("RAL_START_DATE"),
9617
+ text: rawAdditionalDetails !== null && rawAdditionalDetails !== void 0 && rawAdditionalDetails.arrearStartDate ? getDate(rawAdditionalDetails.arrearStartDate) : t("CS_NA")
9618
+ }), /*#__PURE__*/React.createElement(Row, {
9619
+ label: t("RAL_END_DATE"),
9620
+ text: rawAdditionalDetails !== null && rawAdditionalDetails !== void 0 && rawAdditionalDetails.arrearEndDate ? getDate(rawAdditionalDetails.arrearEndDate) : t("CS_NA")
9621
+ }), /*#__PURE__*/React.createElement(Row, {
9622
+ label: t("Reason"),
9623
+ text: tValue(rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.arrearReason)
9624
+ }), /*#__PURE__*/React.createElement(Row, {
9625
+ label: t("Remarks"),
9626
+ text: tValue(rawAdditionalDetails === null || rawAdditionalDetails === void 0 ? void 0 : rawAdditionalDetails.remarks)
9627
+ }))), /*#__PURE__*/React.createElement(CardSubHeader, {
9527
9628
  className: "ral-card-subheader-24-margin"
9528
9629
  }, t("CS_COMMON_DOCUMENTS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Card, {
9529
9630
  className: "ral-app-details-docs-card"
9530
- }, (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", {
9631
+ }, (allDocuments === null || allDocuments === void 0 ? void 0 : allDocuments.length) > 0 ? allDocuments.map((doc, index) => /*#__PURE__*/React.createElement("div", {
9531
9632
  key: index
9532
9633
  }, /*#__PURE__*/React.createElement(RALDocuments, {
9533
- value: applicationData.Document,
9634
+ value: allDocuments,
9534
9635
  Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
9535
9636
  index: index
9536
9637
  }), t(doc === null || doc === void 0 ? void 0 : doc.documentType))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
@@ -9627,7 +9728,7 @@ const EmployeeApp = ({
9627
9728
  code: "ASSIGNED_TO_ALL",
9628
9729
  name: "ES_INBOX_ASSIGNED_TO_ALL"
9629
9730
  },
9630
- services: ["RENT_N_LEASE_NEW"],
9731
+ services: ["RENT_N_LEASE_NEW", "RENT_AND_LEASE_LG"],
9631
9732
  applicationStatus: [],
9632
9733
  locality: []
9633
9734
  }
@@ -9655,7 +9756,7 @@ const EmployeeApp = ({
9655
9756
  component: () => /*#__PURE__*/React.createElement(Inbox, {
9656
9757
  useNewInboxAPI: true,
9657
9758
  parentRoute: path,
9658
- businessService: "RENT_N_LEASE_NEW",
9759
+ businessService: "RENT_N_LEASE_NEW,RENT_AND_LEASE_LG",
9659
9760
  moduleCode: "RAL",
9660
9761
  filterComponent: "RAL_INBOX_FILTER",
9661
9762
  initialStates: inboxInitialState,
@@ -10339,29 +10440,1087 @@ const NewRentAndLeaseStepperForm = ({
10339
10440
  }));
10340
10441
  };
10341
10442
 
10443
+ var exif = createCommonjsModule(function (module, exports) {
10444
+ (function () {
10445
+ var debug = false;
10446
+ var EXIF = function (obj) {
10447
+ if (obj instanceof EXIF) return obj;
10448
+ if (!(this instanceof EXIF)) return new EXIF(obj);
10449
+ this.EXIFwrapped = obj;
10450
+ };
10451
+ {
10452
+ if ( module.exports) {
10453
+ exports = module.exports = EXIF;
10454
+ }
10455
+ exports.EXIF = EXIF;
10456
+ }
10457
+ var ExifTags = EXIF.Tags = {
10458
+ 0x9000: "ExifVersion",
10459
+ 0xA000: "FlashpixVersion",
10460
+ 0xA001: "ColorSpace",
10461
+ 0xA002: "PixelXDimension",
10462
+ 0xA003: "PixelYDimension",
10463
+ 0x9101: "ComponentsConfiguration",
10464
+ 0x9102: "CompressedBitsPerPixel",
10465
+ 0x927C: "MakerNote",
10466
+ 0x9286: "UserComment",
10467
+ 0xA004: "RelatedSoundFile",
10468
+ 0x9003: "DateTimeOriginal",
10469
+ 0x9004: "DateTimeDigitized",
10470
+ 0x9290: "SubsecTime",
10471
+ 0x9291: "SubsecTimeOriginal",
10472
+ 0x9292: "SubsecTimeDigitized",
10473
+ 0x829A: "ExposureTime",
10474
+ 0x829D: "FNumber",
10475
+ 0x8822: "ExposureProgram",
10476
+ 0x8824: "SpectralSensitivity",
10477
+ 0x8827: "ISOSpeedRatings",
10478
+ 0x8828: "OECF",
10479
+ 0x9201: "ShutterSpeedValue",
10480
+ 0x9202: "ApertureValue",
10481
+ 0x9203: "BrightnessValue",
10482
+ 0x9204: "ExposureBias",
10483
+ 0x9205: "MaxApertureValue",
10484
+ 0x9206: "SubjectDistance",
10485
+ 0x9207: "MeteringMode",
10486
+ 0x9208: "LightSource",
10487
+ 0x9209: "Flash",
10488
+ 0x9214: "SubjectArea",
10489
+ 0x920A: "FocalLength",
10490
+ 0xA20B: "FlashEnergy",
10491
+ 0xA20C: "SpatialFrequencyResponse",
10492
+ 0xA20E: "FocalPlaneXResolution",
10493
+ 0xA20F: "FocalPlaneYResolution",
10494
+ 0xA210: "FocalPlaneResolutionUnit",
10495
+ 0xA214: "SubjectLocation",
10496
+ 0xA215: "ExposureIndex",
10497
+ 0xA217: "SensingMethod",
10498
+ 0xA300: "FileSource",
10499
+ 0xA301: "SceneType",
10500
+ 0xA302: "CFAPattern",
10501
+ 0xA401: "CustomRendered",
10502
+ 0xA402: "ExposureMode",
10503
+ 0xA403: "WhiteBalance",
10504
+ 0xA404: "DigitalZoomRation",
10505
+ 0xA405: "FocalLengthIn35mmFilm",
10506
+ 0xA406: "SceneCaptureType",
10507
+ 0xA407: "GainControl",
10508
+ 0xA408: "Contrast",
10509
+ 0xA409: "Saturation",
10510
+ 0xA40A: "Sharpness",
10511
+ 0xA40B: "DeviceSettingDescription",
10512
+ 0xA40C: "SubjectDistanceRange",
10513
+ 0xA005: "InteroperabilityIFDPointer",
10514
+ 0xA420: "ImageUniqueID"
10515
+ };
10516
+ var TiffTags = EXIF.TiffTags = {
10517
+ 0x0100: "ImageWidth",
10518
+ 0x0101: "ImageHeight",
10519
+ 0x8769: "ExifIFDPointer",
10520
+ 0x8825: "GPSInfoIFDPointer",
10521
+ 0xA005: "InteroperabilityIFDPointer",
10522
+ 0x0102: "BitsPerSample",
10523
+ 0x0103: "Compression",
10524
+ 0x0106: "PhotometricInterpretation",
10525
+ 0x0112: "Orientation",
10526
+ 0x0115: "SamplesPerPixel",
10527
+ 0x011C: "PlanarConfiguration",
10528
+ 0x0212: "YCbCrSubSampling",
10529
+ 0x0213: "YCbCrPositioning",
10530
+ 0x011A: "XResolution",
10531
+ 0x011B: "YResolution",
10532
+ 0x0128: "ResolutionUnit",
10533
+ 0x0111: "StripOffsets",
10534
+ 0x0116: "RowsPerStrip",
10535
+ 0x0117: "StripByteCounts",
10536
+ 0x0201: "JPEGInterchangeFormat",
10537
+ 0x0202: "JPEGInterchangeFormatLength",
10538
+ 0x012D: "TransferFunction",
10539
+ 0x013E: "WhitePoint",
10540
+ 0x013F: "PrimaryChromaticities",
10541
+ 0x0211: "YCbCrCoefficients",
10542
+ 0x0214: "ReferenceBlackWhite",
10543
+ 0x0132: "DateTime",
10544
+ 0x010E: "ImageDescription",
10545
+ 0x010F: "Make",
10546
+ 0x0110: "Model",
10547
+ 0x0131: "Software",
10548
+ 0x013B: "Artist",
10549
+ 0x8298: "Copyright"
10550
+ };
10551
+ var GPSTags = EXIF.GPSTags = {
10552
+ 0x0000: "GPSVersionID",
10553
+ 0x0001: "GPSLatitudeRef",
10554
+ 0x0002: "GPSLatitude",
10555
+ 0x0003: "GPSLongitudeRef",
10556
+ 0x0004: "GPSLongitude",
10557
+ 0x0005: "GPSAltitudeRef",
10558
+ 0x0006: "GPSAltitude",
10559
+ 0x0007: "GPSTimeStamp",
10560
+ 0x0008: "GPSSatellites",
10561
+ 0x0009: "GPSStatus",
10562
+ 0x000A: "GPSMeasureMode",
10563
+ 0x000B: "GPSDOP",
10564
+ 0x000C: "GPSSpeedRef",
10565
+ 0x000D: "GPSSpeed",
10566
+ 0x000E: "GPSTrackRef",
10567
+ 0x000F: "GPSTrack",
10568
+ 0x0010: "GPSImgDirectionRef",
10569
+ 0x0011: "GPSImgDirection",
10570
+ 0x0012: "GPSMapDatum",
10571
+ 0x0013: "GPSDestLatitudeRef",
10572
+ 0x0014: "GPSDestLatitude",
10573
+ 0x0015: "GPSDestLongitudeRef",
10574
+ 0x0016: "GPSDestLongitude",
10575
+ 0x0017: "GPSDestBearingRef",
10576
+ 0x0018: "GPSDestBearing",
10577
+ 0x0019: "GPSDestDistanceRef",
10578
+ 0x001A: "GPSDestDistance",
10579
+ 0x001B: "GPSProcessingMethod",
10580
+ 0x001C: "GPSAreaInformation",
10581
+ 0x001D: "GPSDateStamp",
10582
+ 0x001E: "GPSDifferential"
10583
+ };
10584
+ var IFD1Tags = EXIF.IFD1Tags = {
10585
+ 0x0100: "ImageWidth",
10586
+ 0x0101: "ImageHeight",
10587
+ 0x0102: "BitsPerSample",
10588
+ 0x0103: "Compression",
10589
+ 0x0106: "PhotometricInterpretation",
10590
+ 0x0111: "StripOffsets",
10591
+ 0x0112: "Orientation",
10592
+ 0x0115: "SamplesPerPixel",
10593
+ 0x0116: "RowsPerStrip",
10594
+ 0x0117: "StripByteCounts",
10595
+ 0x011A: "XResolution",
10596
+ 0x011B: "YResolution",
10597
+ 0x011C: "PlanarConfiguration",
10598
+ 0x0128: "ResolutionUnit",
10599
+ 0x0201: "JpegIFOffset",
10600
+ 0x0202: "JpegIFByteCount",
10601
+ 0x0211: "YCbCrCoefficients",
10602
+ 0x0212: "YCbCrSubSampling",
10603
+ 0x0213: "YCbCrPositioning",
10604
+ 0x0214: "ReferenceBlackWhite"
10605
+ };
10606
+ var StringValues = EXIF.StringValues = {
10607
+ ExposureProgram: {
10608
+ 0: "Not defined",
10609
+ 1: "Manual",
10610
+ 2: "Normal program",
10611
+ 3: "Aperture priority",
10612
+ 4: "Shutter priority",
10613
+ 5: "Creative program",
10614
+ 6: "Action program",
10615
+ 7: "Portrait mode",
10616
+ 8: "Landscape mode"
10617
+ },
10618
+ MeteringMode: {
10619
+ 0: "Unknown",
10620
+ 1: "Average",
10621
+ 2: "CenterWeightedAverage",
10622
+ 3: "Spot",
10623
+ 4: "MultiSpot",
10624
+ 5: "Pattern",
10625
+ 6: "Partial",
10626
+ 255: "Other"
10627
+ },
10628
+ LightSource: {
10629
+ 0: "Unknown",
10630
+ 1: "Daylight",
10631
+ 2: "Fluorescent",
10632
+ 3: "Tungsten (incandescent light)",
10633
+ 4: "Flash",
10634
+ 9: "Fine weather",
10635
+ 10: "Cloudy weather",
10636
+ 11: "Shade",
10637
+ 12: "Daylight fluorescent (D 5700 - 7100K)",
10638
+ 13: "Day white fluorescent (N 4600 - 5400K)",
10639
+ 14: "Cool white fluorescent (W 3900 - 4500K)",
10640
+ 15: "White fluorescent (WW 3200 - 3700K)",
10641
+ 17: "Standard light A",
10642
+ 18: "Standard light B",
10643
+ 19: "Standard light C",
10644
+ 20: "D55",
10645
+ 21: "D65",
10646
+ 22: "D75",
10647
+ 23: "D50",
10648
+ 24: "ISO studio tungsten",
10649
+ 255: "Other"
10650
+ },
10651
+ Flash: {
10652
+ 0x0000: "Flash did not fire",
10653
+ 0x0001: "Flash fired",
10654
+ 0x0005: "Strobe return light not detected",
10655
+ 0x0007: "Strobe return light detected",
10656
+ 0x0009: "Flash fired, compulsory flash mode",
10657
+ 0x000D: "Flash fired, compulsory flash mode, return light not detected",
10658
+ 0x000F: "Flash fired, compulsory flash mode, return light detected",
10659
+ 0x0010: "Flash did not fire, compulsory flash mode",
10660
+ 0x0018: "Flash did not fire, auto mode",
10661
+ 0x0019: "Flash fired, auto mode",
10662
+ 0x001D: "Flash fired, auto mode, return light not detected",
10663
+ 0x001F: "Flash fired, auto mode, return light detected",
10664
+ 0x0020: "No flash function",
10665
+ 0x0041: "Flash fired, red-eye reduction mode",
10666
+ 0x0045: "Flash fired, red-eye reduction mode, return light not detected",
10667
+ 0x0047: "Flash fired, red-eye reduction mode, return light detected",
10668
+ 0x0049: "Flash fired, compulsory flash mode, red-eye reduction mode",
10669
+ 0x004D: "Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",
10670
+ 0x004F: "Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",
10671
+ 0x0059: "Flash fired, auto mode, red-eye reduction mode",
10672
+ 0x005D: "Flash fired, auto mode, return light not detected, red-eye reduction mode",
10673
+ 0x005F: "Flash fired, auto mode, return light detected, red-eye reduction mode"
10674
+ },
10675
+ SensingMethod: {
10676
+ 1: "Not defined",
10677
+ 2: "One-chip color area sensor",
10678
+ 3: "Two-chip color area sensor",
10679
+ 4: "Three-chip color area sensor",
10680
+ 5: "Color sequential area sensor",
10681
+ 7: "Trilinear sensor",
10682
+ 8: "Color sequential linear sensor"
10683
+ },
10684
+ SceneCaptureType: {
10685
+ 0: "Standard",
10686
+ 1: "Landscape",
10687
+ 2: "Portrait",
10688
+ 3: "Night scene"
10689
+ },
10690
+ SceneType: {
10691
+ 1: "Directly photographed"
10692
+ },
10693
+ CustomRendered: {
10694
+ 0: "Normal process",
10695
+ 1: "Custom process"
10696
+ },
10697
+ WhiteBalance: {
10698
+ 0: "Auto white balance",
10699
+ 1: "Manual white balance"
10700
+ },
10701
+ GainControl: {
10702
+ 0: "None",
10703
+ 1: "Low gain up",
10704
+ 2: "High gain up",
10705
+ 3: "Low gain down",
10706
+ 4: "High gain down"
10707
+ },
10708
+ Contrast: {
10709
+ 0: "Normal",
10710
+ 1: "Soft",
10711
+ 2: "Hard"
10712
+ },
10713
+ Saturation: {
10714
+ 0: "Normal",
10715
+ 1: "Low saturation",
10716
+ 2: "High saturation"
10717
+ },
10718
+ Sharpness: {
10719
+ 0: "Normal",
10720
+ 1: "Soft",
10721
+ 2: "Hard"
10722
+ },
10723
+ SubjectDistanceRange: {
10724
+ 0: "Unknown",
10725
+ 1: "Macro",
10726
+ 2: "Close view",
10727
+ 3: "Distant view"
10728
+ },
10729
+ FileSource: {
10730
+ 3: "DSC"
10731
+ },
10732
+ Components: {
10733
+ 0: "",
10734
+ 1: "Y",
10735
+ 2: "Cb",
10736
+ 3: "Cr",
10737
+ 4: "R",
10738
+ 5: "G",
10739
+ 6: "B"
10740
+ }
10741
+ };
10742
+ function imageHasData(img) {
10743
+ return !!img.exifdata;
10744
+ }
10745
+ function base64ToArrayBuffer(base64, contentType) {
10746
+ contentType = contentType || base64.match(/^data\:([^\;]+)\;base64,/mi)[1] || '';
10747
+ base64 = base64.replace(/^data\:([^\;]+)\;base64,/gmi, '');
10748
+ var binary = atob(base64);
10749
+ var len = binary.length;
10750
+ var buffer = new ArrayBuffer(len);
10751
+ var view = new Uint8Array(buffer);
10752
+ for (var i = 0; i < len; i++) {
10753
+ view[i] = binary.charCodeAt(i);
10754
+ }
10755
+ return buffer;
10756
+ }
10757
+ function objectURLToBlob(url, callback) {
10758
+ var http = new XMLHttpRequest();
10759
+ http.open("GET", url, true);
10760
+ http.responseType = "blob";
10761
+ http.onload = function (e) {
10762
+ if (this.status == 200 || this.status === 0) {
10763
+ callback(this.response);
10764
+ }
10765
+ };
10766
+ http.send();
10767
+ }
10768
+ function getImageData(img, callback) {
10769
+ function handleBinaryFile(binFile) {
10770
+ var data = findEXIFinJPEG(binFile);
10771
+ img.exifdata = data || {};
10772
+ var iptcdata = findIPTCinJPEG(binFile);
10773
+ img.iptcdata = iptcdata || {};
10774
+ if (EXIF.isXmpEnabled) {
10775
+ var xmpdata = findXMPinJPEG(binFile);
10776
+ img.xmpdata = xmpdata || {};
10777
+ }
10778
+ if (callback) {
10779
+ callback.call(img);
10780
+ }
10781
+ }
10782
+ if (img.src) {
10783
+ if (/^data\:/i.test(img.src)) {
10784
+ var arrayBuffer = base64ToArrayBuffer(img.src);
10785
+ handleBinaryFile(arrayBuffer);
10786
+ } else if (/^blob\:/i.test(img.src)) {
10787
+ var fileReader = new FileReader();
10788
+ fileReader.onload = function (e) {
10789
+ handleBinaryFile(e.target.result);
10790
+ };
10791
+ objectURLToBlob(img.src, function (blob) {
10792
+ fileReader.readAsArrayBuffer(blob);
10793
+ });
10794
+ } else {
10795
+ var http = new XMLHttpRequest();
10796
+ http.onload = function () {
10797
+ if (this.status == 200 || this.status === 0) {
10798
+ handleBinaryFile(http.response);
10799
+ } else {
10800
+ throw "Could not load image";
10801
+ }
10802
+ http = null;
10803
+ };
10804
+ http.open("GET", img.src, true);
10805
+ http.responseType = "arraybuffer";
10806
+ http.send(null);
10807
+ }
10808
+ } else if (self.FileReader && (img instanceof self.Blob || img instanceof self.File)) {
10809
+ var fileReader = new FileReader();
10810
+ fileReader.onload = function (e) {
10811
+ handleBinaryFile(e.target.result);
10812
+ };
10813
+ fileReader.readAsArrayBuffer(img);
10814
+ }
10815
+ }
10816
+ function findEXIFinJPEG(file) {
10817
+ var dataView = new DataView(file);
10818
+ if (dataView.getUint8(0) != 0xFF || dataView.getUint8(1) != 0xD8) {
10819
+ return false;
10820
+ }
10821
+ var offset = 2,
10822
+ length = file.byteLength,
10823
+ marker;
10824
+ while (offset < length) {
10825
+ if (dataView.getUint8(offset) != 0xFF) {
10826
+ return false;
10827
+ }
10828
+ marker = dataView.getUint8(offset + 1);
10829
+ if (marker == 225) {
10830
+ return readEXIFData(dataView, offset + 4, dataView.getUint16(offset + 2) - 2);
10831
+ } else {
10832
+ offset += 2 + dataView.getUint16(offset + 2);
10833
+ }
10834
+ }
10835
+ }
10836
+ function findIPTCinJPEG(file) {
10837
+ var dataView = new DataView(file);
10838
+ if (dataView.getUint8(0) != 0xFF || dataView.getUint8(1) != 0xD8) {
10839
+ return false;
10840
+ }
10841
+ var offset = 2,
10842
+ length = file.byteLength;
10843
+ var isFieldSegmentStart = function (dataView, offset) {
10844
+ 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;
10845
+ };
10846
+ while (offset < length) {
10847
+ if (isFieldSegmentStart(dataView, offset)) {
10848
+ var nameHeaderLength = dataView.getUint8(offset + 7);
10849
+ if (nameHeaderLength % 2 !== 0) nameHeaderLength += 1;
10850
+ if (nameHeaderLength === 0) {
10851
+ nameHeaderLength = 4;
10852
+ }
10853
+ var startOffset = offset + 8 + nameHeaderLength;
10854
+ var sectionLength = dataView.getUint16(offset + 6 + nameHeaderLength);
10855
+ return readIPTCData(file, startOffset, sectionLength);
10856
+ }
10857
+ offset++;
10858
+ }
10859
+ }
10860
+ var IptcFieldMap = {
10861
+ 0x78: 'caption',
10862
+ 0x6E: 'credit',
10863
+ 0x19: 'keywords',
10864
+ 0x37: 'dateCreated',
10865
+ 0x50: 'byline',
10866
+ 0x55: 'bylineTitle',
10867
+ 0x7A: 'captionWriter',
10868
+ 0x69: 'headline',
10869
+ 0x74: 'copyright',
10870
+ 0x0F: 'category'
10871
+ };
10872
+ function readIPTCData(file, startOffset, sectionLength) {
10873
+ var dataView = new DataView(file);
10874
+ var data = {};
10875
+ var fieldValue, fieldName, dataSize, segmentType;
10876
+ var segmentStartPos = startOffset;
10877
+ while (segmentStartPos < startOffset + sectionLength) {
10878
+ if (dataView.getUint8(segmentStartPos) === 0x1C && dataView.getUint8(segmentStartPos + 1) === 0x02) {
10879
+ segmentType = dataView.getUint8(segmentStartPos + 2);
10880
+ if (segmentType in IptcFieldMap) {
10881
+ dataSize = dataView.getInt16(segmentStartPos + 3);
10882
+ fieldName = IptcFieldMap[segmentType];
10883
+ fieldValue = getStringFromDB(dataView, segmentStartPos + 5, dataSize);
10884
+ if (data.hasOwnProperty(fieldName)) {
10885
+ if (data[fieldName] instanceof Array) {
10886
+ data[fieldName].push(fieldValue);
10887
+ } else {
10888
+ data[fieldName] = [data[fieldName], fieldValue];
10889
+ }
10890
+ } else {
10891
+ data[fieldName] = fieldValue;
10892
+ }
10893
+ }
10894
+ }
10895
+ segmentStartPos++;
10896
+ }
10897
+ return data;
10898
+ }
10899
+ function readTags(file, tiffStart, dirStart, strings, bigEnd) {
10900
+ var entries = file.getUint16(dirStart, !bigEnd),
10901
+ tags = {},
10902
+ entryOffset,
10903
+ tag,
10904
+ i;
10905
+ for (i = 0; i < entries; i++) {
10906
+ entryOffset = dirStart + i * 12 + 2;
10907
+ tag = strings[file.getUint16(entryOffset, !bigEnd)];
10908
+ if (!tag && debug) console.log("Unknown tag: " + file.getUint16(entryOffset, !bigEnd));
10909
+ tags[tag] = readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd);
10910
+ }
10911
+ return tags;
10912
+ }
10913
+ function readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd) {
10914
+ var type = file.getUint16(entryOffset + 2, !bigEnd),
10915
+ numValues = file.getUint32(entryOffset + 4, !bigEnd),
10916
+ valueOffset = file.getUint32(entryOffset + 8, !bigEnd) + tiffStart,
10917
+ offset,
10918
+ vals,
10919
+ val,
10920
+ n,
10921
+ numerator,
10922
+ denominator;
10923
+ switch (type) {
10924
+ case 1:
10925
+ case 7:
10926
+ if (numValues == 1) {
10927
+ return file.getUint8(entryOffset + 8, !bigEnd);
10928
+ } else {
10929
+ offset = numValues > 4 ? valueOffset : entryOffset + 8;
10930
+ vals = [];
10931
+ for (n = 0; n < numValues; n++) {
10932
+ vals[n] = file.getUint8(offset + n);
10933
+ }
10934
+ return vals;
10935
+ }
10936
+ case 2:
10937
+ offset = numValues > 4 ? valueOffset : entryOffset + 8;
10938
+ return getStringFromDB(file, offset, numValues - 1);
10939
+ case 3:
10940
+ if (numValues == 1) {
10941
+ return file.getUint16(entryOffset + 8, !bigEnd);
10942
+ } else {
10943
+ offset = numValues > 2 ? valueOffset : entryOffset + 8;
10944
+ vals = [];
10945
+ for (n = 0; n < numValues; n++) {
10946
+ vals[n] = file.getUint16(offset + 2 * n, !bigEnd);
10947
+ }
10948
+ return vals;
10949
+ }
10950
+ case 4:
10951
+ if (numValues == 1) {
10952
+ return file.getUint32(entryOffset + 8, !bigEnd);
10953
+ } else {
10954
+ vals = [];
10955
+ for (n = 0; n < numValues; n++) {
10956
+ vals[n] = file.getUint32(valueOffset + 4 * n, !bigEnd);
10957
+ }
10958
+ return vals;
10959
+ }
10960
+ case 5:
10961
+ if (numValues == 1) {
10962
+ numerator = file.getUint32(valueOffset, !bigEnd);
10963
+ denominator = file.getUint32(valueOffset + 4, !bigEnd);
10964
+ val = new Number(numerator / denominator);
10965
+ val.numerator = numerator;
10966
+ val.denominator = denominator;
10967
+ return val;
10968
+ } else {
10969
+ vals = [];
10970
+ for (n = 0; n < numValues; n++) {
10971
+ numerator = file.getUint32(valueOffset + 8 * n, !bigEnd);
10972
+ denominator = file.getUint32(valueOffset + 4 + 8 * n, !bigEnd);
10973
+ vals[n] = new Number(numerator / denominator);
10974
+ vals[n].numerator = numerator;
10975
+ vals[n].denominator = denominator;
10976
+ }
10977
+ return vals;
10978
+ }
10979
+ case 9:
10980
+ if (numValues == 1) {
10981
+ return file.getInt32(entryOffset + 8, !bigEnd);
10982
+ } else {
10983
+ vals = [];
10984
+ for (n = 0; n < numValues; n++) {
10985
+ vals[n] = file.getInt32(valueOffset + 4 * n, !bigEnd);
10986
+ }
10987
+ return vals;
10988
+ }
10989
+ case 10:
10990
+ if (numValues == 1) {
10991
+ return file.getInt32(valueOffset, !bigEnd) / file.getInt32(valueOffset + 4, !bigEnd);
10992
+ } else {
10993
+ vals = [];
10994
+ for (n = 0; n < numValues; n++) {
10995
+ vals[n] = file.getInt32(valueOffset + 8 * n, !bigEnd) / file.getInt32(valueOffset + 4 + 8 * n, !bigEnd);
10996
+ }
10997
+ return vals;
10998
+ }
10999
+ }
11000
+ }
11001
+ function getNextIFDOffset(dataView, dirStart, bigEnd) {
11002
+ var entries = dataView.getUint16(dirStart, !bigEnd);
11003
+ return dataView.getUint32(dirStart + 2 + entries * 12, !bigEnd);
11004
+ }
11005
+ function readThumbnailImage(dataView, tiffStart, firstIFDOffset, bigEnd) {
11006
+ var IFD1OffsetPointer = getNextIFDOffset(dataView, tiffStart + firstIFDOffset, bigEnd);
11007
+ if (!IFD1OffsetPointer) {
11008
+ return {};
11009
+ } else if (IFD1OffsetPointer > dataView.byteLength) {
11010
+ return {};
11011
+ }
11012
+ var thumbTags = readTags(dataView, tiffStart, tiffStart + IFD1OffsetPointer, IFD1Tags, bigEnd);
11013
+ if (thumbTags['Compression']) {
11014
+ switch (thumbTags['Compression']) {
11015
+ case 6:
11016
+ if (thumbTags.JpegIFOffset && thumbTags.JpegIFByteCount) {
11017
+ var tOffset = tiffStart + thumbTags.JpegIFOffset;
11018
+ var tLength = thumbTags.JpegIFByteCount;
11019
+ thumbTags['blob'] = new Blob([new Uint8Array(dataView.buffer, tOffset, tLength)], {
11020
+ type: 'image/jpeg'
11021
+ });
11022
+ }
11023
+ break;
11024
+ case 1:
11025
+ console.log("Thumbnail image format is TIFF, which is not implemented.");
11026
+ break;
11027
+ default:
11028
+ console.log("Unknown thumbnail image format '%s'", thumbTags['Compression']);
11029
+ }
11030
+ } else if (thumbTags['PhotometricInterpretation'] == 2) {
11031
+ console.log("Thumbnail image format is RGB, which is not implemented.");
11032
+ }
11033
+ return thumbTags;
11034
+ }
11035
+ function getStringFromDB(buffer, start, length) {
11036
+ var outstr = "";
11037
+ for (n = start; n < start + length; n++) {
11038
+ outstr += String.fromCharCode(buffer.getUint8(n));
11039
+ }
11040
+ return outstr;
11041
+ }
11042
+ function readEXIFData(file, start) {
11043
+ if (getStringFromDB(file, start, 4) != "Exif") {
11044
+ return false;
11045
+ }
11046
+ var bigEnd,
11047
+ tags,
11048
+ tag,
11049
+ exifData,
11050
+ gpsData,
11051
+ tiffOffset = start + 6;
11052
+ if (file.getUint16(tiffOffset) == 0x4949) {
11053
+ bigEnd = false;
11054
+ } else if (file.getUint16(tiffOffset) == 0x4D4D) {
11055
+ bigEnd = true;
11056
+ } else {
11057
+ return false;
11058
+ }
11059
+ if (file.getUint16(tiffOffset + 2, !bigEnd) != 0x002A) {
11060
+ return false;
11061
+ }
11062
+ var firstIFDOffset = file.getUint32(tiffOffset + 4, !bigEnd);
11063
+ if (firstIFDOffset < 0x00000008) {
11064
+ return false;
11065
+ }
11066
+ tags = readTags(file, tiffOffset, tiffOffset + firstIFDOffset, TiffTags, bigEnd);
11067
+ if (tags.ExifIFDPointer) {
11068
+ exifData = readTags(file, tiffOffset, tiffOffset + tags.ExifIFDPointer, ExifTags, bigEnd);
11069
+ for (tag in exifData) {
11070
+ switch (tag) {
11071
+ case "LightSource":
11072
+ case "Flash":
11073
+ case "MeteringMode":
11074
+ case "ExposureProgram":
11075
+ case "SensingMethod":
11076
+ case "SceneCaptureType":
11077
+ case "SceneType":
11078
+ case "CustomRendered":
11079
+ case "WhiteBalance":
11080
+ case "GainControl":
11081
+ case "Contrast":
11082
+ case "Saturation":
11083
+ case "Sharpness":
11084
+ case "SubjectDistanceRange":
11085
+ case "FileSource":
11086
+ exifData[tag] = StringValues[tag][exifData[tag]];
11087
+ break;
11088
+ case "ExifVersion":
11089
+ case "FlashpixVersion":
11090
+ exifData[tag] = String.fromCharCode(exifData[tag][0], exifData[tag][1], exifData[tag][2], exifData[tag][3]);
11091
+ break;
11092
+ case "ComponentsConfiguration":
11093
+ exifData[tag] = StringValues.Components[exifData[tag][0]] + StringValues.Components[exifData[tag][1]] + StringValues.Components[exifData[tag][2]] + StringValues.Components[exifData[tag][3]];
11094
+ break;
11095
+ }
11096
+ tags[tag] = exifData[tag];
11097
+ }
11098
+ }
11099
+ if (tags.GPSInfoIFDPointer) {
11100
+ gpsData = readTags(file, tiffOffset, tiffOffset + tags.GPSInfoIFDPointer, GPSTags, bigEnd);
11101
+ for (tag in gpsData) {
11102
+ switch (tag) {
11103
+ case "GPSVersionID":
11104
+ gpsData[tag] = gpsData[tag][0] + "." + gpsData[tag][1] + "." + gpsData[tag][2] + "." + gpsData[tag][3];
11105
+ break;
11106
+ }
11107
+ tags[tag] = gpsData[tag];
11108
+ }
11109
+ }
11110
+ tags['thumbnail'] = readThumbnailImage(file, tiffOffset, firstIFDOffset, bigEnd);
11111
+ return tags;
11112
+ }
11113
+ function findXMPinJPEG(file) {
11114
+ if (!('DOMParser' in self)) {
11115
+ return;
11116
+ }
11117
+ var dataView = new DataView(file);
11118
+ if (dataView.getUint8(0) != 0xFF || dataView.getUint8(1) != 0xD8) {
11119
+ return false;
11120
+ }
11121
+ var offset = 2,
11122
+ length = file.byteLength,
11123
+ dom = new DOMParser();
11124
+ while (offset < length - 4) {
11125
+ if (getStringFromDB(dataView, offset, 4) == "http") {
11126
+ var startOffset = offset - 1;
11127
+ var sectionLength = dataView.getUint16(offset - 2) - 1;
11128
+ var xmpString = getStringFromDB(dataView, startOffset, sectionLength);
11129
+ var xmpEndIndex = xmpString.indexOf('xmpmeta>') + 8;
11130
+ xmpString = xmpString.substring(xmpString.indexOf('<x:xmpmeta'), xmpEndIndex);
11131
+ var indexOfXmp = xmpString.indexOf('x:xmpmeta') + 10;
11132
+ 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);
11133
+ var domDocument = dom.parseFromString(xmpString, 'text/xml');
11134
+ return xml2Object(domDocument);
11135
+ } else {
11136
+ offset++;
11137
+ }
11138
+ }
11139
+ }
11140
+ function xml2json(xml) {
11141
+ var json = {};
11142
+ if (xml.nodeType == 1) {
11143
+ if (xml.attributes.length > 0) {
11144
+ json['@attributes'] = {};
11145
+ for (var j = 0; j < xml.attributes.length; j++) {
11146
+ var attribute = xml.attributes.item(j);
11147
+ json['@attributes'][attribute.nodeName] = attribute.nodeValue;
11148
+ }
11149
+ }
11150
+ } else if (xml.nodeType == 3) {
11151
+ return xml.nodeValue;
11152
+ }
11153
+ if (xml.hasChildNodes()) {
11154
+ for (var i = 0; i < xml.childNodes.length; i++) {
11155
+ var child = xml.childNodes.item(i);
11156
+ var nodeName = child.nodeName;
11157
+ if (json[nodeName] == null) {
11158
+ json[nodeName] = xml2json(child);
11159
+ } else {
11160
+ if (json[nodeName].push == null) {
11161
+ var old = json[nodeName];
11162
+ json[nodeName] = [];
11163
+ json[nodeName].push(old);
11164
+ }
11165
+ json[nodeName].push(xml2json(child));
11166
+ }
11167
+ }
11168
+ }
11169
+ return json;
11170
+ }
11171
+ function xml2Object(xml) {
11172
+ try {
11173
+ var obj = {};
11174
+ if (xml.children.length > 0) {
11175
+ for (var i = 0; i < xml.children.length; i++) {
11176
+ var item = xml.children.item(i);
11177
+ var attributes = item.attributes;
11178
+ for (var idx in attributes) {
11179
+ var itemAtt = attributes[idx];
11180
+ var dataKey = itemAtt.nodeName;
11181
+ var dataValue = itemAtt.nodeValue;
11182
+ if (dataKey !== undefined) {
11183
+ obj[dataKey] = dataValue;
11184
+ }
11185
+ }
11186
+ var nodeName = item.nodeName;
11187
+ if (typeof obj[nodeName] == "undefined") {
11188
+ obj[nodeName] = xml2json(item);
11189
+ } else {
11190
+ if (typeof obj[nodeName].push == "undefined") {
11191
+ var old = obj[nodeName];
11192
+ obj[nodeName] = [];
11193
+ obj[nodeName].push(old);
11194
+ }
11195
+ obj[nodeName].push(xml2json(item));
11196
+ }
11197
+ }
11198
+ } else {
11199
+ obj = xml.textContent;
11200
+ }
11201
+ return obj;
11202
+ } catch (e) {
11203
+ console.log(e.message);
11204
+ }
11205
+ }
11206
+ EXIF.enableXmp = function () {
11207
+ EXIF.isXmpEnabled = true;
11208
+ };
11209
+ EXIF.disableXmp = function () {
11210
+ EXIF.isXmpEnabled = false;
11211
+ };
11212
+ EXIF.getData = function (img, callback) {
11213
+ if ((self.Image && img instanceof self.Image || self.HTMLImageElement && img instanceof self.HTMLImageElement) && !img.complete) return false;
11214
+ if (!imageHasData(img)) {
11215
+ getImageData(img, callback);
11216
+ } else {
11217
+ if (callback) {
11218
+ callback.call(img);
11219
+ }
11220
+ }
11221
+ return true;
11222
+ };
11223
+ EXIF.getTag = function (img, tag) {
11224
+ if (!imageHasData(img)) return;
11225
+ return img.exifdata[tag];
11226
+ };
11227
+ EXIF.getIptcTag = function (img, tag) {
11228
+ if (!imageHasData(img)) return;
11229
+ return img.iptcdata[tag];
11230
+ };
11231
+ EXIF.getAllTags = function (img) {
11232
+ if (!imageHasData(img)) return {};
11233
+ var a,
11234
+ data = img.exifdata,
11235
+ tags = {};
11236
+ for (a in data) {
11237
+ if (data.hasOwnProperty(a)) {
11238
+ tags[a] = data[a];
11239
+ }
11240
+ }
11241
+ return tags;
11242
+ };
11243
+ EXIF.getAllIptcTags = function (img) {
11244
+ if (!imageHasData(img)) return {};
11245
+ var a,
11246
+ data = img.iptcdata,
11247
+ tags = {};
11248
+ for (a in data) {
11249
+ if (data.hasOwnProperty(a)) {
11250
+ tags[a] = data[a];
11251
+ }
11252
+ }
11253
+ return tags;
11254
+ };
11255
+ EXIF.pretty = function (img) {
11256
+ if (!imageHasData(img)) return "";
11257
+ var a,
11258
+ data = img.exifdata,
11259
+ strPretty = "";
11260
+ for (a in data) {
11261
+ if (data.hasOwnProperty(a)) {
11262
+ if (typeof data[a] == "object") {
11263
+ if (data[a] instanceof Number) {
11264
+ strPretty += a + " : " + data[a] + " [" + data[a].numerator + "/" + data[a].denominator + "]\r\n";
11265
+ } else {
11266
+ strPretty += a + " : [" + data[a].length + " values]\r\n";
11267
+ }
11268
+ } else {
11269
+ strPretty += a + " : " + data[a] + "\r\n";
11270
+ }
11271
+ }
11272
+ }
11273
+ return strPretty;
11274
+ };
11275
+ EXIF.readFromBinaryFile = function (file) {
11276
+ return findEXIFinJPEG(file);
11277
+ };
11278
+ }).call(commonjsGlobal);
11279
+ });
11280
+
11281
+ const ChallanDocuments = ({
11282
+ t,
11283
+ config,
11284
+ onSelect,
11285
+ userType,
11286
+ formData,
11287
+ setError: setFormError,
11288
+ clearErrors: clearFormErrors,
11289
+ formState,
11290
+ data,
11291
+ isLoading,
11292
+ error,
11293
+ setError
11294
+ }) => {
11295
+ var _formData$documents, _data$Challan2, _data$Challan2$Docume;
11296
+ 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) || []);
11297
+ const [enableSubmit, setEnableSubmit] = useState(true);
11298
+ const [checkRequiredFields, setCheckRequiredFields] = useState(false);
11299
+ const tenantId = window.location.href.includes("employee") ? Digit.ULBService.getCurrentPermanentCity() : localStorage.getItem("CITIZEN.CITY");
11300
+ const handleSubmit = () => {
11301
+ let document = formData.documents;
11302
+ let documentStep;
11303
+ documentStep = {
11304
+ ...document,
11305
+ documents: documents
11306
+ };
11307
+ onSelect(config.key, documentStep);
11308
+ };
11309
+ useEffect(() => {
11310
+ if (documents) onSelect(documents);
11311
+ console.log("documents", documents);
11312
+ }, [documents]);
11313
+ useEffect(() => {
11314
+ var _formData$documents2;
11315
+ const incomingDocs = (formData === null || formData === void 0 ? void 0 : (_formData$documents2 = formData.documents) === null || _formData$documents2 === void 0 ? void 0 : _formData$documents2.documents) || [];
11316
+ if (Array.isArray(incomingDocs) && incomingDocs.length > 0 && documents.length === 0) {
11317
+ setDocuments(incomingDocs);
11318
+ }
11319
+ }, [formData]);
11320
+ useEffect(() => {
11321
+ var _data$Challan, _data$Challan$Documen;
11322
+ let count = 0;
11323
+ 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 => {
11324
+ doc.hasDropdown = true;
11325
+ let isRequired = false;
11326
+ documents === null || documents === void 0 ? void 0 : documents.map(data => {
11327
+ if (doc.required && data !== null && data !== void 0 && data.documentType.includes(doc.code)) isRequired = true;
11328
+ });
11329
+ if (!isRequired && doc.required) count = count + 1;
11330
+ });
11331
+ if ((count == "0" || count == 0) && (documents === null || documents === void 0 ? void 0 : documents.length) > 0) setEnableSubmit(false);else setEnableSubmit(true);
11332
+ }, [documents, checkRequiredFields]);
11333
+ 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) => {
11334
+ return /*#__PURE__*/React.createElement(PTRSelectDocument, {
11335
+ key: index,
11336
+ document: document,
11337
+ t: t,
11338
+ error: error,
11339
+ setError: setError,
11340
+ setDocuments: setDocuments,
11341
+ documents: documents,
11342
+ setCheckRequiredFields: setCheckRequiredFields,
11343
+ handleSubmit: handleSubmit
11344
+ });
11345
+ }), error && /*#__PURE__*/React.createElement(Toast, {
11346
+ isDleteBtn: true,
11347
+ label: error,
11348
+ onClose: () => setError(null),
11349
+ error: true
11350
+ })) : /*#__PURE__*/React.createElement(Loader$1, null));
11351
+ };
11352
+ function PTRSelectDocument({
11353
+ t,
11354
+ document: doc,
11355
+ setDocuments,
11356
+ setError,
11357
+ documents,
11358
+ action,
11359
+ formData,
11360
+ handleSubmit,
11361
+ id
11362
+ }) {
11363
+ const filteredDocument = documents === null || documents === void 0 ? void 0 : documents.filter(item => {
11364
+ var _item$documentType;
11365
+ 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);
11366
+ })[0];
11367
+ const tenantId = Digit.ULBService.getCurrentTenantId();
11368
+ const [selectedDocument, setSelectedDocument] = useState(() => {
11369
+ var _doc$dropdownData2;
11370
+ if (filteredDocument) {
11371
+ var _doc$dropdownData, _match$code;
11372
+ 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);
11373
+ return match ? {
11374
+ ...match,
11375
+ i18nKey: (_match$code = match.code) === null || _match$code === void 0 ? void 0 : _match$code.replaceAll(".", "_")
11376
+ } : {};
11377
+ }
11378
+ if ((doc === null || doc === void 0 ? void 0 : (_doc$dropdownData2 = doc.dropdownData) === null || _doc$dropdownData2 === void 0 ? void 0 : _doc$dropdownData2.length) === 1) {
11379
+ var _onlyOption$code;
11380
+ const onlyOption = doc.dropdownData[0];
11381
+ return {
11382
+ ...onlyOption,
11383
+ i18nKey: (_onlyOption$code = onlyOption.code) === null || _onlyOption$code === void 0 ? void 0 : _onlyOption$code.replaceAll(".", "_")
11384
+ };
11385
+ }
11386
+ return {};
11387
+ });
11388
+ const [file, setFile] = useState(null);
11389
+ const [uploadedFile, setUploadedFile] = useState(() => (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.filestoreId) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null);
11390
+ useEffect(() => {
11391
+ const fsId = (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.filestoreId) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId);
11392
+ if (fsId && fsId !== uploadedFile) {
11393
+ setUploadedFile(fsId);
11394
+ }
11395
+ }, [filteredDocument]);
11396
+ function selectfile(e) {
11397
+ const file = e.target.files[0];
11398
+ if (!file) return;
11399
+ setFile(file);
11400
+ updateDocument(selectedDocument, {});
11401
+ }
11402
+ function updateDocument(selectedDocument, extraFields = {}) {
11403
+ setDocuments(() => [{
11404
+ documentType: "arrearDoc",
11405
+ filestoreId: extraFields.filestoreId || null,
11406
+ documentUid: extraFields.documentUid || null
11407
+ }]);
11408
+ }
11409
+ const {
11410
+ dropdownData
11411
+ } = doc;
11412
+ var dropDownData = dropdownData;
11413
+ const [isHidden, setHidden] = useState(false);
11414
+ const [getLoading, setLoading] = useState(false);
11415
+ useEffect(() => {
11416
+ if (action === "update") {
11417
+ var _formData$originalDat, _formData$originalDat2;
11418
+ 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];
11419
+ const docType = dropDownData.filter(e => e.code === (originalDoc === null || originalDoc === void 0 ? void 0 : originalDoc.documentType)).map(e => {
11420
+ var _e$code;
11421
+ return {
11422
+ ...e,
11423
+ i18nKey: e === null || e === void 0 ? void 0 : (_e$code = e.code) === null || _e$code === void 0 ? void 0 : _e$code.replaceAll(".", "_")
11424
+ };
11425
+ })[0];
11426
+ if (!docType) setHidden(true);else {
11427
+ setSelectedDocument(docType);
11428
+ setUploadedFile(originalDoc === null || originalDoc === void 0 ? void 0 : originalDoc.fileStoreId);
11429
+ }
11430
+ }
11431
+ }, []);
11432
+ useEffect(() => {
11433
+ if (!(doc !== null && doc !== void 0 && doc.hasDropdown)) {
11434
+ var _doc$code;
11435
+ setSelectedDocument({
11436
+ code: doc === null || doc === void 0 ? void 0 : doc.code,
11437
+ i18nKey: doc === null || doc === void 0 ? void 0 : (_doc$code = doc.code) === null || _doc$code === void 0 ? void 0 : _doc$code.replaceAll(".", "_")
11438
+ });
11439
+ }
11440
+ }, []);
11441
+ useEffect(() => {
11442
+ (async () => {
11443
+ setError(null);
11444
+ if (file) {
11445
+ setLoading(true);
11446
+ if (file.size >= 5242880) {
11447
+ setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
11448
+ } else {
11449
+ try {
11450
+ var _response$data, _response$data$files;
11451
+ setUploadedFile(null);
11452
+ const response = await Digit.UploadServices.Filestorage("PTR", file, Digit.ULBService.getStateId());
11453
+ setLoading(false);
11454
+ 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) {
11455
+ const fsId = response.data.files[0].fileStoreId;
11456
+ setUploadedFile(fsId);
11457
+ updateDocument(selectedDocument, {
11458
+ filestoreId: fsId,
11459
+ documentUid: fsId
11460
+ });
11461
+ } else {
11462
+ setError(t("CS_FILE_UPLOAD_ERROR"));
11463
+ }
11464
+ } catch (err) {
11465
+ setLoading(false);
11466
+ setError(t("CS_FILE_UPLOAD_ERROR"));
11467
+ }
11468
+ }
11469
+ }
11470
+ })();
11471
+ }, [file]);
11472
+ useEffect(() => {
11473
+ if (isHidden) setUploadedFile(null);
11474
+ }, [isHidden]);
11475
+ return /*#__PURE__*/React.createElement("div", {
11476
+ className: "challan-documents"
11477
+ }, /*#__PURE__*/React.createElement(LabelFieldPair, {
11478
+ className: "challan-label-field"
11479
+ }, /*#__PURE__*/React.createElement(CardLabel, {
11480
+ className: "challan-card-label"
11481
+ }, t(doc === null || doc === void 0 ? void 0 : doc.code), " ", /*#__PURE__*/React.createElement("span", {
11482
+ className: "requiredField"
11483
+ }, " ", (doc === null || doc === void 0 ? void 0 : doc.required) && " *")), /*#__PURE__*/React.createElement("div", {
11484
+ className: "field",
11485
+ style: {
11486
+ width: "100%"
11487
+ }
11488
+ }, /*#__PURE__*/React.createElement(UploadFile, {
11489
+ onUpload: selectfile,
11490
+ onDelete: () => {
11491
+ setUploadedFile(null);
11492
+ },
11493
+ id: id,
11494
+ message: uploadedFile ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`CS_ACTION_NO_FILEUPLOADED`),
11495
+ textStyles: {
11496
+ width: "100%"
11497
+ },
11498
+ inputStyles: {
11499
+ width: "280px"
11500
+ },
11501
+ accept: ".pdf, .jpeg, .jpg, .png",
11502
+ buttonType: "button",
11503
+ error: !uploadedFile
11504
+ }))), getLoading && /*#__PURE__*/React.createElement(Loader$1, {
11505
+ page: true
11506
+ }));
11507
+ }
11508
+
10342
11509
  const RentAndLeasePropertyDetails = ({
10343
11510
  onGoBack,
10344
11511
  goNext,
10345
11512
  currentStepData,
10346
- t,
10347
11513
  validateStep,
10348
11514
  config
10349
11515
  }) => {
11516
+ var _watch;
10350
11517
  const dispatch = useDispatch();
10351
11518
  const tenantId = window.localStorage.getItem("Employee.tenant-id");
10352
- const filters = {
10353
- tenantId,
10354
- searchType: "1"
10355
- };
10356
- const {
10357
- data,
10358
- isLoading,
10359
- isError
10360
- } = Digit.Hooks.rentandlease.useRentAndLeaseProperties(filters);
11519
+ const [documentsData, setDocumentsData] = useState([]);
11520
+ const [error, setError] = useState(null);
10361
11521
  const {
10362
- triggerLoader,
10363
- triggerToast
10364
- } = config === null || config === void 0 ? void 0 : config.currStepConfig[0];
11522
+ t
11523
+ } = useTranslation();
10365
11524
  const propertyTypeOptions = [{
10366
11525
  name: t("ON_RENT"),
10367
11526
  code: "rent",
@@ -10370,6 +11529,17 @@ const RentAndLeasePropertyDetails = ({
10370
11529
  name: t("ON_LEASE"),
10371
11530
  code: "lease",
10372
11531
  i18nKey: "lease"
11532
+ }, {
11533
+ name: t("ON_DEED"),
11534
+ code: "deed",
11535
+ i18nKey: "deed"
11536
+ }];
11537
+ const applicationTypeOptions = [{
11538
+ name: t("Legacy"),
11539
+ code: "Legacy"
11540
+ }, {
11541
+ name: t("New"),
11542
+ code: "new"
10373
11543
  }];
10374
11544
  const propertySpecificOptions = [{
10375
11545
  name: t("COMMERCIAL"),
@@ -10389,16 +11559,44 @@ const RentAndLeasePropertyDetails = ({
10389
11559
  code: "Non-Prime",
10390
11560
  i18nKey: "Non-Prime"
10391
11561
  }];
11562
+ const arrearReasonOptions = [{
11563
+ name: t("PREVIOUS DUES"),
11564
+ code: "PREVIOUS DUES"
11565
+ }, {
11566
+ name: t("UNDER DISPUTE"),
11567
+ code: "UNDER DISPUTE"
11568
+ }, {
11569
+ name: t("COURT CASE"),
11570
+ code: "COURT CASE"
11571
+ }];
11572
+ const filters = {
11573
+ tenantId,
11574
+ searchType: "1"
11575
+ };
11576
+ const {
11577
+ data,
11578
+ isLoading,
11579
+ isError
11580
+ } = Digit.Hooks.rentandlease.useRentAndLeaseProperties(filters);
11581
+ const {
11582
+ triggerLoader,
11583
+ triggerToast
11584
+ } = config === null || config === void 0 ? void 0 : config.currStepConfig[0];
10392
11585
  const {
10393
11586
  control,
10394
11587
  handleSubmit,
10395
11588
  setValue,
10396
11589
  watch,
11590
+ clearErrors,
10397
11591
  formState: {
10398
11592
  errors
10399
11593
  }
10400
11594
  } = useForm({
10401
11595
  defaultValues: {
11596
+ applicationType: {
11597
+ name: t("Legacy"),
11598
+ code: "Legacy"
11599
+ },
10402
11600
  propertyId: "",
10403
11601
  propertyName: "",
10404
11602
  propertyType: "",
@@ -10419,6 +11617,19 @@ const RentAndLeasePropertyDetails = ({
10419
11617
  duration: ""
10420
11618
  }
10421
11619
  });
11620
+ const docUploadData = {
11621
+ Challan: {
11622
+ Documents: [{
11623
+ code: "arrearDoc",
11624
+ documentType: "ID_PROOF",
11625
+ required: watch("arrear") > 0 ? true : false,
11626
+ active: true,
11627
+ description: "ID proof of offender",
11628
+ maxSizeMB: 2,
11629
+ hasDropdown: true
11630
+ }]
11631
+ }
11632
+ };
10422
11633
  const selectedPropertyType = watch("propertyType");
10423
11634
  const selectedPropertySpecific = watch("propertySpecific");
10424
11635
  const selectedLocationType = watch("locationType");
@@ -10432,6 +11643,16 @@ const RentAndLeasePropertyDetails = ({
10432
11643
  setFilteredProperties(properties);
10433
11644
  }
10434
11645
  }, [data, selectedPropertyType, selectedPropertySpecific, selectedLocationType]);
11646
+ useEffect(() => {
11647
+ const startDate = watch("arrearStartDate");
11648
+ if (startDate) {
11649
+ const end = new Date(startDate);
11650
+ end.setFullYear(end.getFullYear() + 1);
11651
+ setValue("arrearEndDate", end.toISOString().split("T")[0], {
11652
+ shouldValidate: true
11653
+ });
11654
+ }
11655
+ }, [watch("arrearStartDate")]);
10435
11656
  const todayISO = new Date().toISOString().split("T")[0];
10436
11657
  const minStartDate = new Date();
10437
11658
  minStartDate.setMonth(minStartDate.getMonth() - 11);
@@ -10453,6 +11674,19 @@ const RentAndLeasePropertyDetails = ({
10453
11674
  });
10454
11675
  };
10455
11676
  const onSubmit = async data => {
11677
+ var _data$applicationType, _documentsData$;
11678
+ console.log("data", data);
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
+ }
10456
11690
  if (validateStep) {
10457
11691
  const validationErrors = validateStep(data);
10458
11692
  if (Object.keys(validationErrors).length > 0) return;
@@ -10475,6 +11709,13 @@ const RentAndLeasePropertyDetails = ({
10475
11709
  shouldValidate: true
10476
11710
  });
10477
11711
  });
11712
+ if (propertyDetails.arrearDoc) {
11713
+ setDocumentsData([{
11714
+ documentType: "arrearDoc",
11715
+ filestoreId: propertyDetails.arrearDoc,
11716
+ documentUid: propertyDetails.arrearDoc
11717
+ }]);
11718
+ }
10478
11719
  }
10479
11720
  }, [currentStepData, setValue]);
10480
11721
  useEffect(() => {
@@ -10519,12 +11760,42 @@ const RentAndLeasePropertyDetails = ({
10519
11760
  triggerToast("ERROR_WHILE_FETCHING_PROPERTIES", true);
10520
11761
  }
10521
11762
  }, [isError, triggerToast]);
11763
+ const handleDocumentsSelect = data => {
11764
+ console.log("data check", data);
11765
+ setDocumentsData(data);
11766
+ };
11767
+ useEffect(() => {
11768
+ if (watch("arrear") <= 0) {
11769
+ clearErrors(["arrearStartDate", "arrearEndDate", "arrearReason", "remarks"]);
11770
+ }
11771
+ }, [watch("arrear")]);
10522
11772
  return /*#__PURE__*/React.createElement("form", {
10523
11773
  onSubmit: handleSubmit(onSubmit)
10524
11774
  }, /*#__PURE__*/React.createElement(CardSectionHeader, {
10525
11775
  className: "card-section-header"
10526
11776
  }, t("ES_TITILE_PROPERTY_DETAILS")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
10527
11777
  className: "card-label-smaller"
11778
+ }, t("PT_COMMON_TABLE_COL_APP_TYPE"), " ", /*#__PURE__*/React.createElement("span", {
11779
+ className: "mandatory-asterisk"
11780
+ }, "*")), /*#__PURE__*/React.createElement(Controller, {
11781
+ control: control,
11782
+ name: "applicationType",
11783
+ rules: {
11784
+ required: t("RENT_LEASE_APPLICATION_TYPE_REQUIRED")
11785
+ },
11786
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
11787
+ className: "form-field",
11788
+ select: props.onChange,
11789
+ selected: props.value,
11790
+ option: applicationTypeOptions,
11791
+ defaultValues: true,
11792
+ optionKey: "name",
11793
+ t: t
11794
+ })
11795
+ })), errors.applicationType && /*#__PURE__*/React.createElement(CardLabelError, {
11796
+ className: "ral-error-label"
11797
+ }, getErrorMessage("applicationType")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
11798
+ className: "card-label-smaller"
10528
11799
  }, t("RENT_LEASE_PROPERTY_TYPE"), " ", /*#__PURE__*/React.createElement("span", {
10529
11800
  className: "mandatory-asterisk"
10530
11801
  }, "*")), /*#__PURE__*/React.createElement(Controller, {
@@ -10792,7 +12063,158 @@ const RentAndLeasePropertyDetails = ({
10792
12063
  })
10793
12064
  }))), errors.securityDeposit && /*#__PURE__*/React.createElement(CardLabelError, {
10794
12065
  className: "ral-error-label"
10795
- }, getErrorMessage("securityDeposit")), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
12066
+ }, getErrorMessage("securityDeposit")), ((_watch = watch("applicationType")) === null || _watch === void 0 ? void 0 : _watch.code) == "Legacy" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("Arrears"), " ", /*#__PURE__*/React.createElement("span", {
12067
+ className: "mandatory-asterisk"
12068
+ }, "*")), /*#__PURE__*/React.createElement("div", {
12069
+ className: "form-field"
12070
+ }, /*#__PURE__*/React.createElement(Controller, {
12071
+ control: control,
12072
+ name: "arrear",
12073
+ rules: {
12074
+ required: t("RENT_LEASE_ARREAR_REQUIRED")
12075
+ },
12076
+ render: ({
12077
+ value,
12078
+ onChange
12079
+ }) => /*#__PURE__*/React.createElement(TextInput, {
12080
+ type: "number",
12081
+ value: value || "",
12082
+ onChange: e => onChange(e.target.value)
12083
+ })
12084
+ }))), errors.arrear && /*#__PURE__*/React.createElement(CardLabelError, {
12085
+ className: "ral-error-label"
12086
+ }, getErrorMessage("arrear")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("RAL_START_DATE"), " ", watch("arrear") > 0 && /*#__PURE__*/React.createElement("span", {
12087
+ className: "mandatory-asterisk"
12088
+ }, "*")), /*#__PURE__*/React.createElement("div", {
12089
+ className: "form-field"
12090
+ }, /*#__PURE__*/React.createElement(Controller, {
12091
+ control: control,
12092
+ name: "arrearStartDate",
12093
+ rules: {
12094
+ validate: value => {
12095
+ const arrear = watch("arrear");
12096
+ if (arrear > 0 && !value) {
12097
+ return t("RENT_LEASE_RAL_START_DATE_REQUIRED");
12098
+ }
12099
+ return true;
12100
+ }
12101
+ },
12102
+ render: ({
12103
+ value,
12104
+ onChange
12105
+ }) => /*#__PURE__*/React.createElement(TextInput, {
12106
+ type: "date",
12107
+ min: minStartDateISO,
12108
+ value: value || "",
12109
+ onChange: e => {
12110
+ onChange(e);
12111
+ }
12112
+ })
12113
+ }))), errors.arrearStartDate && /*#__PURE__*/React.createElement(CardLabelError, {
12114
+ className: "ral-error-label"
12115
+ }, getErrorMessage("arrearStartDate")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("RAL_END_DATE"), " ", watch("arrear") > 0 && /*#__PURE__*/React.createElement("span", {
12116
+ className: "mandatory-asterisk"
12117
+ }, "*")), /*#__PURE__*/React.createElement("div", {
12118
+ className: "form-field"
12119
+ }, /*#__PURE__*/React.createElement(Controller, {
12120
+ control: control,
12121
+ name: "arrearEndDate",
12122
+ rules: {
12123
+ validate: value => {
12124
+ const arrear = watch("arrear");
12125
+ if (arrear > 0 && !value) {
12126
+ return t("RENT_LEASE_RAL_END_DATE_REQUIRED");
12127
+ }
12128
+ return true;
12129
+ }
12130
+ },
12131
+ render: ({
12132
+ value,
12133
+ onChange
12134
+ }) => {
12135
+ return /*#__PURE__*/React.createElement(TextInput, {
12136
+ type: "date",
12137
+ value: value || "",
12138
+ onChange: e => onChange(e.target.value)
12139
+ });
12140
+ }
12141
+ }))), errors.arrearEndDate && /*#__PURE__*/React.createElement(CardLabelError, {
12142
+ className: "ral-error-label"
12143
+ }, getErrorMessage("arrearEndDate")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
12144
+ className: "card-label-smaller"
12145
+ }, t("Reason"), " ", watch("arrear") > 0 && /*#__PURE__*/React.createElement("span", {
12146
+ className: "mandatory-asterisk"
12147
+ }, "*")), /*#__PURE__*/React.createElement(Controller, {
12148
+ control: control,
12149
+ name: "arrearReason",
12150
+ rules: {
12151
+ validate: value => {
12152
+ const arrear = watch("arrear");
12153
+ if (arrear > 0 && !value) {
12154
+ return t("RENT_LEASE_REASON_REQUIRED");
12155
+ }
12156
+ return true;
12157
+ }
12158
+ },
12159
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
12160
+ className: "form-field",
12161
+ select: props.onChange,
12162
+ selected: props.value,
12163
+ option: arrearReasonOptions,
12164
+ defaultValues: true,
12165
+ optionKey: "name",
12166
+ t: t
12167
+ })
12168
+ })), errors.arrearReason && /*#__PURE__*/React.createElement(CardLabelError, {
12169
+ className: "ral-error-label"
12170
+ }, getErrorMessage("arrearReason")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
12171
+ className: "card-label-smaller"
12172
+ }, t("Remarks"), " ", watch("arrear") > 0 && /*#__PURE__*/React.createElement("span", {
12173
+ className: "mandatory-asterisk"
12174
+ }, "*")), /*#__PURE__*/React.createElement("div", {
12175
+ className: "form-field"
12176
+ }, /*#__PURE__*/React.createElement(Controller, {
12177
+ control: control,
12178
+ name: "remarks",
12179
+ rules: {
12180
+ validate: value => {
12181
+ const arrear = watch("arrear");
12182
+ if (arrear > 0 && !(value !== null && value !== void 0 && value.trim())) {
12183
+ return t("RENT_LEASE_REMARKS_REQUIRED");
12184
+ }
12185
+ return true;
12186
+ }
12187
+ },
12188
+ render: ({
12189
+ value,
12190
+ onChange
12191
+ }) => /*#__PURE__*/React.createElement(TextInput, {
12192
+ type: "text",
12193
+ value: value || "",
12194
+ onChange: e => onChange(e.target.value),
12195
+ t: t
12196
+ })
12197
+ }))), errors.remarks && /*#__PURE__*/React.createElement(CardLabelError, {
12198
+ className: "ral-error-label"
12199
+ }, getErrorMessage("remarks")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ChallanDocuments, {
12200
+ t: t,
12201
+ config: {
12202
+ key: "documents"
12203
+ },
12204
+ onSelect: handleDocumentsSelect,
12205
+ userType: "CITIZEN",
12206
+ formData: {
12207
+ documents: {
12208
+ documents: documentsData
12209
+ }
12210
+ },
12211
+ setError: setError,
12212
+ error: error,
12213
+ clearErrors: () => {},
12214
+ formState: {},
12215
+ data: docUploadData,
12216
+ isLoading: isLoading
12217
+ }))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
10796
12218
  label: t("Back"),
10797
12219
  className: "ral-back-btn",
10798
12220
  onSubmit: onGoBack
@@ -10883,9 +12305,11 @@ const RentAndLeaseCitizenDetails = ({
10883
12305
  const buildAllotmentPayload = ({
10884
12306
  propertyDetails,
10885
12307
  applicants,
12308
+ additionalDetails,
10886
12309
  tenantId,
10887
12310
  previousApplicationNumber: _previousApplicationNumber = null
10888
12311
  }) => {
12312
+ var _propertyDetails$pena;
10889
12313
  const startDateEpoch = propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.startDate ? new Date(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.startDate).getTime() : null;
10890
12314
  const endDateEpoch = propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.endDate ? new Date(propertyDetails === null || propertyDetails === void 0 ? void 0 : propertyDetails.endDate).getTime() : null;
10891
12315
  return {
@@ -10894,7 +12318,7 @@ const RentAndLeaseCitizenDetails = ({
10894
12318
  previousApplicationNumber: _previousApplicationNumber,
10895
12319
  startDate: startDateEpoch,
10896
12320
  endDate: endDateEpoch,
10897
- penaltyType: propertyDetails.penaltyType,
12321
+ penaltyType: typeof propertyDetails.penaltyType === "object" ? (_propertyDetails$pena = propertyDetails.penaltyType) === null || _propertyDetails$pena === void 0 ? void 0 : _propertyDetails$pena.code : propertyDetails.penaltyType,
10898
12322
  workflow: {
10899
12323
  action: "INITIATE",
10900
12324
  comments: "",
@@ -10916,11 +12340,14 @@ const RentAndLeaseCitizenDetails = ({
10916
12340
  addressId: a === null || a === void 0 ? void 0 : a.address
10917
12341
  }
10918
12342
  };
10919
- })
12343
+ }),
12344
+ ...(additionalDetails ? {
12345
+ additionalDetails: additionalDetails
12346
+ } : {})
10920
12347
  };
10921
12348
  };
10922
12349
  const onSubmit = async data => {
10923
- var _currentStepData$Crea, _currentStepData$Crea2, _currentStepData$Crea3;
12350
+ var _currentStepData$prop, _currentStepData$prop2, _currentStepData$prop3, _currentStepData$prop4, _currentStepData$prop5, _currentStepData$prop6, _currentStepData$prop7, _currentStepData$prop8, _currentStepData$prop9, _currentStepData$prop0, _currentStepData$prop1, _currentStepData$Crea, _currentStepData$Crea2, _currentStepData$Crea3;
10924
12351
  if (validateStep) {
10925
12352
  var _Object$keys;
10926
12353
  const validationErrors = validateStep(data);
@@ -10932,9 +12359,20 @@ const RentAndLeaseCitizenDetails = ({
10932
12359
  triggerToast(t("RAL_DUPLICATE_MOBILE_ERROR"), true);
10933
12360
  return;
10934
12361
  }
12362
+ 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;
12363
+ const additionalDetails = applicationType === "Legacy" ? {
12364
+ arrear: currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$prop3 = currentStepData.propertyDetails) === null || _currentStepData$prop3 === void 0 ? void 0 : _currentStepData$prop3.arrear,
12365
+ arrearDoc: currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$prop4 = currentStepData.propertyDetails) === null || _currentStepData$prop4 === void 0 ? void 0 : _currentStepData$prop4.arrearDoc,
12366
+ 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,
12367
+ 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,
12368
+ 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,
12369
+ applicationType: applicationType,
12370
+ remarks: currentStepData === null || currentStepData === void 0 ? void 0 : (_currentStepData$prop1 = currentStepData.propertyDetails) === null || _currentStepData$prop1 === void 0 ? void 0 : _currentStepData$prop1.remarks
12371
+ } : null;
10935
12372
  const payload = buildAllotmentPayload({
10936
12373
  propertyDetails: currentStepData === null || currentStepData === void 0 ? void 0 : currentStepData.propertyDetails,
10937
12374
  applicants: data === null || data === void 0 ? void 0 : data.applicants,
12375
+ additionalDetails,
10938
12376
  tenantId
10939
12377
  });
10940
12378
  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;
@@ -11447,7 +12885,7 @@ const NewRentAndLeaseStepFormFour = ({
11447
12885
  } = CreatedResponse || {};
11448
12886
  let formData = {};
11449
12887
  if (id) {
11450
- 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
+ var _CreatedResponse$Allo, _CreatedResponse$Allo2, _CreatedResponse$Allo3, _CreatedResponse$Allo4, _updatedPropertyDetai, _updatedPropertyDetai2, _updatedPropertyDetai3, _updatedPropertyDetai4, _CreatedResponse$Allo5, _CreatedResponse$Allo6, _CreatedResponse$Allo7, _CreatedResponse$Allo8, _CreatedResponse$Allo9, _CreatedResponse$Allo0, _CreatedResponse$Allo1, _updatedPropertyDetai5, _CreatedResponse$Allo10, _CreatedResponse$Allo11, _updatedPropertyDetai6;
11451
12889
  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) || [];
11452
12890
  const updatedApplicants = (updatedApplicantDetails === null || updatedApplicantDetails === void 0 ? void 0 : updatedApplicantDetails.applicants) || [];
11453
12891
  const mergedOwnerInfo = updatedApplicants.map((applicant, index) => {
@@ -11473,22 +12911,29 @@ const NewRentAndLeaseStepFormFour = ({
11473
12911
  });
11474
12912
  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) || {};
11475
12913
  const originalAdditionalDetails = Array.isArray(rawAdditionalDetails) ? rawAdditionalDetails[0] : rawAdditionalDetails;
11476
- const mergedAdditionalDetails = {
12914
+ const applicationType = (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai = updatedPropertyDetails.applicationType) === null || _updatedPropertyDetai === void 0 ? void 0 : _updatedPropertyDetai.code) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.applicationType);
12915
+ const additionalDetails = applicationType === "Legacy" ? {
11477
12916
  ...originalAdditionalDetails,
11478
12917
  ...updatedPropertyDetails,
11479
- 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),
11480
- 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),
11481
- 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)
11482
- };
12918
+ arrearDoc: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.arrearDoc) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.arrearDoc),
12919
+ arrearStartDate: updatedPropertyDetails !== null && updatedPropertyDetails !== void 0 && updatedPropertyDetails.arrearStartDate ? new Date(updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.arrearStartDate).getTime() : originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.arrearStartDate,
12920
+ arrearEndDate: updatedPropertyDetails !== null && updatedPropertyDetails !== void 0 && updatedPropertyDetails.arrearEndDate ? new Date(updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.arrearEndDate).getTime() : originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.arrearEndDate,
12921
+ allotmentType: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai2 = updatedPropertyDetails.propertyType) === null || _updatedPropertyDetai2 === void 0 ? void 0 : _updatedPropertyDetai2.code) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.allotmentType),
12922
+ 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),
12923
+ 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),
12924
+ applicationType: applicationType
12925
+ } : null;
11483
12926
  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;
11484
12927
  formData = {
11485
12928
  ...(CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo7 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo7 === void 0 ? void 0 : _CreatedResponse$Allo7[0]),
11486
12929
  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,
11487
12930
  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,
11488
- 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),
12931
+ penaltyType: typeof (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.penaltyType) === "object" ? updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai5 = updatedPropertyDetails.penaltyType) === null || _updatedPropertyDetai5 === void 0 ? void 0 : _updatedPropertyDetai5.code : (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),
11489
12932
  OwnerInfo: mergedOwnerInfo,
11490
- additionalDetails: [mergedAdditionalDetails],
11491
- 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),
12933
+ ...(additionalDetails && {
12934
+ additionalDetails: additionalDetails
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),
11492
12937
  Document: updatedDocuments.map(doc => {
11493
12938
  var _ref, _CreatedResponse$Allo12, _CreatedResponse$Allo13;
11494
12939
  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))) || {};
@@ -11518,7 +12963,7 @@ const NewRentAndLeaseStepFormFour = ({
11518
12963
  }
11519
12964
  };
11520
12965
  } else {
11521
- 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;
12966
+ var _CreatedResponse$Allo14, _CreatedResponse$Allo15, _CreatedResponse$Allo16, _CreatedResponse$Allo17, _updatedPropertyDetai7, _updatedPropertyDetai8, _updatedPropertyDetai9, _updatedPropertyDetai0, _CreatedResponse$Allo18, _CreatedResponse$Allo19, _CreatedResponse$Allo20, _CreatedResponse$Allo21, _CreatedResponse$Allo22, _updatedPropertyDetai1, _CreatedResponse$Allo23, _CreatedResponse$Allo24, _updatedPropertyDetai10;
11522
12967
  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) || [];
11523
12968
  const updatedApplicants = (updatedApplicantDetails === null || updatedApplicantDetails === void 0 ? void 0 : updatedApplicantDetails.applicants) || [];
11524
12969
  const mergedOwnerInfo = updatedApplicants.map((applicant, index) => {
@@ -11544,21 +12989,28 @@ const NewRentAndLeaseStepFormFour = ({
11544
12989
  });
11545
12990
  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) || {};
11546
12991
  const originalAdditionalDetails = Array.isArray(rawAdditionalDetails) ? rawAdditionalDetails[0] : rawAdditionalDetails;
11547
- const mergedAdditionalDetails = {
12992
+ const applicationType = (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai7 = updatedPropertyDetails.applicationType) === null || _updatedPropertyDetai7 === void 0 ? void 0 : _updatedPropertyDetai7.code) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.applicationType);
12993
+ const additionalDetails = applicationType === "Legacy" ? {
11548
12994
  ...originalAdditionalDetails,
11549
12995
  ...updatedPropertyDetails,
11550
- 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),
11551
- 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),
11552
- 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)
11553
- };
12996
+ arrearDoc: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.arrearDoc) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.arrearDoc),
12997
+ arrearStartDate: updatedPropertyDetails !== null && updatedPropertyDetails !== void 0 && updatedPropertyDetails.arrearStartDate ? new Date(updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.arrearStartDate).getTime() : originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.arrearStartDate,
12998
+ arrearEndDate: updatedPropertyDetails !== null && updatedPropertyDetails !== void 0 && updatedPropertyDetails.arrearEndDate ? new Date(updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.arrearEndDate).getTime() : originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.arrearEndDate,
12999
+ allotmentType: (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai8 = updatedPropertyDetails.propertyType) === null || _updatedPropertyDetai8 === void 0 ? void 0 : _updatedPropertyDetai8.code) || (originalAdditionalDetails === null || originalAdditionalDetails === void 0 ? void 0 : originalAdditionalDetails.allotmentType),
13000
+ 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),
13001
+ 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),
13002
+ applicationType: applicationType
13003
+ } : null;
11554
13004
  formData = {
11555
13005
  ...(CreatedResponse === null || CreatedResponse === void 0 ? void 0 : (_CreatedResponse$Allo18 = CreatedResponse.AllotmentDetails) === null || _CreatedResponse$Allo18 === void 0 ? void 0 : _CreatedResponse$Allo18[0]),
11556
13006
  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,
11557
13007
  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,
11558
- 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),
13008
+ penaltyType: typeof (updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : updatedPropertyDetails.penaltyType) === "object" ? updatedPropertyDetails === null || updatedPropertyDetails === void 0 ? void 0 : (_updatedPropertyDetai1 = updatedPropertyDetails.penaltyType) === null || _updatedPropertyDetai1 === void 0 ? void 0 : _updatedPropertyDetai1.code : (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),
11559
13009
  OwnerInfo: mergedOwnerInfo,
11560
- additionalDetails: [mergedAdditionalDetails],
11561
- 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),
13010
+ ...(additionalDetails && {
13011
+ additionalDetails: additionalDetails
13012
+ }),
13013
+ 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),
11562
13014
  Document: updatedDocuments.map(doc => {
11563
13015
  var _ref2, _CreatedResponse$Allo25, _CreatedResponse$Allo26;
11564
13016
  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))) || {};
@@ -11887,14 +13339,26 @@ function RentAndLeaseSelectDocument({
11887
13339
  function RentAndLeaseSummary({
11888
13340
  t
11889
13341
  }) {
11890
- var _formData$applicantDe, _formData$applicantDe2, _formData$applicantDe3, _formData$applicantDe4, _formData$documents, _formData$documents$d;
13342
+ var _formData$applicantDe, _formData$applicantDe2, _formData$applicantDe3, _formData$applicantDe4, _formData$documents, _formData$documents$d, _formData$documents2, _property$application, _property$arrearReaso, _property$arrearReaso2;
11891
13343
  const formData = useSelector(state => {
11892
13344
  var _state$rentAndLease, _state$rentAndLease$R;
11893
13345
  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) || {};
11894
13346
  });
11895
13347
  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] : [];
11896
13348
  const property = (formData === null || formData === void 0 ? void 0 : formData.propertyDetails) || {};
11897
- 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) || [];
13349
+ const standardDocs = (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) || [];
13350
+ const arrearDoc = property.arrearDoc ? [{
13351
+ documentType: "Arrear Doc",
13352
+ fileStoreId: property.arrearDoc
13353
+ }] : [];
13354
+ const docs = [...standardDocs, ...arrearDoc];
13355
+ const mergedDocsObject = {
13356
+ ...(formData === null || formData === void 0 ? void 0 : formData.documents),
13357
+ documents: {
13358
+ ...(formData === null || formData === void 0 ? void 0 : (_formData$documents2 = formData.documents) === null || _formData$documents2 === void 0 ? void 0 : _formData$documents2.documents),
13359
+ documents: docs
13360
+ }
13361
+ };
11898
13362
  const renderRow = (label, value) => /*#__PURE__*/React.createElement("div", {
11899
13363
  className: "ral-summary-row"
11900
13364
  }, /*#__PURE__*/React.createElement("div", {
@@ -11912,7 +13376,9 @@ function RentAndLeaseSummary({
11912
13376
  securityDeposit: t("SECURITY_DEPOSIT"),
11913
13377
  tax_applicable: t("GST_APPLICABLE"),
11914
13378
  refundApplicableOnDiscontinuation: t("REFUND_APPLICABLE"),
11915
- penaltyType: t("PENALTY_TYPE")
13379
+ penaltyType: t("PENALTY_TYPE"),
13380
+ startDate: t("RAL_START_DATE"),
13381
+ endDate: t("RAL_END_DATE")
11916
13382
  };
11917
13383
  return /*#__PURE__*/React.createElement("div", {
11918
13384
  className: "application-summary"
@@ -11943,8 +13409,17 @@ function RentAndLeaseSummary({
11943
13409
  if (key === "tax_applicable") {
11944
13410
  value = value === true ? t("YES") : t("NO");
11945
13411
  }
13412
+ if (typeof value === "number" && (key === "startDate" || key === "endDate")) {
13413
+ value = Digit.DateUtils.ConvertEpochToDate(value);
13414
+ }
11946
13415
  return renderRow(label, value || "NA");
11947
- }))), /*#__PURE__*/React.createElement(Card, {
13416
+ }))), (property === null || property === void 0 ? void 0 : (_property$application = property.applicationType) === null || _property$application === void 0 ? void 0 : _property$application.code) === "Legacy" && /*#__PURE__*/React.createElement(Card, {
13417
+ className: "summary-section"
13418
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
13419
+ className: "ral-summary-header-row"
13420
+ }, /*#__PURE__*/React.createElement("h3", {
13421
+ className: "ral-summary-heading"
13422
+ }, 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, {
11948
13423
  className: "summary-section"
11949
13424
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
11950
13425
  className: "ral-summary-header-row"
@@ -11956,7 +13431,7 @@ function RentAndLeaseSummary({
11956
13431
  key: index,
11957
13432
  className: "ral-summary-doc-card"
11958
13433
  }, /*#__PURE__*/React.createElement(RALDocuments, {
11959
- value: formData === null || formData === void 0 ? void 0 : formData.documents,
13434
+ value: mergedDocsObject,
11960
13435
  Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
11961
13436
  index: index
11962
13437
  })))) : /*#__PURE__*/React.createElement("div", null, t("CS_NO_DOCUMENTS_UPLOADED"))))));
@@ -13757,7 +15232,7 @@ const MyProperties = ({
13757
15232
  }, /*#__PURE__*/React.createElement("div", null, header && /*#__PURE__*/React.createElement(Header, {
13758
15233
  className: "ral-my-properties-header"
13759
15234
  }, t(header), " (", totalCount, ")"), getPropertiesData === null || getPropertiesData === void 0 ? void 0 : getPropertiesData.map((property, index) => {
13760
- var _ref, _ref2;
15235
+ var _ref, _property$additionalD, _property$additionalD2, _property$additionalD3, _ref2, _property$additionalD4, _property$additionalD5, _property$additionalD6;
13761
15236
  return /*#__PURE__*/React.createElement(Card, {
13762
15237
  key: index
13763
15238
  }, (property === null || property === void 0 ? void 0 : property.registrationNumber) && /*#__PURE__*/React.createElement(KeyNote, {
@@ -13768,13 +15243,13 @@ const MyProperties = ({
13768
15243
  note: (property === null || property === void 0 ? void 0 : property.applicationNumber) || t("CS_NA")
13769
15244
  }), /*#__PURE__*/React.createElement(KeyNote, {
13770
15245
  keyValue: t("RAL_ALLOTMENT_TYPE"),
13771
- 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")
15246
+ note: ((_ref = Array.isArray(property === null || property === void 0 ? void 0 : (_property$additionalD = property.additionalDetails) === null || _property$additionalD === void 0 ? void 0 : _property$additionalD.propertyDetails) ? property === null || property === void 0 ? void 0 : (_property$additionalD2 = property.additionalDetails) === null || _property$additionalD2 === void 0 ? void 0 : _property$additionalD2.propertyDetails[0] : property === null || property === void 0 ? void 0 : (_property$additionalD3 = property.additionalDetails) === null || _property$additionalD3 === void 0 ? void 0 : _property$additionalD3.propertyDetails) === null || _ref === void 0 ? void 0 : _ref.allotmentType) || t("CS_NA")
13772
15247
  }), /*#__PURE__*/React.createElement(KeyNote, {
13773
15248
  keyValue: t("STATUS"),
13774
15249
  note: t(property !== null && property !== void 0 && property.expireFlag ? "Renewed" : property.status)
13775
15250
  }), /*#__PURE__*/React.createElement(KeyNote, {
13776
15251
  keyValue: t("RENT_LEASE_PROPERTY_NAME"),
13777
- 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")
15252
+ note: ((_ref2 = Array.isArray(property === null || property === void 0 ? void 0 : (_property$additionalD4 = property.additionalDetails) === null || _property$additionalD4 === void 0 ? void 0 : _property$additionalD4.propertyDetails) ? property === null || property === void 0 ? void 0 : (_property$additionalD5 = property.additionalDetails) === null || _property$additionalD5 === void 0 ? void 0 : _property$additionalD5.propertyDetails[0] : property === null || property === void 0 ? void 0 : (_property$additionalD6 = property.additionalDetails) === null || _property$additionalD6 === void 0 ? void 0 : _property$additionalD6.propertyDetails) === null || _ref2 === void 0 ? void 0 : _ref2.propertyName) || t("CS_NA")
13778
15253
  }), /*#__PURE__*/React.createElement("div", {
13779
15254
  className: "ral-my-properties-actions"
13780
15255
  }, /*#__PURE__*/React.createElement(Link, {