From baff7b8c657b3adf9bb528a050b9af5703e366fe Mon Sep 17 00:00:00 2001
From: Matteo Guarnaccia
Date: Tue, 23 Apr 2024 15:14:31 +0100
Subject: [PATCH] addressed comments #497
---
src/api/systems.tsx | 2 +-
.../itemsDetailsPanel.component.test.tsx.snap | 132 +++++++
.../itemsTable.component.test.tsx.snap | 342 ++++++++++++++++--
src/items/itemsDetailsPanel.component.tsx | 17 +
src/items/itemsLandingPage.component.tsx | 9 +-
src/items/itemsTable.component.test.tsx | 2 +-
src/items/itemsTable.component.tsx | 5 +-
7 files changed, 468 insertions(+), 41 deletions(-)
diff --git a/src/api/systems.tsx b/src/api/systems.tsx
index d8a7feea5..f66e7e856 100644
--- a/src/api/systems.tsx
+++ b/src/api/systems.tsx
@@ -48,7 +48,7 @@ const fetchSystems = async (parent_id?: string): Promise => {
export const useSystemIds = (ids: string[]): UseQueryResult[] => {
return useQueries({
queries: ids.map((id) => ({
- queryKey: ['Systems', id],
+ queryKey: ['System', id],
queryFn: () => fetchSystem(id),
})),
});
diff --git a/src/items/__snapshots__/itemsDetailsPanel.component.test.tsx.snap b/src/items/__snapshots__/itemsDetailsPanel.component.test.tsx.snap
index 9248fb34c..ca233fd06 100644
--- a/src/items/__snapshots__/itemsDetailsPanel.component.test.tsx.snap
+++ b/src/items/__snapshots__/itemsDetailsPanel.component.test.tsx.snap
@@ -219,6 +219,24 @@ exports[`Catalogue Items details panel > renders details panel correctly (None v
scrapped
+
@@ -739,6 +757,24 @@ exports[`Catalogue Items details panel > renders details panel correctly (no dat
inUse
+
@@ -1259,6 +1295,24 @@ exports[`Catalogue Items details panel > renders details panel correctly (when t
new
+
@@ -1779,6 +1833,24 @@ exports[`Catalogue Items details panel > renders details panel correctly 1`] = `
inUse
+
@@ -2309,6 +2381,26 @@ exports[`Catalogue Items details panel > renders manufacturer panel correctly 1`
inUse
+
@@ -2856,6 +2948,26 @@ exports[`Catalogue Items details panel > renders notes panel correctly 1`] = `
inUse
+
@@ -3403,6 +3515,26 @@ exports[`Catalogue Items details panel > renders properties panel correctly 1`]
inUse
+
diff --git a/src/items/__snapshots__/itemsTable.component.test.tsx.snap b/src/items/__snapshots__/itemsTable.component.test.tsx.snap
index 1cf5454de..47a889397 100644
--- a/src/items/__snapshots__/itemsTable.component.test.tsx.snap
+++ b/src/items/__snapshots__/itemsTable.component.test.tsx.snap
@@ -295,12 +295,12 @@ exports[`Items Table > renders correctly part 1 due column virtualisation 1`] =
Serial Number
renders correctly part 1 due column virtualisation 1`] =
d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"
/>
+
renders correctly part 1 due column virtualisation 1`] =
d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"
/>
+
renders correctly part 1 due column virtualisation 1`] =
d="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"
/>
+
@@ -632,6 +641,9 @@ exports[`Items Table > renders correctly part 1 due column virtualisation 1`] =
d="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"
/>
+
@@ -659,12 +671,12 @@ exports[`Items Table > renders correctly part 1 due column virtualisation 1`] =
Asset Number
renders correctly part 1 due column virtualisation 1`] =
d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"
/>
+
renders correctly part 1 due column virtualisation 1`] =
Purchase Order Number
renders correctly part 1 due column virtualisation 1`] =
d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"
/>
+
renders correctly part 1 due column virtualisation 1`] =
-
- No results found: Try adding an item by using the Add Item button on the top left of your screen
-
+
+
+
+ |
+
+
+ 5YUQDDjKpz2z
+
+ |
+
+ 02 Jan 2024 13:10
+ |
+
+ LyH8yp1FHf
+ |
+
+ 6JYHEjwN
+ |
+ |
+
+
+
+
+ |
+
+
+ vYs9Vxx6yWbn
+
+ |
+
+ 02 Jan 2024 13:10
+ |
+
+ 03MXnOfP5C
+ |
+
+ tIWiCOow
+ |
+ |
+
+
+
+
|
+
+
+ PcfCM1jp0SUV
+
+ |
+
+ 02 Jan 2024 13:10
+ |
+
+ dvI4GyEsFt
+ |
+
+ Qf65nCwO
+ |
+ |
+
+
+
+
+ |
+
+
+ Zf7P8Qu8TD8c
+
+ |
+
+ 02 Jan 2024 13:10
+ |
+
+ 75YWiLwy54
+ |
+
+ hpGBgi0d
+ |
+ |
renders correctly part 1 due column virtualisation 1`] =
+
+
+