2019-07-11 23:55:51 +02:00
|
|
|
@extends('layout.app')
|
|
|
|
|
|
|
|
@section('left-menu')
|
|
|
|
@parent
|
|
|
|
<ul>
|
2019-09-25 18:39:01 +02:00
|
|
|
<a href="/strazacy/add"><li>Dodaj<img src="img/left_menu_icon/add.png"></li></a>
|
2019-07-11 23:55:51 +02:00
|
|
|
<li>Wyklucz<img src="img/left_menu_icon/delete.png"></li>
|
|
|
|
<li>Zawieś<img src="img/left_menu_icon/suspended.png"></li>
|
|
|
|
<li>Więcej<img src="img/left_menu_icon/more.png"></li>
|
|
|
|
</ul>
|
|
|
|
@stop
|
|
|
|
|
2019-10-05 22:29:46 +02:00
|
|
|
<head>
|
|
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
{{--$(document).ready(function () {--}}
|
|
|
|
{{-- $('.editbtn').click(function () {--}}
|
|
|
|
{{-- var currentTD = $(this).parents('tr').find('td');--}}
|
|
|
|
{{-- if ($(this).html() == 'Edytuj') {--}}
|
|
|
|
{{-- $.each(currentTD, function () {--}}
|
|
|
|
{{-- getElementById("userName{{ $user->id }}".prop('contenteditable', true);--}}
|
|
|
|
{{-- });--}}
|
|
|
|
{{-- } else {--}}
|
|
|
|
{{-- $.each(currentTD, function () {--}}
|
|
|
|
{{-- $(this).prop('contenteditable', false)--}}
|
|
|
|
{{-- });--}}
|
|
|
|
{{-- }--}}
|
|
|
|
|
|
|
|
{{-- $(this).html($(this).html() == 'Edytuj' ? 'Zapisz' : 'Edytuj')--}}
|
|
|
|
|
|
|
|
{{-- });--}}
|
|
|
|
|
|
|
|
{{--});--}}
|
|
|
|
|
|
|
|
function editUser(id){
|
|
|
|
|
|
|
|
document.getElementById("userName"+id).contentEditable = "true";
|
|
|
|
document.getElementById("userSurname"+id).contentEditable = "true";
|
|
|
|
document.getElementById("userPESEL"+id).contentEditable = "true";
|
|
|
|
document.getElementById("userFunction"+id).contentEditable = "true";
|
|
|
|
document.getElementById("userDegree"+id).contentEditable = "true";
|
|
|
|
|
|
|
|
document.getElementById("userName"+id).style.backgroundColor = "#e6e6e6";
|
|
|
|
document.getElementById("userSurname"+id).style.backgroundColor = "#e6e6e6";
|
|
|
|
document.getElementById("userPESEL"+id).style.backgroundColor = "#e6e6e6";
|
|
|
|
document.getElementById("userFunction"+id).style.backgroundColor = "#e6e6e6";
|
|
|
|
document.getElementById("userDegree"+id).style.backgroundColor = "#e6e6e6";
|
|
|
|
}
|
|
|
|
</script>
|
2019-10-06 02:15:16 +02:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
function test(id){
|
|
|
|
document.getElementById("editForm"+id).style.display="block";
|
|
|
|
}
|
|
|
|
</script>
|
2019-10-05 22:29:46 +02:00
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-11 23:55:51 +02:00
|
|
|
@section('center-area')
|
|
|
|
@parent
|
2019-10-02 15:26:30 +02:00
|
|
|
@if( auth()->check())
|
|
|
|
@if( auth()->user()->fireStationID == NULL)
|
|
|
|
Jednostka nie istnieje
|
|
|
|
@else
|
|
|
|
|
2020-01-29 01:57:19 +01:00
|
|
|
<table class='table'>
|
|
|
|
<thead>
|
2019-10-05 22:29:46 +02:00
|
|
|
<tr>
|
2020-01-29 01:57:19 +01:00
|
|
|
<th>#</th>
|
|
|
|
<th>Imie</th>
|
|
|
|
<th>Nazwisko</th>
|
|
|
|
<th>PESEL</th>
|
|
|
|
<th>E-mail</th>
|
|
|
|
<th>Funkcja</th>
|
|
|
|
<th>Stopień</th>
|
|
|
|
<th>Status</th>
|
|
|
|
<th>Operacje</th>
|
2019-10-05 22:29:46 +02:00
|
|
|
</tr>
|
2020-01-29 01:57:19 +01:00
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
@php
|
|
|
|
$i = 1;
|
|
|
|
@endphp
|
|
|
|
@foreach($users as $user)
|
|
|
|
<tr>
|
|
|
|
<th>{{$i}}</th>
|
|
|
|
<td id="userName{{ $user->id }}">{{ $user->name }}</td>
|
|
|
|
<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 }}"> {{$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) }}" class="btn btn-secondary" role="button">Edytuj</a>
|
|
|
|
<a href="{{ URL::asset('strazacy/odznaczenia/'.$user->id) }}" class="btn btn-success" role="button">Odznaczenia</a>
|
2020-02-01 01:03:57 +01:00
|
|
|
<form action="strazacy/pdf/single/" method="post" style="display:inline;">
|
|
|
|
{{ csrf_field() }}
|
|
|
|
<input type="hidden" class="form-control" name="userID" value="{{$user->id}}">
|
|
|
|
<button class="btn btn-dark" type="submit">Drukuj</button>
|
|
|
|
</form>
|
2020-01-29 01:57:19 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{-- <tr>--}}
|
|
|
|
{{-- <form id="editForm{{$user->id}}" method="POST" action="/strazacy">--}}
|
|
|
|
{{-- {{ csrf_field() }}--}}
|
|
|
|
{{-- <div class="form-group">--}}
|
|
|
|
{{-- <label for="name">Imię:</label>--}}
|
|
|
|
{{-- <input type="text" class="form-control" id="name" name="name" value="{{ old('name') }} ">--}}
|
|
|
|
{{-- </div>--}}
|
|
|
|
{{-- </form>--}}
|
|
|
|
{{-- </tr>--}}
|
|
|
|
@php
|
|
|
|
$i++;
|
|
|
|
@endphp
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{{ $users->links() }}
|
2019-10-02 15:26:30 +02:00
|
|
|
@endif
|
|
|
|
@else
|
|
|
|
Brak autoryzacji
|
|
|
|
@endif
|
|
|
|
|
|
|
|
|
2019-07-11 23:55:51 +02:00
|
|
|
@stop
|
2019-10-05 22:29:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|