amp-workflow-ui 0.1.6 → 0.1.8

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.js CHANGED
@@ -869,19 +869,18 @@ function OnHoldDialog({
869
869
  ] });
870
870
  }
871
871
  var OnHoldDialog_default = OnHoldDialog;
872
- var CONNECTOR_STYLE = {
872
+ var CONNECTOR = {
873
873
  horizontal: {
874
874
  thickness: 3,
875
- lengthExtra: 20,
876
- color: "#2C35FF",
877
- offsetY: 90,
878
- offsetReverseExtra: 30
879
- // extra offset for reversed rows to avoid overlap
875
+ lengthExtra: 0,
876
+ offsetReverseExtra: 30,
877
+ color: "#2C35FF"
880
878
  },
881
879
  vertical: {
882
880
  thickness: 3,
883
881
  height: 60,
884
- color: "#2C35FF"}
882
+ color: "#2C35FF"
883
+ }
885
884
  };
886
885
  var CARD_WIDTH = 200;
887
886
  var CARD_HEIGHT = 220;
@@ -894,6 +893,7 @@ var CustomCard = styles.styled(material.Card)(
894
893
  borderRadius: 16,
895
894
  backgroundColor: cardType === "subCard" ? "#FFF2D8" : cardType === "disableCard" ? "#ECECEC" : "#F1F1FF",
896
895
  border: cardType === "disableCard" ? "none" : `1px solid ${theme.palette.primary.dark}`,
896
+ overflow: "hidden",
897
897
  position: "relative"
898
898
  })
899
899
  );
@@ -919,8 +919,7 @@ var Bull = ({ count, cardType }) => {
919
919
  }
920
920
  );
921
921
  };
922
- function SnakeTimeline({ events }) {
923
- const { api } = useWorkflowContext();
922
+ function CustomTimelineWithStatus({ events }) {
924
923
  styles.useTheme();
925
924
  const rows = [];
926
925
  for (let i = 0; i < events.length; i += 4) rows.push(events.slice(i, i + 4));
@@ -929,16 +928,13 @@ function SnakeTimeline({ events }) {
929
928
  const pos = index % 4;
930
929
  return row % 2 === 0 ? pos : 3 - pos;
931
930
  };
932
- const getHorizontalOffsetY = (rowIndex) => rowIndex % 2 === 0 ? CONNECTOR_STYLE.horizontal.offsetY : CONNECTOR_STYLE.horizontal.offsetY + CONNECTOR_STYLE.horizontal.offsetReverseExtra;
933
- const hasNextCard = (currentIndex) => currentIndex + 1 < events.length;
934
- const handleAttachmentClick = (att) => {
935
- if (!att) return;
936
- api.get({
937
- url: `/workflow/uploaded-document-url/${att.split("/").pop()}`,
938
- serviceURL: "api"
939
- }).then((res) => window.open(res.data, "_blank"));
931
+ const hasNextCard = (i) => i + 1 < events.length;
932
+ const getHorizontalY = (rowIndex) => {
933
+ const centerY = CARD_HEIGHT / 2 - CONNECTOR.horizontal.thickness / 2;
934
+ return rowIndex % 2 === 0 ? centerY : centerY + CONNECTOR.horizontal.offsetReverseExtra;
940
935
  };
941
- return /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { width: "100%", overflowX: "auto", p: 2 }, children: /* @__PURE__ */ jsxRuntime.jsx(
936
+ const isVerticalNeeded = (index) => (index + 1) % 4 === 0 && hasNextCard(index);
937
+ return /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { width: "100%", overflowX: "auto", p: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(
942
938
  material.Box,
943
939
  {
944
940
  sx: {
@@ -950,11 +946,9 @@ function SnakeTimeline({ events }) {
950
946
  width: "max-content"
951
947
  },
952
948
  children: events.map((event, index) => {
953
- console.log("\u{1F680} ~ SnakeTimeline ~ event:", event);
954
949
  const row = Math.floor(index / 4);
955
950
  const col = computeColumn(index);
956
- const isLastInRow = index % 4 === 3;
957
- const isVerticalConnectorNeeded = (index + 1) % 4 === 0 && hasNextCard(index);
951
+ const isLast = index % 4 === 3;
958
952
  return /* @__PURE__ */ jsxRuntime.jsxs(
959
953
  material.Box,
960
954
  {
@@ -964,30 +958,30 @@ function SnakeTimeline({ events }) {
964
958
  position: "relative"
965
959
  },
966
960
  children: [
967
- !isLastInRow && hasNextCard(index) && /* @__PURE__ */ jsxRuntime.jsx(
961
+ !isLast && hasNextCard(index) && /* @__PURE__ */ jsxRuntime.jsx(
968
962
  material.Box,
969
963
  {
970
964
  sx: {
971
965
  position: "absolute",
972
- top: getHorizontalOffsetY(row),
966
+ top: getHorizontalY(row),
973
967
  left: row % 2 === 0 ? CARD_WIDTH : "auto",
974
968
  right: row % 2 !== 0 ? CARD_WIDTH : "auto",
975
- width: GAP + CONNECTOR_STYLE.horizontal.lengthExtra,
976
- borderTop: `${CONNECTOR_STYLE.horizontal.thickness}px dashed ${CONNECTOR_STYLE.horizontal.color}`,
969
+ width: GAP + CONNECTOR.horizontal.lengthExtra,
970
+ borderTop: `${CONNECTOR.horizontal.thickness}px dashed ${CONNECTOR.horizontal.color}`,
977
971
  zIndex: 10
978
972
  }
979
973
  }
980
974
  ),
981
- isVerticalConnectorNeeded && /* @__PURE__ */ jsxRuntime.jsx(
975
+ isVerticalNeeded(index) && /* @__PURE__ */ jsxRuntime.jsx(
982
976
  material.Box,
983
977
  {
984
978
  sx: {
985
979
  position: "absolute",
986
980
  top: CARD_HEIGHT,
987
- left: CARD_WIDTH / 2 - CONNECTOR_STYLE.vertical.thickness / 2,
988
- width: CONNECTOR_STYLE.vertical.thickness,
989
- height: CONNECTOR_STYLE.vertical.height,
990
- borderLeft: `${CONNECTOR_STYLE.vertical.thickness}px dashed ${CONNECTOR_STYLE.vertical.color}`,
981
+ left: CARD_WIDTH / 2 - CONNECTOR.vertical.thickness / 2,
982
+ width: CONNECTOR.vertical.thickness,
983
+ height: CONNECTOR.vertical.height,
984
+ borderLeft: `${CONNECTOR.vertical.thickness}px dashed ${CONNECTOR.vertical.color}`,
991
985
  zIndex: 10
992
986
  }
993
987
  }
@@ -1012,9 +1006,10 @@ function SnakeTimeline({ events }) {
1012
1006
  sx: {
1013
1007
  backgroundColor: event.status.color,
1014
1008
  color: event.status.labelColor,
1015
- borderRadius: "50px",
1009
+ borderRadius: "40px",
1016
1010
  height: 28,
1017
- fontWeight: 600
1011
+ fontWeight: 600,
1012
+ px: 1
1018
1013
  }
1019
1014
  }
1020
1015
  )
@@ -1031,7 +1026,7 @@ function SnakeTimeline({ events }) {
1031
1026
  }
1032
1027
  ),
1033
1028
  /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { sx: { mb: 1 }, variant: "body2", children: event.subTitle }),
1034
- event.attachment && /* @__PURE__ */ jsxRuntime.jsxs(
1029
+ event.attachment && /* @__PURE__ */ jsxRuntime.jsx(
1035
1030
  material.Typography,
1036
1031
  {
1037
1032
  sx: {
@@ -1039,11 +1034,7 @@ function SnakeTimeline({ events }) {
1039
1034
  color: "#0B56CA",
1040
1035
  fontWeight: 600
1041
1036
  },
1042
- onClick: () => handleAttachmentClick(event.attachment),
1043
- children: [
1044
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "icon-link" }),
1045
- " Attachment"
1046
- ]
1037
+ children: "Attachment"
1047
1038
  }
1048
1039
  ),
1049
1040
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -1144,14 +1135,13 @@ function ApprovalWorkflow({
1144
1135
  selectedWorkflowsList = [],
1145
1136
  userInfo
1146
1137
  }) {
1147
- var _a, _b, _c, _d, _e, _f, _g;
1138
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
1148
1139
  const theme = material.useTheme();
1149
1140
  const { api, urlBuilder, loadingComponent, ENV_VARIABLES } = useWorkflowContext();
1150
1141
  const [selectedApprovalOtions, setSelectedApprovalOtions] = React7.useState(
1151
1142
  selectedWorkflowsList.length ? "selected" : "Action Required"
1152
1143
  );
1153
1144
  const [expandedId, setExpandedId] = React7.useState(null);
1154
- console.log("\u{1F680} ~ ApprovalWorkflow ~ expandedId:", expandedId);
1155
1145
  const [sendDialog, setSendDialog] = React7__default.default.useState(null);
1156
1146
  const [approveTarget, setApproveTarget] = React7__default.default.useState(null);
1157
1147
  const [rejectTarget, setRejectTarget] = React7__default.default.useState(null);
@@ -1251,7 +1241,6 @@ function ApprovalWorkflow({
1251
1241
  if (option === "selected") fetchSelectedActivites();
1252
1242
  };
1253
1243
  const handleExpandClick = (id) => {
1254
- console.log("\u{1F680} ~ handleExpandClick ~ id:", id);
1255
1244
  setExpandedId((prevId) => prevId === id ? null : id);
1256
1245
  fetchExpandedActivityLogs(id);
1257
1246
  };
@@ -1406,29 +1395,30 @@ function ApprovalWorkflow({
1406
1395
  approved: {
1407
1396
  title: "Approved",
1408
1397
  color: theme.palette.success.light,
1409
- labelColor: theme.palette.success.dark
1398
+ labelColor: theme.palette.success.main
1410
1399
  },
1411
1400
  rejected: {
1412
1401
  title: "Rejected",
1413
- color: theme.palette.error.light,
1414
- labelColor: theme.palette.error.dark
1402
+ color: ((_a = theme.palette.customColors) == null ? void 0 : _a.chipWarningContainer) || theme.palette.error.light,
1403
+ labelColor: theme.palette.error.main
1415
1404
  },
1416
1405
  onhold: {
1417
1406
  title: "On Hold",
1418
- color: theme.palette.warning.light,
1419
- labelColor: theme.palette.warning.dark
1407
+ color: ((_c = (_b = theme.palette) == null ? void 0 : _b.customColors) == null ? void 0 : _c.chipPendingContainer) || theme.palette.warning.light,
1408
+ labelColor: ((_e = (_d = theme.palette) == null ? void 0 : _d.customColors) == null ? void 0 : _e.chipPendingText) || theme.palette.warning.dark
1420
1409
  },
1421
1410
  sendback: {
1422
1411
  title: "Send Back",
1423
- color: theme.palette.info.light,
1424
- labelColor: theme.palette.info.dark
1412
+ color: ((_g = (_f = theme.palette) == null ? void 0 : _f.customColors) == null ? void 0 : _g.approvalPrimaryChipBG) || theme.palette.info.light,
1413
+ labelColor: ((_i = (_h = theme.palette) == null ? void 0 : _h.customColors) == null ? void 0 : _i.approvalPrimaryChipText) || theme.palette.info.dark
1425
1414
  },
1426
1415
  pending: {
1427
- color: theme.palette.grey[300],
1428
- labelColor: theme.palette.text.primary
1416
+ color: ((_j = theme.palette.customColors) == null ? void 0 : _j.approvalPrimaryChipBG) || theme.palette.grey[300],
1417
+ labelColor: ((_l = (_k = theme.palette) == null ? void 0 : _k.customColors) == null ? void 0 : _l.approvalPrimaryChipText) || theme.palette.text.primary
1429
1418
  }
1430
1419
  };
1431
1420
  if (isLoading && loadingComponent) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: loadingComponent });
1421
+ console.log("TEST LIB");
1432
1422
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1433
1423
  /* @__PURE__ */ jsxRuntime.jsx(
1434
1424
  system.Box,
@@ -1499,7 +1489,7 @@ function ApprovalWorkflow({
1499
1489
  pb: 3
1500
1490
  },
1501
1491
  children: visibleSelectedRequests == null ? void 0 : visibleSelectedRequests.map((info, index) => {
1502
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l, _m, _n;
1492
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2;
1503
1493
  const currentLevel = info == null ? void 0 : info.levels.find(
1504
1494
  (level_) => level_.id === (info == null ? void 0 : info.current_level)
1505
1495
  );
@@ -1608,7 +1598,7 @@ function ApprovalWorkflow({
1608
1598
  mt: 0.8,
1609
1599
  color: ((_g2 = info == null ? void 0 : info.attachment_links) == null ? void 0 : _g2.length) ? "primary.dark" : "text.disabled"
1610
1600
  },
1611
- children: ((_h = info == null ? void 0 : info.attachment_links) == null ? void 0 : _h.length) ? `${info.attachment_links.length} file(s)` : "N/A"
1601
+ children: ((_h2 = info == null ? void 0 : info.attachment_links) == null ? void 0 : _h2.length) ? `${info.attachment_links.length} file(s)` : "N/A"
1612
1602
  }
1613
1603
  )
1614
1604
  ] }),
@@ -1637,9 +1627,9 @@ function ApprovalWorkflow({
1637
1627
  },
1638
1628
  children: [
1639
1629
  /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "caption", color: "text.secondary", children: "Current Level" }),
1640
- /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", sx: { mt: 0.8 }, children: (info == null ? void 0 : info.isLevelZero) ? "L0" : "L" + (((_j = (_i = info == null ? void 0 : info.levels) == null ? void 0 : _i.findIndex(
1630
+ /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", sx: { mt: 0.8 }, children: (info == null ? void 0 : info.isLevelZero) ? "L0" : "L" + (((_j2 = (_i2 = info == null ? void 0 : info.levels) == null ? void 0 : _i2.findIndex(
1641
1631
  (lvl) => lvl.id === (info == null ? void 0 : info.current_level)
1642
- )) != null ? _j : -1) + 1 || "") })
1632
+ )) != null ? _j2 : -1) + 1 || "") })
1643
1633
  ]
1644
1634
  }
1645
1635
  ),
@@ -1655,14 +1645,14 @@ function ApprovalWorkflow({
1655
1645
  gap: 1.5
1656
1646
  },
1657
1647
  children: [
1658
- (info == null ? void 0 : info.current_status) !== "completed" && ((_l = (_k = info == null ? void 0 : info.levels) == null ? void 0 : _k.find(
1648
+ (info == null ? void 0 : info.current_status) !== "completed" && ((_l2 = (_k2 = info == null ? void 0 : info.levels) == null ? void 0 : _k2.find(
1659
1649
  (lvl) => lvl.id === (info == null ? void 0 : info.current_level)
1660
- )) == null ? void 0 : _l.order) <= ((_n = (_m = info == null ? void 0 : info.levels) == null ? void 0 : _m.find(
1650
+ )) == null ? void 0 : _l2.order) <= ((_n2 = (_m2 = info == null ? void 0 : info.levels) == null ? void 0 : _m2.find(
1661
1651
  (lvl) => {
1662
1652
  var _a3;
1663
1653
  return Number(lvl.assign_to[0]) === ((_a3 = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a3.id);
1664
1654
  }
1665
- )) == null ? void 0 : _n.order) ? /* @__PURE__ */ jsxRuntime.jsx(
1655
+ )) == null ? void 0 : _n2.order) ? /* @__PURE__ */ jsxRuntime.jsx(
1666
1656
  Statusselector_default,
1667
1657
  {
1668
1658
  onSendBack: () => handleSendBack(info == null ? void 0 : info._id),
@@ -1754,7 +1744,7 @@ function ApprovalWorkflow({
1754
1744
  children: /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 36, color: "primary" })
1755
1745
  }
1756
1746
  ) : /* @__PURE__ */ jsxRuntime.jsx(
1757
- SnakeTimeline,
1747
+ CustomTimelineWithStatus,
1758
1748
  {
1759
1749
  events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
1760
1750
  var _a3, _b3, _c3, _d3;
@@ -1791,7 +1781,7 @@ function ApprovalWorkflow({
1791
1781
  pb: 3
1792
1782
  },
1793
1783
  children: visibleAllRequests == null ? void 0 : visibleAllRequests.map((info, index) => {
1794
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l, _m, _n;
1784
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2;
1795
1785
  const currentLevel = info == null ? void 0 : info.levels.find(
1796
1786
  (level_) => level_.id === (info == null ? void 0 : info.current_level)
1797
1787
  );
@@ -1907,7 +1897,7 @@ function ApprovalWorkflow({
1907
1897
  mt: 0.8,
1908
1898
  color: ((_g2 = info == null ? void 0 : info.attachment_links) == null ? void 0 : _g2.length) ? "primary.dark" : "text.disabled"
1909
1899
  },
1910
- children: ((_h = info == null ? void 0 : info.attachment_links) == null ? void 0 : _h.length) ? `${info.attachment_links.length} file(s)` : "N/A"
1900
+ children: ((_h2 = info == null ? void 0 : info.attachment_links) == null ? void 0 : _h2.length) ? `${info.attachment_links.length} file(s)` : "N/A"
1911
1901
  }
1912
1902
  )
1913
1903
  ] }),
@@ -1936,9 +1926,9 @@ function ApprovalWorkflow({
1936
1926
  },
1937
1927
  children: [
1938
1928
  /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "caption", color: "text.secondary", children: "Current Level" }),
1939
- /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", sx: { mt: 0.8 }, children: (info == null ? void 0 : info.isLevelZero) ? "L0" : "L" + (((_j = (_i = info == null ? void 0 : info.levels) == null ? void 0 : _i.findIndex(
1929
+ /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", sx: { mt: 0.8 }, children: (info == null ? void 0 : info.isLevelZero) ? "L0" : "L" + (((_j2 = (_i2 = info == null ? void 0 : info.levels) == null ? void 0 : _i2.findIndex(
1940
1930
  (lvl) => lvl.id === (info == null ? void 0 : info.current_level)
1941
- )) != null ? _j : -1) + 1 || "") })
1931
+ )) != null ? _j2 : -1) + 1 || "") })
1942
1932
  ]
1943
1933
  }
1944
1934
  ),
@@ -1954,14 +1944,14 @@ function ApprovalWorkflow({
1954
1944
  gap: 1.5
1955
1945
  },
1956
1946
  children: [
1957
- (info == null ? void 0 : info.current_status) !== "completed" && ((_l = (_k = info == null ? void 0 : info.levels) == null ? void 0 : _k.find(
1947
+ (info == null ? void 0 : info.current_status) !== "completed" && ((_l2 = (_k2 = info == null ? void 0 : info.levels) == null ? void 0 : _k2.find(
1958
1948
  (lvl) => lvl.id === (info == null ? void 0 : info.current_level)
1959
- )) == null ? void 0 : _l.order) <= ((_n = (_m = info == null ? void 0 : info.levels) == null ? void 0 : _m.find(
1949
+ )) == null ? void 0 : _l2.order) <= ((_n2 = (_m2 = info == null ? void 0 : info.levels) == null ? void 0 : _m2.find(
1960
1950
  (lvl) => {
1961
1951
  var _a3;
1962
1952
  return Number(lvl.assign_to[0]) === ((_a3 = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a3.id);
1963
1953
  }
1964
- )) == null ? void 0 : _n.order) ? /* @__PURE__ */ jsxRuntime.jsx(
1954
+ )) == null ? void 0 : _n2.order) ? /* @__PURE__ */ jsxRuntime.jsx(
1965
1955
  Statusselector_default,
1966
1956
  {
1967
1957
  onSendBack: () => handleSendBack(info == null ? void 0 : info._id),
@@ -2053,7 +2043,7 @@ function ApprovalWorkflow({
2053
2043
  children: /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 36, color: "primary" })
2054
2044
  }
2055
2045
  ) : /* @__PURE__ */ jsxRuntime.jsx(
2056
- SnakeTimeline,
2046
+ CustomTimelineWithStatus,
2057
2047
  {
2058
2048
  events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
2059
2049
  var _a3, _b3, _c3, _d3;
@@ -2090,8 +2080,7 @@ function ApprovalWorkflow({
2090
2080
  pb: 3
2091
2081
  },
2092
2082
  children: visiblePendingRequests == null ? void 0 : visiblePendingRequests.map((info, index) => {
2093
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k;
2094
- console.log("\u{1F680} ~ ApprovalWorkflow ~ info:", info);
2083
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2;
2095
2084
  const currentLevel = (_a2 = info == null ? void 0 : info.levels) == null ? void 0 : _a2.find(
2096
2085
  (level_) => level_.id === (info == null ? void 0 : info.current_level)
2097
2086
  );
@@ -2100,7 +2089,6 @@ function ApprovalWorkflow({
2100
2089
  if (!(info2 == null ? void 0 : info2.isLevelZero)) return statusList2;
2101
2090
  return statusList2.filter((item) => item.status !== 3);
2102
2091
  };
2103
- console.log("statusList", statusList);
2104
2092
  const redir = buildRedirectionUrl(info);
2105
2093
  const currentStatus = ((_d2 = (_c2 = (_b2 = info == null ? void 0 : info.levels) == null ? void 0 : _b2.find(
2106
2094
  (lvl) => lvl.id === (info == null ? void 0 : info.current_level)
@@ -2183,9 +2171,9 @@ function ApprovalWorkflow({
2183
2171
  noWrap: true,
2184
2172
  sx: {
2185
2173
  mt: 0.8,
2186
- color: ((_h = info == null ? void 0 : info.attachment_links) == null ? void 0 : _h.length) ? "primary.dark" : "text.disabled"
2174
+ color: ((_h2 = info == null ? void 0 : info.attachment_links) == null ? void 0 : _h2.length) ? "primary.dark" : "text.disabled"
2187
2175
  },
2188
- children: ((_i = info == null ? void 0 : info.attachment_links) == null ? void 0 : _i.length) ? `${info.attachment_links.length} file(s)` : "N/A"
2176
+ children: ((_i2 = info == null ? void 0 : info.attachment_links) == null ? void 0 : _i2.length) ? `${info.attachment_links.length} file(s)` : "N/A"
2189
2177
  }
2190
2178
  )
2191
2179
  ] }),
@@ -2214,9 +2202,9 @@ function ApprovalWorkflow({
2214
2202
  },
2215
2203
  children: [
2216
2204
  /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "caption", color: "text.secondary", children: "Current Level" }),
2217
- /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", sx: { mt: 0.8 }, children: (info == null ? void 0 : info.isLevelZero) ? "L0" : "L" + (((_k = (_j = info == null ? void 0 : info.levels) == null ? void 0 : _j.findIndex(
2205
+ /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", sx: { mt: 0.8 }, children: (info == null ? void 0 : info.isLevelZero) ? "L0" : "L" + (((_k2 = (_j2 = info == null ? void 0 : info.levels) == null ? void 0 : _j2.findIndex(
2218
2206
  (lvl) => lvl.id === (info == null ? void 0 : info.current_level)
2219
- )) != null ? _k : -1) + 1 || "") })
2207
+ )) != null ? _k2 : -1) + 1 || "") })
2220
2208
  ]
2221
2209
  }
2222
2210
  ),
@@ -2322,7 +2310,7 @@ function ApprovalWorkflow({
2322
2310
  children: /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 36, color: "primary" })
2323
2311
  }
2324
2312
  ) : /* @__PURE__ */ jsxRuntime.jsx(
2325
- SnakeTimeline,
2313
+ CustomTimelineWithStatus,
2326
2314
  {
2327
2315
  events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
2328
2316
  var _a3, _b3, _c3, _d3;
@@ -2366,8 +2354,8 @@ function ApprovalWorkflow({
2366
2354
  openModal: !!approveTarget,
2367
2355
  closeModal: () => setApproveTarget(null),
2368
2356
  header: "Approve",
2369
- workflowLogId: (_a = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _a[0],
2370
- statusId: (_b = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _b[1]
2357
+ workflowLogId: (_m = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _m[0],
2358
+ statusId: (_n = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _n[1]
2371
2359
  }
2372
2360
  ),
2373
2361
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2376,9 +2364,9 @@ function ApprovalWorkflow({
2376
2364
  openModal: !!rejectTarget,
2377
2365
  closeModal: () => setRejectTarget(null),
2378
2366
  header: "Reject",
2379
- workflowLogId: (_c = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _c[0],
2380
- statusId: (_d = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _d[1],
2381
- rejection_reason_master: (_e = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _e[2]
2367
+ workflowLogId: (_o = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _o[0],
2368
+ statusId: (_p = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _p[1],
2369
+ rejection_reason_master: (_q = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _q[2]
2382
2370
  }
2383
2371
  ),
2384
2372
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2387,8 +2375,8 @@ function ApprovalWorkflow({
2387
2375
  openModal: !!onHoldTarget,
2388
2376
  closeModal: () => setOnHoldTarget(null),
2389
2377
  header: "On Hold",
2390
- workflowLogId: (_f = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _f[0],
2391
- statusId: (_g = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _g[1]
2378
+ workflowLogId: (_r = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _r[0],
2379
+ statusId: (_s = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _s[1]
2392
2380
  }
2393
2381
  )
2394
2382
  ] });