Loading app/Http/Controllers/DivesList.php +1 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ class DivesList extends Controller { function index(): View { $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) ->orderBy('DS_DATE', 'asc') Loading public/js/drop-down.js +0 −3 Original line number Diff line number Diff line let buttons = document.getElementsByClassName('diveDropdownButton'); console.log(buttons.length) for(let i = 0; i < buttons.length; i++){ button = buttons[i] button.addEventListener('click', (evt) => { Loading @@ -12,7 +10,6 @@ for(let i = 0; i < buttons.length; i++){ function toggleDropDownMenu(evt){ let button = evt.currentTarget let sessionCode = button.id.split('-')[1]; console.log('dropdown'+sessionCode); let disclosure = document.getElementById('dropdown'+sessionCode); disclosure.classList.toggle('hidden'); } No newline at end of file resources/views/dives.blade.php +5 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ <table style="text-align: left"> <thead class="text-xs text-gray-700 bg-gray-50" style="border-bottom: 1px solid black; font-size: 15px;"> <tr> <th scope="col" class="px-12 py-3">Capacité</th> <th scope="col" class="px-12 py-3">Date</th> <th scope="col" class="px-12 py-3">Plage horaire</th> <th scope="col" class="px-12 py-3">Profondeur</th> Loading @@ -21,6 +22,10 @@ <td class="px-12 py-4">{{ $dive->CAR_SCHEDULE }}</td> <td class="px-12 py-4">{{ $dive->DL_DEPTH }}m</td> <td class="px-12 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-12 py-4"> <x-button diveId="dropdownButton-{{ $dive->DS_CODE }}"> <svg class="w-6 h-6 text-gray-800 dark:text-white" aria-hidden="true" Loading Loading
app/Http/Controllers/DivesList.php +1 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ class DivesList extends Controller { function index(): View { $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) ->orderBy('DS_DATE', 'asc') Loading
public/js/drop-down.js +0 −3 Original line number Diff line number Diff line let buttons = document.getElementsByClassName('diveDropdownButton'); console.log(buttons.length) for(let i = 0; i < buttons.length; i++){ button = buttons[i] button.addEventListener('click', (evt) => { Loading @@ -12,7 +10,6 @@ for(let i = 0; i < buttons.length; i++){ function toggleDropDownMenu(evt){ let button = evt.currentTarget let sessionCode = button.id.split('-')[1]; console.log('dropdown'+sessionCode); let disclosure = document.getElementById('dropdown'+sessionCode); disclosure.classList.toggle('hidden'); } No newline at end of file
resources/views/dives.blade.php +5 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ <table style="text-align: left"> <thead class="text-xs text-gray-700 bg-gray-50" style="border-bottom: 1px solid black; font-size: 15px;"> <tr> <th scope="col" class="px-12 py-3">Capacité</th> <th scope="col" class="px-12 py-3">Date</th> <th scope="col" class="px-12 py-3">Plage horaire</th> <th scope="col" class="px-12 py-3">Profondeur</th> Loading @@ -21,6 +22,10 @@ <td class="px-12 py-4">{{ $dive->CAR_SCHEDULE }}</td> <td class="px-12 py-4">{{ $dive->DL_DEPTH }}m</td> <td class="px-12 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-12 py-4"> <x-button diveId="dropdownButton-{{ $dive->DS_CODE }}"> <svg class="w-6 h-6 text-gray-800 dark:text-white" aria-hidden="true" Loading