flowcore-fn 10.4.1 → 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.
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-I4E63NIC.mjs";
13
13
 
14
14
  // src/components/Sidebar.jsx
15
- import { useState as useState81, useEffect as useEffect61 } from "react";
15
+ import { useState as useState82, useEffect as useEffect62 } from "react";
16
16
  import {
17
17
  RiShieldUserLine,
18
18
  RiFolder3Line,
@@ -7516,7 +7516,7 @@ function DocumentConfigTable({
7516
7516
  onClick: () => handleSort("workflowName"),
7517
7517
  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",
7518
7518
  children: [
7519
- "Workflow Name",
7519
+ "Workflow",
7520
7520
  " ",
7521
7521
  sortKey === "workflowName" ? sortOrder === "asc" ? "\u25B2" : "\u25BC" : "\u25B2"
7522
7522
  ]
@@ -7540,7 +7540,7 @@ function DocumentConfigTable({
7540
7540
  onClick: () => handleSort("stepId"),
7541
7541
  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",
7542
7542
  children: [
7543
- "Workflow Step Name",
7543
+ "Step Name",
7544
7544
  " ",
7545
7545
  sortKey === "stepId" ? sortOrder === "asc" ? "\u25B2" : "\u25BC" : "\u25B2"
7546
7546
  ]
@@ -9050,8 +9050,8 @@ function Table({
9050
9050
  const q = searchQuery.toLowerCase().trim();
9051
9051
  const filtered = apiData.filter(
9052
9052
  (item) => {
9053
- var _a, _b, _c, _d, _e, _f, _g;
9054
- 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);
9053
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
9054
+ 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);
9055
9055
  }
9056
9056
  );
9057
9057
  const sorted = [...filtered].sort((a, b) => {
@@ -9076,7 +9076,9 @@ function Table({
9076
9076
  );
9077
9077
  const columns = [
9078
9078
  // { label: "ID", key: "stepPermissionId" },
9079
- { label: "Workflow Step", key: "workflowStepId" },
9079
+ { label: "Workflow Type", key: "workflowTypeName" },
9080
+ { label: "Workflow", key: "workflowName" },
9081
+ { label: "Step Name", key: "workflowStepId" },
9080
9082
  { label: "Can View", key: "canView" },
9081
9083
  { label: "Can Edit", key: "canEdit" },
9082
9084
  { label: "Can Approve", key: "canApprove" },
@@ -9154,14 +9156,16 @@ function Table({
9154
9156
  children: "No step permissions found."
9155
9157
  }
9156
9158
  ) }) : visibleData.map((item, index) => {
9157
- var _a, _b, _c, _d, _e, _f, _g, _h;
9159
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
9158
9160
  return /* @__PURE__ */ jsxs39(
9159
9161
  "tr",
9160
9162
  {
9161
9163
  className: "hover:fc:bg-slate-50/50 fc:transition-colors",
9162
9164
  children: [
9163
9165
  /* @__PURE__ */ jsx40("td", { className: "fc:py-4 fc:px-4 fc:text-center fc:font-medium fc:text-slate-400", children: startIndex + index + 1 }),
9164
- /* @__PURE__ */ jsx40("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 : "-" }),
9166
+ /* @__PURE__ */ jsx40("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 : "-" }),
9167
+ /* @__PURE__ */ jsx40("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 : "-" }),
9168
+ /* @__PURE__ */ jsx40("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 : "-" }),
9165
9169
  /* @__PURE__ */ jsx40("td", { className: "fc:py-4 fc:px-5 fc:text-center", children: /* @__PURE__ */ jsx40(BoolBadge, { val: item.canView }) }),
9166
9170
  /* @__PURE__ */ jsx40("td", { className: "fc:py-4 fc:px-5 fc:text-center", children: /* @__PURE__ */ jsx40(BoolBadge, { val: item.canEdit }) }),
9167
9171
  /* @__PURE__ */ jsx40("td", { className: "fc:py-4 fc:px-5 fc:text-center", children: /* @__PURE__ */ jsx40(BoolBadge, { val: item.canApprove }) }),
@@ -16263,7 +16267,9 @@ function Table4({
16263
16267
  /* @__PURE__ */ jsx85("div", { className: "fc:max-h-[420px] fc:overflow-auto fc:rounded-2xl fc:border fc:border-slate-200", children: /* @__PURE__ */ jsxs84("table", { className: "fc:w-full fc:bg-white fc:text-left", children: [
16264
16268
  /* @__PURE__ */ jsx85("thead", { className: "fc:sticky fc:top-0 fc:z-10", children: /* @__PURE__ */ jsxs84("tr", { children: [
16265
16269
  /* @__PURE__ */ jsx85("th", { className: "fc:bg-slate-50 fc:px-4 fc:py-4 fc:text-xs", children: "S.NO" }),
16266
- heading("WORKFLOW STEP Name", "stepName"),
16270
+ heading("WORKFLOW TYPE", "workflowTypeName"),
16271
+ heading("WORKFLOW", "workflowName"),
16272
+ heading("STEP NAME", "stepName"),
16267
16273
  heading("ASSIGNMENT TYPE", "assignmentType"),
16268
16274
  heading("NODE TYPE", "hierarchyNodeType"),
16269
16275
  /* @__PURE__ */ jsx85("th", { className: "fc:bg-slate-50 fc:px-5 fc:py-4 fc:text-xs", children: "POOL ENABLED" }),
@@ -16272,51 +16278,56 @@ function Table4({
16272
16278
  /* @__PURE__ */ jsx85("tbody", { children: loading ? /* @__PURE__ */ jsx85("tr", { children: /* @__PURE__ */ jsx85(
16273
16279
  "td",
16274
16280
  {
16275
- colSpan: "6",
16281
+ colSpan: "8",
16276
16282
  className: "fc:p-8 fc:text-center fc:text-sm fc:text-slate-500",
16277
16283
  children: "Loading assignment rules..."
16278
16284
  }
16279
16285
  ) }) : visibleRows.length === 0 ? /* @__PURE__ */ jsx85("tr", { children: /* @__PURE__ */ jsx85(
16280
16286
  "td",
16281
16287
  {
16282
- colSpan: "6",
16288
+ colSpan: "8",
16283
16289
  className: "fc:p-8 fc:text-center fc:text-sm fc:text-slate-400",
16284
16290
  children: "No assignment rules found."
16285
16291
  }
16286
- ) }) : visibleRows.map((item, index) => /* @__PURE__ */ jsxs84(
16287
- "tr",
16288
- {
16289
- className: "fc:border-t fc:border-slate-100",
16290
- children: [
16291
- /* @__PURE__ */ jsx85("td", { className: "fc:px-4 fc:py-4 fc:text-center fc:text-sm", children: (currentPage - 1) * pageSize + index + 1 }),
16292
- /* @__PURE__ */ jsx85("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.stepName }),
16293
- /* @__PURE__ */ jsx85("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.assignmentType }),
16294
- /* @__PURE__ */ jsx85("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.hierarchyNodeType }),
16295
- /* @__PURE__ */ jsx85("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.isPoolEnabled ? "Yes" : "No" }),
16296
- /* @__PURE__ */ jsxs84("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: [
16297
- /* @__PURE__ */ jsx85(
16298
- "button",
16299
- {
16300
- type: "button",
16301
- onClick: () => onEdit(item),
16302
- className: "fc:mr-2 fc:rounded-lg fc:bg-blue-50 fc:px-3 fc:py-1 fc:text-blue-600",
16303
- children: "Edit"
16304
- }
16305
- ),
16306
- /* @__PURE__ */ jsx85(
16307
- "button",
16308
- {
16309
- type: "button",
16310
- onClick: () => onDelete(item),
16311
- className: "fc:rounded-lg fc:bg-rose-50 fc:px-3 fc:py-1 fc:text-rose-600",
16312
- children: "Delete"
16313
- }
16314
- )
16315
- ] })
16316
- ]
16317
- },
16318
- item.assignmentRuleId
16319
- )) })
16292
+ ) }) : visibleRows.map((item, index) => {
16293
+ var _a, _b;
16294
+ return /* @__PURE__ */ jsxs84(
16295
+ "tr",
16296
+ {
16297
+ className: "fc:border-t fc:border-slate-100",
16298
+ children: [
16299
+ /* @__PURE__ */ jsx85("td", { className: "fc:px-4 fc:py-4 fc:text-center fc:text-sm", children: (currentPage - 1) * pageSize + index + 1 }),
16300
+ /* @__PURE__ */ jsx85("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: (_a = item.workflowTypeName) != null ? _a : "-" }),
16301
+ /* @__PURE__ */ jsx85("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: (_b = item.workflowName) != null ? _b : "-" }),
16302
+ /* @__PURE__ */ jsx85("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.stepName }),
16303
+ /* @__PURE__ */ jsx85("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.assignmentType }),
16304
+ /* @__PURE__ */ jsx85("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.hierarchyNodeType }),
16305
+ /* @__PURE__ */ jsx85("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: item.isPoolEnabled ? "Yes" : "No" }),
16306
+ /* @__PURE__ */ jsxs84("td", { className: "fc:px-5 fc:py-4 fc:text-sm", children: [
16307
+ /* @__PURE__ */ jsx85(
16308
+ "button",
16309
+ {
16310
+ type: "button",
16311
+ onClick: () => onEdit(item),
16312
+ className: "fc:mr-2 fc:rounded-lg fc:bg-blue-50 fc:px-3 fc:py-1 fc:text-blue-600",
16313
+ children: "Edit"
16314
+ }
16315
+ ),
16316
+ /* @__PURE__ */ jsx85(
16317
+ "button",
16318
+ {
16319
+ type: "button",
16320
+ onClick: () => onDelete(item),
16321
+ className: "fc:rounded-lg fc:bg-rose-50 fc:px-3 fc:py-1 fc:text-rose-600",
16322
+ children: "Delete"
16323
+ }
16324
+ )
16325
+ ] })
16326
+ ]
16327
+ },
16328
+ item.assignmentRuleId
16329
+ );
16330
+ }) })
16320
16331
  ] }) }),
16321
16332
  /* @__PURE__ */ jsxs84("div", { className: "fc:flex fc:justify-end fc:gap-2 fc:text-sm", children: [
16322
16333
  /* @__PURE__ */ jsx85(
@@ -16852,7 +16863,7 @@ function Workflow_Step_Hierarchy_Mapping_Main() {
16852
16863
  }
16853
16864
  };
16854
16865
  const filteredMappings = mappings.filter((mapping) => {
16855
- var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
16866
+ var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
16856
16867
  const query = searchQuery.trim().toLowerCase();
16857
16868
  const stepId = (_c2 = (_b2 = (_a2 = mapping.workflowId) != null ? _a2 : mapping.WorkflowId) != null ? _b2 : mapping.workflowStepId) != null ? _c2 : mapping.WorkflowStepId;
16858
16869
  const nodeId = (_d = mapping.hierarchyNodeId) != null ? _d : mapping.HierarchyNodeId;
@@ -16861,6 +16872,7 @@ function Workflow_Step_Hierarchy_Mapping_Main() {
16861
16872
  const stepCode = (_p = (_o = mapping.workflowCode) != null ? _o : mapping.WorkflowCode) != null ? _p : workflowCodeMap[stepId];
16862
16873
  return !query || [
16863
16874
  (_q = mapping.workflowHierarchyNodeMappingId) != null ? _q : mapping.WorkflowHierarchyNodeMappingId,
16875
+ (_r = mapping.workflowTypeName) != null ? _r : mapping.WorkflowTypeName,
16864
16876
  stepId,
16865
16877
  stepName,
16866
16878
  stepCode,
@@ -16947,6 +16959,7 @@ function Workflow_Step_Hierarchy_Mapping_Main() {
16947
16959
  /* @__PURE__ */ jsx88("div", { ref: tableRef, className: "fc:overflow-x-auto", children: /* @__PURE__ */ jsxs87("table", { className: "fc:w-full fc:text-sm", children: [
16948
16960
  /* @__PURE__ */ jsx88("thead", { children: /* @__PURE__ */ jsxs87("tr", { className: "fc:bg-slate-100 fc:text-slate-600", children: [
16949
16961
  /* @__PURE__ */ jsx88("th", { className: "fc:p-3 fc:text-left", children: "#" }),
16962
+ /* @__PURE__ */ jsx88("th", { className: "fc:p-3 fc:text-left", children: "Workflow Type" }),
16950
16963
  /* @__PURE__ */ jsx88("th", { className: "fc:p-3 fc:text-left", children: "Workflow Name" }),
16951
16964
  /* @__PURE__ */ jsx88("th", { className: "fc:p-3 fc:text-left", children: "Workflow Code" }),
16952
16965
  /* @__PURE__ */ jsx88("th", { className: "fc:p-3 fc:text-left", children: "Hierarchy Node Name" }),
@@ -16956,19 +16969,19 @@ function Workflow_Step_Hierarchy_Mapping_Main() {
16956
16969
  /* @__PURE__ */ jsx88("tbody", { children: isLoading ? /* @__PURE__ */ jsx88("tr", { children: /* @__PURE__ */ jsx88(
16957
16970
  "td",
16958
16971
  {
16959
- colSpan: 6,
16972
+ colSpan: 7,
16960
16973
  className: "fc:p-8 fc:text-center fc:text-slate-400",
16961
16974
  children: "Loading mappings..."
16962
16975
  }
16963
16976
  ) }) : visibleMappings.length === 0 ? /* @__PURE__ */ jsx88("tr", { children: /* @__PURE__ */ jsx88(
16964
16977
  "td",
16965
16978
  {
16966
- colSpan: 6,
16979
+ colSpan: 7,
16967
16980
  className: "fc:p-8 fc:text-center fc:text-slate-400",
16968
16981
  children: "No workflow step hierarchy mappings found."
16969
16982
  }
16970
16983
  ) }) : visibleMappings.map((mapping, index) => {
16971
- var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
16984
+ var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
16972
16985
  const mappingId = getMappingId(mapping);
16973
16986
  const stepId = (_c2 = (_b2 = (_a2 = mapping.workflowId) != null ? _a2 : mapping.WorkflowId) != null ? _b2 : mapping.workflowStepId) != null ? _c2 : mapping.WorkflowStepId;
16974
16987
  const nodeId = (_d = mapping.hierarchyNodeId) != null ? _d : mapping.HierarchyNodeId;
@@ -16982,6 +16995,7 @@ function Workflow_Step_Hierarchy_Mapping_Main() {
16982
16995
  className: "fc:border-t fc:border-slate-100 hover:fc:bg-slate-50",
16983
16996
  children: [
16984
16997
  /* @__PURE__ */ jsx88("td", { className: "fc:p-3", children: (safePage - 1) * pageSize + index + 1 }),
16998
+ /* @__PURE__ */ jsx88("td", { className: "fc:p-3", children: (_v = (_u = mapping.workflowTypeName) != null ? _u : mapping.WorkflowTypeName) != null ? _v : "-" }),
16985
16999
  /* @__PURE__ */ jsx88("td", { className: "fc:p-3", children: stepDisplayName }),
16986
17000
  /* @__PURE__ */ jsx88("td", { className: "fc:p-3", children: stepCodeDisplayName }),
16987
17001
  /* @__PURE__ */ jsx88("td", { className: "fc:p-3", children: nodeDisplayName }),
@@ -19666,7 +19680,7 @@ function StatusMain() {
19666
19680
  }
19667
19681
 
19668
19682
  // src/components/inbox/InboxMain.jsx
19669
- import React111, { useState as useState79, useMemo as useMemo8, useRef as useRef28, useEffect as useEffect59 } from "react";
19683
+ import React111, { useState as useState80, useMemo as useMemo8, useRef as useRef28, useEffect as useEffect60 } from "react";
19670
19684
  import Swal31 from "sweetalert2";
19671
19685
  import {
19672
19686
  RiInboxArchiveLine as RiInboxArchiveLine2,
@@ -20577,7 +20591,7 @@ function NotificationPopover({
20577
20591
  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"}`,
20578
20592
  children: [
20579
20593
  isOpen ? /* @__PURE__ */ jsx100(RiNotification3Fill, { size: 17 }) : /* @__PURE__ */ jsx100(RiNotification3Line, { size: 17 }),
20580
- /* @__PURE__ */ jsx100("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 })
20594
+ unreadCount > 0 && /* @__PURE__ */ jsx100("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 })
20581
20595
  ]
20582
20596
  }
20583
20597
  ),
@@ -20785,12 +20799,118 @@ function NotificationPopover({
20785
20799
  }
20786
20800
 
20787
20801
  // src/components/inbox/ReviewApplication.jsx
20788
- import React110, { useState as useState78, useEffect as useEffect58 } from "react";
20802
+ import React110, { useState as useState79, useEffect as useEffect59 } from "react";
20789
20803
  import { RiFileTextLine as RiFileTextLine7, RiCheckboxLine as RiCheckboxLine2, RiArrowGoBackLine as RiArrowGoBackLine4 } from "@remixicon/react";
20790
20804
 
20791
20805
  // src/components/inbox/ReviewHeaderBar.jsx
20792
- import React101, { useState as useState75, useEffect as useEffect55, useRef as useRef26 } from "react";
20806
+ import React101, { useState as useState76, useEffect as useEffect56, useRef as useRef26 } from "react";
20793
20807
  import { RiArrowRightSLine, RiArrowDownSLine, RiSettings4Line, RiArrowGoBackLine } from "@remixicon/react";
20808
+
20809
+ // src/components/Service/UserProfileService.js
20810
+ import { useState as useState75, useEffect as useEffect55 } from "react";
20811
+ var PROFILE_STORAGE_KEY = "FLOWCORE_USER_PROFILE";
20812
+ var memoryCachedProfile = null;
20813
+ var inflightPromise = null;
20814
+ var getProfileEndpoint = () => {
20815
+ var _a, _b, _c;
20816
+ try {
20817
+ const endpoints = getApiEndpoints();
20818
+ if (endpoints == null ? void 0 : endpoints.ProfileApi) return endpoints.ProfileApi;
20819
+ if (endpoints == null ? void 0 : endpoints.profileApi) return endpoints.profileApi;
20820
+ if ((_a = endpoints == null ? void 0 : endpoints.flowCore) == null ? void 0 : _a.profileApi) return endpoints.flowCore.profileApi;
20821
+ if ((_b = endpoints == null ? void 0 : endpoints.flowCore) == null ? void 0 : _b.ProfileApi) return endpoints.flowCore.ProfileApi;
20822
+ if ((_c = endpoints == null ? void 0 : endpoints.flowCore) == null ? void 0 : _c.getDashboardProfile) return endpoints.flowCore.getDashboardProfile;
20823
+ } catch (err) {
20824
+ }
20825
+ return null;
20826
+ };
20827
+ var extractName = (data) => {
20828
+ if (!data || typeof data !== "object") return "";
20829
+ return data.name || data.Name || data.userName || data.fullName || "";
20830
+ };
20831
+ var fetchUserProfile = async (forceRefresh = false) => {
20832
+ if (!forceRefresh) {
20833
+ if (memoryCachedProfile) {
20834
+ return memoryCachedProfile;
20835
+ }
20836
+ if (typeof window !== "undefined") {
20837
+ try {
20838
+ const stored = sessionStorage.getItem(PROFILE_STORAGE_KEY);
20839
+ if (stored) {
20840
+ memoryCachedProfile = JSON.parse(stored);
20841
+ return memoryCachedProfile;
20842
+ }
20843
+ } catch (e) {
20844
+ }
20845
+ }
20846
+ }
20847
+ if (inflightPromise) {
20848
+ return inflightPromise;
20849
+ }
20850
+ inflightPromise = (async () => {
20851
+ var _a, _b, _c, _d, _e;
20852
+ try {
20853
+ const endpoint3 = getProfileEndpoint();
20854
+ if (!endpoint3) return null;
20855
+ const apiService = getApiService();
20856
+ const res = await apiService.get(endpoint3);
20857
+ 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;
20858
+ if (data && typeof data === "object") {
20859
+ memoryCachedProfile = data;
20860
+ if (typeof window !== "undefined") {
20861
+ try {
20862
+ sessionStorage.setItem(PROFILE_STORAGE_KEY, JSON.stringify(data));
20863
+ } catch (e) {
20864
+ }
20865
+ }
20866
+ return data;
20867
+ }
20868
+ return null;
20869
+ } catch (error) {
20870
+ console.warn("Failed to fetch dashboard profile:", error);
20871
+ return null;
20872
+ } finally {
20873
+ inflightPromise = null;
20874
+ }
20875
+ })();
20876
+ return inflightPromise;
20877
+ };
20878
+ var useUserProfile = () => {
20879
+ const [profile, setProfile] = useState75(() => {
20880
+ if (memoryCachedProfile) return memoryCachedProfile;
20881
+ if (typeof window !== "undefined") {
20882
+ try {
20883
+ const stored = sessionStorage.getItem(PROFILE_STORAGE_KEY);
20884
+ if (stored) return JSON.parse(stored);
20885
+ } catch (e) {
20886
+ }
20887
+ }
20888
+ return null;
20889
+ });
20890
+ const [userName, setUserName] = useState75(() => extractName(profile));
20891
+ useEffect55(() => {
20892
+ let isCurrent = true;
20893
+ fetchUserProfile().then((data) => {
20894
+ if (!isCurrent || !data) return;
20895
+ setProfile(data);
20896
+ const name = extractName(data);
20897
+ if (name) {
20898
+ setUserName(name);
20899
+ }
20900
+ });
20901
+ return () => {
20902
+ isCurrent = false;
20903
+ };
20904
+ }, []);
20905
+ const initial = userName ? userName.trim().charAt(0).toUpperCase() : "U";
20906
+ return {
20907
+ profile,
20908
+ userName,
20909
+ initial
20910
+ };
20911
+ };
20912
+
20913
+ // src/components/inbox/ReviewHeaderBar.jsx
20794
20914
  import { jsx as jsx101, jsxs as jsxs100 } from "react/jsx-runtime";
20795
20915
  function ReviewHeaderBar({
20796
20916
  onBackToInbox,
@@ -20798,11 +20918,15 @@ function ReviewHeaderBar({
20798
20918
  activeStepName,
20799
20919
  assignedSteps = [],
20800
20920
  onSelectWorkflowStepId,
20801
- refreshKey
20921
+ refreshKey,
20922
+ userName: propUserName
20802
20923
  }) {
20803
- const [roleDropdownOpen, setRoleDropdownOpen] = useState75(false);
20924
+ const { userName: hookUserName, initial: hookInitial } = useUserProfile();
20925
+ const userName = propUserName || hookUserName;
20926
+ const userInitial = userName ? userName.trim().charAt(0).toUpperCase() : hookInitial;
20927
+ const [roleDropdownOpen, setRoleDropdownOpen] = useState76(false);
20804
20928
  const roleDropdownRef = useRef26(null);
20805
- useEffect55(() => {
20929
+ useEffect56(() => {
20806
20930
  const handleOutsideClick = (e) => {
20807
20931
  if (roleDropdownRef.current && !roleDropdownRef.current.contains(e.target)) {
20808
20932
  setRoleDropdownOpen(false);
@@ -20847,12 +20971,12 @@ function ReviewHeaderBar({
20847
20971
  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",
20848
20972
  children: [
20849
20973
  /* @__PURE__ */ jsxs100("div", { className: "fc:relative fc:shrink-0", children: [
20850
- /* @__PURE__ */ jsx101("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" }),
20974
+ /* @__PURE__ */ jsx101("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 }),
20851
20975
  /* @__PURE__ */ jsx101("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" })
20852
20976
  ] }),
20853
20977
  /* @__PURE__ */ jsxs100("div", { className: "fc:flex fc:flex-col fc:justify-center", children: [
20854
20978
  /* @__PURE__ */ jsxs100("div", { className: "fc:flex fc:items-center fc:gap-1.5", children: [
20855
- /* @__PURE__ */ jsx101("span", { className: "fc:text-xs fc:font-extrabold fc:text-slate-800", children: "Dummy" }),
20979
+ /* @__PURE__ */ jsx101("span", { className: "fc:text-xs fc:font-extrabold fc:text-slate-800", children: userName || "User" }),
20856
20980
  /* @__PURE__ */ jsxs100(
20857
20981
  "button",
20858
20982
  {
@@ -21197,7 +21321,7 @@ import React107 from "react";
21197
21321
  import { RiEyeLine as RiEyeLine4, RiArrowGoBackLine as RiArrowGoBackLine3, RiCheckLine as RiCheckLine4, RiArrowRightLine as RiArrowRightLine2, RiArrowDownSLine as RiArrowDownSLine3 } from "@remixicon/react";
21198
21322
 
21199
21323
  // src/components/inbox/DynamicFormDisplay.jsx
21200
- import React106, { useEffect as useEffect56, useState as useState76 } from "react";
21324
+ import React106, { useEffect as useEffect57, useState as useState77 } from "react";
21201
21325
  import { RiFullscreenLine, RiFullscreenExitLine, RiDownload2Line, RiFileTextLine as RiFileTextLine4 } from "@remixicon/react";
21202
21326
 
21203
21327
  // src/components/inbox/reviewHelpers.js
@@ -21436,12 +21560,12 @@ var AttachmentsSection = ({ section }) => {
21436
21560
  }) });
21437
21561
  };
21438
21562
  function DynamicFormDisplay({ fileNo, maximized = false, onToggleMaximize }) {
21439
- const [displayData, setDisplayData] = useState76(null);
21440
- const [activeTab, setActiveTab] = useState76("");
21441
- const [expandedSections, setExpandedSections] = useState76({});
21442
- const [isLoading, setIsLoading] = useState76(false);
21443
- const [loadError, setLoadError] = useState76("");
21444
- useEffect56(() => {
21563
+ const [displayData, setDisplayData] = useState77(null);
21564
+ const [activeTab, setActiveTab] = useState77("");
21565
+ const [expandedSections, setExpandedSections] = useState77({});
21566
+ const [isLoading, setIsLoading] = useState77(false);
21567
+ const [loadError, setLoadError] = useState77("");
21568
+ useEffect57(() => {
21445
21569
  if (!fileNo) {
21446
21570
  setDisplayData(null);
21447
21571
  setActiveTab("");
@@ -21885,7 +22009,7 @@ function MovementDetailModal({
21885
22009
  }
21886
22010
 
21887
22011
  // src/components/inbox/TakeActionPanel.jsx
21888
- import React109, { useState as useState77, useEffect as useEffect57, useRef as useRef27 } from "react";
22012
+ import React109, { useState as useState78, useEffect as useEffect58, useRef as useRef27 } from "react";
21889
22013
  import Swal30 from "sweetalert2";
21890
22014
  import {
21891
22015
  RiCloseLine as RiCloseLine6,
@@ -21907,24 +22031,24 @@ function TakeActionPanel({
21907
22031
  onMinimize
21908
22032
  }) {
21909
22033
  var _a;
21910
- const [actions, setActions] = useState77(DEFAULT_ACTIONS);
21911
- const [actionCode, setActionCode] = useState77("RETURN_TO_APPLICANT");
21912
- const [remarks, setRemarks] = useState77("");
21913
- const [isSubmitting, setIsSubmitting] = useState77(false);
21914
- const [editableFields, setEditableFields] = useState77([]);
21915
- const [selectedEditableFields, setSelectedEditableFields] = useState77([]);
21916
- const [isLoadingEditableFields, setIsLoadingEditableFields] = useState77(false);
21917
- const [editableFieldsError, setEditableFieldsError] = useState77("");
21918
- const [officialDocuments, setOfficialDocuments] = useState77([]);
21919
- const [isLoadingOfficialDocuments, setIsLoadingOfficialDocuments] = useState77(false);
21920
- const [officialDocumentsError, setOfficialDocumentsError] = useState77("");
21921
- const [uploadedDocuments, setUploadedDocuments] = useState77([]);
21922
- const [uploadingDocumentId, setUploadingDocumentId] = useState77(null);
21923
- const [documentUploadErrors, setDocumentUploadErrors] = useState77({});
22034
+ const [actions, setActions] = useState78(DEFAULT_ACTIONS);
22035
+ const [actionCode, setActionCode] = useState78("RETURN_TO_APPLICANT");
22036
+ const [remarks, setRemarks] = useState78("");
22037
+ const [isSubmitting, setIsSubmitting] = useState78(false);
22038
+ const [editableFields, setEditableFields] = useState78([]);
22039
+ const [selectedEditableFields, setSelectedEditableFields] = useState78([]);
22040
+ const [isLoadingEditableFields, setIsLoadingEditableFields] = useState78(false);
22041
+ const [editableFieldsError, setEditableFieldsError] = useState78("");
22042
+ const [officialDocuments, setOfficialDocuments] = useState78([]);
22043
+ const [isLoadingOfficialDocuments, setIsLoadingOfficialDocuments] = useState78(false);
22044
+ const [officialDocumentsError, setOfficialDocumentsError] = useState78("");
22045
+ const [uploadedDocuments, setUploadedDocuments] = useState78([]);
22046
+ const [uploadingDocumentId, setUploadingDocumentId] = useState78(null);
22047
+ const [documentUploadErrors, setDocumentUploadErrors] = useState78({});
21924
22048
  const documentInputRefs = useRef27({});
21925
22049
  const selectedAction = actions.find((a) => a.actionCode === actionCode);
21926
22050
  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());
21927
- useEffect57(() => {
22051
+ useEffect58(() => {
21928
22052
  let isCurrent = true;
21929
22053
  (async () => {
21930
22054
  var _a2, _b, _c, _d, _e, _f, _g;
@@ -21949,7 +22073,7 @@ function TakeActionPanel({
21949
22073
  isCurrent = false;
21950
22074
  };
21951
22075
  }, [workflowStepId, activeWorkflowStepId]);
21952
- useEffect57(() => {
22076
+ useEffect58(() => {
21953
22077
  if (!isReturnToApplicant) {
21954
22078
  setEditableFields([]);
21955
22079
  setSelectedEditableFields([]);
@@ -21978,7 +22102,7 @@ function TakeActionPanel({
21978
22102
  isCurrent = false;
21979
22103
  };
21980
22104
  }, [isReturnToApplicant]);
21981
- useEffect57(() => {
22105
+ useEffect58(() => {
21982
22106
  const normalizedStepId = Number(workflowStepId);
21983
22107
  setOfficialDocuments([]);
21984
22108
  setUploadedDocuments([]);
@@ -22487,23 +22611,24 @@ function ReviewApplication({
22487
22611
  onSelectWorkflowStepId,
22488
22612
  onBackToInbox,
22489
22613
  onSubmitAction,
22490
- refreshKey
22614
+ refreshKey,
22615
+ userName
22491
22616
  }) {
22492
22617
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
22493
- const [activeTab, setActiveTab] = useState78("workflowHistory");
22494
- const [showAllMovements, setShowAllMovements] = useState78(false);
22495
- const [isApplicantFormMaximized, setIsApplicantFormMaximized] = useState78(false);
22496
- const [isTakeActionMinimized, setIsTakeActionMinimized] = useState78(false);
22497
- const [workflowSteps, setWorkflowSteps] = useState78([]);
22498
- const [isLoadingWorkflowSteps, setIsLoadingWorkflowSteps] = useState78(false);
22499
- const [workflowStepsError, setWorkflowStepsError] = useState78("");
22500
- const [fileHistory, setFileHistory] = useState78([]);
22501
- const [isLoadingFileHistory, setIsLoadingFileHistory] = useState78(false);
22502
- const [fileHistoryError, setFileHistoryError] = useState78("");
22503
- const [selectedHistoryItem, setSelectedHistoryItem] = useState78(null);
22504
- const [historyDetail, setHistoryDetail] = useState78(null);
22505
- const [historyDetailError, setHistoryDetailError] = useState78("");
22506
- const [isLoadingHistoryDetail, setIsLoadingHistoryDetail] = useState78(false);
22618
+ const [activeTab, setActiveTab] = useState79("workflowHistory");
22619
+ const [showAllMovements, setShowAllMovements] = useState79(false);
22620
+ const [isApplicantFormMaximized, setIsApplicantFormMaximized] = useState79(false);
22621
+ const [isTakeActionMinimized, setIsTakeActionMinimized] = useState79(false);
22622
+ const [workflowSteps, setWorkflowSteps] = useState79([]);
22623
+ const [isLoadingWorkflowSteps, setIsLoadingWorkflowSteps] = useState79(false);
22624
+ const [workflowStepsError, setWorkflowStepsError] = useState79("");
22625
+ const [fileHistory, setFileHistory] = useState79([]);
22626
+ const [isLoadingFileHistory, setIsLoadingFileHistory] = useState79(false);
22627
+ const [fileHistoryError, setFileHistoryError] = useState79("");
22628
+ const [selectedHistoryItem, setSelectedHistoryItem] = useState79(null);
22629
+ const [historyDetail, setHistoryDetail] = useState79(null);
22630
+ const [historyDetailError, setHistoryDetailError] = useState79("");
22631
+ const [isLoadingHistoryDetail, setIsLoadingHistoryDetail] = useState79(false);
22507
22632
  const fileNo = file == null ? void 0 : file.fileNo;
22508
22633
  const subject = (file == null ? void 0 : file.subject) || "ElectionPetition #41";
22509
22634
  const department = (file == null ? void 0 : file.department) && file.department !== "-" ? file.department : "Nodal 19";
@@ -22513,7 +22638,7 @@ function ReviewApplication({
22513
22638
  const createdOn = (file == null ? void 0 : file.receivedDate) && file.receivedDate !== "-" ? file.receivedDate : "01 Oct 2026, 10:24 AM";
22514
22639
  const workflowStepId = (_b = (_a = file == null ? void 0 : file.workflowStepId) != null ? _a : file == null ? void 0 : file.WorkflowStepId) != null ? _b : activeWorkflowStepId;
22515
22640
  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;
22516
- useEffect58(() => {
22641
+ useEffect59(() => {
22517
22642
  if (!workflowStepId) {
22518
22643
  setWorkflowSteps([]);
22519
22644
  setWorkflowStepsError("Workflow step ID is unavailable.");
@@ -22544,7 +22669,7 @@ function ReviewApplication({
22544
22669
  };
22545
22670
  }, [workflowStepId]);
22546
22671
  const historyNeeded = activeTab === "workflowHistory" || activeTab === "fileDetails";
22547
- useEffect58(() => {
22672
+ useEffect59(() => {
22548
22673
  if (!historyNeeded) return void 0;
22549
22674
  const normalizedFileInstanceId = Number(fileInstanceId);
22550
22675
  if (!Number.isInteger(normalizedFileInstanceId) || normalizedFileInstanceId <= 0) {
@@ -22620,7 +22745,8 @@ function ReviewApplication({
22620
22745
  activeStepName,
22621
22746
  assignedSteps,
22622
22747
  onSelectWorkflowStepId,
22623
- refreshKey
22748
+ refreshKey,
22749
+ userName
22624
22750
  }
22625
22751
  ),
22626
22752
  /* @__PURE__ */ jsxs109("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: [
@@ -22843,29 +22969,30 @@ function InboxMain({
22843
22969
  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");
22844
22970
  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");
22845
22971
  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");
22846
- const [activeTab, setActiveTab] = useState79(initialTab);
22847
- const [viewMode, setViewMode] = useState79(initialView);
22848
- const [reviewingFile, setReviewingFile] = useState79(null);
22849
- useEffect59(() => {
22972
+ const [activeTab, setActiveTab] = useState80(initialTab);
22973
+ const [viewMode, setViewMode] = useState80(initialView);
22974
+ const [reviewingFile, setReviewingFile] = useState80(null);
22975
+ useEffect60(() => {
22850
22976
  if (initialTab) setActiveTab(initialTab);
22851
22977
  }, [initialTab]);
22852
- useEffect59(() => {
22978
+ useEffect60(() => {
22853
22979
  if (initialView) setViewMode(initialView);
22854
22980
  }, [initialView]);
22855
- const [assignedSteps, setAssignedSteps] = useState79([]);
22856
- const [activeWorkflowStepId, setActiveWorkflowStepId] = useState79(null);
22857
- const [roleDropdownOpen, setRoleDropdownOpen] = useState79(false);
22981
+ const { userName, initial: userInitial } = useUserProfile();
22982
+ const [assignedSteps, setAssignedSteps] = useState80([]);
22983
+ const [activeWorkflowStepId, setActiveWorkflowStepId] = useState80(null);
22984
+ const [roleDropdownOpen, setRoleDropdownOpen] = useState80(false);
22858
22985
  const roleDropdownRef = useRef28(null);
22859
22986
  const activeRoleDetails = assignedSteps.find(
22860
22987
  (step) => Number(step.workflowStepId) === Number(activeWorkflowStepId)
22861
22988
  );
22862
22989
  const activeRole = (activeRoleDetails == null ? void 0 : activeRoleDetails.stepName) || "No Assigned Step";
22863
- const [filePoolFiles, setFilePoolFiles] = useState79([]);
22864
- const [myFiles, setMyFiles] = useState79([]);
22865
- const [totalFiles, setTotalFiles] = useState79([]);
22866
- const [refreshKey, setRefreshKey] = useState79(0);
22867
- const [isUnclaiming, setIsUnclaiming] = useState79(false);
22868
- useEffect59(() => {
22990
+ const [filePoolFiles, setFilePoolFiles] = useState80([]);
22991
+ const [myFiles, setMyFiles] = useState80([]);
22992
+ const [totalFiles, setTotalFiles] = useState80([]);
22993
+ const [refreshKey, setRefreshKey] = useState80(0);
22994
+ const [isUnclaiming, setIsUnclaiming] = useState80(false);
22995
+ useEffect60(() => {
22869
22996
  let isCurrent = true;
22870
22997
  const loadAssignedSteps = async () => {
22871
22998
  var _a, _b;
@@ -22924,7 +23051,7 @@ function InboxMain({
22924
23051
  isCurrent = false;
22925
23052
  };
22926
23053
  }, []);
22927
- useEffect59(() => {
23054
+ useEffect60(() => {
22928
23055
  let isCurrent = true;
22929
23056
  const loadStepFiles = async () => {
22930
23057
  var _a, _b;
@@ -22983,30 +23110,30 @@ function InboxMain({
22983
23110
  isCurrent = false;
22984
23111
  };
22985
23112
  }, [activeWorkflowStepId, refreshKey]);
22986
- const [dynamicColumns, setDynamicColumns] = useState79([
23113
+ const [dynamicColumns, setDynamicColumns] = useState80([
22987
23114
  { key: "department", label: "Department", width: "190px", visible: true },
22988
23115
  { key: "applicant", label: "Applicant / Entity", width: "210px", visible: true },
22989
23116
  { key: "category", label: "Category / Type", width: "170px", visible: true },
22990
23117
  { key: "financialYear", label: "Financial Year", width: "120px", visible: true }
22991
23118
  ]);
22992
- const [columnDropdownOpen, setColumnDropdownOpen] = useState79(false);
23119
+ const [columnDropdownOpen, setColumnDropdownOpen] = useState80(false);
22993
23120
  const columnDropdownRef = useRef28(null);
22994
- const [searchQuery, setSearchQuery] = useState79("");
22995
- const [priorityFilter, setPriorityFilter] = useState79("all");
22996
- const [pageSize, setPageSize] = useState79(10);
22997
- const [currentPage, setCurrentPage] = useState79(1);
22998
- const [sortColumn, setSortColumn] = useState79("");
22999
- const [sortDirection, setSortDirection] = useState79("asc");
23000
- const [poolModalOpen, setPoolModalOpen] = useState79(false);
23001
- const [selectedPoolFile, setSelectedPoolFile] = useState79(null);
23002
- const [isClaimingPool, setIsClaimingPool] = useState79(false);
23003
- const [actionModalOpen, setActionModalOpen] = useState79(false);
23004
- const [selectedActionFile, setSelectedActionFile] = useState79(null);
23005
- const [viewModalOpen, setViewModalOpen] = useState79(false);
23006
- const [selectedViewFile, setSelectedViewFile] = useState79(null);
23121
+ const [searchQuery, setSearchQuery] = useState80("");
23122
+ const [priorityFilter, setPriorityFilter] = useState80("all");
23123
+ const [pageSize, setPageSize] = useState80(10);
23124
+ const [currentPage, setCurrentPage] = useState80(1);
23125
+ const [sortColumn, setSortColumn] = useState80("");
23126
+ const [sortDirection, setSortDirection] = useState80("asc");
23127
+ const [poolModalOpen, setPoolModalOpen] = useState80(false);
23128
+ const [selectedPoolFile, setSelectedPoolFile] = useState80(null);
23129
+ const [isClaimingPool, setIsClaimingPool] = useState80(false);
23130
+ const [actionModalOpen, setActionModalOpen] = useState80(false);
23131
+ const [selectedActionFile, setSelectedActionFile] = useState80(null);
23132
+ const [viewModalOpen, setViewModalOpen] = useState80(false);
23133
+ const [selectedViewFile, setSelectedViewFile] = useState80(null);
23007
23134
  const tableRef = useRef28(null);
23008
- const [hoveredFileCard, setHoveredFileCard] = useState79(null);
23009
- const [hoverTimeoutId, setHoverTimeoutId] = useState79(null);
23135
+ const [hoveredFileCard, setHoveredFileCard] = useState80(null);
23136
+ const [hoverTimeoutId, setHoverTimeoutId] = useState80(null);
23010
23137
  const hiddenDynamicColumns = useMemo8(
23011
23138
  () => dynamicColumns.filter((col) => !col.visible),
23012
23139
  [dynamicColumns]
@@ -23065,12 +23192,12 @@ function InboxMain({
23065
23192
  }, 120);
23066
23193
  setHoverTimeoutId(timer);
23067
23194
  };
23068
- useEffect59(() => {
23195
+ useEffect60(() => {
23069
23196
  return () => {
23070
23197
  if (hoverTimeoutId) clearTimeout(hoverTimeoutId);
23071
23198
  };
23072
23199
  }, [hoverTimeoutId]);
23073
- useEffect59(() => {
23200
+ useEffect60(() => {
23074
23201
  const handleScroll = () => {
23075
23202
  if (hoveredFileCard) {
23076
23203
  setHoveredFileCard(null);
@@ -23079,7 +23206,7 @@ function InboxMain({
23079
23206
  window.addEventListener("scroll", handleScroll, true);
23080
23207
  return () => window.removeEventListener("scroll", handleScroll, true);
23081
23208
  }, [hoveredFileCard]);
23082
- useEffect59(() => {
23209
+ useEffect60(() => {
23083
23210
  const handleOutsideClick = (e) => {
23084
23211
  if (columnDropdownRef.current && !columnDropdownRef.current.contains(e.target)) {
23085
23212
  setColumnDropdownOpen(false);
@@ -23090,7 +23217,7 @@ function InboxMain({
23090
23217
  }
23091
23218
  return () => document.removeEventListener("mousedown", handleOutsideClick);
23092
23219
  }, [columnDropdownOpen]);
23093
- useEffect59(() => {
23220
+ useEffect60(() => {
23094
23221
  const handleOutsideClick = (e) => {
23095
23222
  if (roleDropdownRef.current && !roleDropdownRef.current.contains(e.target)) {
23096
23223
  setRoleDropdownOpen(false);
@@ -23370,7 +23497,8 @@ function InboxMain({
23370
23497
  },
23371
23498
  onBackToInbox: () => setViewMode("table"),
23372
23499
  onSubmitAction: handleActionSubmit,
23373
- refreshKey
23500
+ refreshKey,
23501
+ userName
23374
23502
  }
23375
23503
  );
23376
23504
  }
@@ -23397,12 +23525,12 @@ function InboxMain({
23397
23525
  ),
23398
23526
  /* @__PURE__ */ jsxs110("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: [
23399
23527
  /* @__PURE__ */ jsxs110("div", { className: "fc:relative fc:shrink-0", children: [
23400
- /* @__PURE__ */ jsx111("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" }),
23528
+ /* @__PURE__ */ jsx111("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 }),
23401
23529
  /* @__PURE__ */ jsx111("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" })
23402
23530
  ] }),
23403
23531
  /* @__PURE__ */ jsxs110("div", { className: "fc:flex fc:flex-col fc:justify-center", children: [
23404
23532
  /* @__PURE__ */ jsxs110("div", { className: "fc:flex fc:items-center fc:gap-2", children: [
23405
- /* @__PURE__ */ jsx111("span", { className: "fc:text-xs fc:font-extrabold fc:text-slate-800", children: "Dummy" }),
23533
+ /* @__PURE__ */ jsx111("span", { className: "fc:text-xs fc:font-extrabold fc:text-slate-800", children: userName || "User" }),
23406
23534
  /* @__PURE__ */ jsxs110(
23407
23535
  "button",
23408
23536
  {
@@ -24332,7 +24460,7 @@ function CompletedFilesMain(props) {
24332
24460
  }
24333
24461
 
24334
24462
  // src/components/track-application/TrackApplicationMain.jsx
24335
- import React116, { useState as useState80, useMemo as useMemo9 } from "react";
24463
+ import React116, { useState as useState81, useMemo as useMemo9 } from "react";
24336
24464
  import Swal32 from "sweetalert2";
24337
24465
  import {
24338
24466
  RiRouteLine as RiRouteLine2,
@@ -24356,7 +24484,7 @@ import {
24356
24484
  } from "@remixicon/react";
24357
24485
 
24358
24486
  // src/components/track-application/TrackingSlipModal.jsx
24359
- import React115, { useEffect as useEffect60 } from "react";
24487
+ import React115, { useEffect as useEffect61 } from "react";
24360
24488
  import {
24361
24489
  RiCloseLine as RiCloseLine7,
24362
24490
  RiPrinterLine,
@@ -24370,7 +24498,7 @@ import {
24370
24498
  } from "@remixicon/react";
24371
24499
  import { jsx as jsx115, jsxs as jsxs111 } from "react/jsx-runtime";
24372
24500
  function TrackingSlipModal({ isOpen, onClose, application }) {
24373
- useEffect60(() => {
24501
+ useEffect61(() => {
24374
24502
  if (!isOpen) return;
24375
24503
  const handleKeyDown = (e) => {
24376
24504
  if (e.key === "Escape") onClose();
@@ -24551,17 +24679,17 @@ import { Fragment as Fragment9, jsx as jsx116, jsxs as jsxs112 } from "react/jsx
24551
24679
  var APPLICATION_DATABASE = [];
24552
24680
  function TrackApplicationMain() {
24553
24681
  var _a, _b, _c;
24554
- const [trackQuery, setTrackQuery] = useState80("");
24555
- const [selectedApplication, setSelectedApplication] = useState80(null);
24556
- const [activeTab, setActiveTab] = useState80("timeline");
24557
- const [viewMode, setViewMode] = useState80("tracker");
24558
- const [tableSearch, setTableSearch] = useState80("");
24559
- const [priorityFilter, setPriorityFilter] = useState80("all");
24560
- const [pageSize, setPageSize] = useState80(10);
24561
- const [currentPage, setCurrentPage] = useState80(1);
24562
- const [sortColumn, setSortColumn] = useState80("");
24563
- const [sortDirection, setSortDirection] = useState80("asc");
24564
- const [slipModalOpen, setSlipModalOpen] = useState80(false);
24682
+ const [trackQuery, setTrackQuery] = useState81("");
24683
+ const [selectedApplication, setSelectedApplication] = useState81(null);
24684
+ const [activeTab, setActiveTab] = useState81("timeline");
24685
+ const [viewMode, setViewMode] = useState81("tracker");
24686
+ const [tableSearch, setTableSearch] = useState81("");
24687
+ const [priorityFilter, setPriorityFilter] = useState81("all");
24688
+ const [pageSize, setPageSize] = useState81(10);
24689
+ const [currentPage, setCurrentPage] = useState81(1);
24690
+ const [sortColumn, setSortColumn] = useState81("");
24691
+ const [sortDirection, setSortDirection] = useState81("asc");
24692
+ const [slipModalOpen, setSlipModalOpen] = useState81(false);
24565
24693
  const handleTrack = async (fileNoToTrack) => {
24566
24694
  const targetNo = (fileNoToTrack || trackQuery).trim().toUpperCase();
24567
24695
  if (!targetNo) {
@@ -25374,8 +25502,8 @@ function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
25374
25502
  const masterFileItems = [
25375
25503
  // { name: "Inbox", component: "InboxMain", icon: RiInboxLine, configKey: "isInbox", badge: 6 },
25376
25504
  { name: "My Files", component: "MyFilesMain", icon: RiUserReceivedLine4, configKey: "isMyFiles" },
25377
- { name: "Unclaimed Files", component: "UnclaimedFilesMain", icon: RiInboxArchiveLine4, configKey: "isUnclaimedFiles", badge: 2 },
25378
- { name: "Completed Files", component: "CompletedFilesMain", icon: RiFileUploadLine3, configKey: "isCompletedFiles", badge: 19 },
25505
+ { name: "Unclaimed Files", component: "UnclaimedFilesMain", icon: RiInboxArchiveLine4, configKey: "isUnclaimedFiles" },
25506
+ { name: "Completed Files", component: "CompletedFilesMain", icon: RiFileUploadLine3, configKey: "isCompletedFiles" },
25379
25507
  { name: "Business Entity", component: "BusinessEntitymain", icon: RiFileList3Line, configKey: "isBusinessEntity" },
25380
25508
  { name: "File Instance", component: "FileInstanceMain", icon: RiFileList3Line, configKey: "isFileInstance" },
25381
25509
  { name: "File Pool", component: "FilePoolMain", icon: RiDatabase2Line, configKey: "isFilePool" },
@@ -25429,21 +25557,21 @@ function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
25429
25557
  ...trackingItems,
25430
25558
  ...communicationItems
25431
25559
  ];
25432
- const [activeComponent, setActiveComponent] = useState81(() => {
25560
+ const [activeComponent, setActiveComponent] = useState82(() => {
25433
25561
  const all = getAllAvailableItems();
25434
25562
  const inboxItem = all.find((item) => item.component === "InboxMain");
25435
25563
  if (inboxItem) return "InboxMain";
25436
25564
  return all.length > 0 ? all[0].component : null;
25437
25565
  });
25438
- const [workflowOpen, setWorkflowOpen] = useState81(false);
25439
- const [permissionOpen, setPermissionOpen] = useState81(false);
25440
- const [hierarchyOpen, setHierarchyOpen] = useState81(false);
25441
- const [documentOpen, setDocumentOpen] = useState81(false);
25442
- const [filesOpen, setFilesOpen] = useState81(true);
25443
- const [tasksOpen, setTasksOpen] = useState81(false);
25444
- const [trackingOpen, setTrackingOpen] = useState81(false);
25445
- const [communicationOpen, setCommunicationOpen] = useState81(false);
25446
- useEffect61(() => {
25566
+ const [workflowOpen, setWorkflowOpen] = useState82(false);
25567
+ const [permissionOpen, setPermissionOpen] = useState82(false);
25568
+ const [hierarchyOpen, setHierarchyOpen] = useState82(false);
25569
+ const [documentOpen, setDocumentOpen] = useState82(false);
25570
+ const [filesOpen, setFilesOpen] = useState82(true);
25571
+ const [tasksOpen, setTasksOpen] = useState82(false);
25572
+ const [trackingOpen, setTrackingOpen] = useState82(false);
25573
+ const [communicationOpen, setCommunicationOpen] = useState82(false);
25574
+ useEffect62(() => {
25447
25575
  if (workflowItems.some((item) => item.component === activeComponent)) {
25448
25576
  setWorkflowOpen(true);
25449
25577
  } else if (permissionItems.some((item) => item.component === activeComponent)) {
@@ -25730,10 +25858,10 @@ function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
25730
25858
  }
25731
25859
 
25732
25860
  // src/components/Layout.jsx
25733
- import { useState as useState82 } from "react";
25861
+ import { useState as useState83 } from "react";
25734
25862
  import { jsx as jsx118 } from "react/jsx-runtime";
25735
25863
  var Layout = ({ children, sidebar, sidebarConfig }) => {
25736
- const [isOpen, setIsOpen] = useState82(true);
25864
+ const [isOpen, setIsOpen] = useState83(true);
25737
25865
  const resolvedSidebarConfig = sidebar != null ? sidebar : sidebarConfig;
25738
25866
  return /* @__PURE__ */ jsx118(
25739
25867
  "div",