diff --git a/src/components/LogoutButton.jsx b/src/components/LogoutButton.jsx index aa248d4..9477623 100644 --- a/src/components/LogoutButton.jsx +++ b/src/components/LogoutButton.jsx @@ -26,7 +26,9 @@ function LogoutButton() { } // Supprimer le token du local storage localStorage.removeItem('token'); + localStorage.setItem('activeItem', 'inventaire'); sessionStorage.removeItem('user_id'); + setUserId(-1); setIsAuthenticated(false); // window.location.href = '/login'; diff --git a/src/components/Matos.jsx b/src/components/Matos.jsx index 5d20757..eba2e2c 100644 --- a/src/components/Matos.jsx +++ b/src/components/Matos.jsx @@ -7,6 +7,8 @@ import {MenuItem, Menu, MenuMenu} from "semantic-ui-react"; import {useEffect, useState, useContext} from "react"; import HistoryTable from "./History"; import {AuthContext} from "../context/AuthContext"; +import item4 from "../ressources/item4.png"; + @@ -28,10 +30,17 @@ function Matos(){ setActiveItem(name); }; + function handleClickMain(){ + window.location.href = '/'; + } return(<>
-

Gestion du matériel

+
+ +

Gestion du matériel

+
+ {/* menu*/} diff --git a/src/components/TableData.jsx b/src/components/TableData.jsx index c8bcd93..dd24089 100644 --- a/src/components/TableData.jsx +++ b/src/components/TableData.jsx @@ -635,7 +635,7 @@ const handleDeselectButton = () => { {item.brand} {options.find(option => option.value === item.type).text} {options2.find(option => option.value === item.state).text}} - {item.description} + {isLargeScreen? {item.description} :null} {item.power} {item.price} {item.quantity} @@ -650,7 +650,7 @@ const handleDeselectButton = () => { {convertDateFormat(item.modification_date)} : null } - {!showDeleted && userId !==2 && isAuthenticated ? + {!showDeleted && (userId !== 2) && isAuthenticated ? <> diff --git a/src/pages/Inventory.jsx b/src/pages/Inventory.jsx index 794b305..bfbb72b 100644 --- a/src/pages/Inventory.jsx +++ b/src/pages/Inventory.jsx @@ -3,6 +3,7 @@ import Matos from "../components/Matos"; function Inventory(){ return(<> +
diff --git a/src/style/Matos.css b/src/style/Matos.css index 5b6f01d..cd515a2 100644 --- a/src/style/Matos.css +++ b/src/style/Matos.css @@ -3,6 +3,8 @@ color: black; } + + p{ color: black; } @@ -115,6 +117,20 @@ p{ padding: 2%; } +.image-flyht{ + width: 30%; + height: auto; + margin-right: 2%; + cursor: pointer; +} +.top-left-wrapper{ + margin-left: -2%; + height: auto; + width: 40%; + display: flex; + flex-wrap: wrap; + justify-content: flex-start; +} @media only screen and (min-device-width : 0px) and (max-device-width : 1024px) {