From 8be45e28988c7c84e4c2cd618bb597983e2fa4ee Mon Sep 17 00:00:00 2001 From: ClawdeenFleury Date: Sat, 16 Dec 2023 15:32:28 +0100 Subject: [PATCH] DONE invitation management view --- calm-webserver/resources/css/app.css | 9 ++ calm-webserver/resources/js/app.js | 31 +++++ calm-webserver/resources/views/home.blade.php | 7 +- .../resources/views/layout/app.blade.php | 2 +- .../management/invitation/index.blade.php | 112 ++++++++++++++++++ .../management/organizations/index.blade.php | 5 + 6 files changed, 162 insertions(+), 4 deletions(-) create mode 100644 calm-webserver/resources/views/management/invitation/index.blade.php diff --git a/calm-webserver/resources/css/app.css b/calm-webserver/resources/css/app.css index 6a51ef6..0a19f09 100644 --- a/calm-webserver/resources/css/app.css +++ b/calm-webserver/resources/css/app.css @@ -120,6 +120,15 @@ } } +/* INVITATION MANAGEMENT */ +.disable-line td { + opacity: 0.5; +} + +.disable-line td:has(button) { + opacity: 1; +} + /* Users management diff --git a/calm-webserver/resources/js/app.js b/calm-webserver/resources/js/app.js index fc0bb20..c5c2141 100644 --- a/calm-webserver/resources/js/app.js +++ b/calm-webserver/resources/js/app.js @@ -106,6 +106,34 @@ import 'flowbite'; form.action = "/management/reservations/" + button.dataset.reservationId; } + /** + * Toggle the display of invitation lines based on the checkbox state. + */ + function toggleInvitaionDisplay() + { + const getAllDisabledLines = getElements(".disable-line td"); + if(this.checked) + { + // Hide all table cells in disabled rows + getAllDisabledLines.forEach((element) => { + element.style.display = "none"; + }); + } + else + { + getAllDisabledLines.forEach((element) => { + + // Determine the display type based on screen width + let typeDisplay = "block"; + if(window.matchMedia('(min-width: 1024px)').matches) + { + typeDisplay = "table-cell"; + } + element.style.display = typeDisplay; + }); + } + } + /** * Main program */ @@ -133,5 +161,8 @@ import 'flowbite'; deleteUserReservation(button, getElement("#delete-user-reservation-form")) }); }); + + const toggleInvitationShow = getElement("#showOnlyActivateInvitations"); + addEvent(toggleInvitationShow, "change", toggleInvitaionDisplay); }()); //mainProgram }()); //Main IIFE diff --git a/calm-webserver/resources/views/home.blade.php b/calm-webserver/resources/views/home.blade.php index f91d195..b356043 100644 --- a/calm-webserver/resources/views/home.blade.php +++ b/calm-webserver/resources/views/home.blade.php @@ -2,9 +2,10 @@ @section('content')

Qu'est-ce que CALM ?

- Capable and Accessible Laundry Manager - (CALM) est une application web permettant la gestion de buanderies dans les immeubles locatifs. Elle proposerait - en particulier la planification horaire et la gestion des réservations. + Capable and Accessible + Laundry Manager (CALM) est une + application web permettant la gestion de buanderies dans les immeubles locatifs. Elle propose en + particulier la planification horaire et la gestion des réservations.

Notre équipe

diff --git a/calm-webserver/resources/views/layout/app.blade.php b/calm-webserver/resources/views/layout/app.blade.php index 7be4d60..0bb856b 100644 --- a/calm-webserver/resources/views/layout/app.blade.php +++ b/calm-webserver/resources/views/layout/app.blade.php @@ -117,7 +117,7 @@ class="block py-2 pl-3 pr-4 rounded hover:bg-rollingStone md:hover:bg-transparen @can('admin')
  • Gestion + class="block py-2 pl-3 pr-4 rounded hover:bg-rollingStone md:hover:bg-transparent md:hover:text-rollingStone md:p-0 {{ $page === 'organizations' ? 'md:text-rollingStone bg-rollingStone md:bg-transparent' : '' }}">Gestion des organisations
  • @endcan diff --git a/calm-webserver/resources/views/management/invitation/index.blade.php b/calm-webserver/resources/views/management/invitation/index.blade.php new file mode 100644 index 0000000..8df6cfa --- /dev/null +++ b/calm-webserver/resources/views/management/invitation/index.blade.php @@ -0,0 +1,112 @@ +@extends('layout.app') +@section('content') + + + +
    +
    +
    +

    Gestion des invitations de l'organisation

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Voici la liste de tous les codes d'invitations + ayant permis aux utilisateurs d'entrer dans votre organisation. + +
    + +
    +
    + 12.10.2312 + + DSAD-DFEC-OFRG-DOER + + admin@admin.com + + 5 + + + @if(1 == 2) + + @else + + @endif +
    + 12.10.2312 + + DSAD-DFEC-OFRG-DOER + + admin@admin.com + + 5 + + + @if(1 == 1) + + @else + + @endif +
    +
    +
    +
    + + {{$users->links()}} +
    +@endsection diff --git a/calm-webserver/resources/views/management/organizations/index.blade.php b/calm-webserver/resources/views/management/organizations/index.blade.php index 54665d4..fdae5f5 100644 --- a/calm-webserver/resources/views/management/organizations/index.blade.php +++ b/calm-webserver/resources/views/management/organizations/index.blade.php @@ -34,6 +34,11 @@ Gestions des buanderies + + + @endforeach