flowcore-fn 10.3.2 → 10.3.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/pkg-index.css +0 -30
- package/dist/pkg-index.js +1175 -820
- package/dist/pkg-index.mjs +1183 -828
- package/package.json +1 -1
package/dist/pkg-index.js
CHANGED
|
@@ -4865,21 +4865,24 @@ var lookupEndpoint = (name, fallback) => {
|
|
|
4865
4865
|
}
|
|
4866
4866
|
};
|
|
4867
4867
|
function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
|
|
4868
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
|
|
4868
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K;
|
|
4869
4869
|
const [formData, setFormData] = (0, import_react20.useState)({
|
|
4870
4870
|
workflowTypeId: String((_b = (_a = editData == null ? void 0 : editData.workflowTypeId) != null ? _a : editData == null ? void 0 : editData.WorkflowTypeId) != null ? _b : ""),
|
|
4871
4871
|
workflow: String((_d = (_c = editData == null ? void 0 : editData.workflowId) != null ? _c : editData == null ? void 0 : editData.WorkflowId) != null ? _d : ""),
|
|
4872
4872
|
fromStep: String((_h = (_g = (_f = (_e = editData == null ? void 0 : editData.fromWorkflowStepId) != null ? _e : editData == null ? void 0 : editData.FromWorkflowStepId) != null ? _f : editData == null ? void 0 : editData.fromStepId) != null ? _g : editData == null ? void 0 : editData.FromStepId) != null ? _h : ""),
|
|
4873
4873
|
toStep: String((_l = (_k = (_j = (_i = editData == null ? void 0 : editData.toWorkflowStepId) != null ? _i : editData == null ? void 0 : editData.ToWorkflowStepId) != null ? _j : editData == null ? void 0 : editData.toStepId) != null ? _k : editData == null ? void 0 : editData.ToStepId) != null ? _l : ""),
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
isDefault: Boolean((
|
|
4878
|
-
requireComment: Boolean((
|
|
4879
|
-
status: ((
|
|
4874
|
+
returnToApplicant: Boolean((_s = (_o = (_n = (_m = editData == null ? void 0 : editData.isReturnToApplicant) != null ? _m : editData == null ? void 0 : editData.IsReturnToApplicant) != null ? _n : editData == null ? void 0 : editData.returnToApplicant) != null ? _o : editData == null ? void 0 : editData.ReturnToApplicant) != null ? _s : Number((_r = (_q = (_p = editData == null ? void 0 : editData.toWorkflowStepId) != null ? _p : editData == null ? void 0 : editData.ToWorkflowStepId) != null ? _q : editData == null ? void 0 : editData.toStepId) != null ? _r : editData == null ? void 0 : editData.ToStepId) === 0),
|
|
4875
|
+
actionCode: (_u = (_t = editData == null ? void 0 : editData.actionCode) != null ? _t : editData == null ? void 0 : editData.ActionCode) != null ? _u : "",
|
|
4876
|
+
actionName: (_w = (_v = editData == null ? void 0 : editData.actionName) != null ? _v : editData == null ? void 0 : editData.ActionName) != null ? _w : "",
|
|
4877
|
+
isDefault: Boolean((_y = (_x = editData == null ? void 0 : editData.isDefault) != null ? _x : editData == null ? void 0 : editData.IsDefault) != null ? _y : false),
|
|
4878
|
+
requireComment: Boolean((_A = (_z = editData == null ? void 0 : editData.requireComment) != null ? _z : editData == null ? void 0 : editData.RequireComment) != null ? _A : false),
|
|
4879
|
+
status: ((_C = (_B = editData == null ? void 0 : editData.isActive) != null ? _B : editData == null ? void 0 : editData.IsActive) != null ? _C : true) ? "active" : "inactive"
|
|
4880
4880
|
});
|
|
4881
4881
|
const [errors, setErrors] = (0, import_react20.useState)({});
|
|
4882
4882
|
const [isSubmitting, setIsSubmitting] = (0, import_react20.useState)(false);
|
|
4883
|
+
const [availableActions, setAvailableActions] = (0, import_react20.useState)([]);
|
|
4884
|
+
const [loadingActions, setLoadingActions] = (0, import_react20.useState)(false);
|
|
4885
|
+
const [actionFetchError, setActionFetchError] = (0, import_react20.useState)("");
|
|
4883
4886
|
const [workflowTypes, setWorkflowTypes] = (0, import_react20.useState)([]);
|
|
4884
4887
|
const [loadingWorkflowTypes, setLoadingWorkflowTypes] = (0, import_react20.useState)(false);
|
|
4885
4888
|
const [workflowTypeFetchError, setWorkflowTypeFetchError] = (0, import_react20.useState)("");
|
|
@@ -4960,19 +4963,19 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
|
|
|
4960
4963
|
};
|
|
4961
4964
|
}, [formData.workflowTypeId]);
|
|
4962
4965
|
(0, import_react20.useEffect)(() => {
|
|
4963
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v2, _w2, _x2;
|
|
4966
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v2, _w2, _x2, _y2, _z2, _A2, _B2, _C2;
|
|
4964
4967
|
if (editData) {
|
|
4965
4968
|
setFormData({
|
|
4966
4969
|
workflowTypeId: String((_b2 = (_a2 = editData == null ? void 0 : editData.workflowTypeId) != null ? _a2 : editData == null ? void 0 : editData.WorkflowTypeId) != null ? _b2 : ""),
|
|
4967
4970
|
workflow: String((_d2 = (_c2 = editData == null ? void 0 : editData.workflowId) != null ? _c2 : editData == null ? void 0 : editData.WorkflowId) != null ? _d2 : ""),
|
|
4968
4971
|
fromStep: String((_h2 = (_g2 = (_f2 = (_e2 = editData == null ? void 0 : editData.fromWorkflowStepId) != null ? _e2 : editData == null ? void 0 : editData.FromWorkflowStepId) != null ? _f2 : editData == null ? void 0 : editData.fromStepId) != null ? _g2 : editData == null ? void 0 : editData.FromStepId) != null ? _h2 : ""),
|
|
4969
4972
|
toStep: String((_l2 = (_k2 = (_j2 = (_i2 = editData == null ? void 0 : editData.toWorkflowStepId) != null ? _i2 : editData == null ? void 0 : editData.ToWorkflowStepId) != null ? _j2 : editData == null ? void 0 : editData.toStepId) != null ? _k2 : editData == null ? void 0 : editData.ToStepId) != null ? _l2 : ""),
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
isDefault: Boolean((
|
|
4974
|
-
requireComment: Boolean((
|
|
4975
|
-
status: ((
|
|
4973
|
+
returnToApplicant: Boolean((_s2 = (_o2 = (_n2 = (_m2 = editData == null ? void 0 : editData.isReturnToApplicant) != null ? _m2 : editData == null ? void 0 : editData.IsReturnToApplicant) != null ? _n2 : editData == null ? void 0 : editData.returnToApplicant) != null ? _o2 : editData == null ? void 0 : editData.ReturnToApplicant) != null ? _s2 : Number((_r2 = (_q2 = (_p2 = editData == null ? void 0 : editData.toWorkflowStepId) != null ? _p2 : editData == null ? void 0 : editData.ToWorkflowStepId) != null ? _q2 : editData == null ? void 0 : editData.toStepId) != null ? _r2 : editData == null ? void 0 : editData.ToStepId) === 0),
|
|
4974
|
+
actionCode: (_u2 = (_t2 = editData == null ? void 0 : editData.actionCode) != null ? _t2 : editData == null ? void 0 : editData.ActionCode) != null ? _u2 : "",
|
|
4975
|
+
actionName: (_w2 = (_v2 = editData == null ? void 0 : editData.actionName) != null ? _v2 : editData == null ? void 0 : editData.ActionName) != null ? _w2 : "",
|
|
4976
|
+
isDefault: Boolean((_y2 = (_x2 = editData == null ? void 0 : editData.isDefault) != null ? _x2 : editData == null ? void 0 : editData.IsDefault) != null ? _y2 : false),
|
|
4977
|
+
requireComment: Boolean((_A2 = (_z2 = editData == null ? void 0 : editData.requireComment) != null ? _z2 : editData == null ? void 0 : editData.RequireComment) != null ? _A2 : false),
|
|
4978
|
+
status: ((_C2 = (_B2 = editData == null ? void 0 : editData.isActive) != null ? _B2 : editData == null ? void 0 : editData.IsActive) != null ? _C2 : true) ? "active" : "inactive"
|
|
4976
4979
|
});
|
|
4977
4980
|
setErrors({});
|
|
4978
4981
|
}
|
|
@@ -5029,6 +5032,60 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
|
|
|
5029
5032
|
active = false;
|
|
5030
5033
|
};
|
|
5031
5034
|
}, [formData.workflow]);
|
|
5035
|
+
(0, import_react20.useEffect)(() => {
|
|
5036
|
+
if (!formData.fromStep) {
|
|
5037
|
+
setAvailableActions([]);
|
|
5038
|
+
setActionFetchError("");
|
|
5039
|
+
setLoadingActions(false);
|
|
5040
|
+
setFormData((current) => __spreadProps(__spreadValues({}, current), { actionCode: "", actionName: "" }));
|
|
5041
|
+
return void 0;
|
|
5042
|
+
}
|
|
5043
|
+
let active = true;
|
|
5044
|
+
const loadActions = async () => {
|
|
5045
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
5046
|
+
setAvailableActions([]);
|
|
5047
|
+
setActionFetchError("");
|
|
5048
|
+
setLoadingActions(true);
|
|
5049
|
+
try {
|
|
5050
|
+
const flowCore = (_b2 = (_a2 = getApiEndpoints()) == null ? void 0 : _a2.flowCore) != null ? _b2 : {};
|
|
5051
|
+
const endpoint2 = (_d2 = (_c2 = flowCore.inbox) == null ? void 0 : _c2.GetPermisiionLabelWithCodeAll) != null ? _d2 : "/api/flowcore/StepPermission/GetByWorkflowStepId";
|
|
5052
|
+
const url = typeof endpoint2 === "function" ? endpoint2() : String(endpoint2);
|
|
5053
|
+
const actions = rowsFrom(
|
|
5054
|
+
await getApiService().get(url)
|
|
5055
|
+
).map(({ name }) => ({ name })).filter((action) => action.name);
|
|
5056
|
+
if (!active) return;
|
|
5057
|
+
setAvailableActions(actions);
|
|
5058
|
+
setFormData((current) => {
|
|
5059
|
+
var _a3, _b3;
|
|
5060
|
+
const currentActionValues = [current.actionCode, current.actionName].filter(Boolean).map((value) => String(value).trim().toUpperCase());
|
|
5061
|
+
const selectedAction = actions.find((action) => {
|
|
5062
|
+
const actionName = String(action.name).trim().toUpperCase();
|
|
5063
|
+
return currentActionValues.includes(actionName);
|
|
5064
|
+
});
|
|
5065
|
+
const defaultAction = selectedAction != null ? selectedAction : !editData ? actions[0] : null;
|
|
5066
|
+
return __spreadProps(__spreadValues({}, current), {
|
|
5067
|
+
actionCode: (_a3 = defaultAction == null ? void 0 : defaultAction.name) != null ? _a3 : current.actionCode,
|
|
5068
|
+
actionName: (_b3 = defaultAction == null ? void 0 : defaultAction.name) != null ? _b3 : current.actionName
|
|
5069
|
+
});
|
|
5070
|
+
});
|
|
5071
|
+
if (actions.length === 0) {
|
|
5072
|
+
setActionFetchError("No actions are available for the selected From Step.");
|
|
5073
|
+
}
|
|
5074
|
+
} catch (error) {
|
|
5075
|
+
if (active) {
|
|
5076
|
+
setActionFetchError(
|
|
5077
|
+
((_f2 = (_e2 = error == null ? void 0 : error.response) == null ? void 0 : _e2.data) == null ? void 0 : _f2.message) || (error == null ? void 0 : error.message) || "Unable to load actions for the selected From Step."
|
|
5078
|
+
);
|
|
5079
|
+
}
|
|
5080
|
+
} finally {
|
|
5081
|
+
if (active) setLoadingActions(false);
|
|
5082
|
+
}
|
|
5083
|
+
};
|
|
5084
|
+
loadActions();
|
|
5085
|
+
return () => {
|
|
5086
|
+
active = false;
|
|
5087
|
+
};
|
|
5088
|
+
}, [formData.fromStep]);
|
|
5032
5089
|
(0, import_react20.useEffect)(() => {
|
|
5033
5090
|
const handleKeyDown = (e) => {
|
|
5034
5091
|
if (e.key === "Escape") {
|
|
@@ -5042,10 +5099,23 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
|
|
|
5042
5099
|
const filteredSteps = workflowSteps;
|
|
5043
5100
|
const handleChange = (field, value) => {
|
|
5044
5101
|
let sanitized = value;
|
|
5045
|
-
if (field === "
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5102
|
+
if (field === "returnToApplicant") {
|
|
5103
|
+
setFormData((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
5104
|
+
returnToApplicant: Boolean(value),
|
|
5105
|
+
toStep: value ? "0" : prev.toStep === "0" ? "" : prev.toStep
|
|
5106
|
+
}));
|
|
5107
|
+
if (errors.toStep) setErrors((prev) => __spreadProps(__spreadValues({}, prev), { toStep: "" }));
|
|
5108
|
+
return;
|
|
5109
|
+
}
|
|
5110
|
+
if (field === "fromStep") {
|
|
5111
|
+
setFormData((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
5112
|
+
fromStep: sanitized,
|
|
5113
|
+
actionCode: "",
|
|
5114
|
+
actionName: ""
|
|
5115
|
+
}));
|
|
5116
|
+
if (errors.fromStep) setErrors((prev) => __spreadProps(__spreadValues({}, prev), { fromStep: "" }));
|
|
5117
|
+
if (errors.actionName) setErrors((prev) => __spreadProps(__spreadValues({}, prev), { actionName: "" }));
|
|
5118
|
+
return;
|
|
5049
5119
|
}
|
|
5050
5120
|
if (field === "workflowTypeId") {
|
|
5051
5121
|
setFormData((prev) => {
|
|
@@ -5105,11 +5175,9 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
|
|
|
5105
5175
|
if (!formData.workflowTypeId) newErrors.workflowTypeId = "Workflow Type is required.";
|
|
5106
5176
|
if (!formData.workflow) newErrors.workflow = "Workflow is required.";
|
|
5107
5177
|
if (!formData.fromStep) newErrors.fromStep = "From Step is required.";
|
|
5108
|
-
if (!formData.toStep) newErrors.toStep = "To Step is required.";
|
|
5109
|
-
if (!formData.actionCode.trim()
|
|
5110
|
-
|
|
5111
|
-
if (!formData.sequenceNo || isNaN(Number(formData.sequenceNo)) || Number(formData.sequenceNo) <= 0) {
|
|
5112
|
-
newErrors.sequenceNo = "Sequence number must be at least 1.";
|
|
5178
|
+
if (!formData.returnToApplicant && !formData.toStep) newErrors.toStep = "To Step is required.";
|
|
5179
|
+
if (!formData.actionCode.trim() || !formData.actionName.trim()) {
|
|
5180
|
+
newErrors.actionName = "Action Name is required.";
|
|
5113
5181
|
}
|
|
5114
5182
|
setErrors(newErrors);
|
|
5115
5183
|
return Object.keys(newErrors).length === 0;
|
|
@@ -5124,10 +5192,10 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
|
|
|
5124
5192
|
workflowTypeId: Number(formData.workflowTypeId) || 0,
|
|
5125
5193
|
workflowId: Number(formData.workflow),
|
|
5126
5194
|
fromWorkflowStepId: Number(formData.fromStep),
|
|
5127
|
-
toWorkflowStepId: Number(formData.toStep),
|
|
5128
|
-
actionCode: formData.actionCode.trim()
|
|
5195
|
+
toWorkflowStepId: formData.returnToApplicant ? 0 : Number(formData.toStep),
|
|
5196
|
+
actionCode: formData.actionCode.trim(),
|
|
5129
5197
|
actionName: formData.actionName.trim(),
|
|
5130
|
-
|
|
5198
|
+
isReturnToApplicant: Boolean(formData.returnToApplicant),
|
|
5131
5199
|
isDefault: Boolean(formData.isDefault),
|
|
5132
5200
|
requireComment: Boolean(formData.requireComment),
|
|
5133
5201
|
isActive: formData.status === "active",
|
|
@@ -5136,10 +5204,10 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
|
|
|
5136
5204
|
workflowTypeId: Number(formData.workflowTypeId) || 0,
|
|
5137
5205
|
workflowId: Number(formData.workflow),
|
|
5138
5206
|
fromWorkflowStepId: Number(formData.fromStep),
|
|
5139
|
-
toWorkflowStepId: Number(formData.toStep),
|
|
5140
|
-
actionCode: formData.actionCode.trim()
|
|
5207
|
+
toWorkflowStepId: formData.returnToApplicant ? 0 : Number(formData.toStep),
|
|
5208
|
+
actionCode: formData.actionCode.trim(),
|
|
5141
5209
|
actionName: formData.actionName.trim(),
|
|
5142
|
-
|
|
5210
|
+
isReturnToApplicant: Boolean(formData.returnToApplicant),
|
|
5143
5211
|
isDefault: Boolean(formData.isDefault),
|
|
5144
5212
|
requireComment: Boolean(formData.requireComment),
|
|
5145
5213
|
isActive: formData.status === "active",
|
|
@@ -5153,6 +5221,16 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
|
|
|
5153
5221
|
}
|
|
5154
5222
|
};
|
|
5155
5223
|
const inputCls = (hasErr) => `fc:w-full fc:p-2.5 fc:pl-9 fc:rounded-xl fc:text-xs fc:border fc:bg-white focus:fc:outline-none focus:fc:ring-2 focus:fc:ring-indigo-500/20 focus:fc:border-indigo-500 fc:text-slate-700 fc:transition-all ${hasErr ? "fc:border-red-500 fc:text-slate-800" : "fc:border-slate-200 hover:fc:border-slate-300"}`;
|
|
5224
|
+
const inputStyle = (hasErr) => ({
|
|
5225
|
+
width: "100%",
|
|
5226
|
+
height: 42,
|
|
5227
|
+
boxSizing: "border-box",
|
|
5228
|
+
padding: "0 36px",
|
|
5229
|
+
border: `1px solid ${hasErr ? "#ef4444" : "#cbd5e1"}`,
|
|
5230
|
+
borderRadius: 10,
|
|
5231
|
+
backgroundColor: "#fff",
|
|
5232
|
+
color: "#334155"
|
|
5233
|
+
});
|
|
5156
5234
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:fixed fc:inset-0 fc:z-50 fc:flex fc:items-center fc:justify-center fc:p-4", children: [
|
|
5157
5235
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5158
5236
|
"div",
|
|
@@ -5161,401 +5239,399 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
|
|
|
5161
5239
|
onClick: onClose
|
|
5162
5240
|
}
|
|
5163
5241
|
),
|
|
5164
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
)
|
|
5183
|
-
] }),
|
|
5184
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("form", { onSubmit: handleSubmit, className: "fc:flex fc:flex-col fc:flex-1 fc:overflow-hidden", children: [
|
|
5185
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:p-8 fc:space-y-8 fc:overflow-y-auto fc:max-h-[calc(92vh-170px)] fc:bg-slate-50/40", children: [
|
|
5186
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:bg-white fc:p-6 fc:rounded-2xl fc:border fc:border-slate-200/70 fc:duration-300 fc:space-y-5", children: [
|
|
5187
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2.5 fc:text-indigo-600 fc:text-sm fc:font-bold fc:border-b fc:border-slate-100 fc:pb-3", children: [
|
|
5188
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "fc:p-1.5 fc:bg-indigo-50 fc:rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-4 fc:h-4", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" }) }) }),
|
|
5189
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Workflow Transition Information" })
|
|
5190
|
-
] }),
|
|
5191
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:grid fc:grid-cols-2 md:fc:grid-cols-2 fc:gap-5", children: [
|
|
5192
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5193
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
|
|
5194
|
-
"Workflow Type ",
|
|
5195
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fc:text-red-500", children: "*" })
|
|
5242
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5243
|
+
"div",
|
|
5244
|
+
{
|
|
5245
|
+
className: "fc:relative fc:w-full fc:max-w-4xl fc:bg-white fc:rounded-3xl fc:flex fc:flex-col fc:z-10 fc:max-h-[92vh] fc:overflow-hidden fc:animate-in fc:fade-in fc:zoom-in-95 fc:slide-in-from-bottom-4 fc:duration-300 fc:ring-1 fc:ring-slate-900/5",
|
|
5246
|
+
style: { width: "min(840px, calc(100vw - 24px))", maxHeight: "min(700px, calc(100vh - 24px))", boxShadow: "0 24px 64px rgba(15, 23, 42, 0.22)" },
|
|
5247
|
+
children: [
|
|
5248
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5249
|
+
"div",
|
|
5250
|
+
{
|
|
5251
|
+
className: "fc:flex fc:justify-between fc:items-center fc:px-8 fc:py-6 fc:border-b fc:border-slate-100 fc:bg-gradient-to-r fc:from-white fc:via-slate-50/50 fc:to-white",
|
|
5252
|
+
style: { flexShrink: 0, padding: "12px 20px" },
|
|
5253
|
+
children: [
|
|
5254
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-4", children: [
|
|
5255
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "fc:w-12 fc:h-12 fc:bg-indigo-50 fc:text-indigo-600 fc:rounded-2xl fc:flex fc:items-center fc:justify-center fc:shadow-inner", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-6 fc:h-6", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" }) }) }),
|
|
5256
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5257
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h2", { className: "fc:text-xl fc:font-extrabold fc:text-slate-800 fc:tracking-tight", children: editData ? "Edit Workflow Transition" : "Add Workflow Transition" }),
|
|
5258
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-xs fc:text-slate-400 fc:mt-0.5 fc:font-medium", children: editData ? "Update workflow transition details and routing" : "Create a new workflow transition and configure its details" })
|
|
5259
|
+
] })
|
|
5196
5260
|
] }),
|
|
5197
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.
|
|
5261
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5262
|
+
"button",
|
|
5263
|
+
{
|
|
5264
|
+
type: "button",
|
|
5265
|
+
onClick: onClose,
|
|
5266
|
+
className: "fc:group fc:text-slate-400 hover:fc:text-slate-700 hover:fc:bg-slate-100/80 active:fc:scale-95 fc:p-2.5 fc:rounded-full fc:transition-all fc:duration-200",
|
|
5267
|
+
"aria-label": "Close",
|
|
5268
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-5 fc:h-5 fc:transition-transform fc:duration-200 group-hover:fc:rotate-90", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) })
|
|
5269
|
+
}
|
|
5270
|
+
)
|
|
5271
|
+
]
|
|
5272
|
+
}
|
|
5273
|
+
),
|
|
5274
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("form", { onSubmit: handleSubmit, className: "fc:flex fc:flex-col fc:flex-1 fc:overflow-hidden", children: [
|
|
5275
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5276
|
+
"div",
|
|
5277
|
+
{
|
|
5278
|
+
className: "fc:flex fc:flex-col fc:overflow-y-auto fc:bg-slate-50/40",
|
|
5279
|
+
style: { flex: "1 1 auto", minHeight: 0, padding: "14px 20px", gap: 12 },
|
|
5280
|
+
children: [
|
|
5198
5281
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5199
|
-
"
|
|
5282
|
+
"div",
|
|
5200
5283
|
{
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
disabled: loadingWorkflowTypes,
|
|
5204
|
-
className: inputCls(errors.workflowTypeId),
|
|
5284
|
+
className: "fc:bg-white fc:rounded-2xl fc:border fc:border-slate-200/70 fc:duration-300",
|
|
5285
|
+
style: { display: "flex", flexDirection: "column", gap: 12, padding: 16, borderRadius: 14 },
|
|
5205
5286
|
children: [
|
|
5206
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.
|
|
5207
|
-
|
|
5208
|
-
(
|
|
5209
|
-
|
|
5210
|
-
|
|
5287
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2.5 fc:text-indigo-600 fc:text-sm fc:font-bold fc:border-b fc:border-slate-100 fc:pb-3", children: [
|
|
5288
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "fc:p-1.5 fc:bg-indigo-50 fc:rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-4 fc:h-4", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" }) }) }),
|
|
5289
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Workflow Transition Information" })
|
|
5290
|
+
] }),
|
|
5291
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:grid fc:grid-cols-2 md:fc:grid-cols-2 fc:gap-5", children: [
|
|
5292
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5293
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
|
|
5294
|
+
"Workflow Type ",
|
|
5295
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fc:text-red-500", children: "*" })
|
|
5296
|
+
] }),
|
|
5297
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:relative", children: [
|
|
5298
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5299
|
+
"select",
|
|
5300
|
+
{
|
|
5301
|
+
value: formData.workflowTypeId,
|
|
5302
|
+
onChange: (e) => handleChange("workflowTypeId", e.target.value),
|
|
5303
|
+
disabled: loadingWorkflowTypes,
|
|
5304
|
+
className: inputCls(errors.workflowTypeId),
|
|
5305
|
+
style: inputStyle(errors.workflowTypeId),
|
|
5306
|
+
children: [
|
|
5307
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "", children: loadingWorkflowTypes ? "Loading workflow types..." : "Select Workflow Type" }),
|
|
5308
|
+
formData.workflowTypeId && !workflowTypes.some(
|
|
5309
|
+
(t) => {
|
|
5310
|
+
var _a2, _b2;
|
|
5311
|
+
return String((_b2 = (_a2 = t.workflowTypeId) != null ? _a2 : t.WorkflowTypeId) != null ? _b2 : t.id) === String(formData.workflowTypeId);
|
|
5312
|
+
}
|
|
5313
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: formData.workflowTypeId, children: (_E = (_D = editData == null ? void 0 : editData.workflowTypeName) != null ? _D : editData == null ? void 0 : editData.WorkflowTypeName) != null ? _E : `Type ${formData.workflowTypeId}` }),
|
|
5314
|
+
workflowTypes.map((type) => {
|
|
5315
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
5316
|
+
const id = (_b2 = (_a2 = type.workflowTypeId) != null ? _a2 : type.WorkflowTypeId) != null ? _b2 : type.id;
|
|
5317
|
+
const label = (_f2 = (_e2 = (_d2 = (_c2 = type.workflowTypeName) != null ? _c2 : type.WorkflowTypeName) != null ? _d2 : type.name) != null ? _e2 : type.typeName) != null ? _f2 : `Type ${id}`;
|
|
5318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: String(id), children: label }, id);
|
|
5319
|
+
})
|
|
5320
|
+
]
|
|
5321
|
+
}
|
|
5322
|
+
),
|
|
5323
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-4 fc:h-4 fc:text-slate-400 fc:absolute fc:left-3 fc:top-3 pointer-events-none", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z" }) })
|
|
5324
|
+
] }),
|
|
5325
|
+
workflowTypeFetchError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowTypeFetchError }),
|
|
5326
|
+
errors.workflowTypeId && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.workflowTypeId })
|
|
5327
|
+
] }),
|
|
5328
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5329
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
|
|
5330
|
+
"Workflow ",
|
|
5331
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fc:text-red-500", children: "*" })
|
|
5332
|
+
] }),
|
|
5333
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:relative", children: [
|
|
5334
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5335
|
+
"select",
|
|
5336
|
+
{
|
|
5337
|
+
value: formData.workflow,
|
|
5338
|
+
onChange: (e) => handleChange("workflow", e.target.value),
|
|
5339
|
+
disabled: loadingWorkflows,
|
|
5340
|
+
className: inputCls(errors.workflow),
|
|
5341
|
+
style: inputStyle(errors.workflow),
|
|
5342
|
+
children: [
|
|
5343
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "", children: loadingWorkflows ? "Loading workflows..." : !formData.workflowTypeId ? "Select Workflow Type first" : filteredWorkflows.length === 0 ? "No workflows found for this type" : "Select Workflow" }),
|
|
5344
|
+
formData.workflow && !filteredWorkflows.some(
|
|
5345
|
+
(w) => {
|
|
5346
|
+
var _a2, _b2;
|
|
5347
|
+
return String((_b2 = (_a2 = w.workflowId) != null ? _a2 : w.WorkflowId) != null ? _b2 : w.id) === String(formData.workflow);
|
|
5348
|
+
}
|
|
5349
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: formData.workflow, children: (_G = (_F = editData == null ? void 0 : editData.workflowName) != null ? _F : editData == null ? void 0 : editData.WorkflowName) != null ? _G : `Workflow ${formData.workflow}` }),
|
|
5350
|
+
filteredWorkflows.map((workflow) => {
|
|
5351
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
5352
|
+
const id = (_b2 = (_a2 = workflow.workflowId) != null ? _a2 : workflow.WorkflowId) != null ? _b2 : workflow.id;
|
|
5353
|
+
const name = (_h2 = (_g2 = (_f2 = (_e2 = (_d2 = (_c2 = workflow.workflowName) != null ? _c2 : workflow.WorkflowName) != null ? _d2 : workflow.name) != null ? _e2 : workflow.Name) != null ? _f2 : workflow.workflowCode) != null ? _g2 : workflow.WorkflowCode) != null ? _h2 : `Workflow ${id}`;
|
|
5354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: String(id), children: name }, id);
|
|
5355
|
+
})
|
|
5356
|
+
]
|
|
5357
|
+
}
|
|
5358
|
+
),
|
|
5359
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-4 fc:h-4 fc:text-slate-400 fc:absolute fc:left-3 fc:top-3 pointer-events-none", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 6h16M4 10h16M4 14h16M4 18h16" }) })
|
|
5360
|
+
] }),
|
|
5361
|
+
workflowFetchError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowFetchError }),
|
|
5362
|
+
errors.workflow && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.workflow })
|
|
5363
|
+
] })
|
|
5364
|
+
] }),
|
|
5365
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5366
|
+
"div",
|
|
5367
|
+
{
|
|
5368
|
+
className: "fc:grid fc:gap-3",
|
|
5369
|
+
style: {
|
|
5370
|
+
display: "grid",
|
|
5371
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 300px), 1fr))",
|
|
5372
|
+
alignItems: "end",
|
|
5373
|
+
gap: 12
|
|
5374
|
+
},
|
|
5375
|
+
children: [
|
|
5376
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5377
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
|
|
5378
|
+
"From Step ",
|
|
5379
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fc:text-red-500", children: "*" })
|
|
5380
|
+
] }),
|
|
5381
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:relative", children: [
|
|
5382
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5383
|
+
"select",
|
|
5384
|
+
{
|
|
5385
|
+
value: formData.fromStep,
|
|
5386
|
+
onChange: (e) => handleChange("fromStep", e.target.value),
|
|
5387
|
+
disabled: loadingWorkflowSteps,
|
|
5388
|
+
className: inputCls(errors.fromStep),
|
|
5389
|
+
style: inputStyle(errors.fromStep),
|
|
5390
|
+
children: [
|
|
5391
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "", children: loadingWorkflowSteps ? "Loading steps..." : !formData.workflow ? "Select Workflow first" : filteredSteps.length === 0 ? "No steps found for this workflow" : "Select From Step" }),
|
|
5392
|
+
formData.fromStep && !filteredSteps.some(
|
|
5393
|
+
(s) => {
|
|
5394
|
+
var _a2, _b2;
|
|
5395
|
+
return String((_b2 = (_a2 = s.workflowStepId) != null ? _a2 : s.WorkflowStepId) != null ? _b2 : s.id) === String(formData.fromStep);
|
|
5396
|
+
}
|
|
5397
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: formData.fromStep, children: (_I = (_H = editData == null ? void 0 : editData.fromStepName) != null ? _H : editData == null ? void 0 : editData.FromStepName) != null ? _I : `Step ${formData.fromStep}` }),
|
|
5398
|
+
filteredSteps.map((step) => {
|
|
5399
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
5400
|
+
const id = (_b2 = (_a2 = step.workflowStepId) != null ? _a2 : step.WorkflowStepId) != null ? _b2 : step.id;
|
|
5401
|
+
const name = (_d2 = (_c2 = step.stepName) != null ? _c2 : step.StepName) != null ? _d2 : `Step ${id}`;
|
|
5402
|
+
const code = (_e2 = step.stepCode) != null ? _e2 : step.StepCode;
|
|
5403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("option", { value: String(id), children: [
|
|
5404
|
+
name,
|
|
5405
|
+
" ",
|
|
5406
|
+
code ? `(${code})` : ""
|
|
5407
|
+
] }, id);
|
|
5408
|
+
})
|
|
5409
|
+
]
|
|
5410
|
+
}
|
|
5411
|
+
),
|
|
5412
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-4 fc:h-4 fc:text-slate-400 fc:absolute fc:left-3 fc:top-3 pointer-events-none", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11 15l-3-3m0 0l3-3m-3 3h8M3 12a9 9 0 1118 0 9 9 0 01-18 0z" }) })
|
|
5413
|
+
] }),
|
|
5414
|
+
workflowStepFetchError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowStepFetchError }),
|
|
5415
|
+
errors.fromStep && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.fromStep })
|
|
5416
|
+
] }),
|
|
5417
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { display: "flex", alignItems: "end", minWidth: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5418
|
+
"label",
|
|
5419
|
+
{
|
|
5420
|
+
className: "fc:text-xs fc:font-semibold fc:text-slate-700",
|
|
5421
|
+
style: { display: "flex", width: "100%", minHeight: 42, alignItems: "center", gap: 9, margin: 0, padding: "0 11px", border: "1px solid #cbd5e1", borderRadius: 10, background: "#f8fafc", cursor: "pointer" },
|
|
5422
|
+
children: [
|
|
5423
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5424
|
+
"input",
|
|
5425
|
+
{
|
|
5426
|
+
type: "checkbox",
|
|
5427
|
+
checked: formData.returnToApplicant,
|
|
5428
|
+
onChange: (event) => handleChange("returnToApplicant", event.target.checked),
|
|
5429
|
+
className: "fc:h-4 fc:w-4 fc:rounded fc:border-slate-300 fc:text-indigo-600 focus:fc:ring-indigo-500",
|
|
5430
|
+
style: { width: 16, height: 16, margin: 0, accentColor: "#4f46e5", flexShrink: 0 }
|
|
5431
|
+
}
|
|
5432
|
+
),
|
|
5433
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { style: { lineHeight: 1.25 }, children: "Return to Applicant" })
|
|
5434
|
+
]
|
|
5435
|
+
}
|
|
5436
|
+
) }),
|
|
5437
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { display: formData.returnToApplicant ? "none" : "block", minWidth: 0 }, children: !formData.returnToApplicant && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
5438
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
|
|
5439
|
+
"To Step ",
|
|
5440
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fc:text-red-500", children: "*" })
|
|
5441
|
+
] }),
|
|
5442
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:relative", children: [
|
|
5443
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5444
|
+
"select",
|
|
5445
|
+
{
|
|
5446
|
+
value: formData.toStep,
|
|
5447
|
+
onChange: (e) => handleChange("toStep", e.target.value),
|
|
5448
|
+
disabled: loadingWorkflowSteps,
|
|
5449
|
+
className: inputCls(errors.toStep),
|
|
5450
|
+
style: inputStyle(errors.toStep),
|
|
5451
|
+
children: [
|
|
5452
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "", children: loadingWorkflowSteps ? "Loading steps..." : !formData.workflow ? "Select Workflow first" : filteredSteps.length === 0 ? "No steps found for this workflow" : "Select To Step" }),
|
|
5453
|
+
formData.toStep && !filteredSteps.some(
|
|
5454
|
+
(s) => {
|
|
5455
|
+
var _a2, _b2;
|
|
5456
|
+
return String((_b2 = (_a2 = s.workflowStepId) != null ? _a2 : s.WorkflowStepId) != null ? _b2 : s.id) === String(formData.toStep);
|
|
5457
|
+
}
|
|
5458
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: formData.toStep, children: (_K = (_J = editData == null ? void 0 : editData.toStepName) != null ? _J : editData == null ? void 0 : editData.ToStepName) != null ? _K : `Step ${formData.toStep}` }),
|
|
5459
|
+
filteredSteps.map((step) => {
|
|
5460
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
5461
|
+
const id = (_b2 = (_a2 = step.workflowStepId) != null ? _a2 : step.WorkflowStepId) != null ? _b2 : step.id;
|
|
5462
|
+
const name = (_d2 = (_c2 = step.stepName) != null ? _c2 : step.StepName) != null ? _d2 : `Step ${id}`;
|
|
5463
|
+
const code = (_e2 = step.stepCode) != null ? _e2 : step.StepCode;
|
|
5464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("option", { value: String(id), children: [
|
|
5465
|
+
name,
|
|
5466
|
+
" ",
|
|
5467
|
+
code ? `(${code})` : ""
|
|
5468
|
+
] }, id);
|
|
5469
|
+
})
|
|
5470
|
+
]
|
|
5471
|
+
}
|
|
5472
|
+
),
|
|
5473
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-4 fc:h-4 fc:text-slate-400 fc:absolute fc:left-3 fc:top-3 pointer-events-none", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z" }) })
|
|
5474
|
+
] }),
|
|
5475
|
+
workflowStepFetchError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowStepFetchError }),
|
|
5476
|
+
errors.toStep && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.toStep })
|
|
5477
|
+
] }) }),
|
|
5478
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { minWidth: 0 }, children: [
|
|
5479
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
|
|
5480
|
+
"Action Name ",
|
|
5481
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fc:text-red-500", children: "*" })
|
|
5482
|
+
] }),
|
|
5483
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:relative", children: [
|
|
5484
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5485
|
+
"select",
|
|
5486
|
+
{
|
|
5487
|
+
value: formData.actionCode,
|
|
5488
|
+
onChange: (event) => {
|
|
5489
|
+
const selectedAction = availableActions.find(
|
|
5490
|
+
(action) => action.name === event.target.value
|
|
5491
|
+
);
|
|
5492
|
+
setFormData((current) => {
|
|
5493
|
+
var _a2, _b2;
|
|
5494
|
+
return __spreadProps(__spreadValues({}, current), {
|
|
5495
|
+
actionCode: (_a2 = selectedAction == null ? void 0 : selectedAction.name) != null ? _a2 : "",
|
|
5496
|
+
actionName: (_b2 = selectedAction == null ? void 0 : selectedAction.name) != null ? _b2 : ""
|
|
5497
|
+
});
|
|
5498
|
+
});
|
|
5499
|
+
if (errors.actionCode || errors.actionName) {
|
|
5500
|
+
setErrors((current) => __spreadProps(__spreadValues({}, current), {
|
|
5501
|
+
actionCode: "",
|
|
5502
|
+
actionName: ""
|
|
5503
|
+
}));
|
|
5504
|
+
}
|
|
5505
|
+
},
|
|
5506
|
+
disabled: loadingActions || !formData.fromStep || availableActions.length === 0,
|
|
5507
|
+
className: inputCls(errors.actionCode || errors.actionName),
|
|
5508
|
+
style: inputStyle(errors.actionCode || errors.actionName),
|
|
5509
|
+
children: [
|
|
5510
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "", children: loadingActions ? "Loading actions..." : !formData.fromStep ? "Select From Step first" : availableActions.length === 0 ? "No actions available" : "Select Action" }),
|
|
5511
|
+
formData.actionCode && !availableActions.some(
|
|
5512
|
+
(action) => action.name === formData.actionCode
|
|
5513
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: formData.actionCode, children: formData.actionName || formData.actionCode }),
|
|
5514
|
+
availableActions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: action.name, children: action.name }, action.name))
|
|
5515
|
+
]
|
|
5516
|
+
}
|
|
5517
|
+
),
|
|
5518
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-4 fc:h-4 fc:text-slate-400 fc:absolute fc:left-3 fc:top-3 pointer-events-none", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M7 7h10M7 12h10M7 17h5" }) })
|
|
5519
|
+
] }),
|
|
5520
|
+
errors.actionName && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.actionName }),
|
|
5521
|
+
actionFetchError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: actionFetchError })
|
|
5522
|
+
] })
|
|
5523
|
+
]
|
|
5211
5524
|
}
|
|
5212
|
-
)
|
|
5213
|
-
workflowTypes.map((type) => {
|
|
5214
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
5215
|
-
const id = (_b2 = (_a2 = type.workflowTypeId) != null ? _a2 : type.WorkflowTypeId) != null ? _b2 : type.id;
|
|
5216
|
-
const label = (_f2 = (_e2 = (_d2 = (_c2 = type.workflowTypeName) != null ? _c2 : type.WorkflowTypeName) != null ? _d2 : type.name) != null ? _e2 : type.typeName) != null ? _f2 : `Type ${id}`;
|
|
5217
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: String(id), children: label }, id);
|
|
5218
|
-
})
|
|
5525
|
+
)
|
|
5219
5526
|
]
|
|
5220
5527
|
}
|
|
5221
5528
|
),
|
|
5222
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-4 fc:h-4 fc:text-slate-400 fc:absolute fc:left-3 fc:top-3 pointer-events-none", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z" }) })
|
|
5223
|
-
] }),
|
|
5224
|
-
workflowTypeFetchError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowTypeFetchError }),
|
|
5225
|
-
errors.workflowTypeId && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.workflowTypeId })
|
|
5226
|
-
] }),
|
|
5227
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5228
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
|
|
5229
|
-
"Workflow ",
|
|
5230
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fc:text-red-500", children: "*" })
|
|
5231
|
-
] }),
|
|
5232
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:relative", children: [
|
|
5233
5529
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5234
|
-
"
|
|
5530
|
+
"div",
|
|
5235
5531
|
{
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
disabled: loadingWorkflows,
|
|
5239
|
-
className: inputCls(errors.workflow),
|
|
5532
|
+
className: "fc:bg-white fc:rounded-2xl fc:border fc:border-slate-200/70",
|
|
5533
|
+
style: { display: "flex", flexDirection: "column", gap: 12, padding: 16, borderRadius: 14 },
|
|
5240
5534
|
children: [
|
|
5241
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("
|
|
5242
|
-
|
|
5243
|
-
(
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5535
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "fc:flex fc:items-center fc:gap-2.5 fc:text-indigo-600 fc:text-sm fc:font-bold fc:border-b fc:border-slate-100 fc:pb-3", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Status & Settings" }) }),
|
|
5536
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:grid fc:grid-cols-2 fc:gap-3", children: [
|
|
5537
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5538
|
+
"label",
|
|
5539
|
+
{
|
|
5540
|
+
className: "fc:text-xs fc:font-semibold fc:text-slate-700",
|
|
5541
|
+
style: { display: "flex", minHeight: 42, alignItems: "center", gap: 9, padding: "0 11px", border: "1px solid #cbd5e1", borderRadius: 10, background: "#f8fafc", cursor: "pointer" },
|
|
5542
|
+
children: [
|
|
5543
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5544
|
+
"input",
|
|
5545
|
+
{
|
|
5546
|
+
type: "checkbox",
|
|
5547
|
+
checked: formData.isDefault,
|
|
5548
|
+
onChange: (event) => handleChange("isDefault", event.target.checked),
|
|
5549
|
+
style: { width: 16, height: 16, margin: 0, accentColor: "#4f46e5" }
|
|
5550
|
+
}
|
|
5551
|
+
),
|
|
5552
|
+
"Is Default"
|
|
5553
|
+
]
|
|
5554
|
+
}
|
|
5555
|
+
),
|
|
5556
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5557
|
+
"label",
|
|
5558
|
+
{
|
|
5559
|
+
className: "fc:text-xs fc:font-semibold fc:text-slate-700",
|
|
5560
|
+
style: { display: "flex", minHeight: 42, alignItems: "center", gap: 9, padding: "0 11px", border: "1px solid #cbd5e1", borderRadius: 10, background: "#f8fafc", cursor: "pointer" },
|
|
5561
|
+
children: [
|
|
5562
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5563
|
+
"input",
|
|
5564
|
+
{
|
|
5565
|
+
type: "checkbox",
|
|
5566
|
+
checked: formData.requireComment,
|
|
5567
|
+
onChange: (event) => handleChange("requireComment", event.target.checked),
|
|
5568
|
+
style: { width: 16, height: 16, margin: 0, accentColor: "#4f46e5" }
|
|
5569
|
+
}
|
|
5570
|
+
),
|
|
5571
|
+
"Require Comment"
|
|
5572
|
+
]
|
|
5573
|
+
}
|
|
5574
|
+
),
|
|
5575
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5576
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: "Status" }),
|
|
5577
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5578
|
+
"select",
|
|
5579
|
+
{
|
|
5580
|
+
value: formData.status,
|
|
5581
|
+
onChange: (event) => handleChange("status", event.target.value),
|
|
5582
|
+
className: inputCls(false),
|
|
5583
|
+
style: __spreadProps(__spreadValues({}, inputStyle(false)), { padding: "0 12px" }),
|
|
5584
|
+
children: [
|
|
5585
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "active", children: "Active" }),
|
|
5586
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "inactive", children: "Inactive" })
|
|
5587
|
+
]
|
|
5588
|
+
}
|
|
5589
|
+
)
|
|
5590
|
+
] })
|
|
5591
|
+
] })
|
|
5254
5592
|
]
|
|
5255
5593
|
}
|
|
5256
|
-
)
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
"From Step ",
|
|
5267
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fc:text-red-500", children: "*" })
|
|
5268
|
-
] }),
|
|
5269
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:relative", children: [
|
|
5594
|
+
)
|
|
5595
|
+
]
|
|
5596
|
+
}
|
|
5597
|
+
),
|
|
5598
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5599
|
+
"div",
|
|
5600
|
+
{
|
|
5601
|
+
className: "fc:bg-white fc:border-t fc:border-slate-100 fc:flex fc:items-center fc:justify-end fc:gap-3 fc:px-8",
|
|
5602
|
+
style: { flexShrink: 0, padding: "10px 20px" },
|
|
5603
|
+
children: [
|
|
5270
5604
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5271
|
-
"
|
|
5605
|
+
"button",
|
|
5272
5606
|
{
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
className: inputCls(errors.fromStep),
|
|
5607
|
+
type: "button",
|
|
5608
|
+
onClick: onClose,
|
|
5609
|
+
className: "fc:px-6 fc:py-2.5 fc:border fc:border-slate-200 fc:text-slate-600 fc:text-xs fc:font-bold fc:rounded-xl hover:fc:bg-slate-50 active:fc:scale-95 fc:transition-all fc:duration-200 fc:flex fc:items-center fc:gap-2",
|
|
5277
5610
|
children: [
|
|
5278
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("
|
|
5279
|
-
|
|
5280
|
-
(s) => {
|
|
5281
|
-
var _a2, _b2;
|
|
5282
|
-
return String((_b2 = (_a2 = s.workflowStepId) != null ? _a2 : s.WorkflowStepId) != null ? _b2 : s.id) === String(formData.fromStep);
|
|
5283
|
-
}
|
|
5284
|
-
) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: formData.fromStep, children: (_D = (_C = editData == null ? void 0 : editData.fromStepName) != null ? _C : editData == null ? void 0 : editData.FromStepName) != null ? _D : `Step ${formData.fromStep}` }),
|
|
5285
|
-
filteredSteps.map((step) => {
|
|
5286
|
-
var _a2, _b2, _c2, _d2, _e2;
|
|
5287
|
-
const id = (_b2 = (_a2 = step.workflowStepId) != null ? _a2 : step.WorkflowStepId) != null ? _b2 : step.id;
|
|
5288
|
-
const name = (_d2 = (_c2 = step.stepName) != null ? _c2 : step.StepName) != null ? _d2 : `Step ${id}`;
|
|
5289
|
-
const code = (_e2 = step.stepCode) != null ? _e2 : step.StepCode;
|
|
5290
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("option", { value: String(id), children: [
|
|
5291
|
-
name,
|
|
5292
|
-
" ",
|
|
5293
|
-
code ? `(${code})` : ""
|
|
5294
|
-
] }, id);
|
|
5295
|
-
})
|
|
5611
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-3.5 fc:h-3.5", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }),
|
|
5612
|
+
"Cancel"
|
|
5296
5613
|
]
|
|
5297
5614
|
}
|
|
5298
5615
|
),
|
|
5299
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-4 fc:h-4 fc:text-slate-400 fc:absolute fc:left-3 fc:top-3 pointer-events-none", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11 15l-3-3m0 0l3-3m-3 3h8M3 12a9 9 0 1118 0 9 9 0 01-18 0z" }) })
|
|
5300
|
-
] }),
|
|
5301
|
-
workflowStepFetchError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowStepFetchError }),
|
|
5302
|
-
errors.fromStep && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.fromStep })
|
|
5303
|
-
] }),
|
|
5304
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5305
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
|
|
5306
|
-
"To Step ",
|
|
5307
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fc:text-red-500", children: "*" })
|
|
5308
|
-
] }),
|
|
5309
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:relative", children: [
|
|
5310
5616
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5311
|
-
"
|
|
5617
|
+
"button",
|
|
5312
5618
|
{
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
disabled:
|
|
5316
|
-
className: inputCls(errors.toStep),
|
|
5619
|
+
type: "submit",
|
|
5620
|
+
disabled: isSubmitting,
|
|
5621
|
+
className: "fc:group fc:relative fc:px-6 fc:py-2.5 fc:bg-indigo-600 hover:fc:bg-indigo-700 active:fc:scale-95 fc:text-white fc:text-xs fc:font-bold fc:rounded-xl fc:transition-all fc:duration-200 fc:flex fc:items-center fc:gap-2 disabled:fc:opacity-60 disabled:fc:cursor-not-allowed",
|
|
5317
5622
|
children: [
|
|
5318
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("
|
|
5319
|
-
|
|
5320
|
-
(s) => {
|
|
5321
|
-
var _a2, _b2;
|
|
5322
|
-
return String((_b2 = (_a2 = s.workflowStepId) != null ? _a2 : s.WorkflowStepId) != null ? _b2 : s.id) === String(formData.toStep);
|
|
5323
|
-
}
|
|
5324
|
-
) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: formData.toStep, children: (_F = (_E = editData == null ? void 0 : editData.toStepName) != null ? _E : editData == null ? void 0 : editData.ToStepName) != null ? _F : `Step ${formData.toStep}` }),
|
|
5325
|
-
filteredSteps.map((step) => {
|
|
5326
|
-
var _a2, _b2, _c2, _d2, _e2;
|
|
5327
|
-
const id = (_b2 = (_a2 = step.workflowStepId) != null ? _a2 : step.WorkflowStepId) != null ? _b2 : step.id;
|
|
5328
|
-
const name = (_d2 = (_c2 = step.stepName) != null ? _c2 : step.StepName) != null ? _d2 : `Step ${id}`;
|
|
5329
|
-
const code = (_e2 = step.stepCode) != null ? _e2 : step.StepCode;
|
|
5330
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("option", { value: String(id), children: [
|
|
5331
|
-
name,
|
|
5332
|
-
" ",
|
|
5333
|
-
code ? `(${code})` : ""
|
|
5334
|
-
] }, id);
|
|
5335
|
-
})
|
|
5623
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-3.5 fc:h-3.5 fc:transition-transform fc:duration-200 group-hover:fc:scale-110", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4" }) }),
|
|
5624
|
+
isSubmitting ? "Saving..." : editData ? "Update Transition" : "Save Transition"
|
|
5336
5625
|
]
|
|
5337
5626
|
}
|
|
5338
|
-
)
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
errors.toStep && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.toStep })
|
|
5343
|
-
] })
|
|
5344
|
-
] }),
|
|
5345
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:grid fc:grid-cols-3 md:fc:grid-cols-3 fc:gap-5", children: [
|
|
5346
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5347
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
|
|
5348
|
-
"Action Code ",
|
|
5349
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fc:text-red-500", children: "*" })
|
|
5350
|
-
] }),
|
|
5351
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:relative", children: [
|
|
5352
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5353
|
-
"input",
|
|
5354
|
-
{
|
|
5355
|
-
type: "text",
|
|
5356
|
-
placeholder: "Enter Action Code",
|
|
5357
|
-
value: formData.actionCode,
|
|
5358
|
-
onChange: (e) => handleChange("actionCode", e.target.value),
|
|
5359
|
-
className: `${inputCls(errors.actionCode)} uppercase`
|
|
5360
|
-
}
|
|
5361
|
-
),
|
|
5362
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-4 fc:h-4 fc:text-slate-400 fc:absolute fc:left-3 fc:top-3 pointer-events-none", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" }) })
|
|
5363
|
-
] }),
|
|
5364
|
-
errors.actionCode && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.actionCode })
|
|
5365
|
-
] }),
|
|
5366
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5367
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
|
|
5368
|
-
"Action Name ",
|
|
5369
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fc:text-red-500", children: "*" })
|
|
5370
|
-
] }),
|
|
5371
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:relative", children: [
|
|
5372
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5373
|
-
"input",
|
|
5374
|
-
{
|
|
5375
|
-
type: "text",
|
|
5376
|
-
placeholder: "Enter Action Name",
|
|
5377
|
-
value: formData.actionName,
|
|
5378
|
-
onChange: (e) => handleChange("actionName", e.target.value),
|
|
5379
|
-
className: inputCls(errors.actionName)
|
|
5380
|
-
}
|
|
5381
|
-
),
|
|
5382
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-4 fc:h-4 fc:text-slate-400 fc:absolute fc:left-3 fc:top-3 pointer-events-none", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M7 7h10M7 12h10M7 17h5" }) })
|
|
5383
|
-
] }),
|
|
5384
|
-
errors.actionName && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.actionName })
|
|
5385
|
-
] }),
|
|
5386
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5387
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
|
|
5388
|
-
"Sequence No ",
|
|
5389
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fc:text-red-500", children: "*" })
|
|
5390
|
-
] }),
|
|
5391
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:relative", children: [
|
|
5392
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5393
|
-
"input",
|
|
5394
|
-
{
|
|
5395
|
-
type: "number",
|
|
5396
|
-
min: "1",
|
|
5397
|
-
placeholder: "Enter Sequence No",
|
|
5398
|
-
value: formData.sequenceNo,
|
|
5399
|
-
onChange: (e) => handleChange("sequenceNo", e.target.value),
|
|
5400
|
-
className: inputCls(errors.sequenceNo)
|
|
5401
|
-
}
|
|
5402
|
-
),
|
|
5403
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-4 fc:h-4 fc:text-slate-400 fc:absolute fc:left-3 fc:top-3 pointer-events-none", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M7 20l4-16m2 16l4-16M6 9h14M4 15h14" }) })
|
|
5404
|
-
] }),
|
|
5405
|
-
errors.sequenceNo && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.sequenceNo })
|
|
5406
|
-
] })
|
|
5407
|
-
] })
|
|
5408
|
-
] }),
|
|
5409
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:bg-white fc:p-6 fc:rounded-2xl fc:border fc:border-slate-200/70 fc:transition-shadow fc:duration-300 fc:space-y-5", children: [
|
|
5410
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2.5 fc:text-indigo-600 fc:text-sm fc:font-bold fc:border-b fc:border-slate-100 fc:pb-3", children: [
|
|
5411
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "fc:p-1.5 fc:bg-indigo-50 fc:rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { className: "fc:w-4 fc:h-4", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: [
|
|
5412
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" }),
|
|
5413
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
|
|
5414
|
-
] }) }),
|
|
5415
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Status & Settings" })
|
|
5416
|
-
] }),
|
|
5417
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:grid fc:grid-cols-2 md:fc:grid-cols-2 fc:gap-5", children: [
|
|
5418
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5419
|
-
"div",
|
|
5420
|
-
{
|
|
5421
|
-
onClick: () => handleChange("isDefault", !formData.isDefault),
|
|
5422
|
-
className: `fc:flex fc:items-center fc:justify-between fc:p-4 fc:rounded-2xl fc:border fc:cursor-pointer fc:transition-all fc:duration-200 fc:select-none hover:fc:shadow-sm active:fc:scale-[0.99] ${formData.isDefault ? "fc:border-indigo-500 fc:bg-indigo-50/40 " : "fc:border-slate-200/80 fc:bg-slate-50/50 hover:fc:bg-slate-100/50"}`,
|
|
5423
|
-
children: [
|
|
5424
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-3", children: [
|
|
5425
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: `fc:w-8 fc:h-8 fc:rounded-xl fc:flex fc:items-center fc:justify-center fc:transition-all fc:duration-200 ${formData.isDefault ? "fc:bg-indigo-600 fc:text-white fc:shadow-indigo-500/20" : "fc:bg-indigo-50 fc:text-indigo-600"}`, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-4 fc:h-4", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z" }) }) }),
|
|
5426
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5427
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-xs fc:font-bold fc:text-slate-700", children: "Is Default" }),
|
|
5428
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-[10px] fc:text-slate-400", children: "Set this action as default transition" })
|
|
5429
|
-
] })
|
|
5430
|
-
] }),
|
|
5431
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5432
|
-
"div",
|
|
5433
|
-
{
|
|
5434
|
-
className: `fc:w-11 fc:h-6 fc:rounded-full fc:p-1 fc:transition-colors fc:duration-300 fc:ease-in-out ${formData.isDefault ? "fc:bg-indigo-600" : "fc:bg-slate-300"}`,
|
|
5435
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5436
|
-
"div",
|
|
5437
|
-
{
|
|
5438
|
-
className: `fc:w-4 fc:h-4 fc:rounded-full fc:bg-white fc:transform fc:transition-transform fc:duration-300 fc:ease-in-out ${formData.isDefault ? "fc:translate-x-5" : "fc:translate-x-0"}`
|
|
5439
|
-
}
|
|
5440
|
-
)
|
|
5441
|
-
}
|
|
5442
|
-
)
|
|
5443
|
-
]
|
|
5444
|
-
}
|
|
5445
|
-
),
|
|
5446
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5447
|
-
"div",
|
|
5448
|
-
{
|
|
5449
|
-
onClick: () => handleChange("requireComment", !formData.requireComment),
|
|
5450
|
-
className: `fc:flex fc:items-center fc:justify-between fc:p-4 fc:rounded-2xl fc:border fc:cursor-pointer fc:transition-all fc:duration-200 fc:select-none hover:fc:shadow-sm active:fc:scale-[0.99] ${formData.requireComment ? "fc:border-indigo-500 fc:bg-indigo-50/40 " : "fc:border-slate-200/80 fc:bg-slate-50/50 hover:fc:bg-slate-100/50"}`,
|
|
5451
|
-
children: [
|
|
5452
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-3", children: [
|
|
5453
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: `fc:w-8 fc:h-8 fc:rounded-xl fc:flex fc:items-center fc:justify-center fc:transition-all fc:duration-200 ${formData.requireComment ? "fc:bg-indigo-600 fc:text-white fc:shadow-indigo-500/20" : "fc:bg-indigo-50 fc:text-indigo-600"}`, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-4 fc:h-4", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }) }),
|
|
5454
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5455
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-xs fc:font-bold fc:text-slate-700", children: "Require Comment" }),
|
|
5456
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-[10px] fc:text-slate-400", children: "Mandatory user remarks on transition" })
|
|
5457
|
-
] })
|
|
5458
|
-
] }),
|
|
5459
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5460
|
-
"div",
|
|
5461
|
-
{
|
|
5462
|
-
className: `fc:w-11 fc:h-6 fc:rounded-full fc:p-1 fc:transition-colors fc:duration-300 fc:ease-in-out ${formData.requireComment ? "fc:bg-indigo-600" : "fc:bg-slate-300"}`,
|
|
5463
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5464
|
-
"div",
|
|
5465
|
-
{
|
|
5466
|
-
className: `fc:w-4 fc:h-4 fc:rounded-full fc:bg-white fc:transform fc:transition-transform fc:duration-300 fc:ease-in-out ${formData.requireComment ? "fc:translate-x-5" : "fc:translate-x-0"}`
|
|
5467
|
-
}
|
|
5468
|
-
)
|
|
5469
|
-
}
|
|
5470
|
-
)
|
|
5471
|
-
]
|
|
5472
|
-
}
|
|
5473
|
-
)
|
|
5474
|
-
] }),
|
|
5475
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5476
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-2.5", children: "Status" }),
|
|
5477
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:grid fc:grid-cols-2 fc:gap-4", children: [
|
|
5478
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5479
|
-
"div",
|
|
5480
|
-
{
|
|
5481
|
-
onClick: () => handleChange("status", "active"),
|
|
5482
|
-
className: `fc:flex fc:items-center fc:justify-between fc:p-3.5 fc:rounded-xl fc:border fc:cursor-pointer fc:transition-all fc:duration-200 active:fc:scale-[0.99] ${formData.status === "active" ? "fc:border-emerald-500 fc:bg-emerald-50/30 fc:ring-2 fc:ring-emerald-500/10 " : "fc:border-slate-200 fc:bg-white hover:fc:bg-slate-50"}`,
|
|
5483
|
-
children: [
|
|
5484
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2.5", children: [
|
|
5485
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "fc:relative fc:flex fc:h-2.5 fc:w-2.5", children: [
|
|
5486
|
-
formData.status === "active" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fc:animate-ping fc:absolute fc:inline-flex fc:h-full fc:w-full fc:rounded-full fc:bg-emerald-400 fc:opacity-75" }),
|
|
5487
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fc:relative fc:inline-flex fc:rounded-full fc:h-2.5 fc:w-2.5 fc:bg-emerald-500" })
|
|
5488
|
-
] }),
|
|
5489
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5490
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-xs fc:font-bold fc:text-slate-800", children: "Active" }),
|
|
5491
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-[10px] fc:text-slate-400", children: "Ready to execute in workflows" })
|
|
5492
|
-
] })
|
|
5493
|
-
] }),
|
|
5494
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5495
|
-
"div",
|
|
5496
|
-
{
|
|
5497
|
-
className: `fc:w-4 fc:h-4 fc:rounded-full fc:border fc:flex fc:items-center fc:justify-center fc:transition-all fc:duration-200 ${formData.status === "active" ? "fc:border-emerald-500 fc:bg-emerald-500 fc:scale-110" : "fc:border-slate-300"}`,
|
|
5498
|
-
children: formData.status === "active" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-2.5 fc:h-2.5 fc:text-white", fill: "none", stroke: "currentColor", strokeWidth: "3", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) })
|
|
5499
|
-
}
|
|
5500
|
-
)
|
|
5501
|
-
]
|
|
5502
|
-
}
|
|
5503
|
-
),
|
|
5504
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5505
|
-
"div",
|
|
5506
|
-
{
|
|
5507
|
-
onClick: () => handleChange("status", "inactive"),
|
|
5508
|
-
className: `fc:flex fc:items-center fc:justify-between fc:p-3.5 fc:rounded-xl fc:border fc:cursor-pointer fc:transition-all fc:duration-200 active:fc:scale-[0.99] ${formData.status === "inactive" ? "fc:border-slate-400 fc:bg-slate-100/60 fc:ring-2 fc:ring-slate-400/10 " : "fc:border-slate-200 fc:bg-white hover:fc:bg-slate-50"}`,
|
|
5509
|
-
children: [
|
|
5510
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2.5", children: [
|
|
5511
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fc:w-2.5 fc:h-2.5 fc:rounded-full fc:bg-slate-400" }),
|
|
5512
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
5513
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-xs fc:font-bold fc:text-slate-800", children: "Inactive" }),
|
|
5514
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-[10px] fc:text-slate-400", children: "Disabled for processing" })
|
|
5515
|
-
] })
|
|
5516
|
-
] }),
|
|
5517
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5518
|
-
"div",
|
|
5519
|
-
{
|
|
5520
|
-
className: `fc:w-4 fc:h-4 fc:rounded-full fc:border fc:flex fc:items-center fc:justify-center fc:transition-all fc:duration-200 ${formData.status === "inactive" ? "fc:border-slate-500 fc:bg-slate-500 fc:scale-110" : "fc:border-slate-300"}`,
|
|
5521
|
-
children: formData.status === "inactive" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-2.5 fc:h-2.5 fc:text-white", fill: "none", stroke: "currentColor", strokeWidth: "3", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) })
|
|
5522
|
-
}
|
|
5523
|
-
)
|
|
5524
|
-
]
|
|
5525
|
-
}
|
|
5526
|
-
)
|
|
5527
|
-
] })
|
|
5528
|
-
] })
|
|
5627
|
+
)
|
|
5628
|
+
]
|
|
5629
|
+
}
|
|
5630
|
+
)
|
|
5529
5631
|
] })
|
|
5530
|
-
]
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
"button",
|
|
5534
|
-
{
|
|
5535
|
-
type: "button",
|
|
5536
|
-
onClick: onClose,
|
|
5537
|
-
className: "fc:px-6 fc:py-2.5 fc:border fc:border-slate-200 fc:text-slate-600 fc:text-xs fc:font-bold fc:rounded-xl hover:fc:bg-slate-50 active:fc:scale-95 fc:transition-all fc:duration-200 fc:flex fc:items-center fc:gap-2",
|
|
5538
|
-
children: [
|
|
5539
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-3.5 fc:h-3.5", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }),
|
|
5540
|
-
"Cancel"
|
|
5541
|
-
]
|
|
5542
|
-
}
|
|
5543
|
-
),
|
|
5544
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5545
|
-
"button",
|
|
5546
|
-
{
|
|
5547
|
-
type: "submit",
|
|
5548
|
-
disabled: isSubmitting,
|
|
5549
|
-
className: "fc:group fc:relative fc:px-6 fc:py-2.5 fc:bg-indigo-600 hover:fc:bg-indigo-700 active:fc:scale-95 fc:text-white fc:text-xs fc:font-bold fc:rounded-xl fc:transition-all fc:duration-200 fc:flex fc:items-center fc:gap-2 disabled:fc:opacity-60 disabled:fc:cursor-not-allowed",
|
|
5550
|
-
children: [
|
|
5551
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { className: "fc:w-3.5 fc:h-3.5 fc:transition-transform fc:duration-200 group-hover:fc:scale-110", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4" }) }),
|
|
5552
|
-
isSubmitting ? "Saving..." : editData ? "Update Transition" : "Save Transition"
|
|
5553
|
-
]
|
|
5554
|
-
}
|
|
5555
|
-
)
|
|
5556
|
-
] })
|
|
5557
|
-
] })
|
|
5558
|
-
] })
|
|
5632
|
+
]
|
|
5633
|
+
}
|
|
5634
|
+
)
|
|
5559
5635
|
] });
|
|
5560
5636
|
}
|
|
5561
5637
|
|
|
@@ -5567,7 +5643,8 @@ var PATHS = {
|
|
|
5567
5643
|
create: "/api/flowcore/WorkflowTransition/Create",
|
|
5568
5644
|
update: "/api/flowcore/WorkflowTransition/Update",
|
|
5569
5645
|
getById: "/api/flowcore/WorkflowTransition/GetById",
|
|
5570
|
-
getList: "/api/flowcore/WorkflowTransition/GetList"
|
|
5646
|
+
getList: "/api/flowcore/WorkflowTransition/GetList",
|
|
5647
|
+
delete: "/api/flowcore/WorkflowTransition/Delete"
|
|
5571
5648
|
};
|
|
5572
5649
|
var getRows = (response) => {
|
|
5573
5650
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -5589,16 +5666,22 @@ var getByIdUrl = (id) => {
|
|
|
5589
5666
|
return typeof endpoint2 === "function" ? endpoint2(id) : `${endpoint2}/${id}`;
|
|
5590
5667
|
};
|
|
5591
5668
|
var normalise = (item) => {
|
|
5592
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
5669
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M;
|
|
5593
5670
|
return __spreadProps(__spreadValues({}, item), {
|
|
5594
5671
|
transitionId: (_b = (_a = item.transitionId) != null ? _a : item.TransitionId) != null ? _b : item.id,
|
|
5595
5672
|
workflowTypeId: (_f = (_e = (_c = item.workflowTypeId) != null ? _c : item.WorkflowTypeId) != null ? _e : (_d = item.workflowType) == null ? void 0 : _d.workflowTypeId) != null ? _f : "",
|
|
5596
5673
|
workflowId: (_h = (_g = item.workflowId) != null ? _g : item.WorkflowId) != null ? _h : "",
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5674
|
+
workflowName: (_j = (_i = item.workflowName) != null ? _i : item.WorkflowName) != null ? _j : "",
|
|
5675
|
+
fromWorkflowStepId: (_n = (_m = (_l = (_k = item.fromWorkflowStepId) != null ? _k : item.FromWorkflowStepId) != null ? _l : item.fromStepId) != null ? _m : item.FromStepId) != null ? _n : "",
|
|
5676
|
+
fromStepName: (_p = (_o = item.fromStepName) != null ? _o : item.FromStepName) != null ? _p : "",
|
|
5677
|
+
toWorkflowStepId: (_t = (_s = (_r = (_q = item.toWorkflowStepId) != null ? _q : item.ToWorkflowStepId) != null ? _r : item.toStepId) != null ? _s : item.ToStepId) != null ? _t : "",
|
|
5678
|
+
toStepName: (_v = (_u = item.toStepName) != null ? _u : item.ToStepName) != null ? _v : "",
|
|
5679
|
+
actionCode: (_x = (_w = item.actionCode) != null ? _w : item.ActionCode) != null ? _x : "",
|
|
5680
|
+
actionName: (_z = (_y = item.actionName) != null ? _y : item.ActionName) != null ? _z : "",
|
|
5681
|
+
isReturnToApplicant: (_G = (_C = (_B = (_A = item.isReturnToApplicant) != null ? _A : item.IsReturnToApplicant) != null ? _B : item.returnToApplicant) != null ? _C : item.ReturnToApplicant) != null ? _G : Number((_F = (_E = (_D = item.toWorkflowStepId) != null ? _D : item.ToWorkflowStepId) != null ? _E : item.toStepId) != null ? _F : item.ToStepId) === 0,
|
|
5682
|
+
isDefault: (_I = (_H = item.isDefault) != null ? _H : item.IsDefault) != null ? _I : false,
|
|
5683
|
+
requireComment: (_K = (_J = item.requireComment) != null ? _J : item.RequireComment) != null ? _K : false,
|
|
5684
|
+
isActive: (_M = (_L = item.isActive) != null ? _L : item.IsActive) != null ? _M : true
|
|
5602
5685
|
});
|
|
5603
5686
|
};
|
|
5604
5687
|
function WorkFlowTransition() {
|
|
@@ -5607,6 +5690,8 @@ function WorkFlowTransition() {
|
|
|
5607
5690
|
const [showModal, setShowModal] = (0, import_react21.useState)(false);
|
|
5608
5691
|
const [editingTransition, setEditingTransition] = (0, import_react21.useState)(null);
|
|
5609
5692
|
const [loadingEditId, setLoadingEditId] = (0, import_react21.useState)(null);
|
|
5693
|
+
const [updatingStatusId, setUpdatingStatusId] = (0, import_react21.useState)(null);
|
|
5694
|
+
const [deletingTransitionId, setDeletingTransitionId] = (0, import_react21.useState)(null);
|
|
5610
5695
|
const [pageSize, setPageSize] = (0, import_react21.useState)(10);
|
|
5611
5696
|
const [currentPage, setCurrentPage] = (0, import_react21.useState)(1);
|
|
5612
5697
|
const [search, setSearch] = (0, import_react21.useState)("");
|
|
@@ -5632,11 +5717,16 @@ function WorkFlowTransition() {
|
|
|
5632
5717
|
})();
|
|
5633
5718
|
}, [refreshKey]);
|
|
5634
5719
|
const saveTransition = async (payload, isEdit) => {
|
|
5635
|
-
var _a, _b;
|
|
5720
|
+
var _a, _b, _c;
|
|
5636
5721
|
try {
|
|
5722
|
+
const requestPayload = __spreadProps(__spreadValues({}, payload), {
|
|
5723
|
+
isReturnToApplicant: Boolean(
|
|
5724
|
+
(_a = payload.isReturnToApplicant) != null ? _a : Number(payload.toWorkflowStepId) === 0
|
|
5725
|
+
)
|
|
5726
|
+
});
|
|
5637
5727
|
await getApiService()[isEdit ? "put" : "post"](
|
|
5638
5728
|
getEndpoint(isEdit ? "update" : "create"),
|
|
5639
|
-
|
|
5729
|
+
requestPayload
|
|
5640
5730
|
);
|
|
5641
5731
|
await import_sweetalert29.default.fire(
|
|
5642
5732
|
"Success",
|
|
@@ -5648,7 +5738,7 @@ function WorkFlowTransition() {
|
|
|
5648
5738
|
} catch (error) {
|
|
5649
5739
|
await import_sweetalert29.default.fire(
|
|
5650
5740
|
"Error",
|
|
5651
|
-
((
|
|
5741
|
+
((_c = (_b = error == null ? void 0 : error.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || (error == null ? void 0 : error.message) || `Unable to ${isEdit ? "update" : "create"} workflow transition.`,
|
|
5652
5742
|
"error"
|
|
5653
5743
|
);
|
|
5654
5744
|
return false;
|
|
@@ -5674,13 +5764,90 @@ function WorkFlowTransition() {
|
|
|
5674
5764
|
setLoadingEditId(null);
|
|
5675
5765
|
}
|
|
5676
5766
|
};
|
|
5767
|
+
const toggleTransitionStatus = async (transition) => {
|
|
5768
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5769
|
+
const isActive = !transition.isActive;
|
|
5770
|
+
const result = await import_sweetalert29.default.fire({
|
|
5771
|
+
title: `${isActive ? "Activate" : "Deactivate"} workflow transition?`,
|
|
5772
|
+
text: `Transition #${transition.transitionId} will be ${isActive ? "available" : "inactive"}.`,
|
|
5773
|
+
icon: "warning",
|
|
5774
|
+
showCancelButton: true,
|
|
5775
|
+
confirmButtonColor: isActive ? "#059669" : "#e11d48",
|
|
5776
|
+
confirmButtonText: isActive ? "Activate" : "Deactivate"
|
|
5777
|
+
});
|
|
5778
|
+
if (!result.isConfirmed) return;
|
|
5779
|
+
try {
|
|
5780
|
+
setUpdatingStatusId(transition.transitionId);
|
|
5781
|
+
await getApiService().put(getEndpoint("update"), {
|
|
5782
|
+
transitionId: transition.transitionId,
|
|
5783
|
+
workflowTypeId: Number(transition.workflowTypeId) || 0,
|
|
5784
|
+
workflowId: Number(transition.workflowId) || 0,
|
|
5785
|
+
fromWorkflowStepId: Number(transition.fromWorkflowStepId) || 0,
|
|
5786
|
+
toWorkflowStepId: Number(transition.toWorkflowStepId) || 0,
|
|
5787
|
+
actionCode: (_a = transition.actionCode) != null ? _a : "",
|
|
5788
|
+
actionName: (_b = transition.actionName) != null ? _b : "",
|
|
5789
|
+
isReturnToApplicant: Boolean(transition.isReturnToApplicant),
|
|
5790
|
+
isDefault: Boolean(transition.isDefault),
|
|
5791
|
+
requireComment: Boolean(transition.requireComment),
|
|
5792
|
+
isActive,
|
|
5793
|
+
updatedBy: (_d = (_c = transition.updatedBy) != null ? _c : transition.createdBy) != null ? _d : "System"
|
|
5794
|
+
});
|
|
5795
|
+
await import_sweetalert29.default.fire(
|
|
5796
|
+
"Success",
|
|
5797
|
+
`Workflow transition ${isActive ? "activated" : "deactivated"}.`,
|
|
5798
|
+
"success"
|
|
5799
|
+
);
|
|
5800
|
+
refresh();
|
|
5801
|
+
} catch (error) {
|
|
5802
|
+
await import_sweetalert29.default.fire(
|
|
5803
|
+
"Error",
|
|
5804
|
+
((_f = (_e = error == null ? void 0 : error.response) == null ? void 0 : _e.data) == null ? void 0 : _f.message) || (error == null ? void 0 : error.message) || "Unable to update workflow transition status.",
|
|
5805
|
+
"error"
|
|
5806
|
+
);
|
|
5807
|
+
} finally {
|
|
5808
|
+
setUpdatingStatusId(null);
|
|
5809
|
+
}
|
|
5810
|
+
};
|
|
5811
|
+
const deleteTransition = async (transition) => {
|
|
5812
|
+
var _a, _b;
|
|
5813
|
+
const confirmation = await import_sweetalert29.default.fire({
|
|
5814
|
+
title: "Delete workflow transition?",
|
|
5815
|
+
text: `Transition ${transition.transitionId} will be permanently deleted.`,
|
|
5816
|
+
icon: "warning",
|
|
5817
|
+
showCancelButton: true,
|
|
5818
|
+
confirmButtonColor: "#dc2626",
|
|
5819
|
+
confirmButtonText: "Delete",
|
|
5820
|
+
cancelButtonText: "Cancel",
|
|
5821
|
+
reverseButtons: true
|
|
5822
|
+
});
|
|
5823
|
+
if (!confirmation.isConfirmed) return;
|
|
5824
|
+
try {
|
|
5825
|
+
setDeletingTransitionId(transition.transitionId);
|
|
5826
|
+
const endpoint2 = getEndpoint("delete");
|
|
5827
|
+
const deleteUrl = typeof endpoint2 === "function" ? endpoint2() : String(endpoint2);
|
|
5828
|
+
await getApiService().delete(deleteUrl, {
|
|
5829
|
+
transitionId: transition.transitionId
|
|
5830
|
+
});
|
|
5831
|
+
await import_sweetalert29.default.fire("Deleted", "Workflow transition deleted successfully.", "success");
|
|
5832
|
+
refresh();
|
|
5833
|
+
} catch (error) {
|
|
5834
|
+
await import_sweetalert29.default.fire(
|
|
5835
|
+
"Error",
|
|
5836
|
+
((_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || (error == null ? void 0 : error.message) || "Unable to delete workflow transition.",
|
|
5837
|
+
"error"
|
|
5838
|
+
);
|
|
5839
|
+
} finally {
|
|
5840
|
+
setDeletingTransitionId(null);
|
|
5841
|
+
}
|
|
5842
|
+
};
|
|
5677
5843
|
const columns = [
|
|
5678
5844
|
["Transition ID", "transitionId", "fc:w-[15%]"],
|
|
5679
|
-
["Workflow
|
|
5680
|
-
["From Step
|
|
5681
|
-
["To Step
|
|
5845
|
+
["Workflow Name", "workflowName", "fc:w-[15%]"],
|
|
5846
|
+
["From Step", "fromStepName", "fc:w-[15%]"],
|
|
5847
|
+
["To Step", "toStepName", "fc:w-[15%]"],
|
|
5682
5848
|
["Action Code", "actionCode", "fc:w-[14%]"],
|
|
5683
|
-
["Action Name", "actionName", "fc:w-[16%]"]
|
|
5849
|
+
["Action Name", "actionName", "fc:w-[16%]"],
|
|
5850
|
+
["Status", "isActive", "fc:w-[10%]"]
|
|
5684
5851
|
];
|
|
5685
5852
|
const visibleRows = rows.filter(
|
|
5686
5853
|
(item) => Object.values(item).join(" ").toLowerCase().includes(search.toLowerCase())
|
|
@@ -5799,24 +5966,53 @@ function WorkFlowTransition() {
|
|
|
5799
5966
|
className: "fc:transition-colors fc:hover:bg-slate-50/50",
|
|
5800
5967
|
children: [
|
|
5801
5968
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.transitionId || "-" }),
|
|
5802
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.
|
|
5803
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.
|
|
5804
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.
|
|
5969
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.workflowName || "-" }),
|
|
5970
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.fromStepName || "-" }),
|
|
5971
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.toStepName || "-" }),
|
|
5805
5972
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:font-mono fc:text-slate-700 fc:whitespace-nowrap", children: item.actionCode || "-" }),
|
|
5806
5973
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.actionName || "-" }),
|
|
5807
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "fc:py-3.5 fc:px-4 fc:text-
|
|
5808
|
-
"
|
|
5974
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:whitespace-nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5975
|
+
"span",
|
|
5809
5976
|
{
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
disabled: loadingEditId === item.transitionId,
|
|
5813
|
-
className: "fc:inline-flex fc:items-center fc:justify-center fc:gap-1.5 fc:px-3 fc:py-1 fc:bg-blue-100/70 hover:fc:bg-blue-200/80 fc:text-blue-600 fc:font-semibold fc:text-xs fc:rounded-full fc:transition-all fc:duration-150 fc:cursor-pointer disabled:fc:opacity-50 disabled:fc:cursor-not-allowed",
|
|
5814
|
-
children: loadingEditId === item.transitionId ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
5815
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "fc:inline-block fc:w-3 fc:h-3 fc:border-2 fc:border-blue-600 fc:border-t-transparent fc:rounded-full fc:animate-spin" }),
|
|
5816
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Loading..." })
|
|
5817
|
-
] }) : "Edit"
|
|
5977
|
+
className: `fc:inline-flex fc:rounded-full fc:px-2.5 fc:py-1 fc:text-[11px] fc:font-semibold ${item.isActive ? "fc:bg-emerald-50 fc:text-emerald-700" : "fc:bg-slate-100 fc:text-slate-500"}`,
|
|
5978
|
+
children: item.isActive ? "Active" : "Inactive"
|
|
5818
5979
|
}
|
|
5819
|
-
) })
|
|
5980
|
+
) }),
|
|
5981
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "fc:py-3.5 fc:px-4 fc:text-center fc:whitespace-nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-center fc:gap-2", children: [
|
|
5982
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5983
|
+
"button",
|
|
5984
|
+
{
|
|
5985
|
+
type: "button",
|
|
5986
|
+
onClick: () => editTransition(item),
|
|
5987
|
+
disabled: loadingEditId === item.transitionId || deletingTransitionId === item.transitionId,
|
|
5988
|
+
className: "fc:inline-flex fc:items-center fc:justify-center fc:gap-1.5 fc:px-3 fc:py-1 fc:bg-blue-100/70 hover:fc:bg-blue-200/80 fc:text-blue-600 fc:font-semibold fc:text-xs fc:rounded-full fc:transition-all fc:duration-150 fc:cursor-pointer disabled:fc:opacity-50 disabled:fc:cursor-not-allowed",
|
|
5989
|
+
children: loadingEditId === item.transitionId ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
5990
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "fc:inline-block fc:w-3 fc:h-3 fc:border-2 fc:border-blue-600 fc:border-t-transparent fc:rounded-full fc:animate-spin" }),
|
|
5991
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Loading..." })
|
|
5992
|
+
] }) : "Edit"
|
|
5993
|
+
}
|
|
5994
|
+
),
|
|
5995
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5996
|
+
"button",
|
|
5997
|
+
{
|
|
5998
|
+
type: "button",
|
|
5999
|
+
onClick: () => toggleTransitionStatus(item),
|
|
6000
|
+
disabled: updatingStatusId === item.transitionId || deletingTransitionId === item.transitionId,
|
|
6001
|
+
className: `fc:inline-flex fc:items-center fc:justify-center fc:px-2.5 fc:py-1 fc:font-semibold fc:text-[11px] fc:rounded-full fc:transition-colors disabled:fc:opacity-50 disabled:fc:cursor-not-allowed ${item.isActive ? "fc:bg-rose-50 fc:text-rose-700 hover:fc:bg-rose-100" : "fc:bg-emerald-50 fc:text-emerald-700 hover:fc:bg-emerald-100"}`,
|
|
6002
|
+
children: updatingStatusId === item.transitionId ? "Saving..." : item.isActive ? "Deactivate" : "Activate"
|
|
6003
|
+
}
|
|
6004
|
+
),
|
|
6005
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
6006
|
+
"button",
|
|
6007
|
+
{
|
|
6008
|
+
type: "button",
|
|
6009
|
+
onClick: () => deleteTransition(item),
|
|
6010
|
+
disabled: deletingTransitionId === item.transitionId || updatingStatusId === item.transitionId,
|
|
6011
|
+
className: "fc:inline-flex fc:items-center fc:justify-center fc:px-2.5 fc:py-1 fc:bg-rose-600 hover:fc:bg-rose-700 fc:text-white fc:font-semibold fc:text-[11px] fc:rounded-full fc:transition-colors disabled:fc:opacity-50 disabled:fc:cursor-not-allowed",
|
|
6012
|
+
children: deletingTransitionId === item.transitionId ? "Deleting..." : "Delete"
|
|
6013
|
+
}
|
|
6014
|
+
)
|
|
6015
|
+
] }) })
|
|
5820
6016
|
]
|
|
5821
6017
|
},
|
|
5822
6018
|
item.transitionId
|
|
@@ -9357,9 +9553,45 @@ var import_react41 = __toESM(require("react"));
|
|
|
9357
9553
|
var import_sweetalert213 = __toESM(require("sweetalert2"));
|
|
9358
9554
|
init_ApiEndpointsProvider();
|
|
9359
9555
|
init_ApiServicepackage();
|
|
9556
|
+
|
|
9557
|
+
// src/components/task-permission/permissionLabels.js
|
|
9558
|
+
var permissionLabelFields = [
|
|
9559
|
+
{ field: "viewLabel", label: "View Label", fallback: "View" },
|
|
9560
|
+
{ field: "editLabel", label: "Edit Label", fallback: "Edit" },
|
|
9561
|
+
{ field: "approveLabel", label: "Approve Label", fallback: "Approve" },
|
|
9562
|
+
{ field: "rejectLabel", label: "Reject Label", fallback: "Reject" },
|
|
9563
|
+
{ field: "forwardLabel", label: "Forward Label", fallback: "Forward" },
|
|
9564
|
+
{ field: "freeForwardLabel", label: "Free Forward Label", fallback: "Free Forward" },
|
|
9565
|
+
{ field: "returnLabel", label: "Return Label", fallback: "Return" },
|
|
9566
|
+
{
|
|
9567
|
+
field: "returnToApplicantLabel",
|
|
9568
|
+
label: "Return To Applicant Label",
|
|
9569
|
+
fallback: "Return to Applicant"
|
|
9570
|
+
},
|
|
9571
|
+
{ field: "delegateLabel", label: "Delegate Label", fallback: "Delegate" },
|
|
9572
|
+
{ field: "holdLabel", label: "Hold Label", fallback: "Hold" }
|
|
9573
|
+
];
|
|
9574
|
+
var getPermissionLabelValues = (source = {}) => Object.fromEntries(
|
|
9575
|
+
permissionLabelFields.map(({ field, fallback }) => {
|
|
9576
|
+
var _a, _b;
|
|
9577
|
+
const pascalField = field.charAt(0).toUpperCase() + field.slice(1);
|
|
9578
|
+
return [field, (_b = (_a = source[field]) != null ? _a : source[pascalField]) != null ? _b : fallback];
|
|
9579
|
+
})
|
|
9580
|
+
);
|
|
9581
|
+
var getPermissionLabelPayload = (source = {}) => Object.fromEntries(
|
|
9582
|
+
permissionLabelFields.map(({ field, fallback }) => {
|
|
9583
|
+
var _a;
|
|
9584
|
+
return [
|
|
9585
|
+
field,
|
|
9586
|
+
String((_a = source[field]) != null ? _a : "").trim() || fallback
|
|
9587
|
+
];
|
|
9588
|
+
})
|
|
9589
|
+
);
|
|
9590
|
+
|
|
9591
|
+
// src/components/task-permission/Popup.js
|
|
9360
9592
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
9361
9593
|
function Popup({ isOpen, onClose, onSave }) {
|
|
9362
|
-
const [formData, setFormData] = (0, import_react41.useState)({
|
|
9594
|
+
const [formData, setFormData] = (0, import_react41.useState)(__spreadValues({
|
|
9363
9595
|
workflowStepId: "",
|
|
9364
9596
|
canView: false,
|
|
9365
9597
|
canEdit: false,
|
|
@@ -9372,7 +9604,7 @@ function Popup({ isOpen, onClose, onSave }) {
|
|
|
9372
9604
|
canDelegate: false,
|
|
9373
9605
|
canHold: false,
|
|
9374
9606
|
isActive: true
|
|
9375
|
-
});
|
|
9607
|
+
}, getPermissionLabelValues()));
|
|
9376
9608
|
const [errors, setErrors] = (0, import_react41.useState)({});
|
|
9377
9609
|
const [isSubmitting, setIsSubmitting] = (0, import_react41.useState)(false);
|
|
9378
9610
|
const [workflowSteps, setWorkflowSteps] = (0, import_react41.useState)([]);
|
|
@@ -9398,7 +9630,7 @@ function Popup({ isOpen, onClose, onSave }) {
|
|
|
9398
9630
|
}, [isOpen]);
|
|
9399
9631
|
(0, import_react41.useEffect)(() => {
|
|
9400
9632
|
if (!isOpen) {
|
|
9401
|
-
setFormData({
|
|
9633
|
+
setFormData(__spreadValues({
|
|
9402
9634
|
workflowStepId: "",
|
|
9403
9635
|
canView: false,
|
|
9404
9636
|
canEdit: false,
|
|
@@ -9411,7 +9643,7 @@ function Popup({ isOpen, onClose, onSave }) {
|
|
|
9411
9643
|
canDelegate: false,
|
|
9412
9644
|
canHold: false,
|
|
9413
9645
|
isActive: true
|
|
9414
|
-
});
|
|
9646
|
+
}, getPermissionLabelValues()));
|
|
9415
9647
|
setErrors({});
|
|
9416
9648
|
}
|
|
9417
9649
|
}, [isOpen]);
|
|
@@ -9435,7 +9667,7 @@ function Popup({ isOpen, onClose, onSave }) {
|
|
|
9435
9667
|
const flowCore = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore;
|
|
9436
9668
|
const endpoint2 = ((_b = flowCore == null ? void 0 : flowCore.stepPermission) == null ? void 0 : _b.create) || ((_c = flowCore == null ? void 0 : flowCore.StepPermission) == null ? void 0 : _c.create);
|
|
9437
9669
|
if (!endpoint2) throw new Error("Step Permission create endpoint is not configured.");
|
|
9438
|
-
const payload = {
|
|
9670
|
+
const payload = __spreadProps(__spreadValues({
|
|
9439
9671
|
workflowStepId: Number(formData.workflowStepId) || 0,
|
|
9440
9672
|
canView: Boolean(formData.canView),
|
|
9441
9673
|
canEdit: Boolean(formData.canEdit),
|
|
@@ -9447,9 +9679,10 @@ function Popup({ isOpen, onClose, onSave }) {
|
|
|
9447
9679
|
canReturnToApplicant: Boolean(formData.canReturnToApplicant),
|
|
9448
9680
|
canDelegate: Boolean(formData.canDelegate),
|
|
9449
9681
|
canHold: Boolean(formData.canHold),
|
|
9450
|
-
isActive: Boolean(formData.isActive)
|
|
9682
|
+
isActive: Boolean(formData.isActive)
|
|
9683
|
+
}, getPermissionLabelPayload(formData)), {
|
|
9451
9684
|
createdBy: "System"
|
|
9452
|
-
};
|
|
9685
|
+
});
|
|
9453
9686
|
await getApiService().post(endpoint2, payload);
|
|
9454
9687
|
onClose();
|
|
9455
9688
|
await (onSave == null ? void 0 : onSave());
|
|
@@ -9550,6 +9783,25 @@ function Popup({ isOpen, onClose, onSave }) {
|
|
|
9550
9783
|
)
|
|
9551
9784
|
] }, field)) })
|
|
9552
9785
|
] }),
|
|
9786
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:bg-white fc:p-6 fc:rounded-2xl fc:border fc:border-slate-100/80 fc:shadow-sm fc:space-y-5", children: [
|
|
9787
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:text-blue-600 fc:text-sm fc:font-bold fc:border-b fc:border-slate-50 fc:pb-3", children: [
|
|
9788
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "\u{1F3F7}\uFE0F" }),
|
|
9789
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "Action Labels" })
|
|
9790
|
+
] }),
|
|
9791
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "fc:grid fc:grid-cols-2 fc:gap-4", children: permissionLabelFields.map(({ field, label, fallback }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
|
|
9792
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: label }),
|
|
9793
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
9794
|
+
"input",
|
|
9795
|
+
{
|
|
9796
|
+
type: "text",
|
|
9797
|
+
value: formData[field],
|
|
9798
|
+
onChange: (event) => handleChange(field, event.target.value),
|
|
9799
|
+
placeholder: fallback,
|
|
9800
|
+
className: "fc:w-full fc:px-3 fc:py-2.5 fc:border fc:border-slate-200 fc:rounded-xl fc:text-xs fc:text-slate-700 fc:bg-white focus:fc:outline-none focus:fc:ring-2 focus:fc:ring-indigo-500/10 focus:fc:border-indigo-500"
|
|
9801
|
+
}
|
|
9802
|
+
)
|
|
9803
|
+
] }, field)) })
|
|
9804
|
+
] }),
|
|
9553
9805
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:bg-white fc:p-6 fc:rounded-2xl fc:border fc:border-slate-100/80 fc:shadow-sm fc:space-y-4", children: [
|
|
9554
9806
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:text-blue-600 fc:text-sm fc:font-bold fc:border-b fc:border-slate-50 fc:pb-3", children: [
|
|
9555
9807
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "\u{1F518}" }),
|
|
@@ -9613,7 +9865,7 @@ init_ApiServicepackage();
|
|
|
9613
9865
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
9614
9866
|
function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpdate }) {
|
|
9615
9867
|
var _a, _b, _c, _d, _e;
|
|
9616
|
-
const [formData, setFormData] = (0, import_react42.useState)({
|
|
9868
|
+
const [formData, setFormData] = (0, import_react42.useState)(__spreadValues({
|
|
9617
9869
|
workflowStepId: "",
|
|
9618
9870
|
canView: false,
|
|
9619
9871
|
canEdit: false,
|
|
@@ -9626,8 +9878,9 @@ function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpda
|
|
|
9626
9878
|
canDelegate: false,
|
|
9627
9879
|
canHold: false,
|
|
9628
9880
|
isActive: true,
|
|
9881
|
+
createdBy: "System",
|
|
9629
9882
|
updatedBy: "System"
|
|
9630
|
-
});
|
|
9883
|
+
}, getPermissionLabelValues()));
|
|
9631
9884
|
const [errors, setErrors] = (0, import_react42.useState)({});
|
|
9632
9885
|
const [isSubmitting, setIsSubmitting] = (0, import_react42.useState)(false);
|
|
9633
9886
|
const [workflowSteps, setWorkflowSteps] = (0, import_react42.useState)([]);
|
|
@@ -9652,9 +9905,9 @@ function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpda
|
|
|
9652
9905
|
})();
|
|
9653
9906
|
}, [isOpen]);
|
|
9654
9907
|
(0, import_react42.useEffect)(() => {
|
|
9655
|
-
var _a2, _b2, _c2, _d2, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
9908
|
+
var _a2, _b2, _c2, _d2, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
|
|
9656
9909
|
if (selectedData) {
|
|
9657
|
-
setFormData({
|
|
9910
|
+
setFormData(__spreadValues({
|
|
9658
9911
|
workflowStepId: (_b2 = (_a2 = selectedData.workflowStepId) != null ? _a2 : selectedData.WorkflowStepId) != null ? _b2 : "",
|
|
9659
9912
|
canView: (_d2 = (_c2 = selectedData.canView) != null ? _c2 : selectedData.CanView) != null ? _d2 : false,
|
|
9660
9913
|
canEdit: (_f = (_e2 = selectedData.canEdit) != null ? _e2 : selectedData.CanEdit) != null ? _f : false,
|
|
@@ -9667,8 +9920,9 @@ function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpda
|
|
|
9667
9920
|
canDelegate: (_t = (_s = selectedData.canDelegate) != null ? _s : selectedData.CanDelegate) != null ? _t : false,
|
|
9668
9921
|
canHold: (_v = (_u = selectedData.canHold) != null ? _u : selectedData.CanHold) != null ? _v : false,
|
|
9669
9922
|
isActive: (_x = (_w = selectedData.isActive) != null ? _w : selectedData.IsActive) != null ? _x : true,
|
|
9670
|
-
|
|
9671
|
-
|
|
9923
|
+
createdBy: (_z = (_y = selectedData.createdBy) != null ? _y : selectedData.CreatedBy) != null ? _z : "System",
|
|
9924
|
+
updatedBy: (_B = (_A = selectedData.updatedBy) != null ? _A : selectedData.UpdatedBy) != null ? _B : "System"
|
|
9925
|
+
}, getPermissionLabelValues(selectedData)));
|
|
9672
9926
|
setErrors({});
|
|
9673
9927
|
}
|
|
9674
9928
|
}, [selectedData]);
|
|
@@ -9691,7 +9945,7 @@ function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpda
|
|
|
9691
9945
|
const permissionId = Number(
|
|
9692
9946
|
(_b2 = (_a2 = selectedData == null ? void 0 : selectedData.stepPermissionId) != null ? _a2 : selectedData == null ? void 0 : selectedData.id) != null ? _b2 : 0
|
|
9693
9947
|
);
|
|
9694
|
-
const payload = __spreadProps(__spreadValues({}, formData), {
|
|
9948
|
+
const payload = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, formData), {
|
|
9695
9949
|
stepPermissionId: permissionId,
|
|
9696
9950
|
workflowStepId: Number(formData.workflowStepId) || 0,
|
|
9697
9951
|
canView: Boolean(formData.canView),
|
|
@@ -9705,6 +9959,8 @@ function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpda
|
|
|
9705
9959
|
canDelegate: Boolean(formData.canDelegate),
|
|
9706
9960
|
canHold: Boolean(formData.canHold),
|
|
9707
9961
|
isActive: Boolean(formData.isActive),
|
|
9962
|
+
createdBy: String(formData.createdBy).trim() || "System"
|
|
9963
|
+
}), getPermissionLabelPayload(formData)), {
|
|
9708
9964
|
updatedBy: String(formData.updatedBy).trim() || "System"
|
|
9709
9965
|
});
|
|
9710
9966
|
await onUpdate(payload);
|
|
@@ -9809,6 +10065,25 @@ function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpda
|
|
|
9809
10065
|
)
|
|
9810
10066
|
] }, field)) })
|
|
9811
10067
|
] }),
|
|
10068
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "fc:bg-white fc:p-6 fc:rounded-2xl fc:border fc:border-slate-100/80 fc:shadow-sm fc:space-y-5", children: [
|
|
10069
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:text-indigo-600 fc:text-sm fc:font-bold fc:border-b fc:border-slate-50 fc:pb-3", children: [
|
|
10070
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: "\u{1F3F7}\uFE0F" }),
|
|
10071
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: "Action Labels" })
|
|
10072
|
+
] }),
|
|
10073
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "fc:grid fc:grid-cols-2 fc:gap-4", children: permissionLabelFields.map(({ field, label, fallback }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { children: [
|
|
10074
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: label }),
|
|
10075
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
10076
|
+
"input",
|
|
10077
|
+
{
|
|
10078
|
+
type: "text",
|
|
10079
|
+
value: formData[field],
|
|
10080
|
+
onChange: (event) => handleChange(field, event.target.value),
|
|
10081
|
+
placeholder: fallback,
|
|
10082
|
+
className: "fc:w-full fc:px-3 fc:py-2.5 fc:border fc:border-slate-200 fc:rounded-xl fc:text-xs fc:text-slate-700 fc:bg-white focus:fc:outline-none focus:fc:ring-2 focus:fc:ring-indigo-500/10 focus:fc:border-indigo-500"
|
|
10083
|
+
}
|
|
10084
|
+
)
|
|
10085
|
+
] }, field)) })
|
|
10086
|
+
] }),
|
|
9812
10087
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "fc:bg-white fc:p-6 fc:rounded-2xl fc:border fc:border-slate-100/80 fc:shadow-sm fc:space-y-4", children: [
|
|
9813
10088
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:text-indigo-600 fc:text-sm fc:font-bold fc:border-b fc:border-slate-50 fc:pb-3", children: [
|
|
9814
10089
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: "\u{1F518}" }),
|
|
@@ -9919,7 +10194,7 @@ function TaskPermissionMain() {
|
|
|
9919
10194
|
const permissionId = Number(
|
|
9920
10195
|
(_c = (_b = item.stepPermissionId) != null ? _b : item.id) != null ? _c : 0
|
|
9921
10196
|
);
|
|
9922
|
-
await getApiService().put(endpoint2, {
|
|
10197
|
+
await getApiService().put(endpoint2, __spreadProps(__spreadValues({
|
|
9923
10198
|
stepPermissionId: permissionId,
|
|
9924
10199
|
workflowStepId: Number(item.workflowStepId) || 0,
|
|
9925
10200
|
canView: Boolean(item.canView),
|
|
@@ -9933,8 +10208,10 @@ function TaskPermissionMain() {
|
|
|
9933
10208
|
canDelegate: Boolean(item.canDelegate),
|
|
9934
10209
|
canHold: Boolean(item.canHold),
|
|
9935
10210
|
isActive: Boolean(item.isActive),
|
|
10211
|
+
createdBy: item.createdBy || item.CreatedBy || "System"
|
|
10212
|
+
}, getPermissionLabelPayload(item)), {
|
|
9936
10213
|
updatedBy: item.updatedBy || "System"
|
|
9937
|
-
});
|
|
10214
|
+
}));
|
|
9938
10215
|
handleRefresh();
|
|
9939
10216
|
return true;
|
|
9940
10217
|
} catch (error) {
|
|
@@ -19001,7 +19278,7 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file, isSubmitting
|
|
|
19001
19278
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "fc:w-10 fc:h-10 fc:bg-blue-50 fc:text-blue-600 fc:rounded-xl fc:flex fc:items-center fc:justify-center fc:shadow-inner", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react95.RiInboxArchiveLine, { size: 20 }) }),
|
|
19002
19279
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { children: [
|
|
19003
19280
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h3", { className: "fc:text-base fc:font-bold fc:text-slate-800", children: "Claim Workflow Files" }),
|
|
19004
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "fc:text-xs fc:text-slate-500", children: "Claim unclaimed
|
|
19281
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "fc:text-xs fc:text-slate-500", children: "Claim this unclaimed file for the selected step" })
|
|
19005
19282
|
] })
|
|
19006
19283
|
] }),
|
|
19007
19284
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
@@ -19019,9 +19296,7 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file, isSubmitting
|
|
|
19019
19296
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "fc:flex fc:items-start fc:gap-3 fc:p-3.5 fc:bg-blue-50/70 fc:border fc:border-blue-100 fc:rounded-2xl", children: [
|
|
19020
19297
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react95.RiAlertLine, { size: 20, className: "fc:text-blue-600 fc:shrink-0 fc:mt-0.5" }),
|
|
19021
19298
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "fc:text-xs fc:text-blue-900 fc:leading-relaxed", children: [
|
|
19022
|
-
"Confirming will
|
|
19023
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("strong", { className: "fc:font-bold", children: "all unclaimed files" }),
|
|
19024
|
-
" for this workflow step and assign them to your ",
|
|
19299
|
+
"Confirming will assign this file to your ",
|
|
19025
19300
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("strong", { className: "fc:font-bold", children: "My Files" }),
|
|
19026
19301
|
" queue."
|
|
19027
19302
|
] })
|
|
@@ -19075,7 +19350,7 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file, isSubmitting
|
|
|
19075
19350
|
className: "fc:px-5 fc:py-2 fc:bg-blue-600 hover:fc:bg-blue-700 fc:text-white fc:text-xs fc:font-bold fc:rounded-xl fc:shadow-md fc:shadow-blue-500/20 fc:transition-all fc:flex fc:items-center fc:gap-1.5 disabled:fc:cursor-not-allowed disabled:fc:opacity-60",
|
|
19076
19351
|
children: [
|
|
19077
19352
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react95.RiCheckLine, { size: 16 }),
|
|
19078
|
-
isSubmitting ? "Claiming..." : "Yes, Claim
|
|
19353
|
+
isSubmitting ? "Claiming..." : "Yes, Claim File"
|
|
19079
19354
|
]
|
|
19080
19355
|
}
|
|
19081
19356
|
)
|
|
@@ -19452,7 +19727,7 @@ var formatInboxDate = (value) => {
|
|
|
19452
19727
|
});
|
|
19453
19728
|
};
|
|
19454
19729
|
var normalizePoolFile = (file) => {
|
|
19455
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
19730
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C;
|
|
19456
19731
|
const taskInstanceId = (_a = file.taskInstanceId) != null ? _a : file.TaskInstanceId;
|
|
19457
19732
|
const filePoolId = (_b = file.filePoolId) != null ? _b : file.FilePoolId;
|
|
19458
19733
|
const businessEntity = (_c = file.businessEntityType) != null ? _c : file.BusinessEntityType;
|
|
@@ -19472,14 +19747,14 @@ var normalizePoolFile = (file) => {
|
|
|
19472
19747
|
priority: (_t = file.priority) != null ? _t : "Medium",
|
|
19473
19748
|
receivedDate: formatInboxDate((_v = (_u = file.addedOn) != null ? _u : file.createdAt) != null ? _v : file.receivedDate),
|
|
19474
19749
|
dueDate: formatInboxDate(file.dueDate),
|
|
19475
|
-
slaStatus: (_w = file.slaStatus) != null ? _w : "-",
|
|
19476
|
-
status: "Available",
|
|
19750
|
+
slaStatus: (_x = (_w = file.slaStatus) != null ? _w : file.SlaStatus) != null ? _x : "-",
|
|
19751
|
+
status: (_B = (_A = (_z = (_y = file.statusName) != null ? _y : file.StatusName) != null ? _z : file.fileStatus) != null ? _A : file.FileStatus) != null ? _B : "Available",
|
|
19477
19752
|
assignedTo: "-",
|
|
19478
|
-
currentStep: (
|
|
19753
|
+
currentStep: (_C = file.stepName) != null ? _C : "-"
|
|
19479
19754
|
});
|
|
19480
19755
|
};
|
|
19481
19756
|
var normalizeMyFile = (file) => {
|
|
19482
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E;
|
|
19757
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K;
|
|
19483
19758
|
const taskInstanceId = (_a = file.taskInstanceId) != null ? _a : file.TaskInstanceId;
|
|
19484
19759
|
const businessEntityId = (_b = file.businessEntityId) != null ? _b : file.BusinessEntityId;
|
|
19485
19760
|
const businessEntity = (_c = file.businessEntityType) != null ? _c : file.BusinessEntityType;
|
|
@@ -19497,11 +19772,12 @@ var normalizeMyFile = (file) => {
|
|
|
19497
19772
|
sender: (_s = (_r = file.sender) != null ? _r : businessEntity) != null ? _s : "-",
|
|
19498
19773
|
priority: (_t = file.priority) != null ? _t : "Medium",
|
|
19499
19774
|
receivedDate: formatInboxDate((_u = file.createdAt) != null ? _u : file.receivedDate),
|
|
19500
|
-
dueDate: formatInboxDate(file.dueDate),
|
|
19501
|
-
slaStatus: (
|
|
19502
|
-
status: (
|
|
19503
|
-
|
|
19504
|
-
|
|
19775
|
+
dueDate: formatInboxDate((_v = file.dueDate) != null ? _v : file.DueDate),
|
|
19776
|
+
slaStatus: (_x = (_w = file.slaStatus) != null ? _w : file.SlaStatus) != null ? _x : "-",
|
|
19777
|
+
status: (_B = (_A = (_z = (_y = file.fileStatus) != null ? _y : file.FileStatus) != null ? _z : file.statusName) != null ? _A : file.StatusName) != null ? _B : "In Progress",
|
|
19778
|
+
fileAt: (_D = (_C = file.fileAt) != null ? _C : file.FileAt) != null ? _D : "-",
|
|
19779
|
+
assignedTo: (_J = (_I = (_H = (_G = (_F = (_E = file.assignedTo) != null ? _E : file.AssignedTo) != null ? _F : file.assignedUserName) != null ? _G : file.AssignedUserName) != null ? _H : file.assignedUserId) != null ? _I : file.AssignedUserId) != null ? _J : "-",
|
|
19780
|
+
currentStep: (_K = file.stepName) != null ? _K : "-"
|
|
19505
19781
|
});
|
|
19506
19782
|
};
|
|
19507
19783
|
function InboxMain() {
|
|
@@ -19518,6 +19794,7 @@ function InboxMain() {
|
|
|
19518
19794
|
const [myFiles, setMyFiles] = (0, import_react100.useState)([]);
|
|
19519
19795
|
const [totalFiles, setTotalFiles] = (0, import_react100.useState)([]);
|
|
19520
19796
|
const [refreshKey, setRefreshKey] = (0, import_react100.useState)(0);
|
|
19797
|
+
const [isUnclaiming, setIsUnclaiming] = (0, import_react100.useState)(false);
|
|
19521
19798
|
(0, import_react100.useEffect)(() => {
|
|
19522
19799
|
let isCurrent = true;
|
|
19523
19800
|
const loadAssignedSteps = async () => {
|
|
@@ -19779,7 +20056,7 @@ function InboxMain() {
|
|
|
19779
20056
|
if (searchQuery.trim()) {
|
|
19780
20057
|
const q = searchQuery.toLowerCase().trim();
|
|
19781
20058
|
result = result.filter(
|
|
19782
|
-
(f) => f.fileNumber.toLowerCase().includes(q) || f.subject.toLowerCase().includes(q) || f.workflowName.toLowerCase().includes(q) || f.department && f.department.toLowerCase().includes(q) || f.applicant && f.applicant.toLowerCase().includes(q) || f.category && f.category.toLowerCase().includes(q) || f.financialYear && f.financialYear.toLowerCase().includes(q) || f.sender.toLowerCase().includes(q) || f.status && f.status.toLowerCase().includes(q)
|
|
20059
|
+
(f) => f.fileNumber.toLowerCase().includes(q) || f.subject.toLowerCase().includes(q) || f.workflowName.toLowerCase().includes(q) || f.department && f.department.toLowerCase().includes(q) || f.applicant && f.applicant.toLowerCase().includes(q) || f.category && f.category.toLowerCase().includes(q) || f.financialYear && f.financialYear.toLowerCase().includes(q) || f.sender.toLowerCase().includes(q) || f.fileAt && f.fileAt.toLowerCase().includes(q) || f.status && f.status.toLowerCase().includes(q)
|
|
19783
20060
|
);
|
|
19784
20061
|
}
|
|
19785
20062
|
if (priorityFilter !== "all") {
|
|
@@ -19827,11 +20104,16 @@ function InboxMain() {
|
|
|
19827
20104
|
setPoolModalOpen(true);
|
|
19828
20105
|
};
|
|
19829
20106
|
const handleConfirmPool = async () => {
|
|
19830
|
-
var _a, _b;
|
|
20107
|
+
var _a, _b, _c;
|
|
19831
20108
|
if (!activeWorkflowStepId) {
|
|
19832
20109
|
await import_sweetalert229.default.fire("Error", "Select an assigned workflow step before claiming files.", "error");
|
|
19833
20110
|
return;
|
|
19834
20111
|
}
|
|
20112
|
+
const filePoolId = Number((_a = selectedPoolFile == null ? void 0 : selectedPoolFile.filePoolId) != null ? _a : selectedPoolFile == null ? void 0 : selectedPoolFile.FilePoolId);
|
|
20113
|
+
if (!Number.isInteger(filePoolId) || filePoolId <= 0) {
|
|
20114
|
+
await import_sweetalert229.default.fire("Error", "The selected file pool entry has no valid FilePoolId.", "error");
|
|
20115
|
+
return;
|
|
20116
|
+
}
|
|
19835
20117
|
setIsClaimingPool(true);
|
|
19836
20118
|
try {
|
|
19837
20119
|
const claimEndpoint = getInboxEndpoint(
|
|
@@ -19842,7 +20124,8 @@ function InboxMain() {
|
|
|
19842
20124
|
throw new Error("Claim endpoint is not configured (flowCore.inbox.claimUnclaimedFilesByWorkflowStepId).");
|
|
19843
20125
|
}
|
|
19844
20126
|
await getApiService().post(claimEndpoint, {
|
|
19845
|
-
workflowStepId: Number(activeWorkflowStepId)
|
|
20127
|
+
workflowStepId: Number(activeWorkflowStepId),
|
|
20128
|
+
filePoolId
|
|
19846
20129
|
});
|
|
19847
20130
|
setPoolModalOpen(false);
|
|
19848
20131
|
setSelectedPoolFile(null);
|
|
@@ -19851,7 +20134,7 @@ function InboxMain() {
|
|
|
19851
20134
|
await import_sweetalert229.default.fire({
|
|
19852
20135
|
icon: "success",
|
|
19853
20136
|
title: "Files Claimed",
|
|
19854
|
-
text: "
|
|
20137
|
+
text: "The selected file has been assigned to your My Files queue.",
|
|
19855
20138
|
confirmButtonColor: "#2563eb",
|
|
19856
20139
|
timer: 3e3,
|
|
19857
20140
|
timerProgressBar: true
|
|
@@ -19859,13 +20142,44 @@ function InboxMain() {
|
|
|
19859
20142
|
} catch (error) {
|
|
19860
20143
|
await import_sweetalert229.default.fire(
|
|
19861
20144
|
"Error",
|
|
19862
|
-
((
|
|
20145
|
+
((_c = (_b = error == null ? void 0 : error.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || (error == null ? void 0 : error.message) || "Unable to claim files.",
|
|
19863
20146
|
"error"
|
|
19864
20147
|
);
|
|
19865
20148
|
} finally {
|
|
19866
20149
|
setIsClaimingPool(false);
|
|
19867
20150
|
}
|
|
19868
20151
|
};
|
|
20152
|
+
const handleUnclaim = async (file) => {
|
|
20153
|
+
var _a, _b, _c;
|
|
20154
|
+
const filePoolId = Number((_a = file.taskInstanceId) != null ? _a : file.TaskInstanceId);
|
|
20155
|
+
if (!Number.isInteger(filePoolId) || filePoolId <= 0) {
|
|
20156
|
+
await import_sweetalert229.default.fire("Error", "This file has no valid task instance ID to unclaim.", "error");
|
|
20157
|
+
return;
|
|
20158
|
+
}
|
|
20159
|
+
setIsUnclaiming(true);
|
|
20160
|
+
try {
|
|
20161
|
+
const endpoint2 = getInboxEndpoint(["inbox", "Inbox", "filePool", "FilePool"], "UnClaimClaimedFile");
|
|
20162
|
+
if (!endpoint2) throw new Error("Unclaim endpoint is not configured (flowCore.inbox.UnClaimClaimedFile).");
|
|
20163
|
+
await getApiService().post(endpoint2, { filePoolId });
|
|
20164
|
+
setRefreshKey((previous) => previous + 1);
|
|
20165
|
+
await import_sweetalert229.default.fire({
|
|
20166
|
+
icon: "success",
|
|
20167
|
+
title: "File Unclaimed",
|
|
20168
|
+
text: "The file has been released back to the file pool.",
|
|
20169
|
+
confirmButtonColor: "#2563eb",
|
|
20170
|
+
timer: 3e3,
|
|
20171
|
+
timerProgressBar: true
|
|
20172
|
+
});
|
|
20173
|
+
} catch (error) {
|
|
20174
|
+
await import_sweetalert229.default.fire(
|
|
20175
|
+
"Error",
|
|
20176
|
+
((_c = (_b = error == null ? void 0 : error.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || (error == null ? void 0 : error.message) || "Unable to unclaim the file.",
|
|
20177
|
+
"error"
|
|
20178
|
+
);
|
|
20179
|
+
} finally {
|
|
20180
|
+
setIsUnclaiming(false);
|
|
20181
|
+
}
|
|
20182
|
+
};
|
|
19869
20183
|
const handleOpenTakeAction = (file) => {
|
|
19870
20184
|
setSelectedActionFile(file);
|
|
19871
20185
|
setActionModalOpen(true);
|
|
@@ -19936,6 +20250,7 @@ function InboxMain() {
|
|
|
19936
20250
|
"Priority",
|
|
19937
20251
|
"Received Date",
|
|
19938
20252
|
"Due Date",
|
|
20253
|
+
...activeTab === "totalFiles" ? ["File At"] : [],
|
|
19939
20254
|
"SLA Status",
|
|
19940
20255
|
"Status"
|
|
19941
20256
|
];
|
|
@@ -19948,6 +20263,7 @@ function InboxMain() {
|
|
|
19948
20263
|
`"${f.priority}"`,
|
|
19949
20264
|
`"${f.receivedDate}"`,
|
|
19950
20265
|
`"${f.dueDate}"`,
|
|
20266
|
+
...activeTab === "totalFiles" ? [`"${f.fileAt}"`] : [],
|
|
19951
20267
|
`"${f.slaStatus}"`,
|
|
19952
20268
|
`"${f.status}"`
|
|
19953
20269
|
]);
|
|
@@ -20278,387 +20594,426 @@ function InboxMain() {
|
|
|
20278
20594
|
] })
|
|
20279
20595
|
] }),
|
|
20280
20596
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { ref: tableRef, className: "fc:flex-1 fc:overflow-hidden fc:flex fc:flex-col fc:pt-3", children: [
|
|
20281
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.
|
|
20282
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("
|
|
20283
|
-
|
|
20284
|
-
|
|
20285
|
-
|
|
20286
|
-
|
|
20287
|
-
|
|
20288
|
-
|
|
20289
|
-
|
|
20290
|
-
|
|
20291
|
-
|
|
20292
|
-
|
|
20293
|
-
|
|
20294
|
-
|
|
20295
|
-
|
|
20296
|
-
|
|
20297
|
-
|
|
20298
|
-
|
|
20299
|
-
|
|
20300
|
-
|
|
20301
|
-
|
|
20302
|
-
|
|
20303
|
-
|
|
20304
|
-
|
|
20305
|
-
|
|
20306
|
-
|
|
20307
|
-
|
|
20308
|
-
|
|
20309
|
-
|
|
20310
|
-
|
|
20597
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:border fc:border-slate-200 fc:rounded-2xl fc:overflow-auto fc:flex-1 fc:relative", children: [
|
|
20598
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("style", { children: `
|
|
20599
|
+
.fc-inbox-table tbody td { border-bottom: 1px solid #e2e8f0; }
|
|
20600
|
+
.fc-inbox-table tbody tr:hover td { background-color: #f8fafc; }
|
|
20601
|
+
` }),
|
|
20602
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("table", { className: "fc-inbox-table fc:w-max fc:min-w-full fc:border-collapse fc:text-left", children: [
|
|
20603
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("thead", { className: "fc:sticky fc:top-0 fc:z-20 fc:bg-slate-50 fc:border-b fc:border-slate-200", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("tr", { children: [
|
|
20604
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20605
|
+
"th",
|
|
20606
|
+
{
|
|
20607
|
+
style: { width: "48px", minWidth: "48px", maxWidth: "48px" },
|
|
20608
|
+
className: "fc:sticky fc:left-0 fc:z-30 fc:bg-slate-100 fc:w-12 fc:px-2 fc:py-3.5 fc:text-center fc:text-[11px] fc:font-bold fc:text-slate-600 fc:uppercase fc:tracking-wider fc:border-r fc:border-slate-200",
|
|
20609
|
+
children: "#"
|
|
20610
|
+
}
|
|
20611
|
+
),
|
|
20612
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20613
|
+
"th",
|
|
20614
|
+
{
|
|
20615
|
+
onClick: () => handleSort("fileNumber"),
|
|
20616
|
+
style: { width: "144px", minWidth: "144px", maxWidth: "144px" },
|
|
20617
|
+
className: "fc:sticky fc:left-12 fc:z-30 fc:bg-slate-100 fc:w-36 fc:px-4 fc:py-3.5 fc:text-left fc:text-[11px] fc:font-bold fc:text-slate-600 fc:uppercase fc:tracking-wider fc:border-r fc:border-slate-200 fc:shadow-[4px_0_6px_-2px_rgba(0,0,0,0.06)] fc:cursor-pointer hover:fc:text-blue-600",
|
|
20618
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
|
|
20619
|
+
"File No ",
|
|
20620
|
+
renderSortIndicator("fileNumber")
|
|
20621
|
+
] })
|
|
20622
|
+
}
|
|
20623
|
+
),
|
|
20624
|
+
visibleDynamicColumns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20625
|
+
"th",
|
|
20626
|
+
{
|
|
20627
|
+
onClick: () => handleSort(col.key),
|
|
20628
|
+
style: {
|
|
20629
|
+
width: col.width || "180px",
|
|
20630
|
+
minWidth: col.width || "180px",
|
|
20631
|
+
maxWidth: col.width || "180px"
|
|
20632
|
+
},
|
|
20633
|
+
className: "fc:px-4 fc:py-3.5 fc:text-left fc:text-[11px] fc:font-bold fc:text-blue-900 fc:bg-blue-50/70 hover:fc:bg-blue-100/60 fc:uppercase fc:tracking-wider fc:cursor-pointer fc:border-r fc:border-blue-100/70 fc:transition-colors",
|
|
20634
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-1.5 fc:overflow-hidden", children: [
|
|
20635
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:truncate", children: col.label }),
|
|
20636
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:text-[9px] fc:font-extrabold fc:text-blue-700 fc:bg-blue-100 fc:border fc:border-blue-200/80 fc:px-1.5 fc:py-0.5 fc:rounded-md fc:tracking-wide fc:shrink-0", children: "DYN" }),
|
|
20637
|
+
renderSortIndicator(col.key)
|
|
20638
|
+
] })
|
|
20311
20639
|
},
|
|
20312
|
-
|
|
20313
|
-
|
|
20314
|
-
|
|
20315
|
-
|
|
20316
|
-
|
|
20317
|
-
|
|
20318
|
-
|
|
20319
|
-
|
|
20320
|
-
|
|
20321
|
-
|
|
20322
|
-
|
|
20323
|
-
|
|
20324
|
-
|
|
20325
|
-
|
|
20326
|
-
|
|
20327
|
-
|
|
20328
|
-
|
|
20329
|
-
|
|
20330
|
-
|
|
20331
|
-
|
|
20332
|
-
|
|
20333
|
-
|
|
20334
|
-
|
|
20335
|
-
|
|
20336
|
-
|
|
20337
|
-
|
|
20338
|
-
|
|
20339
|
-
|
|
20340
|
-
|
|
20341
|
-
|
|
20342
|
-
|
|
20343
|
-
|
|
20344
|
-
|
|
20345
|
-
|
|
20346
|
-
|
|
20347
|
-
|
|
20348
|
-
|
|
20349
|
-
|
|
20350
|
-
|
|
20351
|
-
|
|
20352
|
-
|
|
20353
|
-
|
|
20354
|
-
|
|
20355
|
-
|
|
20356
|
-
|
|
20357
|
-
|
|
20358
|
-
|
|
20359
|
-
|
|
20360
|
-
|
|
20361
|
-
|
|
20362
|
-
|
|
20363
|
-
|
|
20364
|
-
|
|
20365
|
-
|
|
20366
|
-
|
|
20367
|
-
|
|
20368
|
-
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20372
|
-
|
|
20373
|
-
|
|
20374
|
-
|
|
20375
|
-
|
|
20376
|
-
|
|
20377
|
-
|
|
20378
|
-
|
|
20379
|
-
|
|
20380
|
-
|
|
20381
|
-
|
|
20382
|
-
|
|
20383
|
-
|
|
20384
|
-
|
|
20385
|
-
|
|
20386
|
-
|
|
20387
|
-
|
|
20388
|
-
|
|
20389
|
-
|
|
20390
|
-
|
|
20391
|
-
|
|
20392
|
-
|
|
20393
|
-
|
|
20394
|
-
|
|
20640
|
+
col.key
|
|
20641
|
+
)),
|
|
20642
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20643
|
+
"th",
|
|
20644
|
+
{
|
|
20645
|
+
onClick: () => handleSort("subject"),
|
|
20646
|
+
style: { width: "300px", minWidth: "300px", maxWidth: "300px" },
|
|
20647
|
+
className: "fc:px-4 fc:py-3.5 fc:text-left fc:text-[11px] fc:font-bold fc:text-slate-600 fc:uppercase fc:tracking-wider fc:cursor-pointer hover:fc:text-blue-600",
|
|
20648
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
|
|
20649
|
+
"Subject / Title ",
|
|
20650
|
+
renderSortIndicator("subject")
|
|
20651
|
+
] })
|
|
20652
|
+
}
|
|
20653
|
+
),
|
|
20654
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20655
|
+
"th",
|
|
20656
|
+
{
|
|
20657
|
+
onClick: () => handleSort("workflowName"),
|
|
20658
|
+
style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
|
|
20659
|
+
className: "fc:px-4 fc:py-3.5 fc:text-left fc:text-[11px] fc:font-bold fc:text-slate-600 fc:uppercase fc:tracking-wider fc:cursor-pointer hover:fc:text-blue-600",
|
|
20660
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
|
|
20661
|
+
"Workflow ",
|
|
20662
|
+
renderSortIndicator("workflowName")
|
|
20663
|
+
] })
|
|
20664
|
+
}
|
|
20665
|
+
),
|
|
20666
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20667
|
+
"th",
|
|
20668
|
+
{
|
|
20669
|
+
onClick: () => handleSort("sender"),
|
|
20670
|
+
style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
|
|
20671
|
+
className: "fc:px-4 fc:py-3.5 fc:text-left fc:text-[11px] fc:font-bold fc:text-slate-600 fc:uppercase fc:tracking-wider fc:cursor-pointer hover:fc:text-blue-600",
|
|
20672
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
|
|
20673
|
+
"Sender / Initiator ",
|
|
20674
|
+
renderSortIndicator("sender")
|
|
20675
|
+
] })
|
|
20676
|
+
}
|
|
20677
|
+
),
|
|
20678
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20679
|
+
"th",
|
|
20680
|
+
{
|
|
20681
|
+
onClick: () => handleSort("priority"),
|
|
20682
|
+
style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
|
|
20683
|
+
className: "fc:px-3 fc:py-3.5 fc:text-center fc:text-[11px] fc:font-bold fc:text-slate-600 fc:uppercase fc:tracking-wider fc:cursor-pointer hover:fc:text-blue-600",
|
|
20684
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-center", children: [
|
|
20685
|
+
"Priority ",
|
|
20686
|
+
renderSortIndicator("priority")
|
|
20687
|
+
] })
|
|
20688
|
+
}
|
|
20689
|
+
),
|
|
20690
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20691
|
+
"th",
|
|
20692
|
+
{
|
|
20693
|
+
onClick: () => handleSort("receivedDate"),
|
|
20694
|
+
style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
|
|
20695
|
+
className: "fc:px-4 fc:py-3.5 fc:text-left fc:text-[11px] fc:font-bold fc:text-slate-600 fc:uppercase fc:tracking-wider fc:cursor-pointer hover:fc:text-blue-600",
|
|
20696
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
|
|
20697
|
+
"Received On ",
|
|
20698
|
+
renderSortIndicator("receivedDate")
|
|
20699
|
+
] })
|
|
20700
|
+
}
|
|
20701
|
+
),
|
|
20702
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20703
|
+
"th",
|
|
20704
|
+
{
|
|
20705
|
+
onClick: () => handleSort("dueDate"),
|
|
20706
|
+
style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
|
|
20707
|
+
className: "fc:px-4 fc:py-3.5 fc:text-left fc:text-[11px] fc:font-bold fc:text-slate-600 fc:uppercase fc:tracking-wider fc:cursor-pointer hover:fc:text-blue-600",
|
|
20708
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
|
|
20709
|
+
"SLA / Due ",
|
|
20710
|
+
renderSortIndicator("dueDate")
|
|
20711
|
+
] })
|
|
20712
|
+
}
|
|
20713
|
+
),
|
|
20714
|
+
activeTab === "totalFiles" && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20715
|
+
"th",
|
|
20716
|
+
{
|
|
20717
|
+
onClick: () => handleSort("fileAt"),
|
|
20718
|
+
style: { width: "160px", minWidth: "160px", maxWidth: "160px" },
|
|
20719
|
+
className: "fc:px-4 fc:py-3.5 fc:text-left fc:text-[11px] fc:font-bold fc:text-slate-600 fc:uppercase fc:tracking-wider fc:cursor-pointer hover:fc:text-blue-600",
|
|
20720
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
|
|
20721
|
+
"File At ",
|
|
20722
|
+
renderSortIndicator("fileAt")
|
|
20723
|
+
] })
|
|
20724
|
+
}
|
|
20725
|
+
),
|
|
20726
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20727
|
+
"th",
|
|
20728
|
+
{
|
|
20729
|
+
onClick: () => handleSort("status"),
|
|
20730
|
+
style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
|
|
20731
|
+
className: "fc:px-3 fc:py-3.5 fc:text-center fc:text-[11px] fc:font-bold fc:text-slate-600 fc:uppercase fc:tracking-wider fc:cursor-pointer hover:fc:text-blue-600",
|
|
20732
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-center", children: [
|
|
20733
|
+
"Status ",
|
|
20734
|
+
renderSortIndicator("status")
|
|
20735
|
+
] })
|
|
20736
|
+
}
|
|
20737
|
+
),
|
|
20738
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20739
|
+
"th",
|
|
20740
|
+
{
|
|
20741
|
+
style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
|
|
20742
|
+
className: "fc:sticky fc:right-0 fc:z-30 fc:bg-slate-100 fc:px-3 fc:py-3.5 fc:text-center fc:text-[11px] fc:font-bold fc:text-slate-700 fc:uppercase fc:tracking-wider fc:border-l fc:border-slate-200 fc:shadow-[-5px_0_10px_-4px_rgba(0,0,0,0.08)]",
|
|
20743
|
+
children: "Action"
|
|
20744
|
+
}
|
|
20745
|
+
)
|
|
20746
|
+
] }) }),
|
|
20747
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("tbody", { className: "fc:divide-y fc:divide-slate-100 fc:bg-white", children: paginatedData.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20748
|
+
"td",
|
|
20395
20749
|
{
|
|
20396
|
-
|
|
20397
|
-
|
|
20398
|
-
className: "fc:
|
|
20399
|
-
|
|
20400
|
-
"
|
|
20401
|
-
|
|
20750
|
+
colSpan: 10 + visibleDynamicColumns.length + (activeTab === "totalFiles" ? 1 : 0),
|
|
20751
|
+
className: "fc:py-12 fc:text-center",
|
|
20752
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:flex-col fc:items-center fc:justify-center fc:gap-2 fc:text-slate-400", children: [
|
|
20753
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiInboxLine, { size: 36, className: "fc:text-slate-300" }),
|
|
20754
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "fc:text-sm fc:font-bold fc:text-slate-600", children: "No Files Found" }),
|
|
20755
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "fc:text-xs", children: searchQuery ? `No records matching "${searchQuery}" in ${activeTab}` : `There are currently no files in ${activeTab}` })
|
|
20402
20756
|
] })
|
|
20403
20757
|
}
|
|
20404
|
-
),
|
|
20405
|
-
|
|
20406
|
-
|
|
20407
|
-
|
|
20408
|
-
|
|
20409
|
-
|
|
20410
|
-
|
|
20411
|
-
|
|
20412
|
-
)
|
|
20413
|
-
] }) }),
|
|
20414
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("tbody", { className: "fc:divide-y fc:divide-slate-100 fc:bg-white", children: paginatedData.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20415
|
-
"td",
|
|
20416
|
-
{
|
|
20417
|
-
colSpan: 10 + visibleDynamicColumns.length,
|
|
20418
|
-
className: "fc:py-12 fc:text-center",
|
|
20419
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:flex-col fc:items-center fc:justify-center fc:gap-2 fc:text-slate-400", children: [
|
|
20420
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiInboxLine, { size: 36, className: "fc:text-slate-300" }),
|
|
20421
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "fc:text-sm fc:font-bold fc:text-slate-600", children: "No Files Found" }),
|
|
20422
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "fc:text-xs", children: searchQuery ? `No records matching "${searchQuery}" in ${activeTab}` : `There are currently no files in ${activeTab}` })
|
|
20423
|
-
] })
|
|
20424
|
-
}
|
|
20425
|
-
) }) : paginatedData.map((row, index) => {
|
|
20426
|
-
const rowIndex = startIndex + index + 1;
|
|
20427
|
-
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
20428
|
-
"tr",
|
|
20429
|
-
{
|
|
20430
|
-
className: "fc:group hover:fc:bg-slate-50/80 fc:transition-colors",
|
|
20431
|
-
children: [
|
|
20432
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20433
|
-
"td",
|
|
20434
|
-
{
|
|
20435
|
-
style: { width: "48px", minWidth: "48px", maxWidth: "48px" },
|
|
20436
|
-
className: "fc:sticky fc:left-0 fc:z-10 fc:bg-white group-hover:fc:bg-slate-50 fc:w-12 fc:px-2 fc:py-3 fc:text-center fc:align-middle fc:text-xs fc:font-semibold fc:text-slate-400 fc:border-r fc:border-slate-100",
|
|
20437
|
-
children: rowIndex
|
|
20438
|
-
}
|
|
20439
|
-
),
|
|
20440
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20441
|
-
"td",
|
|
20442
|
-
{
|
|
20443
|
-
style: { width: "144px", minWidth: "144px", maxWidth: "144px" },
|
|
20444
|
-
className: "fc:sticky fc:left-12 fc:z-10 fc:bg-white group-hover:fc:bg-slate-50 fc:w-36 fc:px-4 fc:py-3 fc:align-middle fc:whitespace-nowrap fc:border-r fc:border-slate-100 fc:shadow-[4px_0_6px_-2px_rgba(0,0,0,0.05)]",
|
|
20445
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
20446
|
-
"div",
|
|
20447
|
-
{
|
|
20448
|
-
onMouseEnter: hasHiddenDynamicColumns ? (e) => handleFileMouseEnter(row, e) : void 0,
|
|
20449
|
-
onMouseLeave: hasHiddenDynamicColumns ? handleFileMouseLeave : void 0,
|
|
20450
|
-
className: `fc:inline-flex fc:items-center fc:gap-1.5 fc:px-2.5 fc:py-1 fc:rounded-lg fc:transition-all ${hasHiddenDynamicColumns ? "fc:bg-blue-50 hover:fc:bg-blue-100/90 fc:border fc:border-blue-200/90 hover:fc:border-blue-300 fc:text-blue-700 fc:cursor-pointer hover:fc:shadow-sm" : "fc:bg-blue-50 fc:border fc:border-blue-100/90 fc:text-blue-600"}`,
|
|
20451
|
-
children: [
|
|
20452
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:text-xs fc:font-extrabold", children: row.fileNumber }),
|
|
20453
|
-
hasHiddenDynamicColumns && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { className: "fc:inline-flex fc:items-center fc:gap-0.5 fc:px-1.5 fc:py-0.2 fc:rounded fc:bg-amber-100/90 fc:text-amber-800 fc:text-[9px] fc:font-black fc:border fc:border-amber-200/80", children: [
|
|
20454
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiEyeOffLine, { size: 10 }),
|
|
20455
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: hiddenDynamicColumns.length })
|
|
20456
|
-
] })
|
|
20457
|
-
]
|
|
20458
|
-
}
|
|
20459
|
-
)
|
|
20460
|
-
}
|
|
20461
|
-
),
|
|
20462
|
-
visibleDynamicColumns.map((col) => {
|
|
20463
|
-
const colWidthNum = parseInt(col.width || "180", 10);
|
|
20464
|
-
const contentWidth = `${Math.max(colWidthNum - 32, 80)}px`;
|
|
20465
|
-
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20758
|
+
) }) : paginatedData.map((row, index) => {
|
|
20759
|
+
const rowIndex = startIndex + index + 1;
|
|
20760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
20761
|
+
"tr",
|
|
20762
|
+
{
|
|
20763
|
+
className: "fc:group hover:fc:bg-slate-50/80 fc:transition-colors",
|
|
20764
|
+
children: [
|
|
20765
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20466
20766
|
"td",
|
|
20467
20767
|
{
|
|
20468
|
-
style: {
|
|
20469
|
-
|
|
20470
|
-
|
|
20471
|
-
|
|
20472
|
-
|
|
20473
|
-
|
|
20474
|
-
|
|
20768
|
+
style: { width: "48px", minWidth: "48px", maxWidth: "48px" },
|
|
20769
|
+
className: "fc:sticky fc:left-0 fc:z-10 fc:bg-white group-hover:fc:bg-slate-50 fc:w-12 fc:px-2 fc:py-3 fc:text-center fc:align-middle fc:text-xs fc:font-semibold fc:text-slate-400 fc:border-r fc:border-slate-100",
|
|
20770
|
+
children: rowIndex
|
|
20771
|
+
}
|
|
20772
|
+
),
|
|
20773
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20774
|
+
"td",
|
|
20775
|
+
{
|
|
20776
|
+
style: { width: "144px", minWidth: "144px", maxWidth: "144px" },
|
|
20777
|
+
className: "fc:sticky fc:left-12 fc:z-10 fc:bg-white group-hover:fc:bg-slate-50 fc:w-36 fc:px-4 fc:py-3 fc:align-middle fc:whitespace-nowrap fc:border-r fc:border-slate-100 fc:shadow-[4px_0_6px_-2px_rgba(0,0,0,0.05)]",
|
|
20778
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
20475
20779
|
"div",
|
|
20476
20780
|
{
|
|
20477
|
-
|
|
20478
|
-
|
|
20479
|
-
|
|
20480
|
-
|
|
20481
|
-
|
|
20482
|
-
|
|
20483
|
-
|
|
20781
|
+
onMouseEnter: hasHiddenDynamicColumns ? (e) => handleFileMouseEnter(row, e) : void 0,
|
|
20782
|
+
onMouseLeave: hasHiddenDynamicColumns ? handleFileMouseLeave : void 0,
|
|
20783
|
+
className: `fc:inline-flex fc:items-center fc:gap-1.5 fc:px-2.5 fc:py-1 fc:rounded-lg fc:transition-all ${hasHiddenDynamicColumns ? "fc:bg-blue-50 hover:fc:bg-blue-100/90 fc:border fc:border-blue-200/90 hover:fc:border-blue-300 fc:text-blue-700 fc:cursor-pointer hover:fc:shadow-sm" : "fc:bg-blue-50 fc:border fc:border-blue-100/90 fc:text-blue-600"}`,
|
|
20784
|
+
children: [
|
|
20785
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:text-xs fc:font-extrabold", children: row.fileNumber }),
|
|
20786
|
+
hasHiddenDynamicColumns && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { className: "fc:inline-flex fc:items-center fc:gap-0.5 fc:px-1.5 fc:py-0.2 fc:rounded fc:bg-amber-100/90 fc:text-amber-800 fc:text-[9px] fc:font-black fc:border fc:border-amber-200/80", children: [
|
|
20787
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiEyeOffLine, { size: 10 }),
|
|
20788
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: hiddenDynamicColumns.length })
|
|
20789
|
+
] })
|
|
20790
|
+
]
|
|
20484
20791
|
}
|
|
20485
20792
|
)
|
|
20486
|
-
}
|
|
20487
|
-
|
|
20488
|
-
)
|
|
20489
|
-
|
|
20490
|
-
|
|
20491
|
-
|
|
20492
|
-
|
|
20493
|
-
style: { width: "300px", minWidth: "300px", maxWidth: "300px" },
|
|
20494
|
-
className: "fc:px-4 fc:py-3 fc:align-middle",
|
|
20495
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20496
|
-
"div",
|
|
20497
|
-
{
|
|
20498
|
-
style: {
|
|
20499
|
-
width: "268px",
|
|
20500
|
-
wordBreak: "break-word",
|
|
20501
|
-
overflowWrap: "anywhere"
|
|
20502
|
-
},
|
|
20503
|
-
className: "fc:whitespace-normal",
|
|
20504
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:leading-relaxed", children: row.subject })
|
|
20505
|
-
}
|
|
20506
|
-
)
|
|
20507
|
-
}
|
|
20508
|
-
),
|
|
20509
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20510
|
-
"td",
|
|
20511
|
-
{
|
|
20512
|
-
style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
|
|
20513
|
-
className: "fc:px-4 fc:py-3 fc:align-middle",
|
|
20514
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20515
|
-
"div",
|
|
20516
|
-
{
|
|
20517
|
-
style: {
|
|
20518
|
-
width: "158px",
|
|
20519
|
-
wordBreak: "break-word",
|
|
20520
|
-
overflowWrap: "anywhere"
|
|
20521
|
-
},
|
|
20522
|
-
className: "fc:whitespace-normal",
|
|
20523
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:text-xs fc:font-medium fc:text-slate-700 fc:leading-relaxed", children: row.workflowName })
|
|
20524
|
-
}
|
|
20525
|
-
)
|
|
20526
|
-
}
|
|
20527
|
-
),
|
|
20528
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20529
|
-
"td",
|
|
20530
|
-
{
|
|
20531
|
-
style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
|
|
20532
|
-
className: "fc:px-4 fc:py-3 fc:align-middle",
|
|
20533
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20534
|
-
"div",
|
|
20535
|
-
{
|
|
20536
|
-
style: {
|
|
20537
|
-
width: "158px",
|
|
20538
|
-
wordBreak: "break-word",
|
|
20539
|
-
overflowWrap: "anywhere"
|
|
20540
|
-
},
|
|
20541
|
-
className: "fc:whitespace-normal",
|
|
20542
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:text-xs fc:text-slate-600 fc:font-medium fc:leading-relaxed", children: row.sender })
|
|
20543
|
-
}
|
|
20544
|
-
)
|
|
20545
|
-
}
|
|
20546
|
-
),
|
|
20547
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20548
|
-
"td",
|
|
20549
|
-
{
|
|
20550
|
-
style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
|
|
20551
|
-
className: "fc:px-3 fc:py-3 fc:text-center fc:align-middle",
|
|
20552
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20553
|
-
"span",
|
|
20554
|
-
{
|
|
20555
|
-
className: `fc:inline-block fc:text-[10px] fc:font-extrabold fc:px-2 fc:py-0.5 fc:rounded-full ${row.priority === "Urgent" ? "fc:bg-red-50 fc:text-red-600 fc:border fc:border-red-200" : row.priority === "High" ? "fc:bg-amber-50 fc:text-amber-600 fc:border fc:border-amber-200" : row.priority === "Medium" ? "fc:bg-blue-50 fc:text-blue-600 fc:border fc:border-blue-200" : "fc:bg-slate-100 fc:text-slate-600 fc:border fc:border-slate-200"}`,
|
|
20556
|
-
children: row.priority
|
|
20557
|
-
}
|
|
20558
|
-
)
|
|
20559
|
-
}
|
|
20560
|
-
),
|
|
20561
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20562
|
-
"td",
|
|
20563
|
-
{
|
|
20564
|
-
style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
|
|
20565
|
-
className: "fc:px-4 fc:py-3 fc:align-middle",
|
|
20566
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { style: { width: "118px" }, className: "fc:whitespace-normal", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:text-[11px] fc:text-slate-500 fc:font-medium fc:leading-relaxed", children: row.receivedDate }) })
|
|
20567
|
-
}
|
|
20568
|
-
),
|
|
20569
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20570
|
-
"td",
|
|
20571
|
-
{
|
|
20572
|
-
style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
|
|
20573
|
-
className: "fc:px-4 fc:py-3 fc:align-middle",
|
|
20574
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20575
|
-
"div",
|
|
20793
|
+
}
|
|
20794
|
+
),
|
|
20795
|
+
visibleDynamicColumns.map((col) => {
|
|
20796
|
+
const colWidthNum = parseInt(col.width || "180", 10);
|
|
20797
|
+
const contentWidth = `${Math.max(colWidthNum - 32, 80)}px`;
|
|
20798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20799
|
+
"td",
|
|
20576
20800
|
{
|
|
20577
20801
|
style: {
|
|
20578
|
-
width: "
|
|
20579
|
-
|
|
20580
|
-
|
|
20802
|
+
width: col.width || "180px",
|
|
20803
|
+
minWidth: col.width || "180px",
|
|
20804
|
+
maxWidth: col.width || "180px"
|
|
20581
20805
|
},
|
|
20582
|
-
className: "fc:
|
|
20806
|
+
className: "fc:px-4 fc:py-3 fc:align-middle fc:border-r fc:border-blue-100/60 fc:bg-blue-50/30 group-hover:fc:bg-blue-50/60 fc:transition-colors",
|
|
20583
20807
|
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20584
|
-
"
|
|
20808
|
+
"div",
|
|
20585
20809
|
{
|
|
20586
|
-
|
|
20587
|
-
|
|
20810
|
+
style: {
|
|
20811
|
+
width: contentWidth,
|
|
20812
|
+
wordBreak: "break-word",
|
|
20813
|
+
overflowWrap: "anywhere"
|
|
20814
|
+
},
|
|
20815
|
+
className: "fc:whitespace-normal",
|
|
20816
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:text-xs fc:font-medium fc:text-slate-800 fc:leading-relaxed", children: row[col.key] || "-" })
|
|
20588
20817
|
}
|
|
20589
20818
|
)
|
|
20590
|
-
}
|
|
20591
|
-
|
|
20592
|
-
|
|
20593
|
-
|
|
20594
|
-
|
|
20595
|
-
|
|
20596
|
-
|
|
20597
|
-
|
|
20598
|
-
|
|
20599
|
-
|
|
20600
|
-
|
|
20601
|
-
{
|
|
20602
|
-
className: `fc:inline-block fc:text-[10px] fc:font-bold fc:px-2 fc:py-0.5 fc:rounded-full ${row.status === "Available" ? "fc:bg-blue-50 fc:text-blue-700 fc:border fc:border-blue-100" : row.status === "In Progress" || row.status === "Assigned to Me" ? "fc:bg-emerald-50 fc:text-emerald-700 fc:border fc:border-emerald-100" : "fc:bg-slate-100 fc:text-slate-600 fc:border fc:border-slate-200"}`,
|
|
20603
|
-
children: row.status
|
|
20604
|
-
}
|
|
20605
|
-
)
|
|
20606
|
-
}
|
|
20607
|
-
),
|
|
20608
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
20609
|
-
"td",
|
|
20610
|
-
{
|
|
20611
|
-
style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
|
|
20612
|
-
className: "fc:sticky fc:right-0 fc:z-10 fc:bg-white group-hover:fc:bg-slate-50/95 fc:px-3 fc:py-3 fc:text-center fc:align-middle fc:border-l fc:border-slate-100 fc:shadow-[-5px_0_10px_-4px_rgba(0,0,0,0.06)]",
|
|
20613
|
-
children: [
|
|
20614
|
-
activeTab === "filePool" && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
20615
|
-
"button",
|
|
20819
|
+
},
|
|
20820
|
+
col.key
|
|
20821
|
+
);
|
|
20822
|
+
}),
|
|
20823
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20824
|
+
"td",
|
|
20825
|
+
{
|
|
20826
|
+
style: { width: "300px", minWidth: "300px", maxWidth: "300px" },
|
|
20827
|
+
className: "fc:px-4 fc:py-3 fc:align-middle",
|
|
20828
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20829
|
+
"div",
|
|
20616
20830
|
{
|
|
20617
|
-
|
|
20618
|
-
|
|
20619
|
-
|
|
20620
|
-
|
|
20621
|
-
|
|
20622
|
-
|
|
20623
|
-
|
|
20624
|
-
]
|
|
20831
|
+
style: {
|
|
20832
|
+
width: "268px",
|
|
20833
|
+
wordBreak: "break-word",
|
|
20834
|
+
overflowWrap: "anywhere"
|
|
20835
|
+
},
|
|
20836
|
+
className: "fc:whitespace-normal",
|
|
20837
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:leading-relaxed", children: row.subject })
|
|
20625
20838
|
}
|
|
20626
|
-
)
|
|
20627
|
-
|
|
20628
|
-
|
|
20839
|
+
)
|
|
20840
|
+
}
|
|
20841
|
+
),
|
|
20842
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20843
|
+
"td",
|
|
20844
|
+
{
|
|
20845
|
+
style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
|
|
20846
|
+
className: "fc:px-4 fc:py-3 fc:align-middle",
|
|
20847
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20848
|
+
"div",
|
|
20629
20849
|
{
|
|
20630
|
-
|
|
20631
|
-
|
|
20632
|
-
|
|
20633
|
-
|
|
20634
|
-
|
|
20635
|
-
|
|
20636
|
-
|
|
20637
|
-
]
|
|
20850
|
+
style: {
|
|
20851
|
+
width: "158px",
|
|
20852
|
+
wordBreak: "break-word",
|
|
20853
|
+
overflowWrap: "anywhere"
|
|
20854
|
+
},
|
|
20855
|
+
className: "fc:whitespace-normal",
|
|
20856
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:text-xs fc:font-medium fc:text-slate-700 fc:leading-relaxed", children: row.workflowName })
|
|
20638
20857
|
}
|
|
20639
|
-
)
|
|
20640
|
-
|
|
20641
|
-
|
|
20858
|
+
)
|
|
20859
|
+
}
|
|
20860
|
+
),
|
|
20861
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20862
|
+
"td",
|
|
20863
|
+
{
|
|
20864
|
+
style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
|
|
20865
|
+
className: "fc:px-4 fc:py-3 fc:align-middle",
|
|
20866
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20867
|
+
"div",
|
|
20642
20868
|
{
|
|
20643
|
-
|
|
20644
|
-
|
|
20645
|
-
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20650
|
-
]
|
|
20869
|
+
style: {
|
|
20870
|
+
width: "158px",
|
|
20871
|
+
wordBreak: "break-word",
|
|
20872
|
+
overflowWrap: "anywhere"
|
|
20873
|
+
},
|
|
20874
|
+
className: "fc:whitespace-normal",
|
|
20875
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:text-xs fc:text-slate-600 fc:font-medium fc:leading-relaxed", children: row.sender })
|
|
20651
20876
|
}
|
|
20652
20877
|
)
|
|
20653
|
-
|
|
20654
|
-
|
|
20655
|
-
|
|
20656
|
-
|
|
20657
|
-
|
|
20658
|
-
|
|
20659
|
-
|
|
20660
|
-
|
|
20661
|
-
|
|
20878
|
+
}
|
|
20879
|
+
),
|
|
20880
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20881
|
+
"td",
|
|
20882
|
+
{
|
|
20883
|
+
style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
|
|
20884
|
+
className: "fc:px-3 fc:py-3 fc:text-center fc:align-middle",
|
|
20885
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20886
|
+
"span",
|
|
20887
|
+
{
|
|
20888
|
+
className: `fc:inline-block fc:text-[10px] fc:font-extrabold fc:px-2 fc:py-0.5 fc:rounded-full ${row.priority === "Urgent" ? "fc:bg-red-50 fc:text-red-600 fc:border fc:border-red-200" : row.priority === "High" ? "fc:bg-amber-50 fc:text-amber-600 fc:border fc:border-amber-200" : row.priority === "Medium" ? "fc:bg-blue-50 fc:text-blue-600 fc:border fc:border-blue-200" : "fc:bg-slate-100 fc:text-slate-600 fc:border fc:border-slate-200"}`,
|
|
20889
|
+
children: row.priority
|
|
20890
|
+
}
|
|
20891
|
+
)
|
|
20892
|
+
}
|
|
20893
|
+
),
|
|
20894
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20895
|
+
"td",
|
|
20896
|
+
{
|
|
20897
|
+
style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
|
|
20898
|
+
className: "fc:px-4 fc:py-3 fc:align-middle",
|
|
20899
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { style: { width: "118px" }, className: "fc:whitespace-normal", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:text-[11px] fc:text-slate-500 fc:font-medium fc:leading-relaxed", children: row.receivedDate }) })
|
|
20900
|
+
}
|
|
20901
|
+
),
|
|
20902
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20903
|
+
"td",
|
|
20904
|
+
{
|
|
20905
|
+
style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
|
|
20906
|
+
className: "fc:px-4 fc:py-3 fc:align-middle",
|
|
20907
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20908
|
+
"div",
|
|
20909
|
+
{
|
|
20910
|
+
style: {
|
|
20911
|
+
width: "118px",
|
|
20912
|
+
wordBreak: "break-word",
|
|
20913
|
+
overflowWrap: "anywhere"
|
|
20914
|
+
},
|
|
20915
|
+
className: "fc:whitespace-normal",
|
|
20916
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20917
|
+
"span",
|
|
20918
|
+
{
|
|
20919
|
+
className: `fc:inline-block fc:text-[11px] fc:font-semibold fc:leading-relaxed ${String(row.slaStatus).includes("Critical") ? "fc:text-red-600 fc:font-bold" : String(row.slaStatus).includes("Met") ? "fc:text-emerald-600" : "fc:text-slate-600"}`,
|
|
20920
|
+
children: row.slaStatus
|
|
20921
|
+
}
|
|
20922
|
+
)
|
|
20923
|
+
}
|
|
20924
|
+
)
|
|
20925
|
+
}
|
|
20926
|
+
),
|
|
20927
|
+
activeTab === "totalFiles" && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20928
|
+
"td",
|
|
20929
|
+
{
|
|
20930
|
+
style: { width: "160px", minWidth: "160px", maxWidth: "160px" },
|
|
20931
|
+
className: "fc:px-4 fc:py-3 fc:align-middle",
|
|
20932
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:text-xs fc:font-medium fc:text-slate-700", children: row.fileAt })
|
|
20933
|
+
}
|
|
20934
|
+
),
|
|
20935
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20936
|
+
"td",
|
|
20937
|
+
{
|
|
20938
|
+
style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
|
|
20939
|
+
className: "fc:px-3 fc:py-3 fc:text-center fc:align-middle",
|
|
20940
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20941
|
+
"span",
|
|
20942
|
+
{
|
|
20943
|
+
className: `fc:inline-block fc:whitespace-nowrap fc:text-[10px] fc:font-bold fc:px-2 fc:py-0.5 fc:rounded-full ${row.status === "Available" ? "fc:bg-blue-50 fc:text-blue-700 fc:border fc:border-blue-100" : row.status === "In Progress" || row.status === "Assigned to Me" ? "fc:bg-emerald-50 fc:text-emerald-700 fc:border fc:border-emerald-100" : row.status === "RETURN_TO_APPLICANT" ? "fc:bg-amber-50 fc:text-amber-700 fc:border fc:border-amber-200" : "fc:bg-slate-100 fc:text-slate-600 fc:border fc:border-slate-200"}`,
|
|
20944
|
+
children: row.status
|
|
20945
|
+
}
|
|
20946
|
+
)
|
|
20947
|
+
}
|
|
20948
|
+
),
|
|
20949
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
20950
|
+
"td",
|
|
20951
|
+
{
|
|
20952
|
+
style: { width: "195px", minWidth: "195px", maxWidth: "195px" },
|
|
20953
|
+
className: "fc:sticky fc:right-0 fc:z-10 fc:bg-white group-hover:fc:bg-slate-50/95 fc:px-2 fc:py-3 fc:align-middle fc:border-l fc:border-slate-100 fc:shadow-[-5px_0_10px_-4px_rgba(0,0,0,0.06)]",
|
|
20954
|
+
children: [
|
|
20955
|
+
activeTab === "filePool" && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
20956
|
+
"button",
|
|
20957
|
+
{
|
|
20958
|
+
type: "button",
|
|
20959
|
+
onClick: () => handleOpenPoolModal(row),
|
|
20960
|
+
style: { fontSize: "12px" },
|
|
20961
|
+
className: "fc:inline-flex fc:items-center fc:gap-1.5 fc:h-8 fc:px-3 fc:bg-blue-600 hover:fc:bg-blue-700 fc:text-white fc:font-bold fc:rounded-xl fc:shadow-sm fc:shadow-blue-500/20 fc:transition-all hover:fc:scale-[1.02] active:fc:scale-95",
|
|
20962
|
+
children: [
|
|
20963
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiInboxArchiveLine, { size: 14 }),
|
|
20964
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: "Claim" })
|
|
20965
|
+
]
|
|
20966
|
+
}
|
|
20967
|
+
),
|
|
20968
|
+
activeTab === "myFiles" && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-center fc:gap-1.5", children: [
|
|
20969
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
20970
|
+
"button",
|
|
20971
|
+
{
|
|
20972
|
+
type: "button",
|
|
20973
|
+
onClick: () => handleOpenTakeAction(row),
|
|
20974
|
+
style: { fontSize: "11px" },
|
|
20975
|
+
className: "fc:inline-flex fc:items-center fc:justify-center fc:gap-1 fc:h-8 fc:px-2 fc:whitespace-nowrap fc:bg-emerald-600 hover:fc:bg-emerald-700 fc:text-white fc:font-bold fc:rounded-lg fc:shadow-sm fc:shadow-emerald-500/20 fc:transition-all hover:fc:scale-[1.02] active:fc:scale-95",
|
|
20976
|
+
children: [
|
|
20977
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiFileUploadLine, { size: 13 }),
|
|
20978
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: "Take Action" })
|
|
20979
|
+
]
|
|
20980
|
+
}
|
|
20981
|
+
),
|
|
20982
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
20983
|
+
"button",
|
|
20984
|
+
{
|
|
20985
|
+
type: "button",
|
|
20986
|
+
onClick: () => handleUnclaim(row),
|
|
20987
|
+
disabled: isUnclaiming,
|
|
20988
|
+
style: { fontSize: "11px" },
|
|
20989
|
+
className: "fc:inline-flex fc:items-center fc:justify-center fc:h-8 fc:px-2 fc:whitespace-nowrap fc:border fc:border-rose-200 fc:bg-rose-50 fc:text-rose-700 fc:font-bold fc:rounded-lg hover:fc:bg-rose-100 hover:fc:border-rose-300 fc:transition-colors active:fc:scale-95 disabled:fc:cursor-not-allowed disabled:fc:opacity-60",
|
|
20990
|
+
children: isUnclaiming ? "Unclaiming..." : "Unclaim"
|
|
20991
|
+
}
|
|
20992
|
+
)
|
|
20993
|
+
] }),
|
|
20994
|
+
activeTab === "totalFiles" && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
20995
|
+
"button",
|
|
20996
|
+
{
|
|
20997
|
+
type: "button",
|
|
20998
|
+
onClick: () => handleOpenView(row),
|
|
20999
|
+
style: { fontSize: "12px" },
|
|
21000
|
+
className: "fc:inline-flex fc:items-center fc:gap-1.5 fc:h-8 fc:px-3 fc:bg-slate-100 hover:fc:bg-slate-200 fc:text-slate-700 fc:font-bold fc:rounded-xl fc:transition-all hover:fc:scale-[1.02] active:fc:scale-95",
|
|
21001
|
+
children: [
|
|
21002
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiEyeLine, { size: 14 }),
|
|
21003
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: "View" })
|
|
21004
|
+
]
|
|
21005
|
+
}
|
|
21006
|
+
)
|
|
21007
|
+
]
|
|
21008
|
+
}
|
|
21009
|
+
)
|
|
21010
|
+
]
|
|
21011
|
+
},
|
|
21012
|
+
row.fileId || row.fileNumber
|
|
21013
|
+
);
|
|
21014
|
+
}) })
|
|
21015
|
+
] })
|
|
21016
|
+
] }),
|
|
20662
21017
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:flex-col sm:fc:flex-row fc:items-center fc:justify-between fc:gap-3 fc:pt-3 fc:px-1", children: [
|
|
20663
21018
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { className: "fc:text-xs fc:text-slate-500 fc:font-medium", children: [
|
|
20664
21019
|
"Showing ",
|