amp-workflow-ui 0.1.10 → 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
  };
@@ -1484,8 +1482,8 @@ function ApprovalWorkflow({
1484
1482
  px: 2,
1485
1483
  pb: 3
1486
1484
  },
1487
- children: visibleSelectedRequests == null ? void 0 : visibleSelectedRequests.map((info, index) => {
1488
- 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;
1489
1487
  const currentLevel = info == null ? void 0 : info.levels.find(
1490
1488
  (level_) => level_.id === (info == null ? void 0 : info.current_level)
1491
1489
  );
@@ -1517,7 +1515,8 @@ function ApprovalWorkflow({
1517
1515
  borderRadius: "14px",
1518
1516
  boxShadow: "0px 2px 10px rgba(76, 78, 100, 0.1)",
1519
1517
  px: 3,
1520
- py: 2
1518
+ py: 2,
1519
+ background: "white"
1521
1520
  },
1522
1521
  children: [
1523
1522
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1739,31 +1738,62 @@ function ApprovalWorkflow({
1739
1738
  },
1740
1739
  children: /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 36, color: "primary" })
1741
1740
  }
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("HH:mm"),
1752
- 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",
1753
- subTitle: ((_c3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _c3.comment) || "No Comments",
1754
- attachment: ((_d3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _d3.file) || null,
1755
- count: (item == null ? void 0 : item.current_level) == "L0" ? "L0" : item == null ? void 0 : item.current_level_count,
1756
- cardType: "card",
1757
- 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
1758
- };
1759
- })
1760
- }
1761
- ) })
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
+ ] }) })
1762
1778
  ]
1763
1779
  },
1764
1780
  index
1765
1781
  );
1766
- })
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
+ )
1767
1797
  }
1768
1798
  ),
1769
1799
  selectedApprovalOtions === "All Requests" && /* @__PURE__ */ jsxRuntime.jsx(
@@ -1776,8 +1806,11 @@ function ApprovalWorkflow({
1776
1806
  px: 2,
1777
1807
  pb: 3
1778
1808
  },
1779
- children: visibleAllRequests == null ? void 0 : visibleAllRequests.map((info, index) => {
1780
- 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
+ }
1781
1814
  const currentLevel = info == null ? void 0 : info.levels.find(
1782
1815
  (level_) => level_.id === (info == null ? void 0 : info.current_level)
1783
1816
  );
@@ -1809,7 +1842,8 @@ function ApprovalWorkflow({
1809
1842
  borderRadius: "14px",
1810
1843
  boxShadow: "0px 2px 10px rgba(76, 78, 100, 0.1)",
1811
1844
  px: 3,
1812
- py: 2
1845
+ py: 2,
1846
+ background: "white"
1813
1847
  },
1814
1848
  children: [
1815
1849
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -2038,31 +2072,62 @@ function ApprovalWorkflow({
2038
2072
  },
2039
2073
  children: /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 36, color: "primary" })
2040
2074
  }
2041
- ) : /* @__PURE__ */ jsxRuntime.jsx(
2042
- CustomTimelineWithStatus,
2043
- {
2044
- events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
2045
- var _a3, _b3, _c3, _d3;
2046
- return {
2047
- date: moment__default.default(item == null ? void 0 : item.created_at).format(
2048
- "DD-MM-YYYY"
2049
- ),
2050
- time: moment__default.default(item == null ? void 0 : item.created_at).format("HH:mm"),
2051
- 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",
2052
- subTitle: ((_c3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _c3.comment) || "No Comments",
2053
- attachment: ((_d3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _d3.file) || null,
2054
- count: (item == null ? void 0 : item.current_level) == "L0" ? "L0" : item == null ? void 0 : item.current_level_count,
2055
- cardType: "card",
2056
- 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
2057
- };
2058
- })
2059
- }
2060
- ) })
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
+ ] }) })
2061
2112
  ]
2062
2113
  },
2063
2114
  index
2064
2115
  );
2065
- })
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
+ )
2066
2131
  }
2067
2132
  ),
2068
2133
  selectedApprovalOtions === "Action Required" && /* @__PURE__ */ jsxRuntime.jsx(
@@ -2075,8 +2140,8 @@ function ApprovalWorkflow({
2075
2140
  px: 2,
2076
2141
  pb: 3
2077
2142
  },
2078
- children: visiblePendingRequests == null ? void 0 : visiblePendingRequests.map((info, index) => {
2079
- 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;
2080
2145
  const currentLevel = (_a2 = info == null ? void 0 : info.levels) == null ? void 0 : _a2.find(
2081
2146
  (level_) => level_.id === (info == null ? void 0 : info.current_level)
2082
2147
  );
@@ -2101,7 +2166,8 @@ function ApprovalWorkflow({
2101
2166
  borderRadius: "14px",
2102
2167
  boxShadow: "0px 2px 10px rgba(76, 78, 100, 0.1)",
2103
2168
  px: 3,
2104
- py: 2
2169
+ py: 2,
2170
+ background: "white"
2105
2171
  },
2106
2172
  children: [
2107
2173
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -2305,31 +2371,62 @@ function ApprovalWorkflow({
2305
2371
  },
2306
2372
  children: /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 36, color: "primary" })
2307
2373
  }
2308
- ) : /* @__PURE__ */ jsxRuntime.jsx(
2309
- CustomTimelineWithStatus,
2310
- {
2311
- events: expandedDetails == null ? void 0 : expandedDetails.map((item) => {
2312
- var _a3, _b3, _c3, _d3;
2313
- return {
2314
- date: moment__default.default(item == null ? void 0 : item.created_at).format(
2315
- "DD-MM-YYYY"
2316
- ),
2317
- time: moment__default.default(item == null ? void 0 : item.created_at).format("HH:mm"),
2318
- 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",
2319
- subTitle: ((_c3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _c3.comment) || "No Comments",
2320
- attachment: ((_d3 = item == null ? void 0 : item.comment_reasons) == null ? void 0 : _d3.file) || null,
2321
- count: (item == null ? void 0 : item.current_level) == "L0" ? "L0" : item == null ? void 0 : item.current_level_count,
2322
- cardType: "card",
2323
- 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
2324
- };
2325
- })
2326
- }
2327
- ) })
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
+ ] }) })
2328
2411
  ]
2329
2412
  },
2330
2413
  index
2331
2414
  );
2332
- })
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
+ )
2333
2430
  }
2334
2431
  )
2335
2432
  ] })