flowcore-fn 10.3.1 → 10.3.4

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.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
- actionCode: (_n = (_m = editData == null ? void 0 : editData.actionCode) != null ? _m : editData == null ? void 0 : editData.ActionCode) != null ? _n : "",
4875
- actionName: (_p = (_o = editData == null ? void 0 : editData.actionName) != null ? _o : editData == null ? void 0 : editData.ActionName) != null ? _p : "",
4876
- sequenceNo: String((_r = (_q = editData == null ? void 0 : editData.sequenceNo) != null ? _q : editData == null ? void 0 : editData.SequenceNo) != null ? _r : "1"),
4877
- isDefault: Boolean((_t = (_s = editData == null ? void 0 : editData.isDefault) != null ? _s : editData == null ? void 0 : editData.IsDefault) != null ? _t : false),
4878
- requireComment: Boolean((_v = (_u = editData == null ? void 0 : editData.requireComment) != null ? _u : editData == null ? void 0 : editData.RequireComment) != null ? _v : false),
4879
- status: ((_x = (_w = editData == null ? void 0 : editData.isActive) != null ? _w : editData == null ? void 0 : editData.IsActive) != null ? _x : true) ? "active" : "inactive"
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
- actionCode: (_n2 = (_m2 = editData == null ? void 0 : editData.actionCode) != null ? _m2 : editData == null ? void 0 : editData.ActionCode) != null ? _n2 : "",
4971
- actionName: (_p2 = (_o2 = editData == null ? void 0 : editData.actionName) != null ? _o2 : editData == null ? void 0 : editData.ActionName) != null ? _p2 : "",
4972
- sequenceNo: String((_r2 = (_q2 = editData == null ? void 0 : editData.sequenceNo) != null ? _q2 : editData == null ? void 0 : editData.SequenceNo) != null ? _r2 : "1"),
4973
- isDefault: Boolean((_t2 = (_s2 = editData == null ? void 0 : editData.isDefault) != null ? _s2 : editData == null ? void 0 : editData.IsDefault) != null ? _t2 : false),
4974
- requireComment: Boolean((_v2 = (_u2 = editData == null ? void 0 : editData.requireComment) != null ? _u2 : editData == null ? void 0 : editData.RequireComment) != null ? _v2 : false),
4975
- status: ((_x2 = (_w2 = editData == null ? void 0 : editData.isActive) != null ? _w2 : editData == null ? void 0 : editData.IsActive) != null ? _x2 : true) ? "active" : "inactive"
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 === "actionCode" && typeof value === "string") {
5046
- sanitized = value.toUpperCase().replace(/[^A-Z0-9_-]/g, "");
5047
- } else if (field === "sequenceNo" && typeof value === "string") {
5048
- sanitized = value.replace(/^-+/, "");
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()) newErrors.actionCode = "Action Code is required.";
5110
- if (!formData.actionName.trim()) newErrors.actionName = "Action Name is required.";
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().toUpperCase(),
5195
+ toWorkflowStepId: formData.returnToApplicant ? 0 : Number(formData.toStep),
5196
+ actionCode: formData.actionCode.trim(),
5129
5197
  actionName: formData.actionName.trim(),
5130
- sequenceNo: Number(formData.sequenceNo) || 1,
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().toUpperCase(),
5207
+ toWorkflowStepId: formData.returnToApplicant ? 0 : Number(formData.toStep),
5208
+ actionCode: formData.actionCode.trim(),
5141
5209
  actionName: formData.actionName.trim(),
5142
- sequenceNo: Number(formData.sequenceNo) || 1,
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)("div", { 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", children: [
5165
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { 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", children: [
5166
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-4", children: [
5167
- /* @__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" }) }) }),
5168
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
5169
- /* @__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" }),
5170
- /* @__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" })
5171
- ] })
5172
- ] }),
5173
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5174
- "button",
5175
- {
5176
- type: "button",
5177
- onClick: onClose,
5178
- 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",
5179
- "aria-label": "Close",
5180
- 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" }) })
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.jsxs)("div", { className: "fc:relative", children: [
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
- "select",
5282
+ "div",
5200
5283
  {
5201
- value: formData.workflowTypeId,
5202
- onChange: (e) => handleChange("workflowTypeId", e.target.value),
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.jsx)("option", { value: "", children: loadingWorkflowTypes ? "Loading workflow types..." : "Select Workflow Type" }),
5207
- formData.workflowTypeId && !workflowTypes.some(
5208
- (t) => {
5209
- var _a2, _b2;
5210
- return String((_b2 = (_a2 = t.workflowTypeId) != null ? _a2 : t.WorkflowTypeId) != null ? _b2 : t.id) === String(formData.workflowTypeId);
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
- ) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: formData.workflowTypeId, children: (_z = (_y = editData == null ? void 0 : editData.workflowTypeName) != null ? _y : editData == null ? void 0 : editData.WorkflowTypeName) != null ? _z : `Type ${formData.workflowTypeId}` }),
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
- "select",
5530
+ "div",
5235
5531
  {
5236
- value: formData.workflow,
5237
- onChange: (e) => handleChange("workflow", e.target.value),
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)("option", { value: "", children: loadingWorkflows ? "Loading workflows..." : !formData.workflowTypeId ? "Select Workflow Type first" : filteredWorkflows.length === 0 ? "No workflows found for this type" : "Select Workflow" }),
5242
- formData.workflow && !filteredWorkflows.some(
5243
- (w) => {
5244
- var _a2, _b2;
5245
- return String((_b2 = (_a2 = w.workflowId) != null ? _a2 : w.WorkflowId) != null ? _b2 : w.id) === String(formData.workflow);
5246
- }
5247
- ) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: formData.workflow, children: (_B = (_A = editData == null ? void 0 : editData.workflowName) != null ? _A : editData == null ? void 0 : editData.WorkflowName) != null ? _B : `Workflow ${formData.workflow}` }),
5248
- filteredWorkflows.map((workflow) => {
5249
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
5250
- const id = (_b2 = (_a2 = workflow.workflowId) != null ? _a2 : workflow.WorkflowId) != null ? _b2 : workflow.id;
5251
- 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}`;
5252
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: String(id), children: name }, id);
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
- /* @__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" }) })
5258
- ] }),
5259
- workflowFetchError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowFetchError }),
5260
- 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 })
5261
- ] })
5262
- ] }),
5263
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:grid fc:grid-cols-2 md:fc:grid-cols-2 fc:gap-5", children: [
5264
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
5265
- /* @__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: [
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
- "select",
5605
+ "button",
5272
5606
  {
5273
- value: formData.fromStep,
5274
- onChange: (e) => handleChange("fromStep", e.target.value),
5275
- disabled: loadingWorkflowSteps,
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)("option", { value: "", children: loadingWorkflowSteps ? "Loading steps..." : !formData.workflow ? "Select Workflow first" : filteredSteps.length === 0 ? "No steps found for this workflow" : "Select From Step" }),
5279
- formData.fromStep && !filteredSteps.some(
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
- "select",
5617
+ "button",
5312
5618
  {
5313
- value: formData.toStep,
5314
- onChange: (e) => handleChange("toStep", e.target.value),
5315
- disabled: loadingWorkflowSteps,
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)("option", { value: "", children: loadingWorkflowSteps ? "Loading steps..." : !formData.workflow ? "Select Workflow first" : filteredSteps.length === 0 ? "No steps found for this workflow" : "Select To Step" }),
5319
- formData.toStep && !filteredSteps.some(
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
- /* @__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" }) })
5340
- ] }),
5341
- workflowStepFetchError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowStepFetchError }),
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
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fc:p-5 fc:bg-white fc:border-t fc:border-slate-100 fc:flex fc:items-center fc:justify-end fc:gap-3 fc:px-8", children: [
5532
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
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
- fromWorkflowStepId: (_l = (_k = (_j = (_i = item.fromWorkflowStepId) != null ? _i : item.FromWorkflowStepId) != null ? _j : item.fromStepId) != null ? _k : item.FromStepId) != null ? _l : "",
5598
- toWorkflowStepId: (_p = (_o = (_n = (_m = item.toWorkflowStepId) != null ? _m : item.ToWorkflowStepId) != null ? _n : item.toStepId) != null ? _o : item.ToStepId) != null ? _p : "",
5599
- actionCode: (_r = (_q = item.actionCode) != null ? _q : item.ActionCode) != null ? _r : "",
5600
- actionName: (_t = (_s = item.actionName) != null ? _s : item.ActionName) != null ? _t : "",
5601
- isActive: (_v = (_u = item.isActive) != null ? _u : item.IsActive) != null ? _v : true
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
- payload
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
- ((_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 ${isEdit ? "update" : "create"} workflow transition.`,
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 ID", "workflowId", "fc:w-[15%]"],
5680
- ["From Step ID", "fromWorkflowStepId", "fc:w-[15%]"],
5681
- ["To Step ID", "toWorkflowStepId", "fc:w-[15%]"],
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.workflowId || "-" }),
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.fromWorkflowStepId || "-" }),
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.toWorkflowStepId || "-" }),
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-center fc:whitespace-nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "fc:flex fc:items-center fc:justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
5808
- "button",
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
- type: "button",
5811
- onClick: () => editTransition(item),
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
- updatedBy: (_z = (_y = selectedData.updatedBy) != null ? _y : selectedData.UpdatedBy) != null ? _z : "System"
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) {
@@ -19452,7 +19729,7 @@ var formatInboxDate = (value) => {
19452
19729
  });
19453
19730
  };
19454
19731
  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;
19732
+ 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
19733
  const taskInstanceId = (_a = file.taskInstanceId) != null ? _a : file.TaskInstanceId;
19457
19734
  const filePoolId = (_b = file.filePoolId) != null ? _b : file.FilePoolId;
19458
19735
  const businessEntity = (_c = file.businessEntityType) != null ? _c : file.BusinessEntityType;
@@ -19472,14 +19749,14 @@ var normalizePoolFile = (file) => {
19472
19749
  priority: (_t = file.priority) != null ? _t : "Medium",
19473
19750
  receivedDate: formatInboxDate((_v = (_u = file.addedOn) != null ? _u : file.createdAt) != null ? _v : file.receivedDate),
19474
19751
  dueDate: formatInboxDate(file.dueDate),
19475
- slaStatus: (_w = file.slaStatus) != null ? _w : "-",
19476
- status: "Available",
19752
+ slaStatus: (_x = (_w = file.slaStatus) != null ? _w : file.SlaStatus) != null ? _x : "-",
19753
+ status: (_B = (_A = (_z = (_y = file.statusName) != null ? _y : file.StatusName) != null ? _z : file.fileStatus) != null ? _A : file.FileStatus) != null ? _B : "Available",
19477
19754
  assignedTo: "-",
19478
- currentStep: (_x = file.stepName) != null ? _x : "-"
19755
+ currentStep: (_C = file.stepName) != null ? _C : "-"
19479
19756
  });
19480
19757
  };
19481
19758
  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;
19759
+ 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
19760
  const taskInstanceId = (_a = file.taskInstanceId) != null ? _a : file.TaskInstanceId;
19484
19761
  const businessEntityId = (_b = file.businessEntityId) != null ? _b : file.BusinessEntityId;
19485
19762
  const businessEntity = (_c = file.businessEntityType) != null ? _c : file.BusinessEntityType;
@@ -19497,11 +19774,12 @@ var normalizeMyFile = (file) => {
19497
19774
  sender: (_s = (_r = file.sender) != null ? _r : businessEntity) != null ? _s : "-",
19498
19775
  priority: (_t = file.priority) != null ? _t : "Medium",
19499
19776
  receivedDate: formatInboxDate((_u = file.createdAt) != null ? _u : file.receivedDate),
19500
- dueDate: formatInboxDate(file.dueDate),
19501
- slaStatus: (_v = file.slaStatus) != null ? _v : "-",
19502
- status: (_x = (_w = file.fileStatus) != null ? _w : file.statusName) != null ? _x : "In Progress",
19503
- assignedTo: (_D = (_C = (_B = (_A = (_z = (_y = file.assignedTo) != null ? _y : file.AssignedTo) != null ? _z : file.assignedUserName) != null ? _A : file.AssignedUserName) != null ? _B : file.assignedUserId) != null ? _C : file.AssignedUserId) != null ? _D : "-",
19504
- currentStep: (_E = file.stepName) != null ? _E : "-"
19777
+ dueDate: formatInboxDate((_v = file.dueDate) != null ? _v : file.DueDate),
19778
+ slaStatus: (_x = (_w = file.slaStatus) != null ? _w : file.SlaStatus) != null ? _x : "-",
19779
+ status: (_B = (_A = (_z = (_y = file.fileStatus) != null ? _y : file.FileStatus) != null ? _z : file.statusName) != null ? _A : file.StatusName) != null ? _B : "In Progress",
19780
+ fileAt: (_D = (_C = file.fileAt) != null ? _C : file.FileAt) != null ? _D : "-",
19781
+ 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 : "-",
19782
+ currentStep: (_K = file.stepName) != null ? _K : "-"
19505
19783
  });
19506
19784
  };
19507
19785
  function InboxMain() {
@@ -19779,7 +20057,7 @@ function InboxMain() {
19779
20057
  if (searchQuery.trim()) {
19780
20058
  const q = searchQuery.toLowerCase().trim();
19781
20059
  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)
20060
+ (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
20061
  );
19784
20062
  }
19785
20063
  if (priorityFilter !== "all") {
@@ -19936,6 +20214,7 @@ function InboxMain() {
19936
20214
  "Priority",
19937
20215
  "Received Date",
19938
20216
  "Due Date",
20217
+ ...activeTab === "totalFiles" ? ["File At"] : [],
19939
20218
  "SLA Status",
19940
20219
  "Status"
19941
20220
  ];
@@ -19948,6 +20227,7 @@ function InboxMain() {
19948
20227
  `"${f.priority}"`,
19949
20228
  `"${f.receivedDate}"`,
19950
20229
  `"${f.dueDate}"`,
20230
+ ...activeTab === "totalFiles" ? [`"${f.fileAt}"`] : [],
19951
20231
  `"${f.slaStatus}"`,
19952
20232
  `"${f.status}"`
19953
20233
  ]);
@@ -20079,7 +20359,11 @@ function InboxMain() {
20079
20359
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20080
20360
  "span",
20081
20361
  {
20082
- className: `fc:px-2 fc:py-0.5 fc:rounded-full fc:text-[11px] fc:font-extrabold ${activeTab === "filePool" ? "fc:bg-white/25 fc:text-white" : "fc:bg-slate-200 fc:text-slate-700"}`,
20362
+ className: "fc:px-2 fc:py-0.5 fc:rounded-full fc:text-[11px] fc:font-extrabold",
20363
+ style: {
20364
+ backgroundColor: activeTab === "filePool" ? "rgba(255, 255, 255, 0.25)" : "#e2e8f0",
20365
+ color: activeTab === "filePool" ? "#ffffff" : "#334155"
20366
+ },
20083
20367
  children: filePoolFiles.length
20084
20368
  }
20085
20369
  )
@@ -20098,7 +20382,11 @@ function InboxMain() {
20098
20382
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20099
20383
  "span",
20100
20384
  {
20101
- className: `fc:px-2 fc:py-0.5 fc:rounded-full fc:text-[11px] fc:font-extrabold ${activeTab === "myFiles" ? "fc:bg-white/25 fc:text-white" : "fc:bg-slate-200 fc:text-slate-700"}`,
20385
+ className: "fc:px-2 fc:py-0.5 fc:rounded-full fc:text-[11px] fc:font-extrabold",
20386
+ style: {
20387
+ backgroundColor: activeTab === "myFiles" ? "rgba(255, 255, 255, 0.25)" : "#e2e8f0",
20388
+ color: activeTab === "myFiles" ? "#ffffff" : "#334155"
20389
+ },
20102
20390
  children: myFiles.length
20103
20391
  }
20104
20392
  )
@@ -20117,7 +20405,11 @@ function InboxMain() {
20117
20405
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20118
20406
  "span",
20119
20407
  {
20120
- className: `fc:px-2 fc:py-0.5 fc:rounded-full fc:text-[11px] fc:font-extrabold ${activeTab === "totalFiles" ? "fc:bg-white/25 fc:text-white" : "fc:bg-slate-200 fc:text-slate-700"}`,
20408
+ className: "fc:px-2 fc:py-0.5 fc:rounded-full fc:text-[11px] fc:font-extrabold",
20409
+ style: {
20410
+ backgroundColor: activeTab === "totalFiles" ? "rgba(255, 255, 255, 0.25)" : "#e2e8f0",
20411
+ color: activeTab === "totalFiles" ? "#ffffff" : "#334155"
20412
+ },
20121
20413
  children: totalFiles.length
20122
20414
  }
20123
20415
  )
@@ -20266,387 +20558,424 @@ function InboxMain() {
20266
20558
  ] })
20267
20559
  ] }),
20268
20560
  /* @__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: [
20269
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "fc:border fc:border-slate-200 fc:rounded-2xl fc:overflow-auto fc:flex-1 fc:relative", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("table", { className: "fc:w-max fc:min-w-full fc:border-collapse fc:text-left", children: [
20270
- /* @__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: [
20271
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20272
- "th",
20273
- {
20274
- style: { width: "48px", minWidth: "48px", maxWidth: "48px" },
20275
- 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",
20276
- children: "#"
20277
- }
20278
- ),
20279
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20280
- "th",
20281
- {
20282
- onClick: () => handleSort("fileNumber"),
20283
- style: { width: "144px", minWidth: "144px", maxWidth: "144px" },
20284
- 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",
20285
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
20286
- "File No ",
20287
- renderSortIndicator("fileNumber")
20288
- ] })
20289
- }
20290
- ),
20291
- visibleDynamicColumns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20292
- "th",
20293
- {
20294
- onClick: () => handleSort(col.key),
20295
- style: {
20296
- width: col.width || "180px",
20297
- minWidth: col.width || "180px",
20298
- maxWidth: col.width || "180px"
20561
+ /* @__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: [
20562
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("style", { children: `
20563
+ .fc-inbox-table tbody td { border-bottom: 1px solid #e2e8f0; }
20564
+ .fc-inbox-table tbody tr:hover td { background-color: #f8fafc; }
20565
+ ` }),
20566
+ /* @__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: [
20567
+ /* @__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: [
20568
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20569
+ "th",
20570
+ {
20571
+ style: { width: "48px", minWidth: "48px", maxWidth: "48px" },
20572
+ 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",
20573
+ children: "#"
20574
+ }
20575
+ ),
20576
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20577
+ "th",
20578
+ {
20579
+ onClick: () => handleSort("fileNumber"),
20580
+ style: { width: "144px", minWidth: "144px", maxWidth: "144px" },
20581
+ 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",
20582
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
20583
+ "File No ",
20584
+ renderSortIndicator("fileNumber")
20585
+ ] })
20586
+ }
20587
+ ),
20588
+ visibleDynamicColumns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20589
+ "th",
20590
+ {
20591
+ onClick: () => handleSort(col.key),
20592
+ style: {
20593
+ width: col.width || "180px",
20594
+ minWidth: col.width || "180px",
20595
+ maxWidth: col.width || "180px"
20596
+ },
20597
+ 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",
20598
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-1.5 fc:overflow-hidden", children: [
20599
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:truncate", children: col.label }),
20600
+ /* @__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" }),
20601
+ renderSortIndicator(col.key)
20602
+ ] })
20299
20603
  },
20300
- 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",
20301
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-1.5 fc:overflow-hidden", children: [
20302
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:truncate", children: col.label }),
20303
- /* @__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" }),
20304
- renderSortIndicator(col.key)
20305
- ] })
20306
- },
20307
- col.key
20308
- )),
20309
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20310
- "th",
20311
- {
20312
- onClick: () => handleSort("subject"),
20313
- style: { width: "300px", minWidth: "300px", maxWidth: "300px" },
20314
- 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",
20315
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
20316
- "Subject / Title ",
20317
- renderSortIndicator("subject")
20318
- ] })
20319
- }
20320
- ),
20321
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20322
- "th",
20323
- {
20324
- onClick: () => handleSort("workflowName"),
20325
- style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20326
- 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",
20327
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
20328
- "Workflow ",
20329
- renderSortIndicator("workflowName")
20330
- ] })
20331
- }
20332
- ),
20333
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20334
- "th",
20335
- {
20336
- onClick: () => handleSort("sender"),
20337
- style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20338
- 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",
20339
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
20340
- "Sender / Initiator ",
20341
- renderSortIndicator("sender")
20342
- ] })
20343
- }
20344
- ),
20345
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20346
- "th",
20347
- {
20348
- onClick: () => handleSort("priority"),
20349
- style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
20350
- 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",
20351
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-center", children: [
20352
- "Priority ",
20353
- renderSortIndicator("priority")
20354
- ] })
20355
- }
20356
- ),
20357
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20358
- "th",
20359
- {
20360
- onClick: () => handleSort("receivedDate"),
20361
- style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
20362
- 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",
20363
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
20364
- "Received On ",
20365
- renderSortIndicator("receivedDate")
20366
- ] })
20367
- }
20368
- ),
20369
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20370
- "th",
20371
- {
20372
- onClick: () => handleSort("dueDate"),
20373
- style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
20374
- 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",
20375
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
20376
- "SLA / Due ",
20377
- renderSortIndicator("dueDate")
20378
- ] })
20379
- }
20380
- ),
20381
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20382
- "th",
20604
+ col.key
20605
+ )),
20606
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20607
+ "th",
20608
+ {
20609
+ onClick: () => handleSort("subject"),
20610
+ style: { width: "300px", minWidth: "300px", maxWidth: "300px" },
20611
+ 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",
20612
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
20613
+ "Subject / Title ",
20614
+ renderSortIndicator("subject")
20615
+ ] })
20616
+ }
20617
+ ),
20618
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20619
+ "th",
20620
+ {
20621
+ onClick: () => handleSort("workflowName"),
20622
+ style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20623
+ 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",
20624
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
20625
+ "Workflow ",
20626
+ renderSortIndicator("workflowName")
20627
+ ] })
20628
+ }
20629
+ ),
20630
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20631
+ "th",
20632
+ {
20633
+ onClick: () => handleSort("sender"),
20634
+ style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20635
+ 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",
20636
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
20637
+ "Sender / Initiator ",
20638
+ renderSortIndicator("sender")
20639
+ ] })
20640
+ }
20641
+ ),
20642
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20643
+ "th",
20644
+ {
20645
+ onClick: () => handleSort("priority"),
20646
+ style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
20647
+ 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",
20648
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-center", children: [
20649
+ "Priority ",
20650
+ renderSortIndicator("priority")
20651
+ ] })
20652
+ }
20653
+ ),
20654
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20655
+ "th",
20656
+ {
20657
+ onClick: () => handleSort("receivedDate"),
20658
+ style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
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
+ "Received On ",
20662
+ renderSortIndicator("receivedDate")
20663
+ ] })
20664
+ }
20665
+ ),
20666
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20667
+ "th",
20668
+ {
20669
+ onClick: () => handleSort("dueDate"),
20670
+ style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
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
+ "SLA / Due ",
20674
+ renderSortIndicator("dueDate")
20675
+ ] })
20676
+ }
20677
+ ),
20678
+ activeTab === "totalFiles" && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20679
+ "th",
20680
+ {
20681
+ onClick: () => handleSort("fileAt"),
20682
+ style: { width: "160px", minWidth: "160px", maxWidth: "160px" },
20683
+ 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",
20684
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center", children: [
20685
+ "File At ",
20686
+ renderSortIndicator("fileAt")
20687
+ ] })
20688
+ }
20689
+ ),
20690
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20691
+ "th",
20692
+ {
20693
+ onClick: () => handleSort("status"),
20694
+ style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20695
+ 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",
20696
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-center", children: [
20697
+ "Status ",
20698
+ renderSortIndicator("status")
20699
+ ] })
20700
+ }
20701
+ ),
20702
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20703
+ "th",
20704
+ {
20705
+ style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
20706
+ 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)]",
20707
+ children: "Action"
20708
+ }
20709
+ )
20710
+ ] }) }),
20711
+ /* @__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)(
20712
+ "td",
20383
20713
  {
20384
- onClick: () => handleSort("status"),
20385
- style: { width: "120px", minWidth: "120px", maxWidth: "120px" },
20386
- 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",
20387
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-center", children: [
20388
- "Status ",
20389
- renderSortIndicator("status")
20714
+ colSpan: 10 + visibleDynamicColumns.length + (activeTab === "totalFiles" ? 1 : 0),
20715
+ className: "fc:py-12 fc:text-center",
20716
+ 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: [
20717
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiInboxLine, { size: 36, className: "fc:text-slate-300" }),
20718
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "fc:text-sm fc:font-bold fc:text-slate-600", children: "No Files Found" }),
20719
+ /* @__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}` })
20390
20720
  ] })
20391
20721
  }
20392
- ),
20393
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20394
- "th",
20395
- {
20396
- style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
20397
- 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)]",
20398
- children: "Action"
20399
- }
20400
- )
20401
- ] }) }),
20402
- /* @__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)(
20403
- "td",
20404
- {
20405
- colSpan: 10 + visibleDynamicColumns.length,
20406
- className: "fc:py-12 fc:text-center",
20407
- 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: [
20408
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiInboxLine, { size: 36, className: "fc:text-slate-300" }),
20409
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "fc:text-sm fc:font-bold fc:text-slate-600", children: "No Files Found" }),
20410
- /* @__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}` })
20411
- ] })
20412
- }
20413
- ) }) : paginatedData.map((row, index) => {
20414
- const rowIndex = startIndex + index + 1;
20415
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
20416
- "tr",
20417
- {
20418
- className: "fc:group hover:fc:bg-slate-50/80 fc:transition-colors",
20419
- children: [
20420
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20421
- "td",
20422
- {
20423
- style: { width: "48px", minWidth: "48px", maxWidth: "48px" },
20424
- 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",
20425
- children: rowIndex
20426
- }
20427
- ),
20428
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20429
- "td",
20430
- {
20431
- style: { width: "144px", minWidth: "144px", maxWidth: "144px" },
20432
- 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)]",
20433
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
20434
- "div",
20435
- {
20436
- onMouseEnter: hasHiddenDynamicColumns ? (e) => handleFileMouseEnter(row, e) : void 0,
20437
- onMouseLeave: hasHiddenDynamicColumns ? handleFileMouseLeave : void 0,
20438
- 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"}`,
20439
- children: [
20440
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:text-xs fc:font-extrabold", children: row.fileNumber }),
20441
- 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: [
20442
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiEyeOffLine, { size: 10 }),
20443
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: hiddenDynamicColumns.length })
20444
- ] })
20445
- ]
20446
- }
20447
- )
20448
- }
20449
- ),
20450
- visibleDynamicColumns.map((col) => {
20451
- const colWidthNum = parseInt(col.width || "180", 10);
20452
- const contentWidth = `${Math.max(colWidthNum - 32, 80)}px`;
20453
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20722
+ ) }) : paginatedData.map((row, index) => {
20723
+ const rowIndex = startIndex + index + 1;
20724
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
20725
+ "tr",
20726
+ {
20727
+ className: "fc:group hover:fc:bg-slate-50/80 fc:transition-colors",
20728
+ children: [
20729
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20454
20730
  "td",
20455
20731
  {
20456
- style: {
20457
- width: col.width || "180px",
20458
- minWidth: col.width || "180px",
20459
- maxWidth: col.width || "180px"
20460
- },
20461
- 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",
20462
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20732
+ style: { width: "48px", minWidth: "48px", maxWidth: "48px" },
20733
+ 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",
20734
+ children: rowIndex
20735
+ }
20736
+ ),
20737
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20738
+ "td",
20739
+ {
20740
+ style: { width: "144px", minWidth: "144px", maxWidth: "144px" },
20741
+ 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)]",
20742
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
20463
20743
  "div",
20464
20744
  {
20465
- style: {
20466
- width: contentWidth,
20467
- wordBreak: "break-word",
20468
- overflowWrap: "anywhere"
20469
- },
20470
- className: "fc:whitespace-normal",
20471
- 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] || "-" })
20745
+ onMouseEnter: hasHiddenDynamicColumns ? (e) => handleFileMouseEnter(row, e) : void 0,
20746
+ onMouseLeave: hasHiddenDynamicColumns ? handleFileMouseLeave : void 0,
20747
+ 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"}`,
20748
+ children: [
20749
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:text-xs fc:font-extrabold", children: row.fileNumber }),
20750
+ 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: [
20751
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiEyeOffLine, { size: 10 }),
20752
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: hiddenDynamicColumns.length })
20753
+ ] })
20754
+ ]
20472
20755
  }
20473
20756
  )
20474
- },
20475
- col.key
20476
- );
20477
- }),
20478
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20479
- "td",
20480
- {
20481
- style: { width: "300px", minWidth: "300px", maxWidth: "300px" },
20482
- className: "fc:px-4 fc:py-3 fc:align-middle",
20483
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20484
- "div",
20485
- {
20486
- style: {
20487
- width: "268px",
20488
- wordBreak: "break-word",
20489
- overflowWrap: "anywhere"
20490
- },
20491
- className: "fc:whitespace-normal",
20492
- 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 })
20493
- }
20494
- )
20495
- }
20496
- ),
20497
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20498
- "td",
20499
- {
20500
- style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20501
- className: "fc:px-4 fc:py-3 fc:align-middle",
20502
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20503
- "div",
20504
- {
20505
- style: {
20506
- width: "158px",
20507
- wordBreak: "break-word",
20508
- overflowWrap: "anywhere"
20509
- },
20510
- className: "fc:whitespace-normal",
20511
- 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 })
20512
- }
20513
- )
20514
- }
20515
- ),
20516
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20517
- "td",
20518
- {
20519
- style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20520
- className: "fc:px-4 fc:py-3 fc:align-middle",
20521
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20522
- "div",
20523
- {
20524
- style: {
20525
- width: "158px",
20526
- wordBreak: "break-word",
20527
- overflowWrap: "anywhere"
20528
- },
20529
- className: "fc:whitespace-normal",
20530
- 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 })
20531
- }
20532
- )
20533
- }
20534
- ),
20535
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20536
- "td",
20537
- {
20538
- style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
20539
- className: "fc:px-3 fc:py-3 fc:text-center fc:align-middle",
20540
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20541
- "span",
20542
- {
20543
- 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"}`,
20544
- children: row.priority
20545
- }
20546
- )
20547
- }
20548
- ),
20549
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20550
- "td",
20551
- {
20552
- style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
20553
- className: "fc:px-4 fc:py-3 fc:align-middle",
20554
- 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 }) })
20555
- }
20556
- ),
20557
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20558
- "td",
20559
- {
20560
- style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
20561
- className: "fc:px-4 fc:py-3 fc:align-middle",
20562
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20563
- "div",
20757
+ }
20758
+ ),
20759
+ visibleDynamicColumns.map((col) => {
20760
+ const colWidthNum = parseInt(col.width || "180", 10);
20761
+ const contentWidth = `${Math.max(colWidthNum - 32, 80)}px`;
20762
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20763
+ "td",
20564
20764
  {
20565
20765
  style: {
20566
- width: "118px",
20567
- wordBreak: "break-word",
20568
- overflowWrap: "anywhere"
20766
+ width: col.width || "180px",
20767
+ minWidth: col.width || "180px",
20768
+ maxWidth: col.width || "180px"
20569
20769
  },
20570
- className: "fc:whitespace-normal",
20770
+ 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",
20571
20771
  children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20572
- "span",
20772
+ "div",
20573
20773
  {
20574
- 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"}`,
20575
- children: row.slaStatus
20774
+ style: {
20775
+ width: contentWidth,
20776
+ wordBreak: "break-word",
20777
+ overflowWrap: "anywhere"
20778
+ },
20779
+ className: "fc:whitespace-normal",
20780
+ 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] || "-" })
20576
20781
  }
20577
20782
  )
20578
- }
20579
- )
20580
- }
20581
- ),
20582
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20583
- "td",
20584
- {
20585
- style: { width: "120px", minWidth: "120px", maxWidth: "120px" },
20586
- className: "fc:px-3 fc:py-3 fc:text-center fc:align-middle",
20587
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20588
- "span",
20589
- {
20590
- 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"}`,
20591
- children: row.status
20592
- }
20593
- )
20594
- }
20595
- ),
20596
- /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
20597
- "td",
20598
- {
20599
- style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
20600
- 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)]",
20601
- children: [
20602
- activeTab === "filePool" && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
20603
- "button",
20783
+ },
20784
+ col.key
20785
+ );
20786
+ }),
20787
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20788
+ "td",
20789
+ {
20790
+ style: { width: "300px", minWidth: "300px", maxWidth: "300px" },
20791
+ className: "fc:px-4 fc:py-3 fc:align-middle",
20792
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20793
+ "div",
20604
20794
  {
20605
- type: "button",
20606
- onClick: () => handleOpenPoolModal(row),
20607
- style: { fontSize: "12px" },
20608
- 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",
20609
- children: [
20610
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiInboxArchiveLine, { size: 14 }),
20611
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: "Pool" })
20612
- ]
20795
+ style: {
20796
+ width: "268px",
20797
+ wordBreak: "break-word",
20798
+ overflowWrap: "anywhere"
20799
+ },
20800
+ className: "fc:whitespace-normal",
20801
+ 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 })
20613
20802
  }
20614
- ),
20615
- activeTab === "myFiles" && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
20616
- "button",
20803
+ )
20804
+ }
20805
+ ),
20806
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20807
+ "td",
20808
+ {
20809
+ style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20810
+ className: "fc:px-4 fc:py-3 fc:align-middle",
20811
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20812
+ "div",
20617
20813
  {
20618
- type: "button",
20619
- onClick: () => handleOpenTakeAction(row),
20620
- style: { fontSize: "12px" },
20621
- className: "fc:inline-flex fc:items-center fc:gap-1.5 fc:h-8 fc:px-3 fc:bg-emerald-600 hover:fc:bg-emerald-700 fc:text-white fc:font-bold fc:rounded-xl fc:shadow-sm fc:shadow-emerald-500/20 fc:transition-all hover:fc:scale-[1.02] active:fc:scale-95",
20622
- children: [
20623
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiFileUploadLine, { size: 14 }),
20624
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: "Take Action" })
20625
- ]
20814
+ style: {
20815
+ width: "158px",
20816
+ wordBreak: "break-word",
20817
+ overflowWrap: "anywhere"
20818
+ },
20819
+ className: "fc:whitespace-normal",
20820
+ 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 })
20626
20821
  }
20627
- ),
20628
- activeTab === "totalFiles" && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
20629
- "button",
20822
+ )
20823
+ }
20824
+ ),
20825
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20826
+ "td",
20827
+ {
20828
+ style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20829
+ className: "fc:px-4 fc:py-3 fc:align-middle",
20830
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20831
+ "div",
20630
20832
  {
20631
- type: "button",
20632
- onClick: () => handleOpenView(row),
20633
- style: { fontSize: "12px" },
20634
- 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",
20635
- children: [
20636
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiEyeLine, { size: 14 }),
20637
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: "View" })
20638
- ]
20833
+ style: {
20834
+ width: "158px",
20835
+ wordBreak: "break-word",
20836
+ overflowWrap: "anywhere"
20837
+ },
20838
+ className: "fc:whitespace-normal",
20839
+ 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 })
20639
20840
  }
20640
20841
  )
20641
- ]
20642
- }
20643
- )
20644
- ]
20645
- },
20646
- row.fileId || row.fileNumber
20647
- );
20648
- }) })
20649
- ] }) }),
20842
+ }
20843
+ ),
20844
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20845
+ "td",
20846
+ {
20847
+ style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
20848
+ className: "fc:px-3 fc:py-3 fc:text-center fc:align-middle",
20849
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20850
+ "span",
20851
+ {
20852
+ 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"}`,
20853
+ children: row.priority
20854
+ }
20855
+ )
20856
+ }
20857
+ ),
20858
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20859
+ "td",
20860
+ {
20861
+ style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
20862
+ className: "fc:px-4 fc:py-3 fc:align-middle",
20863
+ 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 }) })
20864
+ }
20865
+ ),
20866
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20867
+ "td",
20868
+ {
20869
+ style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
20870
+ className: "fc:px-4 fc:py-3 fc:align-middle",
20871
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20872
+ "div",
20873
+ {
20874
+ style: {
20875
+ width: "118px",
20876
+ wordBreak: "break-word",
20877
+ overflowWrap: "anywhere"
20878
+ },
20879
+ className: "fc:whitespace-normal",
20880
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20881
+ "span",
20882
+ {
20883
+ 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"}`,
20884
+ children: row.slaStatus
20885
+ }
20886
+ )
20887
+ }
20888
+ )
20889
+ }
20890
+ ),
20891
+ activeTab === "totalFiles" && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20892
+ "td",
20893
+ {
20894
+ style: { width: "160px", minWidth: "160px", maxWidth: "160px" },
20895
+ className: "fc:px-4 fc:py-3 fc:align-middle",
20896
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:text-xs fc:font-medium fc:text-slate-700", children: row.fileAt })
20897
+ }
20898
+ ),
20899
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20900
+ "td",
20901
+ {
20902
+ style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20903
+ className: "fc:px-3 fc:py-3 fc:text-center fc:align-middle",
20904
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20905
+ "span",
20906
+ {
20907
+ 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"}`,
20908
+ children: row.status
20909
+ }
20910
+ )
20911
+ }
20912
+ ),
20913
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
20914
+ "td",
20915
+ {
20916
+ style: { width: "195px", minWidth: "195px", maxWidth: "195px" },
20917
+ 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)]",
20918
+ children: [
20919
+ activeTab === "filePool" && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
20920
+ "button",
20921
+ {
20922
+ type: "button",
20923
+ onClick: () => handleOpenPoolModal(row),
20924
+ style: { fontSize: "12px" },
20925
+ 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",
20926
+ children: [
20927
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiInboxArchiveLine, { size: 14 }),
20928
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: "Claim" })
20929
+ ]
20930
+ }
20931
+ ),
20932
+ activeTab === "myFiles" && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-center fc:gap-1.5", children: [
20933
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
20934
+ "button",
20935
+ {
20936
+ type: "button",
20937
+ onClick: () => handleOpenTakeAction(row),
20938
+ style: { fontSize: "11px" },
20939
+ 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",
20940
+ children: [
20941
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiFileUploadLine, { size: 13 }),
20942
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: "Take Action" })
20943
+ ]
20944
+ }
20945
+ ),
20946
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20947
+ "button",
20948
+ {
20949
+ type: "button",
20950
+ style: { fontSize: "11px" },
20951
+ 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",
20952
+ children: "Unclaim"
20953
+ }
20954
+ )
20955
+ ] }),
20956
+ activeTab === "totalFiles" && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
20957
+ "button",
20958
+ {
20959
+ type: "button",
20960
+ onClick: () => handleOpenView(row),
20961
+ style: { fontSize: "12px" },
20962
+ 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",
20963
+ children: [
20964
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiEyeLine, { size: 14 }),
20965
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: "View" })
20966
+ ]
20967
+ }
20968
+ )
20969
+ ]
20970
+ }
20971
+ )
20972
+ ]
20973
+ },
20974
+ row.fileId || row.fileNumber
20975
+ );
20976
+ }) })
20977
+ ] })
20978
+ ] }),
20650
20979
  /* @__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: [
20651
20980
  /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { className: "fc:text-xs fc:text-slate-500 fc:font-medium", children: [
20652
20981
  "Showing ",