2020-01-01 03:18:06 +01:00
|
|
|
@extends('layout.app')
|
|
|
|
|
|
|
|
@section('left-menu')
|
|
|
|
@parent
|
|
|
|
<ul>
|
2020-01-05 14:36:21 +01:00
|
|
|
<a href="/strazacy"><li>Powrót<img src="/img/left_menu_icon/edit.png"></li></a>
|
2020-01-01 03:18:06 +01:00
|
|
|
</ul>
|
|
|
|
@stop
|
|
|
|
@section('center-area')
|
|
|
|
@parent
|
|
|
|
|
|
|
|
@if( auth()->check())
|
|
|
|
@if( auth()->user()->fireStationID == NULL)
|
|
|
|
Jednostka nie istnieje
|
|
|
|
@else
|
|
|
|
@if(count($awardedDecorations) > 0)
|
|
|
|
<p align='center'>
|
2020-01-29 01:57:19 +01:00
|
|
|
<table class='table'>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th colspan="3" scope="colgroup" style="text-align:center">{{ $firefighter->name }} {{ $firefighter->surname }} - odznaczenia</th>
|
2020-01-01 03:18:06 +01:00
|
|
|
</tr>
|
2020-01-29 01:57:19 +01:00
|
|
|
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<th>Odznaczenie</th>
|
|
|
|
<th>Data przyznania</th>
|
|
|
|
<th>Operacja</th>
|
|
|
|
@foreach($awardedDecorations as $awardedDecoration)
|
|
|
|
<tr>
|
|
|
|
<form action="{{ route('decorations.destroy', $awardedDecoration->decorationsFirefightersID)}}" method="post">
|
|
|
|
<td id="decorationName{{ $awardedDecoration->decorationsFirefightersID }}">{{ $awardedDecoration->decorationName }}</td>
|
|
|
|
<td id="dateOfAward{{ $awardedDecoration->decorationsFirefightersID }}">{{ $awardedDecoration->dateOfAward }}</td>
|
|
|
|
<td>
|
|
|
|
{{ csrf_field() }}
|
|
|
|
@method('DELETE')
|
|
|
|
<button class="btn btn-danger" type="submit">Usuń</button>
|
|
|
|
</td>
|
|
|
|
</form>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2020-01-01 03:18:06 +01:00
|
|
|
</p>
|
2020-01-05 14:36:21 +01:00
|
|
|
@else
|
2020-01-01 03:18:06 +01:00
|
|
|
{{ $firefighter->name }} {{ $firefighter->surname }} nie posiada żadnych odznaczeń.
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<form method="POST" action="/strazacy/odznaczenia/.$firefighter->id">
|
|
|
|
{{ csrf_field() }}
|
|
|
|
<input type="hidden" class="form-control" name="firefighterID" value="{{ $firefighter->id }}">
|
2020-01-05 14:36:21 +01:00
|
|
|
<div class="form-group">
|
2020-01-01 03:18:06 +01:00
|
|
|
<label for="decoration">Wybierz odznaczenie:</label>
|
|
|
|
<select name="decoration" class="form-control" style="width:300px">
|
|
|
|
<option value="">--- Wybierz odznaczenie ---</option>
|
|
|
|
@foreach ($decoration as $key => $value)
|
2020-01-30 21:19:05 +01:00
|
|
|
@if(Illuminate\Support\Facades\Input::old('decoration') == $key)
|
|
|
|
<option value="{{ $key }}" selected >{{ $value }}</option>
|
|
|
|
@else
|
|
|
|
<option value="{{ $key }}">{{ $value }}</option>
|
|
|
|
@endif
|
2020-01-01 03:18:06 +01:00
|
|
|
@endforeach
|
2020-01-05 14:36:21 +01:00
|
|
|
</select>
|
2020-01-01 03:18:06 +01:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="dateOfAward">Data przyznania:</label>
|
|
|
|
<input type="date" class="form-control" style="width:300px" id="dateOfAward" name="dateOfAward" value="{{ old('dateOfAward') }}">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<button style="cursor:pointer" type="submit" class="btn btn-primary">Przyznaj odznaczenie</button>
|
|
|
|
</div>
|
|
|
|
@include('inc.formerrors')
|
|
|
|
</form>
|
|
|
|
@endif
|
|
|
|
@else
|
|
|
|
Brak autoryzacji
|
|
|
|
@endif
|
|
|
|
|
2020-01-05 14:36:21 +01:00
|
|
|
@stop
|