Loading app/Http/Controllers/AdherentController.php +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ class AdherentController extends Controller static function index($ds_code, $pre_code): View { $adherents = User::selectRaw('US_FIRST_NAME,US_NAME,US_LICENCE_ID, CAR_USER.US_ID, PRE_MAX_DEPTH') $adherents = User::selectRaw('US_FIRST_NAME,US_NAME,US_LICENCE_ID, CAR_USER.US_ID, PRE_MAX_DEPTH, CAR_USER.PRE_CODE') ->join('CAR_PREROGATIVE','CAR_PREROGATIVE.PRE_CODE','=','CAR_USER.PRE_CODE') ->where('PRE_MAX_DEPTH', '>=', AdherentController::getMaxDepthByPrerogativeCode($pre_code)) ->get(); Loading app/Http/Controllers/ModificationDives.php +4 −1 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ static function modificationMembers(string $ds_code){ 'US_NAME' => $pilote_temp[0]['US_NAME'], 'US_LICENCE_ID' => $pilote_temp[0]['US_LICENCE_ID'], 'US_ID' => $pilote_temp[0]['US_ID'], 'PRE_CODE' => '', 'ROL_LABEL' => "Pilote" ]; Loading @@ -94,6 +95,7 @@ static function modificationMembers(string $ds_code){ 'US_NAME' => $securite_temp[0]['US_NAME'], 'US_LICENCE_ID' => $securite_temp[0]['US_LICENCE_ID'], 'US_ID' => $securite_temp[0]['US_ID'], 'PRE_CODE' => '', 'ROL_LABEL' => "Sécurité de surface" ]; Loading @@ -107,10 +109,11 @@ static function modificationMembers(string $ds_code){ 'US_NAME' => $directeur_temp[0]['US_NAME'], 'US_LICENCE_ID' => $directeur_temp[0]['US_LICENCE_ID'], 'US_ID' => $directeur_temp[0]['US_ID'], 'PRE_CODE' => '', 'ROL_LABEL' => "Directeur" ]; $plongeurs = User::selectRaw('US_FIRST_NAME,US_NAME,US_LICENCE_ID, ROL_LABEL, CAR_USER.US_ID') $plongeurs = User::selectRaw('US_FIRST_NAME,US_NAME,US_LICENCE_ID, ROL_LABEL, CAR_USER.US_ID, CAR_USER.PRE_CODE') ->join('CAR_PREROGATIVE','CAR_PREROGATIVE.PRE_CODE','=','CAR_USER.PRE_CODE') ->join('CAR_ROLE_ATTRIBUTION','CAR_USER.US_ID','=','CAR_ROLE_ATTRIBUTION.US_ID') ->join('CAR_ROLE','CAR_ROLE_ATTRIBUTION.ROL_CODE','=','CAR_ROLE.ROL_CODE') Loading public/js/Palanque/manualPalanque.js +22 −6 Original line number Diff line number Diff line Loading @@ -378,6 +378,7 @@ function validateAllCombination() { ); // console.log(zoneElement); if (zoneElement == null) return; if (zoneElement.hasChildNodes()) { if ( zoneElement.childElementCount < 2 || Loading @@ -386,6 +387,7 @@ function validateAllCombination() { zoneElement.style.backgroundColor = "rgb(254 202 202)"; console.log("taille"); valid = false; return; } zoneElement.childNodes.forEach((elementB) => { if ( Loading @@ -395,6 +397,7 @@ function validateAllCombination() { zoneElement.style.backgroundColor = "rgb(254 202 202)"; console.log("PB"); valid = false; return; } }); let children = zoneElement.childNodes; Loading @@ -403,9 +406,16 @@ function validateAllCombination() { counterCheck++; zoneElement.style.backgroundColor = "rgb(229 231 235)"; valid = true; return; } } for (let i = 0; i < children.length; i++) { if (children[i].id.split(",")[1] === "PB" && children.length > 2) { zoneElement.style.backgroundColor = "rgb(254 202 202)"; console.log("PB"); valid = false; return; } let targetItemsSplit = children[i].id.split(",")[2]; for (targetItemsSplit in validatePalanqueCombinate) { for (let j = 0; j < children.length; j++) { Loading @@ -419,11 +429,13 @@ function validateAllCombination() { zoneElement.style.backgroundColor = "rgb(229 231 235)"; valid = true; return; } } zoneElement.style.backgroundColor = "rgb(254 202 202)"; console.log("combi ", targetItemsSplit); valid = false; return; } } Loading @@ -431,24 +443,28 @@ function validateAllCombination() { zoneElement.style.backgroundColor = "rgb(229 231 235)"; console.log("vide"); valid = false; return; } }); if (zoneStart.childElementCount == 0 && valid == true) { disableVal = false; } else { disableVal = true; } } let interval = setInterval(function () { updateZoneList(); validateAllCombination(); console.log(disableVal); disableVal = false; document.querySelectorAll("#DropZone > div > div").forEach((element) => { if (element.style.backgroundColor === "rgb(254, 202, 202)" || zoneStart.childElementCount > 0) { disableVal = true; return; } }); }, 250); validatePalanque.addEventListener("click", function () { if (!disableVal) { sendPalanque(); clearInterval(interval); // clearInterval(interval); } }); Loading resources/views/modification_members_of_session.blade.php +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ <th scope="col" class="px-6 py-4">Prénom</th> <th scope="col" class="px-6 py-4">Nom</th> <th scope="col" class="px-6 py-4">Rôle</th> <th scope="col" class="px-6 py-4">Prérogative</th> </tr> </thead> <tbody> Loading @@ -20,6 +21,7 @@ <td class="px-6 py-4">{{ $person['US_NAME'] }}</td> <td class="px-6 py-4">{{ $person['US_FIRST_NAME'] }}</td> <td class="px-6 py-4">{{$person['ROL_LABEL']}}</td> <td class="px-6 py-4">{{$person['PRE_CODE']}}</td> @if($person['ROL_LABEL'] == 'Plongeur') Loading Loading
app/Http/Controllers/AdherentController.php +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ class AdherentController extends Controller static function index($ds_code, $pre_code): View { $adherents = User::selectRaw('US_FIRST_NAME,US_NAME,US_LICENCE_ID, CAR_USER.US_ID, PRE_MAX_DEPTH') $adherents = User::selectRaw('US_FIRST_NAME,US_NAME,US_LICENCE_ID, CAR_USER.US_ID, PRE_MAX_DEPTH, CAR_USER.PRE_CODE') ->join('CAR_PREROGATIVE','CAR_PREROGATIVE.PRE_CODE','=','CAR_USER.PRE_CODE') ->where('PRE_MAX_DEPTH', '>=', AdherentController::getMaxDepthByPrerogativeCode($pre_code)) ->get(); Loading
app/Http/Controllers/ModificationDives.php +4 −1 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ static function modificationMembers(string $ds_code){ 'US_NAME' => $pilote_temp[0]['US_NAME'], 'US_LICENCE_ID' => $pilote_temp[0]['US_LICENCE_ID'], 'US_ID' => $pilote_temp[0]['US_ID'], 'PRE_CODE' => '', 'ROL_LABEL' => "Pilote" ]; Loading @@ -94,6 +95,7 @@ static function modificationMembers(string $ds_code){ 'US_NAME' => $securite_temp[0]['US_NAME'], 'US_LICENCE_ID' => $securite_temp[0]['US_LICENCE_ID'], 'US_ID' => $securite_temp[0]['US_ID'], 'PRE_CODE' => '', 'ROL_LABEL' => "Sécurité de surface" ]; Loading @@ -107,10 +109,11 @@ static function modificationMembers(string $ds_code){ 'US_NAME' => $directeur_temp[0]['US_NAME'], 'US_LICENCE_ID' => $directeur_temp[0]['US_LICENCE_ID'], 'US_ID' => $directeur_temp[0]['US_ID'], 'PRE_CODE' => '', 'ROL_LABEL' => "Directeur" ]; $plongeurs = User::selectRaw('US_FIRST_NAME,US_NAME,US_LICENCE_ID, ROL_LABEL, CAR_USER.US_ID') $plongeurs = User::selectRaw('US_FIRST_NAME,US_NAME,US_LICENCE_ID, ROL_LABEL, CAR_USER.US_ID, CAR_USER.PRE_CODE') ->join('CAR_PREROGATIVE','CAR_PREROGATIVE.PRE_CODE','=','CAR_USER.PRE_CODE') ->join('CAR_ROLE_ATTRIBUTION','CAR_USER.US_ID','=','CAR_ROLE_ATTRIBUTION.US_ID') ->join('CAR_ROLE','CAR_ROLE_ATTRIBUTION.ROL_CODE','=','CAR_ROLE.ROL_CODE') Loading
public/js/Palanque/manualPalanque.js +22 −6 Original line number Diff line number Diff line Loading @@ -378,6 +378,7 @@ function validateAllCombination() { ); // console.log(zoneElement); if (zoneElement == null) return; if (zoneElement.hasChildNodes()) { if ( zoneElement.childElementCount < 2 || Loading @@ -386,6 +387,7 @@ function validateAllCombination() { zoneElement.style.backgroundColor = "rgb(254 202 202)"; console.log("taille"); valid = false; return; } zoneElement.childNodes.forEach((elementB) => { if ( Loading @@ -395,6 +397,7 @@ function validateAllCombination() { zoneElement.style.backgroundColor = "rgb(254 202 202)"; console.log("PB"); valid = false; return; } }); let children = zoneElement.childNodes; Loading @@ -403,9 +406,16 @@ function validateAllCombination() { counterCheck++; zoneElement.style.backgroundColor = "rgb(229 231 235)"; valid = true; return; } } for (let i = 0; i < children.length; i++) { if (children[i].id.split(",")[1] === "PB" && children.length > 2) { zoneElement.style.backgroundColor = "rgb(254 202 202)"; console.log("PB"); valid = false; return; } let targetItemsSplit = children[i].id.split(",")[2]; for (targetItemsSplit in validatePalanqueCombinate) { for (let j = 0; j < children.length; j++) { Loading @@ -419,11 +429,13 @@ function validateAllCombination() { zoneElement.style.backgroundColor = "rgb(229 231 235)"; valid = true; return; } } zoneElement.style.backgroundColor = "rgb(254 202 202)"; console.log("combi ", targetItemsSplit); valid = false; return; } } Loading @@ -431,24 +443,28 @@ function validateAllCombination() { zoneElement.style.backgroundColor = "rgb(229 231 235)"; console.log("vide"); valid = false; return; } }); if (zoneStart.childElementCount == 0 && valid == true) { disableVal = false; } else { disableVal = true; } } let interval = setInterval(function () { updateZoneList(); validateAllCombination(); console.log(disableVal); disableVal = false; document.querySelectorAll("#DropZone > div > div").forEach((element) => { if (element.style.backgroundColor === "rgb(254, 202, 202)" || zoneStart.childElementCount > 0) { disableVal = true; return; } }); }, 250); validatePalanque.addEventListener("click", function () { if (!disableVal) { sendPalanque(); clearInterval(interval); // clearInterval(interval); } }); Loading
resources/views/modification_members_of_session.blade.php +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ <th scope="col" class="px-6 py-4">Prénom</th> <th scope="col" class="px-6 py-4">Nom</th> <th scope="col" class="px-6 py-4">Rôle</th> <th scope="col" class="px-6 py-4">Prérogative</th> </tr> </thead> <tbody> Loading @@ -20,6 +21,7 @@ <td class="px-6 py-4">{{ $person['US_NAME'] }}</td> <td class="px-6 py-4">{{ $person['US_FIRST_NAME'] }}</td> <td class="px-6 py-4">{{$person['ROL_LABEL']}}</td> <td class="px-6 py-4">{{$person['PRE_CODE']}}</td> @if($person['ROL_LABEL'] == 'Plongeur') Loading