flowcore-fn 10.3.2 → 10.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4741,7 +4741,7 @@ import Swal9 from "sweetalert2";
4741
4741
 
4742
4742
  // src/components/WorkFlowTransition/AddWorkFlowTransitionModal.js
4743
4743
  import React20, { useEffect as useEffect14, useState as useState15 } from "react";
4744
- import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
4744
+ import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
4745
4745
  var rowsFrom = (response) => {
4746
4746
  var _a, _b, _c, _d, _e, _f, _g;
4747
4747
  const value = (_e = (_d = (_c = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) != null ? _c : (_b = response == null ? void 0 : response.data) == null ? void 0 : _b.result) != null ? _d : response == null ? void 0 : response.data) != null ? _e : response;
@@ -4757,21 +4757,24 @@ var lookupEndpoint = (name, fallback) => {
4757
4757
  }
4758
4758
  };
4759
4759
  function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
4760
- 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;
4760
+ 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;
4761
4761
  const [formData, setFormData] = useState15({
4762
4762
  workflowTypeId: String((_b = (_a = editData == null ? void 0 : editData.workflowTypeId) != null ? _a : editData == null ? void 0 : editData.WorkflowTypeId) != null ? _b : ""),
4763
4763
  workflow: String((_d = (_c = editData == null ? void 0 : editData.workflowId) != null ? _c : editData == null ? void 0 : editData.WorkflowId) != null ? _d : ""),
4764
4764
  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 : ""),
4765
4765
  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 : ""),
4766
- actionCode: (_n = (_m = editData == null ? void 0 : editData.actionCode) != null ? _m : editData == null ? void 0 : editData.ActionCode) != null ? _n : "",
4767
- actionName: (_p = (_o = editData == null ? void 0 : editData.actionName) != null ? _o : editData == null ? void 0 : editData.ActionName) != null ? _p : "",
4768
- sequenceNo: String((_r = (_q = editData == null ? void 0 : editData.sequenceNo) != null ? _q : editData == null ? void 0 : editData.SequenceNo) != null ? _r : "1"),
4769
- isDefault: Boolean((_t = (_s = editData == null ? void 0 : editData.isDefault) != null ? _s : editData == null ? void 0 : editData.IsDefault) != null ? _t : false),
4770
- requireComment: Boolean((_v = (_u = editData == null ? void 0 : editData.requireComment) != null ? _u : editData == null ? void 0 : editData.RequireComment) != null ? _v : false),
4771
- status: ((_x = (_w = editData == null ? void 0 : editData.isActive) != null ? _w : editData == null ? void 0 : editData.IsActive) != null ? _x : true) ? "active" : "inactive"
4766
+ 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),
4767
+ actionCode: (_u = (_t = editData == null ? void 0 : editData.actionCode) != null ? _t : editData == null ? void 0 : editData.ActionCode) != null ? _u : "",
4768
+ actionName: (_w = (_v = editData == null ? void 0 : editData.actionName) != null ? _v : editData == null ? void 0 : editData.ActionName) != null ? _w : "",
4769
+ isDefault: Boolean((_y = (_x = editData == null ? void 0 : editData.isDefault) != null ? _x : editData == null ? void 0 : editData.IsDefault) != null ? _y : false),
4770
+ requireComment: Boolean((_A = (_z = editData == null ? void 0 : editData.requireComment) != null ? _z : editData == null ? void 0 : editData.RequireComment) != null ? _A : false),
4771
+ status: ((_C = (_B = editData == null ? void 0 : editData.isActive) != null ? _B : editData == null ? void 0 : editData.IsActive) != null ? _C : true) ? "active" : "inactive"
4772
4772
  });
4773
4773
  const [errors, setErrors] = useState15({});
4774
4774
  const [isSubmitting, setIsSubmitting] = useState15(false);
4775
+ const [availableActions, setAvailableActions] = useState15([]);
4776
+ const [loadingActions, setLoadingActions] = useState15(false);
4777
+ const [actionFetchError, setActionFetchError] = useState15("");
4775
4778
  const [workflowTypes, setWorkflowTypes] = useState15([]);
4776
4779
  const [loadingWorkflowTypes, setLoadingWorkflowTypes] = useState15(false);
4777
4780
  const [workflowTypeFetchError, setWorkflowTypeFetchError] = useState15("");
@@ -4852,19 +4855,19 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
4852
4855
  };
4853
4856
  }, [formData.workflowTypeId]);
4854
4857
  useEffect14(() => {
4855
- 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;
4858
+ 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;
4856
4859
  if (editData) {
4857
4860
  setFormData({
4858
4861
  workflowTypeId: String((_b2 = (_a2 = editData == null ? void 0 : editData.workflowTypeId) != null ? _a2 : editData == null ? void 0 : editData.WorkflowTypeId) != null ? _b2 : ""),
4859
4862
  workflow: String((_d2 = (_c2 = editData == null ? void 0 : editData.workflowId) != null ? _c2 : editData == null ? void 0 : editData.WorkflowId) != null ? _d2 : ""),
4860
4863
  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 : ""),
4861
4864
  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 : ""),
4862
- actionCode: (_n2 = (_m2 = editData == null ? void 0 : editData.actionCode) != null ? _m2 : editData == null ? void 0 : editData.ActionCode) != null ? _n2 : "",
4863
- actionName: (_p2 = (_o2 = editData == null ? void 0 : editData.actionName) != null ? _o2 : editData == null ? void 0 : editData.ActionName) != null ? _p2 : "",
4864
- sequenceNo: String((_r2 = (_q2 = editData == null ? void 0 : editData.sequenceNo) != null ? _q2 : editData == null ? void 0 : editData.SequenceNo) != null ? _r2 : "1"),
4865
- isDefault: Boolean((_t2 = (_s2 = editData == null ? void 0 : editData.isDefault) != null ? _s2 : editData == null ? void 0 : editData.IsDefault) != null ? _t2 : false),
4866
- requireComment: Boolean((_v2 = (_u2 = editData == null ? void 0 : editData.requireComment) != null ? _u2 : editData == null ? void 0 : editData.RequireComment) != null ? _v2 : false),
4867
- status: ((_x2 = (_w2 = editData == null ? void 0 : editData.isActive) != null ? _w2 : editData == null ? void 0 : editData.IsActive) != null ? _x2 : true) ? "active" : "inactive"
4865
+ 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),
4866
+ actionCode: (_u2 = (_t2 = editData == null ? void 0 : editData.actionCode) != null ? _t2 : editData == null ? void 0 : editData.ActionCode) != null ? _u2 : "",
4867
+ actionName: (_w2 = (_v2 = editData == null ? void 0 : editData.actionName) != null ? _v2 : editData == null ? void 0 : editData.ActionName) != null ? _w2 : "",
4868
+ isDefault: Boolean((_y2 = (_x2 = editData == null ? void 0 : editData.isDefault) != null ? _x2 : editData == null ? void 0 : editData.IsDefault) != null ? _y2 : false),
4869
+ requireComment: Boolean((_A2 = (_z2 = editData == null ? void 0 : editData.requireComment) != null ? _z2 : editData == null ? void 0 : editData.RequireComment) != null ? _A2 : false),
4870
+ status: ((_C2 = (_B2 = editData == null ? void 0 : editData.isActive) != null ? _B2 : editData == null ? void 0 : editData.IsActive) != null ? _C2 : true) ? "active" : "inactive"
4868
4871
  });
4869
4872
  setErrors({});
4870
4873
  }
@@ -4921,6 +4924,60 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
4921
4924
  active = false;
4922
4925
  };
4923
4926
  }, [formData.workflow]);
4927
+ useEffect14(() => {
4928
+ if (!formData.fromStep) {
4929
+ setAvailableActions([]);
4930
+ setActionFetchError("");
4931
+ setLoadingActions(false);
4932
+ setFormData((current) => __spreadProps(__spreadValues({}, current), { actionCode: "", actionName: "" }));
4933
+ return void 0;
4934
+ }
4935
+ let active = true;
4936
+ const loadActions = async () => {
4937
+ var _a2, _b2, _c2, _d2, _e2, _f2;
4938
+ setAvailableActions([]);
4939
+ setActionFetchError("");
4940
+ setLoadingActions(true);
4941
+ try {
4942
+ const flowCore = (_b2 = (_a2 = getApiEndpoints()) == null ? void 0 : _a2.flowCore) != null ? _b2 : {};
4943
+ const endpoint2 = (_d2 = (_c2 = flowCore.inbox) == null ? void 0 : _c2.GetPermisiionLabelWithCodeAll) != null ? _d2 : "/api/flowcore/StepPermission/GetByWorkflowStepId";
4944
+ const url = typeof endpoint2 === "function" ? endpoint2() : String(endpoint2);
4945
+ const actions = rowsFrom(
4946
+ await getApiService().get(url)
4947
+ ).map(({ name }) => ({ name })).filter((action) => action.name);
4948
+ if (!active) return;
4949
+ setAvailableActions(actions);
4950
+ setFormData((current) => {
4951
+ var _a3, _b3;
4952
+ const currentActionValues = [current.actionCode, current.actionName].filter(Boolean).map((value) => String(value).trim().toUpperCase());
4953
+ const selectedAction = actions.find((action) => {
4954
+ const actionName = String(action.name).trim().toUpperCase();
4955
+ return currentActionValues.includes(actionName);
4956
+ });
4957
+ const defaultAction = selectedAction != null ? selectedAction : !editData ? actions[0] : null;
4958
+ return __spreadProps(__spreadValues({}, current), {
4959
+ actionCode: (_a3 = defaultAction == null ? void 0 : defaultAction.name) != null ? _a3 : current.actionCode,
4960
+ actionName: (_b3 = defaultAction == null ? void 0 : defaultAction.name) != null ? _b3 : current.actionName
4961
+ });
4962
+ });
4963
+ if (actions.length === 0) {
4964
+ setActionFetchError("No actions are available for the selected From Step.");
4965
+ }
4966
+ } catch (error) {
4967
+ if (active) {
4968
+ setActionFetchError(
4969
+ ((_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."
4970
+ );
4971
+ }
4972
+ } finally {
4973
+ if (active) setLoadingActions(false);
4974
+ }
4975
+ };
4976
+ loadActions();
4977
+ return () => {
4978
+ active = false;
4979
+ };
4980
+ }, [formData.fromStep]);
4924
4981
  useEffect14(() => {
4925
4982
  const handleKeyDown = (e) => {
4926
4983
  if (e.key === "Escape") {
@@ -4934,10 +4991,23 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
4934
4991
  const filteredSteps = workflowSteps;
4935
4992
  const handleChange = (field, value) => {
4936
4993
  let sanitized = value;
4937
- if (field === "actionCode" && typeof value === "string") {
4938
- sanitized = value.toUpperCase().replace(/[^A-Z0-9_-]/g, "");
4939
- } else if (field === "sequenceNo" && typeof value === "string") {
4940
- sanitized = value.replace(/^-+/, "");
4994
+ if (field === "returnToApplicant") {
4995
+ setFormData((prev) => __spreadProps(__spreadValues({}, prev), {
4996
+ returnToApplicant: Boolean(value),
4997
+ toStep: value ? "0" : prev.toStep === "0" ? "" : prev.toStep
4998
+ }));
4999
+ if (errors.toStep) setErrors((prev) => __spreadProps(__spreadValues({}, prev), { toStep: "" }));
5000
+ return;
5001
+ }
5002
+ if (field === "fromStep") {
5003
+ setFormData((prev) => __spreadProps(__spreadValues({}, prev), {
5004
+ fromStep: sanitized,
5005
+ actionCode: "",
5006
+ actionName: ""
5007
+ }));
5008
+ if (errors.fromStep) setErrors((prev) => __spreadProps(__spreadValues({}, prev), { fromStep: "" }));
5009
+ if (errors.actionName) setErrors((prev) => __spreadProps(__spreadValues({}, prev), { actionName: "" }));
5010
+ return;
4941
5011
  }
4942
5012
  if (field === "workflowTypeId") {
4943
5013
  setFormData((prev) => {
@@ -4997,11 +5067,9 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
4997
5067
  if (!formData.workflowTypeId) newErrors.workflowTypeId = "Workflow Type is required.";
4998
5068
  if (!formData.workflow) newErrors.workflow = "Workflow is required.";
4999
5069
  if (!formData.fromStep) newErrors.fromStep = "From Step is required.";
5000
- if (!formData.toStep) newErrors.toStep = "To Step is required.";
5001
- if (!formData.actionCode.trim()) newErrors.actionCode = "Action Code is required.";
5002
- if (!formData.actionName.trim()) newErrors.actionName = "Action Name is required.";
5003
- if (!formData.sequenceNo || isNaN(Number(formData.sequenceNo)) || Number(formData.sequenceNo) <= 0) {
5004
- newErrors.sequenceNo = "Sequence number must be at least 1.";
5070
+ if (!formData.returnToApplicant && !formData.toStep) newErrors.toStep = "To Step is required.";
5071
+ if (!formData.actionCode.trim() || !formData.actionName.trim()) {
5072
+ newErrors.actionName = "Action Name is required.";
5005
5073
  }
5006
5074
  setErrors(newErrors);
5007
5075
  return Object.keys(newErrors).length === 0;
@@ -5016,10 +5084,10 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
5016
5084
  workflowTypeId: Number(formData.workflowTypeId) || 0,
5017
5085
  workflowId: Number(formData.workflow),
5018
5086
  fromWorkflowStepId: Number(formData.fromStep),
5019
- toWorkflowStepId: Number(formData.toStep),
5020
- actionCode: formData.actionCode.trim().toUpperCase(),
5087
+ toWorkflowStepId: formData.returnToApplicant ? 0 : Number(formData.toStep),
5088
+ actionCode: formData.actionCode.trim(),
5021
5089
  actionName: formData.actionName.trim(),
5022
- sequenceNo: Number(formData.sequenceNo) || 1,
5090
+ isReturnToApplicant: Boolean(formData.returnToApplicant),
5023
5091
  isDefault: Boolean(formData.isDefault),
5024
5092
  requireComment: Boolean(formData.requireComment),
5025
5093
  isActive: formData.status === "active",
@@ -5028,10 +5096,10 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
5028
5096
  workflowTypeId: Number(formData.workflowTypeId) || 0,
5029
5097
  workflowId: Number(formData.workflow),
5030
5098
  fromWorkflowStepId: Number(formData.fromStep),
5031
- toWorkflowStepId: Number(formData.toStep),
5032
- actionCode: formData.actionCode.trim().toUpperCase(),
5099
+ toWorkflowStepId: formData.returnToApplicant ? 0 : Number(formData.toStep),
5100
+ actionCode: formData.actionCode.trim(),
5033
5101
  actionName: formData.actionName.trim(),
5034
- sequenceNo: Number(formData.sequenceNo) || 1,
5102
+ isReturnToApplicant: Boolean(formData.returnToApplicant),
5035
5103
  isDefault: Boolean(formData.isDefault),
5036
5104
  requireComment: Boolean(formData.requireComment),
5037
5105
  isActive: formData.status === "active",
@@ -5045,6 +5113,16 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
5045
5113
  }
5046
5114
  };
5047
5115
  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"}`;
5116
+ const inputStyle = (hasErr) => ({
5117
+ width: "100%",
5118
+ height: 42,
5119
+ boxSizing: "border-box",
5120
+ padding: "0 36px",
5121
+ border: `1px solid ${hasErr ? "#ef4444" : "#cbd5e1"}`,
5122
+ borderRadius: 10,
5123
+ backgroundColor: "#fff",
5124
+ color: "#334155"
5125
+ });
5048
5126
  return /* @__PURE__ */ jsxs19("div", { className: "fc:fixed fc:inset-0 fc:z-50 fc:flex fc:items-center fc:justify-center fc:p-4", children: [
5049
5127
  /* @__PURE__ */ jsx20(
5050
5128
  "div",
@@ -5053,411 +5131,410 @@ function AddWorkTransitionStepModal({ onClose, onSave, editData }) {
5053
5131
  onClick: onClose
5054
5132
  }
5055
5133
  ),
5056
- /* @__PURE__ */ jsxs19("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: [
5057
- /* @__PURE__ */ jsxs19("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: [
5058
- /* @__PURE__ */ jsxs19("div", { className: "fc:flex fc:items-center fc:gap-4", children: [
5059
- /* @__PURE__ */ jsx20("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__ */ jsx20("svg", { className: "fc:w-6 fc:h-6", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx20("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" }) }) }),
5060
- /* @__PURE__ */ jsxs19("div", { children: [
5061
- /* @__PURE__ */ jsx20("h2", { className: "fc:text-xl fc:font-extrabold fc:text-slate-800 fc:tracking-tight", children: editData ? "Edit Workflow Transition" : "Add Workflow Transition" }),
5062
- /* @__PURE__ */ jsx20("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" })
5063
- ] })
5064
- ] }),
5065
- /* @__PURE__ */ jsx20(
5066
- "button",
5067
- {
5068
- type: "button",
5069
- onClick: onClose,
5070
- 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",
5071
- "aria-label": "Close",
5072
- children: /* @__PURE__ */ jsx20("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__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) })
5073
- }
5074
- )
5075
- ] }),
5076
- /* @__PURE__ */ jsxs19("form", { onSubmit: handleSubmit, className: "fc:flex fc:flex-col fc:flex-1 fc:overflow-hidden", children: [
5077
- /* @__PURE__ */ jsxs19("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: [
5078
- /* @__PURE__ */ jsxs19("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: [
5079
- /* @__PURE__ */ jsxs19("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: [
5080
- /* @__PURE__ */ jsx20("div", { className: "fc:p-1.5 fc:bg-indigo-50 fc:rounded-lg", children: /* @__PURE__ */ jsx20("svg", { className: "fc:w-4 fc:h-4", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx20("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" }) }) }),
5081
- /* @__PURE__ */ jsx20("span", { children: "Workflow Transition Information" })
5082
- ] }),
5083
- /* @__PURE__ */ jsxs19("div", { className: "fc:grid fc:grid-cols-2 md:fc:grid-cols-2 fc:gap-5", children: [
5084
- /* @__PURE__ */ jsxs19("div", { children: [
5085
- /* @__PURE__ */ jsxs19("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
5086
- "Workflow Type ",
5087
- /* @__PURE__ */ jsx20("span", { className: "fc:text-red-500", children: "*" })
5134
+ /* @__PURE__ */ jsxs19(
5135
+ "div",
5136
+ {
5137
+ 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",
5138
+ style: { width: "min(840px, calc(100vw - 24px))", maxHeight: "min(700px, calc(100vh - 24px))", boxShadow: "0 24px 64px rgba(15, 23, 42, 0.22)" },
5139
+ children: [
5140
+ /* @__PURE__ */ jsxs19(
5141
+ "div",
5142
+ {
5143
+ 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",
5144
+ style: { flexShrink: 0, padding: "12px 20px" },
5145
+ children: [
5146
+ /* @__PURE__ */ jsxs19("div", { className: "fc:flex fc:items-center fc:gap-4", children: [
5147
+ /* @__PURE__ */ jsx20("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__ */ jsx20("svg", { className: "fc:w-6 fc:h-6", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx20("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" }) }) }),
5148
+ /* @__PURE__ */ jsxs19("div", { children: [
5149
+ /* @__PURE__ */ jsx20("h2", { className: "fc:text-xl fc:font-extrabold fc:text-slate-800 fc:tracking-tight", children: editData ? "Edit Workflow Transition" : "Add Workflow Transition" }),
5150
+ /* @__PURE__ */ jsx20("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" })
5151
+ ] })
5088
5152
  ] }),
5089
- /* @__PURE__ */ jsxs19("div", { className: "fc:relative", children: [
5153
+ /* @__PURE__ */ jsx20(
5154
+ "button",
5155
+ {
5156
+ type: "button",
5157
+ onClick: onClose,
5158
+ 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",
5159
+ "aria-label": "Close",
5160
+ children: /* @__PURE__ */ jsx20("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__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) })
5161
+ }
5162
+ )
5163
+ ]
5164
+ }
5165
+ ),
5166
+ /* @__PURE__ */ jsxs19("form", { onSubmit: handleSubmit, className: "fc:flex fc:flex-col fc:flex-1 fc:overflow-hidden", children: [
5167
+ /* @__PURE__ */ jsxs19(
5168
+ "div",
5169
+ {
5170
+ className: "fc:flex fc:flex-col fc:overflow-y-auto fc:bg-slate-50/40",
5171
+ style: { flex: "1 1 auto", minHeight: 0, padding: "14px 20px", gap: 12 },
5172
+ children: [
5090
5173
  /* @__PURE__ */ jsxs19(
5091
- "select",
5174
+ "div",
5092
5175
  {
5093
- value: formData.workflowTypeId,
5094
- onChange: (e) => handleChange("workflowTypeId", e.target.value),
5095
- disabled: loadingWorkflowTypes,
5096
- className: inputCls(errors.workflowTypeId),
5176
+ className: "fc:bg-white fc:rounded-2xl fc:border fc:border-slate-200/70 fc:duration-300",
5177
+ style: { display: "flex", flexDirection: "column", gap: 12, padding: 16, borderRadius: 14 },
5097
5178
  children: [
5098
- /* @__PURE__ */ jsx20("option", { value: "", children: loadingWorkflowTypes ? "Loading workflow types..." : "Select Workflow Type" }),
5099
- formData.workflowTypeId && !workflowTypes.some(
5100
- (t) => {
5101
- var _a2, _b2;
5102
- return String((_b2 = (_a2 = t.workflowTypeId) != null ? _a2 : t.WorkflowTypeId) != null ? _b2 : t.id) === String(formData.workflowTypeId);
5179
+ /* @__PURE__ */ jsxs19("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: [
5180
+ /* @__PURE__ */ jsx20("div", { className: "fc:p-1.5 fc:bg-indigo-50 fc:rounded-lg", children: /* @__PURE__ */ jsx20("svg", { className: "fc:w-4 fc:h-4", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx20("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" }) }) }),
5181
+ /* @__PURE__ */ jsx20("span", { children: "Workflow Transition Information" })
5182
+ ] }),
5183
+ /* @__PURE__ */ jsxs19("div", { className: "fc:grid fc:grid-cols-2 md:fc:grid-cols-2 fc:gap-5", children: [
5184
+ /* @__PURE__ */ jsxs19("div", { children: [
5185
+ /* @__PURE__ */ jsxs19("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
5186
+ "Workflow Type ",
5187
+ /* @__PURE__ */ jsx20("span", { className: "fc:text-red-500", children: "*" })
5188
+ ] }),
5189
+ /* @__PURE__ */ jsxs19("div", { className: "fc:relative", children: [
5190
+ /* @__PURE__ */ jsxs19(
5191
+ "select",
5192
+ {
5193
+ value: formData.workflowTypeId,
5194
+ onChange: (e) => handleChange("workflowTypeId", e.target.value),
5195
+ disabled: loadingWorkflowTypes,
5196
+ className: inputCls(errors.workflowTypeId),
5197
+ style: inputStyle(errors.workflowTypeId),
5198
+ children: [
5199
+ /* @__PURE__ */ jsx20("option", { value: "", children: loadingWorkflowTypes ? "Loading workflow types..." : "Select Workflow Type" }),
5200
+ formData.workflowTypeId && !workflowTypes.some(
5201
+ (t) => {
5202
+ var _a2, _b2;
5203
+ return String((_b2 = (_a2 = t.workflowTypeId) != null ? _a2 : t.WorkflowTypeId) != null ? _b2 : t.id) === String(formData.workflowTypeId);
5204
+ }
5205
+ ) && /* @__PURE__ */ jsx20("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}` }),
5206
+ workflowTypes.map((type) => {
5207
+ var _a2, _b2, _c2, _d2, _e2, _f2;
5208
+ const id = (_b2 = (_a2 = type.workflowTypeId) != null ? _a2 : type.WorkflowTypeId) != null ? _b2 : type.id;
5209
+ const label = (_f2 = (_e2 = (_d2 = (_c2 = type.workflowTypeName) != null ? _c2 : type.WorkflowTypeName) != null ? _d2 : type.name) != null ? _e2 : type.typeName) != null ? _f2 : `Type ${id}`;
5210
+ return /* @__PURE__ */ jsx20("option", { value: String(id), children: label }, id);
5211
+ })
5212
+ ]
5213
+ }
5214
+ ),
5215
+ /* @__PURE__ */ jsx20("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__ */ jsx20("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" }) })
5216
+ ] }),
5217
+ workflowTypeFetchError && /* @__PURE__ */ jsx20("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowTypeFetchError }),
5218
+ errors.workflowTypeId && /* @__PURE__ */ jsx20("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.workflowTypeId })
5219
+ ] }),
5220
+ /* @__PURE__ */ jsxs19("div", { children: [
5221
+ /* @__PURE__ */ jsxs19("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
5222
+ "Workflow ",
5223
+ /* @__PURE__ */ jsx20("span", { className: "fc:text-red-500", children: "*" })
5224
+ ] }),
5225
+ /* @__PURE__ */ jsxs19("div", { className: "fc:relative", children: [
5226
+ /* @__PURE__ */ jsxs19(
5227
+ "select",
5228
+ {
5229
+ value: formData.workflow,
5230
+ onChange: (e) => handleChange("workflow", e.target.value),
5231
+ disabled: loadingWorkflows,
5232
+ className: inputCls(errors.workflow),
5233
+ style: inputStyle(errors.workflow),
5234
+ children: [
5235
+ /* @__PURE__ */ jsx20("option", { value: "", children: loadingWorkflows ? "Loading workflows..." : !formData.workflowTypeId ? "Select Workflow Type first" : filteredWorkflows.length === 0 ? "No workflows found for this type" : "Select Workflow" }),
5236
+ formData.workflow && !filteredWorkflows.some(
5237
+ (w) => {
5238
+ var _a2, _b2;
5239
+ return String((_b2 = (_a2 = w.workflowId) != null ? _a2 : w.WorkflowId) != null ? _b2 : w.id) === String(formData.workflow);
5240
+ }
5241
+ ) && /* @__PURE__ */ jsx20("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}` }),
5242
+ filteredWorkflows.map((workflow) => {
5243
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
5244
+ const id = (_b2 = (_a2 = workflow.workflowId) != null ? _a2 : workflow.WorkflowId) != null ? _b2 : workflow.id;
5245
+ 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}`;
5246
+ return /* @__PURE__ */ jsx20("option", { value: String(id), children: name }, id);
5247
+ })
5248
+ ]
5249
+ }
5250
+ ),
5251
+ /* @__PURE__ */ jsx20("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__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 6h16M4 10h16M4 14h16M4 18h16" }) })
5252
+ ] }),
5253
+ workflowFetchError && /* @__PURE__ */ jsx20("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowFetchError }),
5254
+ errors.workflow && /* @__PURE__ */ jsx20("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.workflow })
5255
+ ] })
5256
+ ] }),
5257
+ /* @__PURE__ */ jsxs19(
5258
+ "div",
5259
+ {
5260
+ className: "fc:grid fc:gap-3",
5261
+ style: {
5262
+ display: "grid",
5263
+ gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 300px), 1fr))",
5264
+ alignItems: "end",
5265
+ gap: 12
5266
+ },
5267
+ children: [
5268
+ /* @__PURE__ */ jsxs19("div", { children: [
5269
+ /* @__PURE__ */ jsxs19("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
5270
+ "From Step ",
5271
+ /* @__PURE__ */ jsx20("span", { className: "fc:text-red-500", children: "*" })
5272
+ ] }),
5273
+ /* @__PURE__ */ jsxs19("div", { className: "fc:relative", children: [
5274
+ /* @__PURE__ */ jsxs19(
5275
+ "select",
5276
+ {
5277
+ value: formData.fromStep,
5278
+ onChange: (e) => handleChange("fromStep", e.target.value),
5279
+ disabled: loadingWorkflowSteps,
5280
+ className: inputCls(errors.fromStep),
5281
+ style: inputStyle(errors.fromStep),
5282
+ children: [
5283
+ /* @__PURE__ */ jsx20("option", { value: "", children: loadingWorkflowSteps ? "Loading steps..." : !formData.workflow ? "Select Workflow first" : filteredSteps.length === 0 ? "No steps found for this workflow" : "Select From Step" }),
5284
+ formData.fromStep && !filteredSteps.some(
5285
+ (s) => {
5286
+ var _a2, _b2;
5287
+ return String((_b2 = (_a2 = s.workflowStepId) != null ? _a2 : s.WorkflowStepId) != null ? _b2 : s.id) === String(formData.fromStep);
5288
+ }
5289
+ ) && /* @__PURE__ */ jsx20("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}` }),
5290
+ filteredSteps.map((step) => {
5291
+ var _a2, _b2, _c2, _d2, _e2;
5292
+ const id = (_b2 = (_a2 = step.workflowStepId) != null ? _a2 : step.WorkflowStepId) != null ? _b2 : step.id;
5293
+ const name = (_d2 = (_c2 = step.stepName) != null ? _c2 : step.StepName) != null ? _d2 : `Step ${id}`;
5294
+ const code = (_e2 = step.stepCode) != null ? _e2 : step.StepCode;
5295
+ return /* @__PURE__ */ jsxs19("option", { value: String(id), children: [
5296
+ name,
5297
+ " ",
5298
+ code ? `(${code})` : ""
5299
+ ] }, id);
5300
+ })
5301
+ ]
5302
+ }
5303
+ ),
5304
+ /* @__PURE__ */ jsx20("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__ */ jsx20("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" }) })
5305
+ ] }),
5306
+ workflowStepFetchError && /* @__PURE__ */ jsx20("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowStepFetchError }),
5307
+ errors.fromStep && /* @__PURE__ */ jsx20("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.fromStep })
5308
+ ] }),
5309
+ /* @__PURE__ */ jsx20("div", { style: { display: "flex", alignItems: "end", minWidth: 0 }, children: /* @__PURE__ */ jsxs19(
5310
+ "label",
5311
+ {
5312
+ className: "fc:text-xs fc:font-semibold fc:text-slate-700",
5313
+ 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" },
5314
+ children: [
5315
+ /* @__PURE__ */ jsx20(
5316
+ "input",
5317
+ {
5318
+ type: "checkbox",
5319
+ checked: formData.returnToApplicant,
5320
+ onChange: (event) => handleChange("returnToApplicant", event.target.checked),
5321
+ className: "fc:h-4 fc:w-4 fc:rounded fc:border-slate-300 fc:text-indigo-600 focus:fc:ring-indigo-500",
5322
+ style: { width: 16, height: 16, margin: 0, accentColor: "#4f46e5", flexShrink: 0 }
5323
+ }
5324
+ ),
5325
+ /* @__PURE__ */ jsx20("span", { style: { lineHeight: 1.25 }, children: "Return to Applicant" })
5326
+ ]
5327
+ }
5328
+ ) }),
5329
+ /* @__PURE__ */ jsx20("div", { style: { display: formData.returnToApplicant ? "none" : "block", minWidth: 0 }, children: !formData.returnToApplicant && /* @__PURE__ */ jsxs19(Fragment4, { children: [
5330
+ /* @__PURE__ */ jsxs19("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
5331
+ "To Step ",
5332
+ /* @__PURE__ */ jsx20("span", { className: "fc:text-red-500", children: "*" })
5333
+ ] }),
5334
+ /* @__PURE__ */ jsxs19("div", { className: "fc:relative", children: [
5335
+ /* @__PURE__ */ jsxs19(
5336
+ "select",
5337
+ {
5338
+ value: formData.toStep,
5339
+ onChange: (e) => handleChange("toStep", e.target.value),
5340
+ disabled: loadingWorkflowSteps,
5341
+ className: inputCls(errors.toStep),
5342
+ style: inputStyle(errors.toStep),
5343
+ children: [
5344
+ /* @__PURE__ */ jsx20("option", { value: "", children: loadingWorkflowSteps ? "Loading steps..." : !formData.workflow ? "Select Workflow first" : filteredSteps.length === 0 ? "No steps found for this workflow" : "Select To Step" }),
5345
+ formData.toStep && !filteredSteps.some(
5346
+ (s) => {
5347
+ var _a2, _b2;
5348
+ return String((_b2 = (_a2 = s.workflowStepId) != null ? _a2 : s.WorkflowStepId) != null ? _b2 : s.id) === String(formData.toStep);
5349
+ }
5350
+ ) && /* @__PURE__ */ jsx20("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}` }),
5351
+ filteredSteps.map((step) => {
5352
+ var _a2, _b2, _c2, _d2, _e2;
5353
+ const id = (_b2 = (_a2 = step.workflowStepId) != null ? _a2 : step.WorkflowStepId) != null ? _b2 : step.id;
5354
+ const name = (_d2 = (_c2 = step.stepName) != null ? _c2 : step.StepName) != null ? _d2 : `Step ${id}`;
5355
+ const code = (_e2 = step.stepCode) != null ? _e2 : step.StepCode;
5356
+ return /* @__PURE__ */ jsxs19("option", { value: String(id), children: [
5357
+ name,
5358
+ " ",
5359
+ code ? `(${code})` : ""
5360
+ ] }, id);
5361
+ })
5362
+ ]
5363
+ }
5364
+ ),
5365
+ /* @__PURE__ */ jsx20("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__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z" }) })
5366
+ ] }),
5367
+ workflowStepFetchError && /* @__PURE__ */ jsx20("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowStepFetchError }),
5368
+ errors.toStep && /* @__PURE__ */ jsx20("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.toStep })
5369
+ ] }) }),
5370
+ /* @__PURE__ */ jsxs19("div", { style: { minWidth: 0 }, children: [
5371
+ /* @__PURE__ */ jsxs19("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
5372
+ "Action Name ",
5373
+ /* @__PURE__ */ jsx20("span", { className: "fc:text-red-500", children: "*" })
5374
+ ] }),
5375
+ /* @__PURE__ */ jsxs19("div", { className: "fc:relative", children: [
5376
+ /* @__PURE__ */ jsxs19(
5377
+ "select",
5378
+ {
5379
+ value: formData.actionCode,
5380
+ onChange: (event) => {
5381
+ const selectedAction = availableActions.find(
5382
+ (action) => action.name === event.target.value
5383
+ );
5384
+ setFormData((current) => {
5385
+ var _a2, _b2;
5386
+ return __spreadProps(__spreadValues({}, current), {
5387
+ actionCode: (_a2 = selectedAction == null ? void 0 : selectedAction.name) != null ? _a2 : "",
5388
+ actionName: (_b2 = selectedAction == null ? void 0 : selectedAction.name) != null ? _b2 : ""
5389
+ });
5390
+ });
5391
+ if (errors.actionCode || errors.actionName) {
5392
+ setErrors((current) => __spreadProps(__spreadValues({}, current), {
5393
+ actionCode: "",
5394
+ actionName: ""
5395
+ }));
5396
+ }
5397
+ },
5398
+ disabled: loadingActions || !formData.fromStep || availableActions.length === 0,
5399
+ className: inputCls(errors.actionCode || errors.actionName),
5400
+ style: inputStyle(errors.actionCode || errors.actionName),
5401
+ children: [
5402
+ /* @__PURE__ */ jsx20("option", { value: "", children: loadingActions ? "Loading actions..." : !formData.fromStep ? "Select From Step first" : availableActions.length === 0 ? "No actions available" : "Select Action" }),
5403
+ formData.actionCode && !availableActions.some(
5404
+ (action) => action.name === formData.actionCode
5405
+ ) && /* @__PURE__ */ jsx20("option", { value: formData.actionCode, children: formData.actionName || formData.actionCode }),
5406
+ availableActions.map((action) => /* @__PURE__ */ jsx20("option", { value: action.name, children: action.name }, action.name))
5407
+ ]
5408
+ }
5409
+ ),
5410
+ /* @__PURE__ */ jsx20("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__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M7 7h10M7 12h10M7 17h5" }) })
5411
+ ] }),
5412
+ errors.actionName && /* @__PURE__ */ jsx20("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.actionName }),
5413
+ actionFetchError && /* @__PURE__ */ jsx20("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: actionFetchError })
5414
+ ] })
5415
+ ]
5103
5416
  }
5104
- ) && /* @__PURE__ */ jsx20("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}` }),
5105
- workflowTypes.map((type) => {
5106
- var _a2, _b2, _c2, _d2, _e2, _f2;
5107
- const id = (_b2 = (_a2 = type.workflowTypeId) != null ? _a2 : type.WorkflowTypeId) != null ? _b2 : type.id;
5108
- const label = (_f2 = (_e2 = (_d2 = (_c2 = type.workflowTypeName) != null ? _c2 : type.WorkflowTypeName) != null ? _d2 : type.name) != null ? _e2 : type.typeName) != null ? _f2 : `Type ${id}`;
5109
- return /* @__PURE__ */ jsx20("option", { value: String(id), children: label }, id);
5110
- })
5417
+ )
5111
5418
  ]
5112
5419
  }
5113
5420
  ),
5114
- /* @__PURE__ */ jsx20("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__ */ jsx20("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" }) })
5115
- ] }),
5116
- workflowTypeFetchError && /* @__PURE__ */ jsx20("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowTypeFetchError }),
5117
- errors.workflowTypeId && /* @__PURE__ */ jsx20("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.workflowTypeId })
5118
- ] }),
5119
- /* @__PURE__ */ jsxs19("div", { children: [
5120
- /* @__PURE__ */ jsxs19("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
5121
- "Workflow ",
5122
- /* @__PURE__ */ jsx20("span", { className: "fc:text-red-500", children: "*" })
5123
- ] }),
5124
- /* @__PURE__ */ jsxs19("div", { className: "fc:relative", children: [
5125
5421
  /* @__PURE__ */ jsxs19(
5126
- "select",
5422
+ "div",
5127
5423
  {
5128
- value: formData.workflow,
5129
- onChange: (e) => handleChange("workflow", e.target.value),
5130
- disabled: loadingWorkflows,
5131
- className: inputCls(errors.workflow),
5424
+ className: "fc:bg-white fc:rounded-2xl fc:border fc:border-slate-200/70",
5425
+ style: { display: "flex", flexDirection: "column", gap: 12, padding: 16, borderRadius: 14 },
5132
5426
  children: [
5133
- /* @__PURE__ */ jsx20("option", { value: "", children: loadingWorkflows ? "Loading workflows..." : !formData.workflowTypeId ? "Select Workflow Type first" : filteredWorkflows.length === 0 ? "No workflows found for this type" : "Select Workflow" }),
5134
- formData.workflow && !filteredWorkflows.some(
5135
- (w) => {
5136
- var _a2, _b2;
5137
- return String((_b2 = (_a2 = w.workflowId) != null ? _a2 : w.WorkflowId) != null ? _b2 : w.id) === String(formData.workflow);
5138
- }
5139
- ) && /* @__PURE__ */ jsx20("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}` }),
5140
- filteredWorkflows.map((workflow) => {
5141
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
5142
- const id = (_b2 = (_a2 = workflow.workflowId) != null ? _a2 : workflow.WorkflowId) != null ? _b2 : workflow.id;
5143
- 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}`;
5144
- return /* @__PURE__ */ jsx20("option", { value: String(id), children: name }, id);
5145
- })
5427
+ /* @__PURE__ */ jsx20("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__ */ jsx20("span", { children: "Status & Settings" }) }),
5428
+ /* @__PURE__ */ jsxs19("div", { className: "fc:grid fc:grid-cols-2 fc:gap-3", children: [
5429
+ /* @__PURE__ */ jsxs19(
5430
+ "label",
5431
+ {
5432
+ className: "fc:text-xs fc:font-semibold fc:text-slate-700",
5433
+ style: { display: "flex", minHeight: 42, alignItems: "center", gap: 9, padding: "0 11px", border: "1px solid #cbd5e1", borderRadius: 10, background: "#f8fafc", cursor: "pointer" },
5434
+ children: [
5435
+ /* @__PURE__ */ jsx20(
5436
+ "input",
5437
+ {
5438
+ type: "checkbox",
5439
+ checked: formData.isDefault,
5440
+ onChange: (event) => handleChange("isDefault", event.target.checked),
5441
+ style: { width: 16, height: 16, margin: 0, accentColor: "#4f46e5" }
5442
+ }
5443
+ ),
5444
+ "Is Default"
5445
+ ]
5446
+ }
5447
+ ),
5448
+ /* @__PURE__ */ jsxs19(
5449
+ "label",
5450
+ {
5451
+ className: "fc:text-xs fc:font-semibold fc:text-slate-700",
5452
+ style: { display: "flex", minHeight: 42, alignItems: "center", gap: 9, padding: "0 11px", border: "1px solid #cbd5e1", borderRadius: 10, background: "#f8fafc", cursor: "pointer" },
5453
+ children: [
5454
+ /* @__PURE__ */ jsx20(
5455
+ "input",
5456
+ {
5457
+ type: "checkbox",
5458
+ checked: formData.requireComment,
5459
+ onChange: (event) => handleChange("requireComment", event.target.checked),
5460
+ style: { width: 16, height: 16, margin: 0, accentColor: "#4f46e5" }
5461
+ }
5462
+ ),
5463
+ "Require Comment"
5464
+ ]
5465
+ }
5466
+ ),
5467
+ /* @__PURE__ */ jsxs19("div", { children: [
5468
+ /* @__PURE__ */ jsx20("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: "Status" }),
5469
+ /* @__PURE__ */ jsxs19(
5470
+ "select",
5471
+ {
5472
+ value: formData.status,
5473
+ onChange: (event) => handleChange("status", event.target.value),
5474
+ className: inputCls(false),
5475
+ style: __spreadProps(__spreadValues({}, inputStyle(false)), { padding: "0 12px" }),
5476
+ children: [
5477
+ /* @__PURE__ */ jsx20("option", { value: "active", children: "Active" }),
5478
+ /* @__PURE__ */ jsx20("option", { value: "inactive", children: "Inactive" })
5479
+ ]
5480
+ }
5481
+ )
5482
+ ] })
5483
+ ] })
5146
5484
  ]
5147
5485
  }
5148
- ),
5149
- /* @__PURE__ */ jsx20("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__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 6h16M4 10h16M4 14h16M4 18h16" }) })
5150
- ] }),
5151
- workflowFetchError && /* @__PURE__ */ jsx20("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowFetchError }),
5152
- errors.workflow && /* @__PURE__ */ jsx20("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.workflow })
5153
- ] })
5154
- ] }),
5155
- /* @__PURE__ */ jsxs19("div", { className: "fc:grid fc:grid-cols-2 md:fc:grid-cols-2 fc:gap-5", children: [
5156
- /* @__PURE__ */ jsxs19("div", { children: [
5157
- /* @__PURE__ */ jsxs19("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
5158
- "From Step ",
5159
- /* @__PURE__ */ jsx20("span", { className: "fc:text-red-500", children: "*" })
5160
- ] }),
5161
- /* @__PURE__ */ jsxs19("div", { className: "fc:relative", children: [
5486
+ )
5487
+ ]
5488
+ }
5489
+ ),
5490
+ /* @__PURE__ */ jsxs19(
5491
+ "div",
5492
+ {
5493
+ 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",
5494
+ style: { flexShrink: 0, padding: "10px 20px" },
5495
+ children: [
5162
5496
  /* @__PURE__ */ jsxs19(
5163
- "select",
5497
+ "button",
5164
5498
  {
5165
- value: formData.fromStep,
5166
- onChange: (e) => handleChange("fromStep", e.target.value),
5167
- disabled: loadingWorkflowSteps,
5168
- className: inputCls(errors.fromStep),
5499
+ type: "button",
5500
+ onClick: onClose,
5501
+ 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",
5169
5502
  children: [
5170
- /* @__PURE__ */ jsx20("option", { value: "", children: loadingWorkflowSteps ? "Loading steps..." : !formData.workflow ? "Select Workflow first" : filteredSteps.length === 0 ? "No steps found for this workflow" : "Select From Step" }),
5171
- formData.fromStep && !filteredSteps.some(
5172
- (s) => {
5173
- var _a2, _b2;
5174
- return String((_b2 = (_a2 = s.workflowStepId) != null ? _a2 : s.WorkflowStepId) != null ? _b2 : s.id) === String(formData.fromStep);
5175
- }
5176
- ) && /* @__PURE__ */ jsx20("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}` }),
5177
- filteredSteps.map((step) => {
5178
- var _a2, _b2, _c2, _d2, _e2;
5179
- const id = (_b2 = (_a2 = step.workflowStepId) != null ? _a2 : step.WorkflowStepId) != null ? _b2 : step.id;
5180
- const name = (_d2 = (_c2 = step.stepName) != null ? _c2 : step.StepName) != null ? _d2 : `Step ${id}`;
5181
- const code = (_e2 = step.stepCode) != null ? _e2 : step.StepCode;
5182
- return /* @__PURE__ */ jsxs19("option", { value: String(id), children: [
5183
- name,
5184
- " ",
5185
- code ? `(${code})` : ""
5186
- ] }, id);
5187
- })
5503
+ /* @__PURE__ */ jsx20("svg", { className: "fc:w-3.5 fc:h-3.5", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }),
5504
+ "Cancel"
5188
5505
  ]
5189
5506
  }
5190
5507
  ),
5191
- /* @__PURE__ */ jsx20("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__ */ jsx20("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" }) })
5192
- ] }),
5193
- workflowStepFetchError && /* @__PURE__ */ jsx20("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowStepFetchError }),
5194
- errors.fromStep && /* @__PURE__ */ jsx20("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.fromStep })
5195
- ] }),
5196
- /* @__PURE__ */ jsxs19("div", { children: [
5197
- /* @__PURE__ */ jsxs19("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
5198
- "To Step ",
5199
- /* @__PURE__ */ jsx20("span", { className: "fc:text-red-500", children: "*" })
5200
- ] }),
5201
- /* @__PURE__ */ jsxs19("div", { className: "fc:relative", children: [
5202
5508
  /* @__PURE__ */ jsxs19(
5203
- "select",
5509
+ "button",
5204
5510
  {
5205
- value: formData.toStep,
5206
- onChange: (e) => handleChange("toStep", e.target.value),
5207
- disabled: loadingWorkflowSteps,
5208
- className: inputCls(errors.toStep),
5511
+ type: "submit",
5512
+ disabled: isSubmitting,
5513
+ 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",
5209
5514
  children: [
5210
- /* @__PURE__ */ jsx20("option", { value: "", children: loadingWorkflowSteps ? "Loading steps..." : !formData.workflow ? "Select Workflow first" : filteredSteps.length === 0 ? "No steps found for this workflow" : "Select To Step" }),
5211
- formData.toStep && !filteredSteps.some(
5212
- (s) => {
5213
- var _a2, _b2;
5214
- return String((_b2 = (_a2 = s.workflowStepId) != null ? _a2 : s.WorkflowStepId) != null ? _b2 : s.id) === String(formData.toStep);
5215
- }
5216
- ) && /* @__PURE__ */ jsx20("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}` }),
5217
- filteredSteps.map((step) => {
5218
- var _a2, _b2, _c2, _d2, _e2;
5219
- const id = (_b2 = (_a2 = step.workflowStepId) != null ? _a2 : step.WorkflowStepId) != null ? _b2 : step.id;
5220
- const name = (_d2 = (_c2 = step.stepName) != null ? _c2 : step.StepName) != null ? _d2 : `Step ${id}`;
5221
- const code = (_e2 = step.stepCode) != null ? _e2 : step.StepCode;
5222
- return /* @__PURE__ */ jsxs19("option", { value: String(id), children: [
5223
- name,
5224
- " ",
5225
- code ? `(${code})` : ""
5226
- ] }, id);
5227
- })
5515
+ /* @__PURE__ */ jsx20("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__ */ jsx20("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" }) }),
5516
+ isSubmitting ? "Saving..." : editData ? "Update Transition" : "Save Transition"
5228
5517
  ]
5229
5518
  }
5230
- ),
5231
- /* @__PURE__ */ jsx20("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__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z" }) })
5232
- ] }),
5233
- workflowStepFetchError && /* @__PURE__ */ jsx20("p", { className: "fc:text-amber-600 fc:text-[11px] fc:mt-1 fc:font-medium", children: workflowStepFetchError }),
5234
- errors.toStep && /* @__PURE__ */ jsx20("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.toStep })
5235
- ] })
5236
- ] }),
5237
- /* @__PURE__ */ jsxs19("div", { className: "fc:grid fc:grid-cols-3 md:fc:grid-cols-3 fc:gap-5", children: [
5238
- /* @__PURE__ */ jsxs19("div", { children: [
5239
- /* @__PURE__ */ jsxs19("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
5240
- "Action Code ",
5241
- /* @__PURE__ */ jsx20("span", { className: "fc:text-red-500", children: "*" })
5242
- ] }),
5243
- /* @__PURE__ */ jsxs19("div", { className: "fc:relative", children: [
5244
- /* @__PURE__ */ jsx20(
5245
- "input",
5246
- {
5247
- type: "text",
5248
- placeholder: "Enter Action Code",
5249
- value: formData.actionCode,
5250
- onChange: (e) => handleChange("actionCode", e.target.value),
5251
- className: `${inputCls(errors.actionCode)} uppercase`
5252
- }
5253
- ),
5254
- /* @__PURE__ */ jsx20("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__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" }) })
5255
- ] }),
5256
- errors.actionCode && /* @__PURE__ */ jsx20("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.actionCode })
5257
- ] }),
5258
- /* @__PURE__ */ jsxs19("div", { children: [
5259
- /* @__PURE__ */ jsxs19("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
5260
- "Action Name ",
5261
- /* @__PURE__ */ jsx20("span", { className: "fc:text-red-500", children: "*" })
5262
- ] }),
5263
- /* @__PURE__ */ jsxs19("div", { className: "fc:relative", children: [
5264
- /* @__PURE__ */ jsx20(
5265
- "input",
5266
- {
5267
- type: "text",
5268
- placeholder: "Enter Action Name",
5269
- value: formData.actionName,
5270
- onChange: (e) => handleChange("actionName", e.target.value),
5271
- className: inputCls(errors.actionName)
5272
- }
5273
- ),
5274
- /* @__PURE__ */ jsx20("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__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M7 7h10M7 12h10M7 17h5" }) })
5275
- ] }),
5276
- errors.actionName && /* @__PURE__ */ jsx20("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.actionName })
5277
- ] }),
5278
- /* @__PURE__ */ jsxs19("div", { children: [
5279
- /* @__PURE__ */ jsxs19("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: [
5280
- "Sequence No ",
5281
- /* @__PURE__ */ jsx20("span", { className: "fc:text-red-500", children: "*" })
5282
- ] }),
5283
- /* @__PURE__ */ jsxs19("div", { className: "fc:relative", children: [
5284
- /* @__PURE__ */ jsx20(
5285
- "input",
5286
- {
5287
- type: "number",
5288
- min: "1",
5289
- placeholder: "Enter Sequence No",
5290
- value: formData.sequenceNo,
5291
- onChange: (e) => handleChange("sequenceNo", e.target.value),
5292
- className: inputCls(errors.sequenceNo)
5293
- }
5294
- ),
5295
- /* @__PURE__ */ jsx20("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__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M7 20l4-16m2 16l4-16M6 9h14M4 15h14" }) })
5296
- ] }),
5297
- errors.sequenceNo && /* @__PURE__ */ jsx20("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1 fc:font-medium", children: errors.sequenceNo })
5298
- ] })
5299
- ] })
5300
- ] }),
5301
- /* @__PURE__ */ jsxs19("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: [
5302
- /* @__PURE__ */ jsxs19("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: [
5303
- /* @__PURE__ */ jsx20("div", { className: "fc:p-1.5 fc:bg-indigo-50 fc:rounded-lg", children: /* @__PURE__ */ jsxs19("svg", { className: "fc:w-4 fc:h-4", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: [
5304
- /* @__PURE__ */ jsx20("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" }),
5305
- /* @__PURE__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
5306
- ] }) }),
5307
- /* @__PURE__ */ jsx20("span", { children: "Status & Settings" })
5308
- ] }),
5309
- /* @__PURE__ */ jsxs19("div", { className: "fc:grid fc:grid-cols-2 md:fc:grid-cols-2 fc:gap-5", children: [
5310
- /* @__PURE__ */ jsxs19(
5311
- "div",
5312
- {
5313
- onClick: () => handleChange("isDefault", !formData.isDefault),
5314
- 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"}`,
5315
- children: [
5316
- /* @__PURE__ */ jsxs19("div", { className: "fc:flex fc:items-center fc:gap-3", children: [
5317
- /* @__PURE__ */ jsx20("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__ */ jsx20("svg", { className: "fc:w-4 fc:h-4", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z" }) }) }),
5318
- /* @__PURE__ */ jsxs19("div", { children: [
5319
- /* @__PURE__ */ jsx20("p", { className: "fc:text-xs fc:font-bold fc:text-slate-700", children: "Is Default" }),
5320
- /* @__PURE__ */ jsx20("p", { className: "fc:text-[10px] fc:text-slate-400", children: "Set this action as default transition" })
5321
- ] })
5322
- ] }),
5323
- /* @__PURE__ */ jsx20(
5324
- "div",
5325
- {
5326
- 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"}`,
5327
- children: /* @__PURE__ */ jsx20(
5328
- "div",
5329
- {
5330
- 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"}`
5331
- }
5332
- )
5333
- }
5334
- )
5335
- ]
5336
- }
5337
- ),
5338
- /* @__PURE__ */ jsxs19(
5339
- "div",
5340
- {
5341
- onClick: () => handleChange("requireComment", !formData.requireComment),
5342
- 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"}`,
5343
- children: [
5344
- /* @__PURE__ */ jsxs19("div", { className: "fc:flex fc:items-center fc:gap-3", children: [
5345
- /* @__PURE__ */ jsx20("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__ */ jsx20("svg", { className: "fc:w-4 fc:h-4", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx20("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" }) }) }),
5346
- /* @__PURE__ */ jsxs19("div", { children: [
5347
- /* @__PURE__ */ jsx20("p", { className: "fc:text-xs fc:font-bold fc:text-slate-700", children: "Require Comment" }),
5348
- /* @__PURE__ */ jsx20("p", { className: "fc:text-[10px] fc:text-slate-400", children: "Mandatory user remarks on transition" })
5349
- ] })
5350
- ] }),
5351
- /* @__PURE__ */ jsx20(
5352
- "div",
5353
- {
5354
- 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"}`,
5355
- children: /* @__PURE__ */ jsx20(
5356
- "div",
5357
- {
5358
- 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"}`
5359
- }
5360
- )
5361
- }
5362
- )
5363
- ]
5364
- }
5365
- )
5366
- ] }),
5367
- /* @__PURE__ */ jsxs19("div", { children: [
5368
- /* @__PURE__ */ jsx20("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-2.5", children: "Status" }),
5369
- /* @__PURE__ */ jsxs19("div", { className: "fc:grid fc:grid-cols-2 fc:gap-4", children: [
5370
- /* @__PURE__ */ jsxs19(
5371
- "div",
5372
- {
5373
- onClick: () => handleChange("status", "active"),
5374
- 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"}`,
5375
- children: [
5376
- /* @__PURE__ */ jsxs19("div", { className: "fc:flex fc:items-center fc:gap-2.5", children: [
5377
- /* @__PURE__ */ jsxs19("span", { className: "fc:relative fc:flex fc:h-2.5 fc:w-2.5", children: [
5378
- formData.status === "active" && /* @__PURE__ */ jsx20("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" }),
5379
- /* @__PURE__ */ jsx20("span", { className: "fc:relative fc:inline-flex fc:rounded-full fc:h-2.5 fc:w-2.5 fc:bg-emerald-500" })
5380
- ] }),
5381
- /* @__PURE__ */ jsxs19("div", { children: [
5382
- /* @__PURE__ */ jsx20("p", { className: "fc:text-xs fc:font-bold fc:text-slate-800", children: "Active" }),
5383
- /* @__PURE__ */ jsx20("p", { className: "fc:text-[10px] fc:text-slate-400", children: "Ready to execute in workflows" })
5384
- ] })
5385
- ] }),
5386
- /* @__PURE__ */ jsx20(
5387
- "div",
5388
- {
5389
- 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"}`,
5390
- children: formData.status === "active" && /* @__PURE__ */ jsx20("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__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) })
5391
- }
5392
- )
5393
- ]
5394
- }
5395
- ),
5396
- /* @__PURE__ */ jsxs19(
5397
- "div",
5398
- {
5399
- onClick: () => handleChange("status", "inactive"),
5400
- 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"}`,
5401
- children: [
5402
- /* @__PURE__ */ jsxs19("div", { className: "fc:flex fc:items-center fc:gap-2.5", children: [
5403
- /* @__PURE__ */ jsx20("span", { className: "fc:w-2.5 fc:h-2.5 fc:rounded-full fc:bg-slate-400" }),
5404
- /* @__PURE__ */ jsxs19("div", { children: [
5405
- /* @__PURE__ */ jsx20("p", { className: "fc:text-xs fc:font-bold fc:text-slate-800", children: "Inactive" }),
5406
- /* @__PURE__ */ jsx20("p", { className: "fc:text-[10px] fc:text-slate-400", children: "Disabled for processing" })
5407
- ] })
5408
- ] }),
5409
- /* @__PURE__ */ jsx20(
5410
- "div",
5411
- {
5412
- 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"}`,
5413
- children: formData.status === "inactive" && /* @__PURE__ */ jsx20("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__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) })
5414
- }
5415
- )
5416
- ]
5417
- }
5418
- )
5419
- ] })
5420
- ] })
5519
+ )
5520
+ ]
5521
+ }
5522
+ )
5421
5523
  ] })
5422
- ] }),
5423
- /* @__PURE__ */ jsxs19("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: [
5424
- /* @__PURE__ */ jsxs19(
5425
- "button",
5426
- {
5427
- type: "button",
5428
- onClick: onClose,
5429
- 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",
5430
- children: [
5431
- /* @__PURE__ */ jsx20("svg", { className: "fc:w-3.5 fc:h-3.5", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }),
5432
- "Cancel"
5433
- ]
5434
- }
5435
- ),
5436
- /* @__PURE__ */ jsxs19(
5437
- "button",
5438
- {
5439
- type: "submit",
5440
- disabled: isSubmitting,
5441
- 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",
5442
- children: [
5443
- /* @__PURE__ */ jsx20("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__ */ jsx20("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" }) }),
5444
- isSubmitting ? "Saving..." : editData ? "Update Transition" : "Save Transition"
5445
- ]
5446
- }
5447
- )
5448
- ] })
5449
- ] })
5450
- ] })
5524
+ ]
5525
+ }
5526
+ )
5451
5527
  ] });
5452
5528
  }
5453
5529
 
5454
5530
  // src/components/WorkFlowTransition/Transitiontable.js
5455
- import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
5531
+ import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
5456
5532
  var PATHS = {
5457
5533
  create: "/api/flowcore/WorkflowTransition/Create",
5458
5534
  update: "/api/flowcore/WorkflowTransition/Update",
5459
5535
  getById: "/api/flowcore/WorkflowTransition/GetById",
5460
- getList: "/api/flowcore/WorkflowTransition/GetList"
5536
+ getList: "/api/flowcore/WorkflowTransition/GetList",
5537
+ delete: "/api/flowcore/WorkflowTransition/Delete"
5461
5538
  };
5462
5539
  var getRows = (response) => {
5463
5540
  var _a, _b, _c, _d, _e, _f, _g;
@@ -5479,16 +5556,22 @@ var getByIdUrl = (id) => {
5479
5556
  return typeof endpoint2 === "function" ? endpoint2(id) : `${endpoint2}/${id}`;
5480
5557
  };
5481
5558
  var normalise = (item) => {
5482
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
5559
+ 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;
5483
5560
  return __spreadProps(__spreadValues({}, item), {
5484
5561
  transitionId: (_b = (_a = item.transitionId) != null ? _a : item.TransitionId) != null ? _b : item.id,
5485
5562
  workflowTypeId: (_f = (_e = (_c = item.workflowTypeId) != null ? _c : item.WorkflowTypeId) != null ? _e : (_d = item.workflowType) == null ? void 0 : _d.workflowTypeId) != null ? _f : "",
5486
5563
  workflowId: (_h = (_g = item.workflowId) != null ? _g : item.WorkflowId) != null ? _h : "",
5487
- fromWorkflowStepId: (_l = (_k = (_j = (_i = item.fromWorkflowStepId) != null ? _i : item.FromWorkflowStepId) != null ? _j : item.fromStepId) != null ? _k : item.FromStepId) != null ? _l : "",
5488
- toWorkflowStepId: (_p = (_o = (_n = (_m = item.toWorkflowStepId) != null ? _m : item.ToWorkflowStepId) != null ? _n : item.toStepId) != null ? _o : item.ToStepId) != null ? _p : "",
5489
- actionCode: (_r = (_q = item.actionCode) != null ? _q : item.ActionCode) != null ? _r : "",
5490
- actionName: (_t = (_s = item.actionName) != null ? _s : item.ActionName) != null ? _t : "",
5491
- isActive: (_v = (_u = item.isActive) != null ? _u : item.IsActive) != null ? _v : true
5564
+ workflowName: (_j = (_i = item.workflowName) != null ? _i : item.WorkflowName) != null ? _j : "",
5565
+ fromWorkflowStepId: (_n = (_m = (_l = (_k = item.fromWorkflowStepId) != null ? _k : item.FromWorkflowStepId) != null ? _l : item.fromStepId) != null ? _m : item.FromStepId) != null ? _n : "",
5566
+ fromStepName: (_p = (_o = item.fromStepName) != null ? _o : item.FromStepName) != null ? _p : "",
5567
+ toWorkflowStepId: (_t = (_s = (_r = (_q = item.toWorkflowStepId) != null ? _q : item.ToWorkflowStepId) != null ? _r : item.toStepId) != null ? _s : item.ToStepId) != null ? _t : "",
5568
+ toStepName: (_v = (_u = item.toStepName) != null ? _u : item.ToStepName) != null ? _v : "",
5569
+ actionCode: (_x = (_w = item.actionCode) != null ? _w : item.ActionCode) != null ? _x : "",
5570
+ actionName: (_z = (_y = item.actionName) != null ? _y : item.ActionName) != null ? _z : "",
5571
+ 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,
5572
+ isDefault: (_I = (_H = item.isDefault) != null ? _H : item.IsDefault) != null ? _I : false,
5573
+ requireComment: (_K = (_J = item.requireComment) != null ? _J : item.RequireComment) != null ? _K : false,
5574
+ isActive: (_M = (_L = item.isActive) != null ? _L : item.IsActive) != null ? _M : true
5492
5575
  });
5493
5576
  };
5494
5577
  function WorkFlowTransition() {
@@ -5497,6 +5580,8 @@ function WorkFlowTransition() {
5497
5580
  const [showModal, setShowModal] = useState16(false);
5498
5581
  const [editingTransition, setEditingTransition] = useState16(null);
5499
5582
  const [loadingEditId, setLoadingEditId] = useState16(null);
5583
+ const [updatingStatusId, setUpdatingStatusId] = useState16(null);
5584
+ const [deletingTransitionId, setDeletingTransitionId] = useState16(null);
5500
5585
  const [pageSize, setPageSize] = useState16(10);
5501
5586
  const [currentPage, setCurrentPage] = useState16(1);
5502
5587
  const [search, setSearch] = useState16("");
@@ -5522,11 +5607,16 @@ function WorkFlowTransition() {
5522
5607
  })();
5523
5608
  }, [refreshKey]);
5524
5609
  const saveTransition = async (payload, isEdit) => {
5525
- var _a, _b;
5610
+ var _a, _b, _c;
5526
5611
  try {
5612
+ const requestPayload = __spreadProps(__spreadValues({}, payload), {
5613
+ isReturnToApplicant: Boolean(
5614
+ (_a = payload.isReturnToApplicant) != null ? _a : Number(payload.toWorkflowStepId) === 0
5615
+ )
5616
+ });
5527
5617
  await getApiService()[isEdit ? "put" : "post"](
5528
5618
  getEndpoint(isEdit ? "update" : "create"),
5529
- payload
5619
+ requestPayload
5530
5620
  );
5531
5621
  await Swal9.fire(
5532
5622
  "Success",
@@ -5538,7 +5628,7 @@ function WorkFlowTransition() {
5538
5628
  } catch (error) {
5539
5629
  await Swal9.fire(
5540
5630
  "Error",
5541
- ((_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.`,
5631
+ ((_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.`,
5542
5632
  "error"
5543
5633
  );
5544
5634
  return false;
@@ -5564,13 +5654,90 @@ function WorkFlowTransition() {
5564
5654
  setLoadingEditId(null);
5565
5655
  }
5566
5656
  };
5657
+ const toggleTransitionStatus = async (transition) => {
5658
+ var _a, _b, _c, _d, _e, _f;
5659
+ const isActive = !transition.isActive;
5660
+ const result = await Swal9.fire({
5661
+ title: `${isActive ? "Activate" : "Deactivate"} workflow transition?`,
5662
+ text: `Transition #${transition.transitionId} will be ${isActive ? "available" : "inactive"}.`,
5663
+ icon: "warning",
5664
+ showCancelButton: true,
5665
+ confirmButtonColor: isActive ? "#059669" : "#e11d48",
5666
+ confirmButtonText: isActive ? "Activate" : "Deactivate"
5667
+ });
5668
+ if (!result.isConfirmed) return;
5669
+ try {
5670
+ setUpdatingStatusId(transition.transitionId);
5671
+ await getApiService().put(getEndpoint("update"), {
5672
+ transitionId: transition.transitionId,
5673
+ workflowTypeId: Number(transition.workflowTypeId) || 0,
5674
+ workflowId: Number(transition.workflowId) || 0,
5675
+ fromWorkflowStepId: Number(transition.fromWorkflowStepId) || 0,
5676
+ toWorkflowStepId: Number(transition.toWorkflowStepId) || 0,
5677
+ actionCode: (_a = transition.actionCode) != null ? _a : "",
5678
+ actionName: (_b = transition.actionName) != null ? _b : "",
5679
+ isReturnToApplicant: Boolean(transition.isReturnToApplicant),
5680
+ isDefault: Boolean(transition.isDefault),
5681
+ requireComment: Boolean(transition.requireComment),
5682
+ isActive,
5683
+ updatedBy: (_d = (_c = transition.updatedBy) != null ? _c : transition.createdBy) != null ? _d : "System"
5684
+ });
5685
+ await Swal9.fire(
5686
+ "Success",
5687
+ `Workflow transition ${isActive ? "activated" : "deactivated"}.`,
5688
+ "success"
5689
+ );
5690
+ refresh();
5691
+ } catch (error) {
5692
+ await Swal9.fire(
5693
+ "Error",
5694
+ ((_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.",
5695
+ "error"
5696
+ );
5697
+ } finally {
5698
+ setUpdatingStatusId(null);
5699
+ }
5700
+ };
5701
+ const deleteTransition = async (transition) => {
5702
+ var _a, _b;
5703
+ const confirmation = await Swal9.fire({
5704
+ title: "Delete workflow transition?",
5705
+ text: `Transition ${transition.transitionId} will be permanently deleted.`,
5706
+ icon: "warning",
5707
+ showCancelButton: true,
5708
+ confirmButtonColor: "#dc2626",
5709
+ confirmButtonText: "Delete",
5710
+ cancelButtonText: "Cancel",
5711
+ reverseButtons: true
5712
+ });
5713
+ if (!confirmation.isConfirmed) return;
5714
+ try {
5715
+ setDeletingTransitionId(transition.transitionId);
5716
+ const endpoint2 = getEndpoint("delete");
5717
+ const deleteUrl = typeof endpoint2 === "function" ? endpoint2() : String(endpoint2);
5718
+ await getApiService().delete(deleteUrl, {
5719
+ transitionId: transition.transitionId
5720
+ });
5721
+ await Swal9.fire("Deleted", "Workflow transition deleted successfully.", "success");
5722
+ refresh();
5723
+ } catch (error) {
5724
+ await Swal9.fire(
5725
+ "Error",
5726
+ ((_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.",
5727
+ "error"
5728
+ );
5729
+ } finally {
5730
+ setDeletingTransitionId(null);
5731
+ }
5732
+ };
5567
5733
  const columns = [
5568
5734
  ["Transition ID", "transitionId", "fc:w-[15%]"],
5569
- ["Workflow ID", "workflowId", "fc:w-[15%]"],
5570
- ["From Step ID", "fromWorkflowStepId", "fc:w-[15%]"],
5571
- ["To Step ID", "toWorkflowStepId", "fc:w-[15%]"],
5735
+ ["Workflow Name", "workflowName", "fc:w-[15%]"],
5736
+ ["From Step", "fromStepName", "fc:w-[15%]"],
5737
+ ["To Step", "toStepName", "fc:w-[15%]"],
5572
5738
  ["Action Code", "actionCode", "fc:w-[14%]"],
5573
- ["Action Name", "actionName", "fc:w-[16%]"]
5739
+ ["Action Name", "actionName", "fc:w-[16%]"],
5740
+ ["Status", "isActive", "fc:w-[10%]"]
5574
5741
  ];
5575
5742
  const visibleRows = rows.filter(
5576
5743
  (item) => Object.values(item).join(" ").toLowerCase().includes(search.toLowerCase())
@@ -5689,24 +5856,53 @@ function WorkFlowTransition() {
5689
5856
  className: "fc:transition-colors fc:hover:bg-slate-50/50",
5690
5857
  children: [
5691
5858
  /* @__PURE__ */ jsx21("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.transitionId || "-" }),
5692
- /* @__PURE__ */ jsx21("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.workflowId || "-" }),
5693
- /* @__PURE__ */ jsx21("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.fromWorkflowStepId || "-" }),
5694
- /* @__PURE__ */ jsx21("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.toWorkflowStepId || "-" }),
5859
+ /* @__PURE__ */ jsx21("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.workflowName || "-" }),
5860
+ /* @__PURE__ */ jsx21("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.fromStepName || "-" }),
5861
+ /* @__PURE__ */ jsx21("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.toStepName || "-" }),
5695
5862
  /* @__PURE__ */ jsx21("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 || "-" }),
5696
5863
  /* @__PURE__ */ jsx21("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:text-slate-700 fc:whitespace-nowrap", children: item.actionName || "-" }),
5697
- /* @__PURE__ */ jsx21("td", { className: "fc:py-3.5 fc:px-4 fc:text-center fc:whitespace-nowrap", children: /* @__PURE__ */ jsx21("div", { className: "fc:flex fc:items-center fc:justify-center", children: /* @__PURE__ */ jsx21(
5698
- "button",
5864
+ /* @__PURE__ */ jsx21("td", { className: "fc:py-3.5 fc:px-4 fc:text-sm fc:whitespace-nowrap", children: /* @__PURE__ */ jsx21(
5865
+ "span",
5699
5866
  {
5700
- type: "button",
5701
- onClick: () => editTransition(item),
5702
- disabled: loadingEditId === item.transitionId,
5703
- 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",
5704
- children: loadingEditId === item.transitionId ? /* @__PURE__ */ jsxs20(Fragment4, { children: [
5705
- /* @__PURE__ */ jsx21("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" }),
5706
- /* @__PURE__ */ jsx21("span", { children: "Loading..." })
5707
- ] }) : "Edit"
5867
+ 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"}`,
5868
+ children: item.isActive ? "Active" : "Inactive"
5708
5869
  }
5709
- ) }) })
5870
+ ) }),
5871
+ /* @__PURE__ */ jsx21("td", { className: "fc:py-3.5 fc:px-4 fc:text-center fc:whitespace-nowrap", children: /* @__PURE__ */ jsxs20("div", { className: "fc:flex fc:items-center fc:justify-center fc:gap-2", children: [
5872
+ /* @__PURE__ */ jsx21(
5873
+ "button",
5874
+ {
5875
+ type: "button",
5876
+ onClick: () => editTransition(item),
5877
+ disabled: loadingEditId === item.transitionId || deletingTransitionId === item.transitionId,
5878
+ 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",
5879
+ children: loadingEditId === item.transitionId ? /* @__PURE__ */ jsxs20(Fragment5, { children: [
5880
+ /* @__PURE__ */ jsx21("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" }),
5881
+ /* @__PURE__ */ jsx21("span", { children: "Loading..." })
5882
+ ] }) : "Edit"
5883
+ }
5884
+ ),
5885
+ /* @__PURE__ */ jsx21(
5886
+ "button",
5887
+ {
5888
+ type: "button",
5889
+ onClick: () => toggleTransitionStatus(item),
5890
+ disabled: updatingStatusId === item.transitionId || deletingTransitionId === item.transitionId,
5891
+ 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"}`,
5892
+ children: updatingStatusId === item.transitionId ? "Saving..." : item.isActive ? "Deactivate" : "Activate"
5893
+ }
5894
+ ),
5895
+ /* @__PURE__ */ jsx21(
5896
+ "button",
5897
+ {
5898
+ type: "button",
5899
+ onClick: () => deleteTransition(item),
5900
+ disabled: deletingTransitionId === item.transitionId || updatingStatusId === item.transitionId,
5901
+ 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",
5902
+ children: deletingTransitionId === item.transitionId ? "Deleting..." : "Delete"
5903
+ }
5904
+ )
5905
+ ] }) })
5710
5906
  ]
5711
5907
  },
5712
5908
  item.transitionId
@@ -9233,9 +9429,45 @@ function Table({
9233
9429
  // src/components/task-permission/Popup.js
9234
9430
  import React41, { useState as useState30, useEffect as useEffect24 } from "react";
9235
9431
  import Swal13 from "sweetalert2";
9432
+
9433
+ // src/components/task-permission/permissionLabels.js
9434
+ var permissionLabelFields = [
9435
+ { field: "viewLabel", label: "View Label", fallback: "View" },
9436
+ { field: "editLabel", label: "Edit Label", fallback: "Edit" },
9437
+ { field: "approveLabel", label: "Approve Label", fallback: "Approve" },
9438
+ { field: "rejectLabel", label: "Reject Label", fallback: "Reject" },
9439
+ { field: "forwardLabel", label: "Forward Label", fallback: "Forward" },
9440
+ { field: "freeForwardLabel", label: "Free Forward Label", fallback: "Free Forward" },
9441
+ { field: "returnLabel", label: "Return Label", fallback: "Return" },
9442
+ {
9443
+ field: "returnToApplicantLabel",
9444
+ label: "Return To Applicant Label",
9445
+ fallback: "Return to Applicant"
9446
+ },
9447
+ { field: "delegateLabel", label: "Delegate Label", fallback: "Delegate" },
9448
+ { field: "holdLabel", label: "Hold Label", fallback: "Hold" }
9449
+ ];
9450
+ var getPermissionLabelValues = (source = {}) => Object.fromEntries(
9451
+ permissionLabelFields.map(({ field, fallback }) => {
9452
+ var _a, _b;
9453
+ const pascalField = field.charAt(0).toUpperCase() + field.slice(1);
9454
+ return [field, (_b = (_a = source[field]) != null ? _a : source[pascalField]) != null ? _b : fallback];
9455
+ })
9456
+ );
9457
+ var getPermissionLabelPayload = (source = {}) => Object.fromEntries(
9458
+ permissionLabelFields.map(({ field, fallback }) => {
9459
+ var _a;
9460
+ return [
9461
+ field,
9462
+ String((_a = source[field]) != null ? _a : "").trim() || fallback
9463
+ ];
9464
+ })
9465
+ );
9466
+
9467
+ // src/components/task-permission/Popup.js
9236
9468
  import { jsx as jsx41, jsxs as jsxs40 } from "react/jsx-runtime";
9237
9469
  function Popup({ isOpen, onClose, onSave }) {
9238
- const [formData, setFormData] = useState30({
9470
+ const [formData, setFormData] = useState30(__spreadValues({
9239
9471
  workflowStepId: "",
9240
9472
  canView: false,
9241
9473
  canEdit: false,
@@ -9248,7 +9480,7 @@ function Popup({ isOpen, onClose, onSave }) {
9248
9480
  canDelegate: false,
9249
9481
  canHold: false,
9250
9482
  isActive: true
9251
- });
9483
+ }, getPermissionLabelValues()));
9252
9484
  const [errors, setErrors] = useState30({});
9253
9485
  const [isSubmitting, setIsSubmitting] = useState30(false);
9254
9486
  const [workflowSteps, setWorkflowSteps] = useState30([]);
@@ -9274,7 +9506,7 @@ function Popup({ isOpen, onClose, onSave }) {
9274
9506
  }, [isOpen]);
9275
9507
  useEffect24(() => {
9276
9508
  if (!isOpen) {
9277
- setFormData({
9509
+ setFormData(__spreadValues({
9278
9510
  workflowStepId: "",
9279
9511
  canView: false,
9280
9512
  canEdit: false,
@@ -9287,7 +9519,7 @@ function Popup({ isOpen, onClose, onSave }) {
9287
9519
  canDelegate: false,
9288
9520
  canHold: false,
9289
9521
  isActive: true
9290
- });
9522
+ }, getPermissionLabelValues()));
9291
9523
  setErrors({});
9292
9524
  }
9293
9525
  }, [isOpen]);
@@ -9311,7 +9543,7 @@ function Popup({ isOpen, onClose, onSave }) {
9311
9543
  const flowCore = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore;
9312
9544
  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);
9313
9545
  if (!endpoint2) throw new Error("Step Permission create endpoint is not configured.");
9314
- const payload = {
9546
+ const payload = __spreadProps(__spreadValues({
9315
9547
  workflowStepId: Number(formData.workflowStepId) || 0,
9316
9548
  canView: Boolean(formData.canView),
9317
9549
  canEdit: Boolean(formData.canEdit),
@@ -9323,9 +9555,10 @@ function Popup({ isOpen, onClose, onSave }) {
9323
9555
  canReturnToApplicant: Boolean(formData.canReturnToApplicant),
9324
9556
  canDelegate: Boolean(formData.canDelegate),
9325
9557
  canHold: Boolean(formData.canHold),
9326
- isActive: Boolean(formData.isActive),
9558
+ isActive: Boolean(formData.isActive)
9559
+ }, getPermissionLabelPayload(formData)), {
9327
9560
  createdBy: "System"
9328
- };
9561
+ });
9329
9562
  await getApiService().post(endpoint2, payload);
9330
9563
  onClose();
9331
9564
  await (onSave == null ? void 0 : onSave());
@@ -9426,6 +9659,25 @@ function Popup({ isOpen, onClose, onSave }) {
9426
9659
  )
9427
9660
  ] }, field)) })
9428
9661
  ] }),
9662
+ /* @__PURE__ */ jsxs40("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: [
9663
+ /* @__PURE__ */ jsxs40("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: [
9664
+ /* @__PURE__ */ jsx41("span", { children: "\u{1F3F7}\uFE0F" }),
9665
+ /* @__PURE__ */ jsx41("span", { children: "Action Labels" })
9666
+ ] }),
9667
+ /* @__PURE__ */ jsx41("div", { className: "fc:grid fc:grid-cols-2 fc:gap-4", children: permissionLabelFields.map(({ field, label, fallback }) => /* @__PURE__ */ jsxs40("div", { children: [
9668
+ /* @__PURE__ */ jsx41("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: label }),
9669
+ /* @__PURE__ */ jsx41(
9670
+ "input",
9671
+ {
9672
+ type: "text",
9673
+ value: formData[field],
9674
+ onChange: (event) => handleChange(field, event.target.value),
9675
+ placeholder: fallback,
9676
+ 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"
9677
+ }
9678
+ )
9679
+ ] }, field)) })
9680
+ ] }),
9429
9681
  /* @__PURE__ */ jsxs40("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: [
9430
9682
  /* @__PURE__ */ jsxs40("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: [
9431
9683
  /* @__PURE__ */ jsx41("span", { children: "\u{1F518}" }),
@@ -9487,7 +9739,7 @@ import React42, { useState as useState31, useEffect as useEffect25 } from "react
9487
9739
  import { jsx as jsx42, jsxs as jsxs41 } from "react/jsx-runtime";
9488
9740
  function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpdate }) {
9489
9741
  var _a, _b, _c, _d, _e;
9490
- const [formData, setFormData] = useState31({
9742
+ const [formData, setFormData] = useState31(__spreadValues({
9491
9743
  workflowStepId: "",
9492
9744
  canView: false,
9493
9745
  canEdit: false,
@@ -9500,8 +9752,9 @@ function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpda
9500
9752
  canDelegate: false,
9501
9753
  canHold: false,
9502
9754
  isActive: true,
9755
+ createdBy: "System",
9503
9756
  updatedBy: "System"
9504
- });
9757
+ }, getPermissionLabelValues()));
9505
9758
  const [errors, setErrors] = useState31({});
9506
9759
  const [isSubmitting, setIsSubmitting] = useState31(false);
9507
9760
  const [workflowSteps, setWorkflowSteps] = useState31([]);
@@ -9526,9 +9779,9 @@ function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpda
9526
9779
  })();
9527
9780
  }, [isOpen]);
9528
9781
  useEffect25(() => {
9529
- 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;
9782
+ 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;
9530
9783
  if (selectedData) {
9531
- setFormData({
9784
+ setFormData(__spreadValues({
9532
9785
  workflowStepId: (_b2 = (_a2 = selectedData.workflowStepId) != null ? _a2 : selectedData.WorkflowStepId) != null ? _b2 : "",
9533
9786
  canView: (_d2 = (_c2 = selectedData.canView) != null ? _c2 : selectedData.CanView) != null ? _d2 : false,
9534
9787
  canEdit: (_f = (_e2 = selectedData.canEdit) != null ? _e2 : selectedData.CanEdit) != null ? _f : false,
@@ -9541,8 +9794,9 @@ function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpda
9541
9794
  canDelegate: (_t = (_s = selectedData.canDelegate) != null ? _s : selectedData.CanDelegate) != null ? _t : false,
9542
9795
  canHold: (_v = (_u = selectedData.canHold) != null ? _u : selectedData.CanHold) != null ? _v : false,
9543
9796
  isActive: (_x = (_w = selectedData.isActive) != null ? _w : selectedData.IsActive) != null ? _x : true,
9544
- updatedBy: (_z = (_y = selectedData.updatedBy) != null ? _y : selectedData.UpdatedBy) != null ? _z : "System"
9545
- });
9797
+ createdBy: (_z = (_y = selectedData.createdBy) != null ? _y : selectedData.CreatedBy) != null ? _z : "System",
9798
+ updatedBy: (_B = (_A = selectedData.updatedBy) != null ? _A : selectedData.UpdatedBy) != null ? _B : "System"
9799
+ }, getPermissionLabelValues(selectedData)));
9546
9800
  setErrors({});
9547
9801
  }
9548
9802
  }, [selectedData]);
@@ -9565,7 +9819,7 @@ function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpda
9565
9819
  const permissionId = Number(
9566
9820
  (_b2 = (_a2 = selectedData == null ? void 0 : selectedData.stepPermissionId) != null ? _a2 : selectedData == null ? void 0 : selectedData.id) != null ? _b2 : 0
9567
9821
  );
9568
- const payload = __spreadProps(__spreadValues({}, formData), {
9822
+ const payload = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, formData), {
9569
9823
  stepPermissionId: permissionId,
9570
9824
  workflowStepId: Number(formData.workflowStepId) || 0,
9571
9825
  canView: Boolean(formData.canView),
@@ -9579,6 +9833,8 @@ function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpda
9579
9833
  canDelegate: Boolean(formData.canDelegate),
9580
9834
  canHold: Boolean(formData.canHold),
9581
9835
  isActive: Boolean(formData.isActive),
9836
+ createdBy: String(formData.createdBy).trim() || "System"
9837
+ }), getPermissionLabelPayload(formData)), {
9582
9838
  updatedBy: String(formData.updatedBy).trim() || "System"
9583
9839
  });
9584
9840
  await onUpdate(payload);
@@ -9683,6 +9939,25 @@ function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpda
9683
9939
  )
9684
9940
  ] }, field)) })
9685
9941
  ] }),
9942
+ /* @__PURE__ */ jsxs41("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: [
9943
+ /* @__PURE__ */ jsxs41("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: [
9944
+ /* @__PURE__ */ jsx42("span", { children: "\u{1F3F7}\uFE0F" }),
9945
+ /* @__PURE__ */ jsx42("span", { children: "Action Labels" })
9946
+ ] }),
9947
+ /* @__PURE__ */ jsx42("div", { className: "fc:grid fc:grid-cols-2 fc:gap-4", children: permissionLabelFields.map(({ field, label, fallback }) => /* @__PURE__ */ jsxs41("div", { children: [
9948
+ /* @__PURE__ */ jsx42("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: label }),
9949
+ /* @__PURE__ */ jsx42(
9950
+ "input",
9951
+ {
9952
+ type: "text",
9953
+ value: formData[field],
9954
+ onChange: (event) => handleChange(field, event.target.value),
9955
+ placeholder: fallback,
9956
+ 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"
9957
+ }
9958
+ )
9959
+ ] }, field)) })
9960
+ ] }),
9686
9961
  /* @__PURE__ */ jsxs41("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: [
9687
9962
  /* @__PURE__ */ jsxs41("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: [
9688
9963
  /* @__PURE__ */ jsx42("span", { children: "\u{1F518}" }),
@@ -9791,7 +10066,7 @@ function TaskPermissionMain() {
9791
10066
  const permissionId = Number(
9792
10067
  (_c = (_b = item.stepPermissionId) != null ? _b : item.id) != null ? _c : 0
9793
10068
  );
9794
- await getApiService().put(endpoint2, {
10069
+ await getApiService().put(endpoint2, __spreadProps(__spreadValues({
9795
10070
  stepPermissionId: permissionId,
9796
10071
  workflowStepId: Number(item.workflowStepId) || 0,
9797
10072
  canView: Boolean(item.canView),
@@ -9805,8 +10080,10 @@ function TaskPermissionMain() {
9805
10080
  canDelegate: Boolean(item.canDelegate),
9806
10081
  canHold: Boolean(item.canHold),
9807
10082
  isActive: Boolean(item.isActive),
10083
+ createdBy: item.createdBy || item.CreatedBy || "System"
10084
+ }, getPermissionLabelPayload(item)), {
9808
10085
  updatedBy: item.updatedBy || "System"
9809
- });
10086
+ }));
9810
10087
  handleRefresh();
9811
10088
  return true;
9812
10089
  } catch (error) {
@@ -18863,7 +19140,7 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file, isSubmitting
18863
19140
  /* @__PURE__ */ jsx94("div", { className: "fc:w-10 fc:h-10 fc:bg-blue-50 fc:text-blue-600 fc:rounded-xl fc:flex fc:items-center fc:justify-center fc:shadow-inner", children: /* @__PURE__ */ jsx94(RiInboxArchiveLine, { size: 20 }) }),
18864
19141
  /* @__PURE__ */ jsxs93("div", { children: [
18865
19142
  /* @__PURE__ */ jsx94("h3", { className: "fc:text-base fc:font-bold fc:text-slate-800", children: "Claim Workflow Files" }),
18866
- /* @__PURE__ */ jsx94("p", { className: "fc:text-xs fc:text-slate-500", children: "Claim unclaimed files for the selected step" })
19143
+ /* @__PURE__ */ jsx94("p", { className: "fc:text-xs fc:text-slate-500", children: "Claim this unclaimed file for the selected step" })
18867
19144
  ] })
18868
19145
  ] }),
18869
19146
  /* @__PURE__ */ jsx94(
@@ -18881,9 +19158,7 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file, isSubmitting
18881
19158
  /* @__PURE__ */ jsxs93("div", { className: "fc:flex fc:items-start fc:gap-3 fc:p-3.5 fc:bg-blue-50/70 fc:border fc:border-blue-100 fc:rounded-2xl", children: [
18882
19159
  /* @__PURE__ */ jsx94(RiAlertLine, { size: 20, className: "fc:text-blue-600 fc:shrink-0 fc:mt-0.5" }),
18883
19160
  /* @__PURE__ */ jsxs93("div", { className: "fc:text-xs fc:text-blue-900 fc:leading-relaxed", children: [
18884
- "Confirming will claim ",
18885
- /* @__PURE__ */ jsx94("strong", { className: "fc:font-bold", children: "all unclaimed files" }),
18886
- " for this workflow step and assign them to your ",
19161
+ "Confirming will assign this file to your ",
18887
19162
  /* @__PURE__ */ jsx94("strong", { className: "fc:font-bold", children: "My Files" }),
18888
19163
  " queue."
18889
19164
  ] })
@@ -18937,7 +19212,7 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file, isSubmitting
18937
19212
  className: "fc:px-5 fc:py-2 fc:bg-blue-600 hover:fc:bg-blue-700 fc:text-white fc:text-xs fc:font-bold fc:rounded-xl fc:shadow-md fc:shadow-blue-500/20 fc:transition-all fc:flex fc:items-center fc:gap-1.5 disabled:fc:cursor-not-allowed disabled:fc:opacity-60",
18938
19213
  children: [
18939
19214
  /* @__PURE__ */ jsx94(RiCheckLine, { size: 16 }),
18940
- isSubmitting ? "Claiming..." : "Yes, Claim Files"
19215
+ isSubmitting ? "Claiming..." : "Yes, Claim File"
18941
19216
  ]
18942
19217
  }
18943
19218
  )
@@ -19310,7 +19585,7 @@ var formatInboxDate = (value) => {
19310
19585
  });
19311
19586
  };
19312
19587
  var normalizePoolFile = (file) => {
19313
- 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;
19588
+ 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;
19314
19589
  const taskInstanceId = (_a = file.taskInstanceId) != null ? _a : file.TaskInstanceId;
19315
19590
  const filePoolId = (_b = file.filePoolId) != null ? _b : file.FilePoolId;
19316
19591
  const businessEntity = (_c = file.businessEntityType) != null ? _c : file.BusinessEntityType;
@@ -19330,14 +19605,14 @@ var normalizePoolFile = (file) => {
19330
19605
  priority: (_t = file.priority) != null ? _t : "Medium",
19331
19606
  receivedDate: formatInboxDate((_v = (_u = file.addedOn) != null ? _u : file.createdAt) != null ? _v : file.receivedDate),
19332
19607
  dueDate: formatInboxDate(file.dueDate),
19333
- slaStatus: (_w = file.slaStatus) != null ? _w : "-",
19334
- status: "Available",
19608
+ slaStatus: (_x = (_w = file.slaStatus) != null ? _w : file.SlaStatus) != null ? _x : "-",
19609
+ status: (_B = (_A = (_z = (_y = file.statusName) != null ? _y : file.StatusName) != null ? _z : file.fileStatus) != null ? _A : file.FileStatus) != null ? _B : "Available",
19335
19610
  assignedTo: "-",
19336
- currentStep: (_x = file.stepName) != null ? _x : "-"
19611
+ currentStep: (_C = file.stepName) != null ? _C : "-"
19337
19612
  });
19338
19613
  };
19339
19614
  var normalizeMyFile = (file) => {
19340
- 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;
19615
+ 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;
19341
19616
  const taskInstanceId = (_a = file.taskInstanceId) != null ? _a : file.TaskInstanceId;
19342
19617
  const businessEntityId = (_b = file.businessEntityId) != null ? _b : file.BusinessEntityId;
19343
19618
  const businessEntity = (_c = file.businessEntityType) != null ? _c : file.BusinessEntityType;
@@ -19355,11 +19630,12 @@ var normalizeMyFile = (file) => {
19355
19630
  sender: (_s = (_r = file.sender) != null ? _r : businessEntity) != null ? _s : "-",
19356
19631
  priority: (_t = file.priority) != null ? _t : "Medium",
19357
19632
  receivedDate: formatInboxDate((_u = file.createdAt) != null ? _u : file.receivedDate),
19358
- dueDate: formatInboxDate(file.dueDate),
19359
- slaStatus: (_v = file.slaStatus) != null ? _v : "-",
19360
- status: (_x = (_w = file.fileStatus) != null ? _w : file.statusName) != null ? _x : "In Progress",
19361
- 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 : "-",
19362
- currentStep: (_E = file.stepName) != null ? _E : "-"
19633
+ dueDate: formatInboxDate((_v = file.dueDate) != null ? _v : file.DueDate),
19634
+ slaStatus: (_x = (_w = file.slaStatus) != null ? _w : file.SlaStatus) != null ? _x : "-",
19635
+ status: (_B = (_A = (_z = (_y = file.fileStatus) != null ? _y : file.FileStatus) != null ? _z : file.statusName) != null ? _A : file.StatusName) != null ? _B : "In Progress",
19636
+ fileAt: (_D = (_C = file.fileAt) != null ? _C : file.FileAt) != null ? _D : "-",
19637
+ 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 : "-",
19638
+ currentStep: (_K = file.stepName) != null ? _K : "-"
19363
19639
  });
19364
19640
  };
19365
19641
  function InboxMain() {
@@ -19376,6 +19652,7 @@ function InboxMain() {
19376
19652
  const [myFiles, setMyFiles] = useState71([]);
19377
19653
  const [totalFiles, setTotalFiles] = useState71([]);
19378
19654
  const [refreshKey, setRefreshKey] = useState71(0);
19655
+ const [isUnclaiming, setIsUnclaiming] = useState71(false);
19379
19656
  useEffect51(() => {
19380
19657
  let isCurrent = true;
19381
19658
  const loadAssignedSteps = async () => {
@@ -19637,7 +19914,7 @@ function InboxMain() {
19637
19914
  if (searchQuery.trim()) {
19638
19915
  const q = searchQuery.toLowerCase().trim();
19639
19916
  result = result.filter(
19640
- (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)
19917
+ (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)
19641
19918
  );
19642
19919
  }
19643
19920
  if (priorityFilter !== "all") {
@@ -19685,11 +19962,16 @@ function InboxMain() {
19685
19962
  setPoolModalOpen(true);
19686
19963
  };
19687
19964
  const handleConfirmPool = async () => {
19688
- var _a, _b;
19965
+ var _a, _b, _c;
19689
19966
  if (!activeWorkflowStepId) {
19690
19967
  await Swal29.fire("Error", "Select an assigned workflow step before claiming files.", "error");
19691
19968
  return;
19692
19969
  }
19970
+ const filePoolId = Number((_a = selectedPoolFile == null ? void 0 : selectedPoolFile.filePoolId) != null ? _a : selectedPoolFile == null ? void 0 : selectedPoolFile.FilePoolId);
19971
+ if (!Number.isInteger(filePoolId) || filePoolId <= 0) {
19972
+ await Swal29.fire("Error", "The selected file pool entry has no valid FilePoolId.", "error");
19973
+ return;
19974
+ }
19693
19975
  setIsClaimingPool(true);
19694
19976
  try {
19695
19977
  const claimEndpoint = getInboxEndpoint(
@@ -19700,7 +19982,8 @@ function InboxMain() {
19700
19982
  throw new Error("Claim endpoint is not configured (flowCore.inbox.claimUnclaimedFilesByWorkflowStepId).");
19701
19983
  }
19702
19984
  await getApiService().post(claimEndpoint, {
19703
- workflowStepId: Number(activeWorkflowStepId)
19985
+ workflowStepId: Number(activeWorkflowStepId),
19986
+ filePoolId
19704
19987
  });
19705
19988
  setPoolModalOpen(false);
19706
19989
  setSelectedPoolFile(null);
@@ -19709,7 +19992,7 @@ function InboxMain() {
19709
19992
  await Swal29.fire({
19710
19993
  icon: "success",
19711
19994
  title: "Files Claimed",
19712
- text: "Unclaimed files for this workflow step have been assigned to your My Files queue.",
19995
+ text: "The selected file has been assigned to your My Files queue.",
19713
19996
  confirmButtonColor: "#2563eb",
19714
19997
  timer: 3e3,
19715
19998
  timerProgressBar: true
@@ -19717,13 +20000,44 @@ function InboxMain() {
19717
20000
  } catch (error) {
19718
20001
  await Swal29.fire(
19719
20002
  "Error",
19720
- ((_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 claim files.",
20003
+ ((_c = (_b = error == null ? void 0 : error.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || (error == null ? void 0 : error.message) || "Unable to claim files.",
19721
20004
  "error"
19722
20005
  );
19723
20006
  } finally {
19724
20007
  setIsClaimingPool(false);
19725
20008
  }
19726
20009
  };
20010
+ const handleUnclaim = async (file) => {
20011
+ var _a, _b, _c;
20012
+ const filePoolId = Number((_a = file.taskInstanceId) != null ? _a : file.TaskInstanceId);
20013
+ if (!Number.isInteger(filePoolId) || filePoolId <= 0) {
20014
+ await Swal29.fire("Error", "This file has no valid task instance ID to unclaim.", "error");
20015
+ return;
20016
+ }
20017
+ setIsUnclaiming(true);
20018
+ try {
20019
+ const endpoint2 = getInboxEndpoint(["inbox", "Inbox", "filePool", "FilePool"], "UnClaimClaimedFile");
20020
+ if (!endpoint2) throw new Error("Unclaim endpoint is not configured (flowCore.inbox.UnClaimClaimedFile).");
20021
+ await getApiService().post(endpoint2, { filePoolId });
20022
+ setRefreshKey((previous) => previous + 1);
20023
+ await Swal29.fire({
20024
+ icon: "success",
20025
+ title: "File Unclaimed",
20026
+ text: "The file has been released back to the file pool.",
20027
+ confirmButtonColor: "#2563eb",
20028
+ timer: 3e3,
20029
+ timerProgressBar: true
20030
+ });
20031
+ } catch (error) {
20032
+ await Swal29.fire(
20033
+ "Error",
20034
+ ((_c = (_b = error == null ? void 0 : error.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || (error == null ? void 0 : error.message) || "Unable to unclaim the file.",
20035
+ "error"
20036
+ );
20037
+ } finally {
20038
+ setIsUnclaiming(false);
20039
+ }
20040
+ };
19727
20041
  const handleOpenTakeAction = (file) => {
19728
20042
  setSelectedActionFile(file);
19729
20043
  setActionModalOpen(true);
@@ -19794,6 +20108,7 @@ function InboxMain() {
19794
20108
  "Priority",
19795
20109
  "Received Date",
19796
20110
  "Due Date",
20111
+ ...activeTab === "totalFiles" ? ["File At"] : [],
19797
20112
  "SLA Status",
19798
20113
  "Status"
19799
20114
  ];
@@ -19806,6 +20121,7 @@ function InboxMain() {
19806
20121
  `"${f.priority}"`,
19807
20122
  `"${f.receivedDate}"`,
19808
20123
  `"${f.dueDate}"`,
20124
+ ...activeTab === "totalFiles" ? [`"${f.fileAt}"`] : [],
19809
20125
  `"${f.slaStatus}"`,
19810
20126
  `"${f.status}"`
19811
20127
  ]);
@@ -20136,387 +20452,426 @@ function InboxMain() {
20136
20452
  ] })
20137
20453
  ] }),
20138
20454
  /* @__PURE__ */ jsxs96("div", { ref: tableRef, className: "fc:flex-1 fc:overflow-hidden fc:flex fc:flex-col fc:pt-3", children: [
20139
- /* @__PURE__ */ jsx97("div", { className: "fc:border fc:border-slate-200 fc:rounded-2xl fc:overflow-auto fc:flex-1 fc:relative", children: /* @__PURE__ */ jsxs96("table", { className: "fc:w-max fc:min-w-full fc:border-collapse fc:text-left", children: [
20140
- /* @__PURE__ */ jsx97("thead", { className: "fc:sticky fc:top-0 fc:z-20 fc:bg-slate-50 fc:border-b fc:border-slate-200", children: /* @__PURE__ */ jsxs96("tr", { children: [
20141
- /* @__PURE__ */ jsx97(
20142
- "th",
20143
- {
20144
- style: { width: "48px", minWidth: "48px", maxWidth: "48px" },
20145
- 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",
20146
- children: "#"
20147
- }
20148
- ),
20149
- /* @__PURE__ */ jsx97(
20150
- "th",
20151
- {
20152
- onClick: () => handleSort("fileNumber"),
20153
- style: { width: "144px", minWidth: "144px", maxWidth: "144px" },
20154
- 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",
20155
- children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center", children: [
20156
- "File No ",
20157
- renderSortIndicator("fileNumber")
20158
- ] })
20159
- }
20160
- ),
20161
- visibleDynamicColumns.map((col) => /* @__PURE__ */ jsx97(
20162
- "th",
20163
- {
20164
- onClick: () => handleSort(col.key),
20165
- style: {
20166
- width: col.width || "180px",
20167
- minWidth: col.width || "180px",
20168
- maxWidth: col.width || "180px"
20455
+ /* @__PURE__ */ jsxs96("div", { className: "fc:border fc:border-slate-200 fc:rounded-2xl fc:overflow-auto fc:flex-1 fc:relative", children: [
20456
+ /* @__PURE__ */ jsx97("style", { children: `
20457
+ .fc-inbox-table tbody td { border-bottom: 1px solid #e2e8f0; }
20458
+ .fc-inbox-table tbody tr:hover td { background-color: #f8fafc; }
20459
+ ` }),
20460
+ /* @__PURE__ */ jsxs96("table", { className: "fc-inbox-table fc:w-max fc:min-w-full fc:border-collapse fc:text-left", children: [
20461
+ /* @__PURE__ */ jsx97("thead", { className: "fc:sticky fc:top-0 fc:z-20 fc:bg-slate-50 fc:border-b fc:border-slate-200", children: /* @__PURE__ */ jsxs96("tr", { children: [
20462
+ /* @__PURE__ */ jsx97(
20463
+ "th",
20464
+ {
20465
+ style: { width: "48px", minWidth: "48px", maxWidth: "48px" },
20466
+ 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",
20467
+ children: "#"
20468
+ }
20469
+ ),
20470
+ /* @__PURE__ */ jsx97(
20471
+ "th",
20472
+ {
20473
+ onClick: () => handleSort("fileNumber"),
20474
+ style: { width: "144px", minWidth: "144px", maxWidth: "144px" },
20475
+ 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",
20476
+ children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center", children: [
20477
+ "File No ",
20478
+ renderSortIndicator("fileNumber")
20479
+ ] })
20480
+ }
20481
+ ),
20482
+ visibleDynamicColumns.map((col) => /* @__PURE__ */ jsx97(
20483
+ "th",
20484
+ {
20485
+ onClick: () => handleSort(col.key),
20486
+ style: {
20487
+ width: col.width || "180px",
20488
+ minWidth: col.width || "180px",
20489
+ maxWidth: col.width || "180px"
20490
+ },
20491
+ 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",
20492
+ children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center fc:gap-1.5 fc:overflow-hidden", children: [
20493
+ /* @__PURE__ */ jsx97("span", { className: "fc:truncate", children: col.label }),
20494
+ /* @__PURE__ */ jsx97("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" }),
20495
+ renderSortIndicator(col.key)
20496
+ ] })
20169
20497
  },
20170
- 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",
20171
- children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center fc:gap-1.5 fc:overflow-hidden", children: [
20172
- /* @__PURE__ */ jsx97("span", { className: "fc:truncate", children: col.label }),
20173
- /* @__PURE__ */ jsx97("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" }),
20174
- renderSortIndicator(col.key)
20175
- ] })
20176
- },
20177
- col.key
20178
- )),
20179
- /* @__PURE__ */ jsx97(
20180
- "th",
20181
- {
20182
- onClick: () => handleSort("subject"),
20183
- style: { width: "300px", minWidth: "300px", maxWidth: "300px" },
20184
- 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",
20185
- children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center", children: [
20186
- "Subject / Title ",
20187
- renderSortIndicator("subject")
20188
- ] })
20189
- }
20190
- ),
20191
- /* @__PURE__ */ jsx97(
20192
- "th",
20193
- {
20194
- onClick: () => handleSort("workflowName"),
20195
- style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20196
- 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",
20197
- children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center", children: [
20198
- "Workflow ",
20199
- renderSortIndicator("workflowName")
20200
- ] })
20201
- }
20202
- ),
20203
- /* @__PURE__ */ jsx97(
20204
- "th",
20205
- {
20206
- onClick: () => handleSort("sender"),
20207
- style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20208
- 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",
20209
- children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center", children: [
20210
- "Sender / Initiator ",
20211
- renderSortIndicator("sender")
20212
- ] })
20213
- }
20214
- ),
20215
- /* @__PURE__ */ jsx97(
20216
- "th",
20217
- {
20218
- onClick: () => handleSort("priority"),
20219
- style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
20220
- 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",
20221
- children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center fc:justify-center", children: [
20222
- "Priority ",
20223
- renderSortIndicator("priority")
20224
- ] })
20225
- }
20226
- ),
20227
- /* @__PURE__ */ jsx97(
20228
- "th",
20229
- {
20230
- onClick: () => handleSort("receivedDate"),
20231
- style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
20232
- 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",
20233
- children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center", children: [
20234
- "Received On ",
20235
- renderSortIndicator("receivedDate")
20236
- ] })
20237
- }
20238
- ),
20239
- /* @__PURE__ */ jsx97(
20240
- "th",
20241
- {
20242
- onClick: () => handleSort("dueDate"),
20243
- style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
20244
- 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",
20245
- children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center", children: [
20246
- "SLA / Due ",
20247
- renderSortIndicator("dueDate")
20248
- ] })
20249
- }
20250
- ),
20251
- /* @__PURE__ */ jsx97(
20252
- "th",
20498
+ col.key
20499
+ )),
20500
+ /* @__PURE__ */ jsx97(
20501
+ "th",
20502
+ {
20503
+ onClick: () => handleSort("subject"),
20504
+ style: { width: "300px", minWidth: "300px", maxWidth: "300px" },
20505
+ 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",
20506
+ children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center", children: [
20507
+ "Subject / Title ",
20508
+ renderSortIndicator("subject")
20509
+ ] })
20510
+ }
20511
+ ),
20512
+ /* @__PURE__ */ jsx97(
20513
+ "th",
20514
+ {
20515
+ onClick: () => handleSort("workflowName"),
20516
+ style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20517
+ 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",
20518
+ children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center", children: [
20519
+ "Workflow ",
20520
+ renderSortIndicator("workflowName")
20521
+ ] })
20522
+ }
20523
+ ),
20524
+ /* @__PURE__ */ jsx97(
20525
+ "th",
20526
+ {
20527
+ onClick: () => handleSort("sender"),
20528
+ style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20529
+ 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",
20530
+ children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center", children: [
20531
+ "Sender / Initiator ",
20532
+ renderSortIndicator("sender")
20533
+ ] })
20534
+ }
20535
+ ),
20536
+ /* @__PURE__ */ jsx97(
20537
+ "th",
20538
+ {
20539
+ onClick: () => handleSort("priority"),
20540
+ style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
20541
+ 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",
20542
+ children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center fc:justify-center", children: [
20543
+ "Priority ",
20544
+ renderSortIndicator("priority")
20545
+ ] })
20546
+ }
20547
+ ),
20548
+ /* @__PURE__ */ jsx97(
20549
+ "th",
20550
+ {
20551
+ onClick: () => handleSort("receivedDate"),
20552
+ style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
20553
+ 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",
20554
+ children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center", children: [
20555
+ "Received On ",
20556
+ renderSortIndicator("receivedDate")
20557
+ ] })
20558
+ }
20559
+ ),
20560
+ /* @__PURE__ */ jsx97(
20561
+ "th",
20562
+ {
20563
+ onClick: () => handleSort("dueDate"),
20564
+ style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
20565
+ 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",
20566
+ children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center", children: [
20567
+ "SLA / Due ",
20568
+ renderSortIndicator("dueDate")
20569
+ ] })
20570
+ }
20571
+ ),
20572
+ activeTab === "totalFiles" && /* @__PURE__ */ jsx97(
20573
+ "th",
20574
+ {
20575
+ onClick: () => handleSort("fileAt"),
20576
+ style: { width: "160px", minWidth: "160px", maxWidth: "160px" },
20577
+ 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",
20578
+ children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center", children: [
20579
+ "File At ",
20580
+ renderSortIndicator("fileAt")
20581
+ ] })
20582
+ }
20583
+ ),
20584
+ /* @__PURE__ */ jsx97(
20585
+ "th",
20586
+ {
20587
+ onClick: () => handleSort("status"),
20588
+ style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20589
+ 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",
20590
+ children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center fc:justify-center", children: [
20591
+ "Status ",
20592
+ renderSortIndicator("status")
20593
+ ] })
20594
+ }
20595
+ ),
20596
+ /* @__PURE__ */ jsx97(
20597
+ "th",
20598
+ {
20599
+ style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
20600
+ 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)]",
20601
+ children: "Action"
20602
+ }
20603
+ )
20604
+ ] }) }),
20605
+ /* @__PURE__ */ jsx97("tbody", { className: "fc:divide-y fc:divide-slate-100 fc:bg-white", children: paginatedData.length === 0 ? /* @__PURE__ */ jsx97("tr", { children: /* @__PURE__ */ jsx97(
20606
+ "td",
20253
20607
  {
20254
- onClick: () => handleSort("status"),
20255
- style: { width: "120px", minWidth: "120px", maxWidth: "120px" },
20256
- 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",
20257
- children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center fc:justify-center", children: [
20258
- "Status ",
20259
- renderSortIndicator("status")
20608
+ colSpan: 10 + visibleDynamicColumns.length + (activeTab === "totalFiles" ? 1 : 0),
20609
+ className: "fc:py-12 fc:text-center",
20610
+ children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:flex-col fc:items-center fc:justify-center fc:gap-2 fc:text-slate-400", children: [
20611
+ /* @__PURE__ */ jsx97(RiInboxLine, { size: 36, className: "fc:text-slate-300" }),
20612
+ /* @__PURE__ */ jsx97("p", { className: "fc:text-sm fc:font-bold fc:text-slate-600", children: "No Files Found" }),
20613
+ /* @__PURE__ */ jsx97("p", { className: "fc:text-xs", children: searchQuery ? `No records matching "${searchQuery}" in ${activeTab}` : `There are currently no files in ${activeTab}` })
20260
20614
  ] })
20261
20615
  }
20262
- ),
20263
- /* @__PURE__ */ jsx97(
20264
- "th",
20265
- {
20266
- style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
20267
- 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)]",
20268
- children: "Action"
20269
- }
20270
- )
20271
- ] }) }),
20272
- /* @__PURE__ */ jsx97("tbody", { className: "fc:divide-y fc:divide-slate-100 fc:bg-white", children: paginatedData.length === 0 ? /* @__PURE__ */ jsx97("tr", { children: /* @__PURE__ */ jsx97(
20273
- "td",
20274
- {
20275
- colSpan: 10 + visibleDynamicColumns.length,
20276
- className: "fc:py-12 fc:text-center",
20277
- children: /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:flex-col fc:items-center fc:justify-center fc:gap-2 fc:text-slate-400", children: [
20278
- /* @__PURE__ */ jsx97(RiInboxLine, { size: 36, className: "fc:text-slate-300" }),
20279
- /* @__PURE__ */ jsx97("p", { className: "fc:text-sm fc:font-bold fc:text-slate-600", children: "No Files Found" }),
20280
- /* @__PURE__ */ jsx97("p", { className: "fc:text-xs", children: searchQuery ? `No records matching "${searchQuery}" in ${activeTab}` : `There are currently no files in ${activeTab}` })
20281
- ] })
20282
- }
20283
- ) }) : paginatedData.map((row, index) => {
20284
- const rowIndex = startIndex + index + 1;
20285
- return /* @__PURE__ */ jsxs96(
20286
- "tr",
20287
- {
20288
- className: "fc:group hover:fc:bg-slate-50/80 fc:transition-colors",
20289
- children: [
20290
- /* @__PURE__ */ jsx97(
20291
- "td",
20292
- {
20293
- style: { width: "48px", minWidth: "48px", maxWidth: "48px" },
20294
- 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",
20295
- children: rowIndex
20296
- }
20297
- ),
20298
- /* @__PURE__ */ jsx97(
20299
- "td",
20300
- {
20301
- style: { width: "144px", minWidth: "144px", maxWidth: "144px" },
20302
- 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)]",
20303
- children: /* @__PURE__ */ jsxs96(
20304
- "div",
20305
- {
20306
- onMouseEnter: hasHiddenDynamicColumns ? (e) => handleFileMouseEnter(row, e) : void 0,
20307
- onMouseLeave: hasHiddenDynamicColumns ? handleFileMouseLeave : void 0,
20308
- 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"}`,
20309
- children: [
20310
- /* @__PURE__ */ jsx97("span", { className: "fc:text-xs fc:font-extrabold", children: row.fileNumber }),
20311
- hasHiddenDynamicColumns && /* @__PURE__ */ jsxs96("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: [
20312
- /* @__PURE__ */ jsx97(RiEyeOffLine, { size: 10 }),
20313
- /* @__PURE__ */ jsx97("span", { children: hiddenDynamicColumns.length })
20314
- ] })
20315
- ]
20316
- }
20317
- )
20318
- }
20319
- ),
20320
- visibleDynamicColumns.map((col) => {
20321
- const colWidthNum = parseInt(col.width || "180", 10);
20322
- const contentWidth = `${Math.max(colWidthNum - 32, 80)}px`;
20323
- return /* @__PURE__ */ jsx97(
20616
+ ) }) : paginatedData.map((row, index) => {
20617
+ const rowIndex = startIndex + index + 1;
20618
+ return /* @__PURE__ */ jsxs96(
20619
+ "tr",
20620
+ {
20621
+ className: "fc:group hover:fc:bg-slate-50/80 fc:transition-colors",
20622
+ children: [
20623
+ /* @__PURE__ */ jsx97(
20324
20624
  "td",
20325
20625
  {
20326
- style: {
20327
- width: col.width || "180px",
20328
- minWidth: col.width || "180px",
20329
- maxWidth: col.width || "180px"
20330
- },
20331
- 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",
20332
- children: /* @__PURE__ */ jsx97(
20626
+ style: { width: "48px", minWidth: "48px", maxWidth: "48px" },
20627
+ 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",
20628
+ children: rowIndex
20629
+ }
20630
+ ),
20631
+ /* @__PURE__ */ jsx97(
20632
+ "td",
20633
+ {
20634
+ style: { width: "144px", minWidth: "144px", maxWidth: "144px" },
20635
+ 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)]",
20636
+ children: /* @__PURE__ */ jsxs96(
20333
20637
  "div",
20334
20638
  {
20335
- style: {
20336
- width: contentWidth,
20337
- wordBreak: "break-word",
20338
- overflowWrap: "anywhere"
20339
- },
20340
- className: "fc:whitespace-normal",
20341
- children: /* @__PURE__ */ jsx97("span", { className: "fc:text-xs fc:font-medium fc:text-slate-800 fc:leading-relaxed", children: row[col.key] || "-" })
20639
+ onMouseEnter: hasHiddenDynamicColumns ? (e) => handleFileMouseEnter(row, e) : void 0,
20640
+ onMouseLeave: hasHiddenDynamicColumns ? handleFileMouseLeave : void 0,
20641
+ 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"}`,
20642
+ children: [
20643
+ /* @__PURE__ */ jsx97("span", { className: "fc:text-xs fc:font-extrabold", children: row.fileNumber }),
20644
+ hasHiddenDynamicColumns && /* @__PURE__ */ jsxs96("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: [
20645
+ /* @__PURE__ */ jsx97(RiEyeOffLine, { size: 10 }),
20646
+ /* @__PURE__ */ jsx97("span", { children: hiddenDynamicColumns.length })
20647
+ ] })
20648
+ ]
20342
20649
  }
20343
20650
  )
20344
- },
20345
- col.key
20346
- );
20347
- }),
20348
- /* @__PURE__ */ jsx97(
20349
- "td",
20350
- {
20351
- style: { width: "300px", minWidth: "300px", maxWidth: "300px" },
20352
- className: "fc:px-4 fc:py-3 fc:align-middle",
20353
- children: /* @__PURE__ */ jsx97(
20354
- "div",
20355
- {
20356
- style: {
20357
- width: "268px",
20358
- wordBreak: "break-word",
20359
- overflowWrap: "anywhere"
20360
- },
20361
- className: "fc:whitespace-normal",
20362
- children: /* @__PURE__ */ jsx97("p", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:leading-relaxed", children: row.subject })
20363
- }
20364
- )
20365
- }
20366
- ),
20367
- /* @__PURE__ */ jsx97(
20368
- "td",
20369
- {
20370
- style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20371
- className: "fc:px-4 fc:py-3 fc:align-middle",
20372
- children: /* @__PURE__ */ jsx97(
20373
- "div",
20374
- {
20375
- style: {
20376
- width: "158px",
20377
- wordBreak: "break-word",
20378
- overflowWrap: "anywhere"
20379
- },
20380
- className: "fc:whitespace-normal",
20381
- children: /* @__PURE__ */ jsx97("span", { className: "fc:text-xs fc:font-medium fc:text-slate-700 fc:leading-relaxed", children: row.workflowName })
20382
- }
20383
- )
20384
- }
20385
- ),
20386
- /* @__PURE__ */ jsx97(
20387
- "td",
20388
- {
20389
- style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20390
- className: "fc:px-4 fc:py-3 fc:align-middle",
20391
- children: /* @__PURE__ */ jsx97(
20392
- "div",
20393
- {
20394
- style: {
20395
- width: "158px",
20396
- wordBreak: "break-word",
20397
- overflowWrap: "anywhere"
20398
- },
20399
- className: "fc:whitespace-normal",
20400
- children: /* @__PURE__ */ jsx97("span", { className: "fc:text-xs fc:text-slate-600 fc:font-medium fc:leading-relaxed", children: row.sender })
20401
- }
20402
- )
20403
- }
20404
- ),
20405
- /* @__PURE__ */ jsx97(
20406
- "td",
20407
- {
20408
- style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
20409
- className: "fc:px-3 fc:py-3 fc:text-center fc:align-middle",
20410
- children: /* @__PURE__ */ jsx97(
20411
- "span",
20412
- {
20413
- 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"}`,
20414
- children: row.priority
20415
- }
20416
- )
20417
- }
20418
- ),
20419
- /* @__PURE__ */ jsx97(
20420
- "td",
20421
- {
20422
- style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
20423
- className: "fc:px-4 fc:py-3 fc:align-middle",
20424
- children: /* @__PURE__ */ jsx97("div", { style: { width: "118px" }, className: "fc:whitespace-normal", children: /* @__PURE__ */ jsx97("span", { className: "fc:text-[11px] fc:text-slate-500 fc:font-medium fc:leading-relaxed", children: row.receivedDate }) })
20425
- }
20426
- ),
20427
- /* @__PURE__ */ jsx97(
20428
- "td",
20429
- {
20430
- style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
20431
- className: "fc:px-4 fc:py-3 fc:align-middle",
20432
- children: /* @__PURE__ */ jsx97(
20433
- "div",
20651
+ }
20652
+ ),
20653
+ visibleDynamicColumns.map((col) => {
20654
+ const colWidthNum = parseInt(col.width || "180", 10);
20655
+ const contentWidth = `${Math.max(colWidthNum - 32, 80)}px`;
20656
+ return /* @__PURE__ */ jsx97(
20657
+ "td",
20434
20658
  {
20435
20659
  style: {
20436
- width: "118px",
20437
- wordBreak: "break-word",
20438
- overflowWrap: "anywhere"
20660
+ width: col.width || "180px",
20661
+ minWidth: col.width || "180px",
20662
+ maxWidth: col.width || "180px"
20439
20663
  },
20440
- className: "fc:whitespace-normal",
20664
+ 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",
20441
20665
  children: /* @__PURE__ */ jsx97(
20442
- "span",
20666
+ "div",
20443
20667
  {
20444
- 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"}`,
20445
- children: row.slaStatus
20668
+ style: {
20669
+ width: contentWidth,
20670
+ wordBreak: "break-word",
20671
+ overflowWrap: "anywhere"
20672
+ },
20673
+ className: "fc:whitespace-normal",
20674
+ children: /* @__PURE__ */ jsx97("span", { className: "fc:text-xs fc:font-medium fc:text-slate-800 fc:leading-relaxed", children: row[col.key] || "-" })
20446
20675
  }
20447
20676
  )
20448
- }
20449
- )
20450
- }
20451
- ),
20452
- /* @__PURE__ */ jsx97(
20453
- "td",
20454
- {
20455
- style: { width: "120px", minWidth: "120px", maxWidth: "120px" },
20456
- className: "fc:px-3 fc:py-3 fc:text-center fc:align-middle",
20457
- children: /* @__PURE__ */ jsx97(
20458
- "span",
20459
- {
20460
- 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"}`,
20461
- children: row.status
20462
- }
20463
- )
20464
- }
20465
- ),
20466
- /* @__PURE__ */ jsxs96(
20467
- "td",
20468
- {
20469
- style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
20470
- 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)]",
20471
- children: [
20472
- activeTab === "filePool" && /* @__PURE__ */ jsxs96(
20473
- "button",
20677
+ },
20678
+ col.key
20679
+ );
20680
+ }),
20681
+ /* @__PURE__ */ jsx97(
20682
+ "td",
20683
+ {
20684
+ style: { width: "300px", minWidth: "300px", maxWidth: "300px" },
20685
+ className: "fc:px-4 fc:py-3 fc:align-middle",
20686
+ children: /* @__PURE__ */ jsx97(
20687
+ "div",
20474
20688
  {
20475
- type: "button",
20476
- onClick: () => handleOpenPoolModal(row),
20477
- style: { fontSize: "12px" },
20478
- 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",
20479
- children: [
20480
- /* @__PURE__ */ jsx97(RiInboxArchiveLine2, { size: 14 }),
20481
- /* @__PURE__ */ jsx97("span", { children: "Pool" })
20482
- ]
20689
+ style: {
20690
+ width: "268px",
20691
+ wordBreak: "break-word",
20692
+ overflowWrap: "anywhere"
20693
+ },
20694
+ className: "fc:whitespace-normal",
20695
+ children: /* @__PURE__ */ jsx97("p", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:leading-relaxed", children: row.subject })
20483
20696
  }
20484
- ),
20485
- activeTab === "myFiles" && /* @__PURE__ */ jsxs96(
20486
- "button",
20697
+ )
20698
+ }
20699
+ ),
20700
+ /* @__PURE__ */ jsx97(
20701
+ "td",
20702
+ {
20703
+ style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20704
+ className: "fc:px-4 fc:py-3 fc:align-middle",
20705
+ children: /* @__PURE__ */ jsx97(
20706
+ "div",
20487
20707
  {
20488
- type: "button",
20489
- onClick: () => handleOpenTakeAction(row),
20490
- style: { fontSize: "12px" },
20491
- 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",
20492
- children: [
20493
- /* @__PURE__ */ jsx97(RiFileUploadLine, { size: 14 }),
20494
- /* @__PURE__ */ jsx97("span", { children: "Take Action" })
20495
- ]
20708
+ style: {
20709
+ width: "158px",
20710
+ wordBreak: "break-word",
20711
+ overflowWrap: "anywhere"
20712
+ },
20713
+ className: "fc:whitespace-normal",
20714
+ children: /* @__PURE__ */ jsx97("span", { className: "fc:text-xs fc:font-medium fc:text-slate-700 fc:leading-relaxed", children: row.workflowName })
20496
20715
  }
20497
- ),
20498
- activeTab === "totalFiles" && /* @__PURE__ */ jsxs96(
20499
- "button",
20716
+ )
20717
+ }
20718
+ ),
20719
+ /* @__PURE__ */ jsx97(
20720
+ "td",
20721
+ {
20722
+ style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20723
+ className: "fc:px-4 fc:py-3 fc:align-middle",
20724
+ children: /* @__PURE__ */ jsx97(
20725
+ "div",
20500
20726
  {
20501
- type: "button",
20502
- onClick: () => handleOpenView(row),
20503
- style: { fontSize: "12px" },
20504
- 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",
20505
- children: [
20506
- /* @__PURE__ */ jsx97(RiEyeLine2, { size: 14 }),
20507
- /* @__PURE__ */ jsx97("span", { children: "View" })
20508
- ]
20727
+ style: {
20728
+ width: "158px",
20729
+ wordBreak: "break-word",
20730
+ overflowWrap: "anywhere"
20731
+ },
20732
+ className: "fc:whitespace-normal",
20733
+ children: /* @__PURE__ */ jsx97("span", { className: "fc:text-xs fc:text-slate-600 fc:font-medium fc:leading-relaxed", children: row.sender })
20509
20734
  }
20510
20735
  )
20511
- ]
20512
- }
20513
- )
20514
- ]
20515
- },
20516
- row.fileId || row.fileNumber
20517
- );
20518
- }) })
20519
- ] }) }),
20736
+ }
20737
+ ),
20738
+ /* @__PURE__ */ jsx97(
20739
+ "td",
20740
+ {
20741
+ style: { width: "100px", minWidth: "100px", maxWidth: "100px" },
20742
+ className: "fc:px-3 fc:py-3 fc:text-center fc:align-middle",
20743
+ children: /* @__PURE__ */ jsx97(
20744
+ "span",
20745
+ {
20746
+ 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"}`,
20747
+ children: row.priority
20748
+ }
20749
+ )
20750
+ }
20751
+ ),
20752
+ /* @__PURE__ */ jsx97(
20753
+ "td",
20754
+ {
20755
+ style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
20756
+ className: "fc:px-4 fc:py-3 fc:align-middle",
20757
+ children: /* @__PURE__ */ jsx97("div", { style: { width: "118px" }, className: "fc:whitespace-normal", children: /* @__PURE__ */ jsx97("span", { className: "fc:text-[11px] fc:text-slate-500 fc:font-medium fc:leading-relaxed", children: row.receivedDate }) })
20758
+ }
20759
+ ),
20760
+ /* @__PURE__ */ jsx97(
20761
+ "td",
20762
+ {
20763
+ style: { width: "150px", minWidth: "150px", maxWidth: "150px" },
20764
+ className: "fc:px-4 fc:py-3 fc:align-middle",
20765
+ children: /* @__PURE__ */ jsx97(
20766
+ "div",
20767
+ {
20768
+ style: {
20769
+ width: "118px",
20770
+ wordBreak: "break-word",
20771
+ overflowWrap: "anywhere"
20772
+ },
20773
+ className: "fc:whitespace-normal",
20774
+ children: /* @__PURE__ */ jsx97(
20775
+ "span",
20776
+ {
20777
+ 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"}`,
20778
+ children: row.slaStatus
20779
+ }
20780
+ )
20781
+ }
20782
+ )
20783
+ }
20784
+ ),
20785
+ activeTab === "totalFiles" && /* @__PURE__ */ jsx97(
20786
+ "td",
20787
+ {
20788
+ style: { width: "160px", minWidth: "160px", maxWidth: "160px" },
20789
+ className: "fc:px-4 fc:py-3 fc:align-middle",
20790
+ children: /* @__PURE__ */ jsx97("span", { className: "fc:text-xs fc:font-medium fc:text-slate-700", children: row.fileAt })
20791
+ }
20792
+ ),
20793
+ /* @__PURE__ */ jsx97(
20794
+ "td",
20795
+ {
20796
+ style: { width: "190px", minWidth: "190px", maxWidth: "190px" },
20797
+ className: "fc:px-3 fc:py-3 fc:text-center fc:align-middle",
20798
+ children: /* @__PURE__ */ jsx97(
20799
+ "span",
20800
+ {
20801
+ 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"}`,
20802
+ children: row.status
20803
+ }
20804
+ )
20805
+ }
20806
+ ),
20807
+ /* @__PURE__ */ jsxs96(
20808
+ "td",
20809
+ {
20810
+ style: { width: "195px", minWidth: "195px", maxWidth: "195px" },
20811
+ 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)]",
20812
+ children: [
20813
+ activeTab === "filePool" && /* @__PURE__ */ jsxs96(
20814
+ "button",
20815
+ {
20816
+ type: "button",
20817
+ onClick: () => handleOpenPoolModal(row),
20818
+ style: { fontSize: "12px" },
20819
+ 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",
20820
+ children: [
20821
+ /* @__PURE__ */ jsx97(RiInboxArchiveLine2, { size: 14 }),
20822
+ /* @__PURE__ */ jsx97("span", { children: "Claim" })
20823
+ ]
20824
+ }
20825
+ ),
20826
+ activeTab === "myFiles" && /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center fc:justify-center fc:gap-1.5", children: [
20827
+ /* @__PURE__ */ jsxs96(
20828
+ "button",
20829
+ {
20830
+ type: "button",
20831
+ onClick: () => handleOpenTakeAction(row),
20832
+ style: { fontSize: "11px" },
20833
+ 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",
20834
+ children: [
20835
+ /* @__PURE__ */ jsx97(RiFileUploadLine, { size: 13 }),
20836
+ /* @__PURE__ */ jsx97("span", { children: "Take Action" })
20837
+ ]
20838
+ }
20839
+ ),
20840
+ /* @__PURE__ */ jsx97(
20841
+ "button",
20842
+ {
20843
+ type: "button",
20844
+ onClick: () => handleUnclaim(row),
20845
+ disabled: isUnclaiming,
20846
+ style: { fontSize: "11px" },
20847
+ className: "fc:inline-flex fc:items-center fc:justify-center fc:h-8 fc:px-2 fc:whitespace-nowrap fc:border fc:border-rose-200 fc:bg-rose-50 fc:text-rose-700 fc:font-bold fc:rounded-lg hover:fc:bg-rose-100 hover:fc:border-rose-300 fc:transition-colors active:fc:scale-95 disabled:fc:cursor-not-allowed disabled:fc:opacity-60",
20848
+ children: isUnclaiming ? "Unclaiming..." : "Unclaim"
20849
+ }
20850
+ )
20851
+ ] }),
20852
+ activeTab === "totalFiles" && /* @__PURE__ */ jsxs96(
20853
+ "button",
20854
+ {
20855
+ type: "button",
20856
+ onClick: () => handleOpenView(row),
20857
+ style: { fontSize: "12px" },
20858
+ 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",
20859
+ children: [
20860
+ /* @__PURE__ */ jsx97(RiEyeLine2, { size: 14 }),
20861
+ /* @__PURE__ */ jsx97("span", { children: "View" })
20862
+ ]
20863
+ }
20864
+ )
20865
+ ]
20866
+ }
20867
+ )
20868
+ ]
20869
+ },
20870
+ row.fileId || row.fileNumber
20871
+ );
20872
+ }) })
20873
+ ] })
20874
+ ] }),
20520
20875
  /* @__PURE__ */ jsxs96("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: [
20521
20876
  /* @__PURE__ */ jsxs96("span", { className: "fc:text-xs fc:text-slate-500 fc:font-medium", children: [
20522
20877
  "Showing ",
@@ -20879,7 +21234,7 @@ function TrackingSlipModal({ isOpen, onClose, application }) {
20879
21234
  }
20880
21235
 
20881
21236
  // src/components/track-application/TrackApplicationMain.jsx
20882
- import { Fragment as Fragment5, jsx as jsx99, jsxs as jsxs98 } from "react/jsx-runtime";
21237
+ import { Fragment as Fragment6, jsx as jsx99, jsxs as jsxs98 } from "react/jsx-runtime";
20883
21238
  var APPLICATION_DATABASE = [];
20884
21239
  function TrackApplicationMain() {
20885
21240
  var _a, _b, _c;
@@ -21095,7 +21450,7 @@ function TrackApplicationMain() {
21095
21450
  VIEW 1: LIVE TRACKING DASHBOARD
21096
21451
  ======================================================== */
21097
21452
  /* @__PURE__ */ jsxs98("div", { className: "fc:space-y-4", children: [
21098
- selectedApplication && /* @__PURE__ */ jsxs98(Fragment5, { children: [
21453
+ selectedApplication && /* @__PURE__ */ jsxs98(Fragment6, { children: [
21099
21454
  /* @__PURE__ */ jsxs98("div", { className: "fc:rounded-2xl fc:border fc:border-blue-100 fc:bg-gradient-to-r fc:from-blue-50/80 fc:via-indigo-50/40 fc:to-white fc:p-4.5 fc:shadow-sm", children: [
21100
21455
  /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-3 fc:flex-wrap", children: [
21101
21456
  /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-2 fc:flex-wrap", children: [
@@ -21677,7 +22032,7 @@ function TrackApplicationMain() {
21677
22032
  }
21678
22033
 
21679
22034
  // src/components/Sidebar.jsx
21680
- import { Fragment as Fragment6, jsx as jsx100, jsxs as jsxs99 } from "react/jsx-runtime";
22035
+ import { Fragment as Fragment7, jsx as jsx100, jsxs as jsxs99 } from "react/jsx-runtime";
21681
22036
  function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
21682
22037
  const router = useRouter();
21683
22038
  const resolvedSidebarConfig = sidebar != null ? sidebar : sidebarConfig;
@@ -21946,7 +22301,7 @@ function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
21946
22301
  /* @__PURE__ */ jsx100("p", { className: "fc:text-sm fc:text-[#405170]", children: "You do not have permission to access FlowCore. Please contact your administrator." })
21947
22302
  ] }) });
21948
22303
  }
21949
- return /* @__PURE__ */ jsxs99(Fragment6, { children: [
22304
+ return /* @__PURE__ */ jsxs99(Fragment7, { children: [
21950
22305
  /* @__PURE__ */ jsxs99(
21951
22306
  "aside",
21952
22307
  {
@@ -21976,7 +22331,7 @@ function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
21976
22331
  )
21977
22332
  ] }),
21978
22333
  /* @__PURE__ */ jsxs99("div", { className: "fc:min-h-0 min-h-0 fc:flex-1 flex-1 fc:overflow-y-auto overflow-y-auto fc:overflow-x-hidden overflow-x-hidden fc:px-[12px] px-[12px] fc:pb-[24px] pb-[24px] fc:pt-[20px] pt-[20px]", children: [
21979
- (workflowItems.length > 0 || permissionItems.length > 0 || hierarchyItems.length > 0 || documentItems.length > 0) && /* @__PURE__ */ jsxs99(Fragment6, { children: [
22334
+ (workflowItems.length > 0 || permissionItems.length > 0 || hierarchyItems.length > 0 || documentItems.length > 0) && /* @__PURE__ */ jsxs99(Fragment7, { children: [
21980
22335
  /* @__PURE__ */ jsx100("p", { className: "fc:mb-[10px] mb-[10px] fc:px-[10px] px-[10px] fc:text-[12px] text-[12px] fc:font-bold font-bold fc:uppercase uppercase fc:leading-[16px] leading-[16px] fc:tracking-[0.5px] tracking-[0.5px] fc:text-[#3C4D74] text-[#3C4D74]", children: "Configuration Masters" }),
21981
22336
  /* @__PURE__ */ jsxs99("div", { className: "fc:flex flex fc:flex-col flex-col fc:gap-[2px] gap-[2px]", children: [
21982
22337
  renderDropdown("Workflow", workflowOpen, setWorkflowOpen, workflowItems, RiNodeTree),
@@ -21985,7 +22340,7 @@ function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
21985
22340
  renderDropdown("Hierarchy", hierarchyOpen, setHierarchyOpen, hierarchyItems, RiNodeTree)
21986
22341
  ] })
21987
22342
  ] }),
21988
- (fileItems.length > 0 || taskItems.length > 0 || trackingItems.length > 0 || communicationItems.length > 0) && /* @__PURE__ */ jsxs99(Fragment6, { children: [
22343
+ (fileItems.length > 0 || taskItems.length > 0 || trackingItems.length > 0 || communicationItems.length > 0) && /* @__PURE__ */ jsxs99(Fragment7, { children: [
21989
22344
  /* @__PURE__ */ jsx100("p", { className: "fc:mb-[10px] mb-[10px] fc:px-[10px] px-[10px] fc:mt-[24px] mt-[24px] fc:text-[12px] text-[12px] fc:font-bold font-bold fc:uppercase uppercase fc:leading-[16px] leading-[16px] fc:tracking-[0.5px] tracking-[0.5px] fc:text-[#3C4D74] text-[#3C4D74]", children: "Runtime" }),
21990
22345
  /* @__PURE__ */ jsxs99("div", { className: "fc:flex flex fc:flex-col flex-col fc:gap-[2px] gap-[2px]", children: [
21991
22346
  renderDropdown("Files", filesOpen, setFilesOpen, fileItems, RiFolder3Line),