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.
package/dist/pkg-index.js CHANGED
@@ -18977,7 +18977,7 @@ var import_react101 = require("@remixicon/react");
18977
18977
  var import_react94 = __toESM(require("react"));
18978
18978
  var import_react95 = require("@remixicon/react");
18979
18979
  var import_jsx_runtime94 = require("react/jsx-runtime");
18980
- function PoolConfirmationModal({ isOpen, onClose, onConfirm, file }) {
18980
+ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file, isSubmitting = false }) {
18981
18981
  (0, import_react94.useEffect)(() => {
18982
18982
  if (!isOpen) return;
18983
18983
  const handleKeyDown = (e) => {
@@ -19000,8 +19000,8 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file }) {
19000
19000
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-3", children: [
19001
19001
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("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__ */ (0, import_jsx_runtime94.jsx)(import_react95.RiInboxArchiveLine, { size: 20 }) }),
19002
19002
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { children: [
19003
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h3", { className: "fc:text-base fc:font-bold fc:text-slate-800", children: "Confirm Pool File" }),
19004
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "fc:text-xs fc:text-slate-500", children: "Claim file into your personal work queue" })
19003
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h3", { className: "fc:text-base fc:font-bold fc:text-slate-800", children: "Claim Workflow Files" }),
19004
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "fc:text-xs fc:text-slate-500", children: "Claim unclaimed files for the selected step" })
19005
19005
  ] })
19006
19006
  ] }),
19007
19007
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
@@ -19009,6 +19009,7 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file }) {
19009
19009
  {
19010
19010
  type: "button",
19011
19011
  onClick: onClose,
19012
+ disabled: isSubmitting,
19012
19013
  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",
19013
19014
  children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react95.RiCloseLine, { size: 20 })
19014
19015
  }
@@ -19018,9 +19019,11 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file }) {
19018
19019
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("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: [
19019
19020
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react95.RiAlertLine, { size: 20, className: "fc:text-blue-600 fc:shrink-0 fc:mt-0.5" }),
19020
19021
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "fc:text-xs fc:text-blue-900 fc:leading-relaxed", children: [
19021
- "Are you sure you want to pool this file? Once confirmed, this file will be locked from the common pool and assigned to your ",
19022
+ "Confirming will claim ",
19023
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("strong", { className: "fc:font-bold", children: "all unclaimed files" }),
19024
+ " for this workflow step and assign them to your ",
19022
19025
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("strong", { className: "fc:font-bold", children: "My Files" }),
19023
- " tab for processing."
19026
+ " queue."
19024
19027
  ] })
19025
19028
  ] }),
19026
19029
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("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: [
@@ -19058,6 +19061,7 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file }) {
19058
19061
  {
19059
19062
  type: "button",
19060
19063
  onClick: onClose,
19064
+ disabled: isSubmitting,
19061
19065
  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",
19062
19066
  children: "Cancel"
19063
19067
  }
@@ -19066,11 +19070,12 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file }) {
19066
19070
  "button",
19067
19071
  {
19068
19072
  type: "button",
19069
- onClick: () => onConfirm(file),
19070
- 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",
19073
+ onClick: onConfirm,
19074
+ disabled: isSubmitting,
19075
+ 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",
19071
19076
  children: [
19072
19077
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react95.RiCheckLine, { size: 16 }),
19073
- "Yes, Pool File"
19078
+ isSubmitting ? "Claiming..." : "Yes, Claim Files"
19074
19079
  ]
19075
19080
  }
19076
19081
  )
@@ -19082,17 +19087,71 @@ function PoolConfirmationModal({ isOpen, onClose, onConfirm, file }) {
19082
19087
  // src/components/inbox/TakeActionModal.jsx
19083
19088
  var import_react96 = __toESM(require("react"));
19084
19089
  var import_react97 = require("@remixicon/react");
19090
+ init_ApiEndpointsProvider();
19091
+ init_ApiServicepackage();
19085
19092
  var import_jsx_runtime95 = require("react/jsx-runtime");
19093
+ var getAvailableActions = (response) => {
19094
+ var _a, _b, _c, _d, _e, _f, _g;
19095
+ console.log("Raw response for available actions:", response);
19096
+ 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;
19097
+ const rows = Array.isArray(value) ? value : (_g = (_f = value == null ? void 0 : value.items) != null ? _f : value == null ? void 0 : value.records) != null ? _g : [];
19098
+ return rows.map((action) => {
19099
+ var _a2, _b2, _c2, _d2, _e2, _f2;
19100
+ return {
19101
+ label: (_d2 = (_c2 = (_b2 = (_a2 = action.label) != null ? _a2 : action.Label) != null ? _b2 : action.actionName) != null ? _c2 : action.ActionName) != null ? _d2 : "",
19102
+ actionCode: (_f2 = (_e2 = action.actionCode) != null ? _e2 : action.ActionCode) != null ? _f2 : ""
19103
+ };
19104
+ }).filter((action) => action.label && action.actionCode);
19105
+ };
19086
19106
  function TakeActionModal({ isOpen, onClose, onSubmit, file }) {
19087
- const [actionType, setActionType] = (0, import_react96.useState)("forward");
19107
+ const [actions, setActions] = (0, import_react96.useState)([]);
19108
+ const [actionCode, setActionCode] = (0, import_react96.useState)("");
19109
+ const [isLoadingActions, setIsLoadingActions] = (0, import_react96.useState)(false);
19110
+ const [actionLoadError, setActionLoadError] = (0, import_react96.useState)("");
19088
19111
  const [remarks, setRemarks] = (0, import_react96.useState)("");
19089
19112
  const [isSubmitting, setIsSubmitting] = (0, import_react96.useState)(false);
19090
19113
  const handleClose = (0, import_react96.useCallback)(() => {
19091
- setActionType("forward");
19114
+ if (isSubmitting) return;
19115
+ setActionCode("");
19092
19116
  setRemarks("");
19093
- setIsSubmitting(false);
19094
19117
  onClose();
19095
- }, [onClose]);
19118
+ }, [isSubmitting, onClose]);
19119
+ (0, import_react96.useEffect)(() => {
19120
+ if (!isOpen || !file) return void 0;
19121
+ let isCurrent = true;
19122
+ const loadActions = async () => {
19123
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
19124
+ setActions([]);
19125
+ setActionCode("");
19126
+ setActionLoadError("");
19127
+ setIsLoadingActions(true);
19128
+ try {
19129
+ const flowCore = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) != null ? _b : {};
19130
+ 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;
19131
+ const workflowStepId = (_h = file.workflowStepId) != null ? _h : file.WorkflowStepId;
19132
+ if (!endpoint2) throw new Error("Workflow step actions endpoint is not configured.");
19133
+ if (workflowStepId == null) throw new Error("Workflow step ID is missing for this file.");
19134
+ const url = typeof endpoint2 === "function" ? endpoint2() : String(endpoint2);
19135
+ const nextActions = getAvailableActions(await getApiService().post(url, {
19136
+ workflowStepId: Number(workflowStepId)
19137
+ }));
19138
+ if (!isCurrent) return;
19139
+ console.log("Available actions for workflow step:", nextActions);
19140
+ setActions(nextActions);
19141
+ setActionCode((_j = (_i = nextActions[0]) == null ? void 0 : _i.actionCode) != null ? _j : "");
19142
+ if (nextActions.length === 0) setActionLoadError("No actions are available for this workflow step.");
19143
+ } catch (error) {
19144
+ if (!isCurrent) return;
19145
+ 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.");
19146
+ } finally {
19147
+ if (isCurrent) setIsLoadingActions(false);
19148
+ }
19149
+ };
19150
+ loadActions();
19151
+ return () => {
19152
+ isCurrent = false;
19153
+ };
19154
+ }, [file, isOpen]);
19096
19155
  (0, import_react96.useEffect)(() => {
19097
19156
  if (!isOpen) return;
19098
19157
  const handleKeyDown = (e) => {
@@ -19102,10 +19161,15 @@ function TakeActionModal({ isOpen, onClose, onSubmit, file }) {
19102
19161
  return () => window.removeEventListener("keydown", handleKeyDown);
19103
19162
  }, [isOpen, handleClose]);
19104
19163
  if (!isOpen || !file) return null;
19105
- const handleSubmit = (e) => {
19164
+ const handleSubmit = async (e) => {
19106
19165
  e.preventDefault();
19166
+ if (!actionCode || isLoadingActions || isSubmitting) return;
19107
19167
  setIsSubmitting(true);
19108
- onSubmit({ file, actionType, remarks });
19168
+ try {
19169
+ await onSubmit({ file, actionCode, remarks });
19170
+ } finally {
19171
+ setIsSubmitting(false);
19172
+ }
19109
19173
  };
19110
19174
  return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "fc:fixed fc:inset-0 fc:z-50 fc:flex fc:items-center fc:justify-center fc:p-4", children: [
19111
19175
  /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
@@ -19132,6 +19196,7 @@ function TakeActionModal({ isOpen, onClose, onSubmit, file }) {
19132
19196
  {
19133
19197
  type: "button",
19134
19198
  onClick: handleClose,
19199
+ disabled: isSubmitting,
19135
19200
  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",
19136
19201
  children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react97.RiCloseLine, { size: 20 })
19137
19202
  }
@@ -19158,39 +19223,37 @@ function TakeActionModal({ isOpen, onClose, onSubmit, file }) {
19158
19223
  "Select Action ",
19159
19224
  /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "fc:text-red-500", children: "*" })
19160
19225
  ] }),
19161
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "fc:grid fc:grid-cols-2 fc:gap-2.5", children: [
19162
- { id: "forward", label: "Forward to Next Step", color: "emerald" },
19163
- { id: "approve", label: "Approve & Complete", color: "blue" },
19164
- { id: "return", label: "Return / Send Back", color: "amber" },
19165
- { id: "hold", label: "Put on Hold", color: "slate" }
19166
- ].map((act) => /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
19226
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "fc:grid fc:grid-cols-2 fc:gap-2.5", children: actions.map((act) => /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
19167
19227
  "label",
19168
19228
  {
19169
- 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"}`,
19229
+ 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"}`,
19170
19230
  children: [
19171
19231
  /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
19172
19232
  "input",
19173
19233
  {
19174
19234
  type: "radio",
19175
19235
  name: "actionType",
19176
- value: act.id,
19177
- checked: actionType === act.id,
19178
- onChange: (e) => setActionType(e.target.value),
19236
+ value: act.actionCode,
19237
+ checked: actionCode === act.actionCode,
19238
+ onChange: (e) => setActionCode(e.target.value),
19239
+ disabled: isSubmitting,
19179
19240
  className: "fc:sr-only"
19180
19241
  }
19181
19242
  ),
19182
19243
  /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
19183
19244
  "div",
19184
19245
  {
19185
- 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"}`,
19186
- children: actionType === act.id && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "fc:w-1.5 fc:h-1.5 fc:bg-white fc:rounded-full" })
19246
+ 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"}`,
19247
+ children: actionCode === act.actionCode && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "fc:w-1.5 fc:h-1.5 fc:bg-white fc:rounded-full" })
19187
19248
  }
19188
19249
  ),
19189
19250
  /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "fc:text-xs fc:font-bold", children: act.label })
19190
19251
  ]
19191
19252
  },
19192
- act.id
19193
- )) })
19253
+ act.actionCode
19254
+ )) }),
19255
+ isLoadingActions && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "fc:mt-2 fc:text-xs fc:text-slate-500", children: "Loading available actions..." }),
19256
+ actionLoadError && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "fc:mt-2 fc:text-xs fc:text-red-600", children: actionLoadError })
19194
19257
  ] }),
19195
19258
  /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { children: [
19196
19259
  /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1", children: "Remarks / Comments" }),
@@ -19222,7 +19285,7 @@ function TakeActionModal({ isOpen, onClose, onSubmit, file }) {
19222
19285
  "button",
19223
19286
  {
19224
19287
  type: "submit",
19225
- disabled: isSubmitting,
19288
+ disabled: isSubmitting || isLoadingActions || !actionCode,
19226
19289
  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",
19227
19290
  children: [
19228
19291
  /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react97.RiSendPlaneLine, { size: 16 }),
@@ -19348,267 +19411,231 @@ function ViewFileModal({ isOpen, onClose, file }) {
19348
19411
  }
19349
19412
 
19350
19413
  // src/components/inbox/InboxMain.jsx
19414
+ init_ApiEndpointsProvider();
19415
+ init_ApiServicepackage();
19351
19416
  var import_jsx_runtime97 = require("react/jsx-runtime");
19352
- var INBOX_ROLES = [
19353
- { name: "Reviewer", marker: "RV", step: "Scrutiny & Review", description: "Review applications and findings", color: "fc:bg-blue-100 fc:text-blue-700" },
19354
- { name: "Verifier", marker: "VF", step: "Document Verification", description: "Validate submitted documents", color: "fc:bg-teal-100 fc:text-teal-700" },
19355
- { name: "Approver", marker: "AP", step: "Final Approval", description: "Approve or return completed cases", color: "fc:bg-amber-100 fc:text-amber-700" }
19356
- ];
19357
- var INITIAL_FILE_POOL = [
19358
- {
19359
- fileId: 101,
19360
- fileNumber: "FC-2026-0142",
19361
- subject: "Industrial Waste Discharge License Renewal ApplicationIndustrial Waste Discharge License Renewal Application",
19362
- workflowName: "Environmental Clearance",
19363
- department: "Environment & Forests",
19364
- applicant: "GreenTech Industries Ltd.",
19365
- category: "Statutory Renewal",
19366
- financialYear: "2026-27",
19367
- sender: "GreenTech Industries Ltd.",
19368
- priority: "Urgent",
19369
- receivedDate: "05-Oct-2026 09:15 AM",
19370
- dueDate: "09-Oct-2026",
19371
- slaStatus: "Critical (18h left)",
19372
- status: "Available",
19373
- assignedTo: "-"
19374
- },
19375
- {
19376
- fileId: 102,
19377
- fileNumber: "FC-2026-0145",
19378
- subject: "Sector 14 Commercial Complex Building Plan Sanction",
19379
- workflowName: "Urban Development Clearance",
19380
- department: "Urban Development",
19381
- applicant: "Apex Constructions Pvt Ltd",
19382
- category: "Commercial Sanction",
19383
- financialYear: "2026-27",
19384
- sender: "Apex Constructions Pvt Ltd",
19385
- priority: "High",
19386
- receivedDate: "05-Oct-2026 11:30 AM",
19387
- dueDate: "12-Oct-2026",
19388
- slaStatus: "Running (4d left)",
19389
- status: "Available",
19390
- assignedTo: "-"
19391
- },
19392
- {
19393
- fileId: 103,
19394
- fileNumber: "FC-2026-0149",
19395
- subject: "Annual Cyber Security Audit & Compliance Report",
19396
- workflowName: "IT Security Compliance",
19397
- department: "Information Technology",
19398
- applicant: "Internal IT Audit Cell",
19399
- category: "Internal Audit",
19400
- financialYear: "2026-27",
19401
- sender: "Internal IT Audit Cell",
19402
- priority: "Medium",
19403
- receivedDate: "06-Oct-2026 02:45 PM",
19404
- dueDate: "15-Oct-2026",
19405
- slaStatus: "Running (7d left)",
19406
- status: "Available",
19407
- assignedTo: "-"
19408
- },
19409
- {
19410
- fileId: 104,
19411
- fileNumber: "FC-2026-0153",
19412
- subject: "Vendor Onboarding & Due Diligence - Cloud Services",
19413
- workflowName: "Procurement & Contracts",
19414
- department: "Procurement Cell",
19415
- applicant: "Global Infotech Solutions",
19416
- category: "Vendor Registration",
19417
- financialYear: "2026-27",
19418
- sender: "Global Infotech Solutions",
19419
- priority: "High",
19420
- receivedDate: "06-Oct-2026 04:10 PM",
19421
- dueDate: "11-Oct-2026",
19422
- slaStatus: "Running (3d left)",
19423
- status: "Available",
19424
- assignedTo: "-"
19425
- },
19426
- {
19427
- fileId: 105,
19428
- fileNumber: "FC-2026-0158",
19429
- subject: "Township Potable Water Pipeline Overhaul Budget Sanction",
19430
- workflowName: "Public Works Approval",
19431
- department: "Public Works & Water",
19432
- applicant: "Municipal Engineering Dept",
19433
- category: "Capital Outlay",
19434
- financialYear: "2026-27",
19435
- sender: "Municipal Engineering Dept",
19436
- priority: "Urgent",
19437
- receivedDate: "07-Oct-2026 08:30 AM",
19438
- dueDate: "10-Oct-2026",
19439
- slaStatus: "Critical (22h left)",
19440
- status: "Available",
19441
- assignedTo: "-"
19442
- },
19443
- {
19444
- fileId: 106,
19445
- fileNumber: "FC-2026-0162",
19446
- subject: "Employee Health Insurance Policy Provider Revision",
19447
- workflowName: "HR & Employee Welfare",
19448
- department: "Human Resources",
19449
- applicant: "Corporate HR Services",
19450
- category: "Policy Reform",
19451
- financialYear: "2026-27",
19452
- sender: "Corporate HR Services",
19453
- priority: "Low",
19454
- receivedDate: "07-Oct-2026 10:00 AM",
19455
- dueDate: "20-Oct-2026",
19456
- slaStatus: "Running (12d left)",
19457
- status: "Available",
19458
- assignedTo: "-"
19459
- },
19460
- {
19461
- fileId: 107,
19462
- fileNumber: "FC-2026-0167",
19463
- subject: "Renewable Solar Rooftop Grid Connectivity NOC",
19464
- workflowName: "Energy Regulatory Clearance",
19465
- department: "Power & Energy",
19466
- applicant: "SunPower Dynamics Ltd",
19467
- category: "Infrastructure NOC",
19468
- financialYear: "2026-27",
19469
- sender: "SunPower Dynamics Ltd",
19470
- priority: "Medium",
19471
- receivedDate: "07-Oct-2026 11:15 AM",
19472
- dueDate: "14-Oct-2026",
19473
- slaStatus: "Running (6d left)",
19474
- status: "Available",
19475
- assignedTo: "-"
19476
- }
19477
- ];
19478
- var INITIAL_MY_FILES = [
19479
- {
19480
- fileId: 201,
19481
- fileNumber: "FC-2026-0112",
19482
- subject: "Hospital Expansion Fire Safety NOC & Site Clearance",
19483
- workflowName: "Fire & Safety Clearance",
19484
- department: "Public Safety",
19485
- applicant: "City Hospital Trust",
19486
- category: "Statutory NOC",
19487
- financialYear: "2026-27",
19488
- sender: "City Hospital Trust",
19489
- priority: "Urgent",
19490
- receivedDate: "03-Oct-2026 10:15 AM",
19491
- dueDate: "08-Oct-2026",
19492
- slaStatus: "Critical (14h left)",
19493
- status: "Assigned to Me",
19494
- assignedTo: "Pankaj Jain"
19495
- },
19496
- {
19497
- fileId: 202,
19498
- fileNumber: "FC-2026-0120",
19499
- subject: "Q3 Departmental Infrastructure Procurement Sanction",
19500
- workflowName: "Financial Sanction",
19501
- department: "Finance & Accounts",
19502
- applicant: "Administration Division",
19503
- category: "Budget Sanction",
19504
- financialYear: "2026-27",
19505
- sender: "Administration Division",
19506
- priority: "High",
19507
- receivedDate: "04-Oct-2026 01:20 PM",
19508
- dueDate: "10-Oct-2026",
19509
- slaStatus: "Running (2d left)",
19510
- status: "In Progress",
19511
- assignedTo: "Pankaj Jain"
19512
- },
19513
- {
19514
- fileId: 203,
19515
- fileNumber: "FC-2026-0128",
19516
- subject: "Public Interest Petition Regarding Street Light Restoration",
19517
- workflowName: "Citizen Grievance Redressal",
19518
- department: "Municipal Affairs",
19519
- applicant: "Ward 12 Residents Forum",
19520
- category: "Citizen Grievance",
19521
- financialYear: "2026-27",
19522
- sender: "Ward 12 Residents Forum",
19523
- priority: "Medium",
19524
- receivedDate: "04-Oct-2026 03:40 PM",
19525
- dueDate: "12-Oct-2026",
19526
- slaStatus: "Running (4d left)",
19527
- status: "In Progress",
19528
- assignedTo: "Pankaj Jain"
19529
- },
19530
- {
19531
- fileId: 204,
19532
- fileNumber: "FC-2026-0135",
19533
- subject: "Sub-Station Electrical Equipment Maintenance Agreement",
19534
- workflowName: "Procurement & Contracts",
19535
- department: "Power & Energy",
19536
- applicant: "State Power Grid Corp",
19537
- category: "AMC Contract",
19538
- financialYear: "2026-27",
19539
- sender: "State Power Grid Corp",
19540
- priority: "Low",
19541
- receivedDate: "05-Oct-2026 09:50 AM",
19542
- dueDate: "16-Oct-2026",
19543
- slaStatus: "Running (8d left)",
19544
- status: "In Progress",
19545
- assignedTo: "Pankaj Jain"
19546
- }
19547
- ];
19548
- var INITIAL_TOTAL_FILES = [
19549
- ...INITIAL_FILE_POOL,
19550
- ...INITIAL_MY_FILES,
19551
- {
19552
- fileId: 301,
19553
- fileNumber: "FC-2026-0095",
19554
- subject: "National Highway Bypass Land Acquisition Settlement",
19555
- workflowName: "Land Revenue & Settlement",
19556
- department: "Land & Revenue",
19557
- applicant: "District Collectorate",
19558
- category: "Land Settlement",
19559
- financialYear: "2026-27",
19560
- sender: "District Magistrate Secretariat",
19561
- priority: "High",
19562
- receivedDate: "28-Sep-2026 11:00 AM",
19563
- dueDate: "05-Oct-2026",
19564
- slaStatus: "Met / Completed",
19565
- status: "Approved",
19566
- assignedTo: "Executive Director"
19567
- },
19568
- {
19569
- fileId: 302,
19570
- fileNumber: "FC-2026-0103",
19571
- subject: "Metro Rail Corridor Phase 2 Tree Relocation Clearance",
19572
- workflowName: "Environmental Clearance",
19573
- department: "Forestry & Environment",
19574
- applicant: "Metro Rail Corporation",
19575
- category: "Forest Clearance",
19576
- financialYear: "2026-27",
19577
- sender: "Metro Rail Corporation",
19578
- priority: "Medium",
19579
- receivedDate: "30-Sep-2026 02:15 PM",
19580
- dueDate: "07-Oct-2026",
19581
- slaStatus: "Met / Completed",
19582
- status: "Completed",
19583
- assignedTo: "Forest Officer"
19584
- },
19585
- {
19586
- fileId: 303,
19587
- fileNumber: "FC-2026-0108",
19588
- subject: "Smart City Traffic Management System Software SLA",
19589
- workflowName: "Urban Development Clearance",
19590
- department: "Information Technology",
19591
- applicant: "Smart Mobility Dept",
19592
- category: "Software License",
19593
- financialYear: "2026-27",
19594
- sender: "Smart Mobility Dept",
19595
- priority: "Low",
19596
- receivedDate: "01-Oct-2026 04:30 PM",
19597
- dueDate: "15-Oct-2026",
19598
- slaStatus: "Running",
19599
- status: "Under Review",
19600
- assignedTo: "Technical Officer"
19417
+ var getInboxEndpoint = (resourceNames, actions) => {
19418
+ var _a, _b;
19419
+ const flowCore = ((_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) || {};
19420
+ const actionNames = Array.isArray(actions) ? actions : [actions];
19421
+ for (const resourceName of resourceNames) {
19422
+ const resource = flowCore[resourceName];
19423
+ for (const action of actionNames) {
19424
+ const actionName = action.charAt(0).toUpperCase() + action.slice(1);
19425
+ const endpoint2 = (_b = resource == null ? void 0 : resource[action]) != null ? _b : resource == null ? void 0 : resource[actionName];
19426
+ if (endpoint2) return endpoint2;
19427
+ }
19601
19428
  }
19602
- ];
19429
+ return null;
19430
+ };
19431
+ var deriveAssignedStepsEndpoint = (filePoolEndpoint) => {
19432
+ if (typeof filePoolEndpoint !== "string") return null;
19433
+ const endpoint2 = filePoolEndpoint.trim().replace(/\/+$/, "").split("?")[0];
19434
+ const filePoolRoute = "/FilePool/GetUnclaimedFilesByWorkflowStepId";
19435
+ if (!endpoint2.endsWith(filePoolRoute)) return null;
19436
+ return `${endpoint2.slice(0, -filePoolRoute.length)}/WorkflowStepUserMapping/GetAssignedStepsByUser`;
19437
+ };
19438
+ var unwrapInboxRows = (response) => {
19439
+ var _a, _b, _c, _d, _e, _f, _g;
19440
+ 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;
19441
+ return Array.isArray(value) ? value : (_g = (_f = value == null ? void 0 : value.items) != null ? _f : value == null ? void 0 : value.records) != null ? _g : [];
19442
+ };
19443
+ var formatInboxDate = (value) => {
19444
+ if (!value) return "-";
19445
+ const date = new Date(value);
19446
+ return Number.isNaN(date.getTime()) ? String(value) : date.toLocaleString("en-GB", {
19447
+ day: "2-digit",
19448
+ month: "short",
19449
+ year: "numeric",
19450
+ hour: "2-digit",
19451
+ minute: "2-digit"
19452
+ });
19453
+ };
19454
+ var normalizePoolFile = (file) => {
19455
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
19456
+ const taskInstanceId = (_a = file.taskInstanceId) != null ? _a : file.TaskInstanceId;
19457
+ const filePoolId = (_b = file.filePoolId) != null ? _b : file.FilePoolId;
19458
+ const businessEntity = (_c = file.businessEntityType) != null ? _c : file.BusinessEntityType;
19459
+ const businessEntityId = (_d = file.businessEntityId) != null ? _d : file.BusinessEntityId;
19460
+ return __spreadProps(__spreadValues({}, file), {
19461
+ fileId: filePoolId != null ? filePoolId : taskInstanceId,
19462
+ taskInstanceId,
19463
+ workflowStepId: (_e = file.workflowStepId) != null ? _e : file.WorkflowStepId,
19464
+ fileNumber: (_g = (_f = file.fileNumber) != null ? _f : file.applicationNumber) != null ? _g : `TASK-${taskInstanceId != null ? taskInstanceId : filePoolId}`,
19465
+ subject: (_i = (_h = file.subject) != null ? _h : businessEntityId ? `${businessEntity || "File"} #${businessEntityId}` : businessEntity) != null ? _i : `Workflow task ${taskInstanceId != null ? taskInstanceId : ""}`,
19466
+ workflowName: (_k = (_j = file.workflowName) != null ? _j : file.WorkflowName) != null ? _k : "-",
19467
+ department: (_l = file.department) != null ? _l : "-",
19468
+ applicant: (_m = file.applicant) != null ? _m : businessEntityId ? String(businessEntityId) : "-",
19469
+ category: (_p = (_o = (_n = file.category) != null ? _n : file.workflowTypeName) != null ? _o : file.WorkflowTypeName) != null ? _p : "-",
19470
+ financialYear: (_q = file.financialYear) != null ? _q : "-",
19471
+ sender: (_s = (_r = file.sender) != null ? _r : file.initiator) != null ? _s : "-",
19472
+ priority: (_t = file.priority) != null ? _t : "Medium",
19473
+ receivedDate: formatInboxDate((_v = (_u = file.addedOn) != null ? _u : file.createdAt) != null ? _v : file.receivedDate),
19474
+ dueDate: formatInboxDate(file.dueDate),
19475
+ slaStatus: (_w = file.slaStatus) != null ? _w : "-",
19476
+ status: "Available",
19477
+ assignedTo: "-",
19478
+ currentStep: (_x = file.stepName) != null ? _x : "-"
19479
+ });
19480
+ };
19481
+ var normalizeMyFile = (file) => {
19482
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E;
19483
+ const taskInstanceId = (_a = file.taskInstanceId) != null ? _a : file.TaskInstanceId;
19484
+ const businessEntityId = (_b = file.businessEntityId) != null ? _b : file.BusinessEntityId;
19485
+ const businessEntity = (_c = file.businessEntityType) != null ? _c : file.BusinessEntityType;
19486
+ return __spreadProps(__spreadValues({}, file), {
19487
+ fileId: (_d = taskInstanceId != null ? taskInstanceId : file.fileInstanceId) != null ? _d : file.FileInstanceId,
19488
+ taskInstanceId,
19489
+ workflowStepId: (_e = file.workflowStepId) != null ? _e : file.WorkflowStepId,
19490
+ fileNumber: (_g = (_f = file.fileNumber) != null ? _f : file.applicationNumber) != null ? _g : `TASK-${taskInstanceId != null ? taskInstanceId : ""}`,
19491
+ subject: (_i = (_h = file.subject) != null ? _h : businessEntityId ? `${businessEntity || "File"} #${businessEntityId}` : businessEntity) != null ? _i : `Workflow task ${taskInstanceId != null ? taskInstanceId : ""}`,
19492
+ workflowName: (_k = (_j = file.workflowName) != null ? _j : file.WorkflowName) != null ? _k : "-",
19493
+ department: (_l = file.department) != null ? _l : file.hierarchyNodeId ? `Node ${file.hierarchyNodeId}` : "-",
19494
+ applicant: (_m = file.applicant) != null ? _m : businessEntityId ? String(businessEntityId) : "-",
19495
+ category: (_p = (_o = (_n = file.category) != null ? _n : file.workflowTypeName) != null ? _o : file.WorkflowTypeName) != null ? _p : "-",
19496
+ financialYear: (_q = file.financialYear) != null ? _q : "-",
19497
+ sender: (_s = (_r = file.sender) != null ? _r : businessEntity) != null ? _s : "-",
19498
+ priority: (_t = file.priority) != null ? _t : "Medium",
19499
+ receivedDate: formatInboxDate((_u = file.createdAt) != null ? _u : file.receivedDate),
19500
+ dueDate: formatInboxDate(file.dueDate),
19501
+ slaStatus: (_v = file.slaStatus) != null ? _v : "-",
19502
+ status: (_x = (_w = file.fileStatus) != null ? _w : file.statusName) != null ? _x : "In Progress",
19503
+ assignedTo: (_D = (_C = (_B = (_A = (_z = (_y = file.assignedTo) != null ? _y : file.AssignedTo) != null ? _z : file.assignedUserName) != null ? _A : file.AssignedUserName) != null ? _B : file.assignedUserId) != null ? _C : file.AssignedUserId) != null ? _D : "-",
19504
+ currentStep: (_E = file.stepName) != null ? _E : "-"
19505
+ });
19506
+ };
19603
19507
  function InboxMain() {
19604
19508
  const [activeTab, setActiveTab] = (0, import_react100.useState)("filePool");
19605
- const [activeRole, setActiveRole] = (0, import_react100.useState)("Reviewer");
19509
+ const [assignedSteps, setAssignedSteps] = (0, import_react100.useState)([]);
19510
+ const [activeWorkflowStepId, setActiveWorkflowStepId] = (0, import_react100.useState)(null);
19606
19511
  const [roleDropdownOpen, setRoleDropdownOpen] = (0, import_react100.useState)(false);
19607
19512
  const roleDropdownRef = (0, import_react100.useRef)(null);
19608
- const activeRoleDetails = INBOX_ROLES.find((role) => role.name === activeRole) || INBOX_ROLES[0];
19609
- const [filePoolFiles, setFilePoolFiles] = (0, import_react100.useState)(INITIAL_FILE_POOL);
19610
- const [myFiles, setMyFiles] = (0, import_react100.useState)(INITIAL_MY_FILES);
19611
- const [totalFiles, setTotalFiles] = (0, import_react100.useState)(INITIAL_TOTAL_FILES);
19513
+ const activeRoleDetails = assignedSteps.find(
19514
+ (step) => Number(step.workflowStepId) === Number(activeWorkflowStepId)
19515
+ );
19516
+ const activeRole = (activeRoleDetails == null ? void 0 : activeRoleDetails.stepName) || "No Assigned Step";
19517
+ const [filePoolFiles, setFilePoolFiles] = (0, import_react100.useState)([]);
19518
+ const [myFiles, setMyFiles] = (0, import_react100.useState)([]);
19519
+ const [totalFiles, setTotalFiles] = (0, import_react100.useState)([]);
19520
+ const [refreshKey, setRefreshKey] = (0, import_react100.useState)(0);
19521
+ (0, import_react100.useEffect)(() => {
19522
+ let isCurrent = true;
19523
+ const loadAssignedSteps = async () => {
19524
+ var _a, _b;
19525
+ try {
19526
+ const apiService2 = getApiService();
19527
+ const unclaimedFilesEndpoint = getInboxEndpoint(
19528
+ ["inbox", "Inbox", "filePool", "FilePool"],
19529
+ "getUnclaimedFilesByWorkflowStepId"
19530
+ );
19531
+ if (!unclaimedFilesEndpoint) {
19532
+ throw new Error("File Pool endpoint is not configured (flowCore.inbox.getUnclaimedFilesByWorkflowStepId).");
19533
+ }
19534
+ const configuredAssignedStepsEndpoint = getInboxEndpoint(
19535
+ ["inbox", "Inbox", "mapping", "Mapping", "workflowStepUserMapping", "WorkflowStepUserMapping", "workflowStep", "WorkFlowStep", "WorkflowStep"],
19536
+ "getAssignedStepsByUser"
19537
+ );
19538
+ const assignedStepsEndpoint = configuredAssignedStepsEndpoint || deriveAssignedStepsEndpoint(unclaimedFilesEndpoint);
19539
+ if (!assignedStepsEndpoint) throw new Error("Assigned workflow steps endpoint is not configured.");
19540
+ const assignedStepsResponse = await apiService2.post(assignedStepsEndpoint, {});
19541
+ const stepsById = /* @__PURE__ */ new Map();
19542
+ unwrapInboxRows(assignedStepsResponse).forEach((step) => {
19543
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i;
19544
+ const workflowStepId = Number((_a2 = step.workflowStepId) != null ? _a2 : step.WorkflowStepId);
19545
+ const isActiveMapping = (_b2 = step.isActiveMapping) != null ? _b2 : step.IsActiveMapping;
19546
+ const isReleased = (_c = step.isReleased) != null ? _c : step.IsReleased;
19547
+ if (!Number.isInteger(workflowStepId) || workflowStepId <= 0 || isActiveMapping === false || isReleased === true) return;
19548
+ stepsById.set(workflowStepId, __spreadProps(__spreadValues({}, step), {
19549
+ workflowStepId,
19550
+ stepName: (_e = (_d = step.stepName) != null ? _d : step.StepName) != null ? _e : `Workflow Step ${workflowStepId}`,
19551
+ stepCode: (_g = (_f = step.stepCode) != null ? _f : step.StepCode) != null ? _g : "",
19552
+ workflowName: (_i = (_h = step.workflowName) != null ? _h : step.WorkflowName) != null ? _i : ""
19553
+ }));
19554
+ });
19555
+ const nextAssignedSteps = [...stepsById.values()];
19556
+ if (!isCurrent) return;
19557
+ setAssignedSteps(nextAssignedSteps);
19558
+ setActiveWorkflowStepId(
19559
+ (currentStepId) => {
19560
+ var _a2, _b2;
19561
+ return nextAssignedSteps.some((step) => step.workflowStepId === Number(currentStepId)) ? Number(currentStepId) : (_b2 = (_a2 = nextAssignedSteps[0]) == null ? void 0 : _a2.workflowStepId) != null ? _b2 : null;
19562
+ }
19563
+ );
19564
+ } catch (error) {
19565
+ if (!isCurrent) return;
19566
+ setAssignedSteps([]);
19567
+ setActiveWorkflowStepId(null);
19568
+ await import_sweetalert229.default.fire(
19569
+ "Error",
19570
+ ((_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.",
19571
+ "error"
19572
+ );
19573
+ }
19574
+ };
19575
+ loadAssignedSteps();
19576
+ return () => {
19577
+ isCurrent = false;
19578
+ };
19579
+ }, []);
19580
+ (0, import_react100.useEffect)(() => {
19581
+ let isCurrent = true;
19582
+ const loadStepFiles = async () => {
19583
+ var _a, _b;
19584
+ if (!activeWorkflowStepId) {
19585
+ setFilePoolFiles([]);
19586
+ setMyFiles([]);
19587
+ setTotalFiles([]);
19588
+ return;
19589
+ }
19590
+ try {
19591
+ const unclaimedFilesEndpoint = getInboxEndpoint(
19592
+ ["inbox", "Inbox", "filePool", "FilePool"],
19593
+ "getUnclaimedFilesByWorkflowStepId"
19594
+ );
19595
+ if (!unclaimedFilesEndpoint) {
19596
+ throw new Error("File Pool endpoint is not configured (flowCore.inbox.getUnclaimedFilesByWorkflowStepId).");
19597
+ }
19598
+ const myFilesEndpoint = getInboxEndpoint(
19599
+ ["inbox", "Inbox", "myFiles", "MyFiles"],
19600
+ ["getMyFilesList", "getList"]
19601
+ );
19602
+ if (!myFilesEndpoint) {
19603
+ throw new Error("My Files list endpoint is not configured (flowCore.inbox.getMyFilesList).");
19604
+ }
19605
+ const completedFilesEndpoint = getInboxEndpoint(
19606
+ ["inbox", "Inbox", "completedFiles", "CompletedFiles"],
19607
+ "getFilesCompleteList"
19608
+ );
19609
+ if (!completedFilesEndpoint) {
19610
+ throw new Error("Completed Files endpoint is not configured (flowCore.inbox.getFilesCompleteList).");
19611
+ }
19612
+ const payload = { workflowStepId: Number(activeWorkflowStepId) };
19613
+ const [poolResponse, myFilesResponse, completedFilesResponse] = await Promise.all([
19614
+ getApiService().post(unclaimedFilesEndpoint, payload),
19615
+ getApiService().post(myFilesEndpoint, payload),
19616
+ getApiService().post(completedFilesEndpoint, payload)
19617
+ ]);
19618
+ if (!isCurrent) return;
19619
+ setFilePoolFiles(unwrapInboxRows(poolResponse).map(normalizePoolFile));
19620
+ setMyFiles(unwrapInboxRows(myFilesResponse).map(normalizeMyFile));
19621
+ setTotalFiles(unwrapInboxRows(completedFilesResponse).map(normalizeMyFile));
19622
+ } catch (error) {
19623
+ if (!isCurrent) return;
19624
+ setFilePoolFiles([]);
19625
+ setMyFiles([]);
19626
+ setTotalFiles([]);
19627
+ await import_sweetalert229.default.fire(
19628
+ "Error",
19629
+ ((_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.",
19630
+ "error"
19631
+ );
19632
+ }
19633
+ };
19634
+ loadStepFiles();
19635
+ return () => {
19636
+ isCurrent = false;
19637
+ };
19638
+ }, [activeWorkflowStepId, refreshKey]);
19612
19639
  const [dynamicColumns, setDynamicColumns] = (0, import_react100.useState)([
19613
19640
  { key: "department", label: "Department", width: "190px", visible: true },
19614
19641
  { key: "applicant", label: "Applicant / Entity", width: "210px", visible: true },
@@ -19625,6 +19652,7 @@ function InboxMain() {
19625
19652
  const [sortDirection, setSortDirection] = (0, import_react100.useState)("asc");
19626
19653
  const [poolModalOpen, setPoolModalOpen] = (0, import_react100.useState)(false);
19627
19654
  const [selectedPoolFile, setSelectedPoolFile] = (0, import_react100.useState)(null);
19655
+ const [isClaimingPool, setIsClaimingPool] = (0, import_react100.useState)(false);
19628
19656
  const [actionModalOpen, setActionModalOpen] = (0, import_react100.useState)(false);
19629
19657
  const [selectedActionFile, setSelectedActionFile] = (0, import_react100.useState)(null);
19630
19658
  const [viewModalOpen, setViewModalOpen] = (0, import_react100.useState)(false);
@@ -19798,42 +19826,84 @@ function InboxMain() {
19798
19826
  setSelectedPoolFile(file);
19799
19827
  setPoolModalOpen(true);
19800
19828
  };
19801
- const handleConfirmPool = async (fileToPool) => {
19802
- setPoolModalOpen(false);
19803
- setFilePoolFiles((prev) => prev.filter((item) => item.fileId !== fileToPool.fileId));
19804
- const claimedFile = __spreadProps(__spreadValues({}, fileToPool), {
19805
- status: "In Progress",
19806
- assignedTo: "Pankaj Jain"
19807
- });
19808
- setMyFiles((prev) => [claimedFile, ...prev]);
19809
- setTotalFiles(
19810
- (prev) => prev.map(
19811
- (item) => item.fileId === fileToPool.fileId ? __spreadProps(__spreadValues({}, item), { status: "In Progress", assignedTo: "Pankaj Jain" }) : item
19812
- )
19813
- );
19814
- await import_sweetalert229.default.fire({
19815
- icon: "success",
19816
- title: "File Pooled Successfully!",
19817
- html: `File <strong>${fileToPool.fileNumber}</strong> has been moved to your <strong>My Files</strong> queue.`,
19818
- confirmButtonColor: "#2563eb",
19819
- timer: 3e3,
19820
- timerProgressBar: true
19821
- });
19829
+ const handleConfirmPool = async () => {
19830
+ var _a, _b;
19831
+ if (!activeWorkflowStepId) {
19832
+ await import_sweetalert229.default.fire("Error", "Select an assigned workflow step before claiming files.", "error");
19833
+ return;
19834
+ }
19835
+ setIsClaimingPool(true);
19836
+ try {
19837
+ const claimEndpoint = getInboxEndpoint(
19838
+ ["inbox", "Inbox", "filePool", "FilePool"],
19839
+ "claimUnclaimedFilesByWorkflowStepId"
19840
+ );
19841
+ if (!claimEndpoint) {
19842
+ throw new Error("Claim endpoint is not configured (flowCore.inbox.claimUnclaimedFilesByWorkflowStepId).");
19843
+ }
19844
+ await getApiService().post(claimEndpoint, {
19845
+ workflowStepId: Number(activeWorkflowStepId)
19846
+ });
19847
+ setPoolModalOpen(false);
19848
+ setSelectedPoolFile(null);
19849
+ setCurrentPage(1);
19850
+ setRefreshKey((previous) => previous + 1);
19851
+ await import_sweetalert229.default.fire({
19852
+ icon: "success",
19853
+ title: "Files Claimed",
19854
+ text: "Unclaimed files for this workflow step have been assigned to your My Files queue.",
19855
+ confirmButtonColor: "#2563eb",
19856
+ timer: 3e3,
19857
+ timerProgressBar: true
19858
+ });
19859
+ } catch (error) {
19860
+ await import_sweetalert229.default.fire(
19861
+ "Error",
19862
+ ((_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.",
19863
+ "error"
19864
+ );
19865
+ } finally {
19866
+ setIsClaimingPool(false);
19867
+ }
19822
19868
  };
19823
19869
  const handleOpenTakeAction = (file) => {
19824
19870
  setSelectedActionFile(file);
19825
19871
  setActionModalOpen(true);
19826
19872
  };
19827
- const handleActionSubmit = async ({ file, actionType, remarks }) => {
19828
- setActionModalOpen(false);
19829
- await import_sweetalert229.default.fire({
19830
- icon: "success",
19831
- title: "Action Processed!",
19832
- html: `Action <strong>${actionType.toUpperCase()}</strong> on file <strong>${file.fileNumber}</strong> recorded successfully.${remarks ? `<br/><small class="text-slate-500">Remarks: ${remarks}</small>` : ""}`,
19833
- confirmButtonColor: "#059669",
19834
- timer: 3e3,
19835
- timerProgressBar: true
19836
- });
19873
+ const handleActionSubmit = async ({ file, actionCode, actionLabel, remarks }) => {
19874
+ var _a, _b, _c;
19875
+ try {
19876
+ const endpoint2 = getInboxEndpoint(["inbox"], ["ExecutionFlow", "executeAction", "executionFlow"]);
19877
+ if (!endpoint2) throw new Error("Workflow execution endpoint is not configured.");
19878
+ const taskInstanceId = Number((_a = file.taskInstanceId) != null ? _a : file.TaskInstanceId);
19879
+ if (!Number.isInteger(taskInstanceId) || taskInstanceId <= 0) {
19880
+ throw new Error("Task instance ID is missing for this file.");
19881
+ }
19882
+ await getApiService().post(endpoint2, {
19883
+ taskInstanceId,
19884
+ actionCode,
19885
+ comments: remarks.trim()
19886
+ });
19887
+ setActionModalOpen(false);
19888
+ setSelectedActionFile(null);
19889
+ setRefreshKey((previous) => previous + 1);
19890
+ await import_sweetalert229.default.fire({
19891
+ icon: "success",
19892
+ title: "Action Processed!",
19893
+ text: `${actionLabel || actionCode} on file ${file.fileNumber} recorded successfully.${remarks.trim() ? ` Remarks: ${remarks.trim()}` : ""}`,
19894
+ confirmButtonColor: "#059669",
19895
+ timer: 3e3,
19896
+ timerProgressBar: true
19897
+ });
19898
+ return true;
19899
+ } catch (error) {
19900
+ await import_sweetalert229.default.fire(
19901
+ "Error",
19902
+ ((_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.",
19903
+ "error"
19904
+ );
19905
+ return false;
19906
+ }
19837
19907
  };
19838
19908
  const handleOpenView = (file) => {
19839
19909
  setSelectedViewFile(file);
@@ -19841,11 +19911,12 @@ function InboxMain() {
19841
19911
  };
19842
19912
  const handleRefresh = () => {
19843
19913
  setCurrentPage(1);
19914
+ setRefreshKey((previous) => previous + 1);
19844
19915
  import_sweetalert229.default.fire({
19845
19916
  toast: true,
19846
19917
  position: "top-end",
19847
- icon: "success",
19848
- title: "Inbox updated with latest records",
19918
+ icon: "info",
19919
+ title: "Refreshing inbox files",
19849
19920
  showConfirmButton: false,
19850
19921
  timer: 2e3
19851
19922
  });
@@ -19931,7 +20002,7 @@ function InboxMain() {
19931
20002
  ] }),
19932
20003
  /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-1.5 fc:mt-0.5", children: [
19933
20004
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:text-[10px] fc:text-slate-400 fc:font-medium", children: "Active Step:" }),
19934
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("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 })
20005
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("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) || "-" })
19935
20006
  ] })
19936
20007
  ] }),
19937
20008
  roleDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
@@ -19943,30 +20014,39 @@ function InboxMain() {
19943
20014
  children: [
19944
20015
  /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("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: [
19945
20016
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "fc:text-xs fc:font-bold fc:text-slate-800", children: "Switch role" }) }),
19946
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("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" })
20017
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { className: "fc:rounded-full fc:bg-slate-100 fc:px-2 fc:text-[9px] fc:font-bold fc:text-slate-500", children: [
20018
+ assignedSteps.length,
20019
+ " STEPS"
20020
+ ] })
19947
20021
  ] }),
19948
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "fc:space-y-1 fc:pt-0.5", children: INBOX_ROLES.map((role) => /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
19949
- "button",
19950
- {
19951
- type: "button",
19952
- role: "menuitemradio",
19953
- "aria-checked": activeRole === role.name,
19954
- onClick: () => {
19955
- setActiveRole(role.name);
19956
- setRoleDropdownOpen(false);
20022
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "fc:space-y-1 fc:pt-0.5", children: assignedSteps.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "fc:px-3 fc:py-3 fc:text-xs fc:text-slate-500", children: "No assigned workflow steps" }) : assignedSteps.map((step) => {
20023
+ const isSelected = Number(activeWorkflowStepId) === step.workflowStepId;
20024
+ const stepName = step.stepName || `Workflow Step ${step.workflowStepId}`;
20025
+ const marker = String(step.stepCode || stepName).trim().slice(0, 2).toUpperCase();
20026
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
20027
+ "button",
20028
+ {
20029
+ type: "button",
20030
+ role: "menuitemradio",
20031
+ "aria-checked": isSelected,
20032
+ onClick: () => {
20033
+ setActiveWorkflowStepId(step.workflowStepId);
20034
+ setCurrentPage(1);
20035
+ setRoleDropdownOpen(false);
20036
+ },
20037
+ 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"}`,
20038
+ children: [
20039
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("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 }),
20040
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { className: "fc:min-w-0 fc:flex-1", children: [
20041
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: `fc:block fc:text-xs fc:font-bold ${isSelected ? "fc:text-blue-800" : "fc:text-slate-800"}`, children: stepName }),
20042
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("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}` })
20043
+ ] }),
20044
+ isSelected && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("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" })
20045
+ ]
19957
20046
  },
19958
- 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"}`,
19959
- children: [
19960
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("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 }),
19961
- /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { className: "fc:min-w-0 fc:flex-1", children: [
19962
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: `fc:block fc:text-xs fc:font-bold ${activeRole === role.name ? "fc:text-blue-800" : "fc:text-slate-800"}`, children: role.name }),
19963
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "fc:mt-0.5 fc:block fc:text-[10px] fc:leading-4 fc:text-slate-500", children: role.description })
19964
- ] }),
19965
- activeRole === role.name && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("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" })
19966
- ]
19967
- },
19968
- role.name
19969
- )) })
20047
+ step.workflowStepId
20048
+ );
20049
+ }) })
19970
20050
  ]
19971
20051
  }
19972
20052
  )
@@ -19995,7 +20075,7 @@ function InboxMain() {
19995
20075
  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"}`,
19996
20076
  children: [
19997
20077
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiInboxArchiveLine, { size: 16 }),
19998
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: "File Pool" }),
20078
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: "Unclaimed Files" }),
19999
20079
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20000
20080
  "span",
20001
20081
  {
@@ -20033,7 +20113,7 @@ function InboxMain() {
20033
20113
  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"}`,
20034
20114
  children: [
20035
20115
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react101.RiFileUploadLine, { size: 16 }),
20036
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: "Total Files" }),
20116
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: "Completed Files" }),
20037
20117
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
20038
20118
  "span",
20039
20119
  {
@@ -20625,7 +20705,9 @@ function InboxMain() {
20625
20705
  {
20626
20706
  isOpen: poolModalOpen,
20627
20707
  file: selectedPoolFile,
20708
+ isSubmitting: isClaimingPool,
20628
20709
  onClose: () => {
20710
+ if (isClaimingPool) return;
20629
20711
  setPoolModalOpen(false);
20630
20712
  setSelectedPoolFile(null);
20631
20713
  },
@@ -20899,521 +20981,11 @@ function TrackingSlipModal({ isOpen, onClose, application }) {
20899
20981
 
20900
20982
  // src/components/track-application/TrackApplicationMain.jsx
20901
20983
  var import_jsx_runtime99 = require("react/jsx-runtime");
20902
- var APPLICATION_DATABASE = [
20903
- {
20904
- fileId: 202,
20905
- fileNumber: "FC-2026-0120",
20906
- subject: "Q3 Departmental Infrastructure Procurement Sanction",
20907
- workflowName: "Financial Sanction",
20908
- department: "Finance & Accounts",
20909
- applicant: "Administration Division",
20910
- category: "Budget Sanction",
20911
- financialYear: "2026-27",
20912
- sender: "Administration Division",
20913
- priority: "High",
20914
- receivedDate: "04-Oct-2026 01:20 PM",
20915
- dueDate: "10-Oct-2026",
20916
- slaStatus: "Running (2d left)",
20917
- status: "In Progress",
20918
- assignedTo: "Pankaj Jain",
20919
- currentStep: "Budget Head Appropriation",
20920
- progressPercent: 60,
20921
- stages: [
20922
- {
20923
- stageId: 1,
20924
- title: "Indents Consolidated",
20925
- description: "Department hardware requisitions.",
20926
- status: "completed",
20927
- date: "04-Oct-2026 01:20 PM",
20928
- officer: "Admin Division"
20929
- },
20930
- {
20931
- stageId: 2,
20932
- title: "Budget Availability Check",
20933
- description: "Major Head 2052 Capital Outlay.",
20934
- status: "completed",
20935
- date: "05-Oct-2026 11:00 AM",
20936
- officer: "Accounts Officer"
20937
- },
20938
- {
20939
- stageId: 3,
20940
- title: "Competent Authority Sanction",
20941
- description: "Review by Principal Secretary.",
20942
- status: "in-progress",
20943
- date: "Running (Active)",
20944
- officer: "Pankaj Jain"
20945
- },
20946
- {
20947
- stageId: 4,
20948
- title: "Sanction Letter Release",
20949
- description: "Formal expenditure sanction order.",
20950
- status: "pending",
20951
- date: "Target: 10-Oct-2026",
20952
- officer: "Finance Secretariat"
20953
- }
20954
- ],
20955
- movementHistory: [
20956
- {
20957
- id: 1,
20958
- fromStep: "Admin Division",
20959
- toStep: "Finance Scrutiny Cell",
20960
- action: "Sanction Proposal Sent",
20961
- officer: "Joint Secretary Admin",
20962
- timestamp: "04-Oct-2026 01:20 PM",
20963
- remarks: "Proposal for IT hardware and server capacity upgrade."
20964
- },
20965
- {
20966
- id: 2,
20967
- fromStep: "Finance Scrutiny Cell",
20968
- toStep: "Reviewer Desk",
20969
- action: "Budget Validated",
20970
- officer: "Accounts Officer",
20971
- timestamp: "05-Oct-2026 11:00 AM",
20972
- remarks: "Funds verified in current FY allocation."
20973
- }
20974
- ],
20975
- documents: [
20976
- { name: "Detailed Itemized Expense Estimate", type: "PDF", size: "1.9 MB", status: "Verified" },
20977
- { name: "Comparative Quotation Statement", type: "PDF", size: "1.5 MB", status: "Verified" }
20978
- ]
20979
- },
20980
- {
20981
- fileId: 101,
20982
- fileNumber: "FC-2026-0142",
20983
- subject: "Industrial Waste Discharge License Renewal Application",
20984
- workflowName: "Environmental Clearance",
20985
- department: "Environment & Forests",
20986
- applicant: "GreenTech Industries Ltd.",
20987
- category: "Statutory Renewal",
20988
- financialYear: "2026-27",
20989
- sender: "GreenTech Industries Ltd.",
20990
- priority: "Urgent",
20991
- receivedDate: "05-Oct-2026 09:15 AM",
20992
- dueDate: "09-Oct-2026",
20993
- slaStatus: "Critical (18h left)",
20994
- status: "Under Scrutiny",
20995
- assignedTo: "Pankaj Jain (Reviewer)",
20996
- currentStep: "Scrutiny & Review",
20997
- progressPercent: 50,
20998
- stages: [
20999
- {
21000
- stageId: 1,
21001
- title: "Application Registration",
21002
- description: "Application filed online via Single Window Portal.",
21003
- status: "completed",
21004
- date: "05-Oct-2026 09:15 AM",
21005
- officer: "Portal Gateway"
21006
- },
21007
- {
21008
- stageId: 2,
21009
- title: "Document Verification",
21010
- description: "Scrutiny of ETP specifications.",
21011
- status: "completed",
21012
- date: "05-Oct-2026 02:30 PM",
21013
- officer: "Pankaj Jain (Reviewer)"
21014
- },
21015
- {
21016
- stageId: 3,
21017
- title: "Field Inspection & Sampling",
21018
- description: "Pollution Control Board site inspection.",
21019
- status: "in-progress",
21020
- date: "Running (Due: 08-Oct)",
21021
- officer: "Er. Ramesh Verma"
21022
- },
21023
- {
21024
- stageId: 4,
21025
- title: "Appraisal Committee Review",
21026
- description: "State Expert Appraisal Committee review.",
21027
- status: "pending",
21028
- date: "Pending Stage 3",
21029
- officer: "Member Secretary"
21030
- },
21031
- {
21032
- stageId: 5,
21033
- title: "Final NOC & Certificate",
21034
- description: "Issuance of renewal license.",
21035
- status: "pending",
21036
- date: "Target: 09-Oct-2026",
21037
- officer: "Directorate of Env."
21038
- }
21039
- ],
21040
- movementHistory: [
21041
- {
21042
- id: 1,
21043
- fromStep: "Citizen Portal",
21044
- toStep: "Central Inward Registry",
21045
- action: "Application Submitted",
21046
- officer: "GreenTech Representative",
21047
- timestamp: "05-Oct-2026 09:15 AM",
21048
- remarks: "Online application submitted with license renewal fee."
21049
- },
21050
- {
21051
- id: 2,
21052
- fromStep: "Central Inward Registry",
21053
- toStep: "Scrutiny Desk",
21054
- action: "Forwarded for Scrutiny",
21055
- officer: "System Auto-Router",
21056
- timestamp: "05-Oct-2026 09:30 AM",
21057
- remarks: "Automated routing based on Environmental Clearance rule."
21058
- },
21059
- {
21060
- id: 3,
21061
- fromStep: "Scrutiny Desk",
21062
- toStep: "Pollution Control Inspection Cell",
21063
- action: "Under Active Scrutiny",
21064
- officer: "Pankaj Jain (Reviewer)",
21065
- timestamp: "05-Oct-2026 02:30 PM",
21066
- remarks: "Documents cleared. Site sample report requested."
21067
- }
21068
- ],
21069
- documents: [
21070
- { name: "Effluent Treatment Plant (ETP) Specification", type: "PDF", size: "3.4 MB", status: "Verified" },
21071
- { name: "Previous Financial Year Audit Log", type: "PDF", size: "1.8 MB", status: "Verified" },
21072
- { name: "Factory Site Coordinate Map", type: "PDF", size: "850 KB", status: "Under Scrutiny" }
21073
- ]
21074
- },
21075
- {
21076
- fileId: 102,
21077
- fileNumber: "FC-2026-0145",
21078
- subject: "Sector 14 Commercial Complex Building Plan Sanction",
21079
- workflowName: "Urban Development Clearance",
21080
- department: "Urban Development",
21081
- applicant: "Apex Constructions Pvt Ltd",
21082
- category: "Commercial Sanction",
21083
- financialYear: "2026-27",
21084
- sender: "Apex Constructions Pvt Ltd",
21085
- priority: "High",
21086
- receivedDate: "05-Oct-2026 11:30 AM",
21087
- dueDate: "12-Oct-2026",
21088
- slaStatus: "Running (4d left)",
21089
- status: "In Progress",
21090
- assignedTo: "Town Planner Cell",
21091
- currentStep: "Architectural Layout Verification",
21092
- progressPercent: 40,
21093
- stages: [
21094
- {
21095
- stageId: 1,
21096
- title: "Application Registration",
21097
- description: "Commercial sanction proposal filed.",
21098
- status: "completed",
21099
- date: "05-Oct-2026 11:30 AM",
21100
- officer: "Town Planning Portal"
21101
- },
21102
- {
21103
- stageId: 2,
21104
- title: "Town Planning Scrutiny",
21105
- description: "Floor area ratio and parking check.",
21106
- status: "in-progress",
21107
- date: "In Progress",
21108
- officer: "Chief Town Planner"
21109
- },
21110
- {
21111
- stageId: 3,
21112
- title: "Fire & Safety NOC",
21113
- description: "Driveway and structural load clearance.",
21114
- status: "pending",
21115
- date: "Pending Stage 2",
21116
- officer: "Fire Safety Dept"
21117
- },
21118
- {
21119
- stageId: 4,
21120
- title: "Municipal Commissioner Sanction",
21121
- description: "Final statutory sanction order.",
21122
- status: "pending",
21123
- date: "Target: 12-Oct-2026",
21124
- officer: "Municipal Comm."
21125
- }
21126
- ],
21127
- movementHistory: [
21128
- {
21129
- id: 1,
21130
- fromStep: "Citizen Portal",
21131
- toStep: "Urban Planning Registry",
21132
- action: "Filing Received",
21133
- officer: "Apex Constructions",
21134
- timestamp: "05-Oct-2026 11:30 AM",
21135
- remarks: "Proposal registered under Commercial Category A."
21136
- }
21137
- ],
21138
- documents: [
21139
- { name: "Structural Design Blueprint (CAD)", type: "PDF", size: "9.2 MB", status: "Verified" },
21140
- { name: "Land Ownership Deed", type: "PDF", size: "2.1 MB", status: "Verified" }
21141
- ]
21142
- },
21143
- {
21144
- fileId: 201,
21145
- fileNumber: "FC-2026-0112",
21146
- subject: "Hospital Expansion Fire Safety NOC & Site Clearance",
21147
- workflowName: "Fire & Safety Clearance",
21148
- department: "Public Safety",
21149
- applicant: "City Hospital Trust",
21150
- category: "Statutory NOC",
21151
- financialYear: "2026-27",
21152
- sender: "City Hospital Trust",
21153
- priority: "Urgent",
21154
- receivedDate: "03-Oct-2026 10:15 AM",
21155
- dueDate: "08-Oct-2026",
21156
- slaStatus: "Critical (14h left)",
21157
- status: "Under Review",
21158
- assignedTo: "Pankaj Jain (Reviewer)",
21159
- currentStep: "Hydrant & Evacuation Inspection",
21160
- progressPercent: 75,
21161
- stages: [
21162
- {
21163
- stageId: 1,
21164
- title: "Application Received",
21165
- description: "200-bed extension fire clearance.",
21166
- status: "completed",
21167
- date: "03-Oct-2026 10:15 AM",
21168
- officer: "Disaster Desk"
21169
- },
21170
- {
21171
- stageId: 2,
21172
- title: "Architectural Audit",
21173
- description: "Emergency exits and fire lifts check.",
21174
- status: "completed",
21175
- date: "04-Oct-2026 02:00 PM",
21176
- officer: "Pankaj Jain"
21177
- },
21178
- {
21179
- stageId: 3,
21180
- title: "Hydrant Pressure Test",
21181
- description: "Physical inspection of water tanks.",
21182
- status: "in-progress",
21183
- date: "Running (Critical)",
21184
- officer: "Inspection Team"
21185
- },
21186
- {
21187
- stageId: 4,
21188
- title: "Issuance of Certificate",
21189
- description: "Final statutory NOC issuance.",
21190
- status: "pending",
21191
- date: "Target: 08-Oct-2026",
21192
- officer: "DG Fire Services"
21193
- }
21194
- ],
21195
- movementHistory: [
21196
- {
21197
- id: 1,
21198
- fromStep: "City Hospital Trust",
21199
- toStep: "Public Safety Central Registry",
21200
- action: "Application Filed",
21201
- officer: "Trust Secretary",
21202
- timestamp: "03-Oct-2026 10:15 AM",
21203
- remarks: "Priority expedited due to public healthcare expansion."
21204
- }
21205
- ],
21206
- documents: [
21207
- { name: "Emergency Evacuation Route Map", type: "PDF", size: "3.9 MB", status: "Verified" }
21208
- ]
21209
- },
21210
- {
21211
- fileId: 104,
21212
- fileNumber: "FC-2026-0153",
21213
- subject: "Vendor Onboarding & Due Diligence - Cloud Services",
21214
- workflowName: "Procurement & Contracts",
21215
- department: "Procurement Cell",
21216
- applicant: "Global Infotech Solutions",
21217
- category: "Vendor Registration",
21218
- financialYear: "2026-27",
21219
- sender: "Global Infotech Solutions",
21220
- priority: "High",
21221
- receivedDate: "06-Oct-2026 04:10 PM",
21222
- dueDate: "11-Oct-2026",
21223
- slaStatus: "Running (3d left)",
21224
- status: "In Progress",
21225
- assignedTo: "Tender Committee",
21226
- currentStep: "Financial Bid Eligibility",
21227
- progressPercent: 45,
21228
- stages: [
21229
- {
21230
- stageId: 1,
21231
- title: "Vendor Registration",
21232
- description: "Tender credentials submitted.",
21233
- status: "completed",
21234
- date: "06-Oct-2026 04:10 PM",
21235
- officer: "e-Procurement Portal"
21236
- },
21237
- {
21238
- stageId: 2,
21239
- title: "Technical Eligibility",
21240
- description: "Past experience evaluation.",
21241
- status: "completed",
21242
- date: "07-Oct-2026 10:00 AM",
21243
- officer: "Evaluation Board"
21244
- },
21245
- {
21246
- stageId: 3,
21247
- title: "Financial Eligibility",
21248
- description: "Balance sheets and solvency audit.",
21249
- status: "in-progress",
21250
- date: "Running",
21251
- officer: "Finance Officer"
21252
- },
21253
- {
21254
- stageId: 4,
21255
- title: "Contract Award",
21256
- description: "SLA and agreement execution.",
21257
- status: "pending",
21258
- date: "Target: 11-Oct-2026",
21259
- officer: "Director Procurement"
21260
- }
21261
- ],
21262
- movementHistory: [
21263
- {
21264
- id: 1,
21265
- fromStep: "Vendor Portal",
21266
- toStep: "Procurement Intake",
21267
- action: "Bid Registered",
21268
- officer: "Global Infotech",
21269
- timestamp: "06-Oct-2026 04:10 PM",
21270
- remarks: "Online submission with Earnest Money Deposit receipt."
21271
- }
21272
- ],
21273
- documents: [
21274
- { name: "Audited Balance Sheets (3 Years)", type: "PDF", size: "5.1 MB", status: "Verified" }
21275
- ]
21276
- },
21277
- {
21278
- fileId: 203,
21279
- fileNumber: "FC-2026-0128",
21280
- subject: "Public Interest Petition Regarding Street Light Restoration",
21281
- workflowName: "Citizen Grievance Redressal",
21282
- department: "Municipal Affairs",
21283
- applicant: "Ward 12 Residents Forum",
21284
- category: "Citizen Grievance",
21285
- financialYear: "2026-27",
21286
- sender: "Ward 12 Residents Forum",
21287
- priority: "Medium",
21288
- receivedDate: "04-Oct-2026 03:40 PM",
21289
- dueDate: "12-Oct-2026",
21290
- slaStatus: "Running (4d left)",
21291
- status: "In Progress",
21292
- assignedTo: "Pankaj Jain",
21293
- currentStep: "Field Action Team Dispatch",
21294
- progressPercent: 55,
21295
- stages: [
21296
- {
21297
- stageId: 1,
21298
- title: "Petition Lodged",
21299
- description: "Grievance received through CM Helpline.",
21300
- status: "completed",
21301
- date: "04-Oct-2026 03:40 PM",
21302
- officer: "Citizen Helpdesk"
21303
- },
21304
- {
21305
- stageId: 2,
21306
- title: "Ward Engineer Assigned",
21307
- description: "Underground cabling check.",
21308
- status: "completed",
21309
- date: "05-Oct-2026 10:00 AM",
21310
- officer: "Assistant Engineer"
21311
- },
21312
- {
21313
- stageId: 3,
21314
- title: "Repair & Cable Laying",
21315
- description: "Cable and fixture replacements.",
21316
- status: "in-progress",
21317
- date: "Running",
21318
- officer: "Field Squad"
21319
- },
21320
- {
21321
- stageId: 4,
21322
- title: "Resolution & Closure",
21323
- description: "Confirmation with petitioner.",
21324
- status: "pending",
21325
- date: "Target: 12-Oct-2026",
21326
- officer: "Pankaj Jain"
21327
- }
21328
- ],
21329
- movementHistory: [
21330
- {
21331
- id: 1,
21332
- fromStep: "Citizen Helpdesk",
21333
- toStep: "Municipal Electrical Division",
21334
- action: "Grievance Categorized",
21335
- officer: "Helpdesk Officer",
21336
- timestamp: "04-Oct-2026 03:40 PM",
21337
- remarks: "Ward 12 Main Sector street illumination failure complaint."
21338
- }
21339
- ],
21340
- documents: [
21341
- { name: "Citizen Complaint Letter", type: "PDF", size: "1.1 MB", status: "Verified" }
21342
- ]
21343
- },
21344
- {
21345
- fileId: 301,
21346
- fileNumber: "FC-2026-0095",
21347
- subject: "National Highway Bypass Land Acquisition Settlement",
21348
- workflowName: "Land Revenue & Settlement",
21349
- department: "Land & Revenue",
21350
- applicant: "District Collectorate",
21351
- category: "Land Settlement",
21352
- financialYear: "2026-27",
21353
- sender: "District Magistrate Secretariat",
21354
- priority: "High",
21355
- receivedDate: "28-Sep-2026 11:00 AM",
21356
- dueDate: "05-Oct-2026",
21357
- slaStatus: "Met / Completed",
21358
- status: "Completed",
21359
- assignedTo: "Executive Director",
21360
- currentStep: "Award Pronouncement & Compensation",
21361
- progressPercent: 100,
21362
- stages: [
21363
- {
21364
- stageId: 1,
21365
- title: "Section 4 Notification",
21366
- description: "Survey of affected parcels.",
21367
- status: "completed",
21368
- date: "28-Sep-2026 11:00 AM",
21369
- officer: "Land Acquisition Officer"
21370
- },
21371
- {
21372
- stageId: 2,
21373
- title: "Public Hearing",
21374
- description: "Hearing of titleholders.",
21375
- status: "completed",
21376
- date: "30-Sep-2026 04:00 PM",
21377
- officer: "ADM Revenue"
21378
- },
21379
- {
21380
- stageId: 3,
21381
- title: "Award Declaration",
21382
- description: "Compensation disbursed to bank accounts.",
21383
- status: "completed",
21384
- date: "04-Oct-2026 01:30 PM",
21385
- officer: "Executive Director"
21386
- },
21387
- {
21388
- stageId: 4,
21389
- title: "Possession Handover",
21390
- description: "Corridor transferred to NHAI.",
21391
- status: "completed",
21392
- date: "05-Oct-2026 11:00 AM",
21393
- officer: "DM Secretariat"
21394
- }
21395
- ],
21396
- movementHistory: [
21397
- {
21398
- id: 1,
21399
- fromStep: "NHAI Project Office",
21400
- toStep: "Revenue Department",
21401
- action: "Acquisition Proposed",
21402
- officer: "Project Director",
21403
- timestamp: "28-Sep-2026 11:00 AM",
21404
- remarks: "Proposal for bypass corridor land transfer."
21405
- }
21406
- ],
21407
- documents: [
21408
- { name: "Final Land Award Gazette Notification", type: "PDF", size: "4.1 MB", status: "Verified" }
21409
- ]
21410
- }
21411
- ];
20984
+ var APPLICATION_DATABASE = [];
21412
20985
  function TrackApplicationMain() {
21413
20986
  var _a, _b, _c;
21414
20987
  const [trackQuery, setTrackQuery] = (0, import_react104.useState)("");
21415
- const [selectedApplication, setSelectedApplication] = (0, import_react104.useState)(APPLICATION_DATABASE[0]);
21416
- const [isSearching, setIsSearching] = (0, import_react104.useState)(false);
20988
+ const [selectedApplication, setSelectedApplication] = (0, import_react104.useState)(null);
21417
20989
  const [activeTab, setActiveTab] = (0, import_react104.useState)("timeline");
21418
20990
  const [viewMode, setViewMode] = (0, import_react104.useState)("tracker");
21419
20991
  const [tableSearch, setTableSearch] = (0, import_react104.useState)("");
@@ -21423,119 +20995,25 @@ function TrackApplicationMain() {
21423
20995
  const [sortColumn, setSortColumn] = (0, import_react104.useState)("");
21424
20996
  const [sortDirection, setSortDirection] = (0, import_react104.useState)("asc");
21425
20997
  const [slipModalOpen, setSlipModalOpen] = (0, import_react104.useState)(false);
21426
- const popularFileNumbers = [
21427
- "FC-2026-0120",
21428
- "FC-2026-0142",
21429
- "FC-2026-0145",
21430
- "FC-2026-0112",
21431
- "FC-2026-0153",
21432
- "FC-2026-0128",
21433
- "FC-2026-0095"
21434
- ];
21435
- const handleTrack = (fileNoToTrack) => {
20998
+ const handleTrack = async (fileNoToTrack) => {
21436
20999
  const targetNo = (fileNoToTrack || trackQuery).trim().toUpperCase();
21437
21000
  if (!targetNo) {
21438
21001
  import_sweetalert230.default.fire({
21439
21002
  icon: "warning",
21440
21003
  title: "Please enter an Application No.",
21441
- text: "Example: FC-2026-0120 or select one from quick chips.",
21004
+ text: "Enter an application or file number to search.",
21442
21005
  confirmButtonColor: "#2563eb"
21443
21006
  });
21444
21007
  return;
21445
21008
  }
21446
- setIsSearching(true);
21447
- setTimeout(() => {
21448
- setIsSearching(false);
21449
- const matched = APPLICATION_DATABASE.find(
21450
- (app) => app.fileNumber.toUpperCase() === targetNo || app.fileNumber.toUpperCase().includes(targetNo)
21451
- );
21452
- if (matched) {
21453
- setSelectedApplication(matched);
21454
- setTrackQuery(matched.fileNumber);
21455
- setViewMode("tracker");
21456
- import_sweetalert230.default.fire({
21457
- icon: "success",
21458
- title: "Application Found",
21459
- text: `${matched.fileNumber} (${matched.workflowName})`,
21460
- toast: true,
21461
- position: "top-end",
21462
- timer: 1800,
21463
- showConfirmButton: false
21464
- });
21465
- } else {
21466
- const synthesizedApp = {
21467
- fileId: Date.now(),
21468
- fileNumber: targetNo,
21469
- subject: `General Regulatory & Administrative Filing for ${targetNo}`,
21470
- workflowName: "Citizen & Enterprise Service Clearance",
21471
- department: "General Administration",
21472
- applicant: "Registered Enterprise Applicant",
21473
- category: "General Application",
21474
- financialYear: "2026-27",
21475
- sender: "Registered Enterprise Applicant",
21476
- priority: "Medium",
21477
- receivedDate: "07-Oct-2026 10:00 AM",
21478
- dueDate: "15-Oct-2026",
21479
- slaStatus: "Running (8d left)",
21480
- status: "Under Scrutiny",
21481
- assignedTo: "Pankaj Jain (Reviewer)",
21482
- currentStep: "Document Verification & Initial Scrutiny",
21483
- progressPercent: 40,
21484
- stages: [
21485
- {
21486
- stageId: 1,
21487
- title: "Application Registration",
21488
- description: `Application ${targetNo} registered successfully.`,
21489
- status: "completed",
21490
- date: "07-Oct-2026 10:00 AM",
21491
- officer: "System Gateway"
21492
- },
21493
- {
21494
- stageId: 2,
21495
- title: "Scrutiny & Verification",
21496
- description: "Reviewer checking attached documents.",
21497
- status: "in-progress",
21498
- date: "Running (Active)",
21499
- officer: "Pankaj Jain (Reviewer)"
21500
- },
21501
- {
21502
- stageId: 3,
21503
- title: "Competent Authority Decision",
21504
- description: "Final approval by department directorate.",
21505
- status: "pending",
21506
- date: "Pending Stage 2",
21507
- officer: "Designated Authority"
21508
- }
21509
- ],
21510
- movementHistory: [
21511
- {
21512
- id: 1,
21513
- fromStep: "Portal Inward Desk",
21514
- toStep: "Central Review Cell",
21515
- action: "Submitted & Allocated",
21516
- officer: "System Router",
21517
- timestamp: "07-Oct-2026 10:00 AM",
21518
- remarks: `Application ${targetNo} received and queued for review.`
21519
- }
21520
- ],
21521
- documents: [
21522
- { name: "Registration Acknowledgement", type: "PDF", size: "850 KB", status: "Verified" }
21523
- ]
21524
- };
21525
- setSelectedApplication(synthesizedApp);
21526
- setTrackQuery(targetNo);
21527
- setViewMode("tracker");
21528
- import_sweetalert230.default.fire({
21529
- icon: "info",
21530
- title: "Application Loaded",
21531
- text: `Application ${targetNo} loaded in tracking dashboard.`,
21532
- toast: true,
21533
- position: "top-end",
21534
- timer: 2e3,
21535
- showConfirmButton: false
21536
- });
21537
- }
21538
- }, 200);
21009
+ setTrackQuery(targetNo);
21010
+ setSelectedApplication(null);
21011
+ await import_sweetalert230.default.fire({
21012
+ icon: "warning",
21013
+ title: "Tracking API is not configured",
21014
+ text: "No tracking endpoint is configured, so application data cannot be loaded.",
21015
+ confirmButtonColor: "#2563eb"
21016
+ });
21539
21017
  };
21540
21018
  const handleCopyFileNumber = (no) => {
21541
21019
  navigator.clipboard.writeText(no);
@@ -21627,22 +21105,7 @@ function TrackApplicationMain() {
21627
21105
  ] })
21628
21106
  ] }),
21629
21107
  /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-3 fc:shrink-0", children: [
21630
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("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: [
21631
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:relative fc:shrink-0", children: [
21632
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "fc:w-9 fc:h-9 fc:rounded-xl fc:bg-gradient-to-br fc:from-blue-600 fc:to-indigo-600 fc:text-white fc:font-extrabold fc:text-xs fc:flex fc:items-center fc:justify-center fc:shadow-sm", children: "PJ" }),
21633
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:absolute fc:-bottom-0.5 fc:-right-0.5 fc:w-2.5 fc:h-2.5 fc:bg-emerald-500 fc:border-2 fc:border-white fc:rounded-full" })
21634
- ] }),
21635
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:flex-col fc:justify-center", children: [
21636
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2", children: [
21637
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-extrabold fc:text-slate-800", children: "Pankaj Jain" }),
21638
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("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" })
21639
- ] }),
21640
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-1.5 fc:mt-0.5", children: [
21641
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:text-slate-400 fc:font-medium", children: "Active Step:" }),
21642
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("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" })
21643
- ] })
21644
- ] })
21645
- ] }),
21108
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("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" }),
21646
21109
  /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21647
21110
  "button",
21648
21111
  {
@@ -21656,412 +21119,400 @@ function TrackApplicationMain() {
21656
21119
  ] })
21657
21120
  ] })
21658
21121
  ] }),
21659
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-white fc:border fc:border-slate-200 fc:rounded-2xl fc:p-3.5 fc:shadow-sm", children: [
21660
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:flex-col lg:fc:flex-row lg:fc:items-center lg:fc:justify-between fc:gap-3", children: [
21661
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("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: [
21662
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21663
- "button",
21122
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "fc:bg-white fc:border fc:border-slate-200 fc:rounded-2xl fc:p-3.5 fc:shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:flex-col lg:fc:flex-row lg:fc:items-center lg:fc:justify-between fc:gap-3", children: [
21123
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("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: [
21124
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21125
+ "button",
21126
+ {
21127
+ type: "button",
21128
+ onClick: () => setViewMode("tracker"),
21129
+ 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"}`,
21130
+ children: [
21131
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiRouteLine, { size: 15 }),
21132
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Tracking Dashboard" })
21133
+ ]
21134
+ }
21135
+ ),
21136
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21137
+ "button",
21138
+ {
21139
+ type: "button",
21140
+ onClick: () => setViewMode("registry"),
21141
+ 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"}`,
21142
+ children: [
21143
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiFileListLine, { size: 15 }),
21144
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Applications Registry" }),
21145
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21146
+ "span",
21147
+ {
21148
+ 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"}`,
21149
+ children: APPLICATION_DATABASE.length
21150
+ }
21151
+ )
21152
+ ]
21153
+ }
21154
+ )
21155
+ ] }),
21156
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:flex-1 lg:fc:max-w-md", children: [
21157
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:relative fc:flex-1", children: [
21158
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:absolute fc:left-3 fc:top-1/2 fc:-translate-y-1/2 fc:text-slate-400", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiSearchLine, { size: 16 }) }),
21159
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21160
+ "input",
21664
21161
  {
21665
- type: "button",
21666
- onClick: () => setViewMode("tracker"),
21667
- 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"}`,
21668
- children: [
21669
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiRouteLine, { size: 15 }),
21670
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Tracking Dashboard" })
21671
- ]
21162
+ type: "text",
21163
+ value: trackQuery,
21164
+ onChange: (e) => setTrackQuery(e.target.value),
21165
+ onKeyDown: (e) => e.key === "Enter" && handleTrack(),
21166
+ placeholder: "Enter App No. / File No.",
21167
+ 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"
21672
21168
  }
21673
21169
  ),
21674
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21170
+ trackQuery && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21675
21171
  "button",
21676
21172
  {
21677
21173
  type: "button",
21678
- onClick: () => setViewMode("registry"),
21679
- 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"}`,
21680
- children: [
21681
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiFileListLine, { size: 15 }),
21682
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Applications Registry" }),
21683
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21684
- "span",
21685
- {
21686
- 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"}`,
21687
- children: APPLICATION_DATABASE.length
21688
- }
21689
- )
21690
- ]
21174
+ onClick: () => setTrackQuery(""),
21175
+ 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",
21176
+ children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiCloseLine, { size: 14 })
21691
21177
  }
21692
21178
  )
21693
21179
  ] }),
21694
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:flex-1 lg:fc:max-w-md", children: [
21695
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:relative fc:flex-1", children: [
21696
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:absolute fc:left-3 fc:top-1/2 fc:-translate-y-1/2 fc:text-slate-400", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiSearchLine, { size: 16 }) }),
21697
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21698
- "input",
21699
- {
21700
- type: "text",
21701
- value: trackQuery,
21702
- onChange: (e) => setTrackQuery(e.target.value),
21703
- onKeyDown: (e) => e.key === "Enter" && handleTrack(),
21704
- placeholder: "Enter App No. / File No. (e.g. FC-2026-0120)...",
21705
- 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"
21706
- }
21707
- ),
21708
- trackQuery && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21709
- "button",
21710
- {
21711
- type: "button",
21712
- onClick: () => setTrackQuery(""),
21713
- 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",
21714
- children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiCloseLine, { size: 14 })
21715
- }
21716
- )
21717
- ] }),
21718
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21719
- "button",
21720
- {
21721
- type: "button",
21722
- onClick: () => handleTrack(),
21723
- disabled: isSearching,
21724
- 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",
21725
- children: isSearching ? /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
21726
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("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" }),
21727
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Tracking..." })
21728
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
21729
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiRouteLine, { size: 14 }),
21730
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Track Now" })
21731
- ] })
21732
- }
21733
- )
21734
- ] })
21735
- ] }),
21736
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("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: [
21737
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:tracking-wider fc:mr-1", children: "Quick Track:" }),
21738
- popularFileNumbers.map((no) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21180
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21739
21181
  "button",
21740
21182
  {
21741
21183
  type: "button",
21742
- onClick: () => handleTrack(no),
21743
- 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"}`,
21744
- children: no
21745
- },
21746
- no
21747
- ))
21184
+ onClick: () => handleTrack(),
21185
+ 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",
21186
+ children: [
21187
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiRouteLine, { size: 14 }),
21188
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Track Now" })
21189
+ ]
21190
+ }
21191
+ )
21748
21192
  ] })
21749
- ] }),
21193
+ ] }) }),
21750
21194
  /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("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" ? (
21751
21195
  /* ========================================================
21752
21196
  VIEW 1: LIVE TRACKING DASHBOARD
21753
21197
  ======================================================== */
21754
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "fc:space-y-4", children: selectedApplication && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
21755
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("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: [
21756
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-3 fc:flex-wrap", children: [
21757
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:flex-wrap", children: [
21758
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:inline-flex fc:items-center fc:gap-1.5 fc:bg-blue-600 fc:text-white fc:text-xs fc:font-bold fc:px-3 fc:py-1 fc:rounded-lg fc:shadow-sm", children: [
21759
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiRouteLine, { size: 13 }),
21760
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { children: [
21761
- "App No: ",
21762
- selectedApplication.fileNumber
21198
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:space-y-4", children: [
21199
+ selectedApplication && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
21200
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("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: [
21201
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-3 fc:flex-wrap", children: [
21202
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2 fc:flex-wrap", children: [
21203
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:inline-flex fc:items-center fc:gap-1.5 fc:bg-blue-600 fc:text-white fc:text-xs fc:font-bold fc:px-3 fc:py-1 fc:rounded-lg fc:shadow-sm", children: [
21204
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiRouteLine, { size: 13 }),
21205
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { children: [
21206
+ "App No: ",
21207
+ selectedApplication.fileNumber
21208
+ ] })
21209
+ ] }),
21210
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21211
+ "button",
21212
+ {
21213
+ type: "button",
21214
+ onClick: () => handleCopyFileNumber(selectedApplication.fileNumber),
21215
+ title: "Copy Application Number",
21216
+ 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",
21217
+ children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiFileCopyLine, { size: 14 })
21218
+ }
21219
+ ),
21220
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-bold fc:px-2.5 fc:py-0.5 fc:rounded-full fc:bg-white fc:border fc:border-slate-200 fc:text-slate-800", children: selectedApplication.workflowName }),
21221
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21222
+ "span",
21223
+ {
21224
+ 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"}`,
21225
+ children: [
21226
+ selectedApplication.priority,
21227
+ " Priority"
21228
+ ]
21229
+ }
21230
+ ),
21231
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("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: [
21232
+ "Status: ",
21233
+ selectedApplication.status
21763
21234
  ] })
21764
21235
  ] }),
21765
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21236
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21766
21237
  "button",
21767
21238
  {
21768
21239
  type: "button",
21769
- onClick: () => handleCopyFileNumber(selectedApplication.fileNumber),
21770
- title: "Copy Application Number",
21771
- 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",
21772
- children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiFileCopyLine, { size: 14 })
21773
- }
21774
- ),
21775
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-bold fc:px-2.5 fc:py-0.5 fc:rounded-full fc:bg-white fc:border fc:border-slate-200 fc:text-slate-800", children: selectedApplication.workflowName }),
21776
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21777
- "span",
21778
- {
21779
- 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"}`,
21240
+ onClick: () => setSlipModalOpen(true),
21241
+ 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",
21780
21242
  children: [
21781
- selectedApplication.priority,
21782
- " Priority"
21243
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiPrinterLine, { size: 13 }),
21244
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Print Tracking Slip" })
21783
21245
  ]
21784
21246
  }
21785
- ),
21786
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("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: [
21787
- "Status: ",
21788
- selectedApplication.status
21789
- ] })
21247
+ )
21790
21248
  ] }),
21791
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21792
- "button",
21793
- {
21794
- type: "button",
21795
- onClick: () => setSlipModalOpen(true),
21796
- 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",
21797
- children: [
21798
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiPrinterLine, { size: 13 }),
21799
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Print Tracking Slip" })
21800
- ]
21801
- }
21802
- )
21803
- ] }),
21804
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "fc:mt-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("h2", { className: "fc:text-base fc:font-bold fc:text-slate-800 fc:leading-snug", children: selectedApplication.subject }) }),
21805
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-3 fc:mt-2.5 fc:pt-2.5 fc:border-t fc:border-blue-100/70 fc:text-xs fc:text-slate-600 fc:flex-wrap", children: [
21806
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-4 fc:flex-wrap", children: [
21807
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:flex fc:items-center fc:gap-1", children: [
21808
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiBuildingLine, { size: 13, className: "fc:text-slate-400" }),
21809
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-slate-400", children: "Dept:" }),
21810
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { className: "fc:text-slate-700", children: selectedApplication.department })
21811
- ] }),
21812
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:flex fc:items-center fc:gap-1", children: [
21813
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiUserLine, { size: 13, className: "fc:text-slate-400" }),
21814
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-slate-400", children: "Applicant:" }),
21815
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { className: "fc:text-slate-700", children: selectedApplication.applicant })
21249
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "fc:mt-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("h2", { className: "fc:text-base fc:font-bold fc:text-slate-800 fc:leading-snug", children: selectedApplication.subject }) }),
21250
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-3 fc:mt-2.5 fc:pt-2.5 fc:border-t fc:border-blue-100/70 fc:text-xs fc:text-slate-600 fc:flex-wrap", children: [
21251
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-4 fc:flex-wrap", children: [
21252
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:flex fc:items-center fc:gap-1", children: [
21253
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiBuildingLine, { size: 13, className: "fc:text-slate-400" }),
21254
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-slate-400", children: "Dept:" }),
21255
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { className: "fc:text-slate-700", children: selectedApplication.department })
21256
+ ] }),
21257
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:flex fc:items-center fc:gap-1", children: [
21258
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiUserLine, { size: 13, className: "fc:text-slate-400" }),
21259
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-slate-400", children: "Applicant:" }),
21260
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { className: "fc:text-slate-700", children: selectedApplication.applicant })
21261
+ ] }),
21262
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:flex fc:items-center fc:gap-1", children: [
21263
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiTimeLine, { size: 13, className: "fc:text-slate-400" }),
21264
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-slate-400", children: "Submitted:" }),
21265
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { className: "fc:text-slate-700", children: selectedApplication.receivedDate })
21266
+ ] })
21816
21267
  ] }),
21817
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:flex fc:items-center fc:gap-1", children: [
21818
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiTimeLine, { size: 13, className: "fc:text-slate-400" }),
21819
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-slate-400", children: "Submitted:" }),
21820
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { className: "fc:text-slate-700", children: selectedApplication.receivedDate })
21268
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-1.5", children: [
21269
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-slate-400", children: "SLA:" }),
21270
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { className: "fc:text-red-600 fc:font-extrabold", children: selectedApplication.slaStatus }),
21271
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:text-slate-400", children: [
21272
+ "\u2022 Due: ",
21273
+ selectedApplication.dueDate
21274
+ ] })
21821
21275
  ] })
21822
21276
  ] }),
21823
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-1.5", children: [
21824
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-slate-400", children: "SLA:" }),
21825
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { className: "fc:text-red-600 fc:font-extrabold", children: selectedApplication.slaStatus }),
21826
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:text-slate-400", children: [
21827
- "\u2022 Due: ",
21828
- selectedApplication.dueDate
21829
- ] })
21277
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:mt-2.5 fc:pt-2 fc:border-t fc:border-blue-100/50", children: [
21278
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:justify-between fc:items-center fc:text-[11px] fc:mb-1", children: [
21279
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:font-bold fc:text-slate-600", children: [
21280
+ "Lifecycle Progress: ",
21281
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("strong", { children: [
21282
+ selectedApplication.progressPercent || 50,
21283
+ "% Completed"
21284
+ ] })
21285
+ ] }),
21286
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:font-bold fc:text-indigo-600", children: [
21287
+ "Active Desk: ",
21288
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { children: selectedApplication.assignedTo || "Central Scrutiny Cell" })
21289
+ ] })
21290
+ ] }),
21291
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "fc:w-full fc:bg-slate-200/80 fc:h-1.5 fc:rounded-full fc:overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21292
+ "div",
21293
+ {
21294
+ 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",
21295
+ style: { width: `${selectedApplication.progressPercent || 50}%` }
21296
+ }
21297
+ ) })
21830
21298
  ] })
21831
21299
  ] }),
21832
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:mt-2.5 fc:pt-2 fc:border-t fc:border-blue-100/50", children: [
21833
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:justify-between fc:items-center fc:text-[11px] fc:mb-1", children: [
21834
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:font-bold fc:text-slate-600", children: [
21835
- "Lifecycle Progress: ",
21836
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("strong", { children: [
21837
- selectedApplication.progressPercent || 50,
21838
- "% Completed"
21839
- ] })
21300
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50/70 fc:border fc:border-slate-200 fc:rounded-2xl fc:p-3.5", children: [
21301
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:mb-2.5", children: [
21302
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2", children: [
21303
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "fc:w-2 fc:h-2 fc:rounded-full fc:bg-blue-600" }),
21304
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("h3", { className: "fc:text-xs fc:font-bold fc:text-slate-800 fc:uppercase fc:tracking-wider", children: "Workflow Progression Stages" })
21840
21305
  ] }),
21841
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:font-bold fc:text-indigo-600", children: [
21842
- "Active Desk: ",
21843
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { children: selectedApplication.assignedTo || "Central Scrutiny Cell" })
21306
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:text-xs fc:text-slate-500", children: [
21307
+ "Current Step: ",
21308
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { className: "fc:text-indigo-600", children: selectedApplication.currentStep })
21844
21309
  ] })
21845
21310
  ] }),
21846
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "fc:w-full fc:bg-slate-200/80 fc:h-1.5 fc:rounded-full fc:overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21311
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21847
21312
  "div",
21848
21313
  {
21849
- 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",
21850
- style: { width: `${selectedApplication.progressPercent || 50}%` }
21851
- }
21852
- ) })
21853
- ] })
21854
- ] }),
21855
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50/70 fc:border fc:border-slate-200 fc:rounded-2xl fc:p-3.5", children: [
21856
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:mb-2.5", children: [
21857
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2", children: [
21858
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "fc:w-2 fc:h-2 fc:rounded-full fc:bg-blue-600" }),
21859
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("h3", { className: "fc:text-xs fc:font-bold fc:text-slate-800 fc:uppercase fc:tracking-wider", children: "Workflow Progression Stages" })
21860
- ] }),
21861
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:text-xs fc:text-slate-500", children: [
21862
- "Current Step: ",
21863
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { className: "fc:text-indigo-600", children: selectedApplication.currentStep })
21864
- ] })
21865
- ] }),
21866
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21867
- "div",
21868
- {
21869
- className: "fc:grid fc:gap-2 fc:items-stretch",
21870
- style: {
21871
- gridTemplateColumns: `repeat(${((_a = selectedApplication.stages) == null ? void 0 : _a.length) || 4}, minmax(0, 1fr))`
21872
- },
21873
- children: (selectedApplication.stages || []).map((stage, idx) => {
21874
- const isCompleted = stage.status === "completed";
21875
- const isInProgress = stage.status === "in-progress";
21876
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21877
- "div",
21878
- {
21879
- 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"}`,
21880
- children: [
21881
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-1 fc:mb-1.5", children: [
21882
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21883
- "span",
21884
- {
21885
- 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"}`,
21886
- children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiCheckLine, { size: 12 }) : idx + 1
21887
- }
21888
- ),
21889
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21890
- "span",
21891
- {
21892
- 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"}`,
21893
- children: isCompleted ? "Completed" : isInProgress ? "Active Step" : "Pending"
21894
- }
21895
- )
21896
- ] }),
21897
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { children: [
21898
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21899
- "h4",
21900
- {
21901
- className: "fc:text-[11px] fc:font-bold fc:text-slate-800 fc:truncate",
21902
- title: stage.title,
21903
- children: stage.title
21904
- }
21905
- ),
21906
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21907
- "p",
21908
- {
21909
- className: "fc:text-[10px] fc:text-slate-500 fc:truncate fc:mt-0.5",
21910
- title: stage.description,
21911
- children: stage.description
21912
- }
21913
- )
21914
- ] }),
21915
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("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: [
21916
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:truncate", title: stage.officer, children: stage.officer }),
21917
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:font-medium fc:text-slate-500 fc:shrink-0", children: stage.date.split(" ")[0] })
21918
- ] })
21919
- ]
21920
- },
21921
- stage.stageId || idx
21922
- );
21923
- })
21924
- }
21925
- )
21926
- ] }),
21927
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-white fc:border fc:border-slate-200 fc:rounded-2xl fc:overflow-hidden", children: [
21928
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("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: [
21929
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21930
- "button",
21931
- {
21932
- type: "button",
21933
- onClick: () => setActiveTab("timeline"),
21934
- 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"}`,
21935
- children: [
21936
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiRouteLine, { size: 14 }),
21937
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Movement History & Audit Trail" }),
21938
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:bg-slate-200 fc:text-slate-700 fc:px-1.5 fc:py-0.2 fc:rounded-full fc:text-[9px]", children: ((_b = selectedApplication.movementHistory) == null ? void 0 : _b.length) || 0 })
21939
- ]
21940
- }
21941
- ),
21942
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21943
- "button",
21944
- {
21945
- type: "button",
21946
- onClick: () => setActiveTab("details"),
21947
- 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"}`,
21948
- children: [
21949
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiFileListLine, { size: 14 }),
21950
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Application Full Attributes" })
21951
- ]
21952
- }
21953
- ),
21954
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21955
- "button",
21956
- {
21957
- type: "button",
21958
- onClick: () => setActiveTab("documents"),
21959
- 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"}`,
21960
- children: [
21961
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiFileTextLine, { size: 14 }),
21962
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Uploaded Documents" }),
21963
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:bg-slate-200 fc:text-slate-700 fc:px-1.5 fc:py-0.2 fc:rounded-full fc:text-[9px]", children: ((_c = selectedApplication.documents) == null ? void 0 : _c.length) || 0 })
21964
- ]
21314
+ className: "fc:grid fc:gap-2 fc:items-stretch",
21315
+ style: {
21316
+ gridTemplateColumns: `repeat(${((_a = selectedApplication.stages) == null ? void 0 : _a.length) || 4}, minmax(0, 1fr))`
21317
+ },
21318
+ children: (selectedApplication.stages || []).map((stage, idx) => {
21319
+ const isCompleted = stage.status === "completed";
21320
+ const isInProgress = stage.status === "in-progress";
21321
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21322
+ "div",
21323
+ {
21324
+ 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"}`,
21325
+ children: [
21326
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-1 fc:mb-1.5", children: [
21327
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21328
+ "span",
21329
+ {
21330
+ 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"}`,
21331
+ children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiCheckLine, { size: 12 }) : idx + 1
21332
+ }
21333
+ ),
21334
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21335
+ "span",
21336
+ {
21337
+ 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"}`,
21338
+ children: isCompleted ? "Completed" : isInProgress ? "Active Step" : "Pending"
21339
+ }
21340
+ )
21341
+ ] }),
21342
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { children: [
21343
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21344
+ "h4",
21345
+ {
21346
+ className: "fc:text-[11px] fc:font-bold fc:text-slate-800 fc:truncate",
21347
+ title: stage.title,
21348
+ children: stage.title
21349
+ }
21350
+ ),
21351
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
21352
+ "p",
21353
+ {
21354
+ className: "fc:text-[10px] fc:text-slate-500 fc:truncate fc:mt-0.5",
21355
+ title: stage.description,
21356
+ children: stage.description
21357
+ }
21358
+ )
21359
+ ] }),
21360
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("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: [
21361
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:truncate", title: stage.officer, children: stage.officer }),
21362
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:font-medium fc:text-slate-500 fc:shrink-0", children: stage.date.split(" ")[0] })
21363
+ ] })
21364
+ ]
21365
+ },
21366
+ stage.stageId || idx
21367
+ );
21368
+ })
21965
21369
  }
21966
21370
  )
21967
21371
  ] }),
21968
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:p-4", children: [
21969
- activeTab === "timeline" && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "fc:space-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("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__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:relative fc:space-y-1", children: [
21970
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("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" }),
21971
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-2 fc:flex-wrap", children: [
21972
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2", children: [
21973
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-bold fc:text-slate-800", children: move.action }),
21974
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:text-[11px] fc:text-slate-500", children: [
21975
- "(",
21976
- move.fromStep,
21977
- " \u2192 ",
21978
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { className: "fc:text-blue-600", children: move.toStep }),
21372
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-white fc:border fc:border-slate-200 fc:rounded-2xl fc:overflow-hidden", children: [
21373
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("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: [
21374
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21375
+ "button",
21376
+ {
21377
+ type: "button",
21378
+ onClick: () => setActiveTab("timeline"),
21379
+ 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"}`,
21380
+ children: [
21381
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiRouteLine, { size: 14 }),
21382
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Movement History & Audit Trail" }),
21383
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:bg-slate-200 fc:text-slate-700 fc:px-1.5 fc:py-0.2 fc:rounded-full fc:text-[9px]", children: ((_b = selectedApplication.movementHistory) == null ? void 0 : _b.length) || 0 })
21384
+ ]
21385
+ }
21386
+ ),
21387
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21388
+ "button",
21389
+ {
21390
+ type: "button",
21391
+ onClick: () => setActiveTab("details"),
21392
+ 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"}`,
21393
+ children: [
21394
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiFileListLine, { size: 14 }),
21395
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Application Full Attributes" })
21396
+ ]
21397
+ }
21398
+ ),
21399
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21400
+ "button",
21401
+ {
21402
+ type: "button",
21403
+ onClick: () => setActiveTab("documents"),
21404
+ 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"}`,
21405
+ children: [
21406
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiFileTextLine, { size: 14 }),
21407
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Uploaded Documents" }),
21408
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:bg-slate-200 fc:text-slate-700 fc:px-1.5 fc:py-0.2 fc:rounded-full fc:text-[9px]", children: ((_c = selectedApplication.documents) == null ? void 0 : _c.length) || 0 })
21409
+ ]
21410
+ }
21411
+ )
21412
+ ] }),
21413
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:p-4", children: [
21414
+ activeTab === "timeline" && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "fc:space-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("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__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:relative fc:space-y-1", children: [
21415
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("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" }),
21416
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:gap-2 fc:flex-wrap", children: [
21417
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2", children: [
21418
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-bold fc:text-slate-800", children: move.action }),
21419
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:text-[11px] fc:text-slate-500", children: [
21420
+ "(",
21421
+ move.fromStep,
21422
+ " \u2192 ",
21423
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { className: "fc:text-blue-600", children: move.toStep }),
21424
+ ")"
21425
+ ] })
21426
+ ] }),
21427
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400", children: move.timestamp })
21428
+ ] }),
21429
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("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: [
21430
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { children: "Remarks:" }),
21431
+ " ",
21432
+ move.remarks
21433
+ ] }),
21434
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:text-[10px] fc:text-slate-400", children: [
21435
+ "Action Officer: ",
21436
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { children: move.officer })
21437
+ ] })
21438
+ ] }, move.id || idx)) }) }),
21439
+ activeTab === "details" && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:grid fc:grid-cols-1 md:fc:grid-cols-3 fc:gap-3 fc:text-xs", children: [
21440
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21441
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Application / File Number" }),
21442
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-bold fc:text-blue-600 fc:mt-0.5 fc:block", children: selectedApplication.fileNumber })
21443
+ ] }),
21444
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21445
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Workflow Name" }),
21446
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.workflowName })
21447
+ ] }),
21448
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21449
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Department / Ministry" }),
21450
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.department })
21451
+ ] }),
21452
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21453
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Applicant / Originator Entity" }),
21454
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.applicant })
21455
+ ] }),
21456
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21457
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Proposal Category" }),
21458
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.category })
21459
+ ] }),
21460
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21461
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Financial Year" }),
21462
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.financialYear })
21463
+ ] }),
21464
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21465
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Received Timestamp" }),
21466
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.receivedDate })
21467
+ ] }),
21468
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21469
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Target SLA Due Date" }),
21470
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:text-xs fc:font-bold fc:text-red-600 fc:mt-0.5 fc:block", children: [
21471
+ selectedApplication.dueDate,
21472
+ " (",
21473
+ selectedApplication.slaStatus,
21979
21474
  ")"
21980
21475
  ] })
21981
21476
  ] }),
21982
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400", children: move.timestamp })
21983
- ] }),
21984
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("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: [
21985
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { children: "Remarks:" }),
21986
- " ",
21987
- move.remarks
21988
- ] }),
21989
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:text-[10px] fc:text-slate-400", children: [
21990
- "Action Officer: ",
21991
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("strong", { children: move.officer })
21992
- ] })
21993
- ] }, move.id || idx)) }) }),
21994
- activeTab === "details" && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:grid fc:grid-cols-1 md:fc:grid-cols-3 fc:gap-3 fc:text-xs", children: [
21995
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21996
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Application / File Number" }),
21997
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-bold fc:text-blue-600 fc:mt-0.5 fc:block", children: selectedApplication.fileNumber })
21998
- ] }),
21999
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
22000
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Workflow Name" }),
22001
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.workflowName })
22002
- ] }),
22003
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
22004
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Department / Ministry" }),
22005
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.department })
22006
- ] }),
22007
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
22008
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Applicant / Originator Entity" }),
22009
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.applicant })
22010
- ] }),
22011
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
22012
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Proposal Category" }),
22013
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.category })
22014
- ] }),
22015
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
22016
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Financial Year" }),
22017
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.financialYear })
22018
- ] }),
22019
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
22020
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Received Timestamp" }),
22021
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-xs fc:font-semibold fc:text-slate-800 fc:mt-0.5 fc:block", children: selectedApplication.receivedDate })
22022
- ] }),
22023
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
22024
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Target SLA Due Date" }),
22025
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:text-xs fc:font-bold fc:text-red-600 fc:mt-0.5 fc:block", children: [
22026
- selectedApplication.dueDate,
22027
- " (",
22028
- selectedApplication.slaStatus,
22029
- ")"
21477
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
21478
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Current Active Desk" }),
21479
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:text-xs fc:font-bold fc:text-indigo-600 fc:mt-0.5 fc:block", children: [
21480
+ selectedApplication.assignedTo,
21481
+ " (",
21482
+ selectedApplication.currentStep,
21483
+ ")"
21484
+ ] })
22030
21485
  ] })
22031
21486
  ] }),
22032
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:bg-slate-50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
22033
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "fc:text-[10px] fc:font-bold fc:text-slate-400 fc:uppercase fc:block", children: "Current Active Desk" }),
22034
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:text-xs fc:font-bold fc:text-indigo-600 fc:mt-0.5 fc:block", children: [
22035
- selectedApplication.assignedTo,
22036
- " (",
22037
- selectedApplication.currentStep,
22038
- ")"
22039
- ] })
22040
- ] })
22041
- ] }),
22042
- activeTab === "documents" && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "fc:grid fc:grid-cols-1 md:fc:grid-cols-2 fc:gap-3", children: (selectedApplication.documents || []).map((doc, i) => /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
22043
- "div",
22044
- {
22045
- 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",
22046
- children: [
22047
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2.5", children: [
22048
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("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 }),
22049
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { children: [
22050
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("h5", { className: "fc:text-xs fc:font-bold fc:text-slate-800", children: doc.name }),
22051
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:text-[10px] fc:text-slate-400", children: [
22052
- "Size: ",
22053
- doc.size
21487
+ activeTab === "documents" && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "fc:grid fc:grid-cols-1 md:fc:grid-cols-2 fc:gap-3", children: (selectedApplication.documents || []).map((doc, i) => /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
21488
+ "div",
21489
+ {
21490
+ 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",
21491
+ children: [
21492
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2.5", children: [
21493
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("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 }),
21494
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { children: [
21495
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("h5", { className: "fc:text-xs fc:font-bold fc:text-slate-800", children: doc.name }),
21496
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "fc:text-[10px] fc:text-slate-400", children: [
21497
+ "Size: ",
21498
+ doc.size
21499
+ ] })
22054
21500
  ] })
22055
- ] })
22056
- ] }),
22057
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("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 })
22058
- ]
22059
- },
22060
- i
22061
- )) })
21501
+ ] }),
21502
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("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 })
21503
+ ]
21504
+ },
21505
+ i
21506
+ )) })
21507
+ ] })
22062
21508
  ] })
21509
+ ] }),
21510
+ !selectedApplication && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "fc:flex fc:min-h-72 fc:flex-col fc:items-center fc:justify-center fc:gap-2 fc:text-center", children: [
21511
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react105.RiRouteLine, { size: 28, className: "fc:text-slate-300" }),
21512
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("h2", { className: "fc:text-sm fc:font-bold fc:text-slate-700", children: "No tracking data available" }),
21513
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("p", { className: "fc:max-w-md fc:text-xs fc:text-slate-500", children: "Configure the application tracking endpoint to load real application status and movement details." })
22063
21514
  ] })
22064
- ] }) })
21515
+ ] })
22065
21516
  ) : (
22066
21517
  /* ========================================================
22067
21518
  VIEW 2: APPLICATIONS REGISTRY TABLE (MATCHING INBOX TABLE)