Commit 7246a87e authored by LucBUTGH's avatar LucBUTGH
Browse files

feat: history one session

parent c7722898
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -11,11 +11,13 @@ class DiversBySession extends Controller
{
    public function getDiversBySession($ds_code): View
    {
        $parametre = $ds_code;
        $request = User::selectRaw('US_NAME, US_FIRST_NAME')
        ->join('CAR_USER','CAR_USER.US_ID','=','CAR_DIVING_SESSION.US_ID')
        ->join('CAR_REGISTRATION','CAR_REGISTRATION.US_ID', '=', 'CAR_USER.US_ID')
        ->where('DS_CODE', $ds_code)
        ->get();

        return view('diversinsessions', ['datas' => $request]);
        return view('diversonesession', ['datas' => $request, 'parametre' => $parametre]);
    }
    
    public function getAllSessions(): View
+21 −0
Original line number Diff line number Diff line
<x-layout>
    <x-page-title>Historique de la session {{ $parametre }} </x-page-title>
    <div class="shadow-md max-w-full w-2/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>
                    </tr>
                </thead>
                <tbody>
                    @foreach($datas as $data)
                        <tr class="odd:bg-white even:bg-gray-50 border-b">
                            <td class="px-6 py-4">{{ $data->US_NAME }}</td>
                            <td class="px-6 py-4">{{ $data->US_FIRST_NAME }}</td>
                        </tr>
                    @endforeach
                </tbody>
            </table>
    </div>
</x-layout>
+1 −1

File changed.

Contains only whitespace changes.