Merge branch 'master' of https://git.wmi.amu.edu.pl/s421507/eOSP2
This commit is contained in:
commit
cb9965cd95
@ -15,7 +15,11 @@ class fireFightersController extends Controller
|
||||
|
||||
if(auth()->user() != null && auth()->user()->fireStationID != null ){
|
||||
// $users = user::where("fireStationID", auth()->user()->fireStationID)->get();
|
||||
$users = DB::table('users')->where("fireStationID", '=', auth()->user()->fireStationID)->get();
|
||||
// $users = DB::table('users')->where("fireStationID", '=', auth()->user()->fireStationID)->get();
|
||||
$users = DB::table('users')->where("fireStationID", '=', auth()->user()->fireStationID)
|
||||
->leftJoin('ranks', 'users.degreeID', '=', 'ranks.id')
|
||||
->leftJoin('unitFunctions', 'users.functionID', '=', 'unitFunctions.id')
|
||||
->get();
|
||||
return view("fireFighters", ["users" => $users]);
|
||||
} else{
|
||||
return view('fireFighters');
|
||||
|
13
app/ranks.php
Normal file
13
app/ranks.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ranks extends Model
|
||||
{
|
||||
//
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
protected $fillable = ['rank'];
|
||||
}
|
12
app/unitFunctions.php
Normal file
12
app/unitFunctions.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class unitFunctions extends Model
|
||||
{
|
||||
//
|
||||
protected $primaryKey = 'id';
|
||||
protected $fillable = [ 'unitFunction' ];
|
||||
}
|
@ -84,8 +84,8 @@
|
||||
<td id="userSurname{{ $user->id }}">{{ $user->surname }}</td>
|
||||
<td id="userPESEL{{ $user->id }}">{{ $user->PESEL }}</td>
|
||||
<td id="userEmail{{ $user->id }}">{{ $user->email }}</td>
|
||||
<td id="userFunction{{ $user->id }}">Zast. Naczelnika</td>
|
||||
<td id="userDegree{{ $user->id }}">Dowódca</td>
|
||||
<td id="userFunction{{ $user->id }}">{{ $user->unitFunction }}</td>
|
||||
<td id="userDegree{{ $user->id }}">{{$user->rank}}</td>
|
||||
<td id="userStatus{{ $user->id }}">@if( $user->statusID == 0) Czynny @else Wyłączony @endif</td>
|
||||
<td><a href="{{ URL::asset('strazacy/edit/'.$user->id) }}"><input type="button" onclick="" value="Edytuj"> </a></td>
|
||||
</tr>
|
||||
|
@ -1,11 +1,11 @@
|
||||
@section('menu')
|
||||
<div class="top-menu">
|
||||
<ol>
|
||||
<a href="/jednostka"><li name="jednostka"><img src="img/jednostka.png">Jednostka</li></a>
|
||||
<a href="/strazacy"><li name="strazacy"><img src="img/strazacy2.png">Strażacy</li></a>
|
||||
<a href="/pojazdy"> <li name="pojazdy"><img src="img/car.png">Pojazdy</li></a>
|
||||
<a href="/straznica"><li name="straznica"><img src="img/straznica.png">Strażnica</li></a>
|
||||
<a href="/wyjazdy"><li name="wyjazdy"><img src="img/wyjazdy.png">Wyjazdy</li></a>
|
||||
<a href="/dokumentacja"><li name="dokumentacja"><img src="img/documents.png">Dokumentacja</li></a>
|
||||
<a href="/jednostka"><li name="jednostka"><img src="../img/jednostka.png">Jednostka</li></a>
|
||||
<a href="/strazacy"><li name="strazacy"><img src="../img/strazacy2.png">Strażacy</li></a>
|
||||
<a href="/pojazdy"> <li name="pojazdy"><img src="../img/car.png">Pojazdy</li></a>
|
||||
<a href="/straznica"><li name="straznica"><img src="../img/straznica.png">Strażnica</li></a>
|
||||
<a href="/wyjazdy"><li name="wyjazdy"><img src="../img/wyjazdy.png">Wyjazdy</li></a>
|
||||
<a href="/dokumentacja"><li name="dokumentacja"><img src="../img/documents.png">Dokumentacja</li></a>
|
||||
</ol>
|
||||
</div>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<a href="/register">Register</a>
|
||||
@endif
|
||||
<div id="header">
|
||||
<div class="logo"><a href="/register"><img src="img/logo.png"></a></div>
|
||||
<div class="logo"><a href="/register"><img src="../img/logo.png"></a></div>
|
||||
@include('inc.menu')
|
||||
<div class="userInfo">
|
||||
<?php
|
||||
|
Loading…
Reference in New Issue
Block a user