Loading app/Http/Controllers/DivingNumberController.php +10 −2 Original line number Diff line number Diff line Loading @@ -12,9 +12,16 @@ class DivingNumberController extends Controller public function index(): View { $dateDives = DivingNumberModel::join('car_registration', 'car_user.us_id', '=', 'car_registration.us_id') $dateDivesBefore = DivingNumberModel::join('car_registration', 'car_user.us_id', '=', 'car_registration.us_id') ->join('car_diving_session','car_registration.ds_code','=','car_diving_session.ds_code') ->where('car_user.US_ID',3) ->where('CAR_DIVING_SESSION.DS_DATE','<',now()) ->get(); $dateDivesAfter = DivingNumberModel::join('car_registration', 'car_user.us_id', '=', 'car_registration.us_id') ->join('car_diving_session','car_registration.ds_code','=','car_diving_session.ds_code') ->where('car_user.US_ID',3) ->where('CAR_DIVING_SESSION.DS_DATE','>=',now()) ->get(); $user = Auth::user(); Loading @@ -34,7 +41,8 @@ public function index(): View ->count(); $usersCount = 99 - $usersCount; return view('diveractivities', compact('usersCount'), ['dates' => $dateDives]); return view('diveractivities', compact('usersCount'), ['datesB' => $dateDivesBefore, 'datesA' => $dateDivesAfter]); } public function allIndex(Request $request): View Loading resources/views/components/page-subtitle.blade.php 0 → 100644 +1 −0 Original line number Diff line number Diff line <h2 class="mb-6 font-bold md:text-5xl lg:text-3xl underline underline-offset-8">{{ $slot }}</h2> resources/views/diveractivities.blade.php +29 −5 Original line number Diff line number Diff line <x-layout> <x-page-title>Historique des plongées</x-page-title> <x-page-title>Historique des plongées de @session('user')-></x-page-title> <x-page-subtitle> Plongées restantes </x-page-subtitle> <div class="shadow-md max-w-full w-1/3 rounded-lg overflow-hidden border-2 mx-auto"> <table class="text-sm text-left text-gray-500 w-full"> <thead class="text-xs text-gray-700 uppercase bg-gray-50"> Loading @@ -15,6 +16,7 @@ </table> </div> <x-page-subtitle> A venir </x-page-subtitle> <div class="mt-10 shadow-md max-w-full w-1/3 rounded-lg overflow-hidden border-2 mx-auto"> <table class="text-sm text-left text-gray-500 w-full"> <thead class="text-xs text-gray-700 uppercase bg-gray-50"> Loading @@ -25,11 +27,33 @@ </tr> </thead> <tbody> @foreach($dates as $date) @foreach($datesA as $dateA) <tr class="odd:bg-white even:bg-gray-50 border-b"> <td class="px-6 py-4">{{ $date->US_NAME }}</td> <td class="px-6 py-4">{{ $date->US_FIRST_NAME }}</td> <td class="px-6 py-4">{{ $date->DS_DATE }}</td> <td class="px-6 py-4">{{ $dateA->US_NAME }}</td> <td class="px-6 py-4">{{ $dateA->US_FIRST_NAME }}</td> <td class="px-6 py-4">{{ $dateA->DS_DATE }}</td> </tr> @endforeach </tbody> </table> </div> <x-page-subtitle> Ayant eu lieu </x-page-subtitle> <div class="mt-10 shadow-md max-w-full w-1/3 rounded-lg overflow-hidden border-2 mx-auto"> <table class="text-sm text-left text-gray-500 w-full"> <thead class="text-xs text-gray-700 uppercase bg-gray-50"> <tr> <th scope="col" class="px-6 py-3">Nom</th> <th scope="col" class="px-6 py-3">Prénom</th> <th scope="col" class="px-6 py-3">Date</th> </tr> </thead> <tbody> @foreach($datesB as $dateB) <tr class="odd:bg-white even:bg-gray-50 border-b"> <td class="px-6 py-4">{{ $dateB->US_NAME }}</td> <td class="px-6 py-4">{{ $dateB->US_FIRST_NAME }}</td> <td class="px-6 py-4">{{ $dateB->DS_DATE }}</td> </tr> @endforeach </tbody> Loading Loading
app/Http/Controllers/DivingNumberController.php +10 −2 Original line number Diff line number Diff line Loading @@ -12,9 +12,16 @@ class DivingNumberController extends Controller public function index(): View { $dateDives = DivingNumberModel::join('car_registration', 'car_user.us_id', '=', 'car_registration.us_id') $dateDivesBefore = DivingNumberModel::join('car_registration', 'car_user.us_id', '=', 'car_registration.us_id') ->join('car_diving_session','car_registration.ds_code','=','car_diving_session.ds_code') ->where('car_user.US_ID',3) ->where('CAR_DIVING_SESSION.DS_DATE','<',now()) ->get(); $dateDivesAfter = DivingNumberModel::join('car_registration', 'car_user.us_id', '=', 'car_registration.us_id') ->join('car_diving_session','car_registration.ds_code','=','car_diving_session.ds_code') ->where('car_user.US_ID',3) ->where('CAR_DIVING_SESSION.DS_DATE','>=',now()) ->get(); $user = Auth::user(); Loading @@ -34,7 +41,8 @@ public function index(): View ->count(); $usersCount = 99 - $usersCount; return view('diveractivities', compact('usersCount'), ['dates' => $dateDives]); return view('diveractivities', compact('usersCount'), ['datesB' => $dateDivesBefore, 'datesA' => $dateDivesAfter]); } public function allIndex(Request $request): View Loading
resources/views/components/page-subtitle.blade.php 0 → 100644 +1 −0 Original line number Diff line number Diff line <h2 class="mb-6 font-bold md:text-5xl lg:text-3xl underline underline-offset-8">{{ $slot }}</h2>
resources/views/diveractivities.blade.php +29 −5 Original line number Diff line number Diff line <x-layout> <x-page-title>Historique des plongées</x-page-title> <x-page-title>Historique des plongées de @session('user')-></x-page-title> <x-page-subtitle> Plongées restantes </x-page-subtitle> <div class="shadow-md max-w-full w-1/3 rounded-lg overflow-hidden border-2 mx-auto"> <table class="text-sm text-left text-gray-500 w-full"> <thead class="text-xs text-gray-700 uppercase bg-gray-50"> Loading @@ -15,6 +16,7 @@ </table> </div> <x-page-subtitle> A venir </x-page-subtitle> <div class="mt-10 shadow-md max-w-full w-1/3 rounded-lg overflow-hidden border-2 mx-auto"> <table class="text-sm text-left text-gray-500 w-full"> <thead class="text-xs text-gray-700 uppercase bg-gray-50"> Loading @@ -25,11 +27,33 @@ </tr> </thead> <tbody> @foreach($dates as $date) @foreach($datesA as $dateA) <tr class="odd:bg-white even:bg-gray-50 border-b"> <td class="px-6 py-4">{{ $date->US_NAME }}</td> <td class="px-6 py-4">{{ $date->US_FIRST_NAME }}</td> <td class="px-6 py-4">{{ $date->DS_DATE }}</td> <td class="px-6 py-4">{{ $dateA->US_NAME }}</td> <td class="px-6 py-4">{{ $dateA->US_FIRST_NAME }}</td> <td class="px-6 py-4">{{ $dateA->DS_DATE }}</td> </tr> @endforeach </tbody> </table> </div> <x-page-subtitle> Ayant eu lieu </x-page-subtitle> <div class="mt-10 shadow-md max-w-full w-1/3 rounded-lg overflow-hidden border-2 mx-auto"> <table class="text-sm text-left text-gray-500 w-full"> <thead class="text-xs text-gray-700 uppercase bg-gray-50"> <tr> <th scope="col" class="px-6 py-3">Nom</th> <th scope="col" class="px-6 py-3">Prénom</th> <th scope="col" class="px-6 py-3">Date</th> </tr> </thead> <tbody> @foreach($datesB as $dateB) <tr class="odd:bg-white even:bg-gray-50 border-b"> <td class="px-6 py-4">{{ $dateB->US_NAME }}</td> <td class="px-6 py-4">{{ $dateB->US_FIRST_NAME }}</td> <td class="px-6 py-4">{{ $dateB->DS_DATE }}</td> </tr> @endforeach </tbody> Loading