From b0b9327c9e21317e7816e71074eb1e465bfb181e Mon Sep 17 00:00:00 2001 From: Oussama El Benney Date: Tue, 16 Jul 2024 15:03:53 +0100 Subject: [PATCH] fixed booked users tables and login ui --- .../(dashboard)/assign-zone-project/page.jsx | 2 +- .../BookedUsersTable.jsx | 4 +- .../consultation-reservations/page.jsx | 77 +++++++++++-------- src/app/auth/login/page.jsx | 15 ++-- 4 files changed, 56 insertions(+), 42 deletions(-) diff --git a/src/app/(dashboard)/assign-zone-project/page.jsx b/src/app/(dashboard)/assign-zone-project/page.jsx index c9484c0..f3e0a85 100644 --- a/src/app/(dashboard)/assign-zone-project/page.jsx +++ b/src/app/(dashboard)/assign-zone-project/page.jsx @@ -309,7 +309,7 @@ const AffectingZoneProject = () => { }} { (listProjectsSemiAffected && listProjectsSemiAffected.length) ?
-
diff --git a/src/app/(dashboard)/consultation-reservations/BookedUsersTable.jsx b/src/app/(dashboard)/consultation-reservations/BookedUsersTable.jsx index f16e486..ad6fc10 100644 --- a/src/app/(dashboard)/consultation-reservations/BookedUsersTable.jsx +++ b/src/app/(dashboard)/consultation-reservations/BookedUsersTable.jsx @@ -9,12 +9,12 @@ const BookedUsersTable = ({bookedPlaces, presence}) => {
{presence && } {!presence && } diff --git a/src/app/(dashboard)/consultation-reservations/page.jsx b/src/app/(dashboard)/consultation-reservations/page.jsx index e56a7da..a1ce7ba 100644 --- a/src/app/(dashboard)/consultation-reservations/page.jsx +++ b/src/app/(dashboard)/consultation-reservations/page.jsx @@ -331,7 +331,7 @@ const Reservation = () => { onClick={() => { setSelectedZone({floorId: null, zoneId: null}) setNameProjectFilter("") - } } + }} >

Réinitialiser

@@ -362,40 +362,49 @@ const Reservation = () => { {(selectedZone.floorId && !isLoadingData) &&
- {!(floors.find((element) => element.id == selectedZone.floorId).image) ?
-
-
- - Aucune Illustration fournie pour cet étage + {!(floors.find((element) => element.id == selectedZone.floorId).image) ? +
+
+
+ + Aucune Illustration fournie pour cet étage +
-
- : -
- element.id == selectedZone.floorId).image} className='w-full [aspect-ratio:2.5]'> -
+ : +
+ element.id == selectedZone.floorId).image} + className='w-full [aspect-ratio:2.5]'> +
} - {(!isLoadingData) &&
- {/*selectedZone.floorId*/} - {floors.filter((element) => element.id == selectedZone.floorId).map((floor, index) => { - return floor.zones?.map((zone, index) => { - if (selectedZone.zoneId == zone.id && selectedZone.floorId == floor.id) return
setSelectedZone({floorId: floor.id, zoneId: zone.id})} - key={index} - className='rounded-md not-first:-left-2 text-white relative whitespace-nowrap flex items-center justify-center border border-[#B2CEDE] text-xs md:text-sm lg:text-base px-5 lg:px-10 h-9 bg-[#B2CEDE]'> -

Etage {floor.numero} - Zone {zone.nom}

-
- return
setSelectedZone({floorId: floor.id, zoneId: zone.id})} - className='cursor-pointer not-first:-left-2 hover:bg-neutral-100 duration-300 rounded-md text-[#8E8D8D] relative whitespace-nowrap border flex items-center justify-center border-[#D9D9D9] text-xs md:text-sm lg:text-base lg:px-10 px-5 h-9 bg-white'> -

Etage {floor.numero} - Zone {zone.nom}

-
- }) - })} -
} + {(!isLoadingData) && +
+ {/*selectedZone.floorId*/} + {floors.filter((element) => element.id == selectedZone.floorId).map((floor, index) => { + return floor.zones?.map((zone, index) => { + if (selectedZone.zoneId == zone.id && selectedZone.floorId == floor.id) return
setSelectedZone({floorId: floor.id, zoneId: zone.id})} + key={index} + className='rounded-md not-first:-left-2 text-white relative whitespace-nowrap flex items-center justify-center border border-[#B2CEDE] text-xs md:text-sm lg:text-base px-5 lg:px-10 h-9 bg-[#B2CEDE]'> +

Etage {floor.numero} - Zone {zone.nom}

+
+ return
setSelectedZone({ + floorId: floor.id, + zoneId: zone.id + })} + className='cursor-pointer not-first:-left-2 hover:bg-neutral-100 duration-300 rounded-md text-[#8E8D8D] relative whitespace-nowrap border flex items-center justify-center border-[#D9D9D9] text-xs md:text-sm lg:text-base lg:px-10 px-5 h-9 bg-white'> +

Etage {floor.numero} - Zone {zone.nom}

+
+ }) + })} +
}
}
@@ -436,9 +445,9 @@ const Reservation = () => {
}
-
+
- +
diff --git a/src/app/auth/login/page.jsx b/src/app/auth/login/page.jsx index 62afb33..690dcca 100644 --- a/src/app/auth/login/page.jsx +++ b/src/app/auth/login/page.jsx @@ -17,6 +17,11 @@ const LoginPage = () => { const [messages, setMessages] = useState(''); const [isLoading, setIsLoading] = useState(false) const router = useRouter(); + const [isPasswordVisible, setIsPasswordVisible] = useState(false); + + const togglePasswordVisibility = () => { + setIsPasswordVisible(!isPasswordVisible); + }; const handleSubmit = (event) => { event.preventDefault(); @@ -62,8 +67,6 @@ const LoginPage = () => { className="w-full md:min-h-0 min-h-screen md:justify-start items-center justify-center py-14 rounded-lg flex flex-col">

Connectez-vous à notre plateforme

-

Vous n avez pas de compte ? Créer un compte -

@@ -85,15 +88,17 @@ const LoginPage = () => {
setPassword(e.target.value)} /> - +
-- GitLab