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