amp-workflow-ui 0.1.16 → 0.1.18
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 +92 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +92 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -461,6 +461,22 @@ function WorkflowRequestCard({
|
|
|
461
461
|
),
|
|
462
462
|
arrow: true,
|
|
463
463
|
placement: "top",
|
|
464
|
+
componentsProps: {
|
|
465
|
+
tooltip: {
|
|
466
|
+
sx: {
|
|
467
|
+
backgroundColor: "#fff",
|
|
468
|
+
color: "#000",
|
|
469
|
+
boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
|
|
470
|
+
borderRadius: "6px",
|
|
471
|
+
p: 1
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
arrow: {
|
|
475
|
+
sx: {
|
|
476
|
+
color: "#fff"
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
},
|
|
464
480
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
465
481
|
material.Typography,
|
|
466
482
|
{
|
|
@@ -602,7 +618,8 @@ function SendBackDialog({
|
|
|
602
618
|
openModal,
|
|
603
619
|
closeModal,
|
|
604
620
|
header,
|
|
605
|
-
workflowLogId
|
|
621
|
+
workflowLogId,
|
|
622
|
+
onSuccess
|
|
606
623
|
}) {
|
|
607
624
|
const { userInfo, api } = useWorkflowContext();
|
|
608
625
|
const [comment, setComment] = React7.useState("");
|
|
@@ -709,6 +726,7 @@ function SendBackDialog({
|
|
|
709
726
|
setFileName("");
|
|
710
727
|
setLoading(false);
|
|
711
728
|
closeModal && closeModal();
|
|
729
|
+
onSuccess && onSuccess();
|
|
712
730
|
}
|
|
713
731
|
};
|
|
714
732
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -853,7 +871,8 @@ function ApproveDialog({
|
|
|
853
871
|
closeModal,
|
|
854
872
|
header,
|
|
855
873
|
workflowLogId,
|
|
856
|
-
statusId
|
|
874
|
+
statusId,
|
|
875
|
+
onSuccess
|
|
857
876
|
}) {
|
|
858
877
|
const { userInfo, api } = useWorkflowContext();
|
|
859
878
|
const theme = styles.useTheme();
|
|
@@ -905,6 +924,7 @@ function ApproveDialog({
|
|
|
905
924
|
setComment("");
|
|
906
925
|
setLoading(false);
|
|
907
926
|
closeModal && closeModal();
|
|
927
|
+
onSuccess && onSuccess();
|
|
908
928
|
}
|
|
909
929
|
};
|
|
910
930
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1014,7 +1034,8 @@ function RejectDialog({
|
|
|
1014
1034
|
header,
|
|
1015
1035
|
workflowLogId,
|
|
1016
1036
|
statusId,
|
|
1017
|
-
rejection_reason_master
|
|
1037
|
+
rejection_reason_master,
|
|
1038
|
+
onSuccess
|
|
1018
1039
|
}) {
|
|
1019
1040
|
const { userInfo, api } = useWorkflowContext();
|
|
1020
1041
|
const theme = styles.useTheme();
|
|
@@ -1106,6 +1127,7 @@ function RejectDialog({
|
|
|
1106
1127
|
setRejectReasons("");
|
|
1107
1128
|
setLoading(false);
|
|
1108
1129
|
closeModal && closeModal();
|
|
1130
|
+
onSuccess && onSuccess();
|
|
1109
1131
|
}
|
|
1110
1132
|
};
|
|
1111
1133
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1232,7 +1254,8 @@ function OnHoldDialog({
|
|
|
1232
1254
|
closeModal,
|
|
1233
1255
|
header,
|
|
1234
1256
|
workflowLogId,
|
|
1235
|
-
statusId
|
|
1257
|
+
statusId,
|
|
1258
|
+
onSuccess
|
|
1236
1259
|
}) {
|
|
1237
1260
|
const { userInfo, api } = useWorkflowContext();
|
|
1238
1261
|
const theme = styles.useTheme();
|
|
@@ -1284,6 +1307,7 @@ function OnHoldDialog({
|
|
|
1284
1307
|
setComment("");
|
|
1285
1308
|
closeModal && closeModal();
|
|
1286
1309
|
setLoading(false);
|
|
1310
|
+
onSuccess && onSuccess();
|
|
1287
1311
|
}
|
|
1288
1312
|
};
|
|
1289
1313
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1414,6 +1438,12 @@ var SearchBox = ({
|
|
|
1414
1438
|
placeholder: placeHolderTitle,
|
|
1415
1439
|
autoComplete: "off",
|
|
1416
1440
|
className: "custom-search",
|
|
1441
|
+
sx: {
|
|
1442
|
+
"& .MuiOutlinedInput-root": {
|
|
1443
|
+
height: "38px",
|
|
1444
|
+
borderRadius: "20px"
|
|
1445
|
+
}
|
|
1446
|
+
},
|
|
1417
1447
|
InputProps: {
|
|
1418
1448
|
startAdornment: /* @__PURE__ */ jsxRuntime.jsx(material.InputAdornment, { position: "start", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "icon-search-normal-1" }) }),
|
|
1419
1449
|
endAdornment: searchText ? /* @__PURE__ */ jsxRuntime.jsx(material.InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1656,8 +1686,8 @@ function FilterButton({ onClick }) {
|
|
|
1656
1686
|
variant: "contained",
|
|
1657
1687
|
startIcon: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.FilterAlt, { sx: { fontSize: "18px" } }),
|
|
1658
1688
|
sx: {
|
|
1659
|
-
backgroundColor: "#f4f0ef",
|
|
1660
|
-
color: "#666",
|
|
1689
|
+
backgroundColor: "#f4f0ef !important",
|
|
1690
|
+
color: "#666 !important",
|
|
1661
1691
|
fontFamily: "Poppins, sans-serif",
|
|
1662
1692
|
fontWeight: 500,
|
|
1663
1693
|
fontSize: "14px",
|
|
@@ -1672,7 +1702,7 @@ function FilterButton({ onClick }) {
|
|
|
1672
1702
|
gap: "8px",
|
|
1673
1703
|
boxShadow: "none",
|
|
1674
1704
|
"&:hover": {
|
|
1675
|
-
backgroundColor: "#ebe7e6",
|
|
1705
|
+
backgroundColor: "#ebe7e6 !important",
|
|
1676
1706
|
boxShadow: "none"
|
|
1677
1707
|
},
|
|
1678
1708
|
"&:active": {
|
|
@@ -1789,7 +1819,7 @@ function ApprovalWorkflow({
|
|
|
1789
1819
|
}, [selectedOption]);
|
|
1790
1820
|
React7.useEffect(() => {
|
|
1791
1821
|
var _a2, _b2;
|
|
1792
|
-
if (debouncedSearchTerm !== tabs[selectedOption].search) {
|
|
1822
|
+
if (debouncedSearchTerm !== tabs[selectedOption].search && ((_a2 = tabs[selectedOption]) == null ? void 0 : _a2.initialized)) {
|
|
1793
1823
|
setTabs((prev) => ({
|
|
1794
1824
|
...prev,
|
|
1795
1825
|
[selectedOption]: {
|
|
@@ -1801,16 +1831,14 @@ function ApprovalWorkflow({
|
|
|
1801
1831
|
// Clear data on new search
|
|
1802
1832
|
}
|
|
1803
1833
|
}));
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
);
|
|
1811
|
-
}
|
|
1834
|
+
fetchData(
|
|
1835
|
+
selectedOption,
|
|
1836
|
+
1,
|
|
1837
|
+
debouncedSearchTerm,
|
|
1838
|
+
(_b2 = tabs[selectedOption]) == null ? void 0 : _b2.filters
|
|
1839
|
+
);
|
|
1812
1840
|
}
|
|
1813
|
-
}, [debouncedSearchTerm
|
|
1841
|
+
}, [debouncedSearchTerm]);
|
|
1814
1842
|
const handleClearSearch = React7.useCallback(() => {
|
|
1815
1843
|
setSearchText("");
|
|
1816
1844
|
}, []);
|
|
@@ -2095,7 +2123,13 @@ function ApprovalWorkflow({
|
|
|
2095
2123
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2096
2124
|
system.Box,
|
|
2097
2125
|
{
|
|
2098
|
-
sx: {
|
|
2126
|
+
sx: {
|
|
2127
|
+
width: "1141px",
|
|
2128
|
+
maxWidth: "1141px",
|
|
2129
|
+
minWidth: "1141px",
|
|
2130
|
+
height: "100%",
|
|
2131
|
+
overflow: "hidden !important"
|
|
2132
|
+
},
|
|
2099
2133
|
children: [
|
|
2100
2134
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2101
2135
|
system.Box,
|
|
@@ -2241,7 +2275,16 @@ function ApprovalWorkflow({
|
|
|
2241
2275
|
openModal: !!sendDialog,
|
|
2242
2276
|
closeModal: () => setSendDialog(null),
|
|
2243
2277
|
header: "Send Back",
|
|
2244
|
-
workflowLogId: sendDialog || ""
|
|
2278
|
+
workflowLogId: sendDialog || "",
|
|
2279
|
+
onSuccess: () => {
|
|
2280
|
+
var _a2, _b2;
|
|
2281
|
+
return fetchData(
|
|
2282
|
+
selectedOption,
|
|
2283
|
+
1,
|
|
2284
|
+
(_a2 = tabs[selectedOption]) == null ? void 0 : _a2.search,
|
|
2285
|
+
(_b2 = tabs[selectedOption]) == null ? void 0 : _b2.filters
|
|
2286
|
+
);
|
|
2287
|
+
}
|
|
2245
2288
|
}
|
|
2246
2289
|
),
|
|
2247
2290
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2251,7 +2294,16 @@ function ApprovalWorkflow({
|
|
|
2251
2294
|
closeModal: () => setApproveTarget(null),
|
|
2252
2295
|
header: "Approve",
|
|
2253
2296
|
workflowLogId: (_m = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _m[0],
|
|
2254
|
-
statusId: (_n = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _n[1]
|
|
2297
|
+
statusId: (_n = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _n[1],
|
|
2298
|
+
onSuccess: () => {
|
|
2299
|
+
var _a2, _b2;
|
|
2300
|
+
return fetchData(
|
|
2301
|
+
selectedOption,
|
|
2302
|
+
1,
|
|
2303
|
+
(_a2 = tabs[selectedOption]) == null ? void 0 : _a2.search,
|
|
2304
|
+
(_b2 = tabs[selectedOption]) == null ? void 0 : _b2.filters
|
|
2305
|
+
);
|
|
2306
|
+
}
|
|
2255
2307
|
}
|
|
2256
2308
|
),
|
|
2257
2309
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2262,7 +2314,16 @@ function ApprovalWorkflow({
|
|
|
2262
2314
|
header: "Reject",
|
|
2263
2315
|
workflowLogId: (_o = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _o[0],
|
|
2264
2316
|
statusId: (_p = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _p[1],
|
|
2265
|
-
rejection_reason_master: (_q = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _q[2]
|
|
2317
|
+
rejection_reason_master: (_q = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _q[2],
|
|
2318
|
+
onSuccess: () => {
|
|
2319
|
+
var _a2, _b2;
|
|
2320
|
+
return fetchData(
|
|
2321
|
+
selectedOption,
|
|
2322
|
+
1,
|
|
2323
|
+
(_a2 = tabs[selectedOption]) == null ? void 0 : _a2.search,
|
|
2324
|
+
(_b2 = tabs[selectedOption]) == null ? void 0 : _b2.filters
|
|
2325
|
+
);
|
|
2326
|
+
}
|
|
2266
2327
|
}
|
|
2267
2328
|
),
|
|
2268
2329
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2272,7 +2333,16 @@ function ApprovalWorkflow({
|
|
|
2272
2333
|
closeModal: () => setOnHoldTarget(null),
|
|
2273
2334
|
header: "On Hold",
|
|
2274
2335
|
workflowLogId: (_r = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _r[0],
|
|
2275
|
-
statusId: (_s = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _s[1]
|
|
2336
|
+
statusId: (_s = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _s[1],
|
|
2337
|
+
onSuccess: () => {
|
|
2338
|
+
var _a2, _b2;
|
|
2339
|
+
return fetchData(
|
|
2340
|
+
selectedOption,
|
|
2341
|
+
1,
|
|
2342
|
+
(_a2 = tabs[selectedOption]) == null ? void 0 : _a2.search,
|
|
2343
|
+
(_b2 = tabs[selectedOption]) == null ? void 0 : _b2.filters
|
|
2344
|
+
);
|
|
2345
|
+
}
|
|
2276
2346
|
}
|
|
2277
2347
|
),
|
|
2278
2348
|
/* @__PURE__ */ jsxRuntime.jsxs(
|