@mseva/digit-ui-module-noc 1.0.75 → 1.0.76

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.
@@ -13688,6 +13688,7 @@ const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, pdfFiles =
13688
13688
  const formats = (downloadLink === null || downloadLink === void 0 ? void 0 : (_downloadLink$split = downloadLink.split(",")) === null || _downloadLink$split === void 0 ? void 0 : _downloadLink$split.filter(Boolean)) || [];
13689
13689
  return (formats === null || formats === void 0 ? void 0 : formats.find(link => !(link !== null && link !== void 0 && link.includes("large")) && !(link !== null && link !== void 0 && link.includes("medium")) && !(link !== null && link !== void 0 && link.includes("small")))) || (formats === null || formats === void 0 ? void 0 : formats[0]) || "";
13690
13690
  };
13691
+ const pattern = /\[#\?.*?\*\*\]/;
13691
13692
  const timelineRows = timeline.map((item, index) => {
13692
13693
  var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$assigner2, _item$assigner3, _item$wfComment;
13693
13694
  const createdDate = (item === null || item === void 0 ? void 0 : (_item$auditDetails = item.auditDetails) === null || _item$auditDetails === void 0 ? void 0 : _item$auditDetails.created) || "N/A";
@@ -13697,7 +13698,8 @@ const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, pdfFiles =
13697
13698
  const mobileNumber = (item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.mobileNumber) || "N/A";
13698
13699
  const action = (item === null || item === void 0 ? void 0 : item.performedAction) || "N/A";
13699
13700
  const status = (item === null || item === void 0 ? void 0 : item.status) || (item === null || item === void 0 ? void 0 : item.state) || "N/A";
13700
- const comment = (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "-";
13701
+ const rawComment = (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "-";
13702
+ const comment = typeof rawComment === "string" ? rawComment.split(pattern)[0] : rawComment;
13701
13703
  const documents = (item === null || item === void 0 ? void 0 : item.wfDocuments) || [];
13702
13704
  const sla = (item === null || item === void 0 ? void 0 : item.sla) || "N/A";
13703
13705
  const assignedTo = Array.isArray(item === null || item === void 0 ? void 0 : item.assignes) ? item.assignes.map(a => a === null || a === void 0 ? void 0 : a.name).filter(Boolean).join(", ") : "";
@@ -16377,7 +16379,7 @@ const NOCFeeTable = ({
16377
16379
  style: {
16378
16380
  cursor: "pointer"
16379
16381
  }
16380
- }, /*#__PURE__*/React.createElement(CardSubHeader, null, t("FEE_HISTORY"), " ", showHistory ? "▲" : "▼")), showHistory && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
16382
+ }, /*#__PURE__*/React.createElement(CardSubHeader, null, t("FEE_HISTORY"), " ", showHistory ? "▲" : "▼")), showHistory && /*#__PURE__*/React.createElement("div", {
16381
16383
  style: {
16382
16384
  overflowX: "auto",
16383
16385
  WebkitOverflowScrolling: "touch",
@@ -16390,59 +16392,76 @@ const NOCFeeTable = ({
16390
16392
  style: {
16391
16393
  width: "100%",
16392
16394
  tableLayout: "auto",
16393
- minWidth: "500px",
16395
+ minWidth: "600px",
16394
16396
  borderCollapse: "collapse"
16395
16397
  }
16396
16398
  }, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", {
16397
- rowSpan: 2,
16398
- style: {
16399
- padding: "12px 8px",
16400
- fontSize: "12px",
16401
- minWidth: "120px"
16402
- }
16403
- }, t("LABELS")), Array.from({
16404
- length: Math.max(...Object.values(feeHistory).map(rows => rows.length))
16405
- }).map((_, idx) => /*#__PURE__*/React.createElement("th", {
16406
- key: idx,
16407
- colSpan: Object.keys(feeHistory).length,
16408
16399
  style: {
16409
16400
  padding: "12px 8px",
16410
16401
  fontSize: "12px",
16411
- textAlign: "center"
16402
+ minWidth: "150px"
16412
16403
  }
16413
- }, t("ENTRY"), " ", idx + 1))), /*#__PURE__*/React.createElement("tr", null, Array.from({
16414
- length: Math.max(...Object.values(feeHistory).map(rows => rows.length))
16415
- }).flatMap((_, idx) => Object.keys(feeHistory).map(taxHeadCode => /*#__PURE__*/React.createElement("th", {
16416
- key: `${idx}-${taxHeadCode}`,
16404
+ }, " "), Object.keys(feeHistory).map(taxHeadCode => /*#__PURE__*/React.createElement("th", {
16405
+ key: taxHeadCode,
16417
16406
  style: {
16418
16407
  padding: "12px 8px",
16419
16408
  fontSize: "12px",
16420
16409
  whiteSpace: "nowrap",
16421
16410
  minWidth: "120px"
16422
16411
  }
16423
- }, t(taxHeadCode)))))), /*#__PURE__*/React.createElement("tbody", null, ["FEE", "REMARK", "LAST_UPDATED_BY"].map(labelKey => /*#__PURE__*/React.createElement("tr", {
16424
- key: labelKey
16425
- }, /*#__PURE__*/React.createElement("td", {
16426
- style: {
16427
- fontWeight: "bold",
16428
- padding: "12px 8px"
16429
- }
16430
- }, t(labelKey)), Array.from({
16412
+ }, t(taxHeadCode))))), /*#__PURE__*/React.createElement("tbody", null, Array.from({
16431
16413
  length: Math.max(...Object.values(feeHistory).map(rows => rows.length))
16432
- }).flatMap((_, idx) => Object.entries(feeHistory).map(([taxHeadCode, historyRows]) => {
16433
- const h = historyRows[idx];
16434
- let value;
16435
- if (labelKey === "FEE") value = (h === null || h === void 0 ? void 0 : h.estimateAmount) || t("CS_NA");
16436
- if (labelKey === "REMARK") value = (h === null || h === void 0 ? void 0 : h.remarks) || t("CS_NA");
16437
- if (labelKey === "LAST_UPDATED_BY") value = (h === null || h === void 0 ? void 0 : h.who) || t("UNKNOWN");
16438
- return /*#__PURE__*/React.createElement("td", {
16439
- key: `${labelKey}-${idx}-${taxHeadCode}`,
16414
+ }).map((_, rowIdx) => {
16415
+ const descIdx = rowIdx;
16416
+ return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("tr", {
16417
+ key: `fee-${rowIdx}`
16418
+ }, /*#__PURE__*/React.createElement("td", {
16440
16419
  style: {
16420
+ fontWeight: "bold",
16441
16421
  padding: "12px 8px",
16442
- fontSize: "12px"
16422
+ borderBottom: "none"
16443
16423
  }
16444
- }, value);
16445
- }))))))))));
16424
+ }, t("FEE")), Object.entries(feeHistory).map(([taxHeadCode, historyRows]) => {
16425
+ const h = historyRows[descIdx];
16426
+ return /*#__PURE__*/React.createElement("td", {
16427
+ key: `${taxHeadCode}-fee-${rowIdx}`,
16428
+ style: {
16429
+ padding: "12px 8px"
16430
+ }
16431
+ }, (h === null || h === void 0 ? void 0 : h.estimateAmount) || t("CS_NA"));
16432
+ })), /*#__PURE__*/React.createElement("tr", {
16433
+ key: `remark-${rowIdx}`
16434
+ }, /*#__PURE__*/React.createElement("td", {
16435
+ style: {
16436
+ fontWeight: "bold",
16437
+ padding: "12px 8px",
16438
+ borderBottom: "none"
16439
+ }
16440
+ }, t("REMARK")), Object.entries(feeHistory).map(([taxHeadCode, historyRows]) => {
16441
+ const h = historyRows[descIdx];
16442
+ return /*#__PURE__*/React.createElement("td", {
16443
+ key: `${taxHeadCode}-remark-${rowIdx}`,
16444
+ style: {
16445
+ padding: "12px 8px"
16446
+ }
16447
+ }, (h === null || h === void 0 ? void 0 : h.remarks) || t("CS_NA"));
16448
+ })), /*#__PURE__*/React.createElement("tr", {
16449
+ key: `who-${rowIdx}`
16450
+ }, /*#__PURE__*/React.createElement("td", {
16451
+ style: {
16452
+ fontWeight: "bold",
16453
+ padding: "12px 8px"
16454
+ }
16455
+ }, t("LAST_UPDATED_BY")), Object.entries(feeHistory).map(([taxHeadCode, historyRows]) => {
16456
+ const h = historyRows[descIdx];
16457
+ return /*#__PURE__*/React.createElement("td", {
16458
+ key: `${taxHeadCode}-who-${rowIdx}`,
16459
+ style: {
16460
+ padding: "12px 8px"
16461
+ }
16462
+ }, (h === null || h === void 0 ? void 0 : h.who) || t("UNKNOWN"));
16463
+ })));
16464
+ }))))));
16446
16465
  };
16447
16466
 
16448
16467
  const NOCFeeEstimationDetails = ({
@@ -17838,6 +17857,12 @@ const getNOCSanctionLetter = async (application, t, EmpData, approverComment) =>
17838
17857
  }];
17839
17858
  regularized_label = "NA";
17840
17859
  }
17860
+ let areaSummary;
17861
+ if ((site === null || site === void 0 ? void 0 : site.buildingStatus) === "Built Up") {
17862
+ areaSummary = ` ${floorArea.map(f => `${f.floorNo}: ${f.value} sq.mtrs\n`).join(" ")}Basement Area: ${basementArea} sq.mtrs\nTotal Buildup Area (sq.mtrs): ${totalFloorArea} sq.mtrs `;
17863
+ } else {
17864
+ areaSummary = "NA";
17865
+ }
17841
17866
  const sanctionKeys = ["NOC_SANCTION_THREE", "NOC_SANCTION_FOUR", "NOC_SANCTION_FIVE", "NOC_SANCTION_SIX", "NOC_SANCTION_SEVEN", "NOC_SANCTION_EIGHT"];
17842
17867
  const isProvisional = (site === null || site === void 0 ? void 0 : site.specificationNocType) === "Provisional";
17843
17868
  const activeKeys = isProvisional ? sanctionKeys : sanctionKeys.slice(1);
@@ -17866,7 +17891,8 @@ const getNOCSanctionLetter = async (application, t, EmpData, approverComment) =>
17866
17891
  ...EmpData,
17867
17892
  approverComment,
17868
17893
  regularized_label,
17869
- ownersString
17894
+ ownersString,
17895
+ areaSummary
17870
17896
  }]
17871
17897
  };
17872
17898
  };
@@ -18373,9 +18399,9 @@ const InspectionReportForm = _props => {
18373
18399
  className: "bpa-table-container"
18374
18400
  }, /*#__PURE__*/React.createElement("table", {
18375
18401
  className: "customTable table-border-style"
18376
- }, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, t("BPA_CHECK_LIST_DETAILS")), /*#__PURE__*/React.createElement("th", null, t("BPA_REMARKS")))), /*#__PURE__*/React.createElement("tbody", null, extendedQuestions && extendedQuestions.map((ob, ind) => /*#__PURE__*/React.createElement("tr", {
18402
+ }, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, t("SR_NO")), /*#__PURE__*/React.createElement("th", null, t("BPA_CHECK_LIST_DETAILS")), /*#__PURE__*/React.createElement("th", null, t("BPA_REMARKS")))), /*#__PURE__*/React.createElement("tbody", null, extendedQuestions && extendedQuestions.map((ob, ind) => /*#__PURE__*/React.createElement("tr", {
18377
18403
  key: ind
18378
- }, /*#__PURE__*/React.createElement("td", null, t(ob === null || ob === void 0 ? void 0 : ob.question) || t("CS_NA")), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(Controller, {
18404
+ }, /*#__PURE__*/React.createElement("td", null, ind + 1), " ", /*#__PURE__*/React.createElement("td", null, t(ob === null || ob === void 0 ? void 0 : ob.question) || t("CS_NA")), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(Controller, {
18379
18405
  control: control,
18380
18406
  name: `Remarks_${ind}`,
18381
18407
  defaultValue: unit[`Remarks_${ind}`] || "",
@@ -18442,6 +18468,11 @@ const InspectionReportDisplay = ({
18442
18468
  t: t,
18443
18469
  data: tableData,
18444
18470
  columns: [{
18471
+ Header: t("SR_NO"),
18472
+ Cell: ({
18473
+ row
18474
+ }) => row.index + 1
18475
+ }, {
18445
18476
  Header: t("BPA_CHECK_LIST_DETAILS"),
18446
18477
  accessor: "question"
18447
18478
  }, {
@@ -18640,7 +18671,7 @@ const NOCEmployeeApplicationOverview = () => {
18640
18671
  if (approvercomments !== null && approvercomments !== void 0 && approvercomments.includes("[#?..**]")) {
18641
18672
  conditionText = approvercomments.split("[#?..**]")[1] || "";
18642
18673
  }
18643
- const finalComment = conditionText ? `The above approval is subjected to the following conditions: ${conditionText}` : "";
18674
+ const finalComment = conditionText ? `The above approval is subjected to the following conditions:\n${conditionText}` : "";
18644
18675
  setApproverComment(finalComment);
18645
18676
  }
18646
18677
  }, [workflowDetails]);
@@ -19006,10 +19037,17 @@ const NOCEmployeeApplicationOverview = () => {
19006
19037
  var _latestCalc$taxHeadEs2, _latestCalc$taxHeadEs3;
19007
19038
  if (!row.edited) return true;
19008
19039
  const originalRemark = (latestCalc === null || latestCalc === void 0 ? void 0 : (_latestCalc$taxHeadEs2 = latestCalc.taxHeadEstimates) === null || _latestCalc$taxHeadEs2 === void 0 ? void 0 : (_latestCalc$taxHeadEs3 = _latestCalc$taxHeadEs2.find(th => th.taxHeadCode === row.taxHeadCode)) === null || _latestCalc$taxHeadEs3 === void 0 ? void 0 : _latestCalc$taxHeadEs3.remarks) ?? "";
19009
- console.log("originalRemark", originalRemark);
19010
- const isremarksSame = row.remark && row.remark.trim() !== "" && row.remark.trim() !== originalRemark.trim();
19011
- console.log("isremarksSame", isremarksSame);
19012
- return row.remark && row.remark.trim() !== "" && row.remark.trim() !== originalRemark.trim();
19040
+ const adjustedAmount = row.adjustedAmount ?? 0;
19041
+ if ((row === null || row === void 0 ? void 0 : row.taxHeadCode) === "NOC_COMPOUNDING_FEES") {
19042
+ if (adjustedAmount > 0) {
19043
+ var _row$remark;
19044
+ return (row === null || row === void 0 ? void 0 : row.remark) && (row === null || row === void 0 ? void 0 : row.remark.trim()) !== "" && (row === null || row === void 0 ? void 0 : (_row$remark = row.remark) === null || _row$remark === void 0 ? void 0 : _row$remark.trim()) !== (originalRemark === null || originalRemark === void 0 ? void 0 : originalRemark.trim());
19045
+ }
19046
+ return true;
19047
+ } else {
19048
+ var _row$remark2, _row$remark3;
19049
+ return (row === null || row === void 0 ? void 0 : row.remark) && (row === null || row === void 0 ? void 0 : (_row$remark2 = row.remark) === null || _row$remark2 === void 0 ? void 0 : _row$remark2.trim()) !== "" && (row === null || row === void 0 ? void 0 : (_row$remark3 = row.remark) === null || _row$remark3 === void 0 ? void 0 : _row$remark3.trim()) !== (originalRemark === null || originalRemark === void 0 ? void 0 : originalRemark.trim());
19050
+ }
19013
19051
  });
19014
19052
  if (!hasNonZeroFee) {
19015
19053
  setShowToast({
@@ -24315,21 +24353,27 @@ const NOCApplicantDetails = _props => {
24315
24353
  }
24316
24354
  props.onChange(e);
24317
24355
  if (e) {
24318
- dispatch(UPDATE_NOCNewApplication_FORM("cpt", null));
24319
- dispatch(UPDATE_NOCNewApplication_FORM("applicationDetails", null));
24320
- dispatch(UPDATE_NOC_OwnerIds("ownerIdList", []));
24321
- dispatch(UPDATE_NOC_OwnerPhotos("ownerPhotoList", []));
24322
- dispatch(UPDATE_NOCNewApplication_FORM("siteDetails", {
24323
- ...(currentStepData === null || currentStepData === void 0 ? void 0 : currentStepData.siteDetails),
24324
- vasikaNumber: "",
24325
- vasikaDate: null,
24326
- netTotalArea: null,
24327
- proposedSiteAddress: ""
24328
- }));
24329
- reset({
24330
- owners: [defaultOwner()],
24331
- isPropertyAvailable: e
24332
- });
24356
+ const firstOwnerPropertyId = getValues("owners[0].propertyId");
24357
+ const isYes = e.value === true;
24358
+ const mustReset = tenantId === LUDHIANA_TENANT || tenantId === BATHINDA_TENANT;
24359
+ const shouldReset = isYes || mustReset || !!firstOwnerPropertyId && firstOwnerPropertyId.trim() !== "";
24360
+ if (shouldReset) {
24361
+ dispatch(UPDATE_NOCNewApplication_FORM("cpt", null));
24362
+ dispatch(UPDATE_NOCNewApplication_FORM("applicationDetails", null));
24363
+ dispatch(UPDATE_NOC_OwnerIds("ownerIdList", []));
24364
+ dispatch(UPDATE_NOC_OwnerPhotos("ownerPhotoList", []));
24365
+ dispatch(UPDATE_NOCNewApplication_FORM("siteDetails", {
24366
+ ...(currentStepData === null || currentStepData === void 0 ? void 0 : currentStepData.siteDetails),
24367
+ vasikaNumber: "",
24368
+ vasikaDate: null,
24369
+ netTotalArea: null,
24370
+ proposedSiteAddress: ""
24371
+ }));
24372
+ reset({
24373
+ owners: [defaultOwner()],
24374
+ isPropertyAvailable: e
24375
+ });
24376
+ }
24333
24377
  }
24334
24378
  setIsPropertyAvailable(e);
24335
24379
  },
@@ -28959,7 +29003,7 @@ const CitizenApplicationOverview = () => {
28959
29003
  if (approvercomments !== null && approvercomments !== void 0 && approvercomments.includes("[#?..**]")) {
28960
29004
  conditionText = approvercomments.split("[#?..**]")[1] || "";
28961
29005
  }
28962
- const finalComment = conditionText ? `The above approval is subjected to the following conditions: ${conditionText}` : "";
29006
+ const finalComment = conditionText ? `The above approval is subjected to the following conditions:\n${conditionText}` : "";
28963
29007
  setApproverComment(finalComment);
28964
29008
  }
28965
29009
  }, [workflowDetails]);