amp-workflow-ui 0.1.9 → 0.1.11

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
@@ -329,7 +329,8 @@ function SendBackDialog({
329
329
  sx: {
330
330
  width: "100%",
331
331
  color: snackbar.severity === "error" ? "#fff" : "inherit",
332
- bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0
332
+ bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0,
333
+ zIndex: 1e5
333
334
  },
334
335
  children: snackbar.message
335
336
  }
@@ -486,7 +487,8 @@ function ApproveDialog({
486
487
  sx: {
487
488
  width: "100%",
488
489
  color: snackbar.severity === "error" ? "#fff" : "inherit",
489
- bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0
490
+ bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0,
491
+ zIndex: 1e5
490
492
  },
491
493
  children: snackbar.message
492
494
  }
@@ -702,7 +704,8 @@ function RejectDialog({
702
704
  sx: {
703
705
  width: "100%",
704
706
  color: snackbar.severity === "error" ? "#fff" : "inherit",
705
- bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0
707
+ bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0,
708
+ zIndex: 1e5
706
709
  },
707
710
  children: snackbar.message
708
711
  }
@@ -859,7 +862,8 @@ function OnHoldDialog({
859
862
  sx: {
860
863
  width: "100%",
861
864
  color: snackbar.severity === "error" ? "#fff" : "inherit",
862
- bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0
865
+ bgcolor: snackbar.severity === "error" ? "#d32f2f" : void 0,
866
+ zIndex: 1e5
863
867
  },
864
868
  children: snackbar.message
865
869
  }
@@ -1136,7 +1140,7 @@ function ApprovalWorkflow({
1136
1140
  userInfo
1137
1141
  }) {
1138
1142
  var _a, _b, _c, _d, _e, _f, _g;
1139
- const theme = material.useTheme();
1143
+ material.useTheme();
1140
1144
  const { api, urlBuilder, loadingComponent, ENV_VARIABLES } = useWorkflowContext();
1141
1145
  const [selectedApprovalOtions, setSelectedApprovalOtions] = React7.useState(
1142
1146
  selectedWorkflowsList.length ? "selected" : "Action Required"
@@ -1147,6 +1151,7 @@ function ApprovalWorkflow({
1147
1151
  const [rejectTarget, setRejectTarget] = React7__default.default.useState(null);
1148
1152
  const [onHoldTarget, setOnHoldTarget] = React7__default.default.useState(null);
1149
1153
  const [expandedDetails, setExpandedDetails] = React7.useState([]);
1154
+ console.log("\u{1F680} ~ ApprovalWorkflow ~ expandedDetails:", expandedDetails);
1150
1155
  const [urlConfig, setUrlConfig] = React7.useState({});
1151
1156
  const [allRequestArray, setAllRequestArray] = React7.useState([]);
1152
1157
  const [pendingRequestArray, setPendingRequestArray] = React7.useState([]);
@@ -1249,45 +1254,38 @@ function ApprovalWorkflow({
1249
1254
  case "approved":
1250
1255
  return {
1251
1256
  title: "Approved",
1252
- color: theme.palette.success.light,
1253
- // e.g. light green background
1254
- labelColor: theme.palette.grey[100]
1255
- // e.g. light grey text
1257
+ color: "#e6f7e9",
1258
+ labelColor: "#389e49"
1256
1259
  };
1257
1260
  case "rejected":
1258
1261
  return {
1259
1262
  title: "Rejected",
1260
- color: theme.palette.error.light,
1261
- // light red background
1262
- labelColor: theme.palette.text.primary
1263
- // normal text color
1263
+ color: "#fff1f0",
1264
+ labelColor: "#f5222d"
1264
1265
  };
1265
1266
  case "onhold":
1266
- case "on_hold":
1267
1267
  return {
1268
1268
  title: "On Hold",
1269
- color: theme.palette.warning.light,
1270
- // soft amber background
1271
- labelColor: theme.palette.warning.main
1272
- // strong amber text
1269
+ color: "#fff7e6",
1270
+ labelColor: "#faad14"
1273
1271
  };
1274
- case "inprogress":
1275
- case "in_progress":
1272
+ case "sendback":
1276
1273
  return {
1277
- title: "In Progress",
1278
- color: theme.palette.info.light,
1279
- // light blue background
1280
- labelColor: theme.palette.info.main
1281
- // blue text
1274
+ title: "Send Back",
1275
+ color: "#e6f7ff",
1276
+ labelColor: "#1890ff"
1277
+ };
1278
+ case "completed":
1279
+ return {
1280
+ title: "Send Back",
1281
+ color: "#e6f7ff",
1282
+ labelColor: "#1890ff"
1282
1283
  };
1283
1284
  case "pending":
1284
- default:
1285
1285
  return {
1286
1286
  title: "Pending",
1287
- color: theme.palette.grey[200],
1288
- // light grey background
1289
- labelColor: theme.palette.text.primary
1290
- // normal text color
1287
+ color: "#f0f0f0",
1288
+ labelColor: "#595959"
1291
1289
  };
1292
1290
  }
1293
1291
  };
@@ -1382,12 +1380,13 @@ function ApprovalWorkflow({
1382
1380
  return urlBuilder(module_name, module_id, urlConfig, reference_id);
1383
1381
  }
1384
1382
  const ref = urlConfig == null ? void 0 : urlConfig[module_name];
1385
- if ((ref == null ? void 0 : ref.base_url) && (ref == null ? void 0 : ref.sub_url)) {
1383
+ if ((ref == null ? void 0 : ref.base_variable) && (ref == null ? void 0 : ref.sub_url)) {
1384
+ const BASE_ENV_VARIABLE = ENV_VARIABLES[(ref == null ? void 0 : ref.base_variable.split("_")[3]) + "_" + (ref == null ? void 0 : ref.base_variable.split("_")[4])];
1386
1385
  const qs = new URLSearchParams();
1387
1386
  if (reference_id) qs.set("reference_id", String(reference_id));
1388
1387
  if (module_name) qs.set("module_name", String(module_name));
1389
1388
  if (module_id) qs.set("module_id", String(module_id));
1390
- return `${ref.base_url}${ref.sub_url}?${qs.toString()}`;
1389
+ return `${BASE_ENV_VARIABLE}${ref.sub_url}?${qs.toString()}`;
1391
1390
  }
1392
1391
  return "#";
1393
1392
  };
@@ -1483,8 +1482,8 @@ function ApprovalWorkflow({
1483
1482
  px: 2,
1484
1483
  pb: 3
1485
1484
  },
1486
- children: visibleSelectedRequests == null ? void 0 : visibleSelectedRequests.map((info, index) => {
1487
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l, _m, _n;
1485
+ children: visibleSelectedRequests.length > 0 ? visibleSelectedRequests == null ? void 0 : visibleSelectedRequests.map((info, index) => {
1486
+ 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;
1488
1487
  const currentLevel = info == null ? void 0 : info.levels.find(
1489
1488
  (level_) => level_.id === (info == null ? void 0 : info.current_level)
1490
1489
  );
@@ -1516,7 +1515,8 @@ function ApprovalWorkflow({
1516
1515
  borderRadius: "14px",
1517
1516
  boxShadow: "0px 2px 10px rgba(76, 78, 100, 0.1)",
1518
1517
  px: 3,
1519
- py: 2
1518
+ py: 2,
1519
+ background: "white"
1520
1520
  },
1521
1521
  children: [
1522
1522
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1738,31 +1738,62 @@ function ApprovalWorkflow({
1738
1738
  },
1739
1739
  children: /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 36, color: "primary" })
1740
1740
  }
1741
- ) : /* @__PURE__ */ jsxRuntime.jsx(
1742
- CustomTimelineWithStatus,
1743
- {
1744
- events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
1745
- var _a3, _b3, _c3, _d3;
1746
- return {
1747
- date: moment__default.default(item == null ? void 0 : item.created_at).format(
1748
- "DD-MM-YYYY"
1749
- ),
1750
- time: moment__default.default(item == null ? void 0 : item.created_at).format("HH:mm"),
1751
- 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",
1752
- subTitle: ((_c3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _c3.comment) || "No Comments",
1753
- attachment: ((_d3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _d3.file) || null,
1754
- count: (item == null ? void 0 : item.current_level) == "L0" ? "L0" : item == null ? void 0 : item.current_level_count,
1755
- cardType: "card",
1756
- 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
1757
- };
1758
- })
1759
- }
1760
- ) })
1741
+ ) : /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1742
+ /* @__PURE__ */ jsxRuntime.jsx(
1743
+ CustomTimelineWithStatus,
1744
+ {
1745
+ events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
1746
+ var _a3, _b3, _c3, _d3;
1747
+ return {
1748
+ date: moment__default.default(item == null ? void 0 : item.created_at).format(
1749
+ "DD-MM-YYYY"
1750
+ ),
1751
+ time: moment__default.default(item == null ? void 0 : item.created_at).format(
1752
+ "HH:mm"
1753
+ ),
1754
+ 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",
1755
+ subTitle: ((_c3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _c3.comment) || "No Comments",
1756
+ attachment: ((_d3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _d3.file) || null,
1757
+ count: (item == null ? void 0 : item.current_level) == "L0" ? "L0" : item == null ? void 0 : item.current_level_count,
1758
+ cardType: "card",
1759
+ 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
1760
+ };
1761
+ })
1762
+ }
1763
+ ),
1764
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1765
+ /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "caption", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontWeight: "bold" }, children: [
1766
+ "Currently Assigned to:",
1767
+ " "
1768
+ ] }) }),
1769
+ /* @__PURE__ */ jsxRuntime.jsx(
1770
+ material.Tooltip,
1771
+ {
1772
+ 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,
1773
+ children: /* @__PURE__ */ jsxRuntime.jsx(material.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"})` })
1774
+ }
1775
+ )
1776
+ ] })
1777
+ ] }) })
1761
1778
  ]
1762
1779
  },
1763
1780
  index
1764
1781
  );
1765
- })
1782
+ }) : /* @__PURE__ */ jsxRuntime.jsx(
1783
+ "div",
1784
+ {
1785
+ style: {
1786
+ height: "100%",
1787
+ width: "100%",
1788
+ color: "gray",
1789
+ fontSize: "20px",
1790
+ display: "flex",
1791
+ justifyContent: "center",
1792
+ alignItems: "center"
1793
+ },
1794
+ children: "NO RECORD FOUND"
1795
+ }
1796
+ )
1766
1797
  }
1767
1798
  ),
1768
1799
  selectedApprovalOtions === "All Requests" && /* @__PURE__ */ jsxRuntime.jsx(
@@ -1775,8 +1806,11 @@ function ApprovalWorkflow({
1775
1806
  px: 2,
1776
1807
  pb: 3
1777
1808
  },
1778
- children: visibleAllRequests == null ? void 0 : visibleAllRequests.map((info, index) => {
1779
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l, _m, _n;
1809
+ children: visibleAllRequests.length > 0 ? visibleAllRequests == null ? void 0 : visibleAllRequests.map((info, index) => {
1810
+ 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;
1811
+ if (!(info == null ? void 0 : info.isLevelZero)) {
1812
+ console.log("\u{1F680} ~ ApprovalWorkflow ~ Zero:", info);
1813
+ }
1780
1814
  const currentLevel = info == null ? void 0 : info.levels.find(
1781
1815
  (level_) => level_.id === (info == null ? void 0 : info.current_level)
1782
1816
  );
@@ -1808,7 +1842,8 @@ function ApprovalWorkflow({
1808
1842
  borderRadius: "14px",
1809
1843
  boxShadow: "0px 2px 10px rgba(76, 78, 100, 0.1)",
1810
1844
  px: 3,
1811
- py: 2
1845
+ py: 2,
1846
+ background: "white"
1812
1847
  },
1813
1848
  children: [
1814
1849
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -2037,31 +2072,62 @@ function ApprovalWorkflow({
2037
2072
  },
2038
2073
  children: /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 36, color: "primary" })
2039
2074
  }
2040
- ) : /* @__PURE__ */ jsxRuntime.jsx(
2041
- CustomTimelineWithStatus,
2042
- {
2043
- events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
2044
- var _a3, _b3, _c3, _d3;
2045
- return {
2046
- date: moment__default.default(item == null ? void 0 : item.created_at).format(
2047
- "DD-MM-YYYY"
2048
- ),
2049
- time: moment__default.default(item == null ? void 0 : item.created_at).format("HH:mm"),
2050
- 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",
2051
- subTitle: ((_c3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _c3.comment) || "No Comments",
2052
- attachment: ((_d3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _d3.file) || null,
2053
- count: (item == null ? void 0 : item.current_level) == "L0" ? "L0" : item == null ? void 0 : item.current_level_count,
2054
- cardType: "card",
2055
- 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
2056
- };
2057
- })
2058
- }
2059
- ) })
2075
+ ) : /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2076
+ /* @__PURE__ */ jsxRuntime.jsx(
2077
+ CustomTimelineWithStatus,
2078
+ {
2079
+ events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
2080
+ var _a3, _b3, _c3, _d3;
2081
+ return {
2082
+ date: moment__default.default(item == null ? void 0 : item.created_at).format(
2083
+ "DD-MM-YYYY"
2084
+ ),
2085
+ time: moment__default.default(item == null ? void 0 : item.created_at).format(
2086
+ "HH:mm"
2087
+ ),
2088
+ 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",
2089
+ subTitle: ((_c3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _c3.comment) || "No Comments",
2090
+ attachment: ((_d3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _d3.file) || null,
2091
+ count: (item == null ? void 0 : item.current_level) == "L0" ? "L0" : item == null ? void 0 : item.current_level_count,
2092
+ cardType: "card",
2093
+ 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
2094
+ };
2095
+ })
2096
+ }
2097
+ ),
2098
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2099
+ /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "caption", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontWeight: "bold" }, children: [
2100
+ "Currently Assigned to:",
2101
+ " "
2102
+ ] }) }),
2103
+ /* @__PURE__ */ jsxRuntime.jsx(
2104
+ material.Tooltip,
2105
+ {
2106
+ 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,
2107
+ children: /* @__PURE__ */ jsxRuntime.jsx(material.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"})` })
2108
+ }
2109
+ )
2110
+ ] })
2111
+ ] }) })
2060
2112
  ]
2061
2113
  },
2062
2114
  index
2063
2115
  );
2064
- })
2116
+ }) : /* @__PURE__ */ jsxRuntime.jsx(
2117
+ "div",
2118
+ {
2119
+ style: {
2120
+ height: "100%",
2121
+ width: "100%",
2122
+ color: "gray",
2123
+ fontSize: "20px",
2124
+ display: "flex",
2125
+ justifyContent: "center",
2126
+ alignItems: "center"
2127
+ },
2128
+ children: "NO RECORD FOUND"
2129
+ }
2130
+ )
2065
2131
  }
2066
2132
  ),
2067
2133
  selectedApprovalOtions === "Action Required" && /* @__PURE__ */ jsxRuntime.jsx(
@@ -2074,8 +2140,8 @@ function ApprovalWorkflow({
2074
2140
  px: 2,
2075
2141
  pb: 3
2076
2142
  },
2077
- children: visiblePendingRequests == null ? void 0 : visiblePendingRequests.map((info, index) => {
2078
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k;
2143
+ children: visiblePendingRequests.length > 0 ? visiblePendingRequests == null ? void 0 : visiblePendingRequests.map((info, index) => {
2144
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
2079
2145
  const currentLevel = (_a2 = info == null ? void 0 : info.levels) == null ? void 0 : _a2.find(
2080
2146
  (level_) => level_.id === (info == null ? void 0 : info.current_level)
2081
2147
  );
@@ -2100,7 +2166,8 @@ function ApprovalWorkflow({
2100
2166
  borderRadius: "14px",
2101
2167
  boxShadow: "0px 2px 10px rgba(76, 78, 100, 0.1)",
2102
2168
  px: 3,
2103
- py: 2
2169
+ py: 2,
2170
+ background: "white"
2104
2171
  },
2105
2172
  children: [
2106
2173
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -2304,31 +2371,62 @@ function ApprovalWorkflow({
2304
2371
  },
2305
2372
  children: /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 36, color: "primary" })
2306
2373
  }
2307
- ) : /* @__PURE__ */ jsxRuntime.jsx(
2308
- CustomTimelineWithStatus,
2309
- {
2310
- events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
2311
- var _a3, _b3, _c3, _d3;
2312
- return {
2313
- date: moment__default.default(item == null ? void 0 : item.created_at).format(
2314
- "DD-MM-YYYY"
2315
- ),
2316
- time: moment__default.default(item == null ? void 0 : item.created_at).format("HH:mm"),
2317
- 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",
2318
- subTitle: ((_c3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _c3.comment) || "No Comments",
2319
- attachment: ((_d3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _d3.file) || null,
2320
- count: (item == null ? void 0 : item.current_level) == "L0" ? "L0" : item == null ? void 0 : item.current_level_count,
2321
- cardType: "card",
2322
- 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
2323
- };
2324
- })
2325
- }
2326
- ) })
2374
+ ) : /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2375
+ /* @__PURE__ */ jsxRuntime.jsx(
2376
+ CustomTimelineWithStatus,
2377
+ {
2378
+ events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
2379
+ var _a3, _b3, _c3, _d3;
2380
+ return {
2381
+ date: moment__default.default(item == null ? void 0 : item.created_at).format(
2382
+ "DD-MM-YYYY"
2383
+ ),
2384
+ time: moment__default.default(item == null ? void 0 : item.created_at).format(
2385
+ "HH:mm"
2386
+ ),
2387
+ 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",
2388
+ subTitle: ((_c3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _c3.comment) || "No Comments",
2389
+ attachment: ((_d3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _d3.file) || null,
2390
+ count: (item == null ? void 0 : item.current_level) == "L0" ? "L0" : item == null ? void 0 : item.current_level_count,
2391
+ cardType: "card",
2392
+ 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
2393
+ };
2394
+ })
2395
+ }
2396
+ ),
2397
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2398
+ /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "caption", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontWeight: "bold" }, children: [
2399
+ "Currently Assigned to:",
2400
+ " "
2401
+ ] }) }),
2402
+ /* @__PURE__ */ jsxRuntime.jsx(
2403
+ material.Tooltip,
2404
+ {
2405
+ 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,
2406
+ children: /* @__PURE__ */ jsxRuntime.jsx(material.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"})` })
2407
+ }
2408
+ )
2409
+ ] })
2410
+ ] }) })
2327
2411
  ]
2328
2412
  },
2329
2413
  index
2330
2414
  );
2331
- })
2415
+ }) : /* @__PURE__ */ jsxRuntime.jsx(
2416
+ "div",
2417
+ {
2418
+ style: {
2419
+ height: "100%",
2420
+ width: "100%",
2421
+ color: "gray",
2422
+ fontSize: "20px",
2423
+ display: "flex",
2424
+ justifyContent: "center",
2425
+ alignItems: "center"
2426
+ },
2427
+ children: "NO RECORD FOUND"
2428
+ }
2429
+ )
2332
2430
  }
2333
2431
  )
2334
2432
  ] })