Loading app/Http/Controllers/SecuritySheets/SecuritySheetController.php +11 −1 Original line number Diff line number Diff line Loading @@ -104,13 +104,23 @@ private function callView(string $ds_code, string $viewName){ ]; } $userRole = 'DIR'; $roles = session('user')->roles; foreach($roles as $role){ if($role->ROL_CODE === 'RES'){ $userRole = 'RES'; break; } } return view($viewName, [ 'dive' => $dive, 'director' => $director, 'surfaceSecurity' => $surfaceSecurity, 'driver' => $driver, 'location' => $location, 'divingGroups' => $divingGroupsForView 'divingGroups' => $divingGroupsForView, 'userRole' => $userRole ]); } Loading app/Models/DivingSession.php +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ static public function sessionsWithFilledFile():array static public function sessionsWithFilledFileWithId():array { $res = DB::table('CAR_DIVING_SESSION')->where('US_ID',session('user')->US_ID)->get(); $res = DB::table('CAR_DIVING_SESSION')->where('US_ID_CAR_DIRECT',session('user')->US_ID)->get(); return $res->toArray(); } Loading resources/views/securitySheet/edit.blade.php +16 −2 Original line number Diff line number Diff line Loading @@ -106,7 +106,14 @@ class="dg-start border-2 border-solid border-gray-500" type="time" <td class="px-12 py-4"> <input id="dg{{ $groupNumber }}-act-time" class="dg-act-time" type="number" value = "{{ $divingGroup['group']->DG_EFFECTIVE_DIVING_DURATION }}" style="font-size: 20px;width: 50%;-moz-appearance: textfield;text-align: center;background-color: var(--yellow);padding: 10px;border-radius: 10px;"> @unless ($userRole === 'RES') disabled="disabled" @endif style="font-size: 20px;width: 50%;-moz-appearance: textfield;text-align: center;background-color: @if ($userRole === 'RES') var(--yellow); @else var(--grey); @endif padding: 10px;border-radius: 10px;"> </td> </tr> Loading @@ -121,8 +128,15 @@ class="dg-start border-2 border-solid border-gray-500" type="time" </td> <td class="px-12 py-4"> <input style="font-size: 20px;width: 50%;-moz-appearance: textfield;text-align: center;background-color: var(--yellow);padding: 10px;border-radius: 10px;" style="font-size: 20px;width: 50%;-moz-appearance: textfield;text-align: center;background-color: @if ($userRole === 'RES') var(--yellow); @else var(--grey); @endif padding: 10px;border-radius: 10px;" id="dg{{ $groupNumber }}-act-dep" class="dg-act-dep" type="number" @unless ($userRole === 'RES') disabled="disabled" @endif value = "{{ $divingGroup['group']->DG_MAX_EFFECTIVE_DEPTH }}"> </td> </tr> Loading Loading
app/Http/Controllers/SecuritySheets/SecuritySheetController.php +11 −1 Original line number Diff line number Diff line Loading @@ -104,13 +104,23 @@ private function callView(string $ds_code, string $viewName){ ]; } $userRole = 'DIR'; $roles = session('user')->roles; foreach($roles as $role){ if($role->ROL_CODE === 'RES'){ $userRole = 'RES'; break; } } return view($viewName, [ 'dive' => $dive, 'director' => $director, 'surfaceSecurity' => $surfaceSecurity, 'driver' => $driver, 'location' => $location, 'divingGroups' => $divingGroupsForView 'divingGroups' => $divingGroupsForView, 'userRole' => $userRole ]); } Loading
app/Models/DivingSession.php +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ static public function sessionsWithFilledFile():array static public function sessionsWithFilledFileWithId():array { $res = DB::table('CAR_DIVING_SESSION')->where('US_ID',session('user')->US_ID)->get(); $res = DB::table('CAR_DIVING_SESSION')->where('US_ID_CAR_DIRECT',session('user')->US_ID)->get(); return $res->toArray(); } Loading
resources/views/securitySheet/edit.blade.php +16 −2 Original line number Diff line number Diff line Loading @@ -106,7 +106,14 @@ class="dg-start border-2 border-solid border-gray-500" type="time" <td class="px-12 py-4"> <input id="dg{{ $groupNumber }}-act-time" class="dg-act-time" type="number" value = "{{ $divingGroup['group']->DG_EFFECTIVE_DIVING_DURATION }}" style="font-size: 20px;width: 50%;-moz-appearance: textfield;text-align: center;background-color: var(--yellow);padding: 10px;border-radius: 10px;"> @unless ($userRole === 'RES') disabled="disabled" @endif style="font-size: 20px;width: 50%;-moz-appearance: textfield;text-align: center;background-color: @if ($userRole === 'RES') var(--yellow); @else var(--grey); @endif padding: 10px;border-radius: 10px;"> </td> </tr> Loading @@ -121,8 +128,15 @@ class="dg-start border-2 border-solid border-gray-500" type="time" </td> <td class="px-12 py-4"> <input style="font-size: 20px;width: 50%;-moz-appearance: textfield;text-align: center;background-color: var(--yellow);padding: 10px;border-radius: 10px;" style="font-size: 20px;width: 50%;-moz-appearance: textfield;text-align: center;background-color: @if ($userRole === 'RES') var(--yellow); @else var(--grey); @endif padding: 10px;border-radius: 10px;" id="dg{{ $groupNumber }}-act-dep" class="dg-act-dep" type="number" @unless ($userRole === 'RES') disabled="disabled" @endif value = "{{ $divingGroup['group']->DG_MAX_EFFECTIVE_DEPTH }}"> </td> </tr> Loading