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.mjs
CHANGED
|
@@ -811,12 +811,15 @@ function ApprovalWorkflow({
|
|
|
811
811
|
},
|
|
812
812
|
[isLoading, selectedApprovalOtions]
|
|
813
813
|
);
|
|
814
|
-
const visibleAllRequests = filteredAllRequestArray.slice(
|
|
815
|
-
|
|
814
|
+
const visibleAllRequests = (filteredAllRequestArray || []).slice(
|
|
815
|
+
0,
|
|
816
|
+
visibleAll
|
|
817
|
+
);
|
|
818
|
+
const visiblePendingRequests = (filteredPendingRequestArray || []).slice(
|
|
816
819
|
0,
|
|
817
820
|
visiblePending
|
|
818
821
|
);
|
|
819
|
-
const visibleSelectedRequests = filteredSelectedRequestArray.slice(
|
|
822
|
+
const visibleSelectedRequests = (filteredSelectedRequestArray || []).slice(
|
|
820
823
|
0,
|
|
821
824
|
visibleSelected
|
|
822
825
|
);
|
|
@@ -893,12 +896,12 @@ function ApprovalWorkflow({
|
|
|
893
896
|
{
|
|
894
897
|
label: "Action Required",
|
|
895
898
|
icon: /* @__PURE__ */ jsx("span", { className: "icon-document-forward" }),
|
|
896
|
-
count: pendingRequestArray.length
|
|
899
|
+
count: pendingRequestArray ? pendingRequestArray.length : 0
|
|
897
900
|
},
|
|
898
901
|
{
|
|
899
902
|
label: "All Requests",
|
|
900
903
|
icon: /* @__PURE__ */ jsx("span", { className: "icon-document-copy" }),
|
|
901
|
-
count: allRequestArray.length
|
|
904
|
+
count: allRequestArray ? allRequestArray.length : 0
|
|
902
905
|
}
|
|
903
906
|
];
|
|
904
907
|
const fetchExpandedActivityLogs = (workflowLogId) => {
|
|
@@ -1905,7 +1908,15 @@ function DialogOpener({
|
|
|
1905
1908
|
}) {
|
|
1906
1909
|
const theme = useTheme();
|
|
1907
1910
|
useMediaQuery(theme.breakpoints.down("lg"));
|
|
1908
|
-
const [screenWidth, setScreenWidth] = useState(
|
|
1911
|
+
const [screenWidth, setScreenWidth] = useState(
|
|
1912
|
+
typeof window !== "undefined" ? window.innerWidth : 0
|
|
1913
|
+
);
|
|
1914
|
+
console.log("Dialog opener props", {
|
|
1915
|
+
openDialog,
|
|
1916
|
+
handleClose,
|
|
1917
|
+
userInfoData,
|
|
1918
|
+
selectedWorkflowsList
|
|
1919
|
+
});
|
|
1909
1920
|
useEffect(() => {
|
|
1910
1921
|
const updateScreenWidth = () => setScreenWidth(window.innerWidth);
|
|
1911
1922
|
window.addEventListener("resize", updateScreenWidth);
|
|
@@ -1918,18 +1929,37 @@ function DialogOpener({
|
|
|
1918
1929
|
open: openDialog,
|
|
1919
1930
|
onClose: () => handleClose && handleClose(),
|
|
1920
1931
|
"aria-labelledby": "responsive-dialog-title",
|
|
1921
|
-
sx: { zIndex:
|
|
1932
|
+
sx: { zIndex: 1234 },
|
|
1922
1933
|
children: [
|
|
1923
1934
|
/* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
1924
|
-
/* @__PURE__ */ jsx(
|
|
1925
|
-
|
|
1935
|
+
/* @__PURE__ */ jsx(
|
|
1936
|
+
IconButton,
|
|
1937
|
+
{
|
|
1938
|
+
onClick: handleClose,
|
|
1939
|
+
disableFocusRipple: true,
|
|
1940
|
+
disableRipple: true,
|
|
1941
|
+
sx: { float: "right" },
|
|
1942
|
+
children: /* @__PURE__ */ jsx(HighlightOffIcon, { style: { color: "#666666" } })
|
|
1943
|
+
}
|
|
1944
|
+
),
|
|
1945
|
+
/* @__PURE__ */ jsx(
|
|
1946
|
+
ApprovalWorkflow,
|
|
1947
|
+
{
|
|
1948
|
+
userInfo: userInfoData,
|
|
1949
|
+
selectedWorkflowsList
|
|
1950
|
+
}
|
|
1951
|
+
)
|
|
1926
1952
|
] }),
|
|
1927
1953
|
/* @__PURE__ */ jsx(DialogActions5, { children: /* @__PURE__ */ jsx(
|
|
1928
1954
|
Button7,
|
|
1929
1955
|
{
|
|
1930
1956
|
variant: "contained",
|
|
1931
1957
|
color: "primary",
|
|
1932
|
-
sx: {
|
|
1958
|
+
sx: {
|
|
1959
|
+
display: "flex",
|
|
1960
|
+
justifyContent: "flex-end",
|
|
1961
|
+
alignItems: "center"
|
|
1962
|
+
},
|
|
1933
1963
|
onClick: handleClose,
|
|
1934
1964
|
children: "Close"
|
|
1935
1965
|
}
|