Loading app/Http/Controllers/DivesList.php +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ function show($id) { function showManagementList() { $userID = session('user')->US_ID; $dives = DivingSession::select('DS_CODE', 'DS_ACTIVE', 'CAR_DIVING_SESSION.DL_ID', 'DS_DATE', 'DL_DEPTH', 'CAR_SCHEDULE', 'DL_NAME', 'DS_MAX_DEPTH') $dives = DivingSession::select('DS_CODE', 'DS_ACTIVE', 'CAR_DIVING_SESSION.DL_ID', 'DS_DATE', 'DL_DEPTH', 'CAR_SCHEDULE', 'DL_NAME', 'DS_MAX_DEPTH' ,'DS_DIVERS_COUNT' , 'DS_MAX_DIVERS') ->join('CAR_DIVING_LOCATION', 'CAR_DIVING_SESSION.DL_ID', '=', 'CAR_DIVING_LOCATION.DL_ID') ->where('DS_ACTIVE', '=', 1, 'and', 'DS_DATE', '>=', date('Y-m-d'), 'and', 'US_ID_CAR_DIRECT', '=', $userID) ->orderBy('DS_DATE', 'asc') Loading resources/views/dives_list_management.blade.php +12 −12 Original line number Diff line number Diff line <x-layout> <link rel="stylesheet" href="/css/drop-down.css"> <link rel="stylesheet" href="{{ asset('/css/app.css') }}"> <x-page-title>Gestion de mes plongées en tant que directeur</x-page-title> <div class="shadow-md max-w-full rounded-lg overflow-hidden border-2"> Loading @@ -10,6 +9,7 @@ <th scope="col" class="px-6 py-3">Plage horaire</th> <th scope="col" class="px-6 py-3">Profondeur</th> <th scope="col" class="px-6 py-3">Lieu</th> <th scope="col" class="px-12 py-3">Capacité</th> <th scope="col" class="px-6 py-3">Actions</th> </tr> </thead> Loading @@ -17,9 +17,19 @@ @foreach ($dives as $dive) <tr class="odd:bg-white even:bg-gray-50 border-b"> <td class="px-6 py-4">{{ $dive->DS_DATE }}</td> <td class="px-6 py-4">{{ $dive->CAR_SCHEDULE }}</td> @if( $dive->CAR_SCHEDULE=='Matin') <td class="px-12 py-4">9h</td> @elseif ( $dive->CAR_SCHEDULE=='Apres-midi') <td class="px-12 py-4">14h</td> @else <td class="px-12 py-4">18h</td> @endif <td class="px-6 py-4">{{ $dive->DL_DEPTH }}m</td> <td class="px-6 py-4">{{ $dive->DL_NAME }}</td> <td class="px-12 py-4 flex"> {{ $dive->DS_DIVERS_COUNT }}/{{ $dive->DS_MAX_DIVERS }} <svg class="ml-2" xmlns="http://www.w3.org/2000/svg" height="20" width="20" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M304 128a80 80 0 1 0 -160 0 80 80 0 1 0 160 0zM96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM49.3 464H398.7c-8.9-63.3-63.3-112-129-112H178.3c-65.7 0-120.1 48.7-129 112zM0 482.3C0 383.8 79.8 304 178.3 304h91.4C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7H29.7C13.3 512 0 498.7 0 482.3z"/></svg> </td> <td class="px-8 py-4"> <a href="{{ route('dives_show', ['id' => $dive->DS_CODE]) }}"> <x-button> Loading @@ -39,16 +49,6 @@ </a> </td> </tr> <x-drop-down id="dropdown{{$dive->DS_CODE}}"> @php $participants = $dive->getParticipants(); @endphp <div class="drop-down"> @foreach($participants as $user) <p class = "drop-down-items">{{$user->US_NAME}} {{$user->US_FIRST_NAME}}</p> @endforeach </div> </x-drop-down> @endforeach </tbody> </table> Loading Loading
app/Http/Controllers/DivesList.php +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ function show($id) { function showManagementList() { $userID = session('user')->US_ID; $dives = DivingSession::select('DS_CODE', 'DS_ACTIVE', 'CAR_DIVING_SESSION.DL_ID', 'DS_DATE', 'DL_DEPTH', 'CAR_SCHEDULE', 'DL_NAME', 'DS_MAX_DEPTH') $dives = DivingSession::select('DS_CODE', 'DS_ACTIVE', 'CAR_DIVING_SESSION.DL_ID', 'DS_DATE', 'DL_DEPTH', 'CAR_SCHEDULE', 'DL_NAME', 'DS_MAX_DEPTH' ,'DS_DIVERS_COUNT' , 'DS_MAX_DIVERS') ->join('CAR_DIVING_LOCATION', 'CAR_DIVING_SESSION.DL_ID', '=', 'CAR_DIVING_LOCATION.DL_ID') ->where('DS_ACTIVE', '=', 1, 'and', 'DS_DATE', '>=', date('Y-m-d'), 'and', 'US_ID_CAR_DIRECT', '=', $userID) ->orderBy('DS_DATE', 'asc') Loading
resources/views/dives_list_management.blade.php +12 −12 Original line number Diff line number Diff line <x-layout> <link rel="stylesheet" href="/css/drop-down.css"> <link rel="stylesheet" href="{{ asset('/css/app.css') }}"> <x-page-title>Gestion de mes plongées en tant que directeur</x-page-title> <div class="shadow-md max-w-full rounded-lg overflow-hidden border-2"> Loading @@ -10,6 +9,7 @@ <th scope="col" class="px-6 py-3">Plage horaire</th> <th scope="col" class="px-6 py-3">Profondeur</th> <th scope="col" class="px-6 py-3">Lieu</th> <th scope="col" class="px-12 py-3">Capacité</th> <th scope="col" class="px-6 py-3">Actions</th> </tr> </thead> Loading @@ -17,9 +17,19 @@ @foreach ($dives as $dive) <tr class="odd:bg-white even:bg-gray-50 border-b"> <td class="px-6 py-4">{{ $dive->DS_DATE }}</td> <td class="px-6 py-4">{{ $dive->CAR_SCHEDULE }}</td> @if( $dive->CAR_SCHEDULE=='Matin') <td class="px-12 py-4">9h</td> @elseif ( $dive->CAR_SCHEDULE=='Apres-midi') <td class="px-12 py-4">14h</td> @else <td class="px-12 py-4">18h</td> @endif <td class="px-6 py-4">{{ $dive->DL_DEPTH }}m</td> <td class="px-6 py-4">{{ $dive->DL_NAME }}</td> <td class="px-12 py-4 flex"> {{ $dive->DS_DIVERS_COUNT }}/{{ $dive->DS_MAX_DIVERS }} <svg class="ml-2" xmlns="http://www.w3.org/2000/svg" height="20" width="20" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M304 128a80 80 0 1 0 -160 0 80 80 0 1 0 160 0zM96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM49.3 464H398.7c-8.9-63.3-63.3-112-129-112H178.3c-65.7 0-120.1 48.7-129 112zM0 482.3C0 383.8 79.8 304 178.3 304h91.4C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7H29.7C13.3 512 0 498.7 0 482.3z"/></svg> </td> <td class="px-8 py-4"> <a href="{{ route('dives_show', ['id' => $dive->DS_CODE]) }}"> <x-button> Loading @@ -39,16 +49,6 @@ </a> </td> </tr> <x-drop-down id="dropdown{{$dive->DS_CODE}}"> @php $participants = $dive->getParticipants(); @endphp <div class="drop-down"> @foreach($participants as $user) <p class = "drop-down-items">{{$user->US_NAME}} {{$user->US_FIRST_NAME}}</p> @endforeach </div> </x-drop-down> @endforeach </tbody> </table> Loading