flowcore-fn 10.3.9 → 10.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pkg-index.js CHANGED
@@ -149,8 +149,8 @@ __export(pkg_index_exports, {
149
149
  module.exports = __toCommonJS(pkg_index_exports);
150
150
 
151
151
  // src/components/Sidebar.jsx
152
- var import_react137 = require("react");
153
- var import_react138 = require("@remixicon/react");
152
+ var import_react138 = require("react");
153
+ var import_react139 = require("@remixicon/react");
154
154
  var import_router = require("next/router");
155
155
 
156
156
  // src/components/workflow/WorkflowMain.jsx
@@ -7654,7 +7654,7 @@ function DocumentConfigTable({
7654
7654
  onClick: () => handleSort("workflowName"),
7655
7655
  className: "fc:py-4 fc:px-2 fc:text-sm fc:cursor-pointer fc:select-none hover:fc:text-slate-900 fc:bg-slate-50 fc:text-center fc:w-38",
7656
7656
  children: [
7657
- "Workflow Name",
7657
+ "Workflow",
7658
7658
  " ",
7659
7659
  sortKey === "workflowName" ? sortOrder === "asc" ? "\u25B2" : "\u25BC" : "\u25B2"
7660
7660
  ]
@@ -7678,7 +7678,7 @@ function DocumentConfigTable({
7678
7678
  onClick: () => handleSort("stepId"),
7679
7679
  className: "fc:py-4 fc:px-2 fc:text-sm fc:cursor-pointer fc:select-none hover:fc:text-slate-900 fc:bg-slate-50 fc:text-center fc:w-38",
7680
7680
  children: [
7681
- "Workflow Step Name",
7681
+ "Step Name",
7682
7682
  " ",
7683
7683
  sortKey === "stepId" ? sortOrder === "asc" ? "\u25B2" : "\u25BC" : "\u25B2"
7684
7684
  ]
@@ -9190,8 +9190,8 @@ function Table({
9190
9190
  const q = searchQuery.toLowerCase().trim();
9191
9191
  const filtered = apiData.filter(
9192
9192
  (item) => {
9193
- var _a, _b, _c, _d, _e, _f, _g;
9194
- return !q || String((_b = (_a = item.stepPermissionId) != null ? _a : item.id) != null ? _b : "").toLowerCase().includes(q) || String((_c = item.workflowStepId) != null ? _c : "").toLowerCase().includes(q) || String((_g = (_f = (_e = (_d = item.stepName) != null ? _d : item.StepName) != null ? _e : item.workflowStepName) != null ? _f : item.WorkflowStepName) != null ? _g : "").toLowerCase().includes(q);
9193
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
9194
+ return !q || String((_b = (_a = item.stepPermissionId) != null ? _a : item.id) != null ? _b : "").toLowerCase().includes(q) || String((_c = item.workflowStepId) != null ? _c : "").toLowerCase().includes(q) || String((_e = (_d = item.workflowName) != null ? _d : item.WorkflowName) != null ? _e : "").toLowerCase().includes(q) || String((_g = (_f = item.workflowTypeName) != null ? _f : item.WorkflowTypeName) != null ? _g : "").toLowerCase().includes(q) || String((_k = (_j = (_i = (_h = item.stepName) != null ? _h : item.StepName) != null ? _i : item.workflowStepName) != null ? _j : item.WorkflowStepName) != null ? _k : "").toLowerCase().includes(q);
9195
9195
  }
9196
9196
  );
9197
9197
  const sorted = [...filtered].sort((a, b) => {
@@ -9216,7 +9216,9 @@ function Table({
9216
9216
  );
9217
9217
  const columns = [
9218
9218
  // { label: "ID", key: "stepPermissionId" },
9219
- { label: "Workflow Step", key: "workflowStepId" },
9219
+ { label: "Workflow Type", key: "workflowTypeName" },
9220
+ { label: "Workflow", key: "workflowName" },
9221
+ { label: "Step Name", key: "workflowStepId" },
9220
9222
  { label: "Can View", key: "canView" },
9221
9223
  { label: "Can Edit", key: "canEdit" },
9222
9224
  { label: "Can Approve", key: "canApprove" },
@@ -9294,14 +9296,16 @@ function Table({
9294
9296
  children: "No step permissions found."
9295
9297
  }
9296
9298
  ) }) : visibleData.map((item, index) => {
9297
- var _a, _b, _c, _d, _e, _f, _g, _h;
9299
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
9298
9300
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
9299
9301
  "tr",
9300
9302
  {
9301
9303
  className: "hover:fc:bg-slate-50/50 fc:transition-colors",
9302
9304
  children: [
9303
9305
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "fc:py-4 fc:px-4 fc:text-center fc:font-medium fc:text-slate-400", children: startIndex + index + 1 }),
9304
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "fc:py-4 fc:px-5 fc:text-center fc:text-[13px] fc:font-bold fc:text-slate-600 fc:whitespace-nowrap", children: (_h = (_e = (_d = (_c = item.stepName) != null ? _c : item.StepName) != null ? _d : item.workflowStepName) != null ? _e : item.WorkflowStepName) != null ? _h : (_g = (_f = item.workflowStepId) != null ? _f : item.WorkflowStepId) != null ? _g : "-" }),
9306
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "fc:py-4 fc:px-5 fc:text-center fc:text-[13px] fc:font-medium fc:text-slate-600 fc:whitespace-nowrap", children: (_d = (_c = item.workflowName) != null ? _c : item.WorkflowName) != null ? _d : "-" }),
9307
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "fc:py-4 fc:px-5 fc:text-center fc:text-[13px] fc:font-medium fc:text-slate-600 fc:whitespace-nowrap", children: (_f = (_e = item.workflowTypeName) != null ? _e : item.WorkflowTypeName) != null ? _f : "-" }),
9308
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "fc:py-4 fc:px-5 fc:text-center fc:text-[13px] fc:font-bold fc:text-slate-600 fc:whitespace-nowrap", children: (_l = (_i = (_h = (_g = item.stepName) != null ? _g : item.StepName) != null ? _h : item.stepName) != null ? _i : item.stepName) != null ? _l : (_k = (_j = item.stepName) != null ? _j : item.stepName) != null ? _k : "-" }),
9305
9309
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "fc:py-4 fc:px-5 fc:text-center", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(BoolBadge, { val: item.canView }) }),
9306
9310
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "fc:py-4 fc:px-5 fc:text-center", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(BoolBadge, { val: item.canEdit }) }),
9307
9311
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "fc:py-4 fc:px-5 fc:text-center", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(BoolBadge, { val: item.canApprove }) }),
@@ -9517,21 +9521,21 @@ function Popup({ isOpen, onClose, onSave }) {
9517
9521
  }
9518
9522
  };
9519
9523
  const permissionCards = [
9520
- { icon: "\u{1F441}\uFE0F", title: "Can View", desc: "Read logs & details", field: "canView" },
9521
- { icon: "\u2713", title: "Can Approve", desc: "Pass states & approve", field: "canApprove" },
9522
- { icon: "\u{1F4DD}", title: "Can Edit", desc: "Modify properties", field: "canEdit" },
9523
- { icon: "\u2715", title: "Can Reject", desc: "Cancel / reject tasks", field: "canReject" },
9524
- { icon: "\u27A1\uFE0F", title: "Can Forward", desc: "Forward to next step", field: "canForward" },
9525
- { icon: "\u23E9", title: "Can Free Forward", desc: "Forward freely to any step", field: "canFreeForward" },
9526
- { icon: "\u21A9\uFE0F", title: "Can Return", desc: "Return to previous step", field: "canReturn" },
9527
- { icon: "\u{1F464}", title: "Can Return To Applicant", desc: "Send back to applicant", field: "canReturnToApplicant" },
9528
- { icon: "\u{1F465}", title: "Can Delegate", desc: "Reassign or delegate task", field: "canDelegate" },
9529
- { icon: "\u23F8\uFE0F", title: "Can Hold", desc: "Put execution on hold", field: "canHold" }
9524
+ { title: "Can View", field: "canView", labelField: "viewLabel" },
9525
+ { title: "Can Approve", field: "canApprove", labelField: "approveLabel" },
9526
+ { title: "Can Edit", field: "canEdit", labelField: "editLabel" },
9527
+ { title: "Can Reject", field: "canReject", labelField: "rejectLabel" },
9528
+ { title: "Can Forward", field: "canForward", labelField: "forwardLabel" },
9529
+ { title: "Can Free Forward", field: "canFreeForward", labelField: "freeForwardLabel" },
9530
+ { title: "Can Return", field: "canReturn", labelField: "returnLabel" },
9531
+ { title: "Can Return To Applicant", field: "canReturnToApplicant", labelField: "returnToApplicantLabel" },
9532
+ { title: "Can Delegate", field: "canDelegate", labelField: "delegateLabel" },
9533
+ { title: "Can Hold", field: "canHold", labelField: "holdLabel" }
9530
9534
  ];
9531
9535
  return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:fixed fc:inset-0 fc:z-50 fc:flex fc:items-center fc:justify-center fc:p-4", children: [
9532
9536
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "fc:fixed fc:inset-0 fc:bg-slate-900/50 fc:backdrop-blur-sm fc:transition-opacity fc:duration-200", onClick: onClose }),
9533
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:relative fc:w-full fc:max-w-4xl fc:bg-white fc:rounded-3xl fc:shadow-2xl 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:duration-200", children: [
9534
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:justify-between fc:items-center fc:px-8 fc:py-6 fc:border-b fc:border-slate-100", children: [
9537
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:relative fc:w-full fc:max-w-6xl fc:bg-white fc:rounded-3xl fc:shadow-2xl fc:flex fc:flex-col fc:z-10 fc:max-h-[96vh] fc:overflow-hidden fc:animate-in fc:fade-in fc:zoom-in-95 fc:duration-200", children: [
9538
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:justify-between fc:items-center fc:px-6 fc:py-4 fc:border-b fc:border-slate-100", children: [
9535
9539
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-4", children: [
9536
9540
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "fc:w-12 fc:h-12 fc:bg-blue-50 fc:text-blue-600 fc:rounded-xl fc:flex fc:items-center fc:justify-center fc:shadow-sm fc:text-xl", children: "\u{1F511}" }),
9537
9541
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
@@ -9541,10 +9545,10 @@ function Popup({ isOpen, onClose, onSave }) {
9541
9545
  ] }),
9542
9546
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("button", { onClick: onClose, className: "fc:text-slate-400 hover:fc:fc:text-slate-600 hover:fc:fc:bg-slate-100 fc:p-2 fc:rounded-full fc:transition-all fc:text-sm fc:font-semibold", children: "\u2715" })
9543
9547
  ] }),
9544
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("form", { onSubmit: handleSubmit, className: "fc:flex fc:flex-col fc:flex-1 fc:overflow-hidden", children: [
9545
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:p-8 fc:space-y-8 fc:overflow-y-auto fc:max-h-[calc(92vh-170px)] fc:bg-slate-50/30", children: [
9546
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:bg-white fc:p-6 fc:rounded-2xl fc:border fc:border-slate-100/80 fc:shadow-sm fc:space-y-5", children: [
9547
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:text-blue-600 fc:text-sm fc:font-bold fc:border-b fc:border-slate-50 fc:pb-3", children: [
9548
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("form", { onSubmit: handleSubmit, className: "fc:flex fc:min-h-0 fc:flex-1 fc:flex-col fc:overflow-hidden", children: [
9549
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:min-h-0 fc:flex-1 fc:space-y-4 fc:overflow-y-auto fc:bg-slate-50/30 fc:p-4 md:fc:p-5", children: [
9550
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:bg-white fc:p-4 fc:rounded-2xl fc:border fc:border-slate-100/80 fc:shadow-sm fc:space-y-4", children: [
9551
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:text-blue-600 fc:text-sm fc:font-bold fc:border-b fc:border-slate-50 fc:pb-2", children: [
9548
9552
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "\u{1F4CB}" }),
9549
9553
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "Step Information" })
9550
9554
  ] }),
@@ -9577,56 +9581,57 @@ function Popup({ isOpen, onClose, onSave }) {
9577
9581
  errors.workflowStepId && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "fc:text-red-500 fc:text-[11px] fc:mt-1", children: errors.workflowStepId })
9578
9582
  ] })
9579
9583
  ] }),
9580
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:bg-white fc:p-6 fc:rounded-2xl fc:border fc:border-slate-100/80 fc:shadow-sm fc:space-y-5", children: [
9584
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:bg-white fc:p-4 fc:rounded-2xl fc:border fc:border-slate-100/80 fc:shadow-sm fc:space-y-4", children: [
9581
9585
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:text-blue-600 fc:text-sm fc:font-bold fc:border-b fc:border-slate-50 fc:pb-3", children: [
9582
9586
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "\u2699\uFE0F" }),
9583
9587
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "Set Initial Matrix Access Rules" })
9584
9588
  ] }),
9585
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "fc:grid fc:grid-cols-2 fc:gap-4", children: permissionCards.map(({ icon, title, desc, field }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:p-4 fc:bg-slate-50/50 fc:border fc:border-slate-100 fc:rounded-2xl", children: [
9586
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2.5", children: [
9587
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "fc:w-8 fc:h-8 fc:rounded-lg fc:bg-blue-50 fc:text-blue-600 fc:flex fc:items-center fc:justify-center fc:text-xs", children: icon }),
9588
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
9589
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "fc:text-xs fc:font-bold fc:text-slate-700", children: title }),
9590
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "fc:text-[9px] fc:text-slate-400", children: desc })
9591
- ] })
9592
- ] }),
9593
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
9594
- "button",
9595
- {
9596
- type: "button",
9597
- onClick: () => handleChange(field, !formData[field]),
9598
- className: `fc:relative fc:inline-flex fc:h-5.5 fc:w-10 fc:shrink-0 fc:cursor-pointer fc:rounded-full fc:border-2 fc:border-transparent fc:transition-colors fc:duration-200 fc:ease-in-out fc:outline-none ${formData[field] ? "fc:bg-blue-600" : "fc:bg-gray-300"}`,
9599
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
9600
- "span",
9601
- {
9602
- className: `fc:pointer-events-none fc:inline-block fc:h-4.5 fc:w-4.5 fc:transform fc:rounded-full fc:bg-white fc:shadow fc:ring-0 fc:transition fc:duration-200 fc:ease-in-out ${formData[field] ? "fc:translate-x-4.5" : "fc:translate-x-0"}`
9603
- }
9604
- )
9605
- }
9606
- )
9607
- ] }, field)) })
9608
- ] }),
9609
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:bg-white fc:p-6 fc:rounded-2xl fc:border fc:border-slate-100/80 fc:shadow-sm fc:space-y-5", children: [
9610
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:text-blue-600 fc:text-sm fc:font-bold fc:border-b fc:border-slate-50 fc:pb-3", children: [
9611
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "\u{1F3F7}\uFE0F" }),
9612
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "Action Labels" })
9613
- ] }),
9614
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "fc:grid fc:grid-cols-2 fc:gap-4", children: permissionLabelFields.map(({ field, label, fallback }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
9615
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: label }),
9616
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
9617
- "input",
9618
- {
9619
- type: "text",
9620
- value: formData[field],
9621
- onChange: (event) => handleChange(field, event.target.value),
9622
- placeholder: fallback,
9623
- 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"
9624
- }
9625
- )
9626
- ] }, field)) })
9589
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
9590
+ "div",
9591
+ {
9592
+ className: "fc:grid fc:gap-3",
9593
+ style: { gridTemplateColumns: "repeat(auto-fit, minmax(max(200px, calc((100% - 36px) / 4)), 1fr))" },
9594
+ children: permissionCards.map(({ title, field, labelField }) => {
9595
+ var _a, _b;
9596
+ const actionLabel = permissionLabelFields.find((item) => item.field === labelField);
9597
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:min-w-0 fc:flex-col fc:gap-2 fc:rounded-xl fc:border fc:border-slate-100 fc:bg-slate-50/50 fc:p-3", children: [
9598
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "fc:text-[11px] fc:font-extrabold fc:text-slate-700", children: title }),
9599
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2", children: [
9600
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
9601
+ "input",
9602
+ {
9603
+ type: "text",
9604
+ "aria-label": (_a = actionLabel == null ? void 0 : actionLabel.label) != null ? _a : `${title} label`,
9605
+ value: (_b = formData[labelField]) != null ? _b : "",
9606
+ placeholder: actionLabel == null ? void 0 : actionLabel.fallback,
9607
+ onChange: (event) => handleChange(labelField, event.target.value),
9608
+ className: "fc:min-w-0 fc:flex-1 fc:rounded-lg fc:border fc:border-slate-200 fc:bg-white fc:px-2 fc:py-1.5 fc:text-[11px] fc:text-slate-700 focus:fc:border-indigo-500 focus:fc:outline-none"
9609
+ }
9610
+ ),
9611
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
9612
+ "button",
9613
+ {
9614
+ type: "button",
9615
+ "aria-label": `${title}: ${formData[field] ? "enabled" : "disabled"}`,
9616
+ "aria-pressed": Boolean(formData[field]),
9617
+ onClick: () => handleChange(field, !formData[field]),
9618
+ className: `fc:relative fc:inline-flex fc:h-5.5 fc:w-10 fc:shrink-0 fc:cursor-pointer fc:rounded-full fc:border-2 fc:border-transparent fc:transition-colors fc:duration-200 fc:ease-in-out fc:outline-none ${formData[field] ? "fc:bg-blue-600" : "fc:bg-gray-300"}`,
9619
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
9620
+ "span",
9621
+ {
9622
+ className: `fc:pointer-events-none fc:inline-block fc:h-4.5 fc:w-4.5 fc:transform fc:rounded-full fc:bg-white fc:shadow fc:ring-0 fc:transition fc:duration-200 fc:ease-in-out ${formData[field] ? "fc:translate-x-4.5" : "fc:translate-x-0"}`
9623
+ }
9624
+ )
9625
+ }
9626
+ )
9627
+ ] })
9628
+ ] }, field);
9629
+ })
9630
+ }
9631
+ )
9627
9632
  ] }),
9628
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:bg-white fc:p-6 fc:rounded-2xl fc:border fc:border-slate-100/80 fc:shadow-sm fc:space-y-4", children: [
9629
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:text-blue-600 fc:text-sm fc:font-bold fc:border-b fc:border-slate-50 fc:pb-3", children: [
9633
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:bg-white fc:p-4 fc:rounded-2xl fc:border fc:border-slate-100/80 fc:shadow-sm fc:space-y-3", children: [
9634
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:text-blue-600 fc:text-sm fc:font-bold fc:border-b fc:border-slate-50 fc:pb-2", children: [
9630
9635
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "\u{1F518}" }),
9631
9636
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "Status" })
9632
9637
  ] }),
@@ -9650,7 +9655,7 @@ function Popup({ isOpen, onClose, onSave }) {
9650
9655
  )) })
9651
9656
  ] })
9652
9657
  ] }),
9653
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:p-5 fc:bg-white fc:border-t fc:border-slate-100 fc:flex fc:items-center fc:justify-end fc:gap-3 fc:px-8", children: [
9658
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-end fc:gap-3 fc:border-t fc:border-slate-100 fc:bg-white fc:px-6 fc:py-3", children: [
9654
9659
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
9655
9660
  "button",
9656
9661
  {
@@ -10433,12 +10438,12 @@ function FormFieldMain() {
10433
10438
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
10434
10439
  CommonHeader,
10435
10440
  {
10436
- title: "Update Permission",
10441
+ title: "Applicant Form Fields",
10437
10442
  breadcrumbs: [
10438
10443
  { label: "Dashboard", href: "/dashboard" },
10439
10444
  { label: "Masters", href: "/masters" },
10440
10445
  { label: "Permissions", href: "/permissions" },
10441
- { label: "Update Permission", href: "/form-field" }
10446
+ { label: "Applicant Form Fields", href: "/form-field" }
10442
10447
  ],
10443
10448
  buttonText: "Add Form Field",
10444
10449
  onButtonClick: openCreate
@@ -16424,7 +16429,9 @@ function Table4({
16424
16429
  /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "fc:max-h-[420px] fc:overflow-auto fc:rounded-2xl fc:border fc:border-slate-200", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("table", { className: "fc:w-full fc:bg-white fc:text-left", children: [
16425
16430
  /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("thead", { className: "fc:sticky fc:top-0 fc:z-10", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("tr", { children: [
16426
16431
  /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("th", { className: "fc:bg-slate-50 fc:px-4 fc:py-4 fc:text-xs", children: "S.NO" }),
16427
- heading("WORKFLOW STEP Name", "stepName"),
16432
+ heading("WORKFLOW TYPE", "workflowTypeName"),
16433
+ heading("WORKFLOW", "workflowName"),
16434
+ heading("STEP NAME", "stepName"),
16428
16435
  heading("ASSIGNMENT TYPE", "assignmentType"),
16429
16436
  heading("NODE TYPE", "hierarchyNodeType"),
16430
16437
  /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("th", { className: "fc:bg-slate-50 fc:px-5 fc:py-4 fc:text-xs", children: "POOL ENABLED" }),
@@ -16433,51 +16440,56 @@ function Table4({
16433
16440
  /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("tbody", { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
16434
16441
  "td",
16435
16442
  {
16436
- colSpan: "6",
16443
+ colSpan: "8",
16437
16444
  className: "fc:p-8 fc:text-center fc:text-sm fc:text-slate-500",
16438
16445
  children: "Loading assignment rules..."
16439
16446
  }
16440
16447
  ) }) : visibleRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
16441
16448
  "td",
16442
16449
  {
16443
- colSpan: "6",
16450
+ colSpan: "8",
16444
16451
  className: "fc:p-8 fc:text-center fc:text-sm fc:text-slate-400",
16445
16452
  children: "No assignment rules found."
16446
16453
  }
16447
- ) }) : visibleRows.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
16448
- "tr",
16449
- {
16450
- className: "fc:border-t fc:border-slate-100",
16451
- children: [
16452
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { className: "fc:px-4 fc:py-4 fc:text-center fc:text-sm", children: (currentPage - 1) * pageSize + index + 1 }),
16453
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.stepName }),
16454
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.assignmentType }),
16455
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.hierarchyNodeType }),
16456
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.isPoolEnabled ? "Yes" : "No" }),
16457
- /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: [
16458
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
16459
- "button",
16460
- {
16461
- type: "button",
16462
- onClick: () => onEdit(item),
16463
- className: "fc:mr-2 fc:rounded-lg fc:bg-blue-50 fc:px-3 fc:py-1 fc:text-blue-600",
16464
- children: "Edit"
16465
- }
16466
- ),
16467
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
16468
- "button",
16469
- {
16470
- type: "button",
16471
- onClick: () => onDelete(item),
16472
- className: "fc:rounded-lg fc:bg-rose-50 fc:px-3 fc:py-1 fc:text-rose-600",
16473
- children: "Delete"
16474
- }
16475
- )
16476
- ] })
16477
- ]
16478
- },
16479
- item.assignmentRuleId
16480
- )) })
16454
+ ) }) : visibleRows.map((item, index) => {
16455
+ var _a, _b;
16456
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
16457
+ "tr",
16458
+ {
16459
+ className: "fc:border-t fc:border-slate-100",
16460
+ children: [
16461
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { className: "fc:px-4 fc:py-4 fc:text-center fc:text-sm", children: (currentPage - 1) * pageSize + index + 1 }),
16462
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: (_a = item.workflowTypeName) != null ? _a : "-" }),
16463
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: (_b = item.workflowName) != null ? _b : "-" }),
16464
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.stepName }),
16465
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.assignmentType }),
16466
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.hierarchyNodeType }),
16467
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.isPoolEnabled ? "Yes" : "No" }),
16468
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: [
16469
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
16470
+ "button",
16471
+ {
16472
+ type: "button",
16473
+ onClick: () => onEdit(item),
16474
+ className: "fc:mr-2 fc:rounded-lg fc:bg-blue-50 fc:px-3 fc:py-1 fc:text-blue-600",
16475
+ children: "Edit"
16476
+ }
16477
+ ),
16478
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
16479
+ "button",
16480
+ {
16481
+ type: "button",
16482
+ onClick: () => onDelete(item),
16483
+ className: "fc:rounded-lg fc:bg-rose-50 fc:px-3 fc:py-1 fc:text-rose-600",
16484
+ children: "Delete"
16485
+ }
16486
+ )
16487
+ ] })
16488
+ ]
16489
+ },
16490
+ item.assignmentRuleId
16491
+ );
16492
+ }) })
16481
16493
  ] }) }),
16482
16494
  /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "fc:flex fc:justify-end fc:gap-2 fc:text-sm", children: [
16483
16495
  /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
@@ -17019,7 +17031,7 @@ function Workflow_Step_Hierarchy_Mapping_Main() {
17019
17031
  }
17020
17032
  };
17021
17033
  const filteredMappings = mappings.filter((mapping) => {
17022
- var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
17034
+ var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
17023
17035
  const query = searchQuery.trim().toLowerCase();
17024
17036
  const stepId = (_c2 = (_b2 = (_a2 = mapping.workflowId) != null ? _a2 : mapping.WorkflowId) != null ? _b2 : mapping.workflowStepId) != null ? _c2 : mapping.WorkflowStepId;
17025
17037
  const nodeId = (_d = mapping.hierarchyNodeId) != null ? _d : mapping.HierarchyNodeId;
@@ -17028,6 +17040,7 @@ function Workflow_Step_Hierarchy_Mapping_Main() {
17028
17040
  const stepCode = (_p = (_o = mapping.workflowCode) != null ? _o : mapping.WorkflowCode) != null ? _p : workflowCodeMap[stepId];
17029
17041
  return !query || [
17030
17042
  (_q = mapping.workflowHierarchyNodeMappingId) != null ? _q : mapping.WorkflowHierarchyNodeMappingId,
17043
+ (_r = mapping.workflowTypeName) != null ? _r : mapping.WorkflowTypeName,
17031
17044
  stepId,
17032
17045
  stepName,
17033
17046
  stepCode,
@@ -17114,6 +17127,7 @@ function Workflow_Step_Hierarchy_Mapping_Main() {
17114
17127
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { ref: tableRef, className: "fc:overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("table", { className: "fc:w-full fc:text-sm", children: [
17115
17128
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("tr", { className: "fc:bg-slate-100 fc:text-slate-600", children: [
17116
17129
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("th", { className: "fc:p-3 fc:text-left", children: "#" }),
17130
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("th", { className: "fc:p-3 fc:text-left", children: "Workflow Type" }),
17117
17131
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("th", { className: "fc:p-3 fc:text-left", children: "Workflow Name" }),
17118
17132
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("th", { className: "fc:p-3 fc:text-left", children: "Workflow Code" }),
17119
17133
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("th", { className: "fc:p-3 fc:text-left", children: "Hierarchy Node Name" }),
@@ -17123,19 +17137,19 @@ function Workflow_Step_Hierarchy_Mapping_Main() {
17123
17137
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("tbody", { children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
17124
17138
  "td",
17125
17139
  {
17126
- colSpan: 6,
17140
+ colSpan: 7,
17127
17141
  className: "fc:p-8 fc:text-center fc:text-slate-400",
17128
17142
  children: "Loading mappings..."
17129
17143
  }
17130
17144
  ) }) : visibleMappings.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
17131
17145
  "td",
17132
17146
  {
17133
- colSpan: 6,
17147
+ colSpan: 7,
17134
17148
  className: "fc:p-8 fc:text-center fc:text-slate-400",
17135
17149
  children: "No workflow step hierarchy mappings found."
17136
17150
  }
17137
17151
  ) }) : visibleMappings.map((mapping, index) => {
17138
- var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
17152
+ var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
17139
17153
  const mappingId = getMappingId(mapping);
17140
17154
  const stepId = (_c2 = (_b2 = (_a2 = mapping.workflowId) != null ? _a2 : mapping.WorkflowId) != null ? _b2 : mapping.workflowStepId) != null ? _c2 : mapping.WorkflowStepId;
17141
17155
  const nodeId = (_d = mapping.hierarchyNodeId) != null ? _d : mapping.HierarchyNodeId;
@@ -17149,6 +17163,7 @@ function Workflow_Step_Hierarchy_Mapping_Main() {
17149
17163
  className: "fc:border-t fc:border-slate-100 hover:fc:bg-slate-50",
17150
17164
  children: [
17151
17165
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("td", { className: "fc:p-3", children: (safePage - 1) * pageSize + index + 1 }),
17166
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("td", { className: "fc:p-3", children: (_v = (_u = mapping.workflowTypeName) != null ? _u : mapping.WorkflowTypeName) != null ? _v : "-" }),
17152
17167
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("td", { className: "fc:p-3", children: stepDisplayName }),
17153
17168
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("td", { className: "fc:p-3", children: stepCodeDisplayName }),
17154
17169
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("td", { className: "fc:p-3", children: nodeDisplayName }),
@@ -18800,7 +18815,9 @@ function AddStatusModal({
18800
18815
  isOpen,
18801
18816
  onClose,
18802
18817
  onSave,
18803
- modules = []
18818
+ modules = [],
18819
+ actionCodes = [],
18820
+ isLoadingActionCodes = false
18804
18821
  }) {
18805
18822
  const [formData, setFormData] = (0, import_react94.useState)(INITIAL_FORM4);
18806
18823
  const [errors, setErrors] = (0, import_react94.useState)({});
@@ -18848,9 +18865,6 @@ function AddStatusModal({
18848
18865
  if (!formData.moduleId) {
18849
18866
  errs.moduleId = "Module is required.";
18850
18867
  }
18851
- if (!formData.statusName.trim()) {
18852
- errs.statusName = "Status Name is required.";
18853
- }
18854
18868
  if (!formData.statusCode.trim()) {
18855
18869
  errs.statusCode = "Status Code is required.";
18856
18870
  }
@@ -18863,7 +18877,7 @@ function AddStatusModal({
18863
18877
  if (!validate()) return;
18864
18878
  const payload = {
18865
18879
  moduleId: Number(formData.moduleId),
18866
- statusName: formData.statusName.trim(),
18880
+ statusName: formData.statusCode.trim().toUpperCase(),
18867
18881
  statusCode: formData.statusCode.trim().toUpperCase(),
18868
18882
  description: formData.description.trim(),
18869
18883
  createdBy: "System"
@@ -18963,15 +18977,21 @@ function AddStatusModal({
18963
18977
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "fc:text-red-500", children: "*" })
18964
18978
  ] }),
18965
18979
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "fc:relative", children: [
18966
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
18967
- "input",
18980
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
18981
+ "select",
18968
18982
  {
18969
- type: "text",
18970
18983
  name: "statusCode",
18971
18984
  value: formData.statusCode,
18972
18985
  onChange: handleChange,
18973
- placeholder: "e.g. ST_01, COMPLETED",
18974
- className: `${inputCls(errors.statusCode)} uppercase`
18986
+ disabled: isLoadingActionCodes,
18987
+ className: `${inputCls(errors.statusCode)} fc:bg-white disabled:fc:opacity-60`,
18988
+ children: [
18989
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("option", { value: "", children: isLoadingActionCodes ? "Loading action codes..." : "Select an action code" }),
18990
+ actionCodes.map((action) => {
18991
+ var _a;
18992
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("option", { value: action.name, children: action.name }, (_a = action.value) != null ? _a : action.name);
18993
+ })
18994
+ ]
18975
18995
  }
18976
18996
  ),
18977
18997
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("svg", { className: "fc:w-4 fc:h-4 fc:absolute fc:left-3 fc:top-3 fc:text-slate-400 fc:pointer-events-none", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" }) })
@@ -18979,27 +18999,6 @@ function AddStatusModal({
18979
18999
  errors.statusCode && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "fc:text-[11px] fc:text-red-500 fc:mt-1", children: errors.statusCode })
18980
19000
  ] })
18981
19001
  ] }),
18982
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { children: [
18983
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("label", { className: "fc:block fc:text-[11px] fc:font-bold fc:text-slate-700 fc:mb-1", children: [
18984
- "Status Name ",
18985
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "fc:text-red-500", children: "*" })
18986
- ] }),
18987
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "fc:relative", children: [
18988
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
18989
- "input",
18990
- {
18991
- type: "text",
18992
- name: "statusName",
18993
- value: formData.statusName,
18994
- onChange: handleChange,
18995
- placeholder: "Enter status name (e.g. In Progress, Completed)",
18996
- className: inputCls(errors.statusName)
18997
- }
18998
- ),
18999
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("svg", { className: "fc:w-4 fc:h-4 fc:absolute fc:left-3 fc:top-3 fc:text-slate-400 fc:pointer-events-none", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" }) })
19000
- ] }),
19001
- errors.statusName && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "fc:text-[11px] fc:text-red-500 fc:mt-1", children: errors.statusName })
19002
- ] }),
19003
19002
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { children: [
19004
19003
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("label", { className: "fc:block fc:text-[11px] fc:font-bold fc:text-slate-700 fc:mb-1", children: "Description" }),
19005
19004
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "fc:relative", children: [
@@ -19075,6 +19074,8 @@ function EditStatusModal({
19075
19074
  onSave,
19076
19075
  selectedData,
19077
19076
  modules = [],
19077
+ actionCodes = [],
19078
+ isLoadingActionCodes = false,
19078
19079
  isFetchingById = false
19079
19080
  }) {
19080
19081
  const [formData, setFormData] = (0, import_react95.useState)(() => getInitialFormData3(selectedData));
@@ -19131,9 +19132,6 @@ function EditStatusModal({
19131
19132
  if (!formData.moduleId) {
19132
19133
  errs.moduleId = "Module is required.";
19133
19134
  }
19134
- if (!String(formData.statusName).trim()) {
19135
- errs.statusName = "Status Name is required.";
19136
- }
19137
19135
  if (!String(formData.statusCode).trim()) {
19138
19136
  errs.statusCode = "Status Code is required.";
19139
19137
  }
@@ -19147,7 +19145,7 @@ function EditStatusModal({
19147
19145
  const payload = {
19148
19146
  statusId: Number(formData.statusId) || 0,
19149
19147
  moduleId: Number(formData.moduleId) || 0,
19150
- statusName: String(formData.statusName).trim(),
19148
+ statusName: String(formData.statusCode).trim().toUpperCase(),
19151
19149
  statusCode: String(formData.statusCode).trim().toUpperCase(),
19152
19150
  description: String(formData.description).trim(),
19153
19151
  isActive: Boolean(formData.isActive),
@@ -19253,15 +19251,22 @@ function EditStatusModal({
19253
19251
  /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "fc:text-red-500", children: "*" })
19254
19252
  ] }),
19255
19253
  /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "fc:relative", children: [
19256
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
19257
- "input",
19254
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
19255
+ "select",
19258
19256
  {
19259
- type: "text",
19260
19257
  name: "statusCode",
19261
19258
  value: formData.statusCode,
19262
19259
  onChange: handleChange,
19263
- placeholder: "e.g. ST_01, COMPLETED",
19264
- className: `${inputCls(errors.statusCode)} uppercase`
19260
+ disabled: true,
19261
+ className: `${inputCls(errors.statusCode)} fc:bg-white disabled:fc:opacity-60`,
19262
+ children: [
19263
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("option", { value: "", children: isLoadingActionCodes ? "Loading action codes..." : "Select an action code" }),
19264
+ formData.statusCode && !actionCodes.some((action) => action.name.toUpperCase() === String(formData.statusCode).toUpperCase()) && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("option", { value: formData.statusCode, children: formData.statusCode }),
19265
+ actionCodes.map((action) => {
19266
+ var _a;
19267
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("option", { value: action.name, children: action.name }, (_a = action.value) != null ? _a : action.name);
19268
+ })
19269
+ ]
19265
19270
  }
19266
19271
  ),
19267
19272
  /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("svg", { className: "fc:w-4 fc:h-4 fc:absolute fc:left-3 fc:top-3 fc:text-slate-400 fc:pointer-events-none", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" }) })
@@ -19269,45 +19274,7 @@ function EditStatusModal({
19269
19274
  errors.statusCode && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "fc:text-[11px] fc:text-red-500 fc:mt-1", children: errors.statusCode })
19270
19275
  ] })
19271
19276
  ] }),
19272
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "fc:grid fc:grid-cols-2 md:fc:grid-cols-2 fc:gap-3.5", children: [
19273
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { children: [
19274
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("label", { className: "fc:block fc:text-[11px] fc:font-bold fc:text-slate-700 fc:mb-1", children: [
19275
- "Status Name ",
19276
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "fc:text-red-500", children: "*" })
19277
- ] }),
19278
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "fc:relative", children: [
19279
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
19280
- "input",
19281
- {
19282
- type: "text",
19283
- name: "statusName",
19284
- value: formData.statusName,
19285
- onChange: handleChange,
19286
- placeholder: "Enter status name",
19287
- className: inputCls(errors.statusName)
19288
- }
19289
- ),
19290
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("svg", { className: "fc:w-4 fc:h-4 fc:absolute fc:left-3 fc:top-3 fc:text-slate-400 fc:pointer-events-none", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" }) })
19291
- ] }),
19292
- errors.statusName && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "fc:text-[11px] fc:text-red-500 fc:mt-1", children: errors.statusName })
19293
- ] }),
19294
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { children: [
19295
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("label", { className: "fc:block fc:text-[11px] fc:font-bold fc:text-slate-700 fc:mb-1", children: "Status ID" }),
19296
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "fc:relative", children: [
19297
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
19298
- "input",
19299
- {
19300
- type: "text",
19301
- name: "statusId",
19302
- value: formData.statusId,
19303
- disabled: true,
19304
- className: "fc:w-full fc:py-2.5 fc:px-3 fc:pl-9 fc:border fc:border-slate-200 fc:rounded-xl fc:text-xs fc:bg-slate-100 fc:text-slate-500 fc:cursor-not-allowed"
19305
- }
19306
- ),
19307
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("svg", { className: "fc:w-4 fc:h-4 fc:absolute fc:left-3 fc:top-3 fc:text-slate-400 fc:pointer-events-none", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M7 20l4-16m2 16l4-16M6 9h14M4 15h14" }) })
19308
- ] })
19309
- ] })
19310
- ] }),
19277
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "fc:grid fc:grid-cols-2 md:fc:grid-cols-2 fc:gap-3.5" }),
19311
19278
  /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { children: [
19312
19279
  /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("label", { className: "fc:block fc:text-[11px] fc:font-bold fc:text-slate-700 fc:mb-1", children: "Description" }),
19313
19280
  /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "fc:relative", children: [
@@ -19421,7 +19388,8 @@ var DEFAULT_ENDPOINTS2 = {
19421
19388
  update: "/api/flowcore/Status/Update",
19422
19389
  getList: "/api/flowcore/Status/GetList",
19423
19390
  getById: "/api/flowcore/Status/GetById",
19424
- moduleList: "/api/flowcore/Module/GetList"
19391
+ moduleList: "/api/flowcore/Module/GetList",
19392
+ actionCodeList: "/api/flowcore/WorkflowExecution/GetActionCodeList"
19425
19393
  };
19426
19394
  function StatusMain() {
19427
19395
  const tableRef = (0, import_react96.useRef)(null);
@@ -19429,6 +19397,9 @@ function StatusMain() {
19429
19397
  const [isLoading, setIsLoading] = (0, import_react96.useState)(false);
19430
19398
  const [apiData, setApiData] = (0, import_react96.useState)([]);
19431
19399
  const [modules, setModules] = (0, import_react96.useState)([]);
19400
+ const [actionCodes, setActionCodes] = (0, import_react96.useState)([]);
19401
+ const [isLoadingActionCodes, setIsLoadingActionCodes] = (0, import_react96.useState)(false);
19402
+ const [hasLoadedActionCodes, setHasLoadedActionCodes] = (0, import_react96.useState)(false);
19432
19403
  const [selectedModuleId, setSelectedModuleId] = (0, import_react96.useState)("");
19433
19404
  const [pageSize, setPageSize] = (0, import_react96.useState)(5);
19434
19405
  const [searchQuery, setSearchQuery] = (0, import_react96.useState)("");
@@ -19466,9 +19437,50 @@ function StatusMain() {
19466
19437
  return DEFAULT_ENDPOINTS2.moduleList;
19467
19438
  }
19468
19439
  };
19440
+ const getActionCodeListEndpoint = () => {
19441
+ var _a, _b;
19442
+ try {
19443
+ const flowCore = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore;
19444
+ return ((_b = flowCore == null ? void 0 : flowCore.inbox) == null ? void 0 : _b.GetPermisiionLabelWithCodeAll) || DEFAULT_ENDPOINTS2.actionCodeList;
19445
+ } catch (e) {
19446
+ return DEFAULT_ENDPOINTS2.actionCodeList;
19447
+ }
19448
+ };
19469
19449
  const handleRefresh = () => {
19470
19450
  setRefreshKey((prev) => prev + 1);
19471
19451
  };
19452
+ const handleOpenAdd = async () => {
19453
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
19454
+ setIsAddOpen(true);
19455
+ if (hasLoadedActionCodes || isLoadingActionCodes) return;
19456
+ try {
19457
+ setIsLoadingActionCodes(true);
19458
+ let endpoint3 = getActionCodeListEndpoint();
19459
+ if (typeof endpoint3 === "function") endpoint3 = endpoint3();
19460
+ const response = await getApiService().get(endpoint3);
19461
+ 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;
19462
+ const rows = Array.isArray(value) ? value : (_g = (_f = value == null ? void 0 : value.items) != null ? _f : value == null ? void 0 : value.records) != null ? _g : [];
19463
+ setActionCodes(rows.filter((item) => {
19464
+ var _a2;
19465
+ return (_a2 = item == null ? void 0 : item.name) != null ? _a2 : item == null ? void 0 : item.Name;
19466
+ }).map((item) => {
19467
+ var _a2, _b2;
19468
+ return {
19469
+ value: (_a2 = item.value) != null ? _a2 : item.Value,
19470
+ name: String((_b2 = item.name) != null ? _b2 : item.Name)
19471
+ };
19472
+ }));
19473
+ setHasLoadedActionCodes(true);
19474
+ } catch (error) {
19475
+ await import_sweetalert229.default.fire(
19476
+ "Error",
19477
+ ((_i = (_h = error == null ? void 0 : error.response) == null ? void 0 : _h.data) == null ? void 0 : _i.message) || (error == null ? void 0 : error.message) || "Unable to load action codes.",
19478
+ "error"
19479
+ );
19480
+ } finally {
19481
+ setIsLoadingActionCodes(false);
19482
+ }
19483
+ };
19472
19484
  (0, import_react96.useEffect)(() => {
19473
19485
  let isMounted = true;
19474
19486
  (async () => {
@@ -19683,7 +19695,7 @@ function StatusMain() {
19683
19695
  { label: "Status", href: "/status" }
19684
19696
  ],
19685
19697
  buttonText: "Add Status",
19686
- onButtonClick: () => setIsAddOpen(true)
19698
+ onButtonClick: handleOpenAdd
19687
19699
  }
19688
19700
  ),
19689
19701
  /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "fc:bg-white fc:rounded-3xl fc:shadow-sm fc:border fc:border-slate-100 fc:p-6 fc:flex fc:flex-col fc:gap-6", children: [
@@ -19816,7 +19828,9 @@ function StatusMain() {
19816
19828
  isOpen: isAddOpen,
19817
19829
  onClose: () => setIsAddOpen(false),
19818
19830
  onSave: handleCreate,
19819
- modules
19831
+ modules,
19832
+ actionCodes,
19833
+ isLoadingActionCodes
19820
19834
  }
19821
19835
  ),
19822
19836
  /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
@@ -19829,6 +19843,8 @@ function StatusMain() {
19829
19843
  },
19830
19844
  selectedData: selectedItem,
19831
19845
  modules,
19846
+ actionCodes,
19847
+ isLoadingActionCodes,
19832
19848
  onSave: handleUpdate
19833
19849
  }
19834
19850
  )
@@ -19836,9 +19852,9 @@ function StatusMain() {
19836
19852
  }
19837
19853
 
19838
19854
  // src/components/inbox/InboxMain.jsx
19839
- var import_react125 = __toESM(require("react"));
19855
+ var import_react126 = __toESM(require("react"));
19840
19856
  var import_sweetalert231 = __toESM(require("sweetalert2"));
19841
- var import_react126 = require("@remixicon/react");
19857
+ var import_react127 = require("@remixicon/react");
19842
19858
 
19843
19859
  // src/components/inbox/PoolConfirmationModal.jsx
19844
19860
  var import_react97 = __toESM(require("react"));
@@ -20726,7 +20742,7 @@ function NotificationPopover({
20726
20742
  className: `fc:relative fc:h-9 fc:w-9 fc:flex fc:items-center fc:justify-center fc:border fc:rounded-xl fc:transition-all ${isOpen ? "fc:border-blue-400 fc:bg-blue-50 fc:text-blue-600 fc:shadow-sm" : "fc:border-slate-200 fc:bg-white hover:fc:bg-slate-50 fc:text-slate-600 fc:shadow-sm"}`,
20727
20743
  children: [
20728
20744
  isOpen ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react104.RiNotification3Fill, { size: 17 }) : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react104.RiNotification3Line, { size: 17 }),
20729
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "fc:absolute fc:-top-1.5 fc:-right-1.5 fc:min-w-[18px] fc:h-[18px] fc:px-1 fc:flex fc:items-center fc:justify-center fc:bg-rose-500 fc:text-white fc:text-[10px] fc:font-extrabold fc:rounded-full fc:shadow-sm fc:border-2 fc:border-white fc:leading-none", children: unreadCount > 0 ? unreadCount > 99 ? "99+" : unreadCount : 6 })
20745
+ unreadCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "fc:absolute fc:-top-1.5 fc:-right-1.5 fc:min-w-[18px] fc:h-[18px] fc:px-1 fc:flex fc:items-center fc:justify-center fc:bg-rose-500 fc:text-white fc:text-[10px] fc:font-extrabold fc:rounded-full fc:shadow-sm fc:border-2 fc:border-white fc:leading-none", children: unreadCount > 99 ? "99+" : unreadCount })
20730
20746
  ]
20731
20747
  }
20732
20748
  ),
@@ -20934,12 +20950,120 @@ function NotificationPopover({
20934
20950
  }
20935
20951
 
20936
20952
  // src/components/inbox/ReviewApplication.jsx
20937
- var import_react123 = __toESM(require("react"));
20938
- var import_react124 = require("@remixicon/react");
20953
+ var import_react124 = __toESM(require("react"));
20954
+ var import_react125 = require("@remixicon/react");
20955
+
20956
+ // src/components/inbox/ReviewHeaderBar.jsx
20957
+ var import_react106 = __toESM(require("react"));
20958
+ var import_react107 = require("@remixicon/react");
20959
+
20960
+ // src/components/Service/UserProfileService.js
20961
+ var import_react105 = require("react");
20962
+ init_ApiEndpointsProvider();
20963
+ init_ApiServicepackage();
20964
+ var PROFILE_STORAGE_KEY = "FLOWCORE_USER_PROFILE";
20965
+ var memoryCachedProfile = null;
20966
+ var inflightPromise = null;
20967
+ var getProfileEndpoint = () => {
20968
+ var _a, _b, _c;
20969
+ try {
20970
+ const endpoints = getApiEndpoints();
20971
+ if (endpoints == null ? void 0 : endpoints.ProfileApi) return endpoints.ProfileApi;
20972
+ if (endpoints == null ? void 0 : endpoints.profileApi) return endpoints.profileApi;
20973
+ if ((_a = endpoints == null ? void 0 : endpoints.flowCore) == null ? void 0 : _a.profileApi) return endpoints.flowCore.profileApi;
20974
+ if ((_b = endpoints == null ? void 0 : endpoints.flowCore) == null ? void 0 : _b.ProfileApi) return endpoints.flowCore.ProfileApi;
20975
+ if ((_c = endpoints == null ? void 0 : endpoints.flowCore) == null ? void 0 : _c.getDashboardProfile) return endpoints.flowCore.getDashboardProfile;
20976
+ } catch (err) {
20977
+ }
20978
+ return null;
20979
+ };
20980
+ var extractName = (data) => {
20981
+ if (!data || typeof data !== "object") return "";
20982
+ return data.name || data.Name || data.userName || data.fullName || "";
20983
+ };
20984
+ var fetchUserProfile = async (forceRefresh = false) => {
20985
+ if (!forceRefresh) {
20986
+ if (memoryCachedProfile) {
20987
+ return memoryCachedProfile;
20988
+ }
20989
+ if (typeof window !== "undefined") {
20990
+ try {
20991
+ const stored = sessionStorage.getItem(PROFILE_STORAGE_KEY);
20992
+ if (stored) {
20993
+ memoryCachedProfile = JSON.parse(stored);
20994
+ return memoryCachedProfile;
20995
+ }
20996
+ } catch (e) {
20997
+ }
20998
+ }
20999
+ }
21000
+ if (inflightPromise) {
21001
+ return inflightPromise;
21002
+ }
21003
+ inflightPromise = (async () => {
21004
+ var _a, _b, _c, _d, _e;
21005
+ try {
21006
+ const endpoint3 = getProfileEndpoint();
21007
+ if (!endpoint3) return null;
21008
+ const apiService2 = getApiService();
21009
+ const res = await apiService2.get(endpoint3);
21010
+ const data = (_e = (_d = (_c = (_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data) != null ? _c : (_b = res == null ? void 0 : res.data) == null ? void 0 : _b.result) != null ? _d : res == null ? void 0 : res.data) != null ? _e : res;
21011
+ if (data && typeof data === "object") {
21012
+ memoryCachedProfile = data;
21013
+ if (typeof window !== "undefined") {
21014
+ try {
21015
+ sessionStorage.setItem(PROFILE_STORAGE_KEY, JSON.stringify(data));
21016
+ } catch (e) {
21017
+ }
21018
+ }
21019
+ return data;
21020
+ }
21021
+ return null;
21022
+ } catch (error) {
21023
+ console.warn("Failed to fetch dashboard profile:", error);
21024
+ return null;
21025
+ } finally {
21026
+ inflightPromise = null;
21027
+ }
21028
+ })();
21029
+ return inflightPromise;
21030
+ };
21031
+ var useUserProfile = () => {
21032
+ const [profile, setProfile] = (0, import_react105.useState)(() => {
21033
+ if (memoryCachedProfile) return memoryCachedProfile;
21034
+ if (typeof window !== "undefined") {
21035
+ try {
21036
+ const stored = sessionStorage.getItem(PROFILE_STORAGE_KEY);
21037
+ if (stored) return JSON.parse(stored);
21038
+ } catch (e) {
21039
+ }
21040
+ }
21041
+ return null;
21042
+ });
21043
+ const [userName, setUserName] = (0, import_react105.useState)(() => extractName(profile));
21044
+ (0, import_react105.useEffect)(() => {
21045
+ let isCurrent = true;
21046
+ fetchUserProfile().then((data) => {
21047
+ if (!isCurrent || !data) return;
21048
+ setProfile(data);
21049
+ const name = extractName(data);
21050
+ if (name) {
21051
+ setUserName(name);
21052
+ }
21053
+ });
21054
+ return () => {
21055
+ isCurrent = false;
21056
+ };
21057
+ }, []);
21058
+ const initial = userName ? userName.trim().charAt(0).toUpperCase() : "U";
21059
+ return {
21060
+ profile,
21061
+ userName,
21062
+ initial
21063
+ };
21064
+ };
20939
21065
 
20940
21066
  // src/components/inbox/ReviewHeaderBar.jsx
20941
- var import_react105 = __toESM(require("react"));
20942
- var import_react106 = require("@remixicon/react");
20943
21067
  var import_jsx_runtime101 = require("react/jsx-runtime");
20944
21068
  function ReviewHeaderBar({
20945
21069
  onBackToInbox,
@@ -20947,11 +21071,15 @@ function ReviewHeaderBar({
20947
21071
  activeStepName,
20948
21072
  assignedSteps = [],
20949
21073
  onSelectWorkflowStepId,
20950
- refreshKey
21074
+ refreshKey,
21075
+ userName: propUserName
20951
21076
  }) {
20952
- const [roleDropdownOpen, setRoleDropdownOpen] = (0, import_react105.useState)(false);
20953
- const roleDropdownRef = (0, import_react105.useRef)(null);
20954
- (0, import_react105.useEffect)(() => {
21077
+ const { userName: hookUserName, initial: hookInitial } = useUserProfile();
21078
+ const userName = propUserName || hookUserName;
21079
+ const userInitial = userName ? userName.trim().charAt(0).toUpperCase() : hookInitial;
21080
+ const [roleDropdownOpen, setRoleDropdownOpen] = (0, import_react106.useState)(false);
21081
+ const roleDropdownRef = (0, import_react106.useRef)(null);
21082
+ (0, import_react106.useEffect)(() => {
20955
21083
  const handleOutsideClick = (e) => {
20956
21084
  if (roleDropdownRef.current && !roleDropdownRef.current.contains(e.target)) {
20957
21085
  setRoleDropdownOpen(false);
@@ -20972,12 +21100,12 @@ function ReviewHeaderBar({
20972
21100
  title: "Back to My Files",
20973
21101
  className: "fc:inline-flex fc:items-center fc:gap-1.5 fc:h-8 fc:px-2.5 fc:rounded-lg fc:border fc:border-slate-200 fc:bg-white fc:text-slate-600 hover:fc:bg-slate-50 hover:fc:text-blue-600 fc:transition-colors fc:shrink-0 fc:font-semibold",
20974
21102
  children: [
20975
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react106.RiArrowGoBackLine, { size: 15 }),
21103
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react107.RiArrowGoBackLine, { size: 15 }),
20976
21104
  /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { children: "My Files" })
20977
21105
  ]
20978
21106
  }
20979
21107
  ),
20980
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react106.RiArrowRightSLine, { size: 14, className: "fc:text-slate-400" }),
21108
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react107.RiArrowRightSLine, { size: 14, className: "fc:text-slate-400" }),
20981
21109
  /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "fc:font-bold fc:text-slate-800", children: "Review Application" })
20982
21110
  ] }),
20983
21111
  /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-3", children: [
@@ -20996,12 +21124,12 @@ function ReviewHeaderBar({
20996
21124
  className: "fc:relative fc:flex fc:items-center fc:gap-2.5 fc:bg-slate-50 fc:border fc:border-slate-200 fc:rounded-xl fc:p-1.5 fc:pr-3",
20997
21125
  children: [
20998
21126
  /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "fc:relative fc:shrink-0", children: [
20999
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "fc:w-8 fc:h-8 fc:rounded-full fc:bg-blue-600 fc:text-white fc:font-extrabold fc:text-xs fc:flex fc:items-center fc:justify-center fc:shadow-sm", children: "D" }),
21127
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "fc:w-8 fc:h-8 fc:rounded-full fc:bg-blue-600 fc:text-white fc:font-extrabold fc:text-xs fc:flex fc:items-center fc:justify-center fc:shadow-sm", children: userInitial }),
21000
21128
  /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "fc:absolute fc:-bottom-0.5 fc:-right-0.5 fc:w-2 fc:h-2 fc:bg-emerald-500 fc:border-2 fc:border-white fc:rounded-full" })
21001
21129
  ] }),
21002
21130
  /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "fc:flex fc:flex-col fc:justify-center", children: [
21003
21131
  /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-1.5", children: [
21004
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "fc:text-xs fc:font-extrabold fc:text-slate-800", children: "Dummy" }),
21132
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "fc:text-xs fc:font-extrabold fc:text-slate-800", children: userName || "User" }),
21005
21133
  /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
21006
21134
  "button",
21007
21135
  {
@@ -21012,7 +21140,7 @@ function ReviewHeaderBar({
21012
21140
  className: "fc:inline-flex fc:items-center fc:gap-0.5 fc:rounded fc:border fc:border-blue-200 fc:bg-blue-50 fc:px-1.5 fc:py-0.2 fc:text-[10px] fc:font-bold fc:text-blue-700 hover:fc:bg-blue-100",
21013
21141
  children: [
21014
21142
  activeStepName || "Scruitny",
21015
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react106.RiArrowDownSLine, { size: 11 })
21143
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react107.RiArrowDownSLine, { size: 11 })
21016
21144
  ]
21017
21145
  }
21018
21146
  )
@@ -21075,7 +21203,7 @@ function ReviewHeaderBar({
21075
21203
  type: "button",
21076
21204
  title: "Settings",
21077
21205
  className: "fc:w-8 fc:h-8 fc:flex fc:items-center fc:justify-center fc:rounded-lg fc:border fc:border-slate-200 fc:bg-white hover:fc:bg-slate-50 fc:text-slate-600 fc:transition-colors",
21078
- children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react106.RiSettings4Line, { size: 16 })
21206
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react107.RiSettings4Line, { size: 16 })
21079
21207
  }
21080
21208
  )
21081
21209
  ] })
@@ -21083,8 +21211,8 @@ function ReviewHeaderBar({
21083
21211
  }
21084
21212
 
21085
21213
  // src/components/inbox/FileInfoStrip.jsx
21086
- var import_react107 = __toESM(require("react"));
21087
- var import_react108 = require("@remixicon/react");
21214
+ var import_react108 = __toESM(require("react"));
21215
+ var import_react109 = require("@remixicon/react");
21088
21216
  var import_jsx_runtime102 = require("react/jsx-runtime");
21089
21217
  function FileInfoStrip({
21090
21218
  fileNo,
@@ -21155,7 +21283,7 @@ function FileInfoStrip({
21155
21283
  type: "button",
21156
21284
  className: "fc:inline-flex fc:items-center fc:gap-1.5 fc:px-3 fc:py-1.5 fc:rounded-xl fc:border fc:border-blue-200 fc:bg-white hover:fc:bg-blue-50 fc:text-blue-600 fc:text-xs fc:font-bold fc:shrink-0 fc:shadow-sm fc:transition-colors fc:whitespace-nowrap fc:ml-2",
21157
21285
  children: [
21158
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react108.RiEyeLine, { size: 14 }),
21286
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react109.RiEyeLine, { size: 14 }),
21159
21287
  /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { children: "Preview Form (Read Only)" })
21160
21288
  ]
21161
21289
  }
@@ -21166,8 +21294,8 @@ function FileInfoStrip({
21166
21294
  }
21167
21295
 
21168
21296
  // src/components/inbox/WorkflowStepper.jsx
21169
- var import_react109 = __toESM(require("react"));
21170
- var import_react110 = require("@remixicon/react");
21297
+ var import_react110 = __toESM(require("react"));
21298
+ var import_react111 = require("@remixicon/react");
21171
21299
  var import_jsx_runtime103 = require("react/jsx-runtime");
21172
21300
  function WorkflowStepper({
21173
21301
  workflowSteps,
@@ -21202,7 +21330,7 @@ function WorkflowStepper({
21202
21330
  const markerClass = isComplete ? "fc:border-emerald-600 fc:bg-emerald-600 fc:text-white" : isCurrent ? "fc:border-blue-600 fc:bg-blue-600 fc:text-white fc:ring-4 fc:ring-blue-100" : "fc:border-slate-300 fc:bg-white fc:text-slate-500";
21203
21331
  const labelClass = isComplete ? "fc:font-bold fc:text-emerald-700" : isCurrent ? "fc:font-bold fc:text-blue-600" : "fc:font-medium fc:text-slate-600";
21204
21332
  return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "fc:flex fc:min-w-0 fc:flex-col fc:items-center fc:px-1 fc:text-center", children: [
21205
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: `fc:flex fc:h-8 fc:w-8 fc:items-center fc:justify-center fc:rounded-full fc:border-2 fc:text-xs fc:font-bold ${markerClass}`, children: isComplete ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react110.RiCheckLine, { size: 17 }) : sequence }),
21333
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: `fc:flex fc:h-8 fc:w-8 fc:items-center fc:justify-center fc:rounded-full fc:border-2 fc:text-xs fc:font-bold ${markerClass}`, children: isComplete ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react111.RiCheckLine, { size: 17 }) : sequence }),
21206
21334
  /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("span", { className: `fc:mt-2 fc:max-w-full fc:text-xs ${labelClass}`, children: [
21207
21335
  sequence,
21208
21336
  " ",
@@ -21215,8 +21343,8 @@ function WorkflowStepper({
21215
21343
  }
21216
21344
 
21217
21345
  // src/components/inbox/ReviewTabs.jsx
21218
- var import_react111 = __toESM(require("react"));
21219
- var import_react112 = require("@remixicon/react");
21346
+ var import_react112 = __toESM(require("react"));
21347
+ var import_react113 = require("@remixicon/react");
21220
21348
  var import_jsx_runtime104 = require("react/jsx-runtime");
21221
21349
  function ReviewTabs({ activeTab, setActiveTab }) {
21222
21350
  return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:border-b fc:border-slate-200 fc:px-1 fc:pt-2", children: [
@@ -21228,7 +21356,7 @@ function ReviewTabs({ activeTab, setActiveTab }) {
21228
21356
  onClick: () => setActiveTab("fileDetails"),
21229
21357
  className: `fc:inline-flex fc:items-center fc:gap-2 fc:pb-3 fc:text-sm fc:transition-all fc:border-b-2 ${activeTab === "fileDetails" ? "fc:border-blue-600 fc:text-blue-600 fc:font-bold -fc:mb-[2px]" : "fc:border-transparent fc:text-slate-500 hover:fc:text-slate-800 fc:font-medium"}`,
21230
21358
  children: [
21231
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react112.RiFileTextLine, { size: 16 }),
21359
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react113.RiFileTextLine, { size: 16 }),
21232
21360
  /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { children: "File Details" })
21233
21361
  ]
21234
21362
  }
@@ -21240,7 +21368,7 @@ function ReviewTabs({ activeTab, setActiveTab }) {
21240
21368
  onClick: () => setActiveTab("workflowHistory"),
21241
21369
  className: `fc:inline-flex fc:items-center fc:gap-2 fc:pb-3 fc:text-sm fc:transition-all fc:border-b-2 ${activeTab === "workflowHistory" ? "fc:border-blue-600 fc:text-blue-600 fc:font-bold -fc:mb-[2px]" : "fc:border-transparent fc:text-slate-500 hover:fc:text-slate-800 fc:font-medium"}`,
21242
21370
  children: [
21243
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react112.RiHistoryLine, { size: 16 }),
21371
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react113.RiHistoryLine, { size: 16 }),
21244
21372
  /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { children: "Workflow History" })
21245
21373
  ]
21246
21374
  }
@@ -21252,9 +21380,9 @@ function ReviewTabs({ activeTab, setActiveTab }) {
21252
21380
  type: "button",
21253
21381
  className: "fc:inline-flex fc:items-center fc:gap-1.5 fc:px-3 fc:py-1.5 fc:rounded-lg fc:border fc:border-slate-200 fc:bg-white hover:fc:bg-slate-50 fc:text-xs fc:font-semibold fc:text-slate-700 fc:mb-2",
21254
21382
  children: [
21255
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react112.RiFilterLine, { size: 14, className: "fc:text-slate-400" }),
21383
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react113.RiFilterLine, { size: 14, className: "fc:text-slate-400" }),
21256
21384
  /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { children: "All movements" }),
21257
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react112.RiArrowDownSLine, { size: 14, className: "fc:text-slate-400" })
21385
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react113.RiArrowDownSLine, { size: 14, className: "fc:text-slate-400" })
21258
21386
  ]
21259
21387
  }
21260
21388
  )
@@ -21262,8 +21390,8 @@ function ReviewTabs({ activeTab, setActiveTab }) {
21262
21390
  }
21263
21391
 
21264
21392
  // src/components/inbox/WorkflowHistoryTab.jsx
21265
- var import_react113 = __toESM(require("react"));
21266
- var import_react114 = require("@remixicon/react");
21393
+ var import_react114 = __toESM(require("react"));
21394
+ var import_react115 = require("@remixicon/react");
21267
21395
  var import_jsx_runtime105 = require("react/jsx-runtime");
21268
21396
  function WorkflowHistoryTab({
21269
21397
  fileHistory,
@@ -21299,7 +21427,7 @@ function WorkflowHistoryTab({
21299
21427
  }
21300
21428
  )
21301
21429
  ] }),
21302
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "fc:w-7 fc:h-7 fc:flex fc:items-center fc:justify-center fc:shrink-0", children: item.isCurrent ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react114.RiTimeLine, { size: 19, className: "fc:text-slate-800" }) : item.type === "return" ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "fc:w-6 fc:h-6 fc:rounded-full fc:bg-[#DC2626] fc:text-white fc:flex fc:items-center fc:justify-center fc:shadow-xs", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react114.RiArrowGoBackLine, { size: 13 }) }) : item.type === "submit" || item.type === "resubmit" ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "fc:w-6 fc:h-6 fc:rounded-full fc:bg-[#059669] fc:text-white fc:flex fc:items-center fc:justify-center fc:shadow-xs", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react114.RiSendPlane2Fill, { size: 13 }) }) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "fc:w-6 fc:h-6 fc:rounded-full fc:bg-[#2563EB] fc:text-white fc:flex fc:items-center fc:justify-center fc:shadow-xs", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react114.RiArrowRightLine, { size: 13 }) }) }),
21430
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "fc:w-7 fc:h-7 fc:flex fc:items-center fc:justify-center fc:shrink-0", children: item.isCurrent ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react115.RiTimeLine, { size: 19, className: "fc:text-slate-800" }) : item.type === "return" ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "fc:w-6 fc:h-6 fc:rounded-full fc:bg-[#DC2626] fc:text-white fc:flex fc:items-center fc:justify-center fc:shadow-xs", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react115.RiArrowGoBackLine, { size: 13 }) }) : item.type === "submit" || item.type === "resubmit" ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "fc:w-6 fc:h-6 fc:rounded-full fc:bg-[#059669] fc:text-white fc:flex fc:items-center fc:justify-center fc:shadow-xs", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react115.RiSendPlane2Fill, { size: 13 }) }) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "fc:w-6 fc:h-6 fc:rounded-full fc:bg-[#2563EB] fc:text-white fc:flex fc:items-center fc:justify-center fc:shadow-xs", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react115.RiArrowRightLine, { size: 13 }) }) }),
21303
21431
  /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "fc:w-[155px] fc:text-xs fc:text-slate-600 fc:shrink-0", children: item.date }),
21304
21432
  /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "fc:w-[145px] fc:shrink-0", children: [
21305
21433
  /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "fc:text-xs fc:font-bold fc:text-slate-900 fc:block fc:leading-tight", children: item.userName }),
@@ -21321,7 +21449,7 @@ function WorkflowHistoryTab({
21321
21449
  onClick: () => onViewDetails(item),
21322
21450
  className: "fc:inline-flex fc:items-center fc:gap-1.5 fc:text-xs fc:font-semibold fc:text-blue-600 hover:fc:text-blue-700 fc:shrink-0 fc:cursor-pointer",
21323
21451
  children: [
21324
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react114.RiEyeLine, { size: 15 }),
21452
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react115.RiEyeLine, { size: 15 }),
21325
21453
  /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { children: "View details" })
21326
21454
  ]
21327
21455
  }
@@ -21336,85 +21464,191 @@ function WorkflowHistoryTab({
21336
21464
  }
21337
21465
 
21338
21466
  // src/components/inbox/FileDetailsTab.jsx
21339
- var import_react117 = __toESM(require("react"));
21340
- var import_react118 = require("@remixicon/react");
21467
+ var import_react118 = __toESM(require("react"));
21468
+ var import_react119 = require("@remixicon/react");
21341
21469
 
21342
21470
  // src/components/inbox/DynamicFormDisplay.jsx
21343
- var import_react115 = __toESM(require("react"));
21344
- var import_react116 = require("@remixicon/react");
21345
- var import_jsx_runtime106 = require("react/jsx-runtime");
21346
- var STATIC_FORM_JSON = {
21347
- formId: "election-petition",
21348
- formName: "Election Petition Application",
21349
- schemaVersion: "1.0",
21350
- layout: { columns: 2, collapsibleSections: true, defaultExpanded: true },
21351
- sections: [
21352
- {
21353
- id: "basic-information",
21354
- title: "Basic Information",
21355
- type: "section",
21356
- fields: [
21357
- { id: "applicant-name", label: "Applicant Name", type: "text", value: "Mohit Sharma", colSpan: 1 },
21358
- { id: "mobile-number", label: "Mobile Number", type: "tel", value: "9876543210", colSpan: 1 },
21359
- { id: "email-address", label: "Email Address", type: "email", value: "mohit.sharma@example.com", colSpan: 1 },
21360
- { id: "address", label: "Address", type: "text", value: "Sector 22, Chandigarh, 160022", colSpan: 1 }
21361
- ]
21362
- },
21363
- {
21364
- id: "petition-details",
21365
- title: "Petition Details",
21366
- type: "section",
21367
- fields: [
21368
- { id: "category", label: "Category", type: "text", value: "General", colSpan: 1 },
21369
- { id: "payment-challan-number", label: "Payment Challan Number", type: "text", value: "CHN2026001234", colSpan: 1 },
21370
- { id: "deposit-date", label: "Deposit Date", type: "date", value: "2026-09-28", displayValue: "28 Sep 2026", colSpan: 1 },
21371
- { id: "election-type", label: "Election Type", type: "text", value: "Municipal Election", colSpan: 1 },
21372
- { id: "ward-number", label: "Ward Number", type: "number", value: 22, colSpan: 1 },
21373
- { id: "description", label: "Description", type: "textarea", value: "Election petition for ward no. 22", colSpan: 2 },
21374
- { id: "declaration-accepted", label: "Applicant Declaration Accepted", type: "boolean", value: true, displayValue: "Yes", colSpan: 2 }
21375
- ]
21376
- },
21377
- {
21378
- id: "beneficiaries",
21379
- title: "Beneficiaries",
21380
- type: "table",
21381
- columns: [
21382
- { id: "col-1", key: "name", label: "Name", type: "text" },
21383
- { id: "col-2", key: "gender", label: "Gender", type: "text" },
21384
- { id: "col-3", key: "date-of-birth", label: "Date of Birth", type: "date" },
21385
- { id: "col-4", key: "is-active", label: "Is Active", type: "boolean" }
21386
- ],
21387
- rows: [
21388
- { id: "row-1", values: ["Ramesh Kumar", "Male", "1985-01-12", true] },
21389
- { id: "row-2", values: ["Priya Devi", "Female", "1990-03-04", true] },
21390
- { id: "row-3", values: ["Amit Singh", "Male", "1988-08-21", false] }
21391
- ]
21392
- },
21393
- {
21394
- id: "attachments",
21395
- title: "Applicant Attachments",
21396
- type: "attachments",
21397
- files: [
21398
- { id: "file-1", label: "Fee Challan File", fileName: "fee_challan_1234.pdf", contentType: "application/pdf", sizeBytes: 250880, downloadUrl: "/api/applications/TASK-31/files/file-1" },
21399
- { id: "file-2", label: "Supporting Document", fileName: "petition_document.pdf", contentType: "application/pdf", sizeBytes: 1258291, downloadUrl: "/api/applications/TASK-31/files/file-2" }
21400
- ]
21401
- },
21402
- {
21403
- id: "additional-information",
21404
- title: "Additional Information",
21405
- type: "section",
21406
- fields: [
21407
- { id: "additional-comments", label: "Additional Comments", type: "textarea", value: "Please find the attached documents for election petition.", colSpan: 2 }
21408
- ]
21409
- }
21410
- ]
21411
- };
21412
- var formatSize = (bytes) => {
21413
- if (bytes >= 1048576) return `${(bytes / 1048576).toFixed(1)} MB`;
21414
- if (bytes >= 1024) return `${Math.round(bytes / 1024)} KB`;
21415
- return `${bytes} B`;
21471
+ var import_react116 = __toESM(require("react"));
21472
+ var import_react117 = require("@remixicon/react");
21473
+ init_ApiServicepackage();
21474
+
21475
+ // src/components/inbox/reviewHelpers.js
21476
+ init_ApiEndpointsProvider();
21477
+ var getAvailableActions2 = (response) => {
21478
+ var _a, _b, _c, _d, _e, _f, _g;
21479
+ 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;
21480
+ const rows = Array.isArray(value) ? value : (_g = (_f = value == null ? void 0 : value.items) != null ? _f : value == null ? void 0 : value.records) != null ? _g : [];
21481
+ return rows.map((action) => {
21482
+ var _a2, _b2, _c2, _d2, _e2, _f2;
21483
+ return {
21484
+ label: (_d2 = (_c2 = (_b2 = (_a2 = action.label) != null ? _a2 : action.Label) != null ? _b2 : action.actionName) != null ? _c2 : action.ActionName) != null ? _d2 : "",
21485
+ actionCode: (_f2 = (_e2 = action.actionCode) != null ? _e2 : action.ActionCode) != null ? _f2 : ""
21486
+ };
21487
+ }).filter((action) => action.label && action.actionCode);
21416
21488
  };
21417
- var FieldCard = ({ field }) => {
21489
+ var getWorkflowStepsStatusEndpoint = () => {
21490
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
21491
+ const flowCore = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) != null ? _b : {};
21492
+ const endpoint3 = (_k = (_j = (_i = (_g = (_e = (_c = flowCore.getWorkflowStepsBarStatus) == null ? void 0 : _c.getStatus) != null ? _e : (_d = flowCore.workflowStepsBarStatus) == null ? void 0 : _d.getStatus) != null ? _g : (_f = flowCore.GetWorkflowStepsBarStatus) == null ? void 0 : _f.GetStatus) != null ? _i : (_h = flowCore.GetWorkflowStepsBarStatus) == null ? void 0 : _h.getStatus) != null ? _j : flowCore.GetWorkflowStepsBarStatus) != null ? _k : flowCore.getWorkflowStepsBarStatus;
21493
+ if (!endpoint3) throw new Error("Workflow steps bar status endpoint is not configured.");
21494
+ return endpoint3;
21495
+ };
21496
+ var getWorkflowSteps = (response) => {
21497
+ var _a, _b, _c, _d, _e, _f, _g;
21498
+ 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;
21499
+ const steps = (_g = (_f = value == null ? void 0 : value.steps) != null ? _f : value == null ? void 0 : value.Steps) != null ? _g : [];
21500
+ return Array.isArray(steps) ? [...steps].sort((first, second) => {
21501
+ var _a2, _b2, _c2, _d2;
21502
+ return Number((_b2 = (_a2 = first.sequenceNo) != null ? _a2 : first.SequenceNo) != null ? _b2 : 0) - Number((_d2 = (_c2 = second.sequenceNo) != null ? _c2 : second.SequenceNo) != null ? _d2 : 0);
21503
+ }) : [];
21504
+ };
21505
+ var getFileHistoryEndpoint = () => {
21506
+ var _a, _b, _c, _d, _e;
21507
+ const flowCore = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) != null ? _b : {};
21508
+ const configured = (_c = flowCore.getFileHistory) != null ? _c : flowCore.GetFileHistory;
21509
+ const endpoint3 = (_e = (_d = configured == null ? void 0 : configured.getFileHistory) != null ? _d : configured == null ? void 0 : configured.GetFileHistory) != null ? _e : configured;
21510
+ if (!endpoint3) throw new Error("Get File History endpoint is not configured.");
21511
+ return endpoint3;
21512
+ };
21513
+ var getDocumentHistoryEndpoint = () => {
21514
+ var _a, _b, _c, _d, _e;
21515
+ const flowCore = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) != null ? _b : {};
21516
+ const configured = (_c = flowCore.getDocumentAndWorkFlow) != null ? _c : flowCore.GetDocumentAndWorkFlow;
21517
+ const endpoint3 = (_e = (_d = configured == null ? void 0 : configured.getDocumentHistoryByHistoryId) != null ? _d : configured == null ? void 0 : configured.GetDocumentHistoryByHistoryId) != null ? _e : configured;
21518
+ if (!endpoint3) throw new Error("Document history details endpoint is not configured.");
21519
+ return endpoint3;
21520
+ };
21521
+ var getApplicantFormPreviewEndpoint = () => {
21522
+ var _a, _b;
21523
+ const endpoint3 = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) == null ? void 0 : _b.applicantFormPreview;
21524
+ if (!endpoint3) throw new Error("Applicant form preview endpoint is not configured.");
21525
+ return endpoint3;
21526
+ };
21527
+ var getConfigValue = (source, key) => {
21528
+ if (!source || typeof source !== "object") return void 0;
21529
+ const matchingKey = Object.keys(source).find((candidate) => candidate.toLowerCase() === key.toLowerCase());
21530
+ return matchingKey ? source[matchingKey] : void 0;
21531
+ };
21532
+ var findConfigEntry = (source, key, path = [], visited = /* @__PURE__ */ new WeakSet()) => {
21533
+ if (!source || typeof source !== "object" || visited.has(source)) return null;
21534
+ visited.add(source);
21535
+ const entries = Object.entries(source);
21536
+ const matchingEntry = entries.find(([candidate]) => candidate.toLowerCase() === key.toLowerCase());
21537
+ if (matchingEntry) return { value: matchingEntry[1], path: [...path, matchingEntry[0]] };
21538
+ for (const [candidate, value] of entries) {
21539
+ const result = findConfigEntry(value, key, [...path, candidate], visited);
21540
+ if (result) return result;
21541
+ }
21542
+ return null;
21543
+ };
21544
+ var getStepDocumentsEndpoint = () => {
21545
+ var _a, _b, _c;
21546
+ const suppliedEndpoints = getApiEndpoints();
21547
+ const root = (_a = getConfigValue(suppliedEndpoints, "apiEndpoints")) != null ? _a : suppliedEndpoints;
21548
+ const flowCore = (_b = getConfigValue(root, "flowCore")) != null ? _b : root;
21549
+ const inbox = getConfigValue(flowCore, "inbox");
21550
+ const documentConfiguration = getConfigValue(flowCore, "documentConfiguration");
21551
+ const configuredEndpoint = (_c = getConfigValue(inbox, "getDocumentsByWorkFlowStepId")) != null ? _c : getConfigValue(documentConfiguration, "getDocumentsByWorkFlowStepId");
21552
+ const endpoint3 = configuredEndpoint ? { value: configuredEndpoint, path: ["flowCore", "inbox", "getDocumentsByWorkFlowStepId"] } : findConfigEntry(suppliedEndpoints, "getDocumentsByWorkFlowStepId");
21553
+ if (!(endpoint3 == null ? void 0 : endpoint3.value)) {
21554
+ const configKeys = Object.keys(flowCore != null ? flowCore : {}).join(", ") || "none";
21555
+ const inboxKeys = Object.keys(inbox != null ? inbox : {}).join(", ") || "none";
21556
+ throw new Error(`Documents endpoint missing at runtime. flowCore keys: ${configKeys}. inbox keys: ${inboxKeys}.`);
21557
+ }
21558
+ if (typeof endpoint3.value !== "string" && typeof endpoint3.value !== "function") {
21559
+ throw new Error(`Configured document endpoint at ${endpoint3.path.join(".")} must be a URL string or function.`);
21560
+ }
21561
+ return endpoint3.value;
21562
+ };
21563
+ var getUploadDocumentEndpoint = () => {
21564
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
21565
+ const flowCore = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) != null ? _b : {};
21566
+ const execution = (_c = flowCore.workflowExecution) != null ? _c : flowCore.WorkflowExecution;
21567
+ const endpoint3 = (_l = (_j = (_h = (_f = (_d = execution == null ? void 0 : execution.uploadDocument) != null ? _d : execution == null ? void 0 : execution.UploadDocument) != null ? _f : (_e = flowCore.inbox) == null ? void 0 : _e.uploadDocument) != null ? _h : (_g = flowCore.inbox) == null ? void 0 : _g.UploadDocument) != null ? _j : (_i = flowCore.Inbox) == null ? void 0 : _i.uploadDocument) != null ? _l : (_k = flowCore.Inbox) == null ? void 0 : _k.UploadDocument;
21568
+ if (!endpoint3) throw new Error("Workflow document upload endpoint is not configured.");
21569
+ return endpoint3;
21570
+ };
21571
+ var getConfiguredDocuments = (response) => {
21572
+ var _a, _b, _c, _d, _e, _f, _g;
21573
+ 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;
21574
+ const rows = Array.isArray(value) ? value : (_g = (_f = value == null ? void 0 : value.items) != null ? _f : value == null ? void 0 : value.records) != null ? _g : [];
21575
+ return rows.map((document2) => {
21576
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l;
21577
+ return __spreadProps(__spreadValues({}, document2), {
21578
+ documentConfigurationId: Number((_b2 = (_a2 = document2.documentConfigurationId) != null ? _a2 : document2.DocumentConfigurationId) != null ? _b2 : document2.id),
21579
+ documentName: (_d2 = (_c2 = document2.documentName) != null ? _c2 : document2.DocumentName) != null ? _d2 : "Document",
21580
+ allowedExtensions: (_f2 = (_e2 = document2.allowedExtensions) != null ? _e2 : document2.AllowedExtensions) != null ? _f2 : "",
21581
+ maxSizeMB: Number((_h = (_g2 = document2.maxSizeMB) != null ? _g2 : document2.MaxSizeMB) != null ? _h : 0),
21582
+ isMandatory: Boolean((_j = (_i = document2.isMandatory) != null ? _i : document2.IsMandatory) != null ? _j : false),
21583
+ isActive: Boolean((_l = (_k = document2.isActive) != null ? _k : document2.IsActive) != null ? _l : true)
21584
+ });
21585
+ }).filter((document2) => Number.isInteger(document2.documentConfigurationId) && document2.isActive);
21586
+ };
21587
+ var getDocumentAcceptValue = (extensions) => String(extensions != null ? extensions : "").split(/[,;\s]+/).map((extension) => extension.trim().toLowerCase()).filter(Boolean).map((extension) => extension.startsWith(".") ? extension : `.${extension}`).join(",");
21588
+ var getFileHistoryMovements = (response) => {
21589
+ var _a, _b, _c, _d, _e, _f, _g;
21590
+ 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;
21591
+ const movements = (_g = (_f = value == null ? void 0 : value.movements) != null ? _f : value == null ? void 0 : value.Movements) != null ? _g : [];
21592
+ return Array.isArray(movements) ? movements : [];
21593
+ };
21594
+ var formatMovementDate = (value) => {
21595
+ if (!value) return "-";
21596
+ const date = new Date(value);
21597
+ return Number.isNaN(date.getTime()) ? String(value) : date.toLocaleString("en-GB", {
21598
+ day: "2-digit",
21599
+ month: "short",
21600
+ year: "numeric",
21601
+ hour: "2-digit",
21602
+ minute: "2-digit"
21603
+ });
21604
+ };
21605
+ var mapFileHistoryMovement = (movement, index) => {
21606
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
21607
+ const actionCode = String((_d = (_c = (_b = (_a = movement.actionCode) != null ? _a : movement.ActionCode) != null ? _b : movement.actionName) != null ? _c : movement.ActionName) != null ? _d : "Action");
21608
+ const normalizedAction = actionCode.toUpperCase().replace(/[\s-]/g, "_");
21609
+ const isReturn = normalizedAction.includes("RETURN") || normalizedAction === "PULL";
21610
+ const isResubmit = normalizedAction.includes("RESUBMIT");
21611
+ const isSubmit = !isResubmit && normalizedAction.includes("SUBMIT");
21612
+ const status = isReturn ? "Returned to Applicant" : isResubmit ? "Resubmitted" : isSubmit ? "Submitted" : normalizedAction.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (letter) => letter.toUpperCase());
21613
+ const applicantActor = isResubmit || movement.applicantName && !movement.officialName;
21614
+ const userName = (_l = (_k = (_j = (_i = (_h = (_g = (_f = (_e = movement.userregistrationName) != null ? _e : movement.UserRegistrationName) != null ? _f : movement.UserName) != null ? _g : movement.userName) != null ? _h : applicantActor ? movement.applicantName : movement.officialName) != null ? _i : movement.officialName) != null ? _j : movement.applicantName) != null ? _k : movement.performedBy) != null ? _l : "Unknown user";
21615
+ const comments = (_p = (_o = (_n = (_m = movement.officialComment) != null ? _m : movement.applicantComment) != null ? _n : movement.comments) != null ? _o : movement.Comments) != null ? _p : "-";
21616
+ const stepId = (_q = movement.fromWorkflowStepId) != null ? _q : movement.FromWorkflowStepId;
21617
+ const stepName = (_s = (_r = movement.workflowStepName) != null ? _r : movement.WorkflowStepName) != null ? _s : "";
21618
+ return {
21619
+ id: (_u = (_t = movement.movementHistoryId) != null ? _t : movement.MovementHistoryId) != null ? _u : index + 1,
21620
+ type: isReturn ? "return" : isSubmit ? "submit" : isResubmit ? "resubmit" : "forward",
21621
+ date: formatMovementDate((_v = movement.movedOn) != null ? _v : movement.MovedOn),
21622
+ userName,
21623
+ userRole: applicantActor ? "Applicant" : "Official",
21624
+ status,
21625
+ stepNum: stepId != null && Number(stepId) > 0 ? `Step ${stepId}` : null,
21626
+ stepName: stepName || null,
21627
+ remarks: comments,
21628
+ isAlert: isReturn,
21629
+ isCurrent: false,
21630
+ title: status,
21631
+ by: `By ${userName}${applicantActor ? " (Applicant)" : ""}`
21632
+ };
21633
+ };
21634
+ var DEFAULT_ACTIONS = [
21635
+ { label: "Approve kro", actionCode: "APPROVE" },
21636
+ { label: "Reject", actionCode: "REJECT" },
21637
+ { label: "Forward", actionCode: "FORWARD" },
21638
+ { label: "Free Forward", actionCode: "FREE_FORWARD" },
21639
+ { label: "Return To Applicant", actionCode: "RETURN_TO_APPLICANT" }
21640
+ ];
21641
+
21642
+ // src/components/inbox/DynamicFormDisplay.jsx
21643
+ var import_jsx_runtime106 = require("react/jsx-runtime");
21644
+ var formatSize = (bytes) => {
21645
+ const size = Number(bytes);
21646
+ if (!Number.isFinite(size)) return "";
21647
+ if (size >= 1048576) return `${(size / 1048576).toFixed(1)} MB`;
21648
+ if (size >= 1024) return `${Math.round(size / 1024)} KB`;
21649
+ return `${size} B`;
21650
+ };
21651
+ var FieldCard = ({ field }) => {
21418
21652
  var _a;
21419
21653
  const label = /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "fc:text-[11px] fc:font-bold fc:text-slate-500 fc:block", children: field.label });
21420
21654
  const span = field.colSpan === 2 ? "fc:col-span-2" : "";
@@ -21439,48 +21673,106 @@ var FieldCard = ({ field }) => {
21439
21673
  ] });
21440
21674
  };
21441
21675
  var TableSection = ({ section }) => {
21676
+ var _a, _b;
21442
21677
  return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "fc:overflow-x-auto fc:rounded-xl fc:border fc:border-slate-200/80 fc-custom-scrollbar", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("table", { className: "fc:min-w-full", children: [
21443
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("thead", { className: "fc:bg-slate-50", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("tr", { children: section.columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("th", { className: "fc:px-3 fc:py-2.5 fc:text-[11px] fc:font-bold fc:text-slate-600 fc:text-left fc:whitespace-nowrap fc:border-b fc:border-slate-200", children: col.label }, col.id)) }) }),
21444
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("tbody", { className: "fc:divide-y fc:divide-slate-100", children: section.rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("tr", { className: "hover:fc:bg-slate-50/50", children: section.columns.map((col, index) => {
21445
- const val = row.values[index];
21446
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("td", { className: "fc:px-3 fc:py-2 fc:text-xs fc:text-slate-700 fc:whitespace-nowrap", children: col.type === "boolean" ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: `fc:inline-flex fc:items-center fc:px-2 fc:py-0.5 fc:rounded-full fc:text-[10px] fc:font-bold ${val ? "fc:bg-emerald-50 fc:text-emerald-600 fc:border fc:border-emerald-200" : "fc:bg-red-50 fc:text-red-500 fc:border fc:border-red-200"}`, children: val ? "Active" : "Inactive" }) : val !== null && val !== void 0 ? String(val) : "-" }, col.id);
21447
- }) }, row.id)) })
21678
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("thead", { className: "fc:bg-slate-50", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("tr", { children: ((_a = section.columns) != null ? _a : []).map((col) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("th", { className: "fc:px-3 fc:py-2.5 fc:text-[11px] fc:font-bold fc:text-slate-600 fc:text-left fc:whitespace-nowrap fc:border-b fc:border-slate-200", children: col.label }, col.id)) }) }),
21679
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("tbody", { className: "fc:divide-y fc:divide-slate-100", children: ((_b = section.rows) != null ? _b : []).map((row) => {
21680
+ var _a2;
21681
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("tr", { className: "hover:fc:bg-slate-50/50", children: ((_a2 = section.columns) != null ? _a2 : []).map((col, index) => {
21682
+ var _a3;
21683
+ const val = (_a3 = row.values) == null ? void 0 : _a3[index];
21684
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("td", { className: "fc:px-3 fc:py-2 fc:text-xs fc:text-slate-700 fc:whitespace-nowrap", children: col.type === "boolean" ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: `fc:inline-flex fc:items-center fc:px-2 fc:py-0.5 fc:rounded-full fc:text-[10px] fc:font-bold ${val ? "fc:bg-emerald-50 fc:text-emerald-600 fc:border fc:border-emerald-200" : "fc:bg-red-50 fc:text-red-500 fc:border fc:border-red-200"}`, children: val ? "Active" : "Inactive" }) : col.key === "profilePath" && val ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("a", { href: String(val), target: "_blank", rel: "noreferrer", className: "fc:text-blue-600 hover:fc:underline", children: "View profile" }) : val !== null && val !== void 0 ? String(val) : "-" }, col.id);
21685
+ }) }, row.id);
21686
+ }) })
21448
21687
  ] }) });
21449
21688
  };
21450
- var AttachmentsSection = ({ section }) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "fc:space-y-3", children: section.files.map((file) => /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:bg-[#F8FAFC] fc:rounded-xl fc:p-3 fc:border fc:border-slate-200/80", children: [
21451
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-3", children: [
21452
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "fc:w-9 fc:h-9 fc:rounded-lg fc:bg-red-100 fc:flex fc:items-center fc:justify-center fc:shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_react116.RiFileTextLine, { size: 18, className: "fc:text-red-500" }) }),
21453
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { children: [
21454
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-800", children: file.label }),
21455
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("span", { className: "fc:block fc:text-[11px] fc:text-slate-500", children: [
21456
- file.fileName,
21457
- " (",
21458
- formatSize(file.sizeBytes),
21459
- ")"
21689
+ var AttachmentsSection = ({ section }) => {
21690
+ var _a;
21691
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "fc:space-y-3", children: ((_a = section.files) != null ? _a : []).map((file) => {
21692
+ const size = formatSize(file.sizeBytes);
21693
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:bg-[#F8FAFC] fc:rounded-xl fc:p-3 fc:border fc:border-slate-200/80", children: [
21694
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-3 fc:min-w-0", children: [
21695
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "fc:w-9 fc:h-9 fc:rounded-lg fc:bg-red-100 fc:flex fc:items-center fc:justify-center fc:shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_react117.RiFileTextLine, { size: 18, className: "fc:text-red-500" }) }),
21696
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "fc:min-w-0", children: [
21697
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-800", children: file.label }),
21698
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("span", { className: "fc:block fc:text-[11px] fc:text-slate-500 fc:break-all", children: [
21699
+ file.fileName,
21700
+ size ? ` (${size})` : ""
21701
+ ] })
21702
+ ] })
21703
+ ] }),
21704
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("a", { href: file.downloadUrl, download: true, className: "fc:inline-flex fc:items-center fc:gap-1.5 fc:text-xs fc:font-semibold fc:text-blue-600 hover:fc:text-blue-700 fc:shrink-0 fc:ml-3", children: [
21705
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_react117.RiDownload2Line, { size: 15 }),
21706
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { children: "Download" })
21460
21707
  ] })
21461
- ] })
21462
- ] }),
21463
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("a", { href: file.downloadUrl, download: true, className: "fc:inline-flex fc:items-center fc:gap-1.5 fc:text-xs fc:font-semibold fc:text-blue-600 hover:fc:text-blue-700 fc:shrink-0", children: [
21464
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_react116.RiDownload2Line, { size: 15 }),
21465
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { children: "Download" })
21466
- ] })
21467
- ] }, file.id)) });
21468
- function DynamicFormDisplay({ maximized = false, onToggleMaximize }) {
21469
- const [activeTab, setActiveTab] = (0, import_react115.useState)(STATIC_FORM_JSON.sections[0].id);
21470
- const [expandedSections, setExpandedSections] = (0, import_react115.useState)(() => {
21471
- const map = {};
21472
- STATIC_FORM_JSON.sections.forEach((s) => {
21473
- map[s.id] = true;
21474
- });
21475
- return map;
21476
- });
21708
+ ] }, file.id);
21709
+ }) });
21710
+ };
21711
+ function DynamicFormDisplay({ fileNo, maximized = false, onToggleMaximize }) {
21712
+ const [displayData, setDisplayData] = (0, import_react116.useState)(null);
21713
+ const [activeTab, setActiveTab] = (0, import_react116.useState)("");
21714
+ const [expandedSections, setExpandedSections] = (0, import_react116.useState)({});
21715
+ const [isLoading, setIsLoading] = (0, import_react116.useState)(false);
21716
+ const [loadError, setLoadError] = (0, import_react116.useState)("");
21717
+ (0, import_react116.useEffect)(() => {
21718
+ if (!fileNo) {
21719
+ setDisplayData(null);
21720
+ setActiveTab("");
21721
+ setIsLoading(false);
21722
+ setLoadError("File number is unavailable.");
21723
+ return void 0;
21724
+ }
21725
+ let isCurrent = true;
21726
+ const loadPreview = async () => {
21727
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
21728
+ setIsLoading(true);
21729
+ setLoadError("");
21730
+ setDisplayData(null);
21731
+ setActiveTab("");
21732
+ try {
21733
+ const endpoint3 = getApplicantFormPreviewEndpoint();
21734
+ const url = typeof endpoint3 === "function" ? endpoint3() : String(endpoint3);
21735
+ const response = await getApiService().post(url, { fileNo });
21736
+ const preview = (_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;
21737
+ if (!Array.isArray(preview == null ? void 0 : preview.sections)) {
21738
+ throw new Error("The applicant form preview response is invalid.");
21739
+ }
21740
+ if (isCurrent) {
21741
+ setDisplayData(preview);
21742
+ setActiveTab((_g = (_f = preview.sections[0]) == null ? void 0 : _f.id) != null ? _g : "");
21743
+ setExpandedSections(Object.fromEntries(
21744
+ preview.sections.map((section) => {
21745
+ var _a2;
21746
+ return [section.id, ((_a2 = preview.layout) == null ? void 0 : _a2.defaultExpanded) !== false];
21747
+ })
21748
+ ));
21749
+ }
21750
+ } catch (error) {
21751
+ if (isCurrent) {
21752
+ setLoadError(((_i = (_h = error == null ? void 0 : error.response) == null ? void 0 : _h.data) == null ? void 0 : _i.message) || (error == null ? void 0 : error.message) || "Unable to load applicant form preview.");
21753
+ }
21754
+ } finally {
21755
+ if (isCurrent) setIsLoading(false);
21756
+ }
21757
+ };
21758
+ loadPreview();
21759
+ return () => {
21760
+ isCurrent = false;
21761
+ };
21762
+ }, [fileNo]);
21477
21763
  const toggleSection = (id) => setExpandedSections((prev) => __spreadProps(__spreadValues({}, prev), { [id]: !prev[id] }));
21478
- const displayData = STATIC_FORM_JSON;
21479
21764
  const isMax = !!maximized;
21765
+ if (isLoading) {
21766
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { role: "status", className: "fc:rounded-2xl fc:border fc:border-slate-200 fc:bg-white fc:p-6 fc:text-center fc:text-sm fc:text-slate-500", children: "Loading applicant form preview..." });
21767
+ }
21768
+ if (loadError) {
21769
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { role: "alert", className: "fc:rounded-2xl fc:border fc:border-rose-200 fc:bg-white fc:p-6 fc:text-center fc:text-sm fc:text-rose-600", children: loadError });
21770
+ }
21771
+ if (!displayData) return null;
21480
21772
  return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: `fc:bg-white fc:border fc:border-slate-200 fc:rounded-2xl fc:shadow-sm fc:overflow-hidden ${isMax ? "fc:w-full" : ""}`, children: [
21481
21773
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:px-5 fc:py-4 fc:border-b fc:border-slate-100", children: [
21482
21774
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-3", children: [
21483
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "fc:w-10 fc:h-10 fc:rounded-xl fc:bg-blue-50 fc:border fc:border-blue-100 fc:flex fc:items-center fc:justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_react116.RiFileTextLine, { size: 20, className: "fc:text-blue-600" }) }),
21775
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "fc:w-10 fc:h-10 fc:rounded-xl fc:bg-blue-50 fc:border fc:border-blue-100 fc:flex fc:items-center fc:justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_react117.RiFileTextLine, { size: 20, className: "fc:text-blue-600" }) }),
21484
21776
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { children: [
21485
21777
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("h2", { className: "fc:text-[16px] fc:font-extrabold fc:text-slate-900", children: displayData.formName }),
21486
21778
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("p", { className: "fc:text-[11px] fc:text-slate-400", children: [
@@ -21498,14 +21790,14 @@ function DynamicFormDisplay({ maximized = false, onToggleMaximize }) {
21498
21790
  className: "fc:inline-flex fc:items-center fc:gap-1.5 fc:border fc:border-slate-200 fc:rounded-lg fc:px-2.5 fc:py-1 fc:text-xs fc:font-semibold fc:text-slate-600 hover:fc:bg-slate-50 fc:transition-colors fc:shrink-0",
21499
21791
  title: isMax ? "Restore" : "Maximize",
21500
21792
  children: [
21501
- isMax ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_react116.RiFullscreenExitLine, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_react116.RiFullscreenLine, { size: 14 }),
21793
+ isMax ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_react117.RiFullscreenExitLine, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_react117.RiFullscreenLine, { size: 14 }),
21502
21794
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { children: isMax ? "Restore" : "Maximize" })
21503
21795
  ]
21504
21796
  }
21505
21797
  )
21506
21798
  ] }),
21507
21799
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "fc:flex fc:items-center fc:gap-1 fc:px-5 fc:border-b fc:border-slate-200 fc:overflow-x-auto fc:pb-1 fc-custom-scrollbar", children: displayData.sections.map((section) => {
21508
- var _a;
21800
+ var _a, _b, _c, _d, _e;
21509
21801
  return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
21510
21802
  "button",
21511
21803
  {
@@ -21514,24 +21806,25 @@ function DynamicFormDisplay({ maximized = false, onToggleMaximize }) {
21514
21806
  className: `fc:inline-flex fc:items-center fc:gap-1.5 fc:px-3 fc:py-2.5 fc:text-xs fc:font-semibold fc:whitespace-nowrap fc:border-b-2 fc:transition-colors ${activeTab === section.id ? "fc:border-blue-600 fc:text-blue-600" : "fc:border-transparent fc:text-slate-500 hover:fc:text-slate-800"}`,
21515
21807
  children: [
21516
21808
  section.title,
21517
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: `fc:rounded-full fc:px-1.5 fc:py-0.5 fc:text-[9px] fc:font-bold ${activeTab === section.id ? "fc:bg-blue-50 fc:text-blue-600" : "fc:bg-slate-100 fc:text-slate-400"}`, children: section.type === "table" ? section.rows.length : section.type === "attachments" ? section.files.length : ((_a = section.fields) == null ? void 0 : _a.length) || 0 })
21809
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: `fc:rounded-full fc:px-1.5 fc:py-0.5 fc:text-[9px] fc:font-bold ${activeTab === section.id ? "fc:bg-blue-50 fc:text-blue-600" : "fc:bg-slate-100 fc:text-slate-400"}`, children: section.type === "table" ? (_b = (_a = section.rows) == null ? void 0 : _a.length) != null ? _b : 0 : section.type === "attachments" ? (_d = (_c = section.files) == null ? void 0 : _c.length) != null ? _d : 0 : ((_e = section.fields) == null ? void 0 : _e.length) || 0 })
21518
21810
  ]
21519
21811
  },
21520
21812
  section.id
21521
21813
  );
21522
21814
  }) }),
21523
21815
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "fc:p-5", children: displayData.sections.map((section) => {
21524
- var _a, _b;
21816
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
21525
21817
  if (section.id !== activeTab) return null;
21526
21818
  if (section.type === "table") {
21527
21819
  return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "fc:space-y-3", children: [
21528
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "fc:flex fc:items-center fc:justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { children: [
21820
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { children: [
21529
21821
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("h3", { className: "fc:text-sm fc:font-extrabold fc:text-slate-900", children: section.title }),
21530
21822
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("p", { className: "fc:text-[11px] fc:text-slate-400 fc:mt-0.5", children: [
21531
- section.rows.length,
21823
+ (_b = (_a = section.rows) == null ? void 0 : _a.length) != null ? _b : 0,
21532
21824
  " records"
21533
21825
  ] })
21534
- ] }) }),
21826
+ ] }),
21827
+ ((_c = section.fields) == null ? void 0 : _c.length) > 0 && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: `fc:grid fc:gap-3 ${isMax ? "fc:grid-cols-3" : "fc:grid-cols-2"}`, children: section.fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(FieldCard, { field }, field.id)) }),
21535
21828
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(TableSection, { section })
21536
21829
  ] }, section.id);
21537
21830
  }
@@ -21540,7 +21833,7 @@ function DynamicFormDisplay({ maximized = false, onToggleMaximize }) {
21540
21833
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { children: [
21541
21834
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("h3", { className: "fc:text-sm fc:font-extrabold fc:text-slate-900", children: section.title }),
21542
21835
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("p", { className: "fc:text-[11px] fc:text-slate-400 fc:mt-0.5", children: [
21543
- section.files.length,
21836
+ (_e = (_d = section.files) == null ? void 0 : _d.length) != null ? _e : 0,
21544
21837
  " files"
21545
21838
  ] })
21546
21839
  ] }),
@@ -21552,11 +21845,11 @@ function DynamicFormDisplay({ maximized = false, onToggleMaximize }) {
21552
21845
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { children: [
21553
21846
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("h3", { className: "fc:text-sm fc:font-extrabold fc:text-slate-900", children: section.title }),
21554
21847
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("p", { className: "fc:text-[11px] fc:text-slate-400 fc:mt-0.5", children: [
21555
- ((_a = section.fields) == null ? void 0 : _a.length) || 0,
21848
+ ((_f = section.fields) == null ? void 0 : _f.length) || 0,
21556
21849
  " fields"
21557
21850
  ] })
21558
21851
  ] }),
21559
- displayData.layout.collapsibleSections && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
21852
+ ((_g = displayData.layout) == null ? void 0 : _g.collapsibleSections) && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
21560
21853
  "button",
21561
21854
  {
21562
21855
  type: "button",
@@ -21566,7 +21859,7 @@ function DynamicFormDisplay({ maximized = false, onToggleMaximize }) {
21566
21859
  }
21567
21860
  )
21568
21861
  ] }),
21569
- (!displayData.layout.collapsibleSections || expandedSections[section.id]) && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: `fc:grid fc:gap-3 ${isMax ? "fc:grid-cols-3" : "fc:grid-cols-2"}`, children: (_b = section.fields) == null ? void 0 : _b.map((field) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(FieldCard, { field }, field.id)) })
21862
+ (!((_h = displayData.layout) == null ? void 0 : _h.collapsibleSections) || expandedSections[section.id]) && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: `fc:grid fc:gap-3 ${isMax ? "fc:grid-cols-3" : "fc:grid-cols-2"}`, children: (_i = section.fields) == null ? void 0 : _i.map((field) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(FieldCard, { field }, field.id)) })
21570
21863
  ] }, section.id);
21571
21864
  }) })
21572
21865
  ] });
@@ -21575,6 +21868,7 @@ function DynamicFormDisplay({ maximized = false, onToggleMaximize }) {
21575
21868
  // src/components/inbox/FileDetailsTab.jsx
21576
21869
  var import_jsx_runtime107 = require("react/jsx-runtime");
21577
21870
  function FileDetailsTab({
21871
+ fileNo,
21578
21872
  fileHistory,
21579
21873
  isLoadingFileHistory,
21580
21874
  fileHistoryError,
@@ -21601,6 +21895,7 @@ function FileDetailsTab({
21601
21895
  /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { style: { minWidth: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
21602
21896
  DynamicFormDisplay,
21603
21897
  {
21898
+ fileNo,
21604
21899
  maximized: isMaximized,
21605
21900
  onToggleMaximize: () => setIsMaximized(!isMaximized)
21606
21901
  }
@@ -21654,7 +21949,7 @@ function FileDetailsTab({
21654
21949
  "div",
21655
21950
  {
21656
21951
  className: `fc:w-6 fc:h-6 fc:rounded-full fc:flex fc:items-center fc:justify-center fc:shrink-0 ${m.type === "alert" ? "fc:bg-[#EF4444] fc:text-white" : m.type === "check" ? "fc:bg-[#059669] fc:text-white" : "fc:bg-[#2563EB] fc:text-white"}`,
21657
- children: m.type === "alert" ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_react118.RiArrowGoBackLine, { size: 13, className: "fc:stroke-[1.5]" }) : m.type === "check" ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_react118.RiCheckLine, { size: 13, className: "fc:stroke-[2.5]" }) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_react118.RiArrowRightLine, { size: 13, className: "fc:stroke-2" })
21952
+ children: m.type === "alert" ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_react119.RiArrowGoBackLine, { size: 13, className: "fc:stroke-[1.5]" }) : m.type === "check" ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_react119.RiCheckLine, { size: 13, className: "fc:stroke-[2.5]" }) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_react119.RiArrowRightLine, { size: 13, className: "fc:stroke-2" })
21658
21953
  }
21659
21954
  ),
21660
21955
  /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "fc:min-w-0", children: [
@@ -21677,7 +21972,7 @@ function FileDetailsTab({
21677
21972
  style: { fontSize: "10px", lineHeight: "1" },
21678
21973
  className: "fc:inline-flex fc:items-center fc:gap-1 fc:text-[10px] fc:font-medium fc:text-blue-600 hover:fc:underline fc:shrink-0 fc:ml-2 fc:z-10",
21679
21974
  children: [
21680
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_react118.RiEyeLine, { size: 12 }),
21975
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_react119.RiEyeLine, { size: 12 }),
21681
21976
  /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: "View details" })
21682
21977
  ]
21683
21978
  }
@@ -21697,7 +21992,7 @@ function FileDetailsTab({
21697
21992
  children: [
21698
21993
  /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: showAllMovements ? "Show fewer movements" : "Show more movements" }),
21699
21994
  /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
21700
- import_react118.RiArrowDownSLine,
21995
+ import_react119.RiArrowDownSLine,
21701
21996
  {
21702
21997
  size: 15,
21703
21998
  className: `fc:text-blue-600 fc:transition-transform ${showAllMovements ? "fc:rotate-180" : ""}`
@@ -21715,171 +22010,8 @@ function FileDetailsTab({
21715
22010
  }
21716
22011
 
21717
22012
  // src/components/inbox/MovementDetailModal.jsx
21718
- var import_react119 = __toESM(require("react"));
21719
- var import_react120 = require("@remixicon/react");
21720
-
21721
- // src/components/inbox/reviewHelpers.js
21722
- init_ApiEndpointsProvider();
21723
- var getAvailableActions2 = (response) => {
21724
- var _a, _b, _c, _d, _e, _f, _g;
21725
- 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;
21726
- const rows = Array.isArray(value) ? value : (_g = (_f = value == null ? void 0 : value.items) != null ? _f : value == null ? void 0 : value.records) != null ? _g : [];
21727
- return rows.map((action) => {
21728
- var _a2, _b2, _c2, _d2, _e2, _f2;
21729
- return {
21730
- label: (_d2 = (_c2 = (_b2 = (_a2 = action.label) != null ? _a2 : action.Label) != null ? _b2 : action.actionName) != null ? _c2 : action.ActionName) != null ? _d2 : "",
21731
- actionCode: (_f2 = (_e2 = action.actionCode) != null ? _e2 : action.ActionCode) != null ? _f2 : ""
21732
- };
21733
- }).filter((action) => action.label && action.actionCode);
21734
- };
21735
- var getWorkflowStepsStatusEndpoint = () => {
21736
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
21737
- const flowCore = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) != null ? _b : {};
21738
- const endpoint3 = (_k = (_j = (_i = (_g = (_e = (_c = flowCore.getWorkflowStepsBarStatus) == null ? void 0 : _c.getStatus) != null ? _e : (_d = flowCore.workflowStepsBarStatus) == null ? void 0 : _d.getStatus) != null ? _g : (_f = flowCore.GetWorkflowStepsBarStatus) == null ? void 0 : _f.GetStatus) != null ? _i : (_h = flowCore.GetWorkflowStepsBarStatus) == null ? void 0 : _h.getStatus) != null ? _j : flowCore.GetWorkflowStepsBarStatus) != null ? _k : flowCore.getWorkflowStepsBarStatus;
21739
- if (!endpoint3) throw new Error("Workflow steps bar status endpoint is not configured.");
21740
- return endpoint3;
21741
- };
21742
- var getWorkflowSteps = (response) => {
21743
- var _a, _b, _c, _d, _e, _f, _g;
21744
- 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;
21745
- const steps = (_g = (_f = value == null ? void 0 : value.steps) != null ? _f : value == null ? void 0 : value.Steps) != null ? _g : [];
21746
- return Array.isArray(steps) ? [...steps].sort((first, second) => {
21747
- var _a2, _b2, _c2, _d2;
21748
- return Number((_b2 = (_a2 = first.sequenceNo) != null ? _a2 : first.SequenceNo) != null ? _b2 : 0) - Number((_d2 = (_c2 = second.sequenceNo) != null ? _c2 : second.SequenceNo) != null ? _d2 : 0);
21749
- }) : [];
21750
- };
21751
- var getFileHistoryEndpoint = () => {
21752
- var _a, _b, _c, _d, _e;
21753
- const flowCore = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) != null ? _b : {};
21754
- const configured = (_c = flowCore.getFileHistory) != null ? _c : flowCore.GetFileHistory;
21755
- const endpoint3 = (_e = (_d = configured == null ? void 0 : configured.getFileHistory) != null ? _d : configured == null ? void 0 : configured.GetFileHistory) != null ? _e : configured;
21756
- if (!endpoint3) throw new Error("Get File History endpoint is not configured.");
21757
- return endpoint3;
21758
- };
21759
- var getDocumentHistoryEndpoint = () => {
21760
- var _a, _b, _c, _d, _e;
21761
- const flowCore = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) != null ? _b : {};
21762
- const configured = (_c = flowCore.getDocumentAndWorkFlow) != null ? _c : flowCore.GetDocumentAndWorkFlow;
21763
- const endpoint3 = (_e = (_d = configured == null ? void 0 : configured.getDocumentHistoryByHistoryId) != null ? _d : configured == null ? void 0 : configured.GetDocumentHistoryByHistoryId) != null ? _e : configured;
21764
- if (!endpoint3) throw new Error("Document history details endpoint is not configured.");
21765
- return endpoint3;
21766
- };
21767
- var getConfigValue = (source, key) => {
21768
- if (!source || typeof source !== "object") return void 0;
21769
- const matchingKey = Object.keys(source).find((candidate) => candidate.toLowerCase() === key.toLowerCase());
21770
- return matchingKey ? source[matchingKey] : void 0;
21771
- };
21772
- var findConfigEntry = (source, key, path = [], visited = /* @__PURE__ */ new WeakSet()) => {
21773
- if (!source || typeof source !== "object" || visited.has(source)) return null;
21774
- visited.add(source);
21775
- const entries = Object.entries(source);
21776
- const matchingEntry = entries.find(([candidate]) => candidate.toLowerCase() === key.toLowerCase());
21777
- if (matchingEntry) return { value: matchingEntry[1], path: [...path, matchingEntry[0]] };
21778
- for (const [candidate, value] of entries) {
21779
- const result = findConfigEntry(value, key, [...path, candidate], visited);
21780
- if (result) return result;
21781
- }
21782
- return null;
21783
- };
21784
- var getStepDocumentsEndpoint = () => {
21785
- var _a, _b, _c;
21786
- const suppliedEndpoints = getApiEndpoints();
21787
- const root = (_a = getConfigValue(suppliedEndpoints, "apiEndpoints")) != null ? _a : suppliedEndpoints;
21788
- const flowCore = (_b = getConfigValue(root, "flowCore")) != null ? _b : root;
21789
- const inbox = getConfigValue(flowCore, "inbox");
21790
- const documentConfiguration = getConfigValue(flowCore, "documentConfiguration");
21791
- const configuredEndpoint = (_c = getConfigValue(inbox, "getDocumentsByWorkFlowStepId")) != null ? _c : getConfigValue(documentConfiguration, "getDocumentsByWorkFlowStepId");
21792
- const endpoint3 = configuredEndpoint ? { value: configuredEndpoint, path: ["flowCore", "inbox", "getDocumentsByWorkFlowStepId"] } : findConfigEntry(suppliedEndpoints, "getDocumentsByWorkFlowStepId");
21793
- if (!(endpoint3 == null ? void 0 : endpoint3.value)) {
21794
- const configKeys = Object.keys(flowCore != null ? flowCore : {}).join(", ") || "none";
21795
- const inboxKeys = Object.keys(inbox != null ? inbox : {}).join(", ") || "none";
21796
- throw new Error(`Documents endpoint missing at runtime. flowCore keys: ${configKeys}. inbox keys: ${inboxKeys}.`);
21797
- }
21798
- if (typeof endpoint3.value !== "string" && typeof endpoint3.value !== "function") {
21799
- throw new Error(`Configured document endpoint at ${endpoint3.path.join(".")} must be a URL string or function.`);
21800
- }
21801
- return endpoint3.value;
21802
- };
21803
- var getUploadDocumentEndpoint = () => {
21804
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
21805
- const flowCore = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) != null ? _b : {};
21806
- const execution = (_c = flowCore.workflowExecution) != null ? _c : flowCore.WorkflowExecution;
21807
- const endpoint3 = (_l = (_j = (_h = (_f = (_d = execution == null ? void 0 : execution.uploadDocument) != null ? _d : execution == null ? void 0 : execution.UploadDocument) != null ? _f : (_e = flowCore.inbox) == null ? void 0 : _e.uploadDocument) != null ? _h : (_g = flowCore.inbox) == null ? void 0 : _g.UploadDocument) != null ? _j : (_i = flowCore.Inbox) == null ? void 0 : _i.uploadDocument) != null ? _l : (_k = flowCore.Inbox) == null ? void 0 : _k.UploadDocument;
21808
- if (!endpoint3) throw new Error("Workflow document upload endpoint is not configured.");
21809
- return endpoint3;
21810
- };
21811
- var getConfiguredDocuments = (response) => {
21812
- var _a, _b, _c, _d, _e, _f, _g;
21813
- 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;
21814
- const rows = Array.isArray(value) ? value : (_g = (_f = value == null ? void 0 : value.items) != null ? _f : value == null ? void 0 : value.records) != null ? _g : [];
21815
- return rows.map((document2) => {
21816
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l;
21817
- return __spreadProps(__spreadValues({}, document2), {
21818
- documentConfigurationId: Number((_b2 = (_a2 = document2.documentConfigurationId) != null ? _a2 : document2.DocumentConfigurationId) != null ? _b2 : document2.id),
21819
- documentName: (_d2 = (_c2 = document2.documentName) != null ? _c2 : document2.DocumentName) != null ? _d2 : "Document",
21820
- allowedExtensions: (_f2 = (_e2 = document2.allowedExtensions) != null ? _e2 : document2.AllowedExtensions) != null ? _f2 : "",
21821
- maxSizeMB: Number((_h = (_g2 = document2.maxSizeMB) != null ? _g2 : document2.MaxSizeMB) != null ? _h : 0),
21822
- isMandatory: Boolean((_j = (_i = document2.isMandatory) != null ? _i : document2.IsMandatory) != null ? _j : false),
21823
- isActive: Boolean((_l = (_k = document2.isActive) != null ? _k : document2.IsActive) != null ? _l : true)
21824
- });
21825
- }).filter((document2) => Number.isInteger(document2.documentConfigurationId) && document2.isActive);
21826
- };
21827
- var getDocumentAcceptValue = (extensions) => String(extensions != null ? extensions : "").split(/[,;\s]+/).map((extension) => extension.trim().toLowerCase()).filter(Boolean).map((extension) => extension.startsWith(".") ? extension : `.${extension}`).join(",");
21828
- var getFileHistoryMovements = (response) => {
21829
- var _a, _b, _c, _d, _e, _f, _g;
21830
- 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;
21831
- const movements = (_g = (_f = value == null ? void 0 : value.movements) != null ? _f : value == null ? void 0 : value.Movements) != null ? _g : [];
21832
- return Array.isArray(movements) ? movements : [];
21833
- };
21834
- var formatMovementDate = (value) => {
21835
- if (!value) return "-";
21836
- const date = new Date(value);
21837
- return Number.isNaN(date.getTime()) ? String(value) : date.toLocaleString("en-GB", {
21838
- day: "2-digit",
21839
- month: "short",
21840
- year: "numeric",
21841
- hour: "2-digit",
21842
- minute: "2-digit"
21843
- });
21844
- };
21845
- var mapFileHistoryMovement = (movement, index) => {
21846
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
21847
- const actionCode = String((_d = (_c = (_b = (_a = movement.actionCode) != null ? _a : movement.ActionCode) != null ? _b : movement.actionName) != null ? _c : movement.ActionName) != null ? _d : "Action");
21848
- const normalizedAction = actionCode.toUpperCase().replace(/[\s-]/g, "_");
21849
- const isReturn = normalizedAction.includes("RETURN") || normalizedAction === "PULL";
21850
- const isResubmit = normalizedAction.includes("RESUBMIT");
21851
- const isSubmit = !isResubmit && normalizedAction.includes("SUBMIT");
21852
- const status = isReturn ? "Returned to Applicant" : isResubmit ? "Resubmitted" : isSubmit ? "Submitted" : normalizedAction.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (letter) => letter.toUpperCase());
21853
- const applicantActor = isResubmit || movement.applicantName && !movement.officialName;
21854
- const userName = (_l = (_k = (_j = (_i = (_h = (_g = (_f = (_e = movement.userregistrationName) != null ? _e : movement.UserRegistrationName) != null ? _f : movement.UserName) != null ? _g : movement.userName) != null ? _h : applicantActor ? movement.applicantName : movement.officialName) != null ? _i : movement.officialName) != null ? _j : movement.applicantName) != null ? _k : movement.performedBy) != null ? _l : "Unknown user";
21855
- const comments = (_p = (_o = (_n = (_m = movement.officialComment) != null ? _m : movement.applicantComment) != null ? _n : movement.comments) != null ? _o : movement.Comments) != null ? _p : "-";
21856
- const stepId = (_q = movement.fromWorkflowStepId) != null ? _q : movement.FromWorkflowStepId;
21857
- const stepName = (_s = (_r = movement.workflowStepName) != null ? _r : movement.WorkflowStepName) != null ? _s : "";
21858
- return {
21859
- id: (_u = (_t = movement.movementHistoryId) != null ? _t : movement.MovementHistoryId) != null ? _u : index + 1,
21860
- type: isReturn ? "return" : isSubmit ? "submit" : isResubmit ? "resubmit" : "forward",
21861
- date: formatMovementDate((_v = movement.movedOn) != null ? _v : movement.MovedOn),
21862
- userName,
21863
- userRole: applicantActor ? "Applicant" : "Official",
21864
- status,
21865
- stepNum: stepId != null && Number(stepId) > 0 ? `Step ${stepId}` : null,
21866
- stepName: stepName || null,
21867
- remarks: comments,
21868
- isAlert: isReturn,
21869
- isCurrent: false,
21870
- title: status,
21871
- by: `By ${userName}${applicantActor ? " (Applicant)" : ""}`
21872
- };
21873
- };
21874
- var DEFAULT_ACTIONS = [
21875
- { label: "Approve kro", actionCode: "APPROVE" },
21876
- { label: "Reject", actionCode: "REJECT" },
21877
- { label: "Forward", actionCode: "FORWARD" },
21878
- { label: "Free Forward", actionCode: "FREE_FORWARD" },
21879
- { label: "Return To Applicant", actionCode: "RETURN_TO_APPLICANT" }
21880
- ];
21881
-
21882
- // src/components/inbox/MovementDetailModal.jsx
22013
+ var import_react120 = __toESM(require("react"));
22014
+ var import_react121 = require("@remixicon/react");
21883
22015
  var import_jsx_runtime108 = require("react/jsx-runtime");
21884
22016
  function MovementDetailModal({
21885
22017
  selectedHistoryItem,
@@ -21910,7 +22042,7 @@ function MovementDetailModal({
21910
22042
  children: [
21911
22043
  /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("header", { className: "fc:flex fc:items-center fc:justify-between fc:gap-4 fc:border-b fc:border-slate-100 fc:bg-slate-50 fc:px-6 fc:py-4", children: [
21912
22044
  /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "fc:flex fc:min-w-0 fc:items-center fc:gap-3", children: [
21913
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "fc:flex fc:h-10 fc:w-10 fc:shrink-0 fc:items-center fc:justify-center fc:rounded-xl fc:bg-blue-100 fc:text-blue-700", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_react120.RiHistoryLine, { size: 19 }) }),
22045
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "fc:flex fc:h-10 fc:w-10 fc:shrink-0 fc:items-center fc:justify-center fc:rounded-xl fc:bg-blue-100 fc:text-blue-700", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_react121.RiHistoryLine, { size: 19 }) }),
21914
22046
  /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "fc:min-w-0", children: [
21915
22047
  /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("h2", { id: "movement-detail-title", className: "fc:truncate fc:text-base fc:font-bold fc:text-slate-900", children: (_d = (_c = (_a = historyDetail == null ? void 0 : historyDetail.movement) == null ? void 0 : _a.actionName) != null ? _c : (_b = historyDetail == null ? void 0 : historyDetail.movement) == null ? void 0 : _b.ActionName) != null ? _d : selectedHistoryItem.title }),
21916
22048
  /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("p", { className: "fc:mt-0.5 fc:text-xs fc:text-slate-500", children: [
@@ -21926,7 +22058,7 @@ function MovementDetailModal({
21926
22058
  onClick: onClose,
21927
22059
  "aria-label": "Close",
21928
22060
  className: "fc:flex fc:h-9 fc:w-9 fc:shrink-0 fc:items-center fc:justify-center fc:rounded-lg fc:text-slate-500 hover:fc:bg-slate-200/70",
21929
- children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_react120.RiCloseLine, { size: 20 })
22061
+ children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_react121.RiCloseLine, { size: 20 })
21930
22062
  }
21931
22063
  )
21932
22064
  ] }),
@@ -21994,7 +22126,7 @@ function MovementDetailModal({
21994
22126
  className: "fc:flex fc:items-center fc:justify-between fc:gap-3 fc:rounded-xl fc:border fc:border-slate-200 fc:bg-white fc:px-3.5 fc:py-3",
21995
22127
  children: [
21996
22128
  /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("span", { className: "fc:flex fc:min-w-0 fc:items-center fc:gap-3", children: [
21997
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "fc:flex fc:h-9 fc:w-9 fc:shrink-0 fc:items-center fc:justify-center fc:rounded-lg fc:bg-slate-100 fc:text-slate-600", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_react120.RiFileTextLine, { size: 17 }) }),
22129
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "fc:flex fc:h-9 fc:w-9 fc:shrink-0 fc:items-center fc:justify-center fc:rounded-lg fc:bg-slate-100 fc:text-slate-600", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_react121.RiFileTextLine, { size: 17 }) }),
21998
22130
  /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("span", { className: "fc:min-w-0", children: [
21999
22131
  /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "fc:block fc:truncate fc:text-sm fc:font-medium fc:text-slate-800", children: name }),
22000
22132
  kind && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "fc:block fc:text-xs fc:text-slate-500", children: kind })
@@ -22026,9 +22158,9 @@ function MovementDetailModal({
22026
22158
  }
22027
22159
 
22028
22160
  // src/components/inbox/TakeActionPanel.jsx
22029
- var import_react121 = __toESM(require("react"));
22161
+ var import_react122 = __toESM(require("react"));
22030
22162
  var import_sweetalert230 = __toESM(require("sweetalert2"));
22031
- var import_react122 = require("@remixicon/react");
22163
+ var import_react123 = require("@remixicon/react");
22032
22164
  init_ApiEndpointsProvider();
22033
22165
  init_ApiServicepackage();
22034
22166
  var import_jsx_runtime109 = require("react/jsx-runtime");
@@ -22042,24 +22174,24 @@ function TakeActionPanel({
22042
22174
  onMinimize
22043
22175
  }) {
22044
22176
  var _a;
22045
- const [actions, setActions] = (0, import_react121.useState)(DEFAULT_ACTIONS);
22046
- const [actionCode, setActionCode] = (0, import_react121.useState)("RETURN_TO_APPLICANT");
22047
- const [remarks, setRemarks] = (0, import_react121.useState)("");
22048
- const [isSubmitting, setIsSubmitting] = (0, import_react121.useState)(false);
22049
- const [editableFields, setEditableFields] = (0, import_react121.useState)([]);
22050
- const [selectedEditableFields, setSelectedEditableFields] = (0, import_react121.useState)([]);
22051
- const [isLoadingEditableFields, setIsLoadingEditableFields] = (0, import_react121.useState)(false);
22052
- const [editableFieldsError, setEditableFieldsError] = (0, import_react121.useState)("");
22053
- const [officialDocuments, setOfficialDocuments] = (0, import_react121.useState)([]);
22054
- const [isLoadingOfficialDocuments, setIsLoadingOfficialDocuments] = (0, import_react121.useState)(false);
22055
- const [officialDocumentsError, setOfficialDocumentsError] = (0, import_react121.useState)("");
22056
- const [uploadedDocuments, setUploadedDocuments] = (0, import_react121.useState)([]);
22057
- const [uploadingDocumentId, setUploadingDocumentId] = (0, import_react121.useState)(null);
22058
- const [documentUploadErrors, setDocumentUploadErrors] = (0, import_react121.useState)({});
22059
- const documentInputRefs = (0, import_react121.useRef)({});
22177
+ const [actions, setActions] = (0, import_react122.useState)(DEFAULT_ACTIONS);
22178
+ const [actionCode, setActionCode] = (0, import_react122.useState)("RETURN_TO_APPLICANT");
22179
+ const [remarks, setRemarks] = (0, import_react122.useState)("");
22180
+ const [isSubmitting, setIsSubmitting] = (0, import_react122.useState)(false);
22181
+ const [editableFields, setEditableFields] = (0, import_react122.useState)([]);
22182
+ const [selectedEditableFields, setSelectedEditableFields] = (0, import_react122.useState)([]);
22183
+ const [isLoadingEditableFields, setIsLoadingEditableFields] = (0, import_react122.useState)(false);
22184
+ const [editableFieldsError, setEditableFieldsError] = (0, import_react122.useState)("");
22185
+ const [officialDocuments, setOfficialDocuments] = (0, import_react122.useState)([]);
22186
+ const [isLoadingOfficialDocuments, setIsLoadingOfficialDocuments] = (0, import_react122.useState)(false);
22187
+ const [officialDocumentsError, setOfficialDocumentsError] = (0, import_react122.useState)("");
22188
+ const [uploadedDocuments, setUploadedDocuments] = (0, import_react122.useState)([]);
22189
+ const [uploadingDocumentId, setUploadingDocumentId] = (0, import_react122.useState)(null);
22190
+ const [documentUploadErrors, setDocumentUploadErrors] = (0, import_react122.useState)({});
22191
+ const documentInputRefs = (0, import_react122.useRef)({});
22060
22192
  const selectedAction = actions.find((a) => a.actionCode === actionCode);
22061
22193
  const isReturnToApplicant = ((_a = selectedAction == null ? void 0 : selectedAction.label) == null ? void 0 : _a.toLowerCase().includes("return")) || ["PULL", "RETURN_TO_APPLICANT"].includes(actionCode == null ? void 0 : actionCode.toUpperCase());
22062
- (0, import_react121.useEffect)(() => {
22194
+ (0, import_react122.useEffect)(() => {
22063
22195
  let isCurrent = true;
22064
22196
  (async () => {
22065
22197
  var _a2, _b, _c, _d, _e, _f, _g;
@@ -22084,7 +22216,7 @@ function TakeActionPanel({
22084
22216
  isCurrent = false;
22085
22217
  };
22086
22218
  }, [workflowStepId, activeWorkflowStepId]);
22087
- (0, import_react121.useEffect)(() => {
22219
+ (0, import_react122.useEffect)(() => {
22088
22220
  if (!isReturnToApplicant) {
22089
22221
  setEditableFields([]);
22090
22222
  setSelectedEditableFields([]);
@@ -22113,7 +22245,7 @@ function TakeActionPanel({
22113
22245
  isCurrent = false;
22114
22246
  };
22115
22247
  }, [isReturnToApplicant]);
22116
- (0, import_react121.useEffect)(() => {
22248
+ (0, import_react122.useEffect)(() => {
22117
22249
  const normalizedStepId = Number(workflowStepId);
22118
22250
  setOfficialDocuments([]);
22119
22251
  setUploadedDocuments([]);
@@ -22293,7 +22425,7 @@ function TakeActionPanel({
22293
22425
  children: [
22294
22426
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-2 fc:border-b fc:border-slate-100 fc:pb-3", children: [
22295
22427
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2.5", children: [
22296
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "fc:w-8 fc:h-8 fc:rounded-lg fc:bg-[#ECFDF5] fc:text-[#059669] fc:flex fc:items-center fc:justify-center fc:border fc:border-[#A7F3D0]", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_react122.RiCheckboxLine, { size: 18 }) }),
22428
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "fc:w-8 fc:h-8 fc:rounded-lg fc:bg-[#ECFDF5] fc:text-[#059669] fc:flex fc:items-center fc:justify-center fc:border fc:border-[#A7F3D0]", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_react123.RiCheckboxLine, { size: 18 }) }),
22297
22429
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { children: [
22298
22430
  /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("h2", { style: { fontSize: "15px", lineHeight: "1.25", margin: 0 }, className: "fc:text-base fc:font-bold fc:text-slate-900 fc:leading-tight", children: "Take Action" }),
22299
22431
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("p", { className: "fc:text-xs fc:text-slate-400 fc:mt-0.5", children: [
@@ -22309,7 +22441,7 @@ function TakeActionPanel({
22309
22441
  onClick: onMinimize || onBackToInbox,
22310
22442
  title: "Minimize panel",
22311
22443
  className: "fc:text-slate-400 hover:fc:text-slate-700 fc:p-1 fc:rounded-lg fc:transition-colors",
22312
- children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_react122.RiCloseLine, { size: 19 })
22444
+ children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_react123.RiCloseLine, { size: 19 })
22313
22445
  }
22314
22446
  )
22315
22447
  ] }),
@@ -22468,7 +22600,7 @@ function TakeActionPanel({
22468
22600
  border: isChecked ? "none" : "1.5px solid #CBD5E1",
22469
22601
  color: "#ffffff"
22470
22602
  },
22471
- children: isChecked && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_react122.RiCheckLine, { size: 12, className: "fc:stroke-[3]" })
22603
+ children: isChecked && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_react123.RiCheckLine, { size: 12, className: "fc:stroke-[3]" })
22472
22604
  }
22473
22605
  ),
22474
22606
  /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
@@ -22489,7 +22621,7 @@ function TakeActionPanel({
22489
22621
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "fc:border-t fc:border-slate-100 fc:pt-3 fc:space-y-1.5", children: [
22490
22622
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-1.5", children: [
22491
22623
  /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "fc:text-xs fc:font-bold fc:text-slate-900", children: "Official attachments" }),
22492
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_react122.RiInformationFill, { size: 14, className: "fc:text-slate-600" })
22624
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_react123.RiInformationFill, { size: 14, className: "fc:text-slate-600" })
22493
22625
  ] }),
22494
22626
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "fc:space-y-2 fc:pt-1", children: [
22495
22627
  isLoadingOfficialDocuments && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("p", { className: "fc:py-3 fc:text-center fc:text-[11px] fc:text-slate-500", children: "Loading required documents..." }),
@@ -22529,7 +22661,7 @@ function TakeActionPanel({
22529
22661
  ),
22530
22662
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-3", children: [
22531
22663
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "fc:flex fc:min-w-0 fc:items-center fc:gap-2.5", children: [
22532
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_react122.RiFileTextLine, { size: 18, className: `fc:shrink-0 ${uploaded ? "fc:text-emerald-600" : "fc:text-slate-400"}` }),
22664
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_react123.RiFileTextLine, { size: 18, className: `fc:shrink-0 ${uploaded ? "fc:text-emerald-600" : "fc:text-slate-400"}` }),
22533
22665
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "fc:min-w-0", children: [
22534
22666
  /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "fc:flex fc:flex-wrap fc:items-center fc:gap-1.5", children: [
22535
22667
  /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "fc:max-w-[180px] fc:truncate fc:text-xs fc:font-bold fc:text-slate-800", children: documentConfig.documentName }),
@@ -22550,7 +22682,7 @@ function TakeActionPanel({
22550
22682
  disabled: isSubmitting || isLoadingOfficialDocuments || uploadingDocumentId != null,
22551
22683
  className: "fc:inline-flex fc:shrink-0 fc:items-center fc:gap-1 fc:rounded-lg fc:border fc:border-blue-200 fc:bg-white fc:px-2.5 fc:py-1.5 fc:text-xs fc:font-semibold fc:text-blue-600 fc:shadow-sm hover:fc:bg-blue-50 disabled:fc:cursor-not-allowed disabled:fc:opacity-50",
22552
22684
  children: [
22553
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_react122.RiUpload2Line, { size: 13 }),
22685
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_react123.RiUpload2Line, { size: 13 }),
22554
22686
  /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { children: isUploading ? "Uploading..." : uploaded ? "Replace" : "Upload" })
22555
22687
  ]
22556
22688
  }
@@ -22599,7 +22731,7 @@ function TakeActionPanel({
22599
22731
  disabled: isSubmitting,
22600
22732
  className: "fc:inline-flex fc:items-center fc:gap-2 fc:px-6 fc:py-2.5 fc:bg-[#009E60] hover:fc:bg-[#008752] fc:text-white fc:text-xs fc:font-bold fc:rounded-xl fc:shadow-sm fc:transition-all hover:fc:scale-[1.01] active:fc:scale-95 disabled:fc:opacity-50",
22601
22733
  children: [
22602
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_react122.RiSendPlane2Fill, { size: 15 }),
22734
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_react123.RiSendPlane2Fill, { size: 15 }),
22603
22735
  /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { children: isSubmitting ? "Submitting..." : "Submit Action" })
22604
22736
  ]
22605
22737
  }
@@ -22623,23 +22755,24 @@ function ReviewApplication({
22623
22755
  onSelectWorkflowStepId,
22624
22756
  onBackToInbox,
22625
22757
  onSubmitAction,
22626
- refreshKey
22758
+ refreshKey,
22759
+ userName
22627
22760
  }) {
22628
22761
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
22629
- const [activeTab, setActiveTab] = (0, import_react123.useState)("workflowHistory");
22630
- const [showAllMovements, setShowAllMovements] = (0, import_react123.useState)(false);
22631
- const [isApplicantFormMaximized, setIsApplicantFormMaximized] = (0, import_react123.useState)(false);
22632
- const [isTakeActionMinimized, setIsTakeActionMinimized] = (0, import_react123.useState)(false);
22633
- const [workflowSteps, setWorkflowSteps] = (0, import_react123.useState)([]);
22634
- const [isLoadingWorkflowSteps, setIsLoadingWorkflowSteps] = (0, import_react123.useState)(false);
22635
- const [workflowStepsError, setWorkflowStepsError] = (0, import_react123.useState)("");
22636
- const [fileHistory, setFileHistory] = (0, import_react123.useState)([]);
22637
- const [isLoadingFileHistory, setIsLoadingFileHistory] = (0, import_react123.useState)(false);
22638
- const [fileHistoryError, setFileHistoryError] = (0, import_react123.useState)("");
22639
- const [selectedHistoryItem, setSelectedHistoryItem] = (0, import_react123.useState)(null);
22640
- const [historyDetail, setHistoryDetail] = (0, import_react123.useState)(null);
22641
- const [historyDetailError, setHistoryDetailError] = (0, import_react123.useState)("");
22642
- const [isLoadingHistoryDetail, setIsLoadingHistoryDetail] = (0, import_react123.useState)(false);
22762
+ const [activeTab, setActiveTab] = (0, import_react124.useState)("workflowHistory");
22763
+ const [showAllMovements, setShowAllMovements] = (0, import_react124.useState)(false);
22764
+ const [isApplicantFormMaximized, setIsApplicantFormMaximized] = (0, import_react124.useState)(false);
22765
+ const [isTakeActionMinimized, setIsTakeActionMinimized] = (0, import_react124.useState)(false);
22766
+ const [workflowSteps, setWorkflowSteps] = (0, import_react124.useState)([]);
22767
+ const [isLoadingWorkflowSteps, setIsLoadingWorkflowSteps] = (0, import_react124.useState)(false);
22768
+ const [workflowStepsError, setWorkflowStepsError] = (0, import_react124.useState)("");
22769
+ const [fileHistory, setFileHistory] = (0, import_react124.useState)([]);
22770
+ const [isLoadingFileHistory, setIsLoadingFileHistory] = (0, import_react124.useState)(false);
22771
+ const [fileHistoryError, setFileHistoryError] = (0, import_react124.useState)("");
22772
+ const [selectedHistoryItem, setSelectedHistoryItem] = (0, import_react124.useState)(null);
22773
+ const [historyDetail, setHistoryDetail] = (0, import_react124.useState)(null);
22774
+ const [historyDetailError, setHistoryDetailError] = (0, import_react124.useState)("");
22775
+ const [isLoadingHistoryDetail, setIsLoadingHistoryDetail] = (0, import_react124.useState)(false);
22643
22776
  const fileNo = file == null ? void 0 : file.fileNo;
22644
22777
  const subject = (file == null ? void 0 : file.subject) || "ElectionPetition #41";
22645
22778
  const department = (file == null ? void 0 : file.department) && file.department !== "-" ? file.department : "Nodal 19";
@@ -22649,7 +22782,7 @@ function ReviewApplication({
22649
22782
  const createdOn = (file == null ? void 0 : file.receivedDate) && file.receivedDate !== "-" ? file.receivedDate : "01 Oct 2026, 10:24 AM";
22650
22783
  const workflowStepId = (_b = (_a = file == null ? void 0 : file.workflowStepId) != null ? _a : file == null ? void 0 : file.WorkflowStepId) != null ? _b : activeWorkflowStepId;
22651
22784
  const fileInstanceId = (_g = (_e = (_c = file == null ? void 0 : file.fileInstanceId) != null ? _c : file == null ? void 0 : file.FileInstanceId) != null ? _e : (_d = file == null ? void 0 : file.fileInstance) == null ? void 0 : _d.fileInstanceId) != null ? _g : (_f = file == null ? void 0 : file.FileInstance) == null ? void 0 : _f.FileInstanceId;
22652
- (0, import_react123.useEffect)(() => {
22785
+ (0, import_react124.useEffect)(() => {
22653
22786
  if (!workflowStepId) {
22654
22787
  setWorkflowSteps([]);
22655
22788
  setWorkflowStepsError("Workflow step ID is unavailable.");
@@ -22680,7 +22813,7 @@ function ReviewApplication({
22680
22813
  };
22681
22814
  }, [workflowStepId]);
22682
22815
  const historyNeeded = activeTab === "workflowHistory" || activeTab === "fileDetails";
22683
- (0, import_react123.useEffect)(() => {
22816
+ (0, import_react124.useEffect)(() => {
22684
22817
  if (!historyNeeded) return void 0;
22685
22818
  const normalizedFileInstanceId = Number(fileInstanceId);
22686
22819
  if (!Number.isInteger(normalizedFileInstanceId) || normalizedFileInstanceId <= 0) {
@@ -22756,7 +22889,8 @@ function ReviewApplication({
22756
22889
  activeStepName,
22757
22890
  assignedSteps,
22758
22891
  onSelectWorkflowStepId,
22759
- refreshKey
22892
+ refreshKey,
22893
+ userName
22760
22894
  }
22761
22895
  ),
22762
22896
  /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "fc:p-3 md:fc:p-4 fc:flex fc:flex-row fc:gap-4 fc:items-start fc:w-full fc:min-w-0", children: [
@@ -22771,12 +22905,12 @@ function ReviewApplication({
22771
22905
  title: "Back to My Files",
22772
22906
  className: "fc:inline-flex fc:items-center fc:gap-1.5 fc:h-9 fc:px-3 fc:rounded-xl fc:border fc:border-slate-200 fc:bg-white fc:text-slate-600 hover:fc:bg-slate-50 hover:fc:text-blue-600 fc:transition-colors fc:shrink-0 fc:font-bold fc:text-xs",
22773
22907
  children: [
22774
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_react124.RiArrowGoBackLine, { size: 15 }),
22908
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_react125.RiArrowGoBackLine, { size: 15 }),
22775
22909
  /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { children: "My Files" })
22776
22910
  ]
22777
22911
  }
22778
22912
  ),
22779
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "fc:w-10 fc:h-10 fc:rounded-xl fc:bg-blue-50 fc:border fc:border-blue-100 fc:text-blue-600 fc:flex fc:items-center fc:justify-center fc:shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_react124.RiFileTextLine, { size: 22, className: "fc:text-blue-600" }) }),
22913
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "fc:w-10 fc:h-10 fc:rounded-xl fc:bg-blue-50 fc:border fc:border-blue-100 fc:text-blue-600 fc:flex fc:items-center fc:justify-center fc:shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_react125.RiFileTextLine, { size: 22, className: "fc:text-blue-600" }) }),
22780
22914
  /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { children: [
22781
22915
  /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("h1", { className: "fc:text-[18px] fc:font-extrabold fc:text-slate-900 fc:leading-tight", children: "Review Application" }),
22782
22916
  /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("p", { className: "fc:text-xs fc:text-slate-500 fc:mt-0.5", children: "View application details, workflow history and take action" })
@@ -22822,6 +22956,7 @@ function ReviewApplication({
22822
22956
  activeTab === "fileDetails" && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
22823
22957
  FileDetailsTab,
22824
22958
  {
22959
+ fileNo,
22825
22960
  fileHistory,
22826
22961
  isLoadingFileHistory,
22827
22962
  fileHistoryError,
@@ -22854,7 +22989,7 @@ function ReviewApplication({
22854
22989
  onClick: () => setIsTakeActionMinimized(false),
22855
22990
  className: "fc:fixed fc:bottom-6 fc:right-6 fc:z-40 fc:inline-flex fc:items-center fc:gap-2 fc:bg-[#009E60] hover:fc:bg-[#008752] fc:text-white fc:px-5 fc:py-3 fc:rounded-full fc:shadow-lg fc:shadow-emerald-600/30 fc:font-bold fc:text-sm fc:transition-all hover:fc:scale-105 active:fc:scale-95",
22856
22991
  children: [
22857
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_react124.RiCheckboxLine, { size: 18 }),
22992
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_react125.RiCheckboxLine, { size: 18 }),
22858
22993
  /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { children: "Take Action" })
22859
22994
  ]
22860
22995
  }
@@ -22976,33 +23111,34 @@ function InboxMain({
22976
23111
  icon: PropIcon,
22977
23112
  iconBg
22978
23113
  }) {
22979
- const HeaderIcon = PropIcon || ((allowedTabs == null ? void 0 : allowedTabs.length) === 1 && allowedTabs[0] === "myFiles" ? import_react126.RiUserReceivedLine : (allowedTabs == null ? void 0 : allowedTabs.length) === 1 && allowedTabs[0] === "filePool" ? import_react126.RiInboxArchiveLine : (allowedTabs == null ? void 0 : allowedTabs.length) === 1 && allowedTabs[0] === "totalFiles" ? import_react126.RiFileUploadLine : import_react126.RiInboxLine);
23114
+ const HeaderIcon = PropIcon || ((allowedTabs == null ? void 0 : allowedTabs.length) === 1 && allowedTabs[0] === "myFiles" ? import_react127.RiUserReceivedLine : (allowedTabs == null ? void 0 : allowedTabs.length) === 1 && allowedTabs[0] === "filePool" ? import_react127.RiInboxArchiveLine : (allowedTabs == null ? void 0 : allowedTabs.length) === 1 && allowedTabs[0] === "totalFiles" ? import_react127.RiFileUploadLine : import_react127.RiInboxLine);
22980
23115
  const headerTitle = title || ((allowedTabs == null ? void 0 : allowedTabs.length) === 1 && allowedTabs[0] === "myFiles" ? "My Files" : (allowedTabs == null ? void 0 : allowedTabs.length) === 1 && allowedTabs[0] === "filePool" ? "Unclaimed Files" : (allowedTabs == null ? void 0 : allowedTabs.length) === 1 && allowedTabs[0] === "totalFiles" ? "Completed Files" : "Inbox");
22981
23116
  const headerSubtitle = subtitle || ((allowedTabs == null ? void 0 : allowedTabs.length) === 1 && allowedTabs[0] === "myFiles" ? "View and process files currently assigned to your queue" : (allowedTabs == null ? void 0 : allowedTabs.length) === 1 && allowedTabs[0] === "filePool" ? "Available files in the pool waiting to be claimed" : (allowedTabs == null ? void 0 : allowedTabs.length) === 1 && allowedTabs[0] === "totalFiles" ? "Archive of all completed and processed workflow files" : "Manage, claim, and process workflow files across stages");
22982
23117
  const headerIconBg = iconBg || ((allowedTabs == null ? void 0 : allowedTabs.length) === 1 && allowedTabs[0] === "myFiles" ? "fc:bg-gradient-to-br fc:from-emerald-500 fc:to-teal-600" : (allowedTabs == null ? void 0 : allowedTabs.length) === 1 && allowedTabs[0] === "filePool" ? "fc:bg-gradient-to-br fc:from-blue-600 fc:to-indigo-600" : (allowedTabs == null ? void 0 : allowedTabs.length) === 1 && allowedTabs[0] === "totalFiles" ? "fc:bg-gradient-to-br fc:from-slate-700 fc:to-slate-900" : "fc:bg-gradient-to-br fc:from-blue-600 fc:to-indigo-600");
22983
- const [activeTab, setActiveTab] = (0, import_react125.useState)(initialTab);
22984
- const [viewMode, setViewMode] = (0, import_react125.useState)(initialView);
22985
- const [reviewingFile, setReviewingFile] = (0, import_react125.useState)(null);
22986
- (0, import_react125.useEffect)(() => {
23118
+ const [activeTab, setActiveTab] = (0, import_react126.useState)(initialTab);
23119
+ const [viewMode, setViewMode] = (0, import_react126.useState)(initialView);
23120
+ const [reviewingFile, setReviewingFile] = (0, import_react126.useState)(null);
23121
+ (0, import_react126.useEffect)(() => {
22987
23122
  if (initialTab) setActiveTab(initialTab);
22988
23123
  }, [initialTab]);
22989
- (0, import_react125.useEffect)(() => {
23124
+ (0, import_react126.useEffect)(() => {
22990
23125
  if (initialView) setViewMode(initialView);
22991
23126
  }, [initialView]);
22992
- const [assignedSteps, setAssignedSteps] = (0, import_react125.useState)([]);
22993
- const [activeWorkflowStepId, setActiveWorkflowStepId] = (0, import_react125.useState)(null);
22994
- const [roleDropdownOpen, setRoleDropdownOpen] = (0, import_react125.useState)(false);
22995
- const roleDropdownRef = (0, import_react125.useRef)(null);
23127
+ const { userName, initial: userInitial } = useUserProfile();
23128
+ const [assignedSteps, setAssignedSteps] = (0, import_react126.useState)([]);
23129
+ const [activeWorkflowStepId, setActiveWorkflowStepId] = (0, import_react126.useState)(null);
23130
+ const [roleDropdownOpen, setRoleDropdownOpen] = (0, import_react126.useState)(false);
23131
+ const roleDropdownRef = (0, import_react126.useRef)(null);
22996
23132
  const activeRoleDetails = assignedSteps.find(
22997
23133
  (step) => Number(step.workflowStepId) === Number(activeWorkflowStepId)
22998
23134
  );
22999
23135
  const activeRole = (activeRoleDetails == null ? void 0 : activeRoleDetails.stepName) || "No Assigned Step";
23000
- const [filePoolFiles, setFilePoolFiles] = (0, import_react125.useState)([]);
23001
- const [myFiles, setMyFiles] = (0, import_react125.useState)([]);
23002
- const [totalFiles, setTotalFiles] = (0, import_react125.useState)([]);
23003
- const [refreshKey, setRefreshKey] = (0, import_react125.useState)(0);
23004
- const [isUnclaiming, setIsUnclaiming] = (0, import_react125.useState)(false);
23005
- (0, import_react125.useEffect)(() => {
23136
+ const [filePoolFiles, setFilePoolFiles] = (0, import_react126.useState)([]);
23137
+ const [myFiles, setMyFiles] = (0, import_react126.useState)([]);
23138
+ const [totalFiles, setTotalFiles] = (0, import_react126.useState)([]);
23139
+ const [refreshKey, setRefreshKey] = (0, import_react126.useState)(0);
23140
+ const [isUnclaiming, setIsUnclaiming] = (0, import_react126.useState)(false);
23141
+ (0, import_react126.useEffect)(() => {
23006
23142
  let isCurrent = true;
23007
23143
  const loadAssignedSteps = async () => {
23008
23144
  var _a, _b;
@@ -23061,7 +23197,7 @@ function InboxMain({
23061
23197
  isCurrent = false;
23062
23198
  };
23063
23199
  }, []);
23064
- (0, import_react125.useEffect)(() => {
23200
+ (0, import_react126.useEffect)(() => {
23065
23201
  let isCurrent = true;
23066
23202
  const loadStepFiles = async () => {
23067
23203
  var _a, _b;
@@ -23120,31 +23256,31 @@ function InboxMain({
23120
23256
  isCurrent = false;
23121
23257
  };
23122
23258
  }, [activeWorkflowStepId, refreshKey]);
23123
- const [dynamicColumns, setDynamicColumns] = (0, import_react125.useState)([
23259
+ const [dynamicColumns, setDynamicColumns] = (0, import_react126.useState)([
23124
23260
  { key: "department", label: "Department", width: "190px", visible: true },
23125
23261
  { key: "applicant", label: "Applicant / Entity", width: "210px", visible: true },
23126
23262
  { key: "category", label: "Category / Type", width: "170px", visible: true },
23127
23263
  { key: "financialYear", label: "Financial Year", width: "120px", visible: true }
23128
23264
  ]);
23129
- const [columnDropdownOpen, setColumnDropdownOpen] = (0, import_react125.useState)(false);
23130
- const columnDropdownRef = (0, import_react125.useRef)(null);
23131
- const [searchQuery, setSearchQuery] = (0, import_react125.useState)("");
23132
- const [priorityFilter, setPriorityFilter] = (0, import_react125.useState)("all");
23133
- const [pageSize, setPageSize] = (0, import_react125.useState)(10);
23134
- const [currentPage, setCurrentPage] = (0, import_react125.useState)(1);
23135
- const [sortColumn, setSortColumn] = (0, import_react125.useState)("");
23136
- const [sortDirection, setSortDirection] = (0, import_react125.useState)("asc");
23137
- const [poolModalOpen, setPoolModalOpen] = (0, import_react125.useState)(false);
23138
- const [selectedPoolFile, setSelectedPoolFile] = (0, import_react125.useState)(null);
23139
- const [isClaimingPool, setIsClaimingPool] = (0, import_react125.useState)(false);
23140
- const [actionModalOpen, setActionModalOpen] = (0, import_react125.useState)(false);
23141
- const [selectedActionFile, setSelectedActionFile] = (0, import_react125.useState)(null);
23142
- const [viewModalOpen, setViewModalOpen] = (0, import_react125.useState)(false);
23143
- const [selectedViewFile, setSelectedViewFile] = (0, import_react125.useState)(null);
23144
- const tableRef = (0, import_react125.useRef)(null);
23145
- const [hoveredFileCard, setHoveredFileCard] = (0, import_react125.useState)(null);
23146
- const [hoverTimeoutId, setHoverTimeoutId] = (0, import_react125.useState)(null);
23147
- const hiddenDynamicColumns = (0, import_react125.useMemo)(
23265
+ const [columnDropdownOpen, setColumnDropdownOpen] = (0, import_react126.useState)(false);
23266
+ const columnDropdownRef = (0, import_react126.useRef)(null);
23267
+ const [searchQuery, setSearchQuery] = (0, import_react126.useState)("");
23268
+ const [priorityFilter, setPriorityFilter] = (0, import_react126.useState)("all");
23269
+ const [pageSize, setPageSize] = (0, import_react126.useState)(10);
23270
+ const [currentPage, setCurrentPage] = (0, import_react126.useState)(1);
23271
+ const [sortColumn, setSortColumn] = (0, import_react126.useState)("");
23272
+ const [sortDirection, setSortDirection] = (0, import_react126.useState)("asc");
23273
+ const [poolModalOpen, setPoolModalOpen] = (0, import_react126.useState)(false);
23274
+ const [selectedPoolFile, setSelectedPoolFile] = (0, import_react126.useState)(null);
23275
+ const [isClaimingPool, setIsClaimingPool] = (0, import_react126.useState)(false);
23276
+ const [actionModalOpen, setActionModalOpen] = (0, import_react126.useState)(false);
23277
+ const [selectedActionFile, setSelectedActionFile] = (0, import_react126.useState)(null);
23278
+ const [viewModalOpen, setViewModalOpen] = (0, import_react126.useState)(false);
23279
+ const [selectedViewFile, setSelectedViewFile] = (0, import_react126.useState)(null);
23280
+ const tableRef = (0, import_react126.useRef)(null);
23281
+ const [hoveredFileCard, setHoveredFileCard] = (0, import_react126.useState)(null);
23282
+ const [hoverTimeoutId, setHoverTimeoutId] = (0, import_react126.useState)(null);
23283
+ const hiddenDynamicColumns = (0, import_react126.useMemo)(
23148
23284
  () => dynamicColumns.filter((col) => !col.visible),
23149
23285
  [dynamicColumns]
23150
23286
  );
@@ -23202,12 +23338,12 @@ function InboxMain({
23202
23338
  }, 120);
23203
23339
  setHoverTimeoutId(timer);
23204
23340
  };
23205
- (0, import_react125.useEffect)(() => {
23341
+ (0, import_react126.useEffect)(() => {
23206
23342
  return () => {
23207
23343
  if (hoverTimeoutId) clearTimeout(hoverTimeoutId);
23208
23344
  };
23209
23345
  }, [hoverTimeoutId]);
23210
- (0, import_react125.useEffect)(() => {
23346
+ (0, import_react126.useEffect)(() => {
23211
23347
  const handleScroll = () => {
23212
23348
  if (hoveredFileCard) {
23213
23349
  setHoveredFileCard(null);
@@ -23216,7 +23352,7 @@ function InboxMain({
23216
23352
  window.addEventListener("scroll", handleScroll, true);
23217
23353
  return () => window.removeEventListener("scroll", handleScroll, true);
23218
23354
  }, [hoveredFileCard]);
23219
- (0, import_react125.useEffect)(() => {
23355
+ (0, import_react126.useEffect)(() => {
23220
23356
  const handleOutsideClick = (e) => {
23221
23357
  if (columnDropdownRef.current && !columnDropdownRef.current.contains(e.target)) {
23222
23358
  setColumnDropdownOpen(false);
@@ -23227,7 +23363,7 @@ function InboxMain({
23227
23363
  }
23228
23364
  return () => document.removeEventListener("mousedown", handleOutsideClick);
23229
23365
  }, [columnDropdownOpen]);
23230
- (0, import_react125.useEffect)(() => {
23366
+ (0, import_react126.useEffect)(() => {
23231
23367
  const handleOutsideClick = (e) => {
23232
23368
  if (roleDropdownRef.current && !roleDropdownRef.current.contains(e.target)) {
23233
23369
  setRoleDropdownOpen(false);
@@ -23246,7 +23382,7 @@ function InboxMain({
23246
23382
  const handleSelectAllColumns = (val) => {
23247
23383
  setDynamicColumns((prev) => prev.map((col) => __spreadProps(__spreadValues({}, col), { visible: val })));
23248
23384
  };
23249
- const currentTabRawData = (0, import_react125.useMemo)(() => {
23385
+ const currentTabRawData = (0, import_react126.useMemo)(() => {
23250
23386
  switch (activeTab) {
23251
23387
  case "filePool":
23252
23388
  return filePoolFiles;
@@ -23258,7 +23394,7 @@ function InboxMain({
23258
23394
  return filePoolFiles;
23259
23395
  }
23260
23396
  }, [activeTab, filePoolFiles, myFiles, totalFiles]);
23261
- const filteredData = (0, import_react125.useMemo)(() => {
23397
+ const filteredData = (0, import_react126.useMemo)(() => {
23262
23398
  let result = [...currentTabRawData];
23263
23399
  if (searchQuery.trim()) {
23264
23400
  const q = searchQuery.toLowerCase().trim();
@@ -23302,9 +23438,9 @@ function InboxMain({
23302
23438
  };
23303
23439
  const renderSortIndicator = (column) => {
23304
23440
  if (sortColumn !== column) {
23305
- return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiArrowUpDownLine, { size: 13, className: "fc:text-slate-300 fc:ml-1" });
23441
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiArrowUpDownLine, { size: 13, className: "fc:text-slate-300 fc:ml-1" });
23306
23442
  }
23307
- return sortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiArrowUpSLine, { size: 15, className: "fc:text-blue-600 fc:ml-1" }) : /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiArrowDownSLine, { size: 15, className: "fc:text-blue-600 fc:ml-1" });
23443
+ return sortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiArrowUpSLine, { size: 15, className: "fc:text-blue-600 fc:ml-1" }) : /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiArrowDownSLine, { size: 15, className: "fc:text-blue-600 fc:ml-1" });
23308
23444
  };
23309
23445
  const handleOpenPoolModal = (file) => {
23310
23446
  setSelectedPoolFile(file);
@@ -23489,7 +23625,7 @@ function InboxMain({
23489
23625
  link.click();
23490
23626
  document.body.removeChild(link);
23491
23627
  };
23492
- const visibleDynamicColumns = (0, import_react125.useMemo)(
23628
+ const visibleDynamicColumns = (0, import_react126.useMemo)(
23493
23629
  () => dynamicColumns.filter((c) => c.visible),
23494
23630
  [dynamicColumns]
23495
23631
  );
@@ -23507,7 +23643,8 @@ function InboxMain({
23507
23643
  },
23508
23644
  onBackToInbox: () => setViewMode("table"),
23509
23645
  onSubmitAction: handleActionSubmit,
23510
- refreshKey
23646
+ refreshKey,
23647
+ userName
23511
23648
  }
23512
23649
  );
23513
23650
  }
@@ -23534,12 +23671,12 @@ function InboxMain({
23534
23671
  ),
23535
23672
  /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: "fc:relative fc:flex fc:items-center fc:gap-3 fc:bg-slate-50/90 fc:border fc:border-slate-200/80 fc:rounded-2xl fc:p-1.5 fc:pr-3.5 fc:shadow-sm", ref: roleDropdownRef, children: [
23536
23673
  /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: "fc:relative fc:shrink-0", children: [
23537
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: "fc:w-9 fc:h-9 fc:rounded-xl fc:bg-gradient-to-br fc:from-blue-600 fc:to-indigo-600 fc:text-white fc:font-extrabold fc:text-xs fc:flex fc:items-center fc:justify-center fc:shadow-sm", children: "D" }),
23674
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: "fc:w-9 fc:h-9 fc:rounded-xl fc:bg-gradient-to-br fc:from-blue-600 fc:to-indigo-600 fc:text-white fc:font-extrabold fc:text-xs fc:flex fc:items-center fc:justify-center fc:shadow-sm", children: userInitial }),
23538
23675
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: "fc:absolute fc:-bottom-0.5 fc:-right-0.5 fc:w-2.5 fc:h-2.5 fc:bg-emerald-500 fc:border-2 fc:border-white fc:rounded-full" })
23539
23676
  ] }),
23540
23677
  /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: "fc:flex fc:flex-col fc:justify-center", children: [
23541
23678
  /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2", children: [
23542
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: "fc:text-xs fc:font-extrabold fc:text-slate-800", children: "Dummy" }),
23679
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: "fc:text-xs fc:font-extrabold fc:text-slate-800", children: userName || "User" }),
23543
23680
  /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
23544
23681
  "button",
23545
23682
  {
@@ -23550,7 +23687,7 @@ function InboxMain({
23550
23687
  className: "fc:inline-flex fc:items-center fc:gap-1 fc:rounded-lg fc:border fc:border-blue-200 fc:bg-blue-50 fc:px-2 fc:py-1 fc:text-[10px] fc:font-bold fc:text-blue-700 fc:transition-colors hover:fc:bg-blue-100 focus-visible:fc:outline-none focus-visible:fc:ring-2 focus-visible:fc:ring-blue-400",
23551
23688
  children: [
23552
23689
  activeRole,
23553
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiArrowDownSLine, { size: 12 })
23690
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiArrowDownSLine, { size: 12 })
23554
23691
  ]
23555
23692
  }
23556
23693
  )
@@ -23613,7 +23750,7 @@ function InboxMain({
23613
23750
  onClick: handleRefresh,
23614
23751
  title: "Refresh Table",
23615
23752
  className: "fc:h-9 fc:w-9 fc:flex fc:items-center fc:justify-center fc:border fc:border-slate-200 fc:rounded-xl fc:text-slate-600 hover:fc:bg-slate-50 fc:bg-white fc:shadow-sm fc:transition-all",
23616
- children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiRefreshLine, { size: 16 })
23753
+ children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiRefreshLine, { size: 16 })
23617
23754
  }
23618
23755
  )
23619
23756
  ] })
@@ -23629,7 +23766,7 @@ function InboxMain({
23629
23766
  onClick: () => handleTabChange("filePool"),
23630
23767
  className: `fc:flex fc:items-center fc:gap-2.5 fc:px-4 fc:py-2 fc:rounded-xl fc:text-xs fc:font-bold fc:transition-all ${activeTab === "filePool" ? "fc:bg-blue-600 fc:text-white fc:shadow-md fc:shadow-blue-500/25" : "fc:text-slate-600 hover:fc:text-slate-900 hover:fc:bg-white/60"}`,
23631
23768
  children: [
23632
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiInboxArchiveLine, { size: 16 }),
23769
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiInboxArchiveLine, { size: 16 }),
23633
23770
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { children: "Unclaimed Files" }),
23634
23771
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
23635
23772
  "span",
@@ -23652,7 +23789,7 @@ function InboxMain({
23652
23789
  onClick: () => handleTabChange("myFiles"),
23653
23790
  className: `fc:flex fc:items-center fc:gap-2.5 fc:px-4 fc:py-2 fc:rounded-xl fc:text-xs fc:font-bold fc:transition-all ${activeTab === "myFiles" ? "fc:bg-emerald-600 fc:text-white fc:shadow-md fc:shadow-emerald-500/25" : "fc:text-slate-600 hover:fc:text-slate-900 hover:fc:bg-white/60"}`,
23654
23791
  children: [
23655
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiUserReceivedLine, { size: 16 }),
23792
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiUserReceivedLine, { size: 16 }),
23656
23793
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { children: "My Files" }),
23657
23794
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
23658
23795
  "span",
@@ -23675,7 +23812,7 @@ function InboxMain({
23675
23812
  onClick: () => handleTabChange("totalFiles"),
23676
23813
  className: `fc:flex fc:items-center fc:gap-2.5 fc:px-4 fc:py-2 fc:rounded-xl fc:text-xs fc:font-bold fc:transition-all ${activeTab === "totalFiles" ? "fc:bg-slate-800 fc:text-white fc:shadow-md fc:shadow-slate-800/25" : "fc:text-slate-600 hover:fc:text-slate-900 hover:fc:bg-white/60"}`,
23677
23814
  children: [
23678
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiFileUploadLine, { size: 16 }),
23815
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiFileUploadLine, { size: 16 }),
23679
23816
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { children: "Completed Files" }),
23680
23817
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
23681
23818
  "span",
@@ -23709,7 +23846,7 @@ function InboxMain({
23709
23846
  }
23710
23847
  ),
23711
23848
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
23712
- import_react126.RiSearchLine,
23849
+ import_react127.RiSearchLine,
23713
23850
  {
23714
23851
  size: 15,
23715
23852
  className: "fc:absolute fc:left-3 fc:top-2.5 fc:text-slate-400 fc:pointer-events-none"
@@ -23724,7 +23861,7 @@ function InboxMain({
23724
23861
  onClick: () => setColumnDropdownOpen((prev) => !prev),
23725
23862
  className: `fc:h-9 fc:px-3 fc:flex fc:items-center fc:gap-2 fc:border fc:rounded-xl fc:text-xs fc:font-bold fc:transition-all ${columnDropdownOpen ? "fc:border-blue-500 fc:bg-blue-50/60 fc:text-blue-700 fc:ring-2 fc:ring-blue-500/10" : "fc:border-slate-200 fc:bg-white fc:text-slate-700 hover:fc:bg-slate-50"}`,
23726
23863
  children: [
23727
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiLayoutColumnLine, { size: 15, className: "fc:text-blue-600" }),
23864
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiLayoutColumnLine, { size: 15, className: "fc:text-blue-600" }),
23728
23865
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { children: "Dynamic Columns" }),
23729
23866
  /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("span", { className: "fc:bg-blue-100 fc:text-blue-700 fc:text-[10px] fc:font-extrabold fc:px-1.5 fc:py-0.2 fc:rounded-full", children: [
23730
23867
  visibleDynamicColumns.length,
@@ -23807,7 +23944,7 @@ function InboxMain({
23807
23944
  title: "Export as CSV",
23808
23945
  className: "fc:h-9 fc:px-3 fc:flex fc:items-center fc:gap-1.5 fc:border fc:border-slate-200 fc:rounded-xl fc:text-xs fc:font-bold fc:text-slate-700 hover:fc:bg-slate-50 fc:transition-all",
23809
23946
  children: [
23810
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiDownload2Line, { size: 15 }),
23947
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiDownload2Line, { size: 15 }),
23811
23948
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: "fc:hidden sm:fc:inline", children: "Export" })
23812
23949
  ]
23813
23950
  }
@@ -23988,7 +24125,7 @@ function InboxMain({
23988
24125
  colSpan: 10 + visibleDynamicColumns.length + (activeTab === "totalFiles" ? 1 : 0),
23989
24126
  className: "fc:py-12 fc:text-center",
23990
24127
  children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: "fc:flex fc:flex-col fc:items-center fc:justify-center fc:gap-2 fc:text-slate-400", children: [
23991
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiInboxLine, { size: 36, className: "fc:text-slate-300" }),
24128
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiInboxLine, { size: 36, className: "fc:text-slate-300" }),
23992
24129
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("p", { className: "fc:text-sm fc:font-bold fc:text-slate-600", children: "No Files Found" }),
23993
24130
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("p", { className: "fc:text-xs", children: searchQuery ? `No records matching "${searchQuery}" in ${activeTab}` : `There are currently no files in ${activeTab}` })
23994
24131
  ] })
@@ -24025,7 +24162,7 @@ function InboxMain({
24025
24162
  children: [
24026
24163
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: "fc:text-xs fc:font-extrabold hover:fc:underline", children: row.fileNumber }),
24027
24164
  hasHiddenDynamicColumns && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("span", { className: "fc:inline-flex fc:items-center fc:gap-0.5 fc:px-1.5 fc:py-0.2 fc:rounded fc:bg-amber-100/90 fc:text-amber-800 fc:text-[9px] fc:font-black fc:border fc:border-amber-200/80", children: [
24028
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiEyeOffLine, { size: 10 }),
24165
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiEyeOffLine, { size: 10 }),
24029
24166
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { children: hiddenDynamicColumns.length })
24030
24167
  ] })
24031
24168
  ]
@@ -24211,7 +24348,7 @@ function InboxMain({
24211
24348
  style: { fontSize: "12px" },
24212
24349
  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",
24213
24350
  children: [
24214
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiInboxArchiveLine, { size: 14 }),
24351
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiInboxArchiveLine, { size: 14 }),
24215
24352
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { children: "Claim" })
24216
24353
  ]
24217
24354
  }
@@ -24225,7 +24362,7 @@ function InboxMain({
24225
24362
  style: { fontSize: "11px" },
24226
24363
  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",
24227
24364
  children: [
24228
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiFileUploadLine, { size: 13 }),
24365
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiFileUploadLine, { size: 13 }),
24229
24366
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { children: "Take Action" })
24230
24367
  ]
24231
24368
  }
@@ -24250,7 +24387,7 @@ function InboxMain({
24250
24387
  style: { fontSize: "12px" },
24251
24388
  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",
24252
24389
  children: [
24253
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiEyeLine, { size: 14 }),
24390
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiEyeLine, { size: 14 }),
24254
24391
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { children: "View" })
24255
24392
  ]
24256
24393
  }
@@ -24290,7 +24427,7 @@ function InboxMain({
24290
24427
  ),
24291
24428
  Array.from({ length: totalPages }, (_, i) => i + 1).filter((p) => p === 1 || p === totalPages || Math.abs(p - currentPage) <= 1).map((p, idx, arr) => {
24292
24429
  const prev = arr[idx - 1];
24293
- return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_react125.default.Fragment, { children: [
24430
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_react126.default.Fragment, { children: [
24294
24431
  prev && p - prev > 1 && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: "fc:px-1 fc:text-xs fc:text-slate-400", children: "..." }),
24295
24432
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
24296
24433
  "button",
@@ -24374,7 +24511,7 @@ function InboxMain({
24374
24511
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: "fc:text-[11px] fc:font-bold fc:text-slate-600", children: "Hidden Fields" })
24375
24512
  ] }),
24376
24513
  /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("span", { className: "fc:inline-flex fc:items-center fc:gap-1 fc:text-[10px] fc:font-extrabold fc:px-2 fc:py-0.5 fc:rounded-md fc:bg-amber-50 fc:text-amber-800 fc:border fc:border-amber-200/80", children: [
24377
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react126.RiEyeOffLine, { size: 11 }),
24514
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react127.RiEyeOffLine, { size: 11 }),
24378
24515
  /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("span", { children: [
24379
24516
  hiddenDynamicColumns.length,
24380
24517
  " Hidden"
@@ -24412,8 +24549,8 @@ function InboxMain({
24412
24549
  }
24413
24550
 
24414
24551
  // src/components/inbox/MyFilesMain.jsx
24415
- var import_react127 = __toESM(require("react"));
24416
- var import_react128 = require("@remixicon/react");
24552
+ var import_react128 = __toESM(require("react"));
24553
+ var import_react129 = require("@remixicon/react");
24417
24554
  var import_jsx_runtime112 = require("react/jsx-runtime");
24418
24555
  function MyFilesMain(props) {
24419
24556
  return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
@@ -24424,15 +24561,15 @@ function MyFilesMain(props) {
24424
24561
  allowedTabs: ["myFiles"],
24425
24562
  title: "My Files",
24426
24563
  subtitle: "View and process files currently assigned to your queue",
24427
- icon: import_react128.RiUserReceivedLine,
24564
+ icon: import_react129.RiUserReceivedLine,
24428
24565
  iconBg: "fc:bg-gradient-to-br fc:from-emerald-500 fc:to-teal-600"
24429
24566
  }, props)
24430
24567
  );
24431
24568
  }
24432
24569
 
24433
24570
  // src/components/inbox/UnclaimedFilesMain.jsx
24434
- var import_react129 = __toESM(require("react"));
24435
- var import_react130 = require("@remixicon/react");
24571
+ var import_react130 = __toESM(require("react"));
24572
+ var import_react131 = require("@remixicon/react");
24436
24573
  var import_jsx_runtime113 = require("react/jsx-runtime");
24437
24574
  function UnclaimedFilesMain(props) {
24438
24575
  return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
@@ -24443,15 +24580,15 @@ function UnclaimedFilesMain(props) {
24443
24580
  allowedTabs: ["filePool"],
24444
24581
  title: "Unclaimed Files",
24445
24582
  subtitle: "Available files in the pool waiting to be claimed by users",
24446
- icon: import_react130.RiInboxArchiveLine,
24583
+ icon: import_react131.RiInboxArchiveLine,
24447
24584
  iconBg: "fc:bg-gradient-to-br fc:from-blue-600 fc:to-indigo-600"
24448
24585
  }, props)
24449
24586
  );
24450
24587
  }
24451
24588
 
24452
24589
  // src/components/inbox/CompletedFilesMain.jsx
24453
- var import_react131 = __toESM(require("react"));
24454
- var import_react132 = require("@remixicon/react");
24590
+ var import_react132 = __toESM(require("react"));
24591
+ var import_react133 = require("@remixicon/react");
24455
24592
  var import_jsx_runtime114 = require("react/jsx-runtime");
24456
24593
  function CompletedFilesMain(props) {
24457
24594
  return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
@@ -24462,23 +24599,23 @@ function CompletedFilesMain(props) {
24462
24599
  allowedTabs: ["totalFiles"],
24463
24600
  title: "Completed Files",
24464
24601
  subtitle: "Archive of all completed and processed workflow files",
24465
- icon: import_react132.RiFileUploadLine,
24602
+ icon: import_react133.RiFileUploadLine,
24466
24603
  iconBg: "fc:bg-gradient-to-br fc:from-slate-700 fc:to-slate-900"
24467
24604
  }, props)
24468
24605
  );
24469
24606
  }
24470
24607
 
24471
24608
  // src/components/track-application/TrackApplicationMain.jsx
24472
- var import_react135 = __toESM(require("react"));
24609
+ var import_react136 = __toESM(require("react"));
24473
24610
  var import_sweetalert232 = __toESM(require("sweetalert2"));
24474
- var import_react136 = require("@remixicon/react");
24611
+ var import_react137 = require("@remixicon/react");
24475
24612
 
24476
24613
  // src/components/track-application/TrackingSlipModal.jsx
24477
- var import_react133 = __toESM(require("react"));
24478
- var import_react134 = require("@remixicon/react");
24614
+ var import_react134 = __toESM(require("react"));
24615
+ var import_react135 = require("@remixicon/react");
24479
24616
  var import_jsx_runtime115 = require("react/jsx-runtime");
24480
24617
  function TrackingSlipModal({ isOpen, onClose, application }) {
24481
- (0, import_react133.useEffect)(() => {
24618
+ (0, import_react134.useEffect)(() => {
24482
24619
  if (!isOpen) return;
24483
24620
  const handleKeyDown = (e) => {
24484
24621
  if (e.key === "Escape") onClose();
@@ -24501,7 +24638,7 @@ function TrackingSlipModal({ isOpen, onClose, application }) {
24501
24638
  /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: "fc:relative fc:w-full fc:max-w-2xl fc:bg-white fc:rounded-3xl fc:flex fc:flex-col fc:z-10 fc:shadow-2xl fc:overflow-hidden print:fc:shadow-none print:fc:rounded-none print:fc:max-w-none print:fc:w-full", children: [
24502
24639
  /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: "fc:flex fc:justify-between fc:items-center fc:px-6 fc:py-4 fc:border-b fc:border-slate-100 fc:bg-slate-50/70 print:fc:bg-white", children: [
24503
24640
  /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-3", children: [
24504
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: "fc:w-10 fc:h-10 fc:bg-gradient-to-br fc:from-blue-600 fc:to-indigo-600 fc:text-white fc:rounded-xl fc:flex fc:items-center fc:justify-center fc:shadow-md fc:shadow-blue-500/20", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_react134.RiRouteLine, { size: 20 }) }),
24641
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: "fc:w-10 fc:h-10 fc:bg-gradient-to-br fc:from-blue-600 fc:to-indigo-600 fc:text-white fc:rounded-xl fc:flex fc:items-center fc:justify-center fc:shadow-md fc:shadow-blue-500/20", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_react135.RiRouteLine, { size: 20 }) }),
24505
24642
  /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { children: [
24506
24643
  /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("h3", { className: "fc:text-base fc:font-bold fc:text-slate-800", children: "Application Tracking Acknowledgement" }),
24507
24644
  /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("p", { className: "fc:text-xs fc:text-slate-500", children: [
@@ -24518,7 +24655,7 @@ function TrackingSlipModal({ isOpen, onClose, application }) {
24518
24655
  onClick: handlePrint,
24519
24656
  className: "fc:flex fc:items-center fc:gap-1.5 fc:px-3.5 fc:py-1.5 fc:bg-blue-600 hover:fc:bg-blue-700 fc:text-white fc:text-xs fc:font-bold fc:rounded-xl fc:shadow-sm fc:transition-all",
24520
24657
  children: [
24521
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_react134.RiPrinterLine, { size: 15 }),
24658
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_react135.RiPrinterLine, { size: 15 }),
24522
24659
  /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { children: "Print Slip" })
24523
24660
  ]
24524
24661
  }
@@ -24529,7 +24666,7 @@ function TrackingSlipModal({ isOpen, onClose, application }) {
24529
24666
  type: "button",
24530
24667
  onClick: onClose,
24531
24668
  className: "fc:text-slate-400 hover:fc:text-slate-600 hover:fc:bg-slate-100 fc:p-1.5 fc:rounded-full fc:transition-all",
24532
- children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_react134.RiCloseLine, { size: 20 })
24669
+ children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_react135.RiCloseLine, { size: 20 })
24533
24670
  }
24534
24671
  )
24535
24672
  ] })
@@ -24547,7 +24684,7 @@ function TrackingSlipModal({ isOpen, onClose, application }) {
24547
24684
  ] }),
24548
24685
  /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: "fc:p-4 fc:bg-slate-50/70 fc:rounded-2xl fc:border fc:border-slate-100", children: [
24549
24686
  /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-1.5 fc:text-xs fc:font-bold fc:text-slate-500 fc:mb-1", children: [
24550
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_react134.RiFileTextLine, { size: 15 }),
24687
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_react135.RiFileTextLine, { size: 15 }),
24551
24688
  /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { children: "Subject / Proposal" })
24552
24689
  ] }),
24553
24690
  /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("p", { className: "fc:text-sm fc:font-semibold fc:text-slate-800 fc:leading-relaxed", children: application.subject })
@@ -24644,7 +24781,7 @@ function TrackingSlipModal({ isOpen, onClose, application }) {
24644
24781
  onClick: handlePrint,
24645
24782
  className: "fc:flex fc:items-center fc:gap-1.5 fc:px-4 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-sm fc:transition-all",
24646
24783
  children: [
24647
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_react134.RiPrinterLine, { size: 15 }),
24784
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_react135.RiPrinterLine, { size: 15 }),
24648
24785
  /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { children: "Print Receipt" })
24649
24786
  ]
24650
24787
  }
@@ -24659,17 +24796,17 @@ var import_jsx_runtime116 = require("react/jsx-runtime");
24659
24796
  var APPLICATION_DATABASE = [];
24660
24797
  function TrackApplicationMain() {
24661
24798
  var _a, _b, _c;
24662
- const [trackQuery, setTrackQuery] = (0, import_react135.useState)("");
24663
- const [selectedApplication, setSelectedApplication] = (0, import_react135.useState)(null);
24664
- const [activeTab, setActiveTab] = (0, import_react135.useState)("timeline");
24665
- const [viewMode, setViewMode] = (0, import_react135.useState)("tracker");
24666
- const [tableSearch, setTableSearch] = (0, import_react135.useState)("");
24667
- const [priorityFilter, setPriorityFilter] = (0, import_react135.useState)("all");
24668
- const [pageSize, setPageSize] = (0, import_react135.useState)(10);
24669
- const [currentPage, setCurrentPage] = (0, import_react135.useState)(1);
24670
- const [sortColumn, setSortColumn] = (0, import_react135.useState)("");
24671
- const [sortDirection, setSortDirection] = (0, import_react135.useState)("asc");
24672
- const [slipModalOpen, setSlipModalOpen] = (0, import_react135.useState)(false);
24799
+ const [trackQuery, setTrackQuery] = (0, import_react136.useState)("");
24800
+ const [selectedApplication, setSelectedApplication] = (0, import_react136.useState)(null);
24801
+ const [activeTab, setActiveTab] = (0, import_react136.useState)("timeline");
24802
+ const [viewMode, setViewMode] = (0, import_react136.useState)("tracker");
24803
+ const [tableSearch, setTableSearch] = (0, import_react136.useState)("");
24804
+ const [priorityFilter, setPriorityFilter] = (0, import_react136.useState)("all");
24805
+ const [pageSize, setPageSize] = (0, import_react136.useState)(10);
24806
+ const [currentPage, setCurrentPage] = (0, import_react136.useState)(1);
24807
+ const [sortColumn, setSortColumn] = (0, import_react136.useState)("");
24808
+ const [sortDirection, setSortDirection] = (0, import_react136.useState)("asc");
24809
+ const [slipModalOpen, setSlipModalOpen] = (0, import_react136.useState)(false);
24673
24810
  const handleTrack = async (fileNoToTrack) => {
24674
24811
  const targetNo = (fileNoToTrack || trackQuery).trim().toUpperCase();
24675
24812
  if (!targetNo) {
@@ -24702,7 +24839,7 @@ function TrackApplicationMain() {
24702
24839
  showConfirmButton: false
24703
24840
  });
24704
24841
  };
24705
- const filteredRegistryData = (0, import_react135.useMemo)(() => {
24842
+ const filteredRegistryData = (0, import_react136.useMemo)(() => {
24706
24843
  return APPLICATION_DATABASE.filter((app) => {
24707
24844
  const q = tableSearch.toLowerCase();
24708
24845
  const matchSearch = !q || app.fileNumber.toLowerCase().includes(q) || app.subject.toLowerCase().includes(q) || app.workflowName.toLowerCase().includes(q) || app.applicant.toLowerCase().includes(q) || app.department.toLowerCase().includes(q) || app.status.toLowerCase().includes(q);
@@ -24731,9 +24868,9 @@ function TrackApplicationMain() {
24731
24868
  };
24732
24869
  const getSortIcon = (col) => {
24733
24870
  if (sortColumn !== col) {
24734
- return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiArrowUpDownLine, { size: 13, className: "fc:text-slate-400" });
24871
+ return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiArrowUpDownLine, { size: 13, className: "fc:text-slate-400" });
24735
24872
  }
24736
- return sortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiArrowUpSLine, { size: 14, className: "fc:text-blue-600" }) : /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiArrowDownSLine, { size: 14, className: "fc:text-blue-600" });
24873
+ return sortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiArrowUpSLine, { size: 14, className: "fc:text-blue-600" }) : /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiArrowDownSLine, { size: 14, className: "fc:text-blue-600" });
24737
24874
  };
24738
24875
  const handleExportCSV = () => {
24739
24876
  const headers = [
@@ -24773,7 +24910,7 @@ function TrackApplicationMain() {
24773
24910
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className: "fc:absolute fc:inset-x-0 fc:top-0 fc:h-1 fc:bg-gradient-to-r fc:from-blue-600 fc:via-cyan-500 fc:to-indigo-600" }),
24774
24911
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "fc:relative fc:flex fc:items-center fc:justify-between fc:px-6 fc:py-3 fc:gap-4", children: [
24775
24912
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-3.5", children: [
24776
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className: "fc:flex fc:h-11 fc:w-11 fc:items-center fc:justify-center fc:rounded-xl fc:bg-gradient-to-br fc:from-blue-600 fc:to-indigo-600 fc:text-white fc:shadow-md fc:shadow-blue-500/20 fc:shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiRouteLine, { size: 22 }) }),
24913
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className: "fc:flex fc:h-11 fc:w-11 fc:items-center fc:justify-center fc:rounded-xl fc:bg-gradient-to-br fc:from-blue-600 fc:to-indigo-600 fc:text-white fc:shadow-md fc:shadow-blue-500/20 fc:shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiRouteLine, { size: 22 }) }),
24777
24914
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { children: [
24778
24915
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("h1", { className: "fc:text-xl fc:font-extrabold fc:text-slate-800 fc:tracking-tight fc:leading-tight", children: "Track Application" }),
24779
24916
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("p", { className: "fc:text-[11px] fc:text-slate-500 fc:mt-0.5", children: "Real-time lifecycle tracking, stage progression, SLA timeline, and movement audit" })
@@ -24788,7 +24925,7 @@ function TrackApplicationMain() {
24788
24925
  onClick: () => handleTrack(selectedApplication == null ? void 0 : selectedApplication.fileNumber),
24789
24926
  title: "Refresh Tracking Data",
24790
24927
  className: "fc:h-9 fc:w-9 fc:flex fc:items-center fc:justify-center fc:border fc:border-slate-200 fc:rounded-xl fc:text-slate-600 hover:fc:bg-slate-50 fc:bg-white fc:shadow-sm fc:transition-all fc:cursor-pointer",
24791
- children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiRefreshLine, { size: 16 })
24928
+ children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiRefreshLine, { size: 16 })
24792
24929
  }
24793
24930
  )
24794
24931
  ] })
@@ -24803,7 +24940,7 @@ function TrackApplicationMain() {
24803
24940
  onClick: () => setViewMode("tracker"),
24804
24941
  className: `fc:flex fc:items-center fc:gap-2 fc:px-3.5 fc:py-2 fc:rounded-lg fc:text-xs fc:font-bold fc:transition-all ${viewMode === "tracker" ? "fc:bg-blue-600 fc:text-white fc:shadow-sm" : "fc:text-slate-600 hover:fc:text-slate-900"}`,
24805
24942
  children: [
24806
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiRouteLine, { size: 15 }),
24943
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiRouteLine, { size: 15 }),
24807
24944
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { children: "Tracking Dashboard" })
24808
24945
  ]
24809
24946
  }
@@ -24815,7 +24952,7 @@ function TrackApplicationMain() {
24815
24952
  onClick: () => setViewMode("registry"),
24816
24953
  className: `fc:flex fc:items-center fc:gap-2 fc:px-3.5 fc:py-2 fc:rounded-lg fc:text-xs fc:font-bold fc:transition-all ${viewMode === "registry" ? "fc:bg-blue-600 fc:text-white fc:shadow-sm" : "fc:text-slate-600 hover:fc:text-slate-900"}`,
24817
24954
  children: [
24818
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiFileListLine, { size: 15 }),
24955
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiFileListLine, { size: 15 }),
24819
24956
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { children: "Applications Registry" }),
24820
24957
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
24821
24958
  "span",
@@ -24830,7 +24967,7 @@ function TrackApplicationMain() {
24830
24967
  ] }),
24831
24968
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:flex-1 lg:fc:max-w-md", children: [
24832
24969
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "fc:relative fc:flex-1", children: [
24833
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "fc:absolute fc:left-3 fc:top-1/2 fc:-translate-y-1/2 fc:text-slate-400", children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiSearchLine, { size: 16 }) }),
24970
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "fc:absolute fc:left-3 fc:top-1/2 fc:-translate-y-1/2 fc:text-slate-400", children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiSearchLine, { size: 16 }) }),
24834
24971
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
24835
24972
  "input",
24836
24973
  {
@@ -24848,7 +24985,7 @@ function TrackApplicationMain() {
24848
24985
  type: "button",
24849
24986
  onClick: () => setTrackQuery(""),
24850
24987
  className: "fc:absolute fc:right-2.5 fc:top-1/2 fc:-translate-y-1/2 fc:text-slate-400 hover:fc:text-slate-600",
24851
- children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiCloseLine, { size: 14 })
24988
+ children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiCloseLine, { size: 14 })
24852
24989
  }
24853
24990
  )
24854
24991
  ] }),
@@ -24859,7 +24996,7 @@ function TrackApplicationMain() {
24859
24996
  onClick: () => handleTrack(),
24860
24997
  className: "fc:flex fc:items-center fc:gap-1.5 fc:px-4 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-sm fc:transition-all fc:shrink-0 fc:cursor-pointer disabled:fc:opacity-50",
24861
24998
  children: [
24862
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiRouteLine, { size: 14 }),
24999
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiRouteLine, { size: 14 }),
24863
25000
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { children: "Track Now" })
24864
25001
  ]
24865
25002
  }
@@ -24876,7 +25013,7 @@ function TrackApplicationMain() {
24876
25013
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-3 fc:flex-wrap", children: [
24877
25014
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:flex-wrap", children: [
24878
25015
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "fc:inline-flex fc:items-center fc:gap-1.5 fc:bg-blue-600 fc:text-white fc:text-xs fc:font-bold fc:px-3 fc:py-1 fc:rounded-lg fc:shadow-sm", children: [
24879
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiRouteLine, { size: 13 }),
25016
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiRouteLine, { size: 13 }),
24880
25017
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("span", { children: [
24881
25018
  "App No: ",
24882
25019
  selectedApplication.fileNumber
@@ -24889,7 +25026,7 @@ function TrackApplicationMain() {
24889
25026
  onClick: () => handleCopyFileNumber(selectedApplication.fileNumber),
24890
25027
  title: "Copy Application Number",
24891
25028
  className: "fc:text-blue-600 hover:fc:text-blue-800 fc:p-1 fc:rounded-md hover:fc:bg-blue-100/70 fc:transition-all",
24892
- children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiFileCopyLine, { size: 14 })
25029
+ children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiFileCopyLine, { size: 14 })
24893
25030
  }
24894
25031
  ),
24895
25032
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "fc:text-xs fc:font-bold fc:px-2.5 fc:py-0.5 fc:rounded-full fc:bg-white fc:border fc:border-slate-200 fc:text-slate-800", children: selectedApplication.workflowName }),
@@ -24915,7 +25052,7 @@ function TrackApplicationMain() {
24915
25052
  onClick: () => setSlipModalOpen(true),
24916
25053
  className: "fc:flex fc:items-center fc:gap-1.5 fc:px-3 fc:py-1.5 fc:bg-blue-600 hover:fc:bg-blue-700 fc:text-white fc:text-xs fc:font-bold fc:rounded-xl fc:shadow-sm fc:transition-all fc:shrink-0",
24917
25054
  children: [
24918
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiPrinterLine, { size: 13 }),
25055
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiPrinterLine, { size: 13 }),
24919
25056
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { children: "Print Tracking Slip" })
24920
25057
  ]
24921
25058
  }
@@ -24925,17 +25062,17 @@ function TrackApplicationMain() {
24925
25062
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-3 fc:mt-2.5 fc:pt-2.5 fc:border-t fc:border-blue-100/70 fc:text-xs fc:text-slate-600 fc:flex-wrap", children: [
24926
25063
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-4 fc:flex-wrap", children: [
24927
25064
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("span", { className: "fc:flex fc:items-center fc:gap-1", children: [
24928
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiBuildingLine, { size: 13, className: "fc:text-slate-400" }),
25065
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiBuildingLine, { size: 13, className: "fc:text-slate-400" }),
24929
25066
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "fc:text-slate-400", children: "Dept:" }),
24930
25067
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("strong", { className: "fc:text-slate-700", children: selectedApplication.department })
24931
25068
  ] }),
24932
25069
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("span", { className: "fc:flex fc:items-center fc:gap-1", children: [
24933
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiUserLine, { size: 13, className: "fc:text-slate-400" }),
25070
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiUserLine, { size: 13, className: "fc:text-slate-400" }),
24934
25071
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "fc:text-slate-400", children: "Applicant:" }),
24935
25072
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("strong", { className: "fc:text-slate-700", children: selectedApplication.applicant })
24936
25073
  ] }),
24937
25074
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("span", { className: "fc:flex fc:items-center fc:gap-1", children: [
24938
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiTimeLine, { size: 13, className: "fc:text-slate-400" }),
25075
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiTimeLine, { size: 13, className: "fc:text-slate-400" }),
24939
25076
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "fc:text-slate-400", children: "Submitted:" }),
24940
25077
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("strong", { className: "fc:text-slate-700", children: selectedApplication.receivedDate })
24941
25078
  ] })
@@ -25003,7 +25140,7 @@ function TrackApplicationMain() {
25003
25140
  "span",
25004
25141
  {
25005
25142
  className: `fc:w-5 fc:h-5 fc:rounded-full fc:flex fc:items-center fc:justify-center fc:text-[10px] fc:font-extrabold fc:shrink-0 ${isCompleted ? "fc:bg-emerald-600 fc:text-white" : isInProgress ? "fc:bg-blue-600 fc:text-white" : "fc:bg-slate-200 fc:text-slate-600"}`,
25006
- children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiCheckLine, { size: 12 }) : idx + 1
25143
+ children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiCheckLine, { size: 12 }) : idx + 1
25007
25144
  }
25008
25145
  ),
25009
25146
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
@@ -25053,7 +25190,7 @@ function TrackApplicationMain() {
25053
25190
  onClick: () => setActiveTab("timeline"),
25054
25191
  className: `fc:flex fc:items-center fc:gap-1.5 fc:px-3.5 fc:py-2 fc:text-xs fc:font-bold fc:border-b-2 fc:transition-all ${activeTab === "timeline" ? "fc:border-blue-600 fc:text-blue-600 fc:bg-white fc:rounded-t-lg" : "fc:border-transparent fc:text-slate-600 hover:fc:text-slate-900"}`,
25055
25192
  children: [
25056
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiRouteLine, { size: 14 }),
25193
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiRouteLine, { size: 14 }),
25057
25194
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { children: "Movement History & Audit Trail" }),
25058
25195
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "fc:bg-slate-200 fc:text-slate-700 fc:px-1.5 fc:py-0.2 fc:rounded-full fc:text-[9px]", children: ((_b = selectedApplication.movementHistory) == null ? void 0 : _b.length) || 0 })
25059
25196
  ]
@@ -25066,7 +25203,7 @@ function TrackApplicationMain() {
25066
25203
  onClick: () => setActiveTab("details"),
25067
25204
  className: `fc:flex fc:items-center fc:gap-1.5 fc:px-3.5 fc:py-2 fc:text-xs fc:font-bold fc:border-b-2 fc:transition-all ${activeTab === "details" ? "fc:border-blue-600 fc:text-blue-600 fc:bg-white fc:rounded-t-lg" : "fc:border-transparent fc:text-slate-600 hover:fc:text-slate-900"}`,
25068
25205
  children: [
25069
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiFileListLine, { size: 14 }),
25206
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiFileListLine, { size: 14 }),
25070
25207
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { children: "Application Full Attributes" })
25071
25208
  ]
25072
25209
  }
@@ -25078,7 +25215,7 @@ function TrackApplicationMain() {
25078
25215
  onClick: () => setActiveTab("documents"),
25079
25216
  className: `fc:flex fc:items-center fc:gap-1.5 fc:px-3.5 fc:py-2 fc:text-xs fc:font-bold fc:border-b-2 fc:transition-all ${activeTab === "documents" ? "fc:border-blue-600 fc:text-blue-600 fc:bg-white fc:rounded-t-lg" : "fc:border-transparent fc:text-slate-600 hover:fc:text-slate-900"}`,
25080
25217
  children: [
25081
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiFileTextLine, { size: 14 }),
25218
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiFileTextLine, { size: 14 }),
25082
25219
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { children: "Uploaded Documents" }),
25083
25220
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "fc:bg-slate-200 fc:text-slate-700 fc:px-1.5 fc:py-0.2 fc:rounded-full fc:text-[9px]", children: ((_c = selectedApplication.documents) == null ? void 0 : _c.length) || 0 })
25084
25221
  ]
@@ -25183,7 +25320,7 @@ function TrackApplicationMain() {
25183
25320
  ] })
25184
25321
  ] }),
25185
25322
  !selectedApplication && /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "fc:flex fc:min-h-72 fc:flex-col fc:items-center fc:justify-center fc:gap-2 fc:text-center", children: [
25186
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiRouteLine, { size: 28, className: "fc:text-slate-300" }),
25323
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiRouteLine, { size: 28, className: "fc:text-slate-300" }),
25187
25324
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("h2", { className: "fc:text-sm fc:font-bold fc:text-slate-700", children: "No tracking data available" }),
25188
25325
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("p", { className: "fc:max-w-md fc:text-xs fc:text-slate-500", children: "Configure the application tracking endpoint to load real application status and movement details." })
25189
25326
  ] })
@@ -25196,7 +25333,7 @@ function TrackApplicationMain() {
25196
25333
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "fc:flex fc:justify-between fc:items-center fc:gap-3 fc:pb-3 fc:border-b fc:border-slate-100 fc:flex-wrap", children: [
25197
25334
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2.5 fc:flex-1 fc:max-w-md", children: [
25198
25335
  /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "fc:relative fc:w-full", children: [
25199
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "fc:absolute fc:left-3 fc:top-1/2 fc:-translate-y-1/2 fc:text-slate-400", children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiSearchLine, { size: 15 }) }),
25336
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "fc:absolute fc:left-3 fc:top-1/2 fc:-translate-y-1/2 fc:text-slate-400", children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiSearchLine, { size: 15 }) }),
25200
25337
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
25201
25338
  "input",
25202
25339
  {
@@ -25238,7 +25375,7 @@ function TrackApplicationMain() {
25238
25375
  onClick: handleExportCSV,
25239
25376
  className: "fc:flex fc:items-center fc:gap-1.5 fc:px-3 fc:py-1.5 fc:border fc:border-slate-200 fc:rounded-xl fc:text-xs fc:font-bold fc:text-slate-600 hover:fc:bg-slate-50 fc:transition-all",
25240
25377
  children: [
25241
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiDownload2Line, { size: 14 }),
25378
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiDownload2Line, { size: 14 }),
25242
25379
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { children: "Export CSV" })
25243
25380
  ]
25244
25381
  }
@@ -25383,7 +25520,7 @@ function TrackApplicationMain() {
25383
25520
  onClick: () => handleTrack(item.fileNumber),
25384
25521
  className: "fc:inline-flex fc:items-center fc:gap-1 fc:px-3 fc:py-1 fc:bg-blue-600 hover:fc:bg-blue-700 fc:text-white fc:font-bold fc:text-xs fc:rounded-full fc:transition-all fc:shadow-sm",
25385
25522
  children: [
25386
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react136.RiRouteLine, { size: 13 }),
25523
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react137.RiRouteLine, { size: 13 }),
25387
25524
  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { children: "Track" })
25388
25525
  ]
25389
25526
  }
@@ -25458,48 +25595,48 @@ function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
25458
25595
  const router = (0, import_router.useRouter)();
25459
25596
  const resolvedSidebarConfig = sidebar != null ? sidebar : sidebarConfig;
25460
25597
  const masterWorkflowItems = [
25461
- { name: "Workflow Type", component: "workflowType", icon: import_react138.RiGitMergeLine, configKey: "isWorkflowType" },
25462
- { name: "Workflow", component: "workflow", icon: import_react138.RiNodeTree, configKey: "isWorkflow" },
25463
- { name: "Workflow Step", component: "workflowStep", icon: import_react138.RiGitBranchLine, configKey: "isWorkflowStep" },
25464
- { name: "Workflow Transition", component: "workflowTransition", icon: import_react138.RiCornerDownRightLine, configKey: "isWorkflowTransition" },
25465
- { name: "Module", component: "module", icon: import_react138.RiFolder3Line, configKey: "isModule" },
25466
- { name: "Status", component: "status", icon: import_react138.RiCheckboxCircleLine, configKey: "isStatus" }
25598
+ { name: "Workflow Type", component: "workflowType", icon: import_react139.RiGitMergeLine, configKey: "isWorkflowType" },
25599
+ { name: "Workflow", component: "workflow", icon: import_react139.RiNodeTree, configKey: "isWorkflow" },
25600
+ { name: "Workflow Step", component: "workflowStep", icon: import_react139.RiGitBranchLine, configKey: "isWorkflowStep" },
25601
+ { name: "Workflow Transition", component: "workflowTransition", icon: import_react139.RiCornerDownRightLine, configKey: "isWorkflowTransition" },
25602
+ { name: "Module", component: "module", icon: import_react139.RiFolder3Line, configKey: "isModule" },
25603
+ { name: "Status", component: "status", icon: import_react139.RiCheckboxCircleLine, configKey: "isStatus" }
25467
25604
  ];
25468
25605
  const masterPermissionItems = [
25469
- { name: "Step Permission", component: "step_permission_main", icon: import_react138.RiUserSettingsLine, configKey: "isStepPermission" },
25470
- { name: "Update Permission", component: "FormFieldMain", icon: import_react138.RiFileList3Line, configKey: "isFormField" },
25471
- { name: "Assignment Rule", component: "AssignmentRuleMain", icon: import_react138.RiFileShieldLine, configKey: "isAssignmentRule" }
25606
+ { name: "Step Permission", component: "step_permission_main", icon: import_react139.RiUserSettingsLine, configKey: "isStepPermission" },
25607
+ { name: "Applicant Editable Fields", component: "FormFieldMain", icon: import_react139.RiFileList3Line, configKey: "isFormField" },
25608
+ { name: "Assignment Rule", component: "AssignmentRuleMain", icon: import_react139.RiFileShieldLine, configKey: "isAssignmentRule" }
25472
25609
  ];
25473
25610
  const masterHierarchyItems = [
25474
- { name: "Hierarchy Node", component: "HierarchyNodeMain", icon: import_react138.RiNodeTree, configKey: "isHierarchyNode" },
25475
- { name: "Workflow Hierarchy Node Mapping", component: "Workflow_Step_Hierarchy_Mapping_Main", icon: import_react138.RiUserSharedLine, configKey: "isWorkflowHierarchyMapping" },
25476
- { name: "Workflow Step User Mapping", component: "User_hierarchy_mapping_main", icon: import_react138.RiUserSharedLine, configKey: "isUserHierarchyMapping" },
25477
- { name: "Workflow Settings", component: "WorkflowSettingMain", icon: import_react138.RiSettings4Line, configKey: "isWorkflowSettings" }
25611
+ { name: "Hierarchy Node", component: "HierarchyNodeMain", icon: import_react139.RiNodeTree, configKey: "isHierarchyNode" },
25612
+ { name: "Workflow Hierarchy Node Mapping", component: "Workflow_Step_Hierarchy_Mapping_Main", icon: import_react139.RiUserSharedLine, configKey: "isWorkflowHierarchyMapping" },
25613
+ { name: "Workflow Step User Mapping", component: "User_hierarchy_mapping_main", icon: import_react139.RiUserSharedLine, configKey: "isUserHierarchyMapping" },
25614
+ { name: "Workflow Settings", component: "WorkflowSettingMain", icon: import_react139.RiSettings4Line, configKey: "isWorkflowSettings" }
25478
25615
  ];
25479
25616
  const masterDocumentItems = [
25480
- { name: "Document Configuration", component: "DocumentConfigurationmain", icon: import_react138.RiFileSettingsLine, configKey: "isDocumentConfiguration" }
25617
+ { name: "Document Configuration", component: "DocumentConfigurationmain", icon: import_react139.RiFileSettingsLine, configKey: "isDocumentConfiguration" }
25481
25618
  ];
25482
25619
  const masterFileItems = [
25483
25620
  // { name: "Inbox", component: "InboxMain", icon: RiInboxLine, configKey: "isInbox", badge: 6 },
25484
- { name: "My Files", component: "MyFilesMain", icon: import_react138.RiUserReceivedLine, configKey: "isMyFiles" },
25485
- { name: "Unclaimed Files", component: "UnclaimedFilesMain", icon: import_react138.RiInboxArchiveLine, configKey: "isUnclaimedFiles", badge: 2 },
25486
- { name: "Completed Files", component: "CompletedFilesMain", icon: import_react138.RiFileUploadLine, configKey: "isCompletedFiles", badge: 19 },
25487
- { name: "Business Entity", component: "BusinessEntitymain", icon: import_react138.RiFileList3Line, configKey: "isBusinessEntity" },
25488
- { name: "File Instance", component: "FileInstanceMain", icon: import_react138.RiFileList3Line, configKey: "isFileInstance" },
25489
- { name: "File Pool", component: "FilePoolMain", icon: import_react138.RiDatabase2Line, configKey: "isFilePool" },
25490
- { name: "Uploaded Document", component: "UploadedDocumentMain", icon: import_react138.RiFileUploadLine, configKey: "isUploadedDocument" }
25621
+ { name: "My Files", component: "MyFilesMain", icon: import_react139.RiUserReceivedLine, configKey: "isMyFiles" },
25622
+ { name: "Unclaimed Files", component: "UnclaimedFilesMain", icon: import_react139.RiInboxArchiveLine, configKey: "isUnclaimedFiles" },
25623
+ { name: "Completed Files", component: "CompletedFilesMain", icon: import_react139.RiFileUploadLine, configKey: "isCompletedFiles" },
25624
+ { name: "Business Entity", component: "BusinessEntitymain", icon: import_react139.RiFileList3Line, configKey: "isBusinessEntity" },
25625
+ { name: "File Instance", component: "FileInstanceMain", icon: import_react139.RiFileList3Line, configKey: "isFileInstance" },
25626
+ { name: "File Pool", component: "FilePoolMain", icon: import_react139.RiDatabase2Line, configKey: "isFilePool" },
25627
+ { name: "Uploaded Document", component: "UploadedDocumentMain", icon: import_react139.RiFileUploadLine, configKey: "isUploadedDocument" }
25491
25628
  ];
25492
25629
  const masterCommunicationItems = [
25493
- { name: "Notification", component: "Notification_main", icon: import_react138.RiNotification4Line, configKey: "isNotification" },
25494
- { name: "Comment", component: "Comment_main", icon: import_react138.RiChat3Line, configKey: "isComment" }
25630
+ { name: "Notification", component: "Notification_main", icon: import_react139.RiNotification4Line, configKey: "isNotification" },
25631
+ { name: "Comment", component: "Comment_main", icon: import_react139.RiChat3Line, configKey: "isComment" }
25495
25632
  ];
25496
25633
  const masterTaskItems = [
25497
- { name: "Task Instance", component: "TaskInstanceMain", icon: import_react138.RiCheckboxMultipleLine, configKey: "isTaskInstance" }
25634
+ { name: "Task Instance", component: "TaskInstanceMain", icon: import_react139.RiCheckboxMultipleLine, configKey: "isTaskInstance" }
25498
25635
  ];
25499
25636
  const masterTrackingItems = [
25500
- { name: "Audit Log", component: "AuditLogmain", icon: import_react138.RiShieldCheckLine, configKey: "isAuditLog" },
25501
- { name: "Movement History", component: "MovementHistorymain", icon: import_react138.RiHistoryLine, configKey: "isMovementHistory" },
25502
- { name: "Track Application", component: "TrackApplicationMain", icon: import_react138.RiHistoryLine, configKey: "isTrackApplication" }
25637
+ { name: "Audit Log", component: "AuditLogmain", icon: import_react139.RiShieldCheckLine, configKey: "isAuditLog" },
25638
+ { name: "Movement History", component: "MovementHistorymain", icon: import_react139.RiHistoryLine, configKey: "isMovementHistory" },
25639
+ { name: "Track Application", component: "TrackApplicationMain", icon: import_react139.RiHistoryLine, configKey: "isTrackApplication" }
25503
25640
  ];
25504
25641
  const getConfigObject = () => {
25505
25642
  if (!resolvedSidebarConfig) return null;
@@ -25537,21 +25674,21 @@ function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
25537
25674
  ...trackingItems,
25538
25675
  ...communicationItems
25539
25676
  ];
25540
- const [activeComponent, setActiveComponent] = (0, import_react137.useState)(() => {
25677
+ const [activeComponent, setActiveComponent] = (0, import_react138.useState)(() => {
25541
25678
  const all = getAllAvailableItems();
25542
25679
  const inboxItem = all.find((item) => item.component === "InboxMain");
25543
25680
  if (inboxItem) return "InboxMain";
25544
25681
  return all.length > 0 ? all[0].component : null;
25545
25682
  });
25546
- const [workflowOpen, setWorkflowOpen] = (0, import_react137.useState)(false);
25547
- const [permissionOpen, setPermissionOpen] = (0, import_react137.useState)(false);
25548
- const [hierarchyOpen, setHierarchyOpen] = (0, import_react137.useState)(false);
25549
- const [documentOpen, setDocumentOpen] = (0, import_react137.useState)(false);
25550
- const [filesOpen, setFilesOpen] = (0, import_react137.useState)(true);
25551
- const [tasksOpen, setTasksOpen] = (0, import_react137.useState)(false);
25552
- const [trackingOpen, setTrackingOpen] = (0, import_react137.useState)(false);
25553
- const [communicationOpen, setCommunicationOpen] = (0, import_react137.useState)(false);
25554
- (0, import_react137.useEffect)(() => {
25683
+ const [workflowOpen, setWorkflowOpen] = (0, import_react138.useState)(false);
25684
+ const [permissionOpen, setPermissionOpen] = (0, import_react138.useState)(false);
25685
+ const [hierarchyOpen, setHierarchyOpen] = (0, import_react138.useState)(false);
25686
+ const [documentOpen, setDocumentOpen] = (0, import_react138.useState)(false);
25687
+ const [filesOpen, setFilesOpen] = (0, import_react138.useState)(true);
25688
+ const [tasksOpen, setTasksOpen] = (0, import_react138.useState)(false);
25689
+ const [trackingOpen, setTrackingOpen] = (0, import_react138.useState)(false);
25690
+ const [communicationOpen, setCommunicationOpen] = (0, import_react138.useState)(false);
25691
+ (0, import_react138.useEffect)(() => {
25555
25692
  if (workflowItems.some((item) => item.component === activeComponent)) {
25556
25693
  setWorkflowOpen(true);
25557
25694
  } else if (permissionItems.some((item) => item.component === activeComponent)) {
@@ -25610,7 +25747,7 @@ function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
25610
25747
  const renderContent = () => {
25611
25748
  if (!hasAnyAccess) {
25612
25749
  return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "fc:flex fc:flex-col fc:items-center fc:justify-center fc:h-full fc:p-6 fc:text-center", children: [
25613
- /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "fc:bg-red-50 fc:text-red-500 fc:p-4 fc:rounded-full fc:mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react138.RiLockPasswordLine, { size: 32 }) }),
25750
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "fc:bg-red-50 fc:text-red-500 fc:p-4 fc:rounded-full fc:mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react139.RiLockPasswordLine, { size: 32 }) }),
25614
25751
  /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("h2", { className: "fc:text-lg fc:font-bold fc:text-[#101318] fc:mb-1", children: "Access Restricted" }),
25615
25752
  /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("p", { className: "fc:text-sm fc:text-[#64748B] fc:max-w-md", children: "You do not have permission to access any modules or workflow sections. Please contact your administrator for access rights." })
25616
25753
  ] });
@@ -25710,7 +25847,7 @@ function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
25710
25847
  "span",
25711
25848
  {
25712
25849
  className: `fc:text-[#7E8B9E] text-[#7E8B9E] fc:shrink-0 shrink-0 fc:ml-2 ml-2 fc:transition-transform transition-transform fc:duration-200 duration-200 ${open ? "fc:rotate-90 rotate-90 fc:text-[#344261] text-[#344261]" : "rotate-0"}`,
25713
- children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react138.RiArrowRightSLine, { size: 18 })
25850
+ children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react139.RiArrowRightSLine, { size: 18 })
25714
25851
  }
25715
25852
  )
25716
25853
  ]
@@ -25741,7 +25878,7 @@ function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
25741
25878
  };
25742
25879
  if (configObj && !hasSidebarAccess) {
25743
25880
  return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "fc:flex fc:min-h-screen fc:w-full fc:items-center fc:justify-center fc:bg-[#F5F7FB] fc:p-6", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "fc:max-w-md fc:rounded-2xl fc:border fc:border-red-200 fc:bg-red-50 fc:p-6 fc:text-center fc:shadow-sm", children: [
25744
- /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "fc:mb-4 fc:flex fc:justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "fc:flex fc:h-14 fc:w-14 fc:items-center fc:justify-center fc:rounded-full fc:bg-red-100 fc:text-red-500", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react138.RiLockPasswordLine, { size: 28 }) }) }),
25881
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "fc:mb-4 fc:flex fc:justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "fc:flex fc:h-14 fc:w-14 fc:items-center fc:justify-center fc:rounded-full fc:bg-red-100 fc:text-red-500", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react139.RiLockPasswordLine, { size: 28 }) }) }),
25745
25882
  /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("h2", { className: "fc:mb-2 fc:text-lg fc:font-bold fc:text-red-600", children: "Access Restricted" }),
25746
25883
  /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("p", { className: "fc:text-sm fc:text-[#405170]", children: "You do not have permission to access FlowCore. Please contact your administrator." })
25747
25884
  ] }) });
@@ -25778,7 +25915,7 @@ function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
25778
25915
  type: "button",
25779
25916
  onClick: onToggle,
25780
25917
  className: "fc:flex flex fc:h-8 h-8 fc:w-8 w-8 fc:items-center items-center fc:justify-center justify-center fc:rounded-lg rounded-lg hover:fc:bg-gray-100 hover:bg-gray-100 fc:transition-colors transition-colors",
25781
- children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react138.RiMenuLine, { size: 18 })
25918
+ children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react139.RiMenuLine, { size: 18 })
25782
25919
  }
25783
25920
  )
25784
25921
  ] }),
@@ -25786,19 +25923,19 @@ function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
25786
25923
  (workflowItems.length > 0 || permissionItems.length > 0 || hierarchyItems.length > 0 || documentItems.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(import_jsx_runtime117.Fragment, { children: [
25787
25924
  /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("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" }),
25788
25925
  /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "fc:flex flex fc:flex-col flex-col fc:gap-[2px] gap-[2px]", children: [
25789
- renderDropdown("Workflow", workflowOpen, setWorkflowOpen, workflowItems, import_react138.RiNodeTree),
25790
- renderDropdown("Permissions", permissionOpen, setPermissionOpen, permissionItems, import_react138.RiShieldUserLine),
25791
- renderDropdown("Documents", documentOpen, setDocumentOpen, documentItems, import_react138.RiFileSettingsLine),
25792
- renderDropdown("Hierarchy", hierarchyOpen, setHierarchyOpen, hierarchyItems, import_react138.RiNodeTree)
25926
+ renderDropdown("Workflow", workflowOpen, setWorkflowOpen, workflowItems, import_react139.RiNodeTree),
25927
+ renderDropdown("Permissions", permissionOpen, setPermissionOpen, permissionItems, import_react139.RiShieldUserLine),
25928
+ renderDropdown("Documents", documentOpen, setDocumentOpen, documentItems, import_react139.RiFileSettingsLine),
25929
+ renderDropdown("Hierarchy", hierarchyOpen, setHierarchyOpen, hierarchyItems, import_react139.RiNodeTree)
25793
25930
  ] })
25794
25931
  ] }),
25795
25932
  (fileItems.length > 0 || taskItems.length > 0 || trackingItems.length > 0 || communicationItems.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(import_jsx_runtime117.Fragment, { children: [
25796
25933
  /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("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" }),
25797
25934
  /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "fc:flex flex fc:flex-col flex-col fc:gap-[2px] gap-[2px]", children: [
25798
- renderDropdown("Files", filesOpen, setFilesOpen, fileItems, import_react138.RiFolder3Line),
25799
- renderDropdown("Tasks", tasksOpen, setTasksOpen, taskItems, import_react138.RiCheckboxCircleLine),
25800
- renderDropdown("Tracking", trackingOpen, setTrackingOpen, trackingItems, import_react138.RiRouteLine),
25801
- renderDropdown("Communication", communicationOpen, setCommunicationOpen, communicationItems, import_react138.RiMessage2Line)
25935
+ renderDropdown("Files", filesOpen, setFilesOpen, fileItems, import_react139.RiFolder3Line),
25936
+ renderDropdown("Tasks", tasksOpen, setTasksOpen, taskItems, import_react139.RiCheckboxCircleLine),
25937
+ renderDropdown("Tracking", trackingOpen, setTrackingOpen, trackingItems, import_react139.RiRouteLine),
25938
+ renderDropdown("Communication", communicationOpen, setCommunicationOpen, communicationItems, import_react139.RiMessage2Line)
25802
25939
  ] })
25803
25940
  ] })
25804
25941
  ] }),
@@ -25808,7 +25945,7 @@ function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
25808
25945
  type: "button",
25809
25946
  className: "fc:flex flex fc:h-[50px] h-[50px] fc:w-full w-full fc:items-center items-center fc:gap-[12px] gap-[12px] fc:rounded-[10px] rounded-[10px] fc:border border fc:border-[#E1E5ED] border-[#E1E5ED] fc:bg-white bg-white fc:px-[14px] px-[14px] fc:text-left text-left fc:text-[15px] text-[15px] fc:font-semibold font-semibold fc:text-[#2D3A58] text-[#2D3A58] fc:shadow-sm shadow-sm hover:fc:bg-[#F7F8FC] hover:bg-[#F7F8FC] fc:transition transition",
25810
25947
  children: [
25811
- /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react138.RiSettings4Line, { size: 20 }),
25948
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react139.RiSettings4Line, { size: 20 }),
25812
25949
  /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("span", { children: "Settings" })
25813
25950
  ]
25814
25951
  }
@@ -25831,17 +25968,17 @@ function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
25831
25968
  onClick: onToggle,
25832
25969
  "aria-label": "Open sidebar",
25833
25970
  className: "fc:fixed fixed fc:left-[16px] left-[16px] fc:top-[30px] top-[30px] fc:z-[100] z-[100] fc:flex flex fc:h-[46px] h-[46px] fc:w-[46px] w-[46px] fc:items-center items-center fc:justify-center justify-center fc:rounded-[9px] rounded-[9px] fc:border border fc:border-[#E1E5ED] border-[#E1E5ED] fc:bg-white bg-white fc:text-[#344261] text-[#344261] fc:shadow-[0_2px_8px_rgba(0,0,0,0.08)] shadow-[0_2px_8px_rgba(0,0,0,0.08)] fc:transition-colors transition-colors hover:fc:bg-gray-100 hover:bg-gray-100",
25834
- children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react138.RiMenuLine, { size: 18 })
25971
+ children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react139.RiMenuLine, { size: 18 })
25835
25972
  }
25836
25973
  )
25837
25974
  ] });
25838
25975
  }
25839
25976
 
25840
25977
  // src/components/Layout.jsx
25841
- var import_react139 = require("react");
25978
+ var import_react140 = require("react");
25842
25979
  var import_jsx_runtime118 = require("react/jsx-runtime");
25843
25980
  var Layout = ({ children, sidebar, sidebarConfig }) => {
25844
- const [isOpen, setIsOpen] = (0, import_react139.useState)(true);
25981
+ const [isOpen, setIsOpen] = (0, import_react140.useState)(true);
25845
25982
  const resolvedSidebarConfig = sidebar != null ? sidebar : sidebarConfig;
25846
25983
  return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
25847
25984
  "div",