diff --git a/src/App.tsx b/src/App.tsx
index 013db34..e5c926d 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -15,6 +15,7 @@ import EquipmentInstancesListPage from "./Pages/EquipmentInstancesListPage/Equip
import EquipmentListPage from "./Pages/EquipmentListPage/EquipmentListPage";
import EquipmentLogsPage from "./Pages/EquipmentLogsPage/EquipmentLogsPage";
import EquipmentInstanceLogsPage from "./Pages/EquipmentInstanceLogsPage/EquipmentInstanceLogsPage";
+import EquipmentInstancesFilteredListPage from "./Pages/EquipmentInstancesListPage/EquipmentInstancesFilteredListPage";
const queryClient = new QueryClient();
const router = createHashRouter([
@@ -48,6 +49,16 @@ const router = createHashRouter([
),
errorElement: ,
},
+ {
+ path: "/view/equipment_instances/filter/:filter_by",
+ element: (
+ <>
+
+
+ >
+ ),
+ errorElement: ,
+ },
{
path: "/view/equipment_instances/logs",
element: (
diff --git a/src/Components/API/API.tsx b/src/Components/API/API.tsx
index d410b8e..437eb24 100644
--- a/src/Components/API/API.tsx
+++ b/src/Components/API/API.tsx
@@ -17,7 +17,7 @@ import {
EquipmentInstanceLogListType,
} from "../Types/Types";
-const debug = false;
+const debug = true;
let backendURL;
if (debug) {
diff --git a/src/Pages/DashboardPage/DashboardPage.tsx b/src/Pages/DashboardPage/DashboardPage.tsx
index 92cf0f1..9d1d0e1 100644
--- a/src/Pages/DashboardPage/DashboardPage.tsx
+++ b/src/Pages/DashboardPage/DashboardPage.tsx
@@ -396,6 +396,9 @@ export default function Dashboard() {
marginLeft: "1rem",
marginRight: "1rem",
}}
+ onClick={() => {
+ navigate("/view/equipment_instances/filter/PC");
+ }}
/>
{
+ navigate("/view/equipment_instances/filter/NETWORKING");
+ }}
/>
{
+ navigate("/view/equipment_instances/filter/CCTV");
+ }}
>
{
+ navigate("/view/equipment_instances/filter/FURNITURE");
+ }}
/>
+
+
+
+ );
+ }
+ return (
+
+
+
+
+
+
+
+
+ ID
+
+ Name
+
+
+ Status
+
+
+ Category
+
+
+ Last Modified
+
+
+
+
+ {equipment_instances.data ? (
+ equipment_instances.data
+ .filter((equipment) => equipment.category === filter_by)
+ .map((equipment) => (
+ {
+ SetSelectedItem(equipment.id);
+ SetEditModalOpen(true);
+ }}
+ >
+
+ {equipment.id}
+
+
+ {equipment.equipment_name}
+
+
+
+ {equipment.status}
+
+
+ {equipment.category}
+
+
+
+
{equipment.last_updated}
+
+ {equipment.last_updated_by
+ ? "by " + equipment.last_updated_by
+ : ""}
+
+
+
+
+ ))
+ ) : (
+ <>>
+ )}
+
+
+
+
+
+
SetEditModalOpen(false)}
+ modal
+ position={"top center"}
+ contentStyle={styles.popup_center}
+ >
+
+
+
+ );
+}