amp-workflow-ui 0.1.6 → 0.1.7

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
@@ -856,19 +856,18 @@ function OnHoldDialog({
856
856
  ] });
857
857
  }
858
858
  var OnHoldDialog_default = OnHoldDialog;
859
- var CONNECTOR_STYLE = {
859
+ var CONNECTOR = {
860
860
  horizontal: {
861
861
  thickness: 3,
862
- lengthExtra: 20,
863
- color: "#2C35FF",
864
- offsetY: 90,
865
- offsetReverseExtra: 30
866
- // extra offset for reversed rows to avoid overlap
862
+ lengthExtra: 0,
863
+ offsetReverseExtra: 30,
864
+ color: "#2C35FF"
867
865
  },
868
866
  vertical: {
869
867
  thickness: 3,
870
868
  height: 60,
871
- color: "#2C35FF"}
869
+ color: "#2C35FF"
870
+ }
872
871
  };
873
872
  var CARD_WIDTH = 200;
874
873
  var CARD_HEIGHT = 220;
@@ -881,6 +880,7 @@ var CustomCard = styled(Card)(
881
880
  borderRadius: 16,
882
881
  backgroundColor: cardType === "subCard" ? "#FFF2D8" : cardType === "disableCard" ? "#ECECEC" : "#F1F1FF",
883
882
  border: cardType === "disableCard" ? "none" : `1px solid ${theme.palette.primary.dark}`,
883
+ overflow: "hidden",
884
884
  position: "relative"
885
885
  })
886
886
  );
@@ -906,8 +906,7 @@ var Bull = ({ count, cardType }) => {
906
906
  }
907
907
  );
908
908
  };
909
- function SnakeTimeline({ events }) {
910
- const { api } = useWorkflowContext();
909
+ function CustomTimelineWithStatus({ events }) {
911
910
  useTheme();
912
911
  const rows = [];
913
912
  for (let i = 0; i < events.length; i += 4) rows.push(events.slice(i, i + 4));
@@ -916,16 +915,13 @@ function SnakeTimeline({ events }) {
916
915
  const pos = index % 4;
917
916
  return row % 2 === 0 ? pos : 3 - pos;
918
917
  };
919
- const getHorizontalOffsetY = (rowIndex) => rowIndex % 2 === 0 ? CONNECTOR_STYLE.horizontal.offsetY : CONNECTOR_STYLE.horizontal.offsetY + CONNECTOR_STYLE.horizontal.offsetReverseExtra;
920
- const hasNextCard = (currentIndex) => currentIndex + 1 < events.length;
921
- const handleAttachmentClick = (att) => {
922
- if (!att) return;
923
- api.get({
924
- url: `/workflow/uploaded-document-url/${att.split("/").pop()}`,
925
- serviceURL: "api"
926
- }).then((res) => window.open(res.data, "_blank"));
918
+ const hasNextCard = (i) => i + 1 < events.length;
919
+ const getHorizontalY = (rowIndex) => {
920
+ const centerY = CARD_HEIGHT / 2 - CONNECTOR.horizontal.thickness / 2;
921
+ return rowIndex % 2 === 0 ? centerY : centerY + CONNECTOR.horizontal.offsetReverseExtra;
927
922
  };
928
- return /* @__PURE__ */ jsx(Box$1, { sx: { width: "100%", overflowX: "auto", p: 2 }, children: /* @__PURE__ */ jsx(
923
+ const isVerticalNeeded = (index) => (index + 1) % 4 === 0 && hasNextCard(index);
924
+ return /* @__PURE__ */ jsx(Box$1, { sx: { width: "100%", overflowX: "auto", p: 1 }, children: /* @__PURE__ */ jsx(
929
925
  Box$1,
930
926
  {
931
927
  sx: {
@@ -937,11 +933,9 @@ function SnakeTimeline({ events }) {
937
933
  width: "max-content"
938
934
  },
939
935
  children: events.map((event, index) => {
940
- console.log("\u{1F680} ~ SnakeTimeline ~ event:", event);
941
936
  const row = Math.floor(index / 4);
942
937
  const col = computeColumn(index);
943
- const isLastInRow = index % 4 === 3;
944
- const isVerticalConnectorNeeded = (index + 1) % 4 === 0 && hasNextCard(index);
938
+ const isLast = index % 4 === 3;
945
939
  return /* @__PURE__ */ jsxs(
946
940
  Box$1,
947
941
  {
@@ -951,30 +945,30 @@ function SnakeTimeline({ events }) {
951
945
  position: "relative"
952
946
  },
953
947
  children: [
954
- !isLastInRow && hasNextCard(index) && /* @__PURE__ */ jsx(
948
+ !isLast && hasNextCard(index) && /* @__PURE__ */ jsx(
955
949
  Box$1,
956
950
  {
957
951
  sx: {
958
952
  position: "absolute",
959
- top: getHorizontalOffsetY(row),
953
+ top: getHorizontalY(row),
960
954
  left: row % 2 === 0 ? CARD_WIDTH : "auto",
961
955
  right: row % 2 !== 0 ? CARD_WIDTH : "auto",
962
- width: GAP + CONNECTOR_STYLE.horizontal.lengthExtra,
963
- borderTop: `${CONNECTOR_STYLE.horizontal.thickness}px dashed ${CONNECTOR_STYLE.horizontal.color}`,
956
+ width: GAP + CONNECTOR.horizontal.lengthExtra,
957
+ borderTop: `${CONNECTOR.horizontal.thickness}px dashed ${CONNECTOR.horizontal.color}`,
964
958
  zIndex: 10
965
959
  }
966
960
  }
967
961
  ),
968
- isVerticalConnectorNeeded && /* @__PURE__ */ jsx(
962
+ isVerticalNeeded(index) && /* @__PURE__ */ jsx(
969
963
  Box$1,
970
964
  {
971
965
  sx: {
972
966
  position: "absolute",
973
967
  top: CARD_HEIGHT,
974
- left: CARD_WIDTH / 2 - CONNECTOR_STYLE.vertical.thickness / 2,
975
- width: CONNECTOR_STYLE.vertical.thickness,
976
- height: CONNECTOR_STYLE.vertical.height,
977
- borderLeft: `${CONNECTOR_STYLE.vertical.thickness}px dashed ${CONNECTOR_STYLE.vertical.color}`,
968
+ left: CARD_WIDTH / 2 - CONNECTOR.vertical.thickness / 2,
969
+ width: CONNECTOR.vertical.thickness,
970
+ height: CONNECTOR.vertical.height,
971
+ borderLeft: `${CONNECTOR.vertical.thickness}px dashed ${CONNECTOR.vertical.color}`,
978
972
  zIndex: 10
979
973
  }
980
974
  }
@@ -999,9 +993,10 @@ function SnakeTimeline({ events }) {
999
993
  sx: {
1000
994
  backgroundColor: event.status.color,
1001
995
  color: event.status.labelColor,
1002
- borderRadius: "50px",
996
+ borderRadius: "40px",
1003
997
  height: 28,
1004
- fontWeight: 600
998
+ fontWeight: 600,
999
+ px: 1
1005
1000
  }
1006
1001
  }
1007
1002
  )
@@ -1018,7 +1013,7 @@ function SnakeTimeline({ events }) {
1018
1013
  }
1019
1014
  ),
1020
1015
  /* @__PURE__ */ jsx(Typography, { sx: { mb: 1 }, variant: "body2", children: event.subTitle }),
1021
- event.attachment && /* @__PURE__ */ jsxs(
1016
+ event.attachment && /* @__PURE__ */ jsx(
1022
1017
  Typography,
1023
1018
  {
1024
1019
  sx: {
@@ -1026,11 +1021,7 @@ function SnakeTimeline({ events }) {
1026
1021
  color: "#0B56CA",
1027
1022
  fontWeight: 600
1028
1023
  },
1029
- onClick: () => handleAttachmentClick(event.attachment),
1030
- children: [
1031
- /* @__PURE__ */ jsx("span", { className: "icon-link" }),
1032
- " Attachment"
1033
- ]
1024
+ children: "Attachment"
1034
1025
  }
1035
1026
  ),
1036
1027
  /* @__PURE__ */ jsx(
@@ -1131,14 +1122,13 @@ function ApprovalWorkflow({
1131
1122
  selectedWorkflowsList = [],
1132
1123
  userInfo
1133
1124
  }) {
1134
- var _a, _b, _c, _d, _e, _f, _g;
1125
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
1135
1126
  const theme = useTheme$1();
1136
1127
  const { api, urlBuilder, loadingComponent, ENV_VARIABLES } = useWorkflowContext();
1137
1128
  const [selectedApprovalOtions, setSelectedApprovalOtions] = useState(
1138
1129
  selectedWorkflowsList.length ? "selected" : "Action Required"
1139
1130
  );
1140
1131
  const [expandedId, setExpandedId] = useState(null);
1141
- console.log("\u{1F680} ~ ApprovalWorkflow ~ expandedId:", expandedId);
1142
1132
  const [sendDialog, setSendDialog] = React7.useState(null);
1143
1133
  const [approveTarget, setApproveTarget] = React7.useState(null);
1144
1134
  const [rejectTarget, setRejectTarget] = React7.useState(null);
@@ -1238,7 +1228,6 @@ function ApprovalWorkflow({
1238
1228
  if (option === "selected") fetchSelectedActivites();
1239
1229
  };
1240
1230
  const handleExpandClick = (id) => {
1241
- console.log("\u{1F680} ~ handleExpandClick ~ id:", id);
1242
1231
  setExpandedId((prevId) => prevId === id ? null : id);
1243
1232
  fetchExpandedActivityLogs(id);
1244
1233
  };
@@ -1393,29 +1382,30 @@ function ApprovalWorkflow({
1393
1382
  approved: {
1394
1383
  title: "Approved",
1395
1384
  color: theme.palette.success.light,
1396
- labelColor: theme.palette.success.dark
1385
+ labelColor: theme.palette.success.main
1397
1386
  },
1398
1387
  rejected: {
1399
1388
  title: "Rejected",
1400
- color: theme.palette.error.light,
1401
- labelColor: theme.palette.error.dark
1389
+ color: ((_a = theme.palette.customColors) == null ? void 0 : _a.chipWarningContainer) || theme.palette.error.light,
1390
+ labelColor: theme.palette.error.main
1402
1391
  },
1403
1392
  onhold: {
1404
1393
  title: "On Hold",
1405
- color: theme.palette.warning.light,
1406
- labelColor: theme.palette.warning.dark
1394
+ color: ((_c = (_b = theme.palette) == null ? void 0 : _b.customColors) == null ? void 0 : _c.chipPendingContainer) || theme.palette.warning.light,
1395
+ labelColor: ((_e = (_d = theme.palette) == null ? void 0 : _d.customColors) == null ? void 0 : _e.chipPendingText) || theme.palette.warning.dark
1407
1396
  },
1408
1397
  sendback: {
1409
1398
  title: "Send Back",
1410
- color: theme.palette.info.light,
1411
- labelColor: theme.palette.info.dark
1399
+ color: ((_g = (_f = theme.palette) == null ? void 0 : _f.customColors) == null ? void 0 : _g.approvalPrimaryChipBG) || theme.palette.info.light,
1400
+ labelColor: ((_i = (_h = theme.palette) == null ? void 0 : _h.customColors) == null ? void 0 : _i.approvalPrimaryChipText) || theme.palette.info.dark
1412
1401
  },
1413
1402
  pending: {
1414
- color: theme.palette.grey[300],
1415
- labelColor: theme.palette.text.primary
1403
+ color: ((_j = theme.palette.customColors) == null ? void 0 : _j.approvalPrimaryChipBG) || theme.palette.grey[300],
1404
+ labelColor: ((_l = (_k = theme.palette) == null ? void 0 : _k.customColors) == null ? void 0 : _l.approvalPrimaryChipText) || theme.palette.text.primary
1416
1405
  }
1417
1406
  };
1418
1407
  if (isLoading && loadingComponent) return /* @__PURE__ */ jsx(Fragment, { children: loadingComponent });
1408
+ console.log("TEST LIB");
1419
1409
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1420
1410
  /* @__PURE__ */ jsx(
1421
1411
  Box,
@@ -1486,7 +1476,7 @@ function ApprovalWorkflow({
1486
1476
  pb: 3
1487
1477
  },
1488
1478
  children: visibleSelectedRequests == null ? void 0 : visibleSelectedRequests.map((info, index) => {
1489
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l, _m, _n;
1479
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2;
1490
1480
  const currentLevel = info == null ? void 0 : info.levels.find(
1491
1481
  (level_) => level_.id === (info == null ? void 0 : info.current_level)
1492
1482
  );
@@ -1595,7 +1585,7 @@ function ApprovalWorkflow({
1595
1585
  mt: 0.8,
1596
1586
  color: ((_g2 = info == null ? void 0 : info.attachment_links) == null ? void 0 : _g2.length) ? "primary.dark" : "text.disabled"
1597
1587
  },
1598
- children: ((_h = info == null ? void 0 : info.attachment_links) == null ? void 0 : _h.length) ? `${info.attachment_links.length} file(s)` : "N/A"
1588
+ children: ((_h2 = info == null ? void 0 : info.attachment_links) == null ? void 0 : _h2.length) ? `${info.attachment_links.length} file(s)` : "N/A"
1599
1589
  }
1600
1590
  )
1601
1591
  ] }),
@@ -1624,9 +1614,9 @@ function ApprovalWorkflow({
1624
1614
  },
1625
1615
  children: [
1626
1616
  /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", children: "Current Level" }),
1627
- /* @__PURE__ */ jsx(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(
1617
+ /* @__PURE__ */ jsx(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(
1628
1618
  (lvl) => lvl.id === (info == null ? void 0 : info.current_level)
1629
- )) != null ? _j : -1) + 1 || "") })
1619
+ )) != null ? _j2 : -1) + 1 || "") })
1630
1620
  ]
1631
1621
  }
1632
1622
  ),
@@ -1642,14 +1632,14 @@ function ApprovalWorkflow({
1642
1632
  gap: 1.5
1643
1633
  },
1644
1634
  children: [
1645
- (info == null ? void 0 : info.current_status) !== "completed" && ((_l = (_k = info == null ? void 0 : info.levels) == null ? void 0 : _k.find(
1635
+ (info == null ? void 0 : info.current_status) !== "completed" && ((_l2 = (_k2 = info == null ? void 0 : info.levels) == null ? void 0 : _k2.find(
1646
1636
  (lvl) => lvl.id === (info == null ? void 0 : info.current_level)
1647
- )) == null ? void 0 : _l.order) <= ((_n = (_m = info == null ? void 0 : info.levels) == null ? void 0 : _m.find(
1637
+ )) == null ? void 0 : _l2.order) <= ((_n2 = (_m2 = info == null ? void 0 : info.levels) == null ? void 0 : _m2.find(
1648
1638
  (lvl) => {
1649
1639
  var _a3;
1650
1640
  return Number(lvl.assign_to[0]) === ((_a3 = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a3.id);
1651
1641
  }
1652
- )) == null ? void 0 : _n.order) ? /* @__PURE__ */ jsx(
1642
+ )) == null ? void 0 : _n2.order) ? /* @__PURE__ */ jsx(
1653
1643
  Statusselector_default,
1654
1644
  {
1655
1645
  onSendBack: () => handleSendBack(info == null ? void 0 : info._id),
@@ -1741,7 +1731,7 @@ function ApprovalWorkflow({
1741
1731
  children: /* @__PURE__ */ jsx(CircularProgress, { size: 36, color: "primary" })
1742
1732
  }
1743
1733
  ) : /* @__PURE__ */ jsx(
1744
- SnakeTimeline,
1734
+ CustomTimelineWithStatus,
1745
1735
  {
1746
1736
  events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
1747
1737
  var _a3, _b3, _c3, _d3;
@@ -1778,7 +1768,7 @@ function ApprovalWorkflow({
1778
1768
  pb: 3
1779
1769
  },
1780
1770
  children: visibleAllRequests == null ? void 0 : visibleAllRequests.map((info, index) => {
1781
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l, _m, _n;
1771
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2;
1782
1772
  const currentLevel = info == null ? void 0 : info.levels.find(
1783
1773
  (level_) => level_.id === (info == null ? void 0 : info.current_level)
1784
1774
  );
@@ -1894,7 +1884,7 @@ function ApprovalWorkflow({
1894
1884
  mt: 0.8,
1895
1885
  color: ((_g2 = info == null ? void 0 : info.attachment_links) == null ? void 0 : _g2.length) ? "primary.dark" : "text.disabled"
1896
1886
  },
1897
- children: ((_h = info == null ? void 0 : info.attachment_links) == null ? void 0 : _h.length) ? `${info.attachment_links.length} file(s)` : "N/A"
1887
+ children: ((_h2 = info == null ? void 0 : info.attachment_links) == null ? void 0 : _h2.length) ? `${info.attachment_links.length} file(s)` : "N/A"
1898
1888
  }
1899
1889
  )
1900
1890
  ] }),
@@ -1923,9 +1913,9 @@ function ApprovalWorkflow({
1923
1913
  },
1924
1914
  children: [
1925
1915
  /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", children: "Current Level" }),
1926
- /* @__PURE__ */ jsx(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(
1916
+ /* @__PURE__ */ jsx(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(
1927
1917
  (lvl) => lvl.id === (info == null ? void 0 : info.current_level)
1928
- )) != null ? _j : -1) + 1 || "") })
1918
+ )) != null ? _j2 : -1) + 1 || "") })
1929
1919
  ]
1930
1920
  }
1931
1921
  ),
@@ -1941,14 +1931,14 @@ function ApprovalWorkflow({
1941
1931
  gap: 1.5
1942
1932
  },
1943
1933
  children: [
1944
- (info == null ? void 0 : info.current_status) !== "completed" && ((_l = (_k = info == null ? void 0 : info.levels) == null ? void 0 : _k.find(
1934
+ (info == null ? void 0 : info.current_status) !== "completed" && ((_l2 = (_k2 = info == null ? void 0 : info.levels) == null ? void 0 : _k2.find(
1945
1935
  (lvl) => lvl.id === (info == null ? void 0 : info.current_level)
1946
- )) == null ? void 0 : _l.order) <= ((_n = (_m = info == null ? void 0 : info.levels) == null ? void 0 : _m.find(
1936
+ )) == null ? void 0 : _l2.order) <= ((_n2 = (_m2 = info == null ? void 0 : info.levels) == null ? void 0 : _m2.find(
1947
1937
  (lvl) => {
1948
1938
  var _a3;
1949
1939
  return Number(lvl.assign_to[0]) === ((_a3 = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a3.id);
1950
1940
  }
1951
- )) == null ? void 0 : _n.order) ? /* @__PURE__ */ jsx(
1941
+ )) == null ? void 0 : _n2.order) ? /* @__PURE__ */ jsx(
1952
1942
  Statusselector_default,
1953
1943
  {
1954
1944
  onSendBack: () => handleSendBack(info == null ? void 0 : info._id),
@@ -2040,7 +2030,7 @@ function ApprovalWorkflow({
2040
2030
  children: /* @__PURE__ */ jsx(CircularProgress, { size: 36, color: "primary" })
2041
2031
  }
2042
2032
  ) : /* @__PURE__ */ jsx(
2043
- SnakeTimeline,
2033
+ CustomTimelineWithStatus,
2044
2034
  {
2045
2035
  events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
2046
2036
  var _a3, _b3, _c3, _d3;
@@ -2077,8 +2067,7 @@ function ApprovalWorkflow({
2077
2067
  pb: 3
2078
2068
  },
2079
2069
  children: visiblePendingRequests == null ? void 0 : visiblePendingRequests.map((info, index) => {
2080
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k;
2081
- console.log("\u{1F680} ~ ApprovalWorkflow ~ info:", info);
2070
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2;
2082
2071
  const currentLevel = (_a2 = info == null ? void 0 : info.levels) == null ? void 0 : _a2.find(
2083
2072
  (level_) => level_.id === (info == null ? void 0 : info.current_level)
2084
2073
  );
@@ -2087,7 +2076,6 @@ function ApprovalWorkflow({
2087
2076
  if (!(info2 == null ? void 0 : info2.isLevelZero)) return statusList2;
2088
2077
  return statusList2.filter((item) => item.status !== 3);
2089
2078
  };
2090
- console.log("statusList", statusList);
2091
2079
  const redir = buildRedirectionUrl(info);
2092
2080
  const currentStatus = ((_d2 = (_c2 = (_b2 = info == null ? void 0 : info.levels) == null ? void 0 : _b2.find(
2093
2081
  (lvl) => lvl.id === (info == null ? void 0 : info.current_level)
@@ -2170,9 +2158,9 @@ function ApprovalWorkflow({
2170
2158
  noWrap: true,
2171
2159
  sx: {
2172
2160
  mt: 0.8,
2173
- color: ((_h = info == null ? void 0 : info.attachment_links) == null ? void 0 : _h.length) ? "primary.dark" : "text.disabled"
2161
+ color: ((_h2 = info == null ? void 0 : info.attachment_links) == null ? void 0 : _h2.length) ? "primary.dark" : "text.disabled"
2174
2162
  },
2175
- children: ((_i = info == null ? void 0 : info.attachment_links) == null ? void 0 : _i.length) ? `${info.attachment_links.length} file(s)` : "N/A"
2163
+ children: ((_i2 = info == null ? void 0 : info.attachment_links) == null ? void 0 : _i2.length) ? `${info.attachment_links.length} file(s)` : "N/A"
2176
2164
  }
2177
2165
  )
2178
2166
  ] }),
@@ -2201,9 +2189,9 @@ function ApprovalWorkflow({
2201
2189
  },
2202
2190
  children: [
2203
2191
  /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", children: "Current Level" }),
2204
- /* @__PURE__ */ jsx(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(
2192
+ /* @__PURE__ */ jsx(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(
2205
2193
  (lvl) => lvl.id === (info == null ? void 0 : info.current_level)
2206
- )) != null ? _k : -1) + 1 || "") })
2194
+ )) != null ? _k2 : -1) + 1 || "") })
2207
2195
  ]
2208
2196
  }
2209
2197
  ),
@@ -2309,7 +2297,7 @@ function ApprovalWorkflow({
2309
2297
  children: /* @__PURE__ */ jsx(CircularProgress, { size: 36, color: "primary" })
2310
2298
  }
2311
2299
  ) : /* @__PURE__ */ jsx(
2312
- SnakeTimeline,
2300
+ CustomTimelineWithStatus,
2313
2301
  {
2314
2302
  events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
2315
2303
  var _a3, _b3, _c3, _d3;
@@ -2353,8 +2341,8 @@ function ApprovalWorkflow({
2353
2341
  openModal: !!approveTarget,
2354
2342
  closeModal: () => setApproveTarget(null),
2355
2343
  header: "Approve",
2356
- workflowLogId: (_a = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _a[0],
2357
- statusId: (_b = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _b[1]
2344
+ workflowLogId: (_m = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _m[0],
2345
+ statusId: (_n = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _n[1]
2358
2346
  }
2359
2347
  ),
2360
2348
  /* @__PURE__ */ jsx(
@@ -2363,9 +2351,9 @@ function ApprovalWorkflow({
2363
2351
  openModal: !!rejectTarget,
2364
2352
  closeModal: () => setRejectTarget(null),
2365
2353
  header: "Reject",
2366
- workflowLogId: (_c = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _c[0],
2367
- statusId: (_d = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _d[1],
2368
- rejection_reason_master: (_e = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _e[2]
2354
+ workflowLogId: (_o = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _o[0],
2355
+ statusId: (_p = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _p[1],
2356
+ rejection_reason_master: (_q = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _q[2]
2369
2357
  }
2370
2358
  ),
2371
2359
  /* @__PURE__ */ jsx(
@@ -2374,8 +2362,8 @@ function ApprovalWorkflow({
2374
2362
  openModal: !!onHoldTarget,
2375
2363
  closeModal: () => setOnHoldTarget(null),
2376
2364
  header: "On Hold",
2377
- workflowLogId: (_f = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _f[0],
2378
- statusId: (_g = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _g[1]
2365
+ workflowLogId: (_r = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _r[0],
2366
+ statusId: (_s = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _s[1]
2379
2367
  }
2380
2368
  )
2381
2369
  ] });