Loading app/Http/Controllers/DiveSessionUpdate.php +6 −5 Original line number Diff line number Diff line Loading @@ -13,11 +13,6 @@ public static function update($request, $id) { $dv = DivingSession::where('DS_CODE', $id)->first(); if(intval($dv->DS_MAX_DIVERS) > Boat::find($request->boat)->BO_NUMBER_OF_SEATS) { return "Le nombre de plongeurs est supérieur au nombre de places du bateau"; } $dv->US_ID = $request->pilot; $dv->DL_ID = $request->location; $dv->BO_ID = $request->boat; Loading @@ -27,6 +22,12 @@ public static function update($request, $id) $dv->DS_ACTIVE = 1; $dv->DS_MAX_DIVERS = $request->max; $dv->PRE_CODE = $request->level; if(intval($dv->DS_MAX_DIVERS) > Boat::find($request->boat)->BO_NUMBER_OF_SEATS) { return "Le nombre de plongeurs est supérieur au nombre de places du bateau"; } $dv->save(); } } Loading resources/views/update_dive.blade.php +6 −5 Original line number Diff line number Diff line Loading @@ -36,11 +36,6 @@ </div> </div> <div class="divideFlex Column"> @if(isset($msg)) { <p>{{$msg}}</p> } @endif <h2>Lieu</h2> <hr style="height: 3px;background-color: black;margin-bottom: 15px;margin-top: 5px; width : 40%"> <div class="aligne"> Loading @@ -67,9 +62,12 @@ <hr style="height: 3px;background-color: black;margin-bottom: 15px;margin-top: 5px; width : 60%"> <div class="aligne"> <div class="divideFlexSmall Column"> <label for="minInput">Minimum :</label> <label for="maxInput">Maximum :</label> </div> <div class="divideFlexBig Column"> <input required type="number" name="min" id="minInput" min="0" placeholder="0" style="width: 20%;-moz-appearance: textfield;text-align: center;"> @if (isset($precedent)) <input required type="number" name="max" id="maxInput" min="0" placeholder="0" style="width: 20%;-moz-appearance: textfield;text-align: center;" Loading Loading @@ -189,6 +187,9 @@ class="clickableDelete clickable block w-full max-w-xs mx-auto bg-red-400 hover: </form> </div> </form> @if(isset($error)) <x-popup>{{$error}}</x-popup> @endif </div> <script src="{{ asset('/js/create_div.js') }}"></script> Loading Loading
app/Http/Controllers/DiveSessionUpdate.php +6 −5 Original line number Diff line number Diff line Loading @@ -13,11 +13,6 @@ public static function update($request, $id) { $dv = DivingSession::where('DS_CODE', $id)->first(); if(intval($dv->DS_MAX_DIVERS) > Boat::find($request->boat)->BO_NUMBER_OF_SEATS) { return "Le nombre de plongeurs est supérieur au nombre de places du bateau"; } $dv->US_ID = $request->pilot; $dv->DL_ID = $request->location; $dv->BO_ID = $request->boat; Loading @@ -27,6 +22,12 @@ public static function update($request, $id) $dv->DS_ACTIVE = 1; $dv->DS_MAX_DIVERS = $request->max; $dv->PRE_CODE = $request->level; if(intval($dv->DS_MAX_DIVERS) > Boat::find($request->boat)->BO_NUMBER_OF_SEATS) { return "Le nombre de plongeurs est supérieur au nombre de places du bateau"; } $dv->save(); } } Loading
resources/views/update_dive.blade.php +6 −5 Original line number Diff line number Diff line Loading @@ -36,11 +36,6 @@ </div> </div> <div class="divideFlex Column"> @if(isset($msg)) { <p>{{$msg}}</p> } @endif <h2>Lieu</h2> <hr style="height: 3px;background-color: black;margin-bottom: 15px;margin-top: 5px; width : 40%"> <div class="aligne"> Loading @@ -67,9 +62,12 @@ <hr style="height: 3px;background-color: black;margin-bottom: 15px;margin-top: 5px; width : 60%"> <div class="aligne"> <div class="divideFlexSmall Column"> <label for="minInput">Minimum :</label> <label for="maxInput">Maximum :</label> </div> <div class="divideFlexBig Column"> <input required type="number" name="min" id="minInput" min="0" placeholder="0" style="width: 20%;-moz-appearance: textfield;text-align: center;"> @if (isset($precedent)) <input required type="number" name="max" id="maxInput" min="0" placeholder="0" style="width: 20%;-moz-appearance: textfield;text-align: center;" Loading Loading @@ -189,6 +187,9 @@ class="clickableDelete clickable block w-full max-w-xs mx-auto bg-red-400 hover: </form> </div> </form> @if(isset($error)) <x-popup>{{$error}}</x-popup> @endif </div> <script src="{{ asset('/js/create_div.js') }}"></script> Loading