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.mjs CHANGED
@@ -312,9 +312,9 @@ function WorkflowRequestCard({
312
312
  const statusList = currentLevel ? currentLevel.status_list : [];
313
313
  const isCurrentUser = (id) => (userDetails == null ? void 0 : userDetails.id) !== void 0 && (userDetails == null ? void 0 : userDetails.id) !== null && String(id) === String(userDetails.id);
314
314
  const includesCurrentUser = (ids) => Array.isArray(ids) && ids.some((id) => isCurrentUser(id));
315
- 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(
316
- (parallelItem) => isCurrentUser(parallelItem == null ? void 0 : parallelItem.assigned_user) || includesCurrentUser(parallelItem == null ? void 0 : parallelItem.assignTo)
317
- ));
315
+ const canActOnCurrentLevel = Boolean(requestDetails == null ? void 0 : requestDetails.is_parallel) ? (_d = requestDetails == null ? void 0 : requestDetails.levels) == null ? void 0 : _d.some(
316
+ (level) => includesCurrentUser(level == null ? void 0 : level.assign_to) || includesCurrentUser(level == null ? void 0 : level.escalate_assign_to)
317
+ ) : includesCurrentUser(currentLevel == null ? void 0 : currentLevel.assign_to) || includesCurrentUser(currentLevel == null ? void 0 : currentLevel.escalate_assign_to);
318
318
  const filterRejectForLevelZero = (statusList2, info) => {
319
319
  if (!(info == null ? void 0 : info.isLevelZero)) return statusList2;
320
320
  return statusList2 == null ? void 0 : statusList2.filter((item) => item.status !== 3);
@@ -622,7 +622,9 @@ function SendBackDialog({
622
622
  workflowLogId,
623
623
  onSuccess
624
624
  }) {
625
+ var _a, _b;
625
626
  const { userInfo, api } = useWorkflowContext();
627
+ const currentUserId = (_b = (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id) != null ? _b : userInfo == null ? void 0 : userInfo.id;
626
628
  const [comment, setComment] = useState("");
627
629
  const [selectedFile, setSelectedFile] = useState(null);
628
630
  const [fileName, setFileName] = useState("");
@@ -637,8 +639,8 @@ function SendBackDialog({
637
639
  });
638
640
  const handleCloseSnackbar = () => setSnackbar((prev) => ({ ...prev, open: false }));
639
641
  const handleAttachment = () => {
640
- var _a;
641
- return (_a = fileInputRef.current) == null ? void 0 : _a.click();
642
+ var _a2;
643
+ return (_a2 = fileInputRef.current) == null ? void 0 : _a2.click();
642
644
  };
643
645
  const handleUpload = async (file) => {
644
646
  setFileLoading(true);
@@ -689,7 +691,7 @@ function SendBackDialog({
689
691
  return isValid;
690
692
  };
691
693
  const onSubmit = async () => {
692
- var _a, _b, _c, _d;
694
+ var _a2, _b2, _c;
693
695
  if (!validateFields()) return;
694
696
  setLoading(true);
695
697
  try {
@@ -698,7 +700,7 @@ function SendBackDialog({
698
700
  data: {
699
701
  comment,
700
702
  file: selectedFile,
701
- created_by: (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id
703
+ created_by: currentUserId
702
704
  },
703
705
  serviceURL: "api"
704
706
  });
@@ -712,14 +714,14 @@ function SendBackDialog({
712
714
  } else {
713
715
  setSnackbar({
714
716
  open: true,
715
- message: ((_b = res == null ? void 0 : res.error) == null ? void 0 : _b.message) || "Something went wrong. Try again.",
717
+ message: ((_a2 = res == null ? void 0 : res.error) == null ? void 0 : _a2.message) || "Something went wrong. Try again.",
716
718
  severity: "error"
717
719
  });
718
720
  }
719
721
  } catch (e) {
720
722
  setSnackbar({
721
723
  open: true,
722
- message: ((_d = (_c = e == null ? void 0 : e.response) == null ? void 0 : _c.data) == null ? void 0 : _d.message) || "Oops! Something went wrong.",
724
+ message: ((_c = (_b2 = e == null ? void 0 : e.response) == null ? void 0 : _b2.data) == null ? void 0 : _c.message) || "Oops! Something went wrong.",
723
725
  severity: "error"
724
726
  });
725
727
  } finally {
@@ -876,7 +878,9 @@ function ApproveDialog({
876
878
  statusId,
877
879
  onSuccess
878
880
  }) {
881
+ var _a, _b;
879
882
  const { userInfo, api } = useWorkflowContext();
883
+ const currentUserId = (_b = (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id) != null ? _b : userInfo == null ? void 0 : userInfo.id;
880
884
  const theme = useTheme$1();
881
885
  useMediaQuery(theme.breakpoints.down("lg"));
882
886
  const [comment, setComment] = useState("");
@@ -899,7 +903,7 @@ function ApproveDialog({
899
903
  return isValid;
900
904
  };
901
905
  const onSubmit = async () => {
902
- var _a, _b, _c;
906
+ var _a2, _b2;
903
907
  if (!validateFields()) return;
904
908
  setLoading(true);
905
909
  try {
@@ -907,15 +911,15 @@ function ApproveDialog({
907
911
  url: `/workflow/update-status/${workflowLogId}/${statusId}`,
908
912
  data: {
909
913
  comment,
910
- created_by: (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id
914
+ created_by: currentUserId
911
915
  },
912
916
  serviceURL: "api"
913
917
  }).then((res) => {
914
- var _a2, _b2;
918
+ var _a3, _b3;
915
919
  console.log("\u{1F680} ~ onSubmit ~ res:", res);
916
- ((_a2 = res == null ? void 0 : res.error) == null ? void 0 : _a2.status) == 500 ? setSnackbar({
920
+ ((_a3 = res == null ? void 0 : res.error) == null ? void 0 : _a3.status) == 500 ? setSnackbar({
917
921
  open: true,
918
- message: ((_b2 = res == null ? void 0 : res.error) == null ? void 0 : _b2.message) || "Something unexpected occurred!",
922
+ message: ((_b3 = res == null ? void 0 : res.error) == null ? void 0 : _b3.message) || "Something unexpected occurred!",
919
923
  severity: "error"
920
924
  }) : setSnackbar({
921
925
  open: true,
@@ -926,7 +930,7 @@ function ApproveDialog({
926
930
  } catch (e) {
927
931
  setSnackbar({
928
932
  open: true,
929
- message: ((_c = (_b = e == null ? void 0 : e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Something unexpected occurred!",
933
+ message: ((_b2 = (_a2 = e == null ? void 0 : e.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) || "Something unexpected occurred!",
930
934
  severity: "error"
931
935
  });
932
936
  } finally {
@@ -1046,15 +1050,17 @@ function RejectDialog({
1046
1050
  rejection_reason_master,
1047
1051
  onSuccess
1048
1052
  }) {
1053
+ var _a, _b;
1049
1054
  const { userInfo, api } = useWorkflowContext();
1055
+ const currentUserId = (_b = (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id) != null ? _b : userInfo == null ? void 0 : userInfo.id;
1050
1056
  const theme = useTheme$1();
1051
1057
  useMediaQuery(theme.breakpoints.down("lg"));
1052
1058
  const DownArrow = () => {
1053
- var _a;
1059
+ var _a2;
1054
1060
  return /* @__PURE__ */ jsx(
1055
1061
  "span",
1056
1062
  {
1057
- style: { color: ((_a = theme.palette.customColors) == null ? void 0 : _a.mainText) || "#333" },
1063
+ style: { color: ((_a2 = theme.palette.customColors) == null ? void 0 : _a2.mainText) || "#333" },
1058
1064
  className: "icon-arrow-down-1"
1059
1065
  }
1060
1066
  );
@@ -1072,14 +1078,14 @@ function RejectDialog({
1072
1078
  const handleCloseSnackbar = () => setSnackbar((prev) => ({ ...prev, open: false }));
1073
1079
  useEffect(() => {
1074
1080
  (async () => {
1075
- var _a;
1081
+ var _a2;
1076
1082
  try {
1077
1083
  if (!statusApplicableList.length) {
1078
1084
  const res = await api.get({
1079
1085
  url: `/workflow/applicableStatuses?type=${rejection_reason_master}`,
1080
1086
  serviceURL: "api"
1081
1087
  });
1082
- setStatusApplicableList(((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data) || []);
1088
+ setStatusApplicableList(((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.data) || []);
1083
1089
  }
1084
1090
  } catch (e) {
1085
1091
  setSnackbar({
@@ -1105,7 +1111,7 @@ function RejectDialog({
1105
1111
  return isValid;
1106
1112
  };
1107
1113
  const onSubmit = async () => {
1108
- var _a, _b, _c;
1114
+ var _a2, _b2;
1109
1115
  if (!validateFields()) return;
1110
1116
  setLoading(true);
1111
1117
  try {
@@ -1114,11 +1120,11 @@ function RejectDialog({
1114
1120
  data: {
1115
1121
  reason: rejectReasons,
1116
1122
  comment,
1117
- created_by: (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id
1123
+ created_by: currentUserId
1118
1124
  },
1119
1125
  serviceURL: "api"
1120
1126
  }).then((res) => {
1121
- var _a2;
1127
+ var _a3;
1122
1128
  console.log("\u{1F680} ~ onSubmit ~ res:", res);
1123
1129
  (res == null ? void 0 : res.status) == 200 ? setSnackbar({
1124
1130
  open: true,
@@ -1126,12 +1132,12 @@ function RejectDialog({
1126
1132
  severity: "success"
1127
1133
  }) : setSnackbar({
1128
1134
  open: true,
1129
- message: ((_a2 = res == null ? void 0 : res.error) == null ? void 0 : _a2.message) || "Something unexpected occurred!",
1135
+ message: ((_a3 = res == null ? void 0 : res.error) == null ? void 0 : _a3.message) || "Something unexpected occurred!",
1130
1136
  severity: "error"
1131
1137
  });
1132
1138
  });
1133
1139
  } catch (e) {
1134
- const message = ((_c = (_b = e == null ? void 0 : e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Something went wrong!";
1140
+ const message = ((_b2 = (_a2 = e == null ? void 0 : e.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) || "Something went wrong!";
1135
1141
  console.error("\u274C Reject Error:", message);
1136
1142
  setSnackbar({
1137
1143
  open: true,
@@ -1273,7 +1279,9 @@ function OnHoldDialog({
1273
1279
  statusId,
1274
1280
  onSuccess
1275
1281
  }) {
1282
+ var _a, _b;
1276
1283
  const { userInfo, api } = useWorkflowContext();
1284
+ const currentUserId = (_b = (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id) != null ? _b : userInfo == null ? void 0 : userInfo.id;
1277
1285
  const theme = useTheme$1();
1278
1286
  useMediaQuery(theme.breakpoints.down("lg"));
1279
1287
  const [comment, setComment] = useState("");
@@ -1296,7 +1304,7 @@ function OnHoldDialog({
1296
1304
  return isValid;
1297
1305
  };
1298
1306
  const onSubmit = async () => {
1299
- var _a, _b, _c;
1307
+ var _a2, _b2;
1300
1308
  if (!validateFields()) return;
1301
1309
  setLoading(true);
1302
1310
  try {
@@ -1304,7 +1312,7 @@ function OnHoldDialog({
1304
1312
  url: `/workflow/update-status/${workflowLogId}/${statusId}`,
1305
1313
  data: {
1306
1314
  comment,
1307
- created_by: (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id
1315
+ created_by: currentUserId
1308
1316
  },
1309
1317
  serviceURL: "api"
1310
1318
  });
@@ -1316,7 +1324,7 @@ function OnHoldDialog({
1316
1324
  } catch (e) {
1317
1325
  setSnackbar({
1318
1326
  open: true,
1319
- message: ((_c = (_b = e == null ? void 0 : e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to submit the form",
1327
+ message: ((_b2 = (_a2 = e == null ? void 0 : e.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) || "Failed to submit the form",
1320
1328
  severity: "error"
1321
1329
  });
1322
1330
  } finally {
@@ -1762,8 +1770,9 @@ function ApprovalWorkflow({
1762
1770
  selectedWorkflowsList = [],
1763
1771
  userInfo
1764
1772
  }) {
1765
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
1773
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
1766
1774
  useTheme();
1775
+ const currentUserId = (_b = (_a = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a.id) != null ? _b : userInfo == null ? void 0 : userInfo.id;
1767
1776
  const { api, urlBuilder, loadingComponent, ENV_VARIABLES } = useWorkflowContext();
1768
1777
  const [selectedOption, setSelectedOption] = useState(
1769
1778
  selectedWorkflowsList.length ? "selected" : "Assign To Me"
@@ -1944,20 +1953,20 @@ function ApprovalWorkflow({
1944
1953
  }, []);
1945
1954
  const fetchData = useCallback(
1946
1955
  (tab, page, search, filtersOverride) => {
1947
- var _a2, _b2, _c2;
1956
+ var _a2;
1948
1957
  console.log("[DEBUG-FETCH-DATA] \u{1F3AF} fetchData called with:", {
1949
1958
  tab,
1950
1959
  page,
1951
1960
  search,
1952
1961
  filtersOverride,
1953
- userId: (_a2 = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a2.id,
1962
+ userId: currentUserId,
1954
1963
  selectedWorkflowsListLength: selectedWorkflowsList == null ? void 0 : selectedWorkflowsList.length
1955
1964
  });
1956
- if (!((_b2 = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _b2.id)) {
1965
+ if (!currentUserId) {
1957
1966
  console.log("[DEBUG-FETCH-DATA] \u274C No userInfo.id, returning early");
1958
1967
  return;
1959
1968
  }
1960
- const currentFilters = filtersOverride || ((_c2 = tabs[tab]) == null ? void 0 : _c2.filters);
1969
+ const currentFilters = filtersOverride || ((_a2 = tabs[tab]) == null ? void 0 : _a2.filters);
1961
1970
  let filterQuery = "";
1962
1971
  if (currentFilters) {
1963
1972
  if (currentFilters.approvalType)
@@ -1976,11 +1985,11 @@ function ApprovalWorkflow({
1976
1985
  search
1977
1986
  )}${filterQuery}`;
1978
1987
  if (tab === "Assign To Me") {
1979
- url = `/workflow/activity-workflow/${userInfo.userInfo.id}?${query}&type=pending`;
1988
+ url = `/workflow/activity-workflow/${currentUserId}?${query}&type=pending`;
1980
1989
  } else if (tab === "All Requests") {
1981
- url = `/workflow/activity-workflow/${userInfo.userInfo.id}?${query}`;
1990
+ url = `/workflow/activity-workflow/${currentUserId}?${query}`;
1982
1991
  } else if (tab === "Completed") {
1983
- url = `/workflow/activity-workflow/${userInfo.userInfo.id}?${query}&type=completed`;
1992
+ url = `/workflow/activity-workflow/${currentUserId}?${query}&type=completed`;
1984
1993
  } else if (tab === "selected") {
1985
1994
  console.log("[DEBUG-SELECTED-TAB] \u{1F4CB} Selected tab logic triggered");
1986
1995
  console.log(
@@ -2080,7 +2089,7 @@ function ApprovalWorkflow({
2080
2089
  }));
2081
2090
  });
2082
2091
  },
2083
- [api, userInfo, selectedWorkflowsList, tabs]
2092
+ [api, currentUserId, selectedWorkflowsList, tabs]
2084
2093
  );
2085
2094
  const handleProfileToggle = (option) => {
2086
2095
  var _a2, _b2, _c2;
@@ -2152,17 +2161,17 @@ function ApprovalWorkflow({
2152
2161
  {
2153
2162
  label: "Assign To Me",
2154
2163
  icon: /* @__PURE__ */ jsx("span", { className: "icon-document-forward" }),
2155
- count: ((_a = tabs["Assign To Me"]) == null ? void 0 : _a.count) || 0
2164
+ count: ((_c = tabs["Assign To Me"]) == null ? void 0 : _c.count) || 0
2156
2165
  },
2157
2166
  {
2158
2167
  label: "All Requests",
2159
2168
  icon: /* @__PURE__ */ jsx("span", { className: "icon-document-copy" }),
2160
- count: ((_b = tabs["All Requests"]) == null ? void 0 : _b.count) || 0
2169
+ count: ((_d = tabs["All Requests"]) == null ? void 0 : _d.count) || 0
2161
2170
  },
2162
2171
  {
2163
2172
  label: "Completed",
2164
2173
  icon: /* @__PURE__ */ jsx("span", { className: "icon-tick-circle" }),
2165
- count: ((_c = tabs["Completed"]) == null ? void 0 : _c.count) || 0
2174
+ count: ((_e = tabs["Completed"]) == null ? void 0 : _e.count) || 0
2166
2175
  }
2167
2176
  ];
2168
2177
  const fetchExpandedActivityLogs = (workflowLogId) => {
@@ -2173,17 +2182,16 @@ function ApprovalWorkflow({
2173
2182
  }).then((res) => setExpandedDetails(res == null ? void 0 : res.data));
2174
2183
  };
2175
2184
  useEffect(() => {
2176
- var _a2;
2177
2185
  console.log("[DEBUG-INIT] \u{1F680} Initial useEffect triggered");
2178
2186
  console.log("[DEBUG-INIT] userInfo:", userInfo);
2179
2187
  console.log("[DEBUG-INIT] selectedWorkflowsList:", selectedWorkflowsList);
2180
- if ((_a2 = userInfo == null ? void 0 : userInfo.userInfo) == null ? void 0 : _a2.id) {
2188
+ if (currentUserId) {
2181
2189
  const tabsToFetch = (selectedWorkflowsList == null ? void 0 : selectedWorkflowsList.length) ? ["Assign To Me", "All Requests", "Completed", "selected"] : ["Assign To Me", "All Requests", "Completed"];
2182
2190
  console.log("[DEBUG-INIT] \u{1F4CB} Tabs to fetch:", tabsToFetch);
2183
2191
  console.log("[DEBUG-INIT] Current selectedOption:", selectedOption);
2184
2192
  tabsToFetch.forEach((tab) => {
2185
- var _a3;
2186
- if (!((_a3 = tabs[tab]) == null ? void 0 : _a3.initialized)) {
2193
+ var _a2;
2194
+ if (!((_a2 = tabs[tab]) == null ? void 0 : _a2.initialized)) {
2187
2195
  console.log(`[DEBUG-INIT] \u26A1 Fetching data for tab: ${tab}`);
2188
2196
  fetchData(tab, 1, "");
2189
2197
  } else {
@@ -2195,13 +2203,13 @@ function ApprovalWorkflow({
2195
2203
  } else {
2196
2204
  console.log("[DEBUG-INIT] \u274C No userInfo.id, skipping initial fetch");
2197
2205
  }
2198
- }, [userInfo]);
2206
+ }, [currentUserId]);
2199
2207
  useEffect(() => {
2200
2208
  const tabState = tabs[selectedOption];
2201
2209
  if ((tabState == null ? void 0 : tabState.page) > 1) {
2202
2210
  fetchData(selectedOption, tabState.page, tabState.search);
2203
2211
  }
2204
- }, [(_d = tabs[selectedOption]) == null ? void 0 : _d.page]);
2212
+ }, [(_f = tabs[selectedOption]) == null ? void 0 : _f.page]);
2205
2213
  useEffect(() => {
2206
2214
  var _a2;
2207
2215
  if (Object.keys(urlConfig).length > 0 && userInfo && tabs && tabs["Assign To Me"] && !tabs["Assign To Me"].initialized) {
@@ -2270,22 +2278,22 @@ function ApprovalWorkflow({
2270
2278
  (_f2 = tabs["Completed"]) == null ? void 0 : _f2.filters
2271
2279
  );
2272
2280
  };
2273
- if (((_e = tabs[selectedOption]) == null ? void 0 : _e.loading) && ((_f = tabs[selectedOption]) == null ? void 0 : _f.page) === 1 && loadingComponent)
2281
+ if (((_g = tabs[selectedOption]) == null ? void 0 : _g.loading) && ((_h = tabs[selectedOption]) == null ? void 0 : _h.page) === 1 && loadingComponent)
2274
2282
  return /* @__PURE__ */ jsx(Fragment, { children: loadingComponent });
2275
2283
  console.log("[DEBUG-RENDER] \u{1F3A8} Rendering ApprovalWorkflow");
2276
2284
  console.log("[DEBUG-RENDER] selectedOption:", selectedOption);
2277
2285
  console.log("[DEBUG-RENDER] tabs[selectedOption]:", tabs[selectedOption]);
2278
2286
  console.log(
2279
2287
  "[DEBUG-RENDER] tabs[selectedOption]?.data:",
2280
- (_g = tabs[selectedOption]) == null ? void 0 : _g.data
2288
+ (_i = tabs[selectedOption]) == null ? void 0 : _i.data
2281
2289
  );
2282
2290
  console.log(
2283
2291
  "[DEBUG-RENDER] tabs[selectedOption]?.loading:",
2284
- (_h = tabs[selectedOption]) == null ? void 0 : _h.loading
2292
+ (_j = tabs[selectedOption]) == null ? void 0 : _j.loading
2285
2293
  );
2286
2294
  console.log(
2287
2295
  "[DEBUG-RENDER] tabs[selectedOption]?.initialized:",
2288
- (_i = tabs[selectedOption]) == null ? void 0 : _i.initialized
2296
+ (_k = tabs[selectedOption]) == null ? void 0 : _k.initialized
2289
2297
  );
2290
2298
  console.info("LIBRARY RUNNING...");
2291
2299
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -2476,7 +2484,7 @@ function ApprovalWorkflow({
2476
2484
  );
2477
2485
  }
2478
2486
  })(),
2479
- ((_j = tabs[selectedOption]) == null ? void 0 : _j.loading) && ((_k = tabs[selectedOption]) == null ? void 0 : _k.page) > 1 && /* @__PURE__ */ jsx(Box$1, { sx: { display: "flex", justifyContent: "center", p: 2 }, children: /* @__PURE__ */ jsx(CircularProgress, { size: 24 }) })
2487
+ ((_l = tabs[selectedOption]) == null ? void 0 : _l.loading) && ((_m = tabs[selectedOption]) == null ? void 0 : _m.page) > 1 && /* @__PURE__ */ jsx(Box$1, { sx: { display: "flex", justifyContent: "center", p: 2 }, children: /* @__PURE__ */ jsx(CircularProgress, { size: 24 }) })
2480
2488
  ]
2481
2489
  }
2482
2490
  )
@@ -2501,8 +2509,8 @@ function ApprovalWorkflow({
2501
2509
  openModal: !!approveTarget,
2502
2510
  closeModal: () => setApproveTarget(null),
2503
2511
  header: "Approve",
2504
- workflowLogId: (_l = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _l[0],
2505
- statusId: (_m = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _m[1],
2512
+ workflowLogId: (_n = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _n[0],
2513
+ statusId: (_o = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _o[1],
2506
2514
  onSuccess: () => callAllApi()
2507
2515
  }
2508
2516
  ),
@@ -2512,9 +2520,9 @@ function ApprovalWorkflow({
2512
2520
  openModal: !!rejectTarget,
2513
2521
  closeModal: () => setRejectTarget(null),
2514
2522
  header: "Reject",
2515
- workflowLogId: (_n = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _n[0],
2516
- statusId: (_o = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _o[1],
2517
- rejection_reason_master: (_p = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _p[2],
2523
+ workflowLogId: (_p = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _p[0],
2524
+ statusId: (_q = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _q[1],
2525
+ rejection_reason_master: (_r = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _r[2],
2518
2526
  onSuccess: () => callAllApi()
2519
2527
  }
2520
2528
  ),
@@ -2524,8 +2532,8 @@ function ApprovalWorkflow({
2524
2532
  openModal: !!onHoldTarget,
2525
2533
  closeModal: () => setOnHoldTarget(null),
2526
2534
  header: "On Hold",
2527
- workflowLogId: (_q = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _q[0],
2528
- statusId: (_r = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _r[1],
2535
+ workflowLogId: (_s = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _s[0],
2536
+ statusId: (_t = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _t[1],
2529
2537
  onSuccess: () => callAllApi()
2530
2538
  }
2531
2539
  ),
@@ -2596,7 +2604,7 @@ function ApprovalWorkflow({
2596
2604
  {
2597
2605
  open: isFilterOpen,
2598
2606
  onClose: () => setIsFilterOpen(false),
2599
- initialFilters: (_s = tabs[selectedOption]) == null ? void 0 : _s.filters,
2607
+ initialFilters: (_u = tabs[selectedOption]) == null ? void 0 : _u.filters,
2600
2608
  onApply: handleApplyFilter
2601
2609
  }
2602
2610
  )
@@ -2604,7 +2612,7 @@ function ApprovalWorkflow({
2604
2612
  }
2605
2613
 
2606
2614
  // package.json
2607
- var version = "0.1.34";
2615
+ var version = "0.1.35";
2608
2616
  function DialogOpener({
2609
2617
  openDialog,
2610
2618
  handleClose,