Loading app/Http/Controllers/DiveSessionCreation.php +3 −1 Original line number Diff line number Diff line Loading @@ -25,8 +25,10 @@ public static function add($request) $dv->DS_MAX_DEPTH = $request->maxDepth; $dv->DS_ACTIVE = 1; $dv->DS_MAX_DIVERS = $request->max; $dv->DS_LEVEL = $request->level; $dv->PRE_CODE = $request->level; $dv->DS_LEVEL = 1; $dv->save(); error_log($dv->DS_CODE); return $dv; } } app/Http/Controllers/DiveSessionDelete.php 0 → 100644 +18 −0 Original line number Diff line number Diff line <?php namespace App\Http\Controllers; use App\Models\DivingSession; use Illuminate\Http\Request; class DiveSessionDelete extends Controller { // public static function update($id) { $dv = DivingSession::where('DS_CODE', $id)->first(); $dv->DS_ACTIVE = 0; $dv->save(); } } app/Http/Controllers/DiveSessionUpdate.php +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ public static function update($request, $id) $dv->DS_MAX_DEPTH = $request->maxDepth; $dv->DS_ACTIVE = 1; $dv->DS_MAX_DIVERS = $request->max; $dv->DS_LEVEL = $request->level; $dv->PRE_CODE = $request->level; $dv->save(); } } Loading app/Http/Controllers/DivesList.php +6 −2 Original line number Diff line number Diff line Loading @@ -3,15 +3,19 @@ namespace App\Http\Controllers; use App\Models\DivingSession; use App\Models\Prerogative; use App\Models\User; use Error; use Illuminate\View\View; class DivesList extends Controller { function index(): View { $dives = DivingSession::select('DS_CODE', 'CAR_DIVING_SESSION.DL_ID', 'DS_DATE', 'DL_DEPTH', 'CAR_SCHEDULE', 'DL_NAME') $dives = DivingSession::select('DS_CODE', 'CAR_DIVING_SESSION.DL_ID', 'DS_DATE', 'DL_DEPTH', 'CAR_SCHEDULE', 'DL_NAME', 'DS_MAX_DEPTH') ->join('CAR_DIVING_LOCATION', 'CAR_DIVING_SESSION.DL_ID', '=', 'CAR_DIVING_LOCATION.DL_ID') ->get(); return view('dives', ['dives' => $dives]); $user = session()->get('user'); return view('dives', ['dives' => $dives, 'userPre' => Prerogative::find($user->PRE_CODE)]); } } public/css/app.css 0 → 100644 +58 −0 Original line number Diff line number Diff line :root { --black : #151414aa; --white: #ffffff; --whiteGrayer : #ebebeb; --grey : #D9D9D9; --blue : #002550; --blueLighter : #4d64b8; --yellow : #ffbe55; --yellowDarker : #daa654; --good : #00ff04; --bad : #dc2323; --badDarker : #c23232; --BigTitle : 32px; --title : 25px; --font : 20px; } body{ font-family: 'Montserrat', sans-serif; } h1{ font-family: 'Space Grotesk', sans-serif; font-weight: bold; } .clickable{ background-color: var(--yellow); color: var(--black); transition: all 0.4s ease-out; } .clickable:hover{ cursor: pointer; background-color: var(--yellowDarker); color: var(--white) } .clickableRed{ background-color: var(--bad); color: var(--black); transition: all 0.4s ease-out; } .clickableRed:hover{ cursor: pointer; background-color: var(--badDarker); color: var(--white) } .align{ display: flex; align-items: center; justify-content: center; } No newline at end of file Loading
app/Http/Controllers/DiveSessionCreation.php +3 −1 Original line number Diff line number Diff line Loading @@ -25,8 +25,10 @@ public static function add($request) $dv->DS_MAX_DEPTH = $request->maxDepth; $dv->DS_ACTIVE = 1; $dv->DS_MAX_DIVERS = $request->max; $dv->DS_LEVEL = $request->level; $dv->PRE_CODE = $request->level; $dv->DS_LEVEL = 1; $dv->save(); error_log($dv->DS_CODE); return $dv; } }
app/Http/Controllers/DiveSessionDelete.php 0 → 100644 +18 −0 Original line number Diff line number Diff line <?php namespace App\Http\Controllers; use App\Models\DivingSession; use Illuminate\Http\Request; class DiveSessionDelete extends Controller { // public static function update($id) { $dv = DivingSession::where('DS_CODE', $id)->first(); $dv->DS_ACTIVE = 0; $dv->save(); } }
app/Http/Controllers/DiveSessionUpdate.php +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ public static function update($request, $id) $dv->DS_MAX_DEPTH = $request->maxDepth; $dv->DS_ACTIVE = 1; $dv->DS_MAX_DIVERS = $request->max; $dv->DS_LEVEL = $request->level; $dv->PRE_CODE = $request->level; $dv->save(); } } Loading
app/Http/Controllers/DivesList.php +6 −2 Original line number Diff line number Diff line Loading @@ -3,15 +3,19 @@ namespace App\Http\Controllers; use App\Models\DivingSession; use App\Models\Prerogative; use App\Models\User; use Error; use Illuminate\View\View; class DivesList extends Controller { function index(): View { $dives = DivingSession::select('DS_CODE', 'CAR_DIVING_SESSION.DL_ID', 'DS_DATE', 'DL_DEPTH', 'CAR_SCHEDULE', 'DL_NAME') $dives = DivingSession::select('DS_CODE', 'CAR_DIVING_SESSION.DL_ID', 'DS_DATE', 'DL_DEPTH', 'CAR_SCHEDULE', 'DL_NAME', 'DS_MAX_DEPTH') ->join('CAR_DIVING_LOCATION', 'CAR_DIVING_SESSION.DL_ID', '=', 'CAR_DIVING_LOCATION.DL_ID') ->get(); return view('dives', ['dives' => $dives]); $user = session()->get('user'); return view('dives', ['dives' => $dives, 'userPre' => Prerogative::find($user->PRE_CODE)]); } }
public/css/app.css 0 → 100644 +58 −0 Original line number Diff line number Diff line :root { --black : #151414aa; --white: #ffffff; --whiteGrayer : #ebebeb; --grey : #D9D9D9; --blue : #002550; --blueLighter : #4d64b8; --yellow : #ffbe55; --yellowDarker : #daa654; --good : #00ff04; --bad : #dc2323; --badDarker : #c23232; --BigTitle : 32px; --title : 25px; --font : 20px; } body{ font-family: 'Montserrat', sans-serif; } h1{ font-family: 'Space Grotesk', sans-serif; font-weight: bold; } .clickable{ background-color: var(--yellow); color: var(--black); transition: all 0.4s ease-out; } .clickable:hover{ cursor: pointer; background-color: var(--yellowDarker); color: var(--white) } .clickableRed{ background-color: var(--bad); color: var(--black); transition: all 0.4s ease-out; } .clickableRed:hover{ cursor: pointer; background-color: var(--badDarker); color: var(--white) } .align{ display: flex; align-items: center; justify-content: center; } No newline at end of file