amp-workflow-ui 0.1.34 → 0.1.35

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
@@ -326,9 +326,9 @@ function WorkflowRequestCard({
326
326
  const statusList = currentLevel ? currentLevel.status_list : [];
327
327
  const isCurrentUser = (id) => (userDetails == null ? void 0 : userDetails.id) !== void 0 && (userDetails == null ? void 0 : userDetails.id) !== null && String(id) === String(userDetails.id);
328
328
  const includesCurrentUser = (ids) => Array.isArray(ids) && ids.some((id) => isCurrentUser(id));
329
- const canActOnCurrentLevel = includesCurrentUser(currentLevel == null ? void 0 : currentLevel.assign_to) || includesCurrentUser(currentLevel == null ? void 0 : currentLevel.escalate_assign_to) || Boolean(requestDetails == null ? void 0 : requestDetails.is_parallel) && ((_d = currentLevel == null ? void 0 : currentLevel.parallel_assign_to) == null ? void 0 : _d.some(
330
- (parallelItem) => isCurrentUser(parallelItem == null ? void 0 : parallelItem.assigned_user) || includesCurrentUser(parallelItem == null ? void 0 : parallelItem.assignTo)
331
- ));
329
+ const canActOnCurrentLevel = Boolean(requestDetails == null ? void 0 : requestDetails.is_parallel) ? (_d = requestDetails == null ? void 0 : requestDetails.levels) == null ? void 0 : _d.some(
330
+ (level) => includesCurrentUser(level == null ? void 0 : level.assign_to) || includesCurrentUser(level == null ? void 0 : level.escalate_assign_to)
331
+ ) : includesCurrentUser(currentLevel == null ? void 0 : currentLevel.assign_to) || includesCurrentUser(currentLevel == null ? void 0 : currentLevel.escalate_assign_to);
332
332
  const filterRejectForLevelZero = (statusList2, info) => {
333
333
  if (!(info == null ? void 0 : info.isLevelZero)) return statusList2;
334
334
  return statusList2 == null ? void 0 : statusList2.filter((item) => item.status !== 3);
@@ -636,7 +636,9 @@ function SendBackDialog({
636
636
  workflowLogId,
637
637
  onSuccess
638
638
  }) {
639
+ var _a, _b;
639
640
  const { userInfo, api } = useWorkflowContext();
641
+ const currentUserId = (_b = (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id) != null ? _b : userInfo == null ? void 0 : userInfo.id;
640
642
  const [comment, setComment] = React2.useState("");
641
643
  const [selectedFile, setSelectedFile] = React2.useState(null);
642
644
  const [fileName, setFileName] = React2.useState("");
@@ -651,8 +653,8 @@ function SendBackDialog({
651
653
  });
652
654
  const handleCloseSnackbar = () => setSnackbar((prev) => ({ ...prev, open: false }));
653
655
  const handleAttachment = () => {
654
- var _a;
655
- return (_a = fileInputRef.current) == null ? void 0 : _a.click();
656
+ var _a2;
657
+ return (_a2 = fileInputRef.current) == null ? void 0 : _a2.click();
656
658
  };
657
659
  const handleUpload = async (file) => {
658
660
  setFileLoading(true);
@@ -703,7 +705,7 @@ function SendBackDialog({
703
705
  return isValid;
704
706
  };
705
707
  const onSubmit = async () => {
706
- var _a, _b, _c, _d;
708
+ var _a2, _b2, _c;
707
709
  if (!validateFields()) return;
708
710
  setLoading(true);
709
711
  try {
@@ -712,7 +714,7 @@ function SendBackDialog({
712
714
  data: {
713
715
  comment,
714
716
  file: selectedFile,
715
- created_by: (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id
717
+ created_by: currentUserId
716
718
  },
717
719
  serviceURL: "api"
718
720
  });
@@ -726,14 +728,14 @@ function SendBackDialog({
726
728
  } else {
727
729
  setSnackbar({
728
730
  open: true,
729
- message: ((_b = res == null ? void 0 : res.error) == null ? void 0 : _b.message) || "Something went wrong. Try again.",
731
+ message: ((_a2 = res == null ? void 0 : res.error) == null ? void 0 : _a2.message) || "Something went wrong. Try again.",
730
732
  severity: "error"
731
733
  });
732
734
  }
733
735
  } catch (e) {
734
736
  setSnackbar({
735
737
  open: true,
736
- message: ((_d = (_c = e == null ? void 0 : e.response) == null ? void 0 : _c.data) == null ? void 0 : _d.message) || "Oops! Something went wrong.",
738
+ message: ((_c = (_b2 = e == null ? void 0 : e.response) == null ? void 0 : _b2.data) == null ? void 0 : _c.message) || "Oops! Something went wrong.",
737
739
  severity: "error"
738
740
  });
739
741
  } finally {
@@ -890,7 +892,9 @@ function ApproveDialog({
890
892
  statusId,
891
893
  onSuccess
892
894
  }) {
895
+ var _a, _b;
893
896
  const { userInfo, api } = useWorkflowContext();
897
+ const currentUserId = (_b = (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id) != null ? _b : userInfo == null ? void 0 : userInfo.id;
894
898
  const theme = styles.useTheme();
895
899
  useMediaQuery__default.default(theme.breakpoints.down("lg"));
896
900
  const [comment, setComment] = React2.useState("");
@@ -913,7 +917,7 @@ function ApproveDialog({
913
917
  return isValid;
914
918
  };
915
919
  const onSubmit = async () => {
916
- var _a, _b, _c;
920
+ var _a2, _b2;
917
921
  if (!validateFields()) return;
918
922
  setLoading(true);
919
923
  try {
@@ -921,15 +925,15 @@ function ApproveDialog({
921
925
  url: `/workflow/update-status/${workflowLogId}/${statusId}`,
922
926
  data: {
923
927
  comment,
924
- created_by: (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id
928
+ created_by: currentUserId
925
929
  },
926
930
  serviceURL: "api"
927
931
  }).then((res) => {
928
- var _a2, _b2;
932
+ var _a3, _b3;
929
933
  console.log("\u{1F680} ~ onSubmit ~ res:", res);
930
- ((_a2 = res == null ? void 0 : res.error) == null ? void 0 : _a2.status) == 500 ? setSnackbar({
934
+ ((_a3 = res == null ? void 0 : res.error) == null ? void 0 : _a3.status) == 500 ? setSnackbar({
931
935
  open: true,
932
- message: ((_b2 = res == null ? void 0 : res.error) == null ? void 0 : _b2.message) || "Something unexpected occurred!",
936
+ message: ((_b3 = res == null ? void 0 : res.error) == null ? void 0 : _b3.message) || "Something unexpected occurred!",
933
937
  severity: "error"
934
938
  }) : setSnackbar({
935
939
  open: true,
@@ -940,7 +944,7 @@ function ApproveDialog({
940
944
  } catch (e) {
941
945
  setSnackbar({
942
946
  open: true,
943
- message: ((_c = (_b = e == null ? void 0 : e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Something unexpected occurred!",
947
+ message: ((_b2 = (_a2 = e == null ? void 0 : e.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) || "Something unexpected occurred!",
944
948
  severity: "error"
945
949
  });
946
950
  } finally {
@@ -1060,15 +1064,17 @@ function RejectDialog({
1060
1064
  rejection_reason_master,
1061
1065
  onSuccess
1062
1066
  }) {
1067
+ var _a, _b;
1063
1068
  const { userInfo, api } = useWorkflowContext();
1069
+ const currentUserId = (_b = (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id) != null ? _b : userInfo == null ? void 0 : userInfo.id;
1064
1070
  const theme = styles.useTheme();
1065
1071
  useMediaQuery__default.default(theme.breakpoints.down("lg"));
1066
1072
  const DownArrow = () => {
1067
- var _a;
1073
+ var _a2;
1068
1074
  return /* @__PURE__ */ jsxRuntime.jsx(
1069
1075
  "span",
1070
1076
  {
1071
- style: { color: ((_a = theme.palette.customColors) == null ? void 0 : _a.mainText) || "#333" },
1077
+ style: { color: ((_a2 = theme.palette.customColors) == null ? void 0 : _a2.mainText) || "#333" },
1072
1078
  className: "icon-arrow-down-1"
1073
1079
  }
1074
1080
  );
@@ -1086,14 +1092,14 @@ function RejectDialog({
1086
1092
  const handleCloseSnackbar = () => setSnackbar((prev) => ({ ...prev, open: false }));
1087
1093
  React2.useEffect(() => {
1088
1094
  (async () => {
1089
- var _a;
1095
+ var _a2;
1090
1096
  try {
1091
1097
  if (!statusApplicableList.length) {
1092
1098
  const res = await api.get({
1093
1099
  url: `/workflow/applicableStatuses?type=${rejection_reason_master}`,
1094
1100
  serviceURL: "api"
1095
1101
  });
1096
- setStatusApplicableList(((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data) || []);
1102
+ setStatusApplicableList(((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.data) || []);
1097
1103
  }
1098
1104
  } catch (e) {
1099
1105
  setSnackbar({
@@ -1119,7 +1125,7 @@ function RejectDialog({
1119
1125
  return isValid;
1120
1126
  };
1121
1127
  const onSubmit = async () => {
1122
- var _a, _b, _c;
1128
+ var _a2, _b2;
1123
1129
  if (!validateFields()) return;
1124
1130
  setLoading(true);
1125
1131
  try {
@@ -1128,11 +1134,11 @@ function RejectDialog({
1128
1134
  data: {
1129
1135
  reason: rejectReasons,
1130
1136
  comment,
1131
- created_by: (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id
1137
+ created_by: currentUserId
1132
1138
  },
1133
1139
  serviceURL: "api"
1134
1140
  }).then((res) => {
1135
- var _a2;
1141
+ var _a3;
1136
1142
  console.log("\u{1F680} ~ onSubmit ~ res:", res);
1137
1143
  (res == null ? void 0 : res.status) == 200 ? setSnackbar({
1138
1144
  open: true,
@@ -1140,12 +1146,12 @@ function RejectDialog({
1140
1146
  severity: "success"
1141
1147
  }) : setSnackbar({
1142
1148
  open: true,
1143
- message: ((_a2 = res == null ? void 0 : res.error) == null ? void 0 : _a2.message) || "Something unexpected occurred!",
1149
+ message: ((_a3 = res == null ? void 0 : res.error) == null ? void 0 : _a3.message) || "Something unexpected occurred!",
1144
1150
  severity: "error"
1145
1151
  });
1146
1152
  });
1147
1153
  } catch (e) {
1148
- const message = ((_c = (_b = e == null ? void 0 : e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Something went wrong!";
1154
+ const message = ((_b2 = (_a2 = e == null ? void 0 : e.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) || "Something went wrong!";
1149
1155
  console.error("\u274C Reject Error:", message);
1150
1156
  setSnackbar({
1151
1157
  open: true,
@@ -1287,7 +1293,9 @@ function OnHoldDialog({
1287
1293
  statusId,
1288
1294
  onSuccess
1289
1295
  }) {
1296
+ var _a, _b;
1290
1297
  const { userInfo, api } = useWorkflowContext();
1298
+ const currentUserId = (_b = (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id) != null ? _b : userInfo == null ? void 0 : userInfo.id;
1291
1299
  const theme = styles.useTheme();
1292
1300
  useMediaQuery__default.default(theme.breakpoints.down("lg"));
1293
1301
  const [comment, setComment] = React2.useState("");
@@ -1310,7 +1318,7 @@ function OnHoldDialog({
1310
1318
  return isValid;
1311
1319
  };
1312
1320
  const onSubmit = async () => {
1313
- var _a, _b, _c;
1321
+ var _a2, _b2;
1314
1322
  if (!validateFields()) return;
1315
1323
  setLoading(true);
1316
1324
  try {
@@ -1318,7 +1326,7 @@ function OnHoldDialog({
1318
1326
  url: `/workflow/update-status/${workflowLogId}/${statusId}`,
1319
1327
  data: {
1320
1328
  comment,
1321
- created_by: (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id
1329
+ created_by: currentUserId
1322
1330
  },
1323
1331
  serviceURL: "api"
1324
1332
  });
@@ -1330,7 +1338,7 @@ function OnHoldDialog({
1330
1338
  } catch (e) {
1331
1339
  setSnackbar({
1332
1340
  open: true,
1333
- message: ((_c = (_b = e == null ? void 0 : e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to submit the form",
1341
+ message: ((_b2 = (_a2 = e == null ? void 0 : e.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) || "Failed to submit the form",
1334
1342
  severity: "error"
1335
1343
  });
1336
1344
  } finally {
@@ -1776,8 +1784,9 @@ function ApprovalWorkflow({
1776
1784
  selectedWorkflowsList = [],
1777
1785
  userInfo
1778
1786
  }) {
1779
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
1787
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
1780
1788
  material.useTheme();
1789
+ const currentUserId = (_b = (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id) != null ? _b : userInfo == null ? void 0 : userInfo.id;
1781
1790
  const { api, urlBuilder, loadingComponent, ENV_VARIABLES } = useWorkflowContext();
1782
1791
  const [selectedOption, setSelectedOption] = React2.useState(
1783
1792
  selectedWorkflowsList.length ? "selected" : "Assign To Me"
@@ -1958,20 +1967,20 @@ function ApprovalWorkflow({
1958
1967
  }, []);
1959
1968
  const fetchData = React2.useCallback(
1960
1969
  (tab, page, search, filtersOverride) => {
1961
- var _a2, _b2, _c2;
1970
+ var _a2;
1962
1971
  console.log("[DEBUG-FETCH-DATA] \u{1F3AF} fetchData called with:", {
1963
1972
  tab,
1964
1973
  page,
1965
1974
  search,
1966
1975
  filtersOverride,
1967
- userId: (_a2 = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a2.id,
1976
+ userId: currentUserId,
1968
1977
  selectedWorkflowsListLength: selectedWorkflowsList == null ? void 0 : selectedWorkflowsList.length
1969
1978
  });
1970
- if (!((_b2 = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _b2.id)) {
1979
+ if (!currentUserId) {
1971
1980
  console.log("[DEBUG-FETCH-DATA] \u274C No userInfo.id, returning early");
1972
1981
  return;
1973
1982
  }
1974
- const currentFilters = filtersOverride || ((_c2 = tabs[tab]) == null ? void 0 : _c2.filters);
1983
+ const currentFilters = filtersOverride || ((_a2 = tabs[tab]) == null ? void 0 : _a2.filters);
1975
1984
  let filterQuery = "";
1976
1985
  if (currentFilters) {
1977
1986
  if (currentFilters.approvalType)
@@ -1990,11 +1999,11 @@ function ApprovalWorkflow({
1990
1999
  search
1991
2000
  )}${filterQuery}`;
1992
2001
  if (tab === "Assign To Me") {
1993
- url = `/workflow/activity-workflow/${userInfo.userInfo.id}?${query}&type=pending`;
2002
+ url = `/workflow/activity-workflow/${currentUserId}?${query}&type=pending`;
1994
2003
  } else if (tab === "All Requests") {
1995
- url = `/workflow/activity-workflow/${userInfo.userInfo.id}?${query}`;
2004
+ url = `/workflow/activity-workflow/${currentUserId}?${query}`;
1996
2005
  } else if (tab === "Completed") {
1997
- url = `/workflow/activity-workflow/${userInfo.userInfo.id}?${query}&type=completed`;
2006
+ url = `/workflow/activity-workflow/${currentUserId}?${query}&type=completed`;
1998
2007
  } else if (tab === "selected") {
1999
2008
  console.log("[DEBUG-SELECTED-TAB] \u{1F4CB} Selected tab logic triggered");
2000
2009
  console.log(
@@ -2094,7 +2103,7 @@ function ApprovalWorkflow({
2094
2103
  }));
2095
2104
  });
2096
2105
  },
2097
- [api, userInfo, selectedWorkflowsList, tabs]
2106
+ [api, currentUserId, selectedWorkflowsList, tabs]
2098
2107
  );
2099
2108
  const handleProfileToggle = (option) => {
2100
2109
  var _a2, _b2, _c2;
@@ -2166,17 +2175,17 @@ function ApprovalWorkflow({
2166
2175
  {
2167
2176
  label: "Assign To Me",
2168
2177
  icon: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "icon-document-forward" }),
2169
- count: ((_a = tabs["Assign To Me"]) == null ? void 0 : _a.count) || 0
2178
+ count: ((_c = tabs["Assign To Me"]) == null ? void 0 : _c.count) || 0
2170
2179
  },
2171
2180
  {
2172
2181
  label: "All Requests",
2173
2182
  icon: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "icon-document-copy" }),
2174
- count: ((_b = tabs["All Requests"]) == null ? void 0 : _b.count) || 0
2183
+ count: ((_d = tabs["All Requests"]) == null ? void 0 : _d.count) || 0
2175
2184
  },
2176
2185
  {
2177
2186
  label: "Completed",
2178
2187
  icon: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "icon-tick-circle" }),
2179
- count: ((_c = tabs["Completed"]) == null ? void 0 : _c.count) || 0
2188
+ count: ((_e = tabs["Completed"]) == null ? void 0 : _e.count) || 0
2180
2189
  }
2181
2190
  ];
2182
2191
  const fetchExpandedActivityLogs = (workflowLogId) => {
@@ -2187,17 +2196,16 @@ function ApprovalWorkflow({
2187
2196
  }).then((res) => setExpandedDetails(res == null ? void 0 : res.data));
2188
2197
  };
2189
2198
  React2.useEffect(() => {
2190
- var _a2;
2191
2199
  console.log("[DEBUG-INIT] \u{1F680} Initial useEffect triggered");
2192
2200
  console.log("[DEBUG-INIT] userInfo:", userInfo);
2193
2201
  console.log("[DEBUG-INIT] selectedWorkflowsList:", selectedWorkflowsList);
2194
- if ((_a2 = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a2.id) {
2202
+ if (currentUserId) {
2195
2203
  const tabsToFetch = (selectedWorkflowsList == null ? void 0 : selectedWorkflowsList.length) ? ["Assign To Me", "All Requests", "Completed", "selected"] : ["Assign To Me", "All Requests", "Completed"];
2196
2204
  console.log("[DEBUG-INIT] \u{1F4CB} Tabs to fetch:", tabsToFetch);
2197
2205
  console.log("[DEBUG-INIT] Current selectedOption:", selectedOption);
2198
2206
  tabsToFetch.forEach((tab) => {
2199
- var _a3;
2200
- if (!((_a3 = tabs[tab]) == null ? void 0 : _a3.initialized)) {
2207
+ var _a2;
2208
+ if (!((_a2 = tabs[tab]) == null ? void 0 : _a2.initialized)) {
2201
2209
  console.log(`[DEBUG-INIT] \u26A1 Fetching data for tab: ${tab}`);
2202
2210
  fetchData(tab, 1, "");
2203
2211
  } else {
@@ -2209,13 +2217,13 @@ function ApprovalWorkflow({
2209
2217
  } else {
2210
2218
  console.log("[DEBUG-INIT] \u274C No userInfo.id, skipping initial fetch");
2211
2219
  }
2212
- }, [userInfo]);
2220
+ }, [currentUserId]);
2213
2221
  React2.useEffect(() => {
2214
2222
  const tabState = tabs[selectedOption];
2215
2223
  if ((tabState == null ? void 0 : tabState.page) > 1) {
2216
2224
  fetchData(selectedOption, tabState.page, tabState.search);
2217
2225
  }
2218
- }, [(_d = tabs[selectedOption]) == null ? void 0 : _d.page]);
2226
+ }, [(_f = tabs[selectedOption]) == null ? void 0 : _f.page]);
2219
2227
  React2.useEffect(() => {
2220
2228
  var _a2;
2221
2229
  if (Object.keys(urlConfig).length > 0 && userInfo && tabs && tabs["Assign To Me"] && !tabs["Assign To Me"].initialized) {
@@ -2284,22 +2292,22 @@ function ApprovalWorkflow({
2284
2292
  (_f2 = tabs["Completed"]) == null ? void 0 : _f2.filters
2285
2293
  );
2286
2294
  };
2287
- if (((_e = tabs[selectedOption]) == null ? void 0 : _e.loading) && ((_f = tabs[selectedOption]) == null ? void 0 : _f.page) === 1 && loadingComponent)
2295
+ if (((_g = tabs[selectedOption]) == null ? void 0 : _g.loading) && ((_h = tabs[selectedOption]) == null ? void 0 : _h.page) === 1 && loadingComponent)
2288
2296
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: loadingComponent });
2289
2297
  console.log("[DEBUG-RENDER] \u{1F3A8} Rendering ApprovalWorkflow");
2290
2298
  console.log("[DEBUG-RENDER] selectedOption:", selectedOption);
2291
2299
  console.log("[DEBUG-RENDER] tabs[selectedOption]:", tabs[selectedOption]);
2292
2300
  console.log(
2293
2301
  "[DEBUG-RENDER] tabs[selectedOption]?.data:",
2294
- (_g = tabs[selectedOption]) == null ? void 0 : _g.data
2302
+ (_i = tabs[selectedOption]) == null ? void 0 : _i.data
2295
2303
  );
2296
2304
  console.log(
2297
2305
  "[DEBUG-RENDER] tabs[selectedOption]?.loading:",
2298
- (_h = tabs[selectedOption]) == null ? void 0 : _h.loading
2306
+ (_j = tabs[selectedOption]) == null ? void 0 : _j.loading
2299
2307
  );
2300
2308
  console.log(
2301
2309
  "[DEBUG-RENDER] tabs[selectedOption]?.initialized:",
2302
- (_i = tabs[selectedOption]) == null ? void 0 : _i.initialized
2310
+ (_k = tabs[selectedOption]) == null ? void 0 : _k.initialized
2303
2311
  );
2304
2312
  console.info("LIBRARY RUNNING...");
2305
2313
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -2490,7 +2498,7 @@ function ApprovalWorkflow({
2490
2498
  );
2491
2499
  }
2492
2500
  })(),
2493
- ((_j = tabs[selectedOption]) == null ? void 0 : _j.loading) && ((_k = tabs[selectedOption]) == null ? void 0 : _k.page) > 1 && /* @__PURE__ */ jsxRuntime.jsx(system.Box, { sx: { display: "flex", justifyContent: "center", p: 2 }, children: /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 24 }) })
2501
+ ((_l = tabs[selectedOption]) == null ? void 0 : _l.loading) && ((_m = tabs[selectedOption]) == null ? void 0 : _m.page) > 1 && /* @__PURE__ */ jsxRuntime.jsx(system.Box, { sx: { display: "flex", justifyContent: "center", p: 2 }, children: /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 24 }) })
2494
2502
  ]
2495
2503
  }
2496
2504
  )
@@ -2515,8 +2523,8 @@ function ApprovalWorkflow({
2515
2523
  openModal: !!approveTarget,
2516
2524
  closeModal: () => setApproveTarget(null),
2517
2525
  header: "Approve",
2518
- workflowLogId: (_l = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _l[0],
2519
- statusId: (_m = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _m[1],
2526
+ workflowLogId: (_n = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _n[0],
2527
+ statusId: (_o = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _o[1],
2520
2528
  onSuccess: () => callAllApi()
2521
2529
  }
2522
2530
  ),
@@ -2526,9 +2534,9 @@ function ApprovalWorkflow({
2526
2534
  openModal: !!rejectTarget,
2527
2535
  closeModal: () => setRejectTarget(null),
2528
2536
  header: "Reject",
2529
- workflowLogId: (_n = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _n[0],
2530
- statusId: (_o = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _o[1],
2531
- rejection_reason_master: (_p = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _p[2],
2537
+ workflowLogId: (_p = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _p[0],
2538
+ statusId: (_q = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _q[1],
2539
+ rejection_reason_master: (_r = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _r[2],
2532
2540
  onSuccess: () => callAllApi()
2533
2541
  }
2534
2542
  ),
@@ -2538,8 +2546,8 @@ function ApprovalWorkflow({
2538
2546
  openModal: !!onHoldTarget,
2539
2547
  closeModal: () => setOnHoldTarget(null),
2540
2548
  header: "On Hold",
2541
- workflowLogId: (_q = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _q[0],
2542
- statusId: (_r = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _r[1],
2549
+ workflowLogId: (_s = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _s[0],
2550
+ statusId: (_t = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _t[1],
2543
2551
  onSuccess: () => callAllApi()
2544
2552
  }
2545
2553
  ),
@@ -2610,7 +2618,7 @@ function ApprovalWorkflow({
2610
2618
  {
2611
2619
  open: isFilterOpen,
2612
2620
  onClose: () => setIsFilterOpen(false),
2613
- initialFilters: (_s = tabs[selectedOption]) == null ? void 0 : _s.filters,
2621
+ initialFilters: (_u = tabs[selectedOption]) == null ? void 0 : _u.filters,
2614
2622
  onApply: handleApplyFilter
2615
2623
  }
2616
2624
  )
@@ -2618,7 +2626,7 @@ function ApprovalWorkflow({
2618
2626
  }
2619
2627
 
2620
2628
  // package.json
2621
- var version = "0.1.34";
2629
+ var version = "0.1.35";
2622
2630
  function DialogOpener({
2623
2631
  openDialog,
2624
2632
  handleClose,