amp-workflow-ui 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -316,7 +316,8 @@ function SendBackDialog({
316
316
  sx: {
317
317
  width: "100%",
318
318
  color: snackbar.severity === "error" ? "#fff" : "inherit",
319
- bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0
319
+ bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0,
320
+ zIndex: 1e5
320
321
  },
321
322
  children: snackbar.message
322
323
  }
@@ -473,7 +474,8 @@ function ApproveDialog({
473
474
  sx: {
474
475
  width: "100%",
475
476
  color: snackbar.severity === "error" ? "#fff" : "inherit",
476
- bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0
477
+ bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0,
478
+ zIndex: 1e5
477
479
  },
478
480
  children: snackbar.message
479
481
  }
@@ -689,7 +691,8 @@ function RejectDialog({
689
691
  sx: {
690
692
  width: "100%",
691
693
  color: snackbar.severity === "error" ? "#fff" : "inherit",
692
- bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0
694
+ bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0,
695
+ zIndex: 1e5
693
696
  },
694
697
  children: snackbar.message
695
698
  }
@@ -846,7 +849,8 @@ function OnHoldDialog({
846
849
  sx: {
847
850
  width: "100%",
848
851
  color: snackbar.severity === "error" ? "#fff" : "inherit",
849
- bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0
852
+ bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0,
853
+ zIndex: 1e5
850
854
  },
851
855
  children: snackbar.message
852
856
  }
@@ -878,7 +882,7 @@ var CustomCard = styled(Card)(
878
882
  width: CARD_WIDTH,
879
883
  height: CARD_HEIGHT,
880
884
  borderRadius: 16,
881
- backgroundColor: cardType === "subCard" ? "#FFF2D8" : cardType === "disableCard" ? "#ECECEC" : "#F1F1FF",
885
+ backgroundColor: cardType === "subCard" ? "#FFF2D8 !important" : cardType === "disableCard" ? "#ECECEC !important" : "#F1F1FF !important",
882
886
  border: cardType === "disableCard" ? "none" : `1px solid ${theme.palette.primary.dark}`,
883
887
  overflow: "hidden",
884
888
  position: "relative"
@@ -991,8 +995,8 @@ function CustomTimelineWithStatus({ events }) {
991
995
  {
992
996
  label: event.status.title,
993
997
  sx: {
994
- backgroundColor: event.status.color,
995
- color: event.status.labelColor,
998
+ backgroundColor: `${event.status.color} !important`,
999
+ color: `${event.status.labelColor} !important`,
996
1000
  borderRadius: "40px",
997
1001
  height: 28,
998
1002
  fontWeight: 600,
@@ -1123,7 +1127,7 @@ function ApprovalWorkflow({
1123
1127
  userInfo
1124
1128
  }) {
1125
1129
  var _a, _b, _c, _d, _e, _f, _g;
1126
- const theme = useTheme$1();
1130
+ useTheme$1();
1127
1131
  const { api, urlBuilder, loadingComponent, ENV_VARIABLES } = useWorkflowContext();
1128
1132
  const [selectedApprovalOtions, setSelectedApprovalOtions] = useState(
1129
1133
  selectedWorkflowsList.length ? "selected" : "Action Required"
@@ -1134,6 +1138,7 @@ function ApprovalWorkflow({
1134
1138
  const [rejectTarget, setRejectTarget] = React7.useState(null);
1135
1139
  const [onHoldTarget, setOnHoldTarget] = React7.useState(null);
1136
1140
  const [expandedDetails, setExpandedDetails] = useState([]);
1141
+ console.log("\u{1F680} ~ ApprovalWorkflow ~ expandedDetails:", expandedDetails);
1137
1142
  const [urlConfig, setUrlConfig] = useState({});
1138
1143
  const [allRequestArray, setAllRequestArray] = useState([]);
1139
1144
  const [pendingRequestArray, setPendingRequestArray] = useState([]);
@@ -1236,45 +1241,38 @@ function ApprovalWorkflow({
1236
1241
  case "approved":
1237
1242
  return {
1238
1243
  title: "Approved",
1239
- color: theme.palette.success.light,
1240
- // e.g. light green background
1241
- labelColor: theme.palette.grey[100]
1242
- // e.g. light grey text
1244
+ color: "#e6f7e9",
1245
+ labelColor: "#389e49"
1243
1246
  };
1244
1247
  case "rejected":
1245
1248
  return {
1246
1249
  title: "Rejected",
1247
- color: theme.palette.error.light,
1248
- // light red background
1249
- labelColor: theme.palette.text.primary
1250
- // normal text color
1250
+ color: "#fff1f0",
1251
+ labelColor: "#f5222d"
1251
1252
  };
1252
1253
  case "onhold":
1253
- case "on_hold":
1254
1254
  return {
1255
1255
  title: "On Hold",
1256
- color: theme.palette.warning.light,
1257
- // soft amber background
1258
- labelColor: theme.palette.warning.main
1259
- // strong amber text
1256
+ color: "#fff7e6",
1257
+ labelColor: "#faad14"
1260
1258
  };
1261
- case "inprogress":
1262
- case "in_progress":
1259
+ case "sendback":
1263
1260
  return {
1264
- title: "In Progress",
1265
- color: theme.palette.info.light,
1266
- // light blue background
1267
- labelColor: theme.palette.info.main
1268
- // blue text
1261
+ title: "Send Back",
1262
+ color: "#e6f7ff",
1263
+ labelColor: "#1890ff"
1264
+ };
1265
+ case "completed":
1266
+ return {
1267
+ title: "Send Back",
1268
+ color: "#e6f7ff",
1269
+ labelColor: "#1890ff"
1269
1270
  };
1270
1271
  case "pending":
1271
- default:
1272
1272
  return {
1273
1273
  title: "Pending",
1274
- color: theme.palette.grey[200],
1275
- // light grey background
1276
- labelColor: theme.palette.text.primary
1277
- // normal text color
1274
+ color: "#f0f0f0",
1275
+ labelColor: "#595959"
1278
1276
  };
1279
1277
  }
1280
1278
  };
@@ -1471,8 +1469,8 @@ function ApprovalWorkflow({
1471
1469
  px: 2,
1472
1470
  pb: 3
1473
1471
  },
1474
- children: visibleSelectedRequests == null ? void 0 : visibleSelectedRequests.map((info, index) => {
1475
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l, _m, _n;
1472
+ children: visibleSelectedRequests.length > 0 ? visibleSelectedRequests == null ? void 0 : visibleSelectedRequests.map((info, index) => {
1473
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
1476
1474
  const currentLevel = info == null ? void 0 : info.levels.find(
1477
1475
  (level_) => level_.id === (info == null ? void 0 : info.current_level)
1478
1476
  );
@@ -1504,7 +1502,8 @@ function ApprovalWorkflow({
1504
1502
  borderRadius: "14px",
1505
1503
  boxShadow: "0px 2px 10px rgba(76, 78, 100, 0.1)",
1506
1504
  px: 3,
1507
- py: 2
1505
+ py: 2,
1506
+ background: "white !important"
1508
1507
  },
1509
1508
  children: [
1510
1509
  /* @__PURE__ */ jsxs(
@@ -1668,8 +1667,8 @@ function ApprovalWorkflow({
1668
1667
  {
1669
1668
  variant: "filled",
1670
1669
  sx: {
1671
- backgroundColor: getStatus(currentStatus).color,
1672
- color: getStatus(currentStatus).labelColor,
1670
+ backgroundColor: `${getStatus(currentStatus).color} !important`,
1671
+ color: `${getStatus(currentStatus).labelColor} !important`,
1673
1672
  height: "40px",
1674
1673
  px: 2,
1675
1674
  borderRadius: "100px !important",
@@ -1726,31 +1725,62 @@ function ApprovalWorkflow({
1726
1725
  },
1727
1726
  children: /* @__PURE__ */ jsx(CircularProgress, { size: 36, color: "primary" })
1728
1727
  }
1729
- ) : /* @__PURE__ */ jsx(
1730
- CustomTimelineWithStatus,
1731
- {
1732
- events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
1733
- var _a3, _b3, _c3, _d3;
1734
- return {
1735
- date: moment(item == null ? void 0 : item.created_at).format(
1736
- "DD-MM-YYYY"
1737
- ),
1738
- time: moment(item == null ? void 0 : item.created_at).format("HH:mm"),
1739
- title: (item == null ? void 0 : item.type) === "create" ? `Raised by - ${(_a3 = item == null ? void 0 : item.created_by_user) == null ? void 0 : _a3.full_name}` : ((_b3 = item == null ? void 0 : item.created_by_user) == null ? void 0 : _b3.full_name) || "N/A",
1740
- subTitle: ((_c3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _c3.comment) || "No Comments",
1741
- attachment: ((_d3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _d3.file) || null,
1742
- count: (item == null ? void 0 : item.current_level) == "L0" ? "L0" : item == null ? void 0 : item.current_level_count,
1743
- cardType: "card",
1744
- status: (item == null ? void 0 : item.type) === "approve" ? StatusObj.approved : (item == null ? void 0 : item.type) === "reject" ? StatusObj.rejected : (item == null ? void 0 : item.type) === "send_back" ? StatusObj.sendback : (item == null ? void 0 : item.type) === "onhold" ? StatusObj.onhold : null
1745
- };
1746
- })
1747
- }
1748
- ) })
1728
+ ) : /* @__PURE__ */ jsxs("div", { children: [
1729
+ /* @__PURE__ */ jsx(
1730
+ CustomTimelineWithStatus,
1731
+ {
1732
+ events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
1733
+ var _a3, _b3, _c3, _d3;
1734
+ return {
1735
+ date: moment(item == null ? void 0 : item.created_at).format(
1736
+ "DD-MM-YYYY"
1737
+ ),
1738
+ time: moment(item == null ? void 0 : item.created_at).format(
1739
+ "HH:mm"
1740
+ ),
1741
+ title: (item == null ? void 0 : item.type) === "create" ? `Raised by - ${(_a3 = item == null ? void 0 : item.created_by_user) == null ? void 0 : _a3.full_name}` : ((_b3 = item == null ? void 0 : item.created_by_user) == null ? void 0 : _b3.full_name) || "N/A",
1742
+ subTitle: ((_c3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _c3.comment) || "No Comments",
1743
+ attachment: ((_d3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _d3.file) || null,
1744
+ count: (item == null ? void 0 : item.current_level) == "L0" ? "L0" : item == null ? void 0 : item.current_level_count,
1745
+ cardType: "card",
1746
+ status: (item == null ? void 0 : item.type) === "approve" ? StatusObj.approved : (item == null ? void 0 : item.type) === "reject" ? StatusObj.rejected : (item == null ? void 0 : item.type) === "send_back" ? StatusObj.sendback : (item == null ? void 0 : item.type) === "onhold" ? StatusObj.onhold : null
1747
+ };
1748
+ })
1749
+ }
1750
+ ),
1751
+ /* @__PURE__ */ jsxs("div", { children: [
1752
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", children: /* @__PURE__ */ jsxs("span", { style: { fontWeight: "bold" }, children: [
1753
+ "Currently Assigned to:",
1754
+ " "
1755
+ ] }) }),
1756
+ /* @__PURE__ */ jsx(
1757
+ Tooltip,
1758
+ {
1759
+ title: (info == null ? void 0 : info.isLevelZero) ? (_p = (_o = expandedDetails == null ? void 0 : expandedDetails[0]) == null ? void 0 : _o.created_by_user) == null ? void 0 : _p.official_email_id : (_r = (_q = expandedDetails == null ? void 0 : expandedDetails[0]) == null ? void 0 : _q.assigned_user) == null ? void 0 : _r.official_email_id,
1760
+ children: /* @__PURE__ */ jsx(Typography, { variant: "caption", children: (info == null ? void 0 : info.isLevelZero) ? `${expandedDetails == null ? void 0 : expandedDetails[0].created_by_user.full_name} (${((_t = (_s = expandedDetails == null ? void 0 : expandedDetails[0]) == null ? void 0 : _s.created_by_user) == null ? void 0 : _t.group_employee_code) || "N/A"})` : `${(_v = (_u = expandedDetails == null ? void 0 : expandedDetails[0]) == null ? void 0 : _u.assigned_user) == null ? void 0 : _v.full_name} (${((_x = (_w = expandedDetails == null ? void 0 : expandedDetails[0]) == null ? void 0 : _w.assigned_user) == null ? void 0 : _x.group_employee_code) || "N/A"})` })
1761
+ }
1762
+ )
1763
+ ] })
1764
+ ] }) })
1749
1765
  ]
1750
1766
  },
1751
1767
  index
1752
1768
  );
1753
- })
1769
+ }) : /* @__PURE__ */ jsx(
1770
+ "div",
1771
+ {
1772
+ style: {
1773
+ height: "100%",
1774
+ width: "100%",
1775
+ color: "gray",
1776
+ fontSize: "20px",
1777
+ display: "flex",
1778
+ justifyContent: "center",
1779
+ alignItems: "center"
1780
+ },
1781
+ children: "NO RECORD FOUND"
1782
+ }
1783
+ )
1754
1784
  }
1755
1785
  ),
1756
1786
  selectedApprovalOtions === "All Requests" && /* @__PURE__ */ jsx(
@@ -1763,8 +1793,11 @@ function ApprovalWorkflow({
1763
1793
  px: 2,
1764
1794
  pb: 3
1765
1795
  },
1766
- children: visibleAllRequests == null ? void 0 : visibleAllRequests.map((info, index) => {
1767
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l, _m, _n;
1796
+ children: visibleAllRequests.length > 0 ? visibleAllRequests == null ? void 0 : visibleAllRequests.map((info, index) => {
1797
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
1798
+ if (!(info == null ? void 0 : info.isLevelZero)) {
1799
+ console.log("\u{1F680} ~ ApprovalWorkflow ~ Zero:", info);
1800
+ }
1768
1801
  const currentLevel = info == null ? void 0 : info.levels.find(
1769
1802
  (level_) => level_.id === (info == null ? void 0 : info.current_level)
1770
1803
  );
@@ -1796,7 +1829,8 @@ function ApprovalWorkflow({
1796
1829
  borderRadius: "14px",
1797
1830
  boxShadow: "0px 2px 10px rgba(76, 78, 100, 0.1)",
1798
1831
  px: 3,
1799
- py: 2
1832
+ py: 2,
1833
+ background: "white !important"
1800
1834
  },
1801
1835
  children: [
1802
1836
  /* @__PURE__ */ jsxs(
@@ -1967,8 +2001,8 @@ function ApprovalWorkflow({
1967
2001
  {
1968
2002
  variant: "filled",
1969
2003
  sx: {
1970
- backgroundColor: getStatus(currentStatus).color,
1971
- color: getStatus(currentStatus).labelColor,
2004
+ backgroundColor: `${getStatus(currentStatus).color} !important`,
2005
+ color: `${getStatus(currentStatus).labelColor} !important`,
1972
2006
  height: "40px",
1973
2007
  px: 2,
1974
2008
  borderRadius: "100px !important",
@@ -2025,31 +2059,62 @@ function ApprovalWorkflow({
2025
2059
  },
2026
2060
  children: /* @__PURE__ */ jsx(CircularProgress, { size: 36, color: "primary" })
2027
2061
  }
2028
- ) : /* @__PURE__ */ jsx(
2029
- CustomTimelineWithStatus,
2030
- {
2031
- events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
2032
- var _a3, _b3, _c3, _d3;
2033
- return {
2034
- date: moment(item == null ? void 0 : item.created_at).format(
2035
- "DD-MM-YYYY"
2036
- ),
2037
- time: moment(item == null ? void 0 : item.created_at).format("HH:mm"),
2038
- title: (item == null ? void 0 : item.type) === "create" ? `Raised by - ${(_a3 = item == null ? void 0 : item.created_by_user) == null ? void 0 : _a3.full_name}` : ((_b3 = item == null ? void 0 : item.created_by_user) == null ? void 0 : _b3.full_name) || "N/A",
2039
- subTitle: ((_c3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _c3.comment) || "No Comments",
2040
- attachment: ((_d3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _d3.file) || null,
2041
- count: (item == null ? void 0 : item.current_level) == "L0" ? "L0" : item == null ? void 0 : item.current_level_count,
2042
- cardType: "card",
2043
- status: (item == null ? void 0 : item.type) === "approve" ? StatusObj.approved : (item == null ? void 0 : item.type) === "reject" ? StatusObj.rejected : (item == null ? void 0 : item.type) === "send_back" ? StatusObj.sendback : (item == null ? void 0 : item.type) === "onhold" ? StatusObj.onhold : null
2044
- };
2045
- })
2046
- }
2047
- ) })
2062
+ ) : /* @__PURE__ */ jsxs("div", { children: [
2063
+ /* @__PURE__ */ jsx(
2064
+ CustomTimelineWithStatus,
2065
+ {
2066
+ events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
2067
+ var _a3, _b3, _c3, _d3;
2068
+ return {
2069
+ date: moment(item == null ? void 0 : item.created_at).format(
2070
+ "DD-MM-YYYY"
2071
+ ),
2072
+ time: moment(item == null ? void 0 : item.created_at).format(
2073
+ "HH:mm"
2074
+ ),
2075
+ title: (item == null ? void 0 : item.type) === "create" ? `Raised by - ${(_a3 = item == null ? void 0 : item.created_by_user) == null ? void 0 : _a3.full_name}` : ((_b3 = item == null ? void 0 : item.created_by_user) == null ? void 0 : _b3.full_name) || "N/A",
2076
+ subTitle: ((_c3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _c3.comment) || "No Comments",
2077
+ attachment: ((_d3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _d3.file) || null,
2078
+ count: (item == null ? void 0 : item.current_level) == "L0" ? "L0" : item == null ? void 0 : item.current_level_count,
2079
+ cardType: "card",
2080
+ status: (item == null ? void 0 : item.type) === "approve" ? StatusObj.approved : (item == null ? void 0 : item.type) === "reject" ? StatusObj.rejected : (item == null ? void 0 : item.type) === "send_back" ? StatusObj.sendback : (item == null ? void 0 : item.type) === "onhold" ? StatusObj.onhold : null
2081
+ };
2082
+ })
2083
+ }
2084
+ ),
2085
+ /* @__PURE__ */ jsxs("div", { children: [
2086
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", children: /* @__PURE__ */ jsxs("span", { style: { fontWeight: "bold" }, children: [
2087
+ "Currently Assigned to:",
2088
+ " "
2089
+ ] }) }),
2090
+ /* @__PURE__ */ jsx(
2091
+ Tooltip,
2092
+ {
2093
+ title: (info == null ? void 0 : info.isLevelZero) ? (_p = (_o = expandedDetails == null ? void 0 : expandedDetails[0]) == null ? void 0 : _o.created_by_user) == null ? void 0 : _p.official_email_id : (_r = (_q = expandedDetails == null ? void 0 : expandedDetails[0]) == null ? void 0 : _q.assigned_user) == null ? void 0 : _r.official_email_id,
2094
+ children: /* @__PURE__ */ jsx(Typography, { variant: "caption", children: (info == null ? void 0 : info.isLevelZero) ? `${expandedDetails == null ? void 0 : expandedDetails[0].created_by_user.full_name} (${((_t = (_s = expandedDetails == null ? void 0 : expandedDetails[0]) == null ? void 0 : _s.created_by_user) == null ? void 0 : _t.group_employee_code) || "N/A"})` : `${(_v = (_u = expandedDetails == null ? void 0 : expandedDetails[0]) == null ? void 0 : _u.assigned_user) == null ? void 0 : _v.full_name} (${((_x = (_w = expandedDetails == null ? void 0 : expandedDetails[0]) == null ? void 0 : _w.assigned_user) == null ? void 0 : _x.group_employee_code) || "N/A"})` })
2095
+ }
2096
+ )
2097
+ ] })
2098
+ ] }) })
2048
2099
  ]
2049
2100
  },
2050
2101
  index
2051
2102
  );
2052
- })
2103
+ }) : /* @__PURE__ */ jsx(
2104
+ "div",
2105
+ {
2106
+ style: {
2107
+ height: "100%",
2108
+ width: "100%",
2109
+ color: "gray",
2110
+ fontSize: "20px",
2111
+ display: "flex",
2112
+ justifyContent: "center",
2113
+ alignItems: "center"
2114
+ },
2115
+ children: "NO RECORD FOUND"
2116
+ }
2117
+ )
2053
2118
  }
2054
2119
  ),
2055
2120
  selectedApprovalOtions === "Action Required" && /* @__PURE__ */ jsx(
@@ -2062,8 +2127,8 @@ function ApprovalWorkflow({
2062
2127
  px: 2,
2063
2128
  pb: 3
2064
2129
  },
2065
- children: visiblePendingRequests == null ? void 0 : visiblePendingRequests.map((info, index) => {
2066
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k;
2130
+ children: visiblePendingRequests.length > 0 ? visiblePendingRequests == null ? void 0 : visiblePendingRequests.map((info, index) => {
2131
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
2067
2132
  const currentLevel = (_a2 = info == null ? void 0 : info.levels) == null ? void 0 : _a2.find(
2068
2133
  (level_) => level_.id === (info == null ? void 0 : info.current_level)
2069
2134
  );
@@ -2088,7 +2153,8 @@ function ApprovalWorkflow({
2088
2153
  borderRadius: "14px",
2089
2154
  boxShadow: "0px 2px 10px rgba(76, 78, 100, 0.1)",
2090
2155
  px: 3,
2091
- py: 2
2156
+ py: 2,
2157
+ background: "white !important"
2092
2158
  },
2093
2159
  children: [
2094
2160
  /* @__PURE__ */ jsxs(
@@ -2292,31 +2358,62 @@ function ApprovalWorkflow({
2292
2358
  },
2293
2359
  children: /* @__PURE__ */ jsx(CircularProgress, { size: 36, color: "primary" })
2294
2360
  }
2295
- ) : /* @__PURE__ */ jsx(
2296
- CustomTimelineWithStatus,
2297
- {
2298
- events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
2299
- var _a3, _b3, _c3, _d3;
2300
- return {
2301
- date: moment(item == null ? void 0 : item.created_at).format(
2302
- "DD-MM-YYYY"
2303
- ),
2304
- time: moment(item == null ? void 0 : item.created_at).format("HH:mm"),
2305
- title: (item == null ? void 0 : item.type) === "create" ? `Raised by - ${(_a3 = item == null ? void 0 : item.created_by_user) == null ? void 0 : _a3.full_name}` : ((_b3 = item == null ? void 0 : item.created_by_user) == null ? void 0 : _b3.full_name) || "N/A",
2306
- subTitle: ((_c3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _c3.comment) || "No Comments",
2307
- attachment: ((_d3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _d3.file) || null,
2308
- count: (item == null ? void 0 : item.current_level) == "L0" ? "L0" : item == null ? void 0 : item.current_level_count,
2309
- cardType: "card",
2310
- status: (item == null ? void 0 : item.type) === "approve" ? StatusObj.approved : (item == null ? void 0 : item.type) === "reject" ? StatusObj.rejected : (item == null ? void 0 : item.type) === "send_back" ? StatusObj.sendback : (item == null ? void 0 : item.type) === "onhold" ? StatusObj.onhold : null
2311
- };
2312
- })
2313
- }
2314
- ) })
2361
+ ) : /* @__PURE__ */ jsxs("div", { children: [
2362
+ /* @__PURE__ */ jsx(
2363
+ CustomTimelineWithStatus,
2364
+ {
2365
+ events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
2366
+ var _a3, _b3, _c3, _d3;
2367
+ return {
2368
+ date: moment(item == null ? void 0 : item.created_at).format(
2369
+ "DD-MM-YYYY"
2370
+ ),
2371
+ time: moment(item == null ? void 0 : item.created_at).format(
2372
+ "HH:mm"
2373
+ ),
2374
+ title: (item == null ? void 0 : item.type) === "create" ? `Raised by - ${(_a3 = item == null ? void 0 : item.created_by_user) == null ? void 0 : _a3.full_name}` : ((_b3 = item == null ? void 0 : item.created_by_user) == null ? void 0 : _b3.full_name) || "N/A",
2375
+ subTitle: ((_c3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _c3.comment) || "No Comments",
2376
+ attachment: ((_d3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _d3.file) || null,
2377
+ count: (item == null ? void 0 : item.current_level) == "L0" ? "L0" : item == null ? void 0 : item.current_level_count,
2378
+ cardType: "card",
2379
+ status: (item == null ? void 0 : item.type) === "approve" ? StatusObj.approved : (item == null ? void 0 : item.type) === "reject" ? StatusObj.rejected : (item == null ? void 0 : item.type) === "send_back" ? StatusObj.sendback : (item == null ? void 0 : item.type) === "onhold" ? StatusObj.onhold : null
2380
+ };
2381
+ })
2382
+ }
2383
+ ),
2384
+ /* @__PURE__ */ jsxs("div", { children: [
2385
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", children: /* @__PURE__ */ jsxs("span", { style: { fontWeight: "bold" }, children: [
2386
+ "Currently Assigned to:",
2387
+ " "
2388
+ ] }) }),
2389
+ /* @__PURE__ */ jsx(
2390
+ Tooltip,
2391
+ {
2392
+ title: (info == null ? void 0 : info.isLevelZero) ? (_m = (_l = expandedDetails == null ? void 0 : expandedDetails[0]) == null ? void 0 : _l.created_by_user) == null ? void 0 : _m.official_email_id : (_o = (_n = expandedDetails == null ? void 0 : expandedDetails[0]) == null ? void 0 : _n.assigned_user) == null ? void 0 : _o.official_email_id,
2393
+ children: /* @__PURE__ */ jsx(Typography, { variant: "caption", children: (info == null ? void 0 : info.isLevelZero) ? `${expandedDetails == null ? void 0 : expandedDetails[0].created_by_user.full_name} (${((_q = (_p = expandedDetails == null ? void 0 : expandedDetails[0]) == null ? void 0 : _p.created_by_user) == null ? void 0 : _q.group_employee_code) || "N/A"})` : `${(_s = (_r = expandedDetails == null ? void 0 : expandedDetails[0]) == null ? void 0 : _r.assigned_user) == null ? void 0 : _s.full_name} (${((_u = (_t = expandedDetails == null ? void 0 : expandedDetails[0]) == null ? void 0 : _t.assigned_user) == null ? void 0 : _u.group_employee_code) || "N/A"})` })
2394
+ }
2395
+ )
2396
+ ] })
2397
+ ] }) })
2315
2398
  ]
2316
2399
  },
2317
2400
  index
2318
2401
  );
2319
- })
2402
+ }) : /* @__PURE__ */ jsx(
2403
+ "div",
2404
+ {
2405
+ style: {
2406
+ height: "100%",
2407
+ width: "100%",
2408
+ color: "gray",
2409
+ fontSize: "20px",
2410
+ display: "flex",
2411
+ justifyContent: "center",
2412
+ alignItems: "center"
2413
+ },
2414
+ children: "NO RECORD FOUND"
2415
+ }
2416
+ )
2320
2417
  }
2321
2418
  )
2322
2419
  ] })