amp-workflow-ui 0.1.17 → 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 +52 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +52 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -618,7 +618,8 @@ function SendBackDialog({
|
|
|
618
618
|
openModal,
|
|
619
619
|
closeModal,
|
|
620
620
|
header,
|
|
621
|
-
workflowLogId
|
|
621
|
+
workflowLogId,
|
|
622
|
+
onSuccess
|
|
622
623
|
}) {
|
|
623
624
|
const { userInfo, api } = useWorkflowContext();
|
|
624
625
|
const [comment, setComment] = React7.useState("");
|
|
@@ -725,6 +726,7 @@ function SendBackDialog({
|
|
|
725
726
|
setFileName("");
|
|
726
727
|
setLoading(false);
|
|
727
728
|
closeModal && closeModal();
|
|
729
|
+
onSuccess && onSuccess();
|
|
728
730
|
}
|
|
729
731
|
};
|
|
730
732
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -869,7 +871,8 @@ function ApproveDialog({
|
|
|
869
871
|
closeModal,
|
|
870
872
|
header,
|
|
871
873
|
workflowLogId,
|
|
872
|
-
statusId
|
|
874
|
+
statusId,
|
|
875
|
+
onSuccess
|
|
873
876
|
}) {
|
|
874
877
|
const { userInfo, api } = useWorkflowContext();
|
|
875
878
|
const theme = styles.useTheme();
|
|
@@ -921,6 +924,7 @@ function ApproveDialog({
|
|
|
921
924
|
setComment("");
|
|
922
925
|
setLoading(false);
|
|
923
926
|
closeModal && closeModal();
|
|
927
|
+
onSuccess && onSuccess();
|
|
924
928
|
}
|
|
925
929
|
};
|
|
926
930
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1030,7 +1034,8 @@ function RejectDialog({
|
|
|
1030
1034
|
header,
|
|
1031
1035
|
workflowLogId,
|
|
1032
1036
|
statusId,
|
|
1033
|
-
rejection_reason_master
|
|
1037
|
+
rejection_reason_master,
|
|
1038
|
+
onSuccess
|
|
1034
1039
|
}) {
|
|
1035
1040
|
const { userInfo, api } = useWorkflowContext();
|
|
1036
1041
|
const theme = styles.useTheme();
|
|
@@ -1122,6 +1127,7 @@ function RejectDialog({
|
|
|
1122
1127
|
setRejectReasons("");
|
|
1123
1128
|
setLoading(false);
|
|
1124
1129
|
closeModal && closeModal();
|
|
1130
|
+
onSuccess && onSuccess();
|
|
1125
1131
|
}
|
|
1126
1132
|
};
|
|
1127
1133
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1248,7 +1254,8 @@ function OnHoldDialog({
|
|
|
1248
1254
|
closeModal,
|
|
1249
1255
|
header,
|
|
1250
1256
|
workflowLogId,
|
|
1251
|
-
statusId
|
|
1257
|
+
statusId,
|
|
1258
|
+
onSuccess
|
|
1252
1259
|
}) {
|
|
1253
1260
|
const { userInfo, api } = useWorkflowContext();
|
|
1254
1261
|
const theme = styles.useTheme();
|
|
@@ -1300,6 +1307,7 @@ function OnHoldDialog({
|
|
|
1300
1307
|
setComment("");
|
|
1301
1308
|
closeModal && closeModal();
|
|
1302
1309
|
setLoading(false);
|
|
1310
|
+
onSuccess && onSuccess();
|
|
1303
1311
|
}
|
|
1304
1312
|
};
|
|
1305
1313
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -2267,7 +2275,16 @@ function ApprovalWorkflow({
|
|
|
2267
2275
|
openModal: !!sendDialog,
|
|
2268
2276
|
closeModal: () => setSendDialog(null),
|
|
2269
2277
|
header: "Send Back",
|
|
2270
|
-
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
|
+
}
|
|
2271
2288
|
}
|
|
2272
2289
|
),
|
|
2273
2290
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2277,7 +2294,16 @@ function ApprovalWorkflow({
|
|
|
2277
2294
|
closeModal: () => setApproveTarget(null),
|
|
2278
2295
|
header: "Approve",
|
|
2279
2296
|
workflowLogId: (_m = approveTarget == null ? void 0 : approveTarget.split("|")) == null ? void 0 : _m[0],
|
|
2280
|
-
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
|
+
}
|
|
2281
2307
|
}
|
|
2282
2308
|
),
|
|
2283
2309
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2288,7 +2314,16 @@ function ApprovalWorkflow({
|
|
|
2288
2314
|
header: "Reject",
|
|
2289
2315
|
workflowLogId: (_o = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _o[0],
|
|
2290
2316
|
statusId: (_p = rejectTarget == null ? void 0 : rejectTarget.split("|")) == null ? void 0 : _p[1],
|
|
2291
|
-
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
|
+
}
|
|
2292
2327
|
}
|
|
2293
2328
|
),
|
|
2294
2329
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2298,7 +2333,16 @@ function ApprovalWorkflow({
|
|
|
2298
2333
|
closeModal: () => setOnHoldTarget(null),
|
|
2299
2334
|
header: "On Hold",
|
|
2300
2335
|
workflowLogId: (_r = onHoldTarget == null ? void 0 : onHoldTarget.split("|")) == null ? void 0 : _r[0],
|
|
2301
|
-
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
|
+
}
|
|
2302
2346
|
}
|
|
2303
2347
|
),
|
|
2304
2348
|
/* @__PURE__ */ jsxRuntime.jsxs(
|