@mseva/digit-ui-module-noc 1.0.79-dev.15 → 1.0.79-dev.16

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.
@@ -2,6 +2,7 @@ import { SearchField, TextInput, CardLabelError, SubmitBar, Loader as Loader$2,
2
2
  import React, { Fragment, useMemo, useReducer, useCallback, useState, useEffect as useEffect$1, useRef } from 'react';
3
3
  import { Link, useLocation, useHistory, Switch, useParams, useRouteMatch } from 'react-router-dom';
4
4
  import { useTranslation } from 'react-i18next';
5
+ import CryptoJS from 'crypto-js';
5
6
  import { useFormContext, useForm, FormProvider, Controller, useFieldArray } from 'react-hook-form';
6
7
  import { useQueryClient } from 'react-query';
7
8
  import EXIF from 'exif-js';
@@ -304,18 +305,30 @@ const downloadPdfFromURL = async receiptUrl => {
304
305
  window.open(downloadUrl, "_blank");
305
306
  }
306
307
  };
307
- function encodeURIComponentCustom(str) {
308
- return str.split("").map(char => {
309
- const code = char.charCodeAt(0);
310
- if (code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122 || ["-", "_", ".", "~"].includes(char)) {
311
- return char;
312
- }
313
- return "%" + code.toString(16).toUpperCase();
314
- }).join("");
315
- }
316
- function decodeURIComponentCustom(str) {
317
- return str.replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
318
- }
308
+ const encodeURIComponentCustom = text => {
309
+ const SECRET_KEY = localStorage.getItem("token");
310
+ if (!SECRET_KEY) {
311
+ console.error("SECRET_KEY (token) not found in localStorage");
312
+ return null;
313
+ }
314
+ const encrypted = CryptoJS.AES.encrypt(text, SECRET_KEY).toString();
315
+ return encrypted.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
316
+ };
317
+ const decodeURIComponentCustom = cipherText => {
318
+ try {
319
+ const SECRET_KEY = localStorage.getItem("token");
320
+ if (!SECRET_KEY) {
321
+ console.error("SECRET_KEY (token) not found in localStorage");
322
+ return null;
323
+ }
324
+ const base64 = cipherText.replace(/-/g, "+").replace(/_/g, "/");
325
+ const bytes = CryptoJS.AES.decrypt(base64, SECRET_KEY);
326
+ return bytes.toString(CryptoJS.enc.Utf8);
327
+ } catch (e) {
328
+ console.error("Error decrypting ID:", e);
329
+ return null;
330
+ }
331
+ };
319
332
 
320
333
  function listCacheClear() {
321
334
  this.__data__ = [];
@@ -7805,7 +7818,7 @@ const EmployeeApp = ({
7805
7818
  path: `${path}/inbox/application-overview/:nocid`,
7806
7819
  component: NOCEmployeeApplicationOverview
7807
7820
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7808
- path: `${path}/search/application-overview/:id`,
7821
+ path: `${path}/search/application-overview/:nocid`,
7809
7822
  component: ApplicationOverview
7810
7823
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7811
7824
  path: `${path}/inbox`,
@@ -14129,7 +14142,7 @@ function NewApplicationTimeline({
14129
14142
  }))), /*#__PURE__*/React.createElement("div", {
14130
14143
  className: "custom-timeline-entries"
14131
14144
  }, sortedData === null || sortedData === void 0 ? void 0 : sortedData.map((item, index) => {
14132
- var _item$auditDetails, _item$auditDetails2, _item$assigner2, _item$assigner3, _item$assigner4, _item$assigner5, _item$assigner6, _item$wfComment, _item$wfComment2, _item$wfComment3, _item$assignes, _item$assignes$, _item$assignes$2, _item$assignes$3, _item$wfDocuments, _item$wfDocuments2;
14145
+ var _item$auditDetails, _item$auditDetails2, _item$assigner2, _item$assigner3, _item$assigner4, _item$wfComment, _item$wfComment2, _item$wfComment3, _item$assignes, _item$assignes$, _item$assignes$2, _item$assignes$3, _item$wfDocuments, _item$wfDocuments2;
14133
14146
  return /*#__PURE__*/React.createElement("div", {
14134
14147
  key: index,
14135
14148
  className: "custom-timeline-entry"
@@ -14166,13 +14179,9 @@ function NewApplicationTimeline({
14166
14179
  className: "custom-officer-info"
14167
14180
  }, /*#__PURE__*/React.createElement("div", {
14168
14181
  className: "custom-officer-name"
14169
- }, (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.name) || t("CS_COMMON_NA"), deptMap[item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.userName] && /*#__PURE__*/React.createElement("span", {
14182
+ }, (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.name) || t("CS_COMMON_NA")), deptMap[item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.userName] && /*#__PURE__*/React.createElement("div", {
14170
14183
  className: "custom-officer-name"
14171
- }, "- ", t(deptMap[item === null || item === void 0 ? void 0 : (_item$assigner4 = item.assigner) === null || _item$assigner4 === void 0 ? void 0 : _item$assigner4.userName]))), (item === null || item === void 0 ? void 0 : (_item$assigner5 = item.assigner) === null || _item$assigner5 === void 0 ? void 0 : _item$assigner5.emailId) && /*#__PURE__*/React.createElement("div", {
14172
- className: "custom-officer-email"
14173
- }, /*#__PURE__*/React.createElement("span", {
14174
- className: "custom-email-label"
14175
- }, t("Email")), " ", item === null || item === void 0 ? void 0 : (_item$assigner6 = item.assigner) === null || _item$assigner6 === void 0 ? void 0 : _item$assigner6.emailId))), /*#__PURE__*/React.createElement("div", {
14184
+ }, t(deptMap[item === null || item === void 0 ? void 0 : (_item$assigner4 = item.assigner) === null || _item$assigner4 === void 0 ? void 0 : _item$assigner4.userName])))), /*#__PURE__*/React.createElement("div", {
14176
14185
  className: "custom-card-column custom-card-column-mid"
14177
14186
  }, (item === null || item === void 0 ? void 0 : item.sla) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h3", {
14178
14187
  className: "custom-action-title"
@@ -14185,7 +14194,7 @@ function NewApplicationTimeline({
14185
14194
  }, /*#__PURE__*/React.createElement("h3", {
14186
14195
  className: "custom-action-title"
14187
14196
  }, t("Action")), /*#__PURE__*/React.createElement("div", {
14188
- className: "custom-status-text"
14197
+ className: `custom-status-text ${(item === null || item === void 0 ? void 0 : item.performedAction) === "OBSERVATION" ? "chb-slot-status--unavailable" : ""}`
14189
14198
  }, t((item === null || item === void 0 ? void 0 : item.performedAction) || "CS_COMMON_NA")))), (item === null || item === void 0 ? void 0 : item.wfComment) && (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment.length) > 0 && (item === null || item === void 0 ? void 0 : (_item$wfComment2 = item.wfComment) === null || _item$wfComment2 === void 0 ? void 0 : _item$wfComment2.some(c => c === null || c === void 0 ? void 0 : c.trim())) && /*#__PURE__*/React.createElement("div", {
14190
14199
  className: "custom-comments-section container-full-width"
14191
14200
  }, /*#__PURE__*/React.createElement("div", {
@@ -15575,8 +15584,9 @@ const ApplicationDetails = props => {
15575
15584
  const ApplicationOverview = () => {
15576
15585
  var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _nocDatils$2, _workflowDetails$data8, _workflowDetails$data9, _applicationDetails$a, _applicationDetails$a2, _applicationDetails$a3;
15577
15586
  const {
15578
- id
15587
+ nocid
15579
15588
  } = useParams();
15589
+ const id = decodeURIComponentCustom(nocid);
15580
15590
  const {
15581
15591
  t
15582
15592
  } = useTranslation();
@@ -15609,6 +15619,8 @@ const ApplicationOverview = () => {
15609
15619
  data: applicationDetails
15610
15620
  } = Digit.Hooks.noc.useNOCDetails(t, tenantId, {
15611
15621
  applicationNo: id
15622
+ }, {
15623
+ enabled: !!id
15612
15624
  });
15613
15625
  const {
15614
15626
  isLoading: updatingApplication,
@@ -16570,7 +16582,7 @@ const NOCFeeTable = ({
16570
16582
  window.addEventListener("resize", checkMobile);
16571
16583
  return () => window.removeEventListener("resize", checkMobile);
16572
16584
  }, []);
16573
- console.log("feeHistory", feeHistory);
16585
+ console.log('feeHistory', feeHistory);
16574
16586
  const columns = [{
16575
16587
  key: "title",
16576
16588
  label: "BPA_TAXHEAD_CODE",
@@ -16582,7 +16594,6 @@ const NOCFeeTable = ({
16582
16594
  headerLabel: "BPA_AMOUNT",
16583
16595
  type: "custom",
16584
16596
  render: (row, rowIndex, t) => {
16585
- var _feeData$row$index, _feeData$row$index2;
16586
16597
  if (row.taxHeadCode === "NOC_TOTAL") {
16587
16598
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", {
16588
16599
  style: {
@@ -16601,7 +16612,7 @@ const NOCFeeTable = ({
16601
16612
  t: t,
16602
16613
  type: "number",
16603
16614
  isMandatory: false,
16604
- value: ((_feeData$row$index = feeData[row.index]) === null || _feeData$row$index === void 0 ? void 0 : _feeData$row$index.adjustedAmount) === 0 ? "" : ((_feeData$row$index2 = feeData[row.index]) === null || _feeData$row$index2 === void 0 ? void 0 : _feeData$row$index2.adjustedAmount) || row.amount || "",
16615
+ value: feeData[row.index] && feeData[row.index].adjustedAmount === 0 ? "" : feeData[row.index] && feeData[row.index].adjustedAmount || row.amount || "",
16605
16616
  onChange: e => {
16606
16617
  let val = e.target.value;
16607
16618
  if (val.length > 1 && val.startsWith("0")) {
@@ -16620,20 +16631,20 @@ const NOCFeeTable = ({
16620
16631
  headerLabel: "BPA_REMARKS",
16621
16632
  type: "custom",
16622
16633
  render: (row, rowIndex, t) => {
16623
- var _feeData$row$index4;
16634
+ var _feeData$row$index2;
16624
16635
  if (row.taxHeadCode === "NOC_TOTAL") {
16625
16636
  return " ";
16626
16637
  }
16627
16638
  if (disable) {
16628
- var _feeData$row$index3;
16629
- return /*#__PURE__*/React.createElement("div", null, ((_feeData$row$index3 = feeData[row.index]) === null || _feeData$row$index3 === void 0 ? void 0 : _feeData$row$index3.remark) || /*#__PURE__*/React.createElement(TextArea, {
16639
+ var _feeData$row$index;
16640
+ return /*#__PURE__*/React.createElement("div", null, ((_feeData$row$index = feeData[row.index]) === null || _feeData$row$index === void 0 ? void 0 : _feeData$row$index.remark) || /*#__PURE__*/React.createElement(TextArea, {
16630
16641
  placeholder: "Enter remarks",
16631
16642
  disabled: true,
16632
16643
  className: "custom-fee-table-textarea"
16633
16644
  }));
16634
16645
  }
16635
16646
  return /*#__PURE__*/React.createElement(TextArea, {
16636
- value: ((_feeData$row$index4 = feeData[row.index]) === null || _feeData$row$index4 === void 0 ? void 0 : _feeData$row$index4.remark) || "",
16647
+ value: ((_feeData$row$index2 = feeData[row.index]) === null || _feeData$row$index2 === void 0 ? void 0 : _feeData$row$index2.remark) || "",
16637
16648
  onChange: e => handleRemarkChange(row.index, e.target.value, row.amount),
16638
16649
  disabled: false,
16639
16650
  className: "custom-fee-table-textarea",
@@ -16701,7 +16712,7 @@ const NOCFeeTable = ({
16701
16712
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
16702
16713
  className: "custom-fee-mobile-cards"
16703
16714
  }, feeDataWithTotal.map((row, i) => {
16704
- var _feeData$row$index5, _feeData$row$index6, _feeData$row$index7;
16715
+ var _feeData$row$index3;
16705
16716
  return /*#__PURE__*/React.createElement("div", {
16706
16717
  key: row.index || i,
16707
16718
  className: `custom-fee-card ${(row === null || row === void 0 ? void 0 : row.taxHeadCode) === "NOC_TOTAL" ? "custom-fee-card-total-row" : ""}`
@@ -16721,7 +16732,7 @@ const NOCFeeTable = ({
16721
16732
  t: t,
16722
16733
  type: "text",
16723
16734
  isMandatory: false,
16724
- value: ((_feeData$row$index5 = feeData[row.index]) === null || _feeData$row$index5 === void 0 ? void 0 : _feeData$row$index5.adjustedAmount) === 0 ? "" : ((_feeData$row$index6 = feeData[row.index]) === null || _feeData$row$index6 === void 0 ? void 0 : _feeData$row$index6.adjustedAmount) || row.amount || "",
16735
+ value: feeData[row.index] && feeData[row.index].adjustedAmount === 0 ? "" : feeData[row.index] && feeData[row.index].adjustedAmount !== null && feeData[row.index].adjustedAmount !== undefined ? feeData[row.index].adjustedAmount : row.amount !== null && row.amount !== undefined ? row.amount : "",
16725
16736
  onChange: e => {
16726
16737
  let val = e.target.value;
16727
16738
  if (/^\d*\.?\d*$/.test(val)) {
@@ -16748,7 +16759,7 @@ const NOCFeeTable = ({
16748
16759
  }, /*#__PURE__*/React.createElement("label", {
16749
16760
  className: "custom-fee-card-label"
16750
16761
  }, t("BPA_REMARKS")), /*#__PURE__*/React.createElement(TextArea, {
16751
- value: ((_feeData$row$index7 = feeData[row.index]) === null || _feeData$row$index7 === void 0 ? void 0 : _feeData$row$index7.remark) || "",
16762
+ value: ((_feeData$row$index3 = feeData[row.index]) === null || _feeData$row$index3 === void 0 ? void 0 : _feeData$row$index3.remark) || "",
16752
16763
  onChange: e => handleRemarkChange(row.index, e.target.value, row.amount),
16753
16764
  disabled: disable,
16754
16765
  className: "custom-fee-table-textarea",
@@ -18506,6 +18517,7 @@ const InspectionReport$1 = ({
18506
18517
  sessionStorage.setItem("INSPECTION_DATA", JSON.stringify(data));
18507
18518
  }, [FieldReports]);
18508
18519
  useEffect$1(() => {
18520
+ console.log("useffect 2INSPECTION_REPORT_PENDING");
18509
18521
  let ques = [];
18510
18522
  let documentlist = [];
18511
18523
  bpaDocs && bpaDocs.BPA.CheckList.map(ob => {
@@ -18980,15 +18992,15 @@ const getSiteDetails = (appData, t) => {
18980
18992
  }, {
18981
18993
  title: t("NOC_ROAD_TYPE_LABEL"),
18982
18994
  value: (appData === null || appData === void 0 ? void 0 : (_appData$nocDetails16 = appData.nocDetails) === null || _appData$nocDetails16 === void 0 ? void 0 : (_appData$nocDetails17 = _appData$nocDetails16.additionalDetails) === null || _appData$nocDetails17 === void 0 ? void 0 : (_appData$nocDetails18 = _appData$nocDetails17.siteDetails) === null || _appData$nocDetails18 === void 0 ? void 0 : (_appData$nocDetails19 = _appData$nocDetails18.roadType) === null || _appData$nocDetails19 === void 0 ? void 0 : _appData$nocDetails19.name) || (appData === null || appData === void 0 ? void 0 : (_appData$nocDetails20 = appData.nocDetails) === null || _appData$nocDetails20 === void 0 ? void 0 : (_appData$nocDetails21 = _appData$nocDetails20.additionalDetails) === null || _appData$nocDetails21 === void 0 ? void 0 : (_appData$nocDetails22 = _appData$nocDetails21.siteDetails) === null || _appData$nocDetails22 === void 0 ? void 0 : _appData$nocDetails22.roadType) || "N/A"
18995
+ }, {
18996
+ title: t("NOC_NET_TOTAL_AREA_LABEL"),
18997
+ value: (appData === null || appData === void 0 ? void 0 : (_appData$nocDetails23 = appData.nocDetails) === null || _appData$nocDetails23 === void 0 ? void 0 : (_appData$nocDetails24 = _appData$nocDetails23.additionalDetails) === null || _appData$nocDetails24 === void 0 ? void 0 : (_appData$nocDetails25 = _appData$nocDetails24.siteDetails) === null || _appData$nocDetails25 === void 0 ? void 0 : _appData$nocDetails25.netTotalArea) || "N/A"
18983
18998
  }, {
18984
18999
  title: t("NOC_AREA_LEFT_FOR_ROAD_WIDENING_LABEL"),
18985
- value: (appData === null || appData === void 0 ? void 0 : (_appData$nocDetails23 = appData.nocDetails) === null || _appData$nocDetails23 === void 0 ? void 0 : (_appData$nocDetails24 = _appData$nocDetails23.additionalDetails) === null || _appData$nocDetails24 === void 0 ? void 0 : (_appData$nocDetails25 = _appData$nocDetails24.siteDetails) === null || _appData$nocDetails25 === void 0 ? void 0 : _appData$nocDetails25.areaLeftForRoadWidening) || "N/A"
19000
+ value: (appData === null || appData === void 0 ? void 0 : (_appData$nocDetails26 = appData.nocDetails) === null || _appData$nocDetails26 === void 0 ? void 0 : (_appData$nocDetails27 = _appData$nocDetails26.additionalDetails) === null || _appData$nocDetails27 === void 0 ? void 0 : (_appData$nocDetails28 = _appData$nocDetails27.siteDetails) === null || _appData$nocDetails28 === void 0 ? void 0 : _appData$nocDetails28.areaLeftForRoadWidening) || "N/A"
18986
19001
  }, {
18987
19002
  title: t("NOC_NET_PLOT_AREA_AFTER_WIDENING_LABEL"),
18988
- value: (appData === null || appData === void 0 ? void 0 : (_appData$nocDetails26 = appData.nocDetails) === null || _appData$nocDetails26 === void 0 ? void 0 : (_appData$nocDetails27 = _appData$nocDetails26.additionalDetails) === null || _appData$nocDetails27 === void 0 ? void 0 : (_appData$nocDetails28 = _appData$nocDetails27.siteDetails) === null || _appData$nocDetails28 === void 0 ? void 0 : _appData$nocDetails28.netPlotAreaAfterWidening) || "N/A"
18989
- }, {
18990
- title: t("NOC_NET_TOTAL_AREA_LABEL"),
18991
- value: (appData === null || appData === void 0 ? void 0 : (_appData$nocDetails29 = appData.nocDetails) === null || _appData$nocDetails29 === void 0 ? void 0 : (_appData$nocDetails30 = _appData$nocDetails29.additionalDetails) === null || _appData$nocDetails30 === void 0 ? void 0 : (_appData$nocDetails31 = _appData$nocDetails30.siteDetails) === null || _appData$nocDetails31 === void 0 ? void 0 : _appData$nocDetails31.netTotalArea) || "N/A"
19003
+ value: (appData === null || appData === void 0 ? void 0 : (_appData$nocDetails29 = appData.nocDetails) === null || _appData$nocDetails29 === void 0 ? void 0 : (_appData$nocDetails30 = _appData$nocDetails29.additionalDetails) === null || _appData$nocDetails30 === void 0 ? void 0 : (_appData$nocDetails31 = _appData$nocDetails30.siteDetails) === null || _appData$nocDetails31 === void 0 ? void 0 : _appData$nocDetails31.netPlotAreaAfterWidening) || "N/A"
18992
19004
  }, {
18993
19005
  title: t("NOC_ROAD_WIDTH_AT_SITE_LABEL"),
18994
19006
  value: (appData === null || appData === void 0 ? void 0 : (_appData$nocDetails32 = appData.nocDetails) === null || _appData$nocDetails32 === void 0 ? void 0 : (_appData$nocDetails33 = _appData$nocDetails32.additionalDetails) === null || _appData$nocDetails33 === void 0 ? void 0 : (_appData$nocDetails34 = _appData$nocDetails33.siteDetails) === null || _appData$nocDetails34 === void 0 ? void 0 : _appData$nocDetails34.roadWidthAtSite) || "N/A"
@@ -19216,6 +19228,7 @@ const getJESiteImages = async (appData, t, stateCode) => {
19216
19228
  const documentLink = pdfDownloadLink(res === null || res === void 0 ? void 0 : res.data, img === null || img === void 0 ? void 0 : img.filestoreId);
19217
19229
  const exiflink = `${window.origin}/filestore/v1/files/id?fileStoreId=${img === null || img === void 0 ? void 0 : img.filestoreId}&tenantId=${stateCode}`;
19218
19230
  const exifData = await getExifDataFromUrl(exiflink);
19231
+ console.log("exifData in siteImages", exifData);
19219
19232
  if ([3, 6, 8].includes(exifData === null || exifData === void 0 ? void 0 : exifData.Orientation)) {
19220
19233
  exifData.Orientation = 1;
19221
19234
  }
@@ -21019,7 +21032,9 @@ const NOCEmployeeApplicationOverview = () => {
21019
21032
  refetch
21020
21033
  } = Digit.Hooks.noc.useNOCSearchApplication({
21021
21034
  applicationNo: id
21022
- }, tenantId);
21035
+ }, tenantId, {
21036
+ enabled: !!id
21037
+ });
21023
21038
  const loading = isLoading || getLoader;
21024
21039
  const applicationDetails = data === null || data === void 0 ? void 0 : data.resData;
21025
21040
  console.log("applicationDetails", applicationDetails);
@@ -22564,7 +22579,11 @@ const useInboxMobileCardsData = ({
22564
22579
  [t("NOC_APPLICATION_NUMBER")]: applicationId,
22565
22580
  [t("TL_COMMON_TABLE_COL_APP_DATE")]: format(new Date(date), 'dd/MM/yyyy'),
22566
22581
  [t("NOC_PRIMARY_OWNER_NAME_LABEL")]: t(owner),
22567
- [t("PT_COMMON_TABLE_COL_STATUS_LABEL")]: t(status)
22582
+ [t("PT_COMMON_TABLE_COL_STATUS_LABEL")]: t(status),
22583
+ "Vehicle Log": {
22584
+ id: encodeURIComponentCustom(applicationId),
22585
+ hidden: true
22586
+ }
22568
22587
  }));
22569
22588
  const MobileSortFormValues = () => {
22570
22589
  const sortOrderOptions = [{
@@ -22594,10 +22613,14 @@ const useInboxMobileCardsData = ({
22594
22613
  })
22595
22614
  }));
22596
22615
  };
22616
+ const serviceRequestIdKeyFunction = object => {
22617
+ var _object$VehicleLog;
22618
+ return (_object$VehicleLog = object["Vehicle Log"]) === null || _object$VehicleLog === void 0 ? void 0 : _object$VehicleLog.id;
22619
+ };
22597
22620
  return {
22598
22621
  data: dataForMobileInboxCards,
22599
22622
  linkPrefix: `${parentRoute}/inbox/application-overview/`,
22600
- serviceRequestIdKey: t("NOC_APPLICATION_NUMBER"),
22623
+ serviceRequestIdKey: serviceRequestIdKeyFunction,
22601
22624
  MobileSortFormValues
22602
22625
  };
22603
22626
  };
@@ -22968,6 +22991,13 @@ const NOCBreadCrumbs$1 = ({
22968
22991
  t
22969
22992
  } = useTranslation();
22970
22993
  const getBreadcrumbs = () => {
22994
+ var _Digit$UserService, _user$info, _user$info$roles, _user$info2, _user$info2$roles;
22995
+ const tenantId = localStorage.getItem("CITIZEN.CITY");
22996
+ const user = (_Digit$UserService = Digit.UserService) === null || _Digit$UserService === void 0 ? void 0 : _Digit$UserService.getUser();
22997
+ const isUserRegistered = (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.some(role => (role === null || role === void 0 ? void 0 : role.code) === "BPA_ARCHITECT")) || (user === null || user === void 0 ? void 0 : (_user$info2 = user.info) === null || _user$info2 === void 0 ? void 0 : (_user$info2$roles = _user$info2.roles) === null || _user$info2$roles === void 0 ? void 0 : _user$info2$roles.some(role => {
22998
+ var _role$code;
22999
+ return (role === null || role === void 0 ? void 0 : (_role$code = role.code) === null || _role$code === void 0 ? void 0 : _role$code.includes("BPA")) && (role === null || role === void 0 ? void 0 : role.tenantId) === tenantId;
23000
+ }));
22971
23001
  const breadcrumbs = [];
22972
23002
  const hasSecondBreadcrumb = location.pathname.includes("/noc/new-application") || location.pathname.includes("noc/my-application") || location.pathname.includes("noc/search/application-overview/") || location.pathname.includes("noc/search-application");
22973
23003
  breadcrumbs.push(/*#__PURE__*/React.createElement("span", {
@@ -22987,7 +23017,7 @@ const NOCBreadCrumbs$1 = ({
22987
23017
  breadcrumbs.push(/*#__PURE__*/React.createElement("span", {
22988
23018
  key: "noc"
22989
23019
  }, /*#__PURE__*/React.createElement(Link, {
22990
- to: "/digit-ui/citizen/noc-home",
23020
+ to: isUserRegistered ? "/digit-ui/citizen/obps/home" : "/digit-ui/citizen/noc-home",
22991
23021
  style: {
22992
23022
  textDecoration: "none"
22993
23023
  }
@@ -23044,7 +23074,7 @@ const App = () => {
23044
23074
  path: `${path}/my-application`,
23045
23075
  component: NOCCitizenMyApplications
23046
23076
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
23047
- path: `${path}/edit-application/:id`,
23077
+ path: `${path}/edit-application/:nocid`,
23048
23078
  component: NewNOCEditApplication
23049
23079
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
23050
23080
  path: `${path}/search/application-overview/:nocid`,
@@ -27939,6 +27969,8 @@ function NOCSummary({
27939
27969
  const propertyId = formData === null || formData === void 0 ? void 0 : (_formData$application3 = formData.applicationDetails) === null || _formData$application3 === void 0 ? void 0 : (_formData$application4 = _formData$application3.owners) === null || _formData$application4 === void 0 ? void 0 : (_formData$application5 = _formData$application4[0]) === null || _formData$application5 === void 0 ? void 0 : _formData$application5.propertyId;
27940
27970
  const applicationNo = formData === null || formData === void 0 ? void 0 : (_formData$apiData = formData.apiData) === null || _formData$apiData === void 0 ? void 0 : (_formData$apiData$Noc = _formData$apiData.Noc) === null || _formData$apiData$Noc === void 0 ? void 0 : (_formData$apiData$Noc2 = _formData$apiData$Noc[0]) === null || _formData$apiData$Noc2 === void 0 ? void 0 : _formData$apiData$Noc2.applicationNo;
27941
27971
  const submittedOn = (formData === null || formData === void 0 ? void 0 : (_formData$apiData2 = formData.apiData) === null || _formData$apiData2 === void 0 ? void 0 : (_formData$apiData2$No = _formData$apiData2.Noc) === null || _formData$apiData2$No === void 0 ? void 0 : (_formData$apiData2$No2 = _formData$apiData2$No[0]) === null || _formData$apiData2$No2 === void 0 ? void 0 : (_formData$apiData2$No3 = _formData$apiData2$No2.nocDetails) === null || _formData$apiData2$No3 === void 0 ? void 0 : (_formData$apiData2$No4 = _formData$apiData2$No3.additionalDetails) === null || _formData$apiData2$No4 === void 0 ? void 0 : _formData$apiData2$No4.SubmittedOn) || Date.now();
27972
+ console.log('applicationNo, submittedOn', applicationNo, submittedOn);
27973
+ console.log("primaryOwner and propertyId here in summary", primaryOwner, propertyId);
27942
27974
  return /*#__PURE__*/React.createElement("div", {
27943
27975
  className: "employee-main-application-details"
27944
27976
  }, /*#__PURE__*/React.createElement("style", null, ` .data-table .row {border: 2px solid lightgrey;}`), /*#__PURE__*/React.createElement(StatusTable, {
@@ -29349,8 +29381,9 @@ const updatedCreateEmployeeconfig$1 = createEmployeeConfig$1.map(item => {
29349
29381
  const EditApplication = () => {
29350
29382
  var _applicationDetails$N, _nocObject$nocDetails, _nocObject$nocDetails2, _nocObject$nocDetails3, _nocObject$nocDetails4, _nocObject$documents, _nocObject$nocDetails5, _nocObject$nocDetails6, _nocObject$nocDetails7, _nocObject$nocDetails8, _nocObject$nocDetails9, _nocObject$nocDetails0, _genderTypeData$commo, _genderTypeData$commo2, _genderTypeData$commo3, _zoneList$tenant, _zoneList$tenant$zone, _zoneList$tenant$zone2, _applicationDetails$N2;
29351
29383
  const {
29352
- id
29384
+ nocid
29353
29385
  } = useParams();
29386
+ const id = decodeURIComponentCustom(nocid);
29354
29387
  const history = useHistory();
29355
29388
  const {
29356
29389
  t
@@ -29371,7 +29404,9 @@ const EditApplication = () => {
29371
29404
  data
29372
29405
  } = Digit.Hooks.noc.useNOCSearchApplication({
29373
29406
  applicationNo: id
29374
- }, tenantId);
29407
+ }, tenantId, {
29408
+ enabled: !!id
29409
+ });
29375
29410
  const applicationDetails = data === null || data === void 0 ? void 0 : data.resData;
29376
29411
  console.log("applicationDetails here==>", applicationDetails);
29377
29412
  const nocObject = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$N = applicationDetails.Noc) === null || _applicationDetails$N === void 0 ? void 0 : _applicationDetails$N[0]) || {};
@@ -29715,7 +29750,7 @@ const MyApplications = ({
29715
29750
  label: t("TL_VIEW_DETAILS"),
29716
29751
  onSubmit: () => {
29717
29752
  var _application$Applicat0;
29718
- return history.push(`/digit-ui/citizen/noc/search/application-overview/${application === null || application === void 0 ? void 0 : (_application$Applicat0 = application.Applications) === null || _application$Applicat0 === void 0 ? void 0 : _application$Applicat0.applicationNo}`);
29753
+ return history.push(`/digit-ui/citizen/noc/search/application-overview/${encodeURIComponentCustom(application === null || application === void 0 ? void 0 : (_application$Applicat0 = application.Applications) === null || _application$Applicat0 === void 0 ? void 0 : _application$Applicat0.applicationNo)}`);
29719
29754
  }
29720
29755
  }));
29721
29756
  })) : /*#__PURE__*/React.createElement("div", {
@@ -29768,7 +29803,9 @@ const CitizenApplicationOverview = () => {
29768
29803
  refetch
29769
29804
  } = Digit.Hooks.noc.useNOCSearchApplication({
29770
29805
  applicationNo: id
29771
- }, tenantId);
29806
+ }, tenantId, {
29807
+ enabled: !!id
29808
+ });
29772
29809
  const applicationDetails = data === null || data === void 0 ? void 0 : data.resData;
29773
29810
  const [timeObj, setTimeObj] = useState(null);
29774
29811
  const [appDate, setAppDate] = useState(null);
@@ -30158,7 +30195,8 @@ const CitizenApplicationOverview = () => {
30158
30195
  Licenses: [action]
30159
30196
  };
30160
30197
  if ((action === null || action === void 0 ? void 0 : action.action) == "EDIT") {
30161
- history.push(`/digit-ui/citizen/noc/edit-application/${appNo}`);
30198
+ const encyptedID = encodeURIComponentCustom(appNo);
30199
+ history.push(`/digit-ui/citizen/noc/edit-application/${encyptedID}`);
30162
30200
  } else if ((action === null || action === void 0 ? void 0 : action.action) == "DRAFT") {
30163
30201
  setShowToast({
30164
30202
  key: "true",
@@ -30760,7 +30798,7 @@ const SearchApplicationMobileView$1 = ({
30760
30798
  data: propsMobileInboxCards,
30761
30799
  isTwoDynamicPrefix: false,
30762
30800
  linkPrefix: `/digit-ui/citizen/noc/search/application-overview/`,
30763
- serviceRequestIdKey: t("NOC_APPLICATION_NUMBER")
30801
+ serviceRequestIdKey: "Generated ID"
30764
30802
  }));
30765
30803
  };
30766
30804
 
@@ -30892,7 +30930,8 @@ const SearchApplication$1 = ({
30892
30930
  const propsMobileInboxCards = useMemo(() => data === null || data === void 0 ? void 0 : data.map(data => ({
30893
30931
  [t("NOC_APPLICATION_NUMBER")]: (data === null || data === void 0 ? void 0 : data.applicationNo) || "-",
30894
30932
  [t("TL_COMMON_TABLE_COL_APP_DATE")]: (data === null || data === void 0 ? void 0 : data.date) || "-",
30895
- [t("PT_COMMON_TABLE_COL_STATUS_LABEL")]: data !== null && data !== void 0 && data.applicationStatus ? t(`${data.applicationStatus}`) : "-"
30933
+ [t("PT_COMMON_TABLE_COL_STATUS_LABEL")]: data !== null && data !== void 0 && data.applicationStatus ? t(`${data.applicationStatus}`) : "-",
30934
+ "Generated ID": encodeURIComponentCustom(data === null || data === void 0 ? void 0 : data.applicationNo)
30896
30935
  })), [data]);
30897
30936
  if (isMobile) return /*#__PURE__*/React.createElement(FormProvider, methods, /*#__PURE__*/React.createElement(SearchApplicationMobileView$1, {
30898
30937
  SearchFormFieldsComponent: SearchFormFieldsComponent$1,