diff --git a/src/app/components/TokenTable.jsx b/src/app/components/TokenTable.jsx index 73aa564..c210109 100644 --- a/src/app/components/TokenTable.jsx +++ b/src/app/components/TokenTable.jsx @@ -55,15 +55,15 @@ export default function TokenTable({ statusFilter }) { const applyFilters = (data, search) => { let filtered = data.filter((entry) => { - const matchesSearch = + const matchesSearch = entry.patientName.toLowerCase().includes(search.toLowerCase()) || entry.tokenNumber.toString().includes(search); - - const matchesFilter = - statusFilter === "all" || + + const matchesFilter = + statusFilter === "all" || entry.status === statusFilter || (statusFilter === "booked" && entry.status === "booked"); - + return matchesSearch && matchesFilter; }); setFilteredEntries(filtered); @@ -96,162 +96,153 @@ export default function TokenTable({ statusFilter }) { -// Handle theme loading state -if (darkMode === undefined) { - return ( -
- Loading... -
+ // Handle theme loading state + if (darkMode === undefined) { + return ( ++ Loading... +
++ Loading... +
- Loading... -
-Token | -Name | -Status | -Actions | -||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
{entry.tokenNumber} | -{entry.patientName} | -
-
+ No entries found.
+
+ ) : (
+ <>
+
+
+ }`}
+ >
+ Missed
+
+ >
+ )}
+
|
+