@mseva/digit-ui-module-sv 1.1.49-dev.1.2 → 1.1.49-dev.1.4

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.
@@ -19300,6 +19300,7 @@ const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, pdfFiles =
19300
19300
  const formats = (downloadLink === null || downloadLink === void 0 ? void 0 : (_downloadLink$split = downloadLink.split(",")) === null || _downloadLink$split === void 0 ? void 0 : _downloadLink$split.filter(Boolean)) || [];
19301
19301
  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]) || "";
19302
19302
  };
19303
+ const pattern = /\[#\?.*?\*\*\]/;
19303
19304
  const timelineRows = timeline.map((item, index) => {
19304
19305
  var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$assigner2, _item$assigner3, _item$wfComment;
19305
19306
  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";
@@ -19309,7 +19310,8 @@ const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, pdfFiles =
19309
19310
  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";
19310
19311
  const action = (item === null || item === void 0 ? void 0 : item.performedAction) || "N/A";
19311
19312
  const status = (item === null || item === void 0 ? void 0 : item.status) || (item === null || item === void 0 ? void 0 : item.state) || "N/A";
19312
- const comment = (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "-";
19313
+ const rawComment = (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "-";
19314
+ const comment = typeof rawComment === "string" ? rawComment.split(pattern)[0] : rawComment;
19313
19315
  const documents = (item === null || item === void 0 ? void 0 : item.wfDocuments) || [];
19314
19316
  const sla = (item === null || item === void 0 ? void 0 : item.sla) || "N/A";
19315
19317
  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(", ") : "";
@@ -19530,7 +19532,9 @@ function NewApplicationTimeline({
19530
19532
  workflowDetails,
19531
19533
  t,
19532
19534
  tenantId = Digit.ULBService.getCurrentTenantId(),
19533
- timeObj
19535
+ timeObj,
19536
+ empUserName = null,
19537
+ handleSetEmpDesignation = () => {}
19534
19538
  }) {
19535
19539
  var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _employeeData$data, _employeeData$data$Em;
19536
19540
  const {
@@ -19605,6 +19609,9 @@ function NewApplicationTimeline({
19605
19609
  const translationKey = `COMMON_MASTERS_DESIGNATION_${assignment === null || assignment === void 0 ? void 0 : assignment.designation}`;
19606
19610
  deptMap[emp === null || emp === void 0 ? void 0 : emp.code] = translationKey;
19607
19611
  });
19612
+ if (employeeData && empUserName) {
19613
+ handleSetEmpDesignation(t(deptMap[empUserName]));
19614
+ }
19608
19615
  if (isLoading) return /*#__PURE__*/React.createElement(Loader, null);
19609
19616
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
19610
19617
  className: "custom-timeline-container"
@@ -19672,13 +19679,13 @@ function NewApplicationTimeline({
19672
19679
  className: "custom-officer-info"
19673
19680
  }, /*#__PURE__*/React.createElement("div", {
19674
19681
  className: "custom-officer-name"
19675
- }, (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.name) || t("CS_COMMON_NA")), (item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.emailId) && /*#__PURE__*/React.createElement("div", {
19682
+ }, (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", {
19683
+ className: "custom-officer-name"
19684
+ }, "- ", 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", {
19676
19685
  className: "custom-officer-email"
19677
19686
  }, /*#__PURE__*/React.createElement("span", {
19678
19687
  className: "custom-email-label"
19679
- }, t("Email")), " ", item === null || item === void 0 ? void 0 : (_item$assigner4 = item.assigner) === null || _item$assigner4 === void 0 ? void 0 : _item$assigner4.emailId), deptMap[item === null || item === void 0 ? void 0 : (_item$assigner5 = item.assigner) === null || _item$assigner5 === void 0 ? void 0 : _item$assigner5.userName] && /*#__PURE__*/React.createElement("div", {
19680
- className: "custom-officer-name"
19681
- }, t(deptMap[item === null || item === void 0 ? void 0 : (_item$assigner6 = item.assigner) === null || _item$assigner6 === void 0 ? void 0 : _item$assigner6.userName])))), /*#__PURE__*/React.createElement("div", {
19688
+ }, 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", {
19682
19689
  className: "custom-card-column custom-card-column-mid"
19683
19690
  }, (item === null || item === void 0 ? void 0 : item.sla) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h3", {
19684
19691
  className: "custom-action-title"
@@ -19700,9 +19707,13 @@ function NewApplicationTimeline({
19700
19707
  className: "custom-comments-title"
19701
19708
  }, t("Officer Comments")), /*#__PURE__*/React.createElement("div", {
19702
19709
  className: "custom-comment-text"
19703
- }, item === null || item === void 0 ? void 0 : (_item$wfComment3 = item.wfComment) === null || _item$wfComment3 === void 0 ? void 0 : _item$wfComment3.map((comment, idx) => /*#__PURE__*/React.createElement("p", {
19704
- key: idx
19705
- }, comment)))), (item === null || item === void 0 ? void 0 : (_item$assignes = item.assignes) === null || _item$assignes === void 0 ? void 0 : _item$assignes.length) > 0 && /*#__PURE__*/React.createElement("div", {
19710
+ }, item === null || item === void 0 ? void 0 : (_item$wfComment3 = item.wfComment) === null || _item$wfComment3 === void 0 ? void 0 : _item$wfComment3.map((comment, idx) => {
19711
+ const pattern = /\[#\?.*?\*\*\]/;
19712
+ const truncatedComment = typeof comment === "string" ? comment === null || comment === void 0 ? void 0 : comment.split(pattern)[0] : comment;
19713
+ return /*#__PURE__*/React.createElement("p", {
19714
+ key: idx
19715
+ }, truncatedComment);
19716
+ }))), (item === null || item === void 0 ? void 0 : (_item$assignes = item.assignes) === null || _item$assignes === void 0 ? void 0 : _item$assignes.length) > 0 && /*#__PURE__*/React.createElement("div", {
19706
19717
  className: "custom-assigned-to-footer"
19707
19718
  }, /*#__PURE__*/React.createElement("h3", {
19708
19719
  className: "custom-comments-title"
@@ -19710,9 +19721,9 @@ function NewApplicationTimeline({
19710
19721
  className: "custom-officer-info"
19711
19722
  }, /*#__PURE__*/React.createElement("div", {
19712
19723
  className: "custom-officer-name"
19713
- }, (_item$assignes$ = item.assignes[0]) === null || _item$assignes$ === void 0 ? void 0 : _item$assignes$.name), deptMap[(_item$assignes$2 = item.assignes[0]) === null || _item$assignes$2 === void 0 ? void 0 : _item$assignes$2.userName] && /*#__PURE__*/React.createElement("div", {
19724
+ }, (_item$assignes$ = item.assignes[0]) === null || _item$assignes$ === void 0 ? void 0 : _item$assignes$.name, deptMap[(_item$assignes$2 = item.assignes[0]) === null || _item$assignes$2 === void 0 ? void 0 : _item$assignes$2.userName] && /*#__PURE__*/React.createElement("span", {
19714
19725
  className: "custom-officer-email"
19715
- }, t(deptMap[(_item$assignes$3 = item.assignes[0]) === null || _item$assignes$3 === void 0 ? void 0 : _item$assignes$3.userName]))))), (item === null || item === void 0 ? void 0 : item.wfDocuments) && (item === null || item === void 0 ? void 0 : (_item$wfDocuments = item.wfDocuments) === null || _item$wfDocuments === void 0 ? void 0 : _item$wfDocuments.length) > 0 && /*#__PURE__*/React.createElement("div", {
19726
+ }, "- ", t(deptMap[(_item$assignes$3 = item.assignes[0]) === null || _item$assignes$3 === void 0 ? void 0 : _item$assignes$3.userName])))))), (item === null || item === void 0 ? void 0 : item.wfDocuments) && (item === null || item === void 0 ? void 0 : (_item$wfDocuments = item.wfDocuments) === null || _item$wfDocuments === void 0 ? void 0 : _item$wfDocuments.length) > 0 && /*#__PURE__*/React.createElement("div", {
19716
19727
  className: "custom-comments-section-no-border"
19717
19728
  }, /*#__PURE__*/React.createElement("h4", {
19718
19729
  className: "custom-comments-title"