Loading app/Http/Controllers/ModificationDives.php +17 −1 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ use App\Models\DivingSession; use App\Models\Registration; use App\Models\User; use League\CommonMark\Extension\Footnote\Event\NumberFootnotesListener; class ModificationDives extends Controller { Loading Loading @@ -46,6 +47,8 @@ function index(): View { where car_diving_session.DS_ACTIVE = 1;*/ return view('modification_dives', ['dives' => $request]); } Loading Loading @@ -131,12 +134,25 @@ static function modificationMembers(string $ds_code){ ->get(); $numberOfSubscribedPeople = DivingSession::selectRaw('DS_MAX_DIVERS, DS_DIVERS_COUNT') ->where('DS_CODE', '=', $ds_code) ->get(); $full = false; if(!($numberOfSubscribedPeople[0]['DS_MAX_DIVERS'] == null)){ $full = $numberOfSubscribedPeople[0]['DS_MAX_DIVERS'] <= $numberOfSubscribedPeople[0]['DS_DIVERS_COUNT']; } return view('modification_members_of_session', [ 'persons' => $adherents, 'sessionplongee' => $sessionplongee[0], 'directeurpresent' => ModificationDives::sessionContainsDirector($ds_code), 'pilotepresent' => ModificationDives::sessionContainsPilot($ds_code), 'securitepresent' => ModificationDives::sessionContainsSecurity($ds_code) 'securitepresent' => ModificationDives::sessionContainsSecurity($ds_code), 'full' => $full ]); } } resources/views/components/button.blade.php +9 −17 Original line number Diff line number Diff line <button class=" <button @if (isset($disabledVal) && $disabledVal == "true") disabled @endif class=" m-1 @if (isset($color) && $color != "") {{ $color }} @if (isset($color) && $color != '') {{ $color }} @else bg-gray-400 @endif @if (isset($colorHover) && $colorHover != "") {{ $colorHover }} @else hover:bg-gray-500 @endif bg-gray-400 @endif @if (isset($colorHover) && $colorHover != '') {{ $colorHover }} @else hover:bg-gray-500 @endif text-gray-800 font-bold py-2 px-4 rounded inline-flex items-center @if (isset($diveId) && $diveId!="") diveDropdownButton @endif @if (isset($diveId) && $diveId != '') diveDropdownButton @endif " @if (isset($diveId) && $diveId!="") id = "{{$diveId}}" @endif > @if (isset($diveId) && $diveId != '') id = "{{ $diveId }}" @endif> {{ $slot }} </button> resources/views/modification_members_of_session.blade.php +11 −1 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ </div> <div> </div> @if($full == false) <div class="mt-3 shadow-md max-w-fit w-1/6 mx-left rounded-lg overflow-hidden border-2"> <a href="/modificationdives/members/{{$sessionplongee['DS_CODE']}}/ajoutadherent/{{$sessionplongee['PRE_CODE']}}" class="text-blue-500 underline"> <x-button color="red" colorHover="hover:bg-green-800"> Loading @@ -54,6 +55,15 @@ </x-button> </a> </div> @endif @if($full == true) <div class="mt-3 shadow-md max-w-fit w-1/6 mx-left rounded-lg overflow-hidden border-2"> <a href="/modificationdives/members/{{$sessionplongee['DS_CODE']}}/ajoutadherent/{{$sessionplongee['PRE_CODE']}}" class="text-blue-500 underline"> <x-button disabledVal="true" color="bg-gray-400" colorHover="hover:bg-gray-400"> Ajouter un plongeur </x-button> </a> </div> @endif <script type="text/javascript" src="/js/drop-down.js"></script> </x-layout> routes/web.php +1 −10 Original line number Diff line number Diff line Loading @@ -22,15 +22,9 @@ use App\Http\Controllers\DiveCreation; use App\Http\Controllers\SecuritySheets\PreviewStrategy; use App\Http\Controllers\SecuritySheets\SecuritySheetController; use App\Http\Controllers\AdherentController; use App\Http\Controllers\DivingSignUpController; use App\Http\Controllers\DiveSessionCreation; use App\Http\Controllers\DiveSessionUpdate; use App\Http\Controllers\AuthController; use App\Http\Controllers\ModificationDives; use Illuminate\Support\Facades\Route; use Illuminate\Http\Request; /* |-------------------------------------------------------------------------- | Web Routes Loading Loading @@ -185,7 +179,6 @@ Route::get('/session/{ds_code}', [DiversBySession::class,'getDiversBySession']); <<<<<<< HEAD /** * List all the diving sessions of the user, as well as its remaining sessions for the current year. */ Loading Loading @@ -226,7 +219,6 @@ Route::middleware('App\Http\Middleware\rightChecker') ->get('manage/dives', [DivesList::class, 'showManagementList']) ->name('manage_dives_dir'); ======= Route::get('/modificationdives', [ModificationDives::class, 'index']); Route::get('modificationdives/members/{ds_code}', function($ds_code){ Loading @@ -250,4 +242,3 @@ }); Route::get('/modificationdives/members/{ds_code}/ajoutadherent/{pre_code}', [AdherentController::class, 'searchByName']); >>>>>>> creation-adherent-sur-creneau-de-plongee Loading
app/Http/Controllers/ModificationDives.php +17 −1 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ use App\Models\DivingSession; use App\Models\Registration; use App\Models\User; use League\CommonMark\Extension\Footnote\Event\NumberFootnotesListener; class ModificationDives extends Controller { Loading Loading @@ -46,6 +47,8 @@ function index(): View { where car_diving_session.DS_ACTIVE = 1;*/ return view('modification_dives', ['dives' => $request]); } Loading Loading @@ -131,12 +134,25 @@ static function modificationMembers(string $ds_code){ ->get(); $numberOfSubscribedPeople = DivingSession::selectRaw('DS_MAX_DIVERS, DS_DIVERS_COUNT') ->where('DS_CODE', '=', $ds_code) ->get(); $full = false; if(!($numberOfSubscribedPeople[0]['DS_MAX_DIVERS'] == null)){ $full = $numberOfSubscribedPeople[0]['DS_MAX_DIVERS'] <= $numberOfSubscribedPeople[0]['DS_DIVERS_COUNT']; } return view('modification_members_of_session', [ 'persons' => $adherents, 'sessionplongee' => $sessionplongee[0], 'directeurpresent' => ModificationDives::sessionContainsDirector($ds_code), 'pilotepresent' => ModificationDives::sessionContainsPilot($ds_code), 'securitepresent' => ModificationDives::sessionContainsSecurity($ds_code) 'securitepresent' => ModificationDives::sessionContainsSecurity($ds_code), 'full' => $full ]); } }
resources/views/components/button.blade.php +9 −17 Original line number Diff line number Diff line <button class=" <button @if (isset($disabledVal) && $disabledVal == "true") disabled @endif class=" m-1 @if (isset($color) && $color != "") {{ $color }} @if (isset($color) && $color != '') {{ $color }} @else bg-gray-400 @endif @if (isset($colorHover) && $colorHover != "") {{ $colorHover }} @else hover:bg-gray-500 @endif bg-gray-400 @endif @if (isset($colorHover) && $colorHover != '') {{ $colorHover }} @else hover:bg-gray-500 @endif text-gray-800 font-bold py-2 px-4 rounded inline-flex items-center @if (isset($diveId) && $diveId!="") diveDropdownButton @endif @if (isset($diveId) && $diveId != '') diveDropdownButton @endif " @if (isset($diveId) && $diveId!="") id = "{{$diveId}}" @endif > @if (isset($diveId) && $diveId != '') id = "{{ $diveId }}" @endif> {{ $slot }} </button>
resources/views/modification_members_of_session.blade.php +11 −1 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ </div> <div> </div> @if($full == false) <div class="mt-3 shadow-md max-w-fit w-1/6 mx-left rounded-lg overflow-hidden border-2"> <a href="/modificationdives/members/{{$sessionplongee['DS_CODE']}}/ajoutadherent/{{$sessionplongee['PRE_CODE']}}" class="text-blue-500 underline"> <x-button color="red" colorHover="hover:bg-green-800"> Loading @@ -54,6 +55,15 @@ </x-button> </a> </div> @endif @if($full == true) <div class="mt-3 shadow-md max-w-fit w-1/6 mx-left rounded-lg overflow-hidden border-2"> <a href="/modificationdives/members/{{$sessionplongee['DS_CODE']}}/ajoutadherent/{{$sessionplongee['PRE_CODE']}}" class="text-blue-500 underline"> <x-button disabledVal="true" color="bg-gray-400" colorHover="hover:bg-gray-400"> Ajouter un plongeur </x-button> </a> </div> @endif <script type="text/javascript" src="/js/drop-down.js"></script> </x-layout>
routes/web.php +1 −10 Original line number Diff line number Diff line Loading @@ -22,15 +22,9 @@ use App\Http\Controllers\DiveCreation; use App\Http\Controllers\SecuritySheets\PreviewStrategy; use App\Http\Controllers\SecuritySheets\SecuritySheetController; use App\Http\Controllers\AdherentController; use App\Http\Controllers\DivingSignUpController; use App\Http\Controllers\DiveSessionCreation; use App\Http\Controllers\DiveSessionUpdate; use App\Http\Controllers\AuthController; use App\Http\Controllers\ModificationDives; use Illuminate\Support\Facades\Route; use Illuminate\Http\Request; /* |-------------------------------------------------------------------------- | Web Routes Loading Loading @@ -185,7 +179,6 @@ Route::get('/session/{ds_code}', [DiversBySession::class,'getDiversBySession']); <<<<<<< HEAD /** * List all the diving sessions of the user, as well as its remaining sessions for the current year. */ Loading Loading @@ -226,7 +219,6 @@ Route::middleware('App\Http\Middleware\rightChecker') ->get('manage/dives', [DivesList::class, 'showManagementList']) ->name('manage_dives_dir'); ======= Route::get('/modificationdives', [ModificationDives::class, 'index']); Route::get('modificationdives/members/{ds_code}', function($ds_code){ Loading @@ -250,4 +242,3 @@ }); Route::get('/modificationdives/members/{ds_code}/ajoutadherent/{pre_code}', [AdherentController::class, 'searchByName']); >>>>>>> creation-adherent-sur-creneau-de-plongee