flowcore-fn 10.2.7 → 10.2.9

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.
@@ -18839,7 +18839,7 @@ import {
18839
18839
  import React94, { useEffect as useEffect48 } from "react";
18840
18840
  import { RiInboxArchiveLine, RiCloseLine, RiAlertLine, RiCheckLine } from "@remixicon/react";
18841
18841
  import { jsx as jsx94, jsxs as jsxs93 } from "react/jsx-runtime";
18842
- function PoolConfirmationModal({ isOpen, onClose, onConfirm, file }) {
18842
+ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file, isSubmitting = false }) {
18843
18843
  useEffect48(() => {
18844
18844
  if (!isOpen) return;
18845
18845
  const handleKeyDown = (e) => {
@@ -18862,8 +18862,8 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file }) {
18862
18862
  /* @__PURE__ */ jsxs93("div", { className: "fc:flex fc:items-center fc:gap-3", children: [
18863
18863
  /* @__PURE__ */ jsx94("div", { className: "fc:w-10 fc:h-10 fc:bg-blue-50 fc:text-blue-600 fc:rounded-xl fc:flex fc:items-center fc:justify-center fc:shadow-inner", children: /* @__PURE__ */ jsx94(RiInboxArchiveLine, { size: 20 }) }),
18864
18864
  /* @__PURE__ */ jsxs93("div", { children: [
18865
- /* @__PURE__ */ jsx94("h3", { className: "fc:text-base fc:font-bold fc:text-slate-800", children: "Confirm Pool File" }),
18866
- /* @__PURE__ */ jsx94("p", { className: "fc:text-xs fc:text-slate-500", children: "Claim file into your personal work queue" })
18865
+ /* @__PURE__ */ jsx94("h3", { className: "fc:text-base fc:font-bold fc:text-slate-800", children: "Claim Workflow Files" }),
18866
+ /* @__PURE__ */ jsx94("p", { className: "fc:text-xs fc:text-slate-500", children: "Claim unclaimed files for the selected step" })
18867
18867
  ] })
18868
18868
  ] }),
18869
18869
  /* @__PURE__ */ jsx94(
@@ -18871,6 +18871,7 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file }) {
18871
18871
  {
18872
18872
  type: "button",
18873
18873
  onClick: onClose,
18874
+ disabled: isSubmitting,
18874
18875
  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",
18875
18876
  children: /* @__PURE__ */ jsx94(RiCloseLine, { size: 20 })
18876
18877
  }
@@ -18880,9 +18881,11 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file }) {
18880
18881
  /* @__PURE__ */ jsxs93("div", { className: "fc:flex fc:items-start fc:gap-3 fc:p-3.5 fc:bg-blue-50/70 fc:border fc:border-blue-100 fc:rounded-2xl", children: [
18881
18882
  /* @__PURE__ */ jsx94(RiAlertLine, { size: 20, className: "fc:text-blue-600 fc:shrink-0 fc:mt-0.5" }),
18882
18883
  /* @__PURE__ */ jsxs93("div", { className: "fc:text-xs fc:text-blue-900 fc:leading-relaxed", children: [
18883
- "Are you sure you want to pool this file? Once confirmed, this file will be locked from the common pool and assigned to your ",
18884
+ "Confirming will claim ",
18885
+ /* @__PURE__ */ jsx94("strong", { className: "fc:font-bold", children: "all unclaimed files" }),
18886
+ " for this workflow step and assign them to your ",
18884
18887
  /* @__PURE__ */ jsx94("strong", { className: "fc:font-bold", children: "My Files" }),
18885
- " tab for processing."
18888
+ " queue."
18886
18889
  ] })
18887
18890
  ] }),
18888
18891
  /* @__PURE__ */ jsxs93("div", { className: "fc:bg-slate-50/80 fc:rounded-2xl fc:p-4 fc:border fc:border-slate-100 fc:space-y-2.5", children: [
@@ -18920,6 +18923,7 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file }) {
18920
18923
  {
18921
18924
  type: "button",
18922
18925
  onClick: onClose,
18926
+ disabled: isSubmitting,
18923
18927
  className: "fc:px-4 fc:py-2 fc:border fc:border-slate-200 fc:text-slate-600 hover:fc:bg-slate-100 fc:text-xs fc:font-bold fc:rounded-xl fc:transition-all",
18924
18928
  children: "Cancel"
18925
18929
  }
@@ -18928,11 +18932,12 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file }) {
18928
18932
  "button",
18929
18933
  {
18930
18934
  type: "button",
18931
- onClick: () => onConfirm(file),
18932
- className: "fc:px-5 fc:py-2 fc:bg-blue-600 hover:fc:bg-blue-700 fc:text-white fc:text-xs fc:font-bold fc:rounded-xl fc:shadow-md fc:shadow-blue-500/20 fc:transition-all fc:flex fc:items-center fc:gap-1.5",
18935
+ onClick: onConfirm,
18936
+ disabled: isSubmitting,
18937
+ className: "fc:px-5 fc:py-2 fc:bg-blue-600 hover:fc:bg-blue-700 fc:text-white fc:text-xs fc:font-bold fc:rounded-xl fc:shadow-md fc:shadow-blue-500/20 fc:transition-all fc:flex fc:items-center fc:gap-1.5 disabled:fc:cursor-not-allowed disabled:fc:opacity-60",
18933
18938
  children: [
18934
18939
  /* @__PURE__ */ jsx94(RiCheckLine, { size: 16 }),
18935
- "Yes, Pool File"
18940
+ isSubmitting ? "Claiming..." : "Yes, Claim Files"
18936
18941
  ]
18937
18942
  }
18938
18943
  )
@@ -18945,16 +18950,68 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file }) {
18945
18950
  import React95, { useState as useState70, useEffect as useEffect49, useCallback } from "react";
18946
18951
  import { RiTaskLine, RiCloseLine as RiCloseLine2, RiSendPlaneLine } from "@remixicon/react";
18947
18952
  import { jsx as jsx95, jsxs as jsxs94 } from "react/jsx-runtime";
18953
+ var getAvailableActions = (response) => {
18954
+ var _a, _b, _c, _d, _e, _f, _g;
18955
+ console.log("Raw response for available actions:", response);
18956
+ 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;
18957
+ const rows = Array.isArray(value) ? value : (_g = (_f = value == null ? void 0 : value.items) != null ? _f : value == null ? void 0 : value.records) != null ? _g : [];
18958
+ return rows.map((action) => {
18959
+ var _a2, _b2, _c2, _d2, _e2, _f2;
18960
+ return {
18961
+ label: (_d2 = (_c2 = (_b2 = (_a2 = action.label) != null ? _a2 : action.Label) != null ? _b2 : action.actionName) != null ? _c2 : action.ActionName) != null ? _d2 : "",
18962
+ actionCode: (_f2 = (_e2 = action.actionCode) != null ? _e2 : action.ActionCode) != null ? _f2 : ""
18963
+ };
18964
+ }).filter((action) => action.label && action.actionCode);
18965
+ };
18948
18966
  function TakeActionModal({ isOpen, onClose, onSubmit, file }) {
18949
- const [actionType, setActionType] = useState70("forward");
18967
+ const [actions, setActions] = useState70([]);
18968
+ const [actionCode, setActionCode] = useState70("");
18969
+ const [isLoadingActions, setIsLoadingActions] = useState70(false);
18970
+ const [actionLoadError, setActionLoadError] = useState70("");
18950
18971
  const [remarks, setRemarks] = useState70("");
18951
18972
  const [isSubmitting, setIsSubmitting] = useState70(false);
18952
18973
  const handleClose = useCallback(() => {
18953
- setActionType("forward");
18974
+ if (isSubmitting) return;
18975
+ setActionCode("");
18954
18976
  setRemarks("");
18955
- setIsSubmitting(false);
18956
18977
  onClose();
18957
- }, [onClose]);
18978
+ }, [isSubmitting, onClose]);
18979
+ useEffect49(() => {
18980
+ if (!isOpen || !file) return void 0;
18981
+ let isCurrent = true;
18982
+ const loadActions = async () => {
18983
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
18984
+ setActions([]);
18985
+ setActionCode("");
18986
+ setActionLoadError("");
18987
+ setIsLoadingActions(true);
18988
+ try {
18989
+ const flowCore = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) != null ? _b : {};
18990
+ const endpoint2 = (_g = (_e = (_c = flowCore.inbox) == null ? void 0 : _c.GetPermisiionLabelWithCode) != null ? _e : (_d = flowCore.inbox) == null ? void 0 : _d.getPermisiionLabelWithCode) != null ? _g : (_f = flowCore.inbox) == null ? void 0 : _f.getByWorkflowStepId;
18991
+ const workflowStepId = (_h = file.workflowStepId) != null ? _h : file.WorkflowStepId;
18992
+ if (!endpoint2) throw new Error("Workflow step actions endpoint is not configured.");
18993
+ if (workflowStepId == null) throw new Error("Workflow step ID is missing for this file.");
18994
+ const url = typeof endpoint2 === "function" ? endpoint2() : String(endpoint2);
18995
+ const nextActions = getAvailableActions(await getApiService().post(url, {
18996
+ workflowStepId: Number(workflowStepId)
18997
+ }));
18998
+ if (!isCurrent) return;
18999
+ console.log("Available actions for workflow step:", nextActions);
19000
+ setActions(nextActions);
19001
+ setActionCode((_j = (_i = nextActions[0]) == null ? void 0 : _i.actionCode) != null ? _j : "");
19002
+ if (nextActions.length === 0) setActionLoadError("No actions are available for this workflow step.");
19003
+ } catch (error) {
19004
+ if (!isCurrent) return;
19005
+ setActionLoadError(((_l = (_k = error == null ? void 0 : error.response) == null ? void 0 : _k.data) == null ? void 0 : _l.message) || (error == null ? void 0 : error.message) || "Unable to load workflow actions.");
19006
+ } finally {
19007
+ if (isCurrent) setIsLoadingActions(false);
19008
+ }
19009
+ };
19010
+ loadActions();
19011
+ return () => {
19012
+ isCurrent = false;
19013
+ };
19014
+ }, [file, isOpen]);
18958
19015
  useEffect49(() => {
18959
19016
  if (!isOpen) return;
18960
19017
  const handleKeyDown = (e) => {
@@ -18964,10 +19021,15 @@ function TakeActionModal({ isOpen, onClose, onSubmit, file }) {
18964
19021
  return () => window.removeEventListener("keydown", handleKeyDown);
18965
19022
  }, [isOpen, handleClose]);
18966
19023
  if (!isOpen || !file) return null;
18967
- const handleSubmit = (e) => {
19024
+ const handleSubmit = async (e) => {
18968
19025
  e.preventDefault();
19026
+ if (!actionCode || isLoadingActions || isSubmitting) return;
18969
19027
  setIsSubmitting(true);
18970
- onSubmit({ file, actionType, remarks });
19028
+ try {
19029
+ await onSubmit({ file, actionCode, remarks });
19030
+ } finally {
19031
+ setIsSubmitting(false);
19032
+ }
18971
19033
  };
18972
19034
  return /* @__PURE__ */ jsxs94("div", { className: "fc:fixed fc:inset-0 fc:z-50 fc:flex fc:items-center fc:justify-center fc:p-4", children: [
18973
19035
  /* @__PURE__ */ jsx95(
@@ -18994,6 +19056,7 @@ function TakeActionModal({ isOpen, onClose, onSubmit, file }) {
18994
19056
  {
18995
19057
  type: "button",
18996
19058
  onClick: handleClose,
19059
+ disabled: isSubmitting,
18997
19060
  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",
18998
19061
  children: /* @__PURE__ */ jsx95(RiCloseLine2, { size: 20 })
18999
19062
  }
@@ -19020,39 +19083,37 @@ function TakeActionModal({ isOpen, onClose, onSubmit, file }) {
19020
19083
  "Select Action ",
19021
19084
  /* @__PURE__ */ jsx95("span", { className: "fc:text-red-500", children: "*" })
19022
19085
  ] }),
19023
- /* @__PURE__ */ jsx95("div", { className: "fc:grid fc:grid-cols-2 fc:gap-2.5", children: [
19024
- { id: "forward", label: "Forward to Next Step", color: "emerald" },
19025
- { id: "approve", label: "Approve & Complete", color: "blue" },
19026
- { id: "return", label: "Return / Send Back", color: "amber" },
19027
- { id: "hold", label: "Put on Hold", color: "slate" }
19028
- ].map((act) => /* @__PURE__ */ jsxs94(
19086
+ /* @__PURE__ */ jsx95("div", { className: "fc:grid fc:grid-cols-2 fc:gap-2.5", children: actions.map((act) => /* @__PURE__ */ jsxs94(
19029
19087
  "label",
19030
19088
  {
19031
- className: `fc:flex fc:items-center fc:gap-2.5 fc:p-2.5 fc:rounded-xl fc:border fc:cursor-pointer fc:transition-all ${actionType === act.id ? "fc:border-emerald-500 fc:bg-emerald-50/50 fc:text-emerald-700 fc:ring-1 fc:ring-emerald-500/20" : "fc:border-slate-200 fc:bg-white hover:fc:bg-slate-50 fc:text-slate-700"}`,
19089
+ className: `fc:flex fc:items-center fc:gap-2.5 fc:p-2.5 fc:rounded-xl fc:border fc:cursor-pointer fc:transition-all ${actionCode === act.actionCode ? "fc:border-emerald-500 fc:bg-emerald-50/50 fc:text-emerald-700 fc:ring-1 fc:ring-emerald-500/20" : "fc:border-slate-200 fc:bg-white hover:fc:bg-slate-50 fc:text-slate-700"}`,
19032
19090
  children: [
19033
19091
  /* @__PURE__ */ jsx95(
19034
19092
  "input",
19035
19093
  {
19036
19094
  type: "radio",
19037
19095
  name: "actionType",
19038
- value: act.id,
19039
- checked: actionType === act.id,
19040
- onChange: (e) => setActionType(e.target.value),
19096
+ value: act.actionCode,
19097
+ checked: actionCode === act.actionCode,
19098
+ onChange: (e) => setActionCode(e.target.value),
19099
+ disabled: isSubmitting,
19041
19100
  className: "fc:sr-only"
19042
19101
  }
19043
19102
  ),
19044
19103
  /* @__PURE__ */ jsx95(
19045
19104
  "div",
19046
19105
  {
19047
- className: `fc:w-4 fc:h-4 fc:rounded-full fc:border fc:flex fc:items-center fc:justify-center ${actionType === act.id ? "fc:border-emerald-600 fc:bg-emerald-600" : "fc:border-slate-300"}`,
19048
- children: actionType === act.id && /* @__PURE__ */ jsx95("div", { className: "fc:w-1.5 fc:h-1.5 fc:bg-white fc:rounded-full" })
19106
+ className: `fc:w-4 fc:h-4 fc:rounded-full fc:border fc:flex fc:items-center fc:justify-center ${actionCode === act.actionCode ? "fc:border-emerald-600 fc:bg-emerald-600" : "fc:border-slate-300"}`,
19107
+ children: actionCode === act.actionCode && /* @__PURE__ */ jsx95("div", { className: "fc:w-1.5 fc:h-1.5 fc:bg-white fc:rounded-full" })
19049
19108
  }
19050
19109
  ),
19051
19110
  /* @__PURE__ */ jsx95("span", { className: "fc:text-xs fc:font-bold", children: act.label })
19052
19111
  ]
19053
19112
  },
19054
- act.id
19055
- )) })
19113
+ act.actionCode
19114
+ )) }),
19115
+ isLoadingActions && /* @__PURE__ */ jsx95("p", { className: "fc:mt-2 fc:text-xs fc:text-slate-500", children: "Loading available actions..." }),
19116
+ actionLoadError && /* @__PURE__ */ jsx95("p", { className: "fc:mt-2 fc:text-xs fc:text-red-600", children: actionLoadError })
19056
19117
  ] }),
19057
19118
  /* @__PURE__ */ jsxs94("div", { children: [
19058
19119
  /* @__PURE__ */ jsx95("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1", children: "Remarks / Comments" }),
@@ -19084,7 +19145,7 @@ function TakeActionModal({ isOpen, onClose, onSubmit, file }) {
19084
19145
  "button",
19085
19146
  {
19086
19147
  type: "submit",
19087
- disabled: isSubmitting,
19148
+ disabled: isSubmitting || isLoadingActions || !actionCode,
19088
19149
  className: "fc:px-5 fc:py-2 fc:bg-emerald-600 hover:fc:bg-emerald-700 fc:text-white fc:text-xs fc:font-bold fc:rounded-xl fc:shadow-md fc:shadow-emerald-500/20 fc:transition-all fc:flex fc:items-center fc:gap-1.5 disabled:fc:opacity-50",
19089
19150
  children: [
19090
19151
  /* @__PURE__ */ jsx95(RiSendPlaneLine, { size: 16 }),
@@ -19211,266 +19272,228 @@ function ViewFileModal({ isOpen, onClose, file }) {
19211
19272
 
19212
19273
  // src/components/inbox/InboxMain.jsx
19213
19274
  import { jsx as jsx97, jsxs as jsxs96 } from "react/jsx-runtime";
19214
- var INBOX_ROLES = [
19215
- { name: "Reviewer", marker: "RV", step: "Scrutiny & Review", description: "Review applications and findings", color: "fc:bg-blue-100 fc:text-blue-700" },
19216
- { name: "Verifier", marker: "VF", step: "Document Verification", description: "Validate submitted documents", color: "fc:bg-teal-100 fc:text-teal-700" },
19217
- { name: "Approver", marker: "AP", step: "Final Approval", description: "Approve or return completed cases", color: "fc:bg-amber-100 fc:text-amber-700" }
19218
- ];
19219
- var INITIAL_FILE_POOL = [
19220
- {
19221
- fileId: 101,
19222
- fileNumber: "FC-2026-0142",
19223
- subject: "Industrial Waste Discharge License Renewal ApplicationIndustrial Waste Discharge License Renewal Application",
19224
- workflowName: "Environmental Clearance",
19225
- department: "Environment & Forests",
19226
- applicant: "GreenTech Industries Ltd.",
19227
- category: "Statutory Renewal",
19228
- financialYear: "2026-27",
19229
- sender: "GreenTech Industries Ltd.",
19230
- priority: "Urgent",
19231
- receivedDate: "05-Oct-2026 09:15 AM",
19232
- dueDate: "09-Oct-2026",
19233
- slaStatus: "Critical (18h left)",
19234
- status: "Available",
19235
- assignedTo: "-"
19236
- },
19237
- {
19238
- fileId: 102,
19239
- fileNumber: "FC-2026-0145",
19240
- subject: "Sector 14 Commercial Complex Building Plan Sanction",
19241
- workflowName: "Urban Development Clearance",
19242
- department: "Urban Development",
19243
- applicant: "Apex Constructions Pvt Ltd",
19244
- category: "Commercial Sanction",
19245
- financialYear: "2026-27",
19246
- sender: "Apex Constructions Pvt Ltd",
19247
- priority: "High",
19248
- receivedDate: "05-Oct-2026 11:30 AM",
19249
- dueDate: "12-Oct-2026",
19250
- slaStatus: "Running (4d left)",
19251
- status: "Available",
19252
- assignedTo: "-"
19253
- },
19254
- {
19255
- fileId: 103,
19256
- fileNumber: "FC-2026-0149",
19257
- subject: "Annual Cyber Security Audit & Compliance Report",
19258
- workflowName: "IT Security Compliance",
19259
- department: "Information Technology",
19260
- applicant: "Internal IT Audit Cell",
19261
- category: "Internal Audit",
19262
- financialYear: "2026-27",
19263
- sender: "Internal IT Audit Cell",
19264
- priority: "Medium",
19265
- receivedDate: "06-Oct-2026 02:45 PM",
19266
- dueDate: "15-Oct-2026",
19267
- slaStatus: "Running (7d left)",
19268
- status: "Available",
19269
- assignedTo: "-"
19270
- },
19271
- {
19272
- fileId: 104,
19273
- fileNumber: "FC-2026-0153",
19274
- subject: "Vendor Onboarding & Due Diligence - Cloud Services",
19275
- workflowName: "Procurement & Contracts",
19276
- department: "Procurement Cell",
19277
- applicant: "Global Infotech Solutions",
19278
- category: "Vendor Registration",
19279
- financialYear: "2026-27",
19280
- sender: "Global Infotech Solutions",
19281
- priority: "High",
19282
- receivedDate: "06-Oct-2026 04:10 PM",
19283
- dueDate: "11-Oct-2026",
19284
- slaStatus: "Running (3d left)",
19285
- status: "Available",
19286
- assignedTo: "-"
19287
- },
19288
- {
19289
- fileId: 105,
19290
- fileNumber: "FC-2026-0158",
19291
- subject: "Township Potable Water Pipeline Overhaul Budget Sanction",
19292
- workflowName: "Public Works Approval",
19293
- department: "Public Works & Water",
19294
- applicant: "Municipal Engineering Dept",
19295
- category: "Capital Outlay",
19296
- financialYear: "2026-27",
19297
- sender: "Municipal Engineering Dept",
19298
- priority: "Urgent",
19299
- receivedDate: "07-Oct-2026 08:30 AM",
19300
- dueDate: "10-Oct-2026",
19301
- slaStatus: "Critical (22h left)",
19302
- status: "Available",
19303
- assignedTo: "-"
19304
- },
19305
- {
19306
- fileId: 106,
19307
- fileNumber: "FC-2026-0162",
19308
- subject: "Employee Health Insurance Policy Provider Revision",
19309
- workflowName: "HR & Employee Welfare",
19310
- department: "Human Resources",
19311
- applicant: "Corporate HR Services",
19312
- category: "Policy Reform",
19313
- financialYear: "2026-27",
19314
- sender: "Corporate HR Services",
19315
- priority: "Low",
19316
- receivedDate: "07-Oct-2026 10:00 AM",
19317
- dueDate: "20-Oct-2026",
19318
- slaStatus: "Running (12d left)",
19319
- status: "Available",
19320
- assignedTo: "-"
19321
- },
19322
- {
19323
- fileId: 107,
19324
- fileNumber: "FC-2026-0167",
19325
- subject: "Renewable Solar Rooftop Grid Connectivity NOC",
19326
- workflowName: "Energy Regulatory Clearance",
19327
- department: "Power & Energy",
19328
- applicant: "SunPower Dynamics Ltd",
19329
- category: "Infrastructure NOC",
19330
- financialYear: "2026-27",
19331
- sender: "SunPower Dynamics Ltd",
19332
- priority: "Medium",
19333
- receivedDate: "07-Oct-2026 11:15 AM",
19334
- dueDate: "14-Oct-2026",
19335
- slaStatus: "Running (6d left)",
19336
- status: "Available",
19337
- assignedTo: "-"
19338
- }
19339
- ];
19340
- var INITIAL_MY_FILES = [
19341
- {
19342
- fileId: 201,
19343
- fileNumber: "FC-2026-0112",
19344
- subject: "Hospital Expansion Fire Safety NOC & Site Clearance",
19345
- workflowName: "Fire & Safety Clearance",
19346
- department: "Public Safety",
19347
- applicant: "City Hospital Trust",
19348
- category: "Statutory NOC",
19349
- financialYear: "2026-27",
19350
- sender: "City Hospital Trust",
19351
- priority: "Urgent",
19352
- receivedDate: "03-Oct-2026 10:15 AM",
19353
- dueDate: "08-Oct-2026",
19354
- slaStatus: "Critical (14h left)",
19355
- status: "Assigned to Me",
19356
- assignedTo: "Pankaj Jain"
19357
- },
19358
- {
19359
- fileId: 202,
19360
- fileNumber: "FC-2026-0120",
19361
- subject: "Q3 Departmental Infrastructure Procurement Sanction",
19362
- workflowName: "Financial Sanction",
19363
- department: "Finance & Accounts",
19364
- applicant: "Administration Division",
19365
- category: "Budget Sanction",
19366
- financialYear: "2026-27",
19367
- sender: "Administration Division",
19368
- priority: "High",
19369
- receivedDate: "04-Oct-2026 01:20 PM",
19370
- dueDate: "10-Oct-2026",
19371
- slaStatus: "Running (2d left)",
19372
- status: "In Progress",
19373
- assignedTo: "Pankaj Jain"
19374
- },
19375
- {
19376
- fileId: 203,
19377
- fileNumber: "FC-2026-0128",
19378
- subject: "Public Interest Petition Regarding Street Light Restoration",
19379
- workflowName: "Citizen Grievance Redressal",
19380
- department: "Municipal Affairs",
19381
- applicant: "Ward 12 Residents Forum",
19382
- category: "Citizen Grievance",
19383
- financialYear: "2026-27",
19384
- sender: "Ward 12 Residents Forum",
19385
- priority: "Medium",
19386
- receivedDate: "04-Oct-2026 03:40 PM",
19387
- dueDate: "12-Oct-2026",
19388
- slaStatus: "Running (4d left)",
19389
- status: "In Progress",
19390
- assignedTo: "Pankaj Jain"
19391
- },
19392
- {
19393
- fileId: 204,
19394
- fileNumber: "FC-2026-0135",
19395
- subject: "Sub-Station Electrical Equipment Maintenance Agreement",
19396
- workflowName: "Procurement & Contracts",
19397
- department: "Power & Energy",
19398
- applicant: "State Power Grid Corp",
19399
- category: "AMC Contract",
19400
- financialYear: "2026-27",
19401
- sender: "State Power Grid Corp",
19402
- priority: "Low",
19403
- receivedDate: "05-Oct-2026 09:50 AM",
19404
- dueDate: "16-Oct-2026",
19405
- slaStatus: "Running (8d left)",
19406
- status: "In Progress",
19407
- assignedTo: "Pankaj Jain"
19408
- }
19409
- ];
19410
- var INITIAL_TOTAL_FILES = [
19411
- ...INITIAL_FILE_POOL,
19412
- ...INITIAL_MY_FILES,
19413
- {
19414
- fileId: 301,
19415
- fileNumber: "FC-2026-0095",
19416
- subject: "National Highway Bypass Land Acquisition Settlement",
19417
- workflowName: "Land Revenue & Settlement",
19418
- department: "Land & Revenue",
19419
- applicant: "District Collectorate",
19420
- category: "Land Settlement",
19421
- financialYear: "2026-27",
19422
- sender: "District Magistrate Secretariat",
19423
- priority: "High",
19424
- receivedDate: "28-Sep-2026 11:00 AM",
19425
- dueDate: "05-Oct-2026",
19426
- slaStatus: "Met / Completed",
19427
- status: "Approved",
19428
- assignedTo: "Executive Director"
19429
- },
19430
- {
19431
- fileId: 302,
19432
- fileNumber: "FC-2026-0103",
19433
- subject: "Metro Rail Corridor Phase 2 Tree Relocation Clearance",
19434
- workflowName: "Environmental Clearance",
19435
- department: "Forestry & Environment",
19436
- applicant: "Metro Rail Corporation",
19437
- category: "Forest Clearance",
19438
- financialYear: "2026-27",
19439
- sender: "Metro Rail Corporation",
19440
- priority: "Medium",
19441
- receivedDate: "30-Sep-2026 02:15 PM",
19442
- dueDate: "07-Oct-2026",
19443
- slaStatus: "Met / Completed",
19444
- status: "Completed",
19445
- assignedTo: "Forest Officer"
19446
- },
19447
- {
19448
- fileId: 303,
19449
- fileNumber: "FC-2026-0108",
19450
- subject: "Smart City Traffic Management System Software SLA",
19451
- workflowName: "Urban Development Clearance",
19452
- department: "Information Technology",
19453
- applicant: "Smart Mobility Dept",
19454
- category: "Software License",
19455
- financialYear: "2026-27",
19456
- sender: "Smart Mobility Dept",
19457
- priority: "Low",
19458
- receivedDate: "01-Oct-2026 04:30 PM",
19459
- dueDate: "15-Oct-2026",
19460
- slaStatus: "Running",
19461
- status: "Under Review",
19462
- assignedTo: "Technical Officer"
19275
+ var getInboxEndpoint = (resourceNames, actions) => {
19276
+ var _a, _b;
19277
+ const flowCore = ((_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) || {};
19278
+ const actionNames = Array.isArray(actions) ? actions : [actions];
19279
+ for (const resourceName of resourceNames) {
19280
+ const resource = flowCore[resourceName];
19281
+ for (const action of actionNames) {
19282
+ const actionName = action.charAt(0).toUpperCase() + action.slice(1);
19283
+ const endpoint2 = (_b = resource == null ? void 0 : resource[action]) != null ? _b : resource == null ? void 0 : resource[actionName];
19284
+ if (endpoint2) return endpoint2;
19285
+ }
19463
19286
  }
19464
- ];
19287
+ return null;
19288
+ };
19289
+ var deriveAssignedStepsEndpoint = (filePoolEndpoint) => {
19290
+ if (typeof filePoolEndpoint !== "string") return null;
19291
+ const endpoint2 = filePoolEndpoint.trim().replace(/\/+$/, "").split("?")[0];
19292
+ const filePoolRoute = "/FilePool/GetUnclaimedFilesByWorkflowStepId";
19293
+ if (!endpoint2.endsWith(filePoolRoute)) return null;
19294
+ return `${endpoint2.slice(0, -filePoolRoute.length)}/WorkflowStepUserMapping/GetAssignedStepsByUser`;
19295
+ };
19296
+ var unwrapInboxRows = (response) => {
19297
+ var _a, _b, _c, _d, _e, _f, _g;
19298
+ 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;
19299
+ return Array.isArray(value) ? value : (_g = (_f = value == null ? void 0 : value.items) != null ? _f : value == null ? void 0 : value.records) != null ? _g : [];
19300
+ };
19301
+ var formatInboxDate = (value) => {
19302
+ if (!value) return "-";
19303
+ const date = new Date(value);
19304
+ return Number.isNaN(date.getTime()) ? String(value) : date.toLocaleString("en-GB", {
19305
+ day: "2-digit",
19306
+ month: "short",
19307
+ year: "numeric",
19308
+ hour: "2-digit",
19309
+ minute: "2-digit"
19310
+ });
19311
+ };
19312
+ var normalizePoolFile = (file) => {
19313
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
19314
+ const taskInstanceId = (_a = file.taskInstanceId) != null ? _a : file.TaskInstanceId;
19315
+ const filePoolId = (_b = file.filePoolId) != null ? _b : file.FilePoolId;
19316
+ const businessEntity = (_c = file.businessEntityType) != null ? _c : file.BusinessEntityType;
19317
+ const businessEntityId = (_d = file.businessEntityId) != null ? _d : file.BusinessEntityId;
19318
+ return __spreadProps(__spreadValues({}, file), {
19319
+ fileId: filePoolId != null ? filePoolId : taskInstanceId,
19320
+ taskInstanceId,
19321
+ workflowStepId: (_e = file.workflowStepId) != null ? _e : file.WorkflowStepId,
19322
+ fileNumber: (_g = (_f = file.fileNumber) != null ? _f : file.applicationNumber) != null ? _g : `TASK-${taskInstanceId != null ? taskInstanceId : filePoolId}`,
19323
+ subject: (_i = (_h = file.subject) != null ? _h : businessEntityId ? `${businessEntity || "File"} #${businessEntityId}` : businessEntity) != null ? _i : `Workflow task ${taskInstanceId != null ? taskInstanceId : ""}`,
19324
+ workflowName: (_k = (_j = file.workflowName) != null ? _j : file.WorkflowName) != null ? _k : "-",
19325
+ department: (_l = file.department) != null ? _l : "-",
19326
+ applicant: (_m = file.applicant) != null ? _m : businessEntityId ? String(businessEntityId) : "-",
19327
+ category: (_p = (_o = (_n = file.category) != null ? _n : file.workflowTypeName) != null ? _o : file.WorkflowTypeName) != null ? _p : "-",
19328
+ financialYear: (_q = file.financialYear) != null ? _q : "-",
19329
+ sender: (_s = (_r = file.sender) != null ? _r : file.initiator) != null ? _s : "-",
19330
+ priority: (_t = file.priority) != null ? _t : "Medium",
19331
+ receivedDate: formatInboxDate((_v = (_u = file.addedOn) != null ? _u : file.createdAt) != null ? _v : file.receivedDate),
19332
+ dueDate: formatInboxDate(file.dueDate),
19333
+ slaStatus: (_w = file.slaStatus) != null ? _w : "-",
19334
+ status: "Available",
19335
+ assignedTo: "-",
19336
+ currentStep: (_x = file.stepName) != null ? _x : "-"
19337
+ });
19338
+ };
19339
+ var normalizeMyFile = (file) => {
19340
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E;
19341
+ const taskInstanceId = (_a = file.taskInstanceId) != null ? _a : file.TaskInstanceId;
19342
+ const businessEntityId = (_b = file.businessEntityId) != null ? _b : file.BusinessEntityId;
19343
+ const businessEntity = (_c = file.businessEntityType) != null ? _c : file.BusinessEntityType;
19344
+ return __spreadProps(__spreadValues({}, file), {
19345
+ fileId: (_d = taskInstanceId != null ? taskInstanceId : file.fileInstanceId) != null ? _d : file.FileInstanceId,
19346
+ taskInstanceId,
19347
+ workflowStepId: (_e = file.workflowStepId) != null ? _e : file.WorkflowStepId,
19348
+ fileNumber: (_g = (_f = file.fileNumber) != null ? _f : file.applicationNumber) != null ? _g : `TASK-${taskInstanceId != null ? taskInstanceId : ""}`,
19349
+ subject: (_i = (_h = file.subject) != null ? _h : businessEntityId ? `${businessEntity || "File"} #${businessEntityId}` : businessEntity) != null ? _i : `Workflow task ${taskInstanceId != null ? taskInstanceId : ""}`,
19350
+ workflowName: (_k = (_j = file.workflowName) != null ? _j : file.WorkflowName) != null ? _k : "-",
19351
+ department: (_l = file.department) != null ? _l : file.hierarchyNodeId ? `Node ${file.hierarchyNodeId}` : "-",
19352
+ applicant: (_m = file.applicant) != null ? _m : businessEntityId ? String(businessEntityId) : "-",
19353
+ category: (_p = (_o = (_n = file.category) != null ? _n : file.workflowTypeName) != null ? _o : file.WorkflowTypeName) != null ? _p : "-",
19354
+ financialYear: (_q = file.financialYear) != null ? _q : "-",
19355
+ sender: (_s = (_r = file.sender) != null ? _r : businessEntity) != null ? _s : "-",
19356
+ priority: (_t = file.priority) != null ? _t : "Medium",
19357
+ receivedDate: formatInboxDate((_u = file.createdAt) != null ? _u : file.receivedDate),
19358
+ dueDate: formatInboxDate(file.dueDate),
19359
+ slaStatus: (_v = file.slaStatus) != null ? _v : "-",
19360
+ status: (_x = (_w = file.fileStatus) != null ? _w : file.statusName) != null ? _x : "In Progress",
19361
+ assignedTo: (_D = (_C = (_B = (_A = (_z = (_y = file.assignedTo) != null ? _y : file.AssignedTo) != null ? _z : file.assignedUserName) != null ? _A : file.AssignedUserName) != null ? _B : file.assignedUserId) != null ? _C : file.AssignedUserId) != null ? _D : "-",
19362
+ currentStep: (_E = file.stepName) != null ? _E : "-"
19363
+ });
19364
+ };
19465
19365
  function InboxMain() {
19466
19366
  const [activeTab, setActiveTab] = useState71("filePool");
19467
- const [activeRole, setActiveRole] = useState71("Reviewer");
19367
+ const [assignedSteps, setAssignedSteps] = useState71([]);
19368
+ const [activeWorkflowStepId, setActiveWorkflowStepId] = useState71(null);
19468
19369
  const [roleDropdownOpen, setRoleDropdownOpen] = useState71(false);
19469
19370
  const roleDropdownRef = useRef24(null);
19470
- const activeRoleDetails = INBOX_ROLES.find((role) => role.name === activeRole) || INBOX_ROLES[0];
19471
- const [filePoolFiles, setFilePoolFiles] = useState71(INITIAL_FILE_POOL);
19472
- const [myFiles, setMyFiles] = useState71(INITIAL_MY_FILES);
19473
- const [totalFiles, setTotalFiles] = useState71(INITIAL_TOTAL_FILES);
19371
+ const activeRoleDetails = assignedSteps.find(
19372
+ (step) => Number(step.workflowStepId) === Number(activeWorkflowStepId)
19373
+ );
19374
+ const activeRole = (activeRoleDetails == null ? void 0 : activeRoleDetails.stepName) || "No Assigned Step";
19375
+ const [filePoolFiles, setFilePoolFiles] = useState71([]);
19376
+ const [myFiles, setMyFiles] = useState71([]);
19377
+ const [totalFiles, setTotalFiles] = useState71([]);
19378
+ const [refreshKey, setRefreshKey] = useState71(0);
19379
+ useEffect51(() => {
19380
+ let isCurrent = true;
19381
+ const loadAssignedSteps = async () => {
19382
+ var _a, _b;
19383
+ try {
19384
+ const apiService = getApiService();
19385
+ const unclaimedFilesEndpoint = getInboxEndpoint(
19386
+ ["inbox", "Inbox", "filePool", "FilePool"],
19387
+ "getUnclaimedFilesByWorkflowStepId"
19388
+ );
19389
+ if (!unclaimedFilesEndpoint) {
19390
+ throw new Error("File Pool endpoint is not configured (flowCore.inbox.getUnclaimedFilesByWorkflowStepId).");
19391
+ }
19392
+ const configuredAssignedStepsEndpoint = getInboxEndpoint(
19393
+ ["inbox", "Inbox", "mapping", "Mapping", "workflowStepUserMapping", "WorkflowStepUserMapping", "workflowStep", "WorkFlowStep", "WorkflowStep"],
19394
+ "getAssignedStepsByUser"
19395
+ );
19396
+ const assignedStepsEndpoint = configuredAssignedStepsEndpoint || deriveAssignedStepsEndpoint(unclaimedFilesEndpoint);
19397
+ if (!assignedStepsEndpoint) throw new Error("Assigned workflow steps endpoint is not configured.");
19398
+ const assignedStepsResponse = await apiService.post(assignedStepsEndpoint, {});
19399
+ const stepsById = /* @__PURE__ */ new Map();
19400
+ unwrapInboxRows(assignedStepsResponse).forEach((step) => {
19401
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i;
19402
+ const workflowStepId = Number((_a2 = step.workflowStepId) != null ? _a2 : step.WorkflowStepId);
19403
+ const isActiveMapping = (_b2 = step.isActiveMapping) != null ? _b2 : step.IsActiveMapping;
19404
+ const isReleased = (_c = step.isReleased) != null ? _c : step.IsReleased;
19405
+ if (!Number.isInteger(workflowStepId) || workflowStepId <= 0 || isActiveMapping === false || isReleased === true) return;
19406
+ stepsById.set(workflowStepId, __spreadProps(__spreadValues({}, step), {
19407
+ workflowStepId,
19408
+ stepName: (_e = (_d = step.stepName) != null ? _d : step.StepName) != null ? _e : `Workflow Step ${workflowStepId}`,
19409
+ stepCode: (_g = (_f = step.stepCode) != null ? _f : step.StepCode) != null ? _g : "",
19410
+ workflowName: (_i = (_h = step.workflowName) != null ? _h : step.WorkflowName) != null ? _i : ""
19411
+ }));
19412
+ });
19413
+ const nextAssignedSteps = [...stepsById.values()];
19414
+ if (!isCurrent) return;
19415
+ setAssignedSteps(nextAssignedSteps);
19416
+ setActiveWorkflowStepId(
19417
+ (currentStepId) => {
19418
+ var _a2, _b2;
19419
+ return nextAssignedSteps.some((step) => step.workflowStepId === Number(currentStepId)) ? Number(currentStepId) : (_b2 = (_a2 = nextAssignedSteps[0]) == null ? void 0 : _a2.workflowStepId) != null ? _b2 : null;
19420
+ }
19421
+ );
19422
+ } catch (error) {
19423
+ if (!isCurrent) return;
19424
+ setAssignedSteps([]);
19425
+ setActiveWorkflowStepId(null);
19426
+ await Swal29.fire(
19427
+ "Error",
19428
+ ((_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || (error == null ? void 0 : error.message) || "Unable to load assigned workflow steps.",
19429
+ "error"
19430
+ );
19431
+ }
19432
+ };
19433
+ loadAssignedSteps();
19434
+ return () => {
19435
+ isCurrent = false;
19436
+ };
19437
+ }, []);
19438
+ useEffect51(() => {
19439
+ let isCurrent = true;
19440
+ const loadStepFiles = async () => {
19441
+ var _a, _b;
19442
+ if (!activeWorkflowStepId) {
19443
+ setFilePoolFiles([]);
19444
+ setMyFiles([]);
19445
+ setTotalFiles([]);
19446
+ return;
19447
+ }
19448
+ try {
19449
+ const unclaimedFilesEndpoint = getInboxEndpoint(
19450
+ ["inbox", "Inbox", "filePool", "FilePool"],
19451
+ "getUnclaimedFilesByWorkflowStepId"
19452
+ );
19453
+ if (!unclaimedFilesEndpoint) {
19454
+ throw new Error("File Pool endpoint is not configured (flowCore.inbox.getUnclaimedFilesByWorkflowStepId).");
19455
+ }
19456
+ const myFilesEndpoint = getInboxEndpoint(
19457
+ ["inbox", "Inbox", "myFiles", "MyFiles"],
19458
+ ["getMyFilesList", "getList"]
19459
+ );
19460
+ if (!myFilesEndpoint) {
19461
+ throw new Error("My Files list endpoint is not configured (flowCore.inbox.getMyFilesList).");
19462
+ }
19463
+ const completedFilesEndpoint = getInboxEndpoint(
19464
+ ["inbox", "Inbox", "completedFiles", "CompletedFiles"],
19465
+ "getFilesCompleteList"
19466
+ );
19467
+ if (!completedFilesEndpoint) {
19468
+ throw new Error("Completed Files endpoint is not configured (flowCore.inbox.getFilesCompleteList).");
19469
+ }
19470
+ const payload = { workflowStepId: Number(activeWorkflowStepId) };
19471
+ const [poolResponse, myFilesResponse, completedFilesResponse] = await Promise.all([
19472
+ getApiService().post(unclaimedFilesEndpoint, payload),
19473
+ getApiService().post(myFilesEndpoint, payload),
19474
+ getApiService().post(completedFilesEndpoint, payload)
19475
+ ]);
19476
+ if (!isCurrent) return;
19477
+ setFilePoolFiles(unwrapInboxRows(poolResponse).map(normalizePoolFile));
19478
+ setMyFiles(unwrapInboxRows(myFilesResponse).map(normalizeMyFile));
19479
+ setTotalFiles(unwrapInboxRows(completedFilesResponse).map(normalizeMyFile));
19480
+ } catch (error) {
19481
+ if (!isCurrent) return;
19482
+ setFilePoolFiles([]);
19483
+ setMyFiles([]);
19484
+ setTotalFiles([]);
19485
+ await Swal29.fire(
19486
+ "Error",
19487
+ ((_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || (error == null ? void 0 : error.message) || "Unable to load inbox files.",
19488
+ "error"
19489
+ );
19490
+ }
19491
+ };
19492
+ loadStepFiles();
19493
+ return () => {
19494
+ isCurrent = false;
19495
+ };
19496
+ }, [activeWorkflowStepId, refreshKey]);
19474
19497
  const [dynamicColumns, setDynamicColumns] = useState71([
19475
19498
  { key: "department", label: "Department", width: "190px", visible: true },
19476
19499
  { key: "applicant", label: "Applicant / Entity", width: "210px", visible: true },
@@ -19487,6 +19510,7 @@ function InboxMain() {
19487
19510
  const [sortDirection, setSortDirection] = useState71("asc");
19488
19511
  const [poolModalOpen, setPoolModalOpen] = useState71(false);
19489
19512
  const [selectedPoolFile, setSelectedPoolFile] = useState71(null);
19513
+ const [isClaimingPool, setIsClaimingPool] = useState71(false);
19490
19514
  const [actionModalOpen, setActionModalOpen] = useState71(false);
19491
19515
  const [selectedActionFile, setSelectedActionFile] = useState71(null);
19492
19516
  const [viewModalOpen, setViewModalOpen] = useState71(false);
@@ -19660,42 +19684,84 @@ function InboxMain() {
19660
19684
  setSelectedPoolFile(file);
19661
19685
  setPoolModalOpen(true);
19662
19686
  };
19663
- const handleConfirmPool = async (fileToPool) => {
19664
- setPoolModalOpen(false);
19665
- setFilePoolFiles((prev) => prev.filter((item) => item.fileId !== fileToPool.fileId));
19666
- const claimedFile = __spreadProps(__spreadValues({}, fileToPool), {
19667
- status: "In Progress",
19668
- assignedTo: "Pankaj Jain"
19669
- });
19670
- setMyFiles((prev) => [claimedFile, ...prev]);
19671
- setTotalFiles(
19672
- (prev) => prev.map(
19673
- (item) => item.fileId === fileToPool.fileId ? __spreadProps(__spreadValues({}, item), { status: "In Progress", assignedTo: "Pankaj Jain" }) : item
19674
- )
19675
- );
19676
- await Swal29.fire({
19677
- icon: "success",
19678
- title: "File Pooled Successfully!",
19679
- html: `File <strong>${fileToPool.fileNumber}</strong> has been moved to your <strong>My Files</strong> queue.`,
19680
- confirmButtonColor: "#2563eb",
19681
- timer: 3e3,
19682
- timerProgressBar: true
19683
- });
19687
+ const handleConfirmPool = async () => {
19688
+ var _a, _b;
19689
+ if (!activeWorkflowStepId) {
19690
+ await Swal29.fire("Error", "Select an assigned workflow step before claiming files.", "error");
19691
+ return;
19692
+ }
19693
+ setIsClaimingPool(true);
19694
+ try {
19695
+ const claimEndpoint = getInboxEndpoint(
19696
+ ["inbox", "Inbox", "filePool", "FilePool"],
19697
+ "claimUnclaimedFilesByWorkflowStepId"
19698
+ );
19699
+ if (!claimEndpoint) {
19700
+ throw new Error("Claim endpoint is not configured (flowCore.inbox.claimUnclaimedFilesByWorkflowStepId).");
19701
+ }
19702
+ await getApiService().post(claimEndpoint, {
19703
+ workflowStepId: Number(activeWorkflowStepId)
19704
+ });
19705
+ setPoolModalOpen(false);
19706
+ setSelectedPoolFile(null);
19707
+ setCurrentPage(1);
19708
+ setRefreshKey((previous) => previous + 1);
19709
+ await Swal29.fire({
19710
+ icon: "success",
19711
+ title: "Files Claimed",
19712
+ text: "Unclaimed files for this workflow step have been assigned to your My Files queue.",
19713
+ confirmButtonColor: "#2563eb",
19714
+ timer: 3e3,
19715
+ timerProgressBar: true
19716
+ });
19717
+ } catch (error) {
19718
+ await Swal29.fire(
19719
+ "Error",
19720
+ ((_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || (error == null ? void 0 : error.message) || "Unable to claim files.",
19721
+ "error"
19722
+ );
19723
+ } finally {
19724
+ setIsClaimingPool(false);
19725
+ }
19684
19726
  };
19685
19727
  const handleOpenTakeAction = (file) => {
19686
19728
  setSelectedActionFile(file);
19687
19729
  setActionModalOpen(true);
19688
19730
  };
19689
- const handleActionSubmit = async ({ file, actionType, remarks }) => {
19690
- setActionModalOpen(false);
19691
- await Swal29.fire({
19692
- icon: "success",
19693
- title: "Action Processed!",
19694
- html: `Action <strong>${actionType.toUpperCase()}</strong> on file <strong>${file.fileNumber}</strong> recorded successfully.${remarks ? `<br/><small class="text-slate-500">Remarks: ${remarks}</small>` : ""}`,
19695
- confirmButtonColor: "#059669",
19696
- timer: 3e3,
19697
- timerProgressBar: true
19698
- });
19731
+ const handleActionSubmit = async ({ file, actionCode, actionLabel, remarks }) => {
19732
+ var _a, _b, _c;
19733
+ try {
19734
+ const endpoint2 = getInboxEndpoint(["inbox"], ["ExecutionFlow", "executeAction", "executionFlow"]);
19735
+ if (!endpoint2) throw new Error("Workflow execution endpoint is not configured.");
19736
+ const taskInstanceId = Number((_a = file.taskInstanceId) != null ? _a : file.TaskInstanceId);
19737
+ if (!Number.isInteger(taskInstanceId) || taskInstanceId <= 0) {
19738
+ throw new Error("Task instance ID is missing for this file.");
19739
+ }
19740
+ await getApiService().post(endpoint2, {
19741
+ taskInstanceId,
19742
+ actionCode,
19743
+ comments: remarks.trim()
19744
+ });
19745
+ setActionModalOpen(false);
19746
+ setSelectedActionFile(null);
19747
+ setRefreshKey((previous) => previous + 1);
19748
+ await Swal29.fire({
19749
+ icon: "success",
19750
+ title: "Action Processed!",
19751
+ text: `${actionLabel || actionCode} on file ${file.fileNumber} recorded successfully.${remarks.trim() ? ` Remarks: ${remarks.trim()}` : ""}`,
19752
+ confirmButtonColor: "#059669",
19753
+ timer: 3e3,
19754
+ timerProgressBar: true
19755
+ });
19756
+ return true;
19757
+ } catch (error) {
19758
+ await Swal29.fire(
19759
+ "Error",
19760
+ ((_c = (_b = error == null ? void 0 : error.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || (error == null ? void 0 : error.message) || "Unable to execute workflow action.",
19761
+ "error"
19762
+ );
19763
+ return false;
19764
+ }
19699
19765
  };
19700
19766
  const handleOpenView = (file) => {
19701
19767
  setSelectedViewFile(file);
@@ -19703,11 +19769,12 @@ function InboxMain() {
19703
19769
  };
19704
19770
  const handleRefresh = () => {
19705
19771
  setCurrentPage(1);
19772
+ setRefreshKey((previous) => previous + 1);
19706
19773
  Swal29.fire({
19707
19774
  toast: true,
19708
19775
  position: "top-end",
19709
- icon: "success",
19710
- title: "Inbox updated with latest records",
19776
+ icon: "info",
19777
+ title: "Refreshing inbox files",
19711
19778
  showConfirmButton: false,
19712
19779
  timer: 2e3
19713
19780
  });
@@ -19793,7 +19860,7 @@ function InboxMain() {
19793
19860
  ] }),
19794
19861
  /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center fc:gap-1.5 fc:mt-0.5", children: [
19795
19862
  /* @__PURE__ */ jsx97("span", { className: "fc:text-[10px] fc:text-slate-400 fc:font-medium", children: "Active Step:" }),
19796
- /* @__PURE__ */ jsx97("span", { className: "fc:text-[10px] fc:font-bold fc:text-indigo-600 fc:bg-indigo-50/80 fc:px-1.5 fc:py-0.2 fc:rounded", children: activeRoleDetails.step })
19863
+ /* @__PURE__ */ jsx97("span", { className: "fc:text-[10px] fc:font-bold fc:text-indigo-600 fc:bg-indigo-50/80 fc:px-1.5 fc:py-0.2 fc:rounded", children: (activeRoleDetails == null ? void 0 : activeRoleDetails.stepName) || "-" })
19797
19864
  ] })
19798
19865
  ] }),
19799
19866
  roleDropdownOpen && /* @__PURE__ */ jsxs96(
@@ -19805,30 +19872,39 @@ function InboxMain() {
19805
19872
  children: [
19806
19873
  /* @__PURE__ */ jsxs96("div", { className: "fc:flex fc:items-center fc:justify-between fc:border-b fc:border-slate-100 fc:px-3 fc:pb-2 fc:pt-1.5", children: [
19807
19874
  /* @__PURE__ */ jsx97("div", { children: /* @__PURE__ */ jsx97("p", { className: "fc:text-xs fc:font-bold fc:text-slate-800", children: "Switch role" }) }),
19808
- /* @__PURE__ */ jsx97("span", { className: "fc:rounded-full fc:bg-slate-100 fc:px-2 fc:text-[9px] fc:font-bold fc:text-slate-500", children: "3 ROLES" })
19875
+ /* @__PURE__ */ jsxs96("span", { className: "fc:rounded-full fc:bg-slate-100 fc:px-2 fc:text-[9px] fc:font-bold fc:text-slate-500", children: [
19876
+ assignedSteps.length,
19877
+ " STEPS"
19878
+ ] })
19809
19879
  ] }),
19810
- /* @__PURE__ */ jsx97("div", { className: "fc:space-y-1 fc:pt-0.5", children: INBOX_ROLES.map((role) => /* @__PURE__ */ jsxs96(
19811
- "button",
19812
- {
19813
- type: "button",
19814
- role: "menuitemradio",
19815
- "aria-checked": activeRole === role.name,
19816
- onClick: () => {
19817
- setActiveRole(role.name);
19818
- setRoleDropdownOpen(false);
19880
+ /* @__PURE__ */ jsx97("div", { className: "fc:space-y-1 fc:pt-0.5", children: assignedSteps.length === 0 ? /* @__PURE__ */ jsx97("p", { className: "fc:px-3 fc:py-3 fc:text-xs fc:text-slate-500", children: "No assigned workflow steps" }) : assignedSteps.map((step) => {
19881
+ const isSelected = Number(activeWorkflowStepId) === step.workflowStepId;
19882
+ const stepName = step.stepName || `Workflow Step ${step.workflowStepId}`;
19883
+ const marker = String(step.stepCode || stepName).trim().slice(0, 2).toUpperCase();
19884
+ return /* @__PURE__ */ jsxs96(
19885
+ "button",
19886
+ {
19887
+ type: "button",
19888
+ role: "menuitemradio",
19889
+ "aria-checked": isSelected,
19890
+ onClick: () => {
19891
+ setActiveWorkflowStepId(step.workflowStepId);
19892
+ setCurrentPage(1);
19893
+ setRoleDropdownOpen(false);
19894
+ },
19895
+ className: `fc:flex fc:w-full fc:items-center fc:gap-3 fc:rounded-xl fc:border fc:px-3 fc:py-3 fc:text-left fc:transition-colors ${isSelected ? "fc:border-blue-200 fc:bg-blue-50/80" : "fc:border-transparent fc:bg-white hover:fc:border-slate-200 hover:fc:bg-slate-50"}`,
19896
+ children: [
19897
+ /* @__PURE__ */ jsx97("span", { className: "fc:flex fc:h-9 fc:w-9 fc:shrink-0 fc:items-center fc:justify-center fc:rounded-xl fc:bg-blue-100 fc:text-[10px] fc:font-extrabold fc:text-blue-700", children: marker }),
19898
+ /* @__PURE__ */ jsxs96("span", { className: "fc:min-w-0 fc:flex-1", children: [
19899
+ /* @__PURE__ */ jsx97("span", { className: `fc:block fc:text-xs fc:font-bold ${isSelected ? "fc:text-blue-800" : "fc:text-slate-800"}`, children: stepName }),
19900
+ /* @__PURE__ */ jsx97("span", { className: "fc:mt-0.5 fc:block fc:text-[10px] fc:leading-4 fc:text-slate-500", children: step.workflowName || `Workflow Step ID ${step.workflowStepId}` })
19901
+ ] }),
19902
+ isSelected && /* @__PURE__ */ jsx97("span", { className: "fc:shrink-0 fc:rounded-full fc:bg-blue-100 fc:px-2 fc:py-1 fc:text-[9px] fc:font-bold fc:text-blue-700", children: "Current" })
19903
+ ]
19819
19904
  },
19820
- className: `fc:flex fc:w-full fc:items-center fc:gap-3 fc:rounded-xl fc:border fc:px-3 fc:py-3 fc:text-left fc:transition-colors ${activeRole === role.name ? "fc:border-blue-200 fc:bg-blue-50/80" : "fc:border-transparent fc:bg-white hover:fc:border-slate-200 hover:fc:bg-slate-50"}`,
19821
- children: [
19822
- /* @__PURE__ */ jsx97("span", { className: `fc:flex fc:h-9 fc:w-9 fc:shrink-0 fc:items-center fc:justify-center fc:rounded-xl fc:text-[10px] fc:font-extrabold ${role.color}`, children: role.marker }),
19823
- /* @__PURE__ */ jsxs96("span", { className: "fc:min-w-0 fc:flex-1", children: [
19824
- /* @__PURE__ */ jsx97("span", { className: `fc:block fc:text-xs fc:font-bold ${activeRole === role.name ? "fc:text-blue-800" : "fc:text-slate-800"}`, children: role.name }),
19825
- /* @__PURE__ */ jsx97("span", { className: "fc:mt-0.5 fc:block fc:text-[10px] fc:leading-4 fc:text-slate-500", children: role.description })
19826
- ] }),
19827
- activeRole === role.name && /* @__PURE__ */ jsx97("span", { className: "fc:shrink-0 fc:rounded-full fc:bg-blue-100 fc:px-2 fc:py-1 fc:text-[9px] fc:font-bold fc:text-blue-700", children: "Current" })
19828
- ]
19829
- },
19830
- role.name
19831
- )) })
19905
+ step.workflowStepId
19906
+ );
19907
+ }) })
19832
19908
  ]
19833
19909
  }
19834
19910
  )
@@ -19857,7 +19933,7 @@ function InboxMain() {
19857
19933
  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"}`,
19858
19934
  children: [
19859
19935
  /* @__PURE__ */ jsx97(RiInboxArchiveLine2, { size: 16 }),
19860
- /* @__PURE__ */ jsx97("span", { children: "File Pool" }),
19936
+ /* @__PURE__ */ jsx97("span", { children: "Unclaimed Files" }),
19861
19937
  /* @__PURE__ */ jsx97(
19862
19938
  "span",
19863
19939
  {
@@ -19895,7 +19971,7 @@ function InboxMain() {
19895
19971
  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"}`,
19896
19972
  children: [
19897
19973
  /* @__PURE__ */ jsx97(RiFileUploadLine, { size: 16 }),
19898
- /* @__PURE__ */ jsx97("span", { children: "Total Files" }),
19974
+ /* @__PURE__ */ jsx97("span", { children: "Completed Files" }),
19899
19975
  /* @__PURE__ */ jsx97(
19900
19976
  "span",
19901
19977
  {
@@ -20487,7 +20563,9 @@ function InboxMain() {
20487
20563
  {
20488
20564
  isOpen: poolModalOpen,
20489
20565
  file: selectedPoolFile,
20566
+ isSubmitting: isClaimingPool,
20490
20567
  onClose: () => {
20568
+ if (isClaimingPool) return;
20491
20569
  setPoolModalOpen(false);
20492
20570
  setSelectedPoolFile(null);
20493
20571
  },
@@ -20790,521 +20868,11 @@ function TrackingSlipModal({ isOpen, onClose, application }) {
20790
20868
 
20791
20869
  // src/components/track-application/TrackApplicationMain.jsx
20792
20870
  import { Fragment as Fragment5, jsx as jsx99, jsxs as jsxs98 } from "react/jsx-runtime";
20793
- var APPLICATION_DATABASE = [
20794
- {
20795
- fileId: 202,
20796
- fileNumber: "FC-2026-0120",
20797
- subject: "Q3 Departmental Infrastructure Procurement Sanction",
20798
- workflowName: "Financial Sanction",
20799
- department: "Finance & Accounts",
20800
- applicant: "Administration Division",
20801
- category: "Budget Sanction",
20802
- financialYear: "2026-27",
20803
- sender: "Administration Division",
20804
- priority: "High",
20805
- receivedDate: "04-Oct-2026 01:20 PM",
20806
- dueDate: "10-Oct-2026",
20807
- slaStatus: "Running (2d left)",
20808
- status: "In Progress",
20809
- assignedTo: "Pankaj Jain",
20810
- currentStep: "Budget Head Appropriation",
20811
- progressPercent: 60,
20812
- stages: [
20813
- {
20814
- stageId: 1,
20815
- title: "Indents Consolidated",
20816
- description: "Department hardware requisitions.",
20817
- status: "completed",
20818
- date: "04-Oct-2026 01:20 PM",
20819
- officer: "Admin Division"
20820
- },
20821
- {
20822
- stageId: 2,
20823
- title: "Budget Availability Check",
20824
- description: "Major Head 2052 Capital Outlay.",
20825
- status: "completed",
20826
- date: "05-Oct-2026 11:00 AM",
20827
- officer: "Accounts Officer"
20828
- },
20829
- {
20830
- stageId: 3,
20831
- title: "Competent Authority Sanction",
20832
- description: "Review by Principal Secretary.",
20833
- status: "in-progress",
20834
- date: "Running (Active)",
20835
- officer: "Pankaj Jain"
20836
- },
20837
- {
20838
- stageId: 4,
20839
- title: "Sanction Letter Release",
20840
- description: "Formal expenditure sanction order.",
20841
- status: "pending",
20842
- date: "Target: 10-Oct-2026",
20843
- officer: "Finance Secretariat"
20844
- }
20845
- ],
20846
- movementHistory: [
20847
- {
20848
- id: 1,
20849
- fromStep: "Admin Division",
20850
- toStep: "Finance Scrutiny Cell",
20851
- action: "Sanction Proposal Sent",
20852
- officer: "Joint Secretary Admin",
20853
- timestamp: "04-Oct-2026 01:20 PM",
20854
- remarks: "Proposal for IT hardware and server capacity upgrade."
20855
- },
20856
- {
20857
- id: 2,
20858
- fromStep: "Finance Scrutiny Cell",
20859
- toStep: "Reviewer Desk",
20860
- action: "Budget Validated",
20861
- officer: "Accounts Officer",
20862
- timestamp: "05-Oct-2026 11:00 AM",
20863
- remarks: "Funds verified in current FY allocation."
20864
- }
20865
- ],
20866
- documents: [
20867
- { name: "Detailed Itemized Expense Estimate", type: "PDF", size: "1.9 MB", status: "Verified" },
20868
- { name: "Comparative Quotation Statement", type: "PDF", size: "1.5 MB", status: "Verified" }
20869
- ]
20870
- },
20871
- {
20872
- fileId: 101,
20873
- fileNumber: "FC-2026-0142",
20874
- subject: "Industrial Waste Discharge License Renewal Application",
20875
- workflowName: "Environmental Clearance",
20876
- department: "Environment & Forests",
20877
- applicant: "GreenTech Industries Ltd.",
20878
- category: "Statutory Renewal",
20879
- financialYear: "2026-27",
20880
- sender: "GreenTech Industries Ltd.",
20881
- priority: "Urgent",
20882
- receivedDate: "05-Oct-2026 09:15 AM",
20883
- dueDate: "09-Oct-2026",
20884
- slaStatus: "Critical (18h left)",
20885
- status: "Under Scrutiny",
20886
- assignedTo: "Pankaj Jain (Reviewer)",
20887
- currentStep: "Scrutiny & Review",
20888
- progressPercent: 50,
20889
- stages: [
20890
- {
20891
- stageId: 1,
20892
- title: "Application Registration",
20893
- description: "Application filed online via Single Window Portal.",
20894
- status: "completed",
20895
- date: "05-Oct-2026 09:15 AM",
20896
- officer: "Portal Gateway"
20897
- },
20898
- {
20899
- stageId: 2,
20900
- title: "Document Verification",
20901
- description: "Scrutiny of ETP specifications.",
20902
- status: "completed",
20903
- date: "05-Oct-2026 02:30 PM",
20904
- officer: "Pankaj Jain (Reviewer)"
20905
- },
20906
- {
20907
- stageId: 3,
20908
- title: "Field Inspection & Sampling",
20909
- description: "Pollution Control Board site inspection.",
20910
- status: "in-progress",
20911
- date: "Running (Due: 08-Oct)",
20912
- officer: "Er. Ramesh Verma"
20913
- },
20914
- {
20915
- stageId: 4,
20916
- title: "Appraisal Committee Review",
20917
- description: "State Expert Appraisal Committee review.",
20918
- status: "pending",
20919
- date: "Pending Stage 3",
20920
- officer: "Member Secretary"
20921
- },
20922
- {
20923
- stageId: 5,
20924
- title: "Final NOC & Certificate",
20925
- description: "Issuance of renewal license.",
20926
- status: "pending",
20927
- date: "Target: 09-Oct-2026",
20928
- officer: "Directorate of Env."
20929
- }
20930
- ],
20931
- movementHistory: [
20932
- {
20933
- id: 1,
20934
- fromStep: "Citizen Portal",
20935
- toStep: "Central Inward Registry",
20936
- action: "Application Submitted",
20937
- officer: "GreenTech Representative",
20938
- timestamp: "05-Oct-2026 09:15 AM",
20939
- remarks: "Online application submitted with license renewal fee."
20940
- },
20941
- {
20942
- id: 2,
20943
- fromStep: "Central Inward Registry",
20944
- toStep: "Scrutiny Desk",
20945
- action: "Forwarded for Scrutiny",
20946
- officer: "System Auto-Router",
20947
- timestamp: "05-Oct-2026 09:30 AM",
20948
- remarks: "Automated routing based on Environmental Clearance rule."
20949
- },
20950
- {
20951
- id: 3,
20952
- fromStep: "Scrutiny Desk",
20953
- toStep: "Pollution Control Inspection Cell",
20954
- action: "Under Active Scrutiny",
20955
- officer: "Pankaj Jain (Reviewer)",
20956
- timestamp: "05-Oct-2026 02:30 PM",
20957
- remarks: "Documents cleared. Site sample report requested."
20958
- }
20959
- ],
20960
- documents: [
20961
- { name: "Effluent Treatment Plant (ETP) Specification", type: "PDF", size: "3.4 MB", status: "Verified" },
20962
- { name: "Previous Financial Year Audit Log", type: "PDF", size: "1.8 MB", status: "Verified" },
20963
- { name: "Factory Site Coordinate Map", type: "PDF", size: "850 KB", status: "Under Scrutiny" }
20964
- ]
20965
- },
20966
- {
20967
- fileId: 102,
20968
- fileNumber: "FC-2026-0145",
20969
- subject: "Sector 14 Commercial Complex Building Plan Sanction",
20970
- workflowName: "Urban Development Clearance",
20971
- department: "Urban Development",
20972
- applicant: "Apex Constructions Pvt Ltd",
20973
- category: "Commercial Sanction",
20974
- financialYear: "2026-27",
20975
- sender: "Apex Constructions Pvt Ltd",
20976
- priority: "High",
20977
- receivedDate: "05-Oct-2026 11:30 AM",
20978
- dueDate: "12-Oct-2026",
20979
- slaStatus: "Running (4d left)",
20980
- status: "In Progress",
20981
- assignedTo: "Town Planner Cell",
20982
- currentStep: "Architectural Layout Verification",
20983
- progressPercent: 40,
20984
- stages: [
20985
- {
20986
- stageId: 1,
20987
- title: "Application Registration",
20988
- description: "Commercial sanction proposal filed.",
20989
- status: "completed",
20990
- date: "05-Oct-2026 11:30 AM",
20991
- officer: "Town Planning Portal"
20992
- },
20993
- {
20994
- stageId: 2,
20995
- title: "Town Planning Scrutiny",
20996
- description: "Floor area ratio and parking check.",
20997
- status: "in-progress",
20998
- date: "In Progress",
20999
- officer: "Chief Town Planner"
21000
- },
21001
- {
21002
- stageId: 3,
21003
- title: "Fire & Safety NOC",
21004
- description: "Driveway and structural load clearance.",
21005
- status: "pending",
21006
- date: "Pending Stage 2",
21007
- officer: "Fire Safety Dept"
21008
- },
21009
- {
21010
- stageId: 4,
21011
- title: "Municipal Commissioner Sanction",
21012
- description: "Final statutory sanction order.",
21013
- status: "pending",
21014
- date: "Target: 12-Oct-2026",
21015
- officer: "Municipal Comm."
21016
- }
21017
- ],
21018
- movementHistory: [
21019
- {
21020
- id: 1,
21021
- fromStep: "Citizen Portal",
21022
- toStep: "Urban Planning Registry",
21023
- action: "Filing Received",
21024
- officer: "Apex Constructions",
21025
- timestamp: "05-Oct-2026 11:30 AM",
21026
- remarks: "Proposal registered under Commercial Category A."
21027
- }
21028
- ],
21029
- documents: [
21030
- { name: "Structural Design Blueprint (CAD)", type: "PDF", size: "9.2 MB", status: "Verified" },
21031
- { name: "Land Ownership Deed", type: "PDF", size: "2.1 MB", status: "Verified" }
21032
- ]
21033
- },
21034
- {
21035
- fileId: 201,
21036
- fileNumber: "FC-2026-0112",
21037
- subject: "Hospital Expansion Fire Safety NOC & Site Clearance",
21038
- workflowName: "Fire & Safety Clearance",
21039
- department: "Public Safety",
21040
- applicant: "City Hospital Trust",
21041
- category: "Statutory NOC",
21042
- financialYear: "2026-27",
21043
- sender: "City Hospital Trust",
21044
- priority: "Urgent",
21045
- receivedDate: "03-Oct-2026 10:15 AM",
21046
- dueDate: "08-Oct-2026",
21047
- slaStatus: "Critical (14h left)",
21048
- status: "Under Review",
21049
- assignedTo: "Pankaj Jain (Reviewer)",
21050
- currentStep: "Hydrant & Evacuation Inspection",
21051
- progressPercent: 75,
21052
- stages: [
21053
- {
21054
- stageId: 1,
21055
- title: "Application Received",
21056
- description: "200-bed extension fire clearance.",
21057
- status: "completed",
21058
- date: "03-Oct-2026 10:15 AM",
21059
- officer: "Disaster Desk"
21060
- },
21061
- {
21062
- stageId: 2,
21063
- title: "Architectural Audit",
21064
- description: "Emergency exits and fire lifts check.",
21065
- status: "completed",
21066
- date: "04-Oct-2026 02:00 PM",
21067
- officer: "Pankaj Jain"
21068
- },
21069
- {
21070
- stageId: 3,
21071
- title: "Hydrant Pressure Test",
21072
- description: "Physical inspection of water tanks.",
21073
- status: "in-progress",
21074
- date: "Running (Critical)",
21075
- officer: "Inspection Team"
21076
- },
21077
- {
21078
- stageId: 4,
21079
- title: "Issuance of Certificate",
21080
- description: "Final statutory NOC issuance.",
21081
- status: "pending",
21082
- date: "Target: 08-Oct-2026",
21083
- officer: "DG Fire Services"
21084
- }
21085
- ],
21086
- movementHistory: [
21087
- {
21088
- id: 1,
21089
- fromStep: "City Hospital Trust",
21090
- toStep: "Public Safety Central Registry",
21091
- action: "Application Filed",
21092
- officer: "Trust Secretary",
21093
- timestamp: "03-Oct-2026 10:15 AM",
21094
- remarks: "Priority expedited due to public healthcare expansion."
21095
- }
21096
- ],
21097
- documents: [
21098
- { name: "Emergency Evacuation Route Map", type: "PDF", size: "3.9 MB", status: "Verified" }
21099
- ]
21100
- },
21101
- {
21102
- fileId: 104,
21103
- fileNumber: "FC-2026-0153",
21104
- subject: "Vendor Onboarding & Due Diligence - Cloud Services",
21105
- workflowName: "Procurement & Contracts",
21106
- department: "Procurement Cell",
21107
- applicant: "Global Infotech Solutions",
21108
- category: "Vendor Registration",
21109
- financialYear: "2026-27",
21110
- sender: "Global Infotech Solutions",
21111
- priority: "High",
21112
- receivedDate: "06-Oct-2026 04:10 PM",
21113
- dueDate: "11-Oct-2026",
21114
- slaStatus: "Running (3d left)",
21115
- status: "In Progress",
21116
- assignedTo: "Tender Committee",
21117
- currentStep: "Financial Bid Eligibility",
21118
- progressPercent: 45,
21119
- stages: [
21120
- {
21121
- stageId: 1,
21122
- title: "Vendor Registration",
21123
- description: "Tender credentials submitted.",
21124
- status: "completed",
21125
- date: "06-Oct-2026 04:10 PM",
21126
- officer: "e-Procurement Portal"
21127
- },
21128
- {
21129
- stageId: 2,
21130
- title: "Technical Eligibility",
21131
- description: "Past experience evaluation.",
21132
- status: "completed",
21133
- date: "07-Oct-2026 10:00 AM",
21134
- officer: "Evaluation Board"
21135
- },
21136
- {
21137
- stageId: 3,
21138
- title: "Financial Eligibility",
21139
- description: "Balance sheets and solvency audit.",
21140
- status: "in-progress",
21141
- date: "Running",
21142
- officer: "Finance Officer"
21143
- },
21144
- {
21145
- stageId: 4,
21146
- title: "Contract Award",
21147
- description: "SLA and agreement execution.",
21148
- status: "pending",
21149
- date: "Target: 11-Oct-2026",
21150
- officer: "Director Procurement"
21151
- }
21152
- ],
21153
- movementHistory: [
21154
- {
21155
- id: 1,
21156
- fromStep: "Vendor Portal",
21157
- toStep: "Procurement Intake",
21158
- action: "Bid Registered",
21159
- officer: "Global Infotech",
21160
- timestamp: "06-Oct-2026 04:10 PM",
21161
- remarks: "Online submission with Earnest Money Deposit receipt."
21162
- }
21163
- ],
21164
- documents: [
21165
- { name: "Audited Balance Sheets (3 Years)", type: "PDF", size: "5.1 MB", status: "Verified" }
21166
- ]
21167
- },
21168
- {
21169
- fileId: 203,
21170
- fileNumber: "FC-2026-0128",
21171
- subject: "Public Interest Petition Regarding Street Light Restoration",
21172
- workflowName: "Citizen Grievance Redressal",
21173
- department: "Municipal Affairs",
21174
- applicant: "Ward 12 Residents Forum",
21175
- category: "Citizen Grievance",
21176
- financialYear: "2026-27",
21177
- sender: "Ward 12 Residents Forum",
21178
- priority: "Medium",
21179
- receivedDate: "04-Oct-2026 03:40 PM",
21180
- dueDate: "12-Oct-2026",
21181
- slaStatus: "Running (4d left)",
21182
- status: "In Progress",
21183
- assignedTo: "Pankaj Jain",
21184
- currentStep: "Field Action Team Dispatch",
21185
- progressPercent: 55,
21186
- stages: [
21187
- {
21188
- stageId: 1,
21189
- title: "Petition Lodged",
21190
- description: "Grievance received through CM Helpline.",
21191
- status: "completed",
21192
- date: "04-Oct-2026 03:40 PM",
21193
- officer: "Citizen Helpdesk"
21194
- },
21195
- {
21196
- stageId: 2,
21197
- title: "Ward Engineer Assigned",
21198
- description: "Underground cabling check.",
21199
- status: "completed",
21200
- date: "05-Oct-2026 10:00 AM",
21201
- officer: "Assistant Engineer"
21202
- },
21203
- {
21204
- stageId: 3,
21205
- title: "Repair & Cable Laying",
21206
- description: "Cable and fixture replacements.",
21207
- status: "in-progress",
21208
- date: "Running",
21209
- officer: "Field Squad"
21210
- },
21211
- {
21212
- stageId: 4,
21213
- title: "Resolution & Closure",
21214
- description: "Confirmation with petitioner.",
21215
- status: "pending",
21216
- date: "Target: 12-Oct-2026",
21217
- officer: "Pankaj Jain"
21218
- }
21219
- ],
21220
- movementHistory: [
21221
- {
21222
- id: 1,
21223
- fromStep: "Citizen Helpdesk",
21224
- toStep: "Municipal Electrical Division",
21225
- action: "Grievance Categorized",
21226
- officer: "Helpdesk Officer",
21227
- timestamp: "04-Oct-2026 03:40 PM",
21228
- remarks: "Ward 12 Main Sector street illumination failure complaint."
21229
- }
21230
- ],
21231
- documents: [
21232
- { name: "Citizen Complaint Letter", type: "PDF", size: "1.1 MB", status: "Verified" }
21233
- ]
21234
- },
21235
- {
21236
- fileId: 301,
21237
- fileNumber: "FC-2026-0095",
21238
- subject: "National Highway Bypass Land Acquisition Settlement",
21239
- workflowName: "Land Revenue & Settlement",
21240
- department: "Land & Revenue",
21241
- applicant: "District Collectorate",
21242
- category: "Land Settlement",
21243
- financialYear: "2026-27",
21244
- sender: "District Magistrate Secretariat",
21245
- priority: "High",
21246
- receivedDate: "28-Sep-2026 11:00 AM",
21247
- dueDate: "05-Oct-2026",
21248
- slaStatus: "Met / Completed",
21249
- status: "Completed",
21250
- assignedTo: "Executive Director",
21251
- currentStep: "Award Pronouncement & Compensation",
21252
- progressPercent: 100,
21253
- stages: [
21254
- {
21255
- stageId: 1,
21256
- title: "Section 4 Notification",
21257
- description: "Survey of affected parcels.",
21258
- status: "completed",
21259
- date: "28-Sep-2026 11:00 AM",
21260
- officer: "Land Acquisition Officer"
21261
- },
21262
- {
21263
- stageId: 2,
21264
- title: "Public Hearing",
21265
- description: "Hearing of titleholders.",
21266
- status: "completed",
21267
- date: "30-Sep-2026 04:00 PM",
21268
- officer: "ADM Revenue"
21269
- },
21270
- {
21271
- stageId: 3,
21272
- title: "Award Declaration",
21273
- description: "Compensation disbursed to bank accounts.",
21274
- status: "completed",
21275
- date: "04-Oct-2026 01:30 PM",
21276
- officer: "Executive Director"
21277
- },
21278
- {
21279
- stageId: 4,
21280
- title: "Possession Handover",
21281
- description: "Corridor transferred to NHAI.",
21282
- status: "completed",
21283
- date: "05-Oct-2026 11:00 AM",
21284
- officer: "DM Secretariat"
21285
- }
21286
- ],
21287
- movementHistory: [
21288
- {
21289
- id: 1,
21290
- fromStep: "NHAI Project Office",
21291
- toStep: "Revenue Department",
21292
- action: "Acquisition Proposed",
21293
- officer: "Project Director",
21294
- timestamp: "28-Sep-2026 11:00 AM",
21295
- remarks: "Proposal for bypass corridor land transfer."
21296
- }
21297
- ],
21298
- documents: [
21299
- { name: "Final Land Award Gazette Notification", type: "PDF", size: "4.1 MB", status: "Verified" }
21300
- ]
21301
- }
21302
- ];
20871
+ var APPLICATION_DATABASE = [];
21303
20872
  function TrackApplicationMain() {
21304
20873
  var _a, _b, _c;
21305
20874
  const [trackQuery, setTrackQuery] = useState72("");
21306
- const [selectedApplication, setSelectedApplication] = useState72(APPLICATION_DATABASE[0]);
21307
- const [isSearching, setIsSearching] = useState72(false);
20875
+ const [selectedApplication, setSelectedApplication] = useState72(null);
21308
20876
  const [activeTab, setActiveTab] = useState72("timeline");
21309
20877
  const [viewMode, setViewMode] = useState72("tracker");
21310
20878
  const [tableSearch, setTableSearch] = useState72("");
@@ -21314,119 +20882,25 @@ function TrackApplicationMain() {
21314
20882
  const [sortColumn, setSortColumn] = useState72("");
21315
20883
  const [sortDirection, setSortDirection] = useState72("asc");
21316
20884
  const [slipModalOpen, setSlipModalOpen] = useState72(false);
21317
- const popularFileNumbers = [
21318
- "FC-2026-0120",
21319
- "FC-2026-0142",
21320
- "FC-2026-0145",
21321
- "FC-2026-0112",
21322
- "FC-2026-0153",
21323
- "FC-2026-0128",
21324
- "FC-2026-0095"
21325
- ];
21326
- const handleTrack = (fileNoToTrack) => {
20885
+ const handleTrack = async (fileNoToTrack) => {
21327
20886
  const targetNo = (fileNoToTrack || trackQuery).trim().toUpperCase();
21328
20887
  if (!targetNo) {
21329
20888
  Swal30.fire({
21330
20889
  icon: "warning",
21331
20890
  title: "Please enter an Application No.",
21332
- text: "Example: FC-2026-0120 or select one from quick chips.",
20891
+ text: "Enter an application or file number to search.",
21333
20892
  confirmButtonColor: "#2563eb"
21334
20893
  });
21335
20894
  return;
21336
20895
  }
21337
- setIsSearching(true);
21338
- setTimeout(() => {
21339
- setIsSearching(false);
21340
- const matched = APPLICATION_DATABASE.find(
21341
- (app) => app.fileNumber.toUpperCase() === targetNo || app.fileNumber.toUpperCase().includes(targetNo)
21342
- );
21343
- if (matched) {
21344
- setSelectedApplication(matched);
21345
- setTrackQuery(matched.fileNumber);
21346
- setViewMode("tracker");
21347
- Swal30.fire({
21348
- icon: "success",
21349
- title: "Application Found",
21350
- text: `${matched.fileNumber} (${matched.workflowName})`,
21351
- toast: true,
21352
- position: "top-end",
21353
- timer: 1800,
21354
- showConfirmButton: false
21355
- });
21356
- } else {
21357
- const synthesizedApp = {
21358
- fileId: Date.now(),
21359
- fileNumber: targetNo,
21360
- subject: `General Regulatory & Administrative Filing for ${targetNo}`,
21361
- workflowName: "Citizen & Enterprise Service Clearance",
21362
- department: "General Administration",
21363
- applicant: "Registered Enterprise Applicant",
21364
- category: "General Application",
21365
- financialYear: "2026-27",
21366
- sender: "Registered Enterprise Applicant",
21367
- priority: "Medium",
21368
- receivedDate: "07-Oct-2026 10:00 AM",
21369
- dueDate: "15-Oct-2026",
21370
- slaStatus: "Running (8d left)",
21371
- status: "Under Scrutiny",
21372
- assignedTo: "Pankaj Jain (Reviewer)",
21373
- currentStep: "Document Verification & Initial Scrutiny",
21374
- progressPercent: 40,
21375
- stages: [
21376
- {
21377
- stageId: 1,
21378
- title: "Application Registration",
21379
- description: `Application ${targetNo} registered successfully.`,
21380
- status: "completed",
21381
- date: "07-Oct-2026 10:00 AM",
21382
- officer: "System Gateway"
21383
- },
21384
- {
21385
- stageId: 2,
21386
- title: "Scrutiny & Verification",
21387
- description: "Reviewer checking attached documents.",
21388
- status: "in-progress",
21389
- date: "Running (Active)",
21390
- officer: "Pankaj Jain (Reviewer)"
21391
- },
21392
- {
21393
- stageId: 3,
21394
- title: "Competent Authority Decision",
21395
- description: "Final approval by department directorate.",
21396
- status: "pending",
21397
- date: "Pending Stage 2",
21398
- officer: "Designated Authority"
21399
- }
21400
- ],
21401
- movementHistory: [
21402
- {
21403
- id: 1,
21404
- fromStep: "Portal Inward Desk",
21405
- toStep: "Central Review Cell",
21406
- action: "Submitted & Allocated",
21407
- officer: "System Router",
21408
- timestamp: "07-Oct-2026 10:00 AM",
21409
- remarks: `Application ${targetNo} received and queued for review.`
21410
- }
21411
- ],
21412
- documents: [
21413
- { name: "Registration Acknowledgement", type: "PDF", size: "850 KB", status: "Verified" }
21414
- ]
21415
- };
21416
- setSelectedApplication(synthesizedApp);
21417
- setTrackQuery(targetNo);
21418
- setViewMode("tracker");
21419
- Swal30.fire({
21420
- icon: "info",
21421
- title: "Application Loaded",
21422
- text: `Application ${targetNo} loaded in tracking dashboard.`,
21423
- toast: true,
21424
- position: "top-end",
21425
- timer: 2e3,
21426
- showConfirmButton: false
21427
- });
21428
- }
21429
- }, 200);
20896
+ setTrackQuery(targetNo);
20897
+ setSelectedApplication(null);
20898
+ await Swal30.fire({
20899
+ icon: "warning",
20900
+ title: "Tracking API is not configured",
20901
+ text: "No tracking endpoint is configured, so application data cannot be loaded.",
20902
+ confirmButtonColor: "#2563eb"
20903
+ });
21430
20904
  };
21431
20905
  const handleCopyFileNumber = (no) => {
21432
20906
  navigator.clipboard.writeText(no);
@@ -21518,22 +20992,7 @@ function TrackApplicationMain() {
21518
20992
  ] })
21519
20993
  ] }),
21520
20994
  /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-3 fc:shrink-0", children: [
21521
- /* @__PURE__ */ jsxs98("div", { className: "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", children: [
21522
- /* @__PURE__ */ jsxs98("div", { className: "fc:relative fc:shrink-0", children: [
21523
- /* @__PURE__ */ jsx99("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: "PJ" }),
21524
- /* @__PURE__ */ jsx99("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" })
21525
- ] }),
21526
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:flex-col fc:justify-center", children: [
21527
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-2", children: [
21528
- /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-extrabold fc:text-slate-800", children: "Pankaj Jain" }),
21529
- /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:bg-blue-50 fc:text-blue-700 fc:px-1.5 fc:py-0.2 fc:rounded fc:border fc:border-blue-100", children: "Reviewer" })
21530
- ] }),
21531
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-1.5 fc:mt-0.5", children: [
21532
- /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:text-slate-400 fc:font-medium", children: "Active Step:" }),
21533
- /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-indigo-600 fc:bg-indigo-50/80 fc:px-1.5 fc:py-0.2 fc:rounded", children: "Scrutiny & Review" })
21534
- ] })
21535
- ] })
21536
- ] }),
20995
+ /* @__PURE__ */ jsx99("div", { className: "fc:rounded-xl fc:border fc:border-slate-200 fc:bg-slate-50 fc:px-3 fc:py-2 fc:text-xs fc:font-semibold fc:text-slate-600", children: (selectedApplication == null ? void 0 : selectedApplication.fileNumber) || "No application selected" }),
21537
20996
  /* @__PURE__ */ jsx99(
21538
20997
  "button",
21539
20998
  {
@@ -21547,412 +21006,400 @@ function TrackApplicationMain() {
21547
21006
  ] })
21548
21007
  ] })
21549
21008
  ] }),
21550
- /* @__PURE__ */ jsxs98("div", { className: "fc:bg-white fc:border fc:border-slate-200 fc:rounded-2xl fc:p-3.5 fc:shadow-sm", children: [
21551
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:flex-col lg:fc:flex-row lg:fc:items-center lg:fc:justify-between fc:gap-3", children: [
21552
- /* @__PURE__ */ jsxs98("div", { className: "fc:inline-flex fc:items-center fc:p-1 fc:bg-slate-100/90 fc:rounded-xl fc:border fc:border-slate-200/80 fc:gap-1 fc:shrink-0", children: [
21553
- /* @__PURE__ */ jsxs98(
21554
- "button",
21009
+ /* @__PURE__ */ jsx99("div", { className: "fc:bg-white fc:border fc:border-slate-200 fc:rounded-2xl fc:p-3.5 fc:shadow-sm", children: /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:flex-col lg:fc:flex-row lg:fc:items-center lg:fc:justify-between fc:gap-3", children: [
21010
+ /* @__PURE__ */ jsxs98("div", { className: "fc:inline-flex fc:items-center fc:p-1 fc:bg-slate-100/90 fc:rounded-xl fc:border fc:border-slate-200/80 fc:gap-1 fc:shrink-0", children: [
21011
+ /* @__PURE__ */ jsxs98(
21012
+ "button",
21013
+ {
21014
+ type: "button",
21015
+ onClick: () => setViewMode("tracker"),
21016
+ 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"}`,
21017
+ children: [
21018
+ /* @__PURE__ */ jsx99(RiRouteLine2, { size: 15 }),
21019
+ /* @__PURE__ */ jsx99("span", { children: "Tracking Dashboard" })
21020
+ ]
21021
+ }
21022
+ ),
21023
+ /* @__PURE__ */ jsxs98(
21024
+ "button",
21025
+ {
21026
+ type: "button",
21027
+ onClick: () => setViewMode("registry"),
21028
+ 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"}`,
21029
+ children: [
21030
+ /* @__PURE__ */ jsx99(RiFileListLine, { size: 15 }),
21031
+ /* @__PURE__ */ jsx99("span", { children: "Applications Registry" }),
21032
+ /* @__PURE__ */ jsx99(
21033
+ "span",
21034
+ {
21035
+ className: `fc:px-1.5 fc:py-0.2 fc:rounded-full fc:text-[10px] fc:font-extrabold ${viewMode === "registry" ? "fc:bg-white/20 fc:text-white" : "fc:bg-slate-200 fc:text-slate-700"}`,
21036
+ children: APPLICATION_DATABASE.length
21037
+ }
21038
+ )
21039
+ ]
21040
+ }
21041
+ )
21042
+ ] }),
21043
+ /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-2 fc:flex-1 lg:fc:max-w-md", children: [
21044
+ /* @__PURE__ */ jsxs98("div", { className: "fc:relative fc:flex-1", children: [
21045
+ /* @__PURE__ */ jsx99("span", { className: "fc:absolute fc:left-3 fc:top-1/2 fc:-translate-y-1/2 fc:text-slate-400", children: /* @__PURE__ */ jsx99(RiSearchLine2, { size: 16 }) }),
21046
+ /* @__PURE__ */ jsx99(
21047
+ "input",
21555
21048
  {
21556
- type: "button",
21557
- onClick: () => setViewMode("tracker"),
21558
- 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"}`,
21559
- children: [
21560
- /* @__PURE__ */ jsx99(RiRouteLine2, { size: 15 }),
21561
- /* @__PURE__ */ jsx99("span", { children: "Tracking Dashboard" })
21562
- ]
21049
+ type: "text",
21050
+ value: trackQuery,
21051
+ onChange: (e) => setTrackQuery(e.target.value),
21052
+ onKeyDown: (e) => e.key === "Enter" && handleTrack(),
21053
+ placeholder: "Enter App No. / File No.",
21054
+ className: "fc:w-full fc:pl-9 fc:pr-8 fc:py-2 fc:bg-slate-50 focus:fc:bg-white fc:border fc:border-slate-200 focus:fc:border-blue-500 fc:rounded-xl fc:text-xs fc:font-semibold fc:text-slate-800 fc:outline-none fc:transition-all"
21563
21055
  }
21564
21056
  ),
21565
- /* @__PURE__ */ jsxs98(
21057
+ trackQuery && /* @__PURE__ */ jsx99(
21566
21058
  "button",
21567
21059
  {
21568
21060
  type: "button",
21569
- onClick: () => setViewMode("registry"),
21570
- 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"}`,
21571
- children: [
21572
- /* @__PURE__ */ jsx99(RiFileListLine, { size: 15 }),
21573
- /* @__PURE__ */ jsx99("span", { children: "Applications Registry" }),
21574
- /* @__PURE__ */ jsx99(
21575
- "span",
21576
- {
21577
- className: `fc:px-1.5 fc:py-0.2 fc:rounded-full fc:text-[10px] fc:font-extrabold ${viewMode === "registry" ? "fc:bg-white/20 fc:text-white" : "fc:bg-slate-200 fc:text-slate-700"}`,
21578
- children: APPLICATION_DATABASE.length
21579
- }
21580
- )
21581
- ]
21061
+ onClick: () => setTrackQuery(""),
21062
+ 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",
21063
+ children: /* @__PURE__ */ jsx99(RiCloseLine5, { size: 14 })
21582
21064
  }
21583
21065
  )
21584
21066
  ] }),
21585
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-2 fc:flex-1 lg:fc:max-w-md", children: [
21586
- /* @__PURE__ */ jsxs98("div", { className: "fc:relative fc:flex-1", children: [
21587
- /* @__PURE__ */ jsx99("span", { className: "fc:absolute fc:left-3 fc:top-1/2 fc:-translate-y-1/2 fc:text-slate-400", children: /* @__PURE__ */ jsx99(RiSearchLine2, { size: 16 }) }),
21588
- /* @__PURE__ */ jsx99(
21589
- "input",
21590
- {
21591
- type: "text",
21592
- value: trackQuery,
21593
- onChange: (e) => setTrackQuery(e.target.value),
21594
- onKeyDown: (e) => e.key === "Enter" && handleTrack(),
21595
- placeholder: "Enter App No. / File No. (e.g. FC-2026-0120)...",
21596
- className: "fc:w-full fc:pl-9 fc:pr-8 fc:py-2 fc:bg-slate-50 focus:fc:bg-white fc:border fc:border-slate-200 focus:fc:border-blue-500 fc:rounded-xl fc:text-xs fc:font-semibold fc:text-slate-800 fc:outline-none fc:transition-all"
21597
- }
21598
- ),
21599
- trackQuery && /* @__PURE__ */ jsx99(
21600
- "button",
21601
- {
21602
- type: "button",
21603
- onClick: () => setTrackQuery(""),
21604
- 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",
21605
- children: /* @__PURE__ */ jsx99(RiCloseLine5, { size: 14 })
21606
- }
21607
- )
21608
- ] }),
21609
- /* @__PURE__ */ jsx99(
21610
- "button",
21611
- {
21612
- type: "button",
21613
- onClick: () => handleTrack(),
21614
- disabled: isSearching,
21615
- 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",
21616
- children: isSearching ? /* @__PURE__ */ jsxs98(Fragment5, { children: [
21617
- /* @__PURE__ */ jsx99("span", { className: "fc:inline-block fc:w-3.5 fc:h-3.5 fc:border-2 fc:border-white fc:border-t-transparent fc:rounded-full fc:animate-spin" }),
21618
- /* @__PURE__ */ jsx99("span", { children: "Tracking..." })
21619
- ] }) : /* @__PURE__ */ jsxs98(Fragment5, { children: [
21620
- /* @__PURE__ */ jsx99(RiRouteLine2, { size: 14 }),
21621
- /* @__PURE__ */ jsx99("span", { children: "Track Now" })
21622
- ] })
21623
- }
21624
- )
21625
- ] })
21626
- ] }),
21627
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-1.5 fc:mt-2.5 fc:pt-2.5 fc:border-t fc:border-slate-100 fc:flex-wrap", children: [
21628
- /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:tracking-wider fc:mr-1", children: "Quick Track:" }),
21629
- popularFileNumbers.map((no) => /* @__PURE__ */ jsx99(
21067
+ /* @__PURE__ */ jsxs98(
21630
21068
  "button",
21631
21069
  {
21632
21070
  type: "button",
21633
- onClick: () => handleTrack(no),
21634
- className: `fc:px-2.5 fc:py-0.5 fc:text-[11px] fc:font-bold fc:rounded-md fc:border fc:transition-all ${(selectedApplication == null ? void 0 : selectedApplication.fileNumber) === no ? "fc:bg-blue-50 fc:border-blue-300 fc:text-blue-700" : "fc:bg-slate-50 fc:border-slate-200 fc:text-slate-600 hover:fc:bg-slate-100 hover:fc:border-slate-300"}`,
21635
- children: no
21636
- },
21637
- no
21638
- ))
21071
+ onClick: () => handleTrack(),
21072
+ 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",
21073
+ children: [
21074
+ /* @__PURE__ */ jsx99(RiRouteLine2, { size: 14 }),
21075
+ /* @__PURE__ */ jsx99("span", { children: "Track Now" })
21076
+ ]
21077
+ }
21078
+ )
21639
21079
  ] })
21640
- ] }),
21080
+ ] }) }),
21641
21081
  /* @__PURE__ */ jsx99("div", { className: "fc:bg-white fc:border fc:border-slate-200 fc:rounded-3xl fc:shadow-sm fc:p-5 fc:flex fc:flex-col", children: viewMode === "tracker" ? (
21642
21082
  /* ========================================================
21643
21083
  VIEW 1: LIVE TRACKING DASHBOARD
21644
21084
  ======================================================== */
21645
- /* @__PURE__ */ jsx99("div", { className: "fc:space-y-4", children: selectedApplication && /* @__PURE__ */ jsxs98(Fragment5, { children: [
21646
- /* @__PURE__ */ jsxs98("div", { className: "fc:rounded-2xl fc:border fc:border-blue-100 fc:bg-gradient-to-r fc:from-blue-50/80 fc:via-indigo-50/40 fc:to-white fc:p-4.5 fc:shadow-sm", children: [
21647
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-3 fc:flex-wrap", children: [
21648
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-2 fc:flex-wrap", children: [
21649
- /* @__PURE__ */ jsxs98("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: [
21650
- /* @__PURE__ */ jsx99(RiRouteLine2, { size: 13 }),
21651
- /* @__PURE__ */ jsxs98("span", { children: [
21652
- "App No: ",
21653
- selectedApplication.fileNumber
21085
+ /* @__PURE__ */ jsxs98("div", { className: "fc:space-y-4", children: [
21086
+ selectedApplication && /* @__PURE__ */ jsxs98(Fragment5, { children: [
21087
+ /* @__PURE__ */ jsxs98("div", { className: "fc:rounded-2xl fc:border fc:border-blue-100 fc:bg-gradient-to-r fc:from-blue-50/80 fc:via-indigo-50/40 fc:to-white fc:p-4.5 fc:shadow-sm", children: [
21088
+ /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-3 fc:flex-wrap", children: [
21089
+ /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-2 fc:flex-wrap", children: [
21090
+ /* @__PURE__ */ jsxs98("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: [
21091
+ /* @__PURE__ */ jsx99(RiRouteLine2, { size: 13 }),
21092
+ /* @__PURE__ */ jsxs98("span", { children: [
21093
+ "App No: ",
21094
+ selectedApplication.fileNumber
21095
+ ] })
21096
+ ] }),
21097
+ /* @__PURE__ */ jsx99(
21098
+ "button",
21099
+ {
21100
+ type: "button",
21101
+ onClick: () => handleCopyFileNumber(selectedApplication.fileNumber),
21102
+ title: "Copy Application Number",
21103
+ 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",
21104
+ children: /* @__PURE__ */ jsx99(RiFileCopyLine, { size: 14 })
21105
+ }
21106
+ ),
21107
+ /* @__PURE__ */ jsx99("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 }),
21108
+ /* @__PURE__ */ jsxs98(
21109
+ "span",
21110
+ {
21111
+ className: `fc:text-xs fc:font-bold fc:px-2.5 fc:py-0.5 fc:rounded-full fc:border ${selectedApplication.priority === "Urgent" ? "fc:bg-red-50 fc:text-red-700 fc:border-red-200" : selectedApplication.priority === "High" ? "fc:bg-amber-50 fc:text-amber-700 fc:border-amber-200" : "fc:bg-blue-50 fc:text-blue-700 fc:border-blue-200"}`,
21112
+ children: [
21113
+ selectedApplication.priority,
21114
+ " Priority"
21115
+ ]
21116
+ }
21117
+ ),
21118
+ /* @__PURE__ */ jsxs98("span", { className: "fc:text-xs fc:font-bold fc:px-2.5 fc:py-0.5 fc:rounded-full fc:bg-emerald-50 fc:text-emerald-700 fc:border fc:border-emerald-200", children: [
21119
+ "Status: ",
21120
+ selectedApplication.status
21654
21121
  ] })
21655
21122
  ] }),
21656
- /* @__PURE__ */ jsx99(
21123
+ /* @__PURE__ */ jsxs98(
21657
21124
  "button",
21658
21125
  {
21659
21126
  type: "button",
21660
- onClick: () => handleCopyFileNumber(selectedApplication.fileNumber),
21661
- title: "Copy Application Number",
21662
- 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",
21663
- children: /* @__PURE__ */ jsx99(RiFileCopyLine, { size: 14 })
21664
- }
21665
- ),
21666
- /* @__PURE__ */ jsx99("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 }),
21667
- /* @__PURE__ */ jsxs98(
21668
- "span",
21669
- {
21670
- className: `fc:text-xs fc:font-bold fc:px-2.5 fc:py-0.5 fc:rounded-full fc:border ${selectedApplication.priority === "Urgent" ? "fc:bg-red-50 fc:text-red-700 fc:border-red-200" : selectedApplication.priority === "High" ? "fc:bg-amber-50 fc:text-amber-700 fc:border-amber-200" : "fc:bg-blue-50 fc:text-blue-700 fc:border-blue-200"}`,
21127
+ onClick: () => setSlipModalOpen(true),
21128
+ 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",
21671
21129
  children: [
21672
- selectedApplication.priority,
21673
- " Priority"
21130
+ /* @__PURE__ */ jsx99(RiPrinterLine2, { size: 13 }),
21131
+ /* @__PURE__ */ jsx99("span", { children: "Print Tracking Slip" })
21674
21132
  ]
21675
21133
  }
21676
- ),
21677
- /* @__PURE__ */ jsxs98("span", { className: "fc:text-xs fc:font-bold fc:px-2.5 fc:py-0.5 fc:rounded-full fc:bg-emerald-50 fc:text-emerald-700 fc:border fc:border-emerald-200", children: [
21678
- "Status: ",
21679
- selectedApplication.status
21680
- ] })
21134
+ )
21681
21135
  ] }),
21682
- /* @__PURE__ */ jsxs98(
21683
- "button",
21684
- {
21685
- type: "button",
21686
- onClick: () => setSlipModalOpen(true),
21687
- 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",
21688
- children: [
21689
- /* @__PURE__ */ jsx99(RiPrinterLine2, { size: 13 }),
21690
- /* @__PURE__ */ jsx99("span", { children: "Print Tracking Slip" })
21691
- ]
21692
- }
21693
- )
21694
- ] }),
21695
- /* @__PURE__ */ jsx99("div", { className: "fc:mt-2.5", children: /* @__PURE__ */ jsx99("h2", { className: "fc:text-base fc:font-bold fc:text-slate-800 fc:leading-snug", children: selectedApplication.subject }) }),
21696
- /* @__PURE__ */ jsxs98("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: [
21697
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-4 fc:flex-wrap", children: [
21698
- /* @__PURE__ */ jsxs98("span", { className: "fc:flex fc:items-center fc:gap-1", children: [
21699
- /* @__PURE__ */ jsx99(RiBuildingLine2, { size: 13, className: "fc:text-slate-400" }),
21700
- /* @__PURE__ */ jsx99("span", { className: "fc:text-slate-400", children: "Dept:" }),
21701
- /* @__PURE__ */ jsx99("strong", { className: "fc:text-slate-700", children: selectedApplication.department })
21702
- ] }),
21703
- /* @__PURE__ */ jsxs98("span", { className: "fc:flex fc:items-center fc:gap-1", children: [
21704
- /* @__PURE__ */ jsx99(RiUserLine2, { size: 13, className: "fc:text-slate-400" }),
21705
- /* @__PURE__ */ jsx99("span", { className: "fc:text-slate-400", children: "Applicant:" }),
21706
- /* @__PURE__ */ jsx99("strong", { className: "fc:text-slate-700", children: selectedApplication.applicant })
21136
+ /* @__PURE__ */ jsx99("div", { className: "fc:mt-2.5", children: /* @__PURE__ */ jsx99("h2", { className: "fc:text-base fc:font-bold fc:text-slate-800 fc:leading-snug", children: selectedApplication.subject }) }),
21137
+ /* @__PURE__ */ jsxs98("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: [
21138
+ /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-4 fc:flex-wrap", children: [
21139
+ /* @__PURE__ */ jsxs98("span", { className: "fc:flex fc:items-center fc:gap-1", children: [
21140
+ /* @__PURE__ */ jsx99(RiBuildingLine2, { size: 13, className: "fc:text-slate-400" }),
21141
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-slate-400", children: "Dept:" }),
21142
+ /* @__PURE__ */ jsx99("strong", { className: "fc:text-slate-700", children: selectedApplication.department })
21143
+ ] }),
21144
+ /* @__PURE__ */ jsxs98("span", { className: "fc:flex fc:items-center fc:gap-1", children: [
21145
+ /* @__PURE__ */ jsx99(RiUserLine2, { size: 13, className: "fc:text-slate-400" }),
21146
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-slate-400", children: "Applicant:" }),
21147
+ /* @__PURE__ */ jsx99("strong", { className: "fc:text-slate-700", children: selectedApplication.applicant })
21148
+ ] }),
21149
+ /* @__PURE__ */ jsxs98("span", { className: "fc:flex fc:items-center fc:gap-1", children: [
21150
+ /* @__PURE__ */ jsx99(RiTimeLine2, { size: 13, className: "fc:text-slate-400" }),
21151
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-slate-400", children: "Submitted:" }),
21152
+ /* @__PURE__ */ jsx99("strong", { className: "fc:text-slate-700", children: selectedApplication.receivedDate })
21153
+ ] })
21707
21154
  ] }),
21708
- /* @__PURE__ */ jsxs98("span", { className: "fc:flex fc:items-center fc:gap-1", children: [
21709
- /* @__PURE__ */ jsx99(RiTimeLine2, { size: 13, className: "fc:text-slate-400" }),
21710
- /* @__PURE__ */ jsx99("span", { className: "fc:text-slate-400", children: "Submitted:" }),
21711
- /* @__PURE__ */ jsx99("strong", { className: "fc:text-slate-700", children: selectedApplication.receivedDate })
21155
+ /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-1.5", children: [
21156
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-slate-400", children: "SLA:" }),
21157
+ /* @__PURE__ */ jsx99("strong", { className: "fc:text-red-600 fc:font-extrabold", children: selectedApplication.slaStatus }),
21158
+ /* @__PURE__ */ jsxs98("span", { className: "fc:text-slate-400", children: [
21159
+ "\u2022 Due: ",
21160
+ selectedApplication.dueDate
21161
+ ] })
21712
21162
  ] })
21713
21163
  ] }),
21714
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-1.5", children: [
21715
- /* @__PURE__ */ jsx99("span", { className: "fc:text-slate-400", children: "SLA:" }),
21716
- /* @__PURE__ */ jsx99("strong", { className: "fc:text-red-600 fc:font-extrabold", children: selectedApplication.slaStatus }),
21717
- /* @__PURE__ */ jsxs98("span", { className: "fc:text-slate-400", children: [
21718
- "\u2022 Due: ",
21719
- selectedApplication.dueDate
21720
- ] })
21164
+ /* @__PURE__ */ jsxs98("div", { className: "fc:mt-2.5 fc:pt-2 fc:border-t fc:border-blue-100/50", children: [
21165
+ /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:justify-between fc:items-center fc:text-[11px] fc:mb-1", children: [
21166
+ /* @__PURE__ */ jsxs98("span", { className: "fc:font-bold fc:text-slate-600", children: [
21167
+ "Lifecycle Progress: ",
21168
+ /* @__PURE__ */ jsxs98("strong", { children: [
21169
+ selectedApplication.progressPercent || 50,
21170
+ "% Completed"
21171
+ ] })
21172
+ ] }),
21173
+ /* @__PURE__ */ jsxs98("span", { className: "fc:font-bold fc:text-indigo-600", children: [
21174
+ "Active Desk: ",
21175
+ /* @__PURE__ */ jsx99("strong", { children: selectedApplication.assignedTo || "Central Scrutiny Cell" })
21176
+ ] })
21177
+ ] }),
21178
+ /* @__PURE__ */ jsx99("div", { className: "fc:w-full fc:bg-slate-200/80 fc:h-1.5 fc:rounded-full fc:overflow-hidden", children: /* @__PURE__ */ jsx99(
21179
+ "div",
21180
+ {
21181
+ className: "fc:bg-gradient-to-r fc:from-blue-600 fc:to-indigo-600 fc:h-full fc:rounded-full fc:transition-all fc:duration-500",
21182
+ style: { width: `${selectedApplication.progressPercent || 50}%` }
21183
+ }
21184
+ ) })
21721
21185
  ] })
21722
21186
  ] }),
21723
- /* @__PURE__ */ jsxs98("div", { className: "fc:mt-2.5 fc:pt-2 fc:border-t fc:border-blue-100/50", children: [
21724
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:justify-between fc:items-center fc:text-[11px] fc:mb-1", children: [
21725
- /* @__PURE__ */ jsxs98("span", { className: "fc:font-bold fc:text-slate-600", children: [
21726
- "Lifecycle Progress: ",
21727
- /* @__PURE__ */ jsxs98("strong", { children: [
21728
- selectedApplication.progressPercent || 50,
21729
- "% Completed"
21730
- ] })
21187
+ /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50/70 fc:border fc:border-slate-200 fc:rounded-2xl fc:p-3.5", children: [
21188
+ /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:justify-between fc:mb-2.5", children: [
21189
+ /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-2", children: [
21190
+ /* @__PURE__ */ jsx99("div", { className: "fc:w-2 fc:h-2 fc:rounded-full fc:bg-blue-600" }),
21191
+ /* @__PURE__ */ jsx99("h3", { className: "fc:text-xs fc:font-bold fc:text-slate-800 fc:uppercase fc:tracking-wider", children: "Workflow Progression Stages" })
21731
21192
  ] }),
21732
- /* @__PURE__ */ jsxs98("span", { className: "fc:font-bold fc:text-indigo-600", children: [
21733
- "Active Desk: ",
21734
- /* @__PURE__ */ jsx99("strong", { children: selectedApplication.assignedTo || "Central Scrutiny Cell" })
21193
+ /* @__PURE__ */ jsxs98("span", { className: "fc:text-xs fc:text-slate-500", children: [
21194
+ "Current Step: ",
21195
+ /* @__PURE__ */ jsx99("strong", { className: "fc:text-indigo-600", children: selectedApplication.currentStep })
21735
21196
  ] })
21736
21197
  ] }),
21737
- /* @__PURE__ */ jsx99("div", { className: "fc:w-full fc:bg-slate-200/80 fc:h-1.5 fc:rounded-full fc:overflow-hidden", children: /* @__PURE__ */ jsx99(
21198
+ /* @__PURE__ */ jsx99(
21738
21199
  "div",
21739
21200
  {
21740
- className: "fc:bg-gradient-to-r fc:from-blue-600 fc:to-indigo-600 fc:h-full fc:rounded-full fc:transition-all fc:duration-500",
21741
- style: { width: `${selectedApplication.progressPercent || 50}%` }
21742
- }
21743
- ) })
21744
- ] })
21745
- ] }),
21746
- /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50/70 fc:border fc:border-slate-200 fc:rounded-2xl fc:p-3.5", children: [
21747
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:justify-between fc:mb-2.5", children: [
21748
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-2", children: [
21749
- /* @__PURE__ */ jsx99("div", { className: "fc:w-2 fc:h-2 fc:rounded-full fc:bg-blue-600" }),
21750
- /* @__PURE__ */ jsx99("h3", { className: "fc:text-xs fc:font-bold fc:text-slate-800 fc:uppercase fc:tracking-wider", children: "Workflow Progression Stages" })
21751
- ] }),
21752
- /* @__PURE__ */ jsxs98("span", { className: "fc:text-xs fc:text-slate-500", children: [
21753
- "Current Step: ",
21754
- /* @__PURE__ */ jsx99("strong", { className: "fc:text-indigo-600", children: selectedApplication.currentStep })
21755
- ] })
21756
- ] }),
21757
- /* @__PURE__ */ jsx99(
21758
- "div",
21759
- {
21760
- className: "fc:grid fc:gap-2 fc:items-stretch",
21761
- style: {
21762
- gridTemplateColumns: `repeat(${((_a = selectedApplication.stages) == null ? void 0 : _a.length) || 4}, minmax(0, 1fr))`
21763
- },
21764
- children: (selectedApplication.stages || []).map((stage, idx) => {
21765
- const isCompleted = stage.status === "completed";
21766
- const isInProgress = stage.status === "in-progress";
21767
- return /* @__PURE__ */ jsxs98(
21768
- "div",
21769
- {
21770
- className: `fc:relative fc:flex fc:flex-col fc:justify-between fc:p-2.5 fc:rounded-xl fc:border fc:transition-all ${isCompleted ? "fc:bg-emerald-50/60 fc:border-emerald-200/80" : isInProgress ? "fc:bg-blue-50 fc:border-blue-300 fc:shadow-sm fc:ring-1 fc:ring-blue-200" : "fc:bg-white fc:border-slate-200"}`,
21771
- children: [
21772
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-1 fc:mb-1.5", children: [
21773
- /* @__PURE__ */ jsx99(
21774
- "span",
21775
- {
21776
- 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"}`,
21777
- children: isCompleted ? /* @__PURE__ */ jsx99(RiCheckLine2, { size: 12 }) : idx + 1
21778
- }
21779
- ),
21780
- /* @__PURE__ */ jsx99(
21781
- "span",
21782
- {
21783
- className: `fc:text-[9px] fc:font-bold fc:px-1.5 fc:py-0.2 fc:rounded-full ${isCompleted ? "fc:bg-emerald-100 fc:text-emerald-700" : isInProgress ? "fc:bg-blue-100 fc:text-blue-700 fc:animate-pulse" : "fc:bg-slate-100 fc:text-slate-500"}`,
21784
- children: isCompleted ? "Completed" : isInProgress ? "Active Step" : "Pending"
21785
- }
21786
- )
21787
- ] }),
21788
- /* @__PURE__ */ jsxs98("div", { children: [
21789
- /* @__PURE__ */ jsx99(
21790
- "h4",
21791
- {
21792
- className: "fc:text-[11px] fc:font-bold fc:text-slate-800 fc:truncate",
21793
- title: stage.title,
21794
- children: stage.title
21795
- }
21796
- ),
21797
- /* @__PURE__ */ jsx99(
21798
- "p",
21799
- {
21800
- className: "fc:text-[10px] fc:text-slate-500 fc:truncate fc:mt-0.5",
21801
- title: stage.description,
21802
- children: stage.description
21803
- }
21804
- )
21805
- ] }),
21806
- /* @__PURE__ */ jsxs98("div", { className: "fc:mt-1.5 fc:pt-1.5 fc:border-t fc:border-slate-200/50 fc:flex fc:items-center fc:justify-between fc:text-[9px] fc:text-slate-400", children: [
21807
- /* @__PURE__ */ jsx99("span", { className: "fc:truncate", title: stage.officer, children: stage.officer }),
21808
- /* @__PURE__ */ jsx99("span", { className: "fc:font-medium fc:text-slate-500 fc:shrink-0", children: stage.date.split(" ")[0] })
21809
- ] })
21810
- ]
21811
- },
21812
- stage.stageId || idx
21813
- );
21814
- })
21815
- }
21816
- )
21817
- ] }),
21818
- /* @__PURE__ */ jsxs98("div", { className: "fc:bg-white fc:border fc:border-slate-200 fc:rounded-2xl fc:overflow-hidden", children: [
21819
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:border-b fc:border-slate-200 fc:bg-slate-50/60 fc:px-3 fc:pt-1.5", children: [
21820
- /* @__PURE__ */ jsxs98(
21821
- "button",
21822
- {
21823
- type: "button",
21824
- onClick: () => setActiveTab("timeline"),
21825
- 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"}`,
21826
- children: [
21827
- /* @__PURE__ */ jsx99(RiRouteLine2, { size: 14 }),
21828
- /* @__PURE__ */ jsx99("span", { children: "Movement History & Audit Trail" }),
21829
- /* @__PURE__ */ jsx99("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 })
21830
- ]
21831
- }
21832
- ),
21833
- /* @__PURE__ */ jsxs98(
21834
- "button",
21835
- {
21836
- type: "button",
21837
- onClick: () => setActiveTab("details"),
21838
- 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"}`,
21839
- children: [
21840
- /* @__PURE__ */ jsx99(RiFileListLine, { size: 14 }),
21841
- /* @__PURE__ */ jsx99("span", { children: "Application Full Attributes" })
21842
- ]
21843
- }
21844
- ),
21845
- /* @__PURE__ */ jsxs98(
21846
- "button",
21847
- {
21848
- type: "button",
21849
- onClick: () => setActiveTab("documents"),
21850
- 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"}`,
21851
- children: [
21852
- /* @__PURE__ */ jsx99(RiFileTextLine3, { size: 14 }),
21853
- /* @__PURE__ */ jsx99("span", { children: "Uploaded Documents" }),
21854
- /* @__PURE__ */ jsx99("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 })
21855
- ]
21201
+ className: "fc:grid fc:gap-2 fc:items-stretch",
21202
+ style: {
21203
+ gridTemplateColumns: `repeat(${((_a = selectedApplication.stages) == null ? void 0 : _a.length) || 4}, minmax(0, 1fr))`
21204
+ },
21205
+ children: (selectedApplication.stages || []).map((stage, idx) => {
21206
+ const isCompleted = stage.status === "completed";
21207
+ const isInProgress = stage.status === "in-progress";
21208
+ return /* @__PURE__ */ jsxs98(
21209
+ "div",
21210
+ {
21211
+ className: `fc:relative fc:flex fc:flex-col fc:justify-between fc:p-2.5 fc:rounded-xl fc:border fc:transition-all ${isCompleted ? "fc:bg-emerald-50/60 fc:border-emerald-200/80" : isInProgress ? "fc:bg-blue-50 fc:border-blue-300 fc:shadow-sm fc:ring-1 fc:ring-blue-200" : "fc:bg-white fc:border-slate-200"}`,
21212
+ children: [
21213
+ /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-1 fc:mb-1.5", children: [
21214
+ /* @__PURE__ */ jsx99(
21215
+ "span",
21216
+ {
21217
+ 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"}`,
21218
+ children: isCompleted ? /* @__PURE__ */ jsx99(RiCheckLine2, { size: 12 }) : idx + 1
21219
+ }
21220
+ ),
21221
+ /* @__PURE__ */ jsx99(
21222
+ "span",
21223
+ {
21224
+ className: `fc:text-[9px] fc:font-bold fc:px-1.5 fc:py-0.2 fc:rounded-full ${isCompleted ? "fc:bg-emerald-100 fc:text-emerald-700" : isInProgress ? "fc:bg-blue-100 fc:text-blue-700 fc:animate-pulse" : "fc:bg-slate-100 fc:text-slate-500"}`,
21225
+ children: isCompleted ? "Completed" : isInProgress ? "Active Step" : "Pending"
21226
+ }
21227
+ )
21228
+ ] }),
21229
+ /* @__PURE__ */ jsxs98("div", { children: [
21230
+ /* @__PURE__ */ jsx99(
21231
+ "h4",
21232
+ {
21233
+ className: "fc:text-[11px] fc:font-bold fc:text-slate-800 fc:truncate",
21234
+ title: stage.title,
21235
+ children: stage.title
21236
+ }
21237
+ ),
21238
+ /* @__PURE__ */ jsx99(
21239
+ "p",
21240
+ {
21241
+ className: "fc:text-[10px] fc:text-slate-500 fc:truncate fc:mt-0.5",
21242
+ title: stage.description,
21243
+ children: stage.description
21244
+ }
21245
+ )
21246
+ ] }),
21247
+ /* @__PURE__ */ jsxs98("div", { className: "fc:mt-1.5 fc:pt-1.5 fc:border-t fc:border-slate-200/50 fc:flex fc:items-center fc:justify-between fc:text-[9px] fc:text-slate-400", children: [
21248
+ /* @__PURE__ */ jsx99("span", { className: "fc:truncate", title: stage.officer, children: stage.officer }),
21249
+ /* @__PURE__ */ jsx99("span", { className: "fc:font-medium fc:text-slate-500 fc:shrink-0", children: stage.date.split(" ")[0] })
21250
+ ] })
21251
+ ]
21252
+ },
21253
+ stage.stageId || idx
21254
+ );
21255
+ })
21856
21256
  }
21857
21257
  )
21858
21258
  ] }),
21859
- /* @__PURE__ */ jsxs98("div", { className: "fc:p-4", children: [
21860
- activeTab === "timeline" && /* @__PURE__ */ jsx99("div", { className: "fc:space-y-3", children: /* @__PURE__ */ jsx99("div", { className: "fc:relative fc:pl-5 fc:space-y-4 before:fc:absolute before:fc:left-2 before:fc:top-2 before:fc:bottom-2 before:fc:w-0.5 before:fc:bg-slate-200", children: (selectedApplication.movementHistory || []).map((move, idx) => /* @__PURE__ */ jsxs98("div", { className: "fc:relative fc:space-y-1", children: [
21861
- /* @__PURE__ */ jsx99("span", { className: "fc:absolute fc:-left-[17px] fc:top-1 fc:w-2.5 fc:h-2.5 fc:rounded-full fc:bg-blue-600 fc:ring-4 fc:ring-blue-100" }),
21862
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-2 fc:flex-wrap", children: [
21863
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-2", children: [
21864
- /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-bold fc:text-slate-800", children: move.action }),
21865
- /* @__PURE__ */ jsxs98("span", { className: "fc:text-[11px] fc:text-slate-500", children: [
21866
- "(",
21867
- move.fromStep,
21868
- " \u2192 ",
21869
- /* @__PURE__ */ jsx99("strong", { className: "fc:text-blue-600", children: move.toStep }),
21259
+ /* @__PURE__ */ jsxs98("div", { className: "fc:bg-white fc:border fc:border-slate-200 fc:rounded-2xl fc:overflow-hidden", children: [
21260
+ /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:border-b fc:border-slate-200 fc:bg-slate-50/60 fc:px-3 fc:pt-1.5", children: [
21261
+ /* @__PURE__ */ jsxs98(
21262
+ "button",
21263
+ {
21264
+ type: "button",
21265
+ onClick: () => setActiveTab("timeline"),
21266
+ 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"}`,
21267
+ children: [
21268
+ /* @__PURE__ */ jsx99(RiRouteLine2, { size: 14 }),
21269
+ /* @__PURE__ */ jsx99("span", { children: "Movement History & Audit Trail" }),
21270
+ /* @__PURE__ */ jsx99("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 })
21271
+ ]
21272
+ }
21273
+ ),
21274
+ /* @__PURE__ */ jsxs98(
21275
+ "button",
21276
+ {
21277
+ type: "button",
21278
+ onClick: () => setActiveTab("details"),
21279
+ 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"}`,
21280
+ children: [
21281
+ /* @__PURE__ */ jsx99(RiFileListLine, { size: 14 }),
21282
+ /* @__PURE__ */ jsx99("span", { children: "Application Full Attributes" })
21283
+ ]
21284
+ }
21285
+ ),
21286
+ /* @__PURE__ */ jsxs98(
21287
+ "button",
21288
+ {
21289
+ type: "button",
21290
+ onClick: () => setActiveTab("documents"),
21291
+ 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"}`,
21292
+ children: [
21293
+ /* @__PURE__ */ jsx99(RiFileTextLine3, { size: 14 }),
21294
+ /* @__PURE__ */ jsx99("span", { children: "Uploaded Documents" }),
21295
+ /* @__PURE__ */ jsx99("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 })
21296
+ ]
21297
+ }
21298
+ )
21299
+ ] }),
21300
+ /* @__PURE__ */ jsxs98("div", { className: "fc:p-4", children: [
21301
+ activeTab === "timeline" && /* @__PURE__ */ jsx99("div", { className: "fc:space-y-3", children: /* @__PURE__ */ jsx99("div", { className: "fc:relative fc:pl-5 fc:space-y-4 before:fc:absolute before:fc:left-2 before:fc:top-2 before:fc:bottom-2 before:fc:w-0.5 before:fc:bg-slate-200", children: (selectedApplication.movementHistory || []).map((move, idx) => /* @__PURE__ */ jsxs98("div", { className: "fc:relative fc:space-y-1", children: [
21302
+ /* @__PURE__ */ jsx99("span", { className: "fc:absolute fc:-left-[17px] fc:top-1 fc:w-2.5 fc:h-2.5 fc:rounded-full fc:bg-blue-600 fc:ring-4 fc:ring-blue-100" }),
21303
+ /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-2 fc:flex-wrap", children: [
21304
+ /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-2", children: [
21305
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-bold fc:text-slate-800", children: move.action }),
21306
+ /* @__PURE__ */ jsxs98("span", { className: "fc:text-[11px] fc:text-slate-500", children: [
21307
+ "(",
21308
+ move.fromStep,
21309
+ " \u2192 ",
21310
+ /* @__PURE__ */ jsx99("strong", { className: "fc:text-blue-600", children: move.toStep }),
21311
+ ")"
21312
+ ] })
21313
+ ] }),
21314
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400", children: move.timestamp })
21315
+ ] }),
21316
+ /* @__PURE__ */ jsxs98("p", { className: "fc:text-xs fc:text-slate-600 fc:bg-slate-50 fc:p-2 fc:rounded-xl fc:border fc:border-slate-100", children: [
21317
+ /* @__PURE__ */ jsx99("strong", { children: "Remarks:" }),
21318
+ " ",
21319
+ move.remarks
21320
+ ] }),
21321
+ /* @__PURE__ */ jsxs98("span", { className: "fc:text-[10px] fc:text-slate-400", children: [
21322
+ "Action Officer: ",
21323
+ /* @__PURE__ */ jsx99("strong", { children: move.officer })
21324
+ ] })
21325
+ ] }, move.id || idx)) }) }),
21326
+ activeTab === "details" && /* @__PURE__ */ jsxs98("div", { className: "fc:grid fc:grid-cols-1 md:fc:grid-cols-3 fc:gap-3 fc:text-xs", children: [
21327
+ /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21328
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Application / File Number" }),
21329
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-bold fc:text-blue-600 fc:mt-0.5 fc:block", children: selectedApplication.fileNumber })
21330
+ ] }),
21331
+ /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21332
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Workflow Name" }),
21333
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.workflowName })
21334
+ ] }),
21335
+ /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21336
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Department / Ministry" }),
21337
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.department })
21338
+ ] }),
21339
+ /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21340
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Applicant / Originator Entity" }),
21341
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.applicant })
21342
+ ] }),
21343
+ /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21344
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Proposal Category" }),
21345
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.category })
21346
+ ] }),
21347
+ /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21348
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Financial Year" }),
21349
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.financialYear })
21350
+ ] }),
21351
+ /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21352
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Received Timestamp" }),
21353
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.receivedDate })
21354
+ ] }),
21355
+ /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21356
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Target SLA Due Date" }),
21357
+ /* @__PURE__ */ jsxs98("span", { className: "fc:text-xs fc:font-bold fc:text-red-600 fc:mt-0.5 fc:block", children: [
21358
+ selectedApplication.dueDate,
21359
+ " (",
21360
+ selectedApplication.slaStatus,
21870
21361
  ")"
21871
21362
  ] })
21872
21363
  ] }),
21873
- /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400", children: move.timestamp })
21874
- ] }),
21875
- /* @__PURE__ */ jsxs98("p", { className: "fc:text-xs fc:text-slate-600 fc:bg-slate-50 fc:p-2 fc:rounded-xl fc:border fc:border-slate-100", children: [
21876
- /* @__PURE__ */ jsx99("strong", { children: "Remarks:" }),
21877
- " ",
21878
- move.remarks
21879
- ] }),
21880
- /* @__PURE__ */ jsxs98("span", { className: "fc:text-[10px] fc:text-slate-400", children: [
21881
- "Action Officer: ",
21882
- /* @__PURE__ */ jsx99("strong", { children: move.officer })
21883
- ] })
21884
- ] }, move.id || idx)) }) }),
21885
- activeTab === "details" && /* @__PURE__ */ jsxs98("div", { className: "fc:grid fc:grid-cols-1 md:fc:grid-cols-3 fc:gap-3 fc:text-xs", children: [
21886
- /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21887
- /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Application / File Number" }),
21888
- /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-bold fc:text-blue-600 fc:mt-0.5 fc:block", children: selectedApplication.fileNumber })
21889
- ] }),
21890
- /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21891
- /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Workflow Name" }),
21892
- /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.workflowName })
21893
- ] }),
21894
- /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21895
- /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Department / Ministry" }),
21896
- /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.department })
21897
- ] }),
21898
- /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21899
- /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Applicant / Originator Entity" }),
21900
- /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.applicant })
21901
- ] }),
21902
- /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21903
- /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Proposal Category" }),
21904
- /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.category })
21905
- ] }),
21906
- /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21907
- /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Financial Year" }),
21908
- /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.financialYear })
21909
- ] }),
21910
- /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21911
- /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Received Timestamp" }),
21912
- /* @__PURE__ */ jsx99("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.receivedDate })
21913
- ] }),
21914
- /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21915
- /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Target SLA Due Date" }),
21916
- /* @__PURE__ */ jsxs98("span", { className: "fc:text-xs fc:font-bold fc:text-red-600 fc:mt-0.5 fc:block", children: [
21917
- selectedApplication.dueDate,
21918
- " (",
21919
- selectedApplication.slaStatus,
21920
- ")"
21364
+ /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21365
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Current Active Desk" }),
21366
+ /* @__PURE__ */ jsxs98("span", { className: "fc:text-xs fc:font-bold fc:text-indigo-600 fc:mt-0.5 fc:block", children: [
21367
+ selectedApplication.assignedTo,
21368
+ " (",
21369
+ selectedApplication.currentStep,
21370
+ ")"
21371
+ ] })
21921
21372
  ] })
21922
21373
  ] }),
21923
- /* @__PURE__ */ jsxs98("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21924
- /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Current Active Desk" }),
21925
- /* @__PURE__ */ jsxs98("span", { className: "fc:text-xs fc:font-bold fc:text-indigo-600 fc:mt-0.5 fc:block", children: [
21926
- selectedApplication.assignedTo,
21927
- " (",
21928
- selectedApplication.currentStep,
21929
- ")"
21930
- ] })
21931
- ] })
21932
- ] }),
21933
- activeTab === "documents" && /* @__PURE__ */ jsx99("div", { className: "fc:grid fc:grid-cols-1 md:fc:grid-cols-2 fc:gap-3", children: (selectedApplication.documents || []).map((doc, i) => /* @__PURE__ */ jsxs98(
21934
- "div",
21935
- {
21936
- className: "fc:flex fc:items-center fc:justify-between fc:p-2.5 fc:rounded-xl fc:border fc:border-slate-200 fc:bg-slate-50/50 hover:fc:bg-slate-50 fc:transition-all",
21937
- children: [
21938
- /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-2.5", children: [
21939
- /* @__PURE__ */ jsx99("div", { className: "fc:w-7 fc:h-7 fc:rounded-lg fc:bg-red-50 fc:text-red-600 fc:flex fc:items-center fc:justify-center fc:font-bold fc:text-[10px]", children: doc.type }),
21940
- /* @__PURE__ */ jsxs98("div", { children: [
21941
- /* @__PURE__ */ jsx99("h5", { className: "fc:text-xs fc:font-bold fc:text-slate-800", children: doc.name }),
21942
- /* @__PURE__ */ jsxs98("span", { className: "fc:text-[10px] fc:text-slate-400", children: [
21943
- "Size: ",
21944
- doc.size
21374
+ activeTab === "documents" && /* @__PURE__ */ jsx99("div", { className: "fc:grid fc:grid-cols-1 md:fc:grid-cols-2 fc:gap-3", children: (selectedApplication.documents || []).map((doc, i) => /* @__PURE__ */ jsxs98(
21375
+ "div",
21376
+ {
21377
+ className: "fc:flex fc:items-center fc:justify-between fc:p-2.5 fc:rounded-xl fc:border fc:border-slate-200 fc:bg-slate-50/50 hover:fc:bg-slate-50 fc:transition-all",
21378
+ children: [
21379
+ /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:items-center fc:gap-2.5", children: [
21380
+ /* @__PURE__ */ jsx99("div", { className: "fc:w-7 fc:h-7 fc:rounded-lg fc:bg-red-50 fc:text-red-600 fc:flex fc:items-center fc:justify-center fc:font-bold fc:text-[10px]", children: doc.type }),
21381
+ /* @__PURE__ */ jsxs98("div", { children: [
21382
+ /* @__PURE__ */ jsx99("h5", { className: "fc:text-xs fc:font-bold fc:text-slate-800", children: doc.name }),
21383
+ /* @__PURE__ */ jsxs98("span", { className: "fc:text-[10px] fc:text-slate-400", children: [
21384
+ "Size: ",
21385
+ doc.size
21386
+ ] })
21945
21387
  ] })
21946
- ] })
21947
- ] }),
21948
- /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:px-2 fc:py-0.5 fc:rounded-full fc:bg-emerald-50 fc:text-emerald-700 fc:border fc:border-emerald-200", children: doc.status })
21949
- ]
21950
- },
21951
- i
21952
- )) })
21388
+ ] }),
21389
+ /* @__PURE__ */ jsx99("span", { className: "fc:text-[10px] fc:font-bold fc:px-2 fc:py-0.5 fc:rounded-full fc:bg-emerald-50 fc:text-emerald-700 fc:border fc:border-emerald-200", children: doc.status })
21390
+ ]
21391
+ },
21392
+ i
21393
+ )) })
21394
+ ] })
21953
21395
  ] })
21396
+ ] }),
21397
+ !selectedApplication && /* @__PURE__ */ jsxs98("div", { className: "fc:flex fc:min-h-72 fc:flex-col fc:items-center fc:justify-center fc:gap-2 fc:text-center", children: [
21398
+ /* @__PURE__ */ jsx99(RiRouteLine2, { size: 28, className: "fc:text-slate-300" }),
21399
+ /* @__PURE__ */ jsx99("h2", { className: "fc:text-sm fc:font-bold fc:text-slate-700", children: "No tracking data available" }),
21400
+ /* @__PURE__ */ jsx99("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." })
21954
21401
  ] })
21955
- ] }) })
21402
+ ] })
21956
21403
  ) : (
21957
21404
  /* ========================================================
21958
21405
  VIEW 2: APPLICATIONS REGISTRY TABLE (MATCHING INBOX TABLE)