amp-workflow-ui 0.1.4 → 0.1.5
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 +40 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -825,12 +825,15 @@ function ApprovalWorkflow({
|
|
|
825
825
|
},
|
|
826
826
|
[isLoading, selectedApprovalOtions]
|
|
827
827
|
);
|
|
828
|
-
const visibleAllRequests = filteredAllRequestArray.slice(
|
|
829
|
-
|
|
828
|
+
const visibleAllRequests = (filteredAllRequestArray || []).slice(
|
|
829
|
+
0,
|
|
830
|
+
visibleAll
|
|
831
|
+
);
|
|
832
|
+
const visiblePendingRequests = (filteredPendingRequestArray || []).slice(
|
|
830
833
|
0,
|
|
831
834
|
visiblePending
|
|
832
835
|
);
|
|
833
|
-
const visibleSelectedRequests = filteredSelectedRequestArray.slice(
|
|
836
|
+
const visibleSelectedRequests = (filteredSelectedRequestArray || []).slice(
|
|
834
837
|
0,
|
|
835
838
|
visibleSelected
|
|
836
839
|
);
|
|
@@ -907,12 +910,12 @@ function ApprovalWorkflow({
|
|
|
907
910
|
{
|
|
908
911
|
label: "Action Required",
|
|
909
912
|
icon: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "icon-document-forward" }),
|
|
910
|
-
count: pendingRequestArray.length
|
|
913
|
+
count: pendingRequestArray ? pendingRequestArray.length : 0
|
|
911
914
|
},
|
|
912
915
|
{
|
|
913
916
|
label: "All Requests",
|
|
914
917
|
icon: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "icon-document-copy" }),
|
|
915
|
-
count: allRequestArray.length
|
|
918
|
+
count: allRequestArray ? allRequestArray.length : 0
|
|
916
919
|
}
|
|
917
920
|
];
|
|
918
921
|
const fetchExpandedActivityLogs = (workflowLogId) => {
|
|
@@ -1919,7 +1922,15 @@ function DialogOpener({
|
|
|
1919
1922
|
}) {
|
|
1920
1923
|
const theme = styles.useTheme();
|
|
1921
1924
|
useMediaQuery__default.default(theme.breakpoints.down("lg"));
|
|
1922
|
-
const [screenWidth, setScreenWidth] = React7.useState(
|
|
1925
|
+
const [screenWidth, setScreenWidth] = React7.useState(
|
|
1926
|
+
typeof window !== "undefined" ? window.innerWidth : 0
|
|
1927
|
+
);
|
|
1928
|
+
console.log("Dialog opener props", {
|
|
1929
|
+
openDialog,
|
|
1930
|
+
handleClose,
|
|
1931
|
+
userInfoData,
|
|
1932
|
+
selectedWorkflowsList
|
|
1933
|
+
});
|
|
1923
1934
|
React7.useEffect(() => {
|
|
1924
1935
|
const updateScreenWidth = () => setScreenWidth(window.innerWidth);
|
|
1925
1936
|
window.addEventListener("resize", updateScreenWidth);
|
|
@@ -1932,18 +1943,37 @@ function DialogOpener({
|
|
|
1932
1943
|
open: openDialog,
|
|
1933
1944
|
onClose: () => handleClose && handleClose(),
|
|
1934
1945
|
"aria-labelledby": "responsive-dialog-title",
|
|
1935
|
-
sx: { zIndex:
|
|
1946
|
+
sx: { zIndex: 1234 },
|
|
1936
1947
|
children: [
|
|
1937
1948
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogContent__default.default, { children: [
|
|
1938
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1939
|
-
|
|
1949
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1950
|
+
material.IconButton,
|
|
1951
|
+
{
|
|
1952
|
+
onClick: handleClose,
|
|
1953
|
+
disableFocusRipple: true,
|
|
1954
|
+
disableRipple: true,
|
|
1955
|
+
sx: { float: "right" },
|
|
1956
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(HighlightOffIcon__default.default, { style: { color: "#666666" } })
|
|
1957
|
+
}
|
|
1958
|
+
),
|
|
1959
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1960
|
+
ApprovalWorkflow,
|
|
1961
|
+
{
|
|
1962
|
+
userInfo: userInfoData,
|
|
1963
|
+
selectedWorkflowsList
|
|
1964
|
+
}
|
|
1965
|
+
)
|
|
1940
1966
|
] }),
|
|
1941
1967
|
/* @__PURE__ */ jsxRuntime.jsx(DialogActions5__default.default, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1942
1968
|
Button7__default.default,
|
|
1943
1969
|
{
|
|
1944
1970
|
variant: "contained",
|
|
1945
1971
|
color: "primary",
|
|
1946
|
-
sx: {
|
|
1972
|
+
sx: {
|
|
1973
|
+
display: "flex",
|
|
1974
|
+
justifyContent: "flex-end",
|
|
1975
|
+
alignItems: "center"
|
|
1976
|
+
},
|
|
1947
1977
|
onClick: handleClose,
|
|
1948
1978
|
children: "Close"
|
|
1949
1979
|
}
|