forked from s421507/eOSP2
71 lines
3.1 KiB
PHP
71 lines
3.1 KiB
PHP
@extends('layout.app')
|
|
|
|
@section('left-menu')
|
|
@parent
|
|
<ul>
|
|
<a href="/strazacy"><li>Powrót<img src="/img/left_menu_icon/edit.png"></li></a>
|
|
</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'>
|
|
<table class='firefighterViewTable'>
|
|
<tr class='table-header'>
|
|
<th colspan="2" scope="colgroup" style="text-align:center">{{ $firefighter->name }} {{ $firefighter->surname }} - odznaczenia</th>
|
|
</tr>
|
|
<tr class='table-header'>
|
|
<td>Odznaczenie</td>
|
|
<td>Data przyznania</td>
|
|
@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
|
|
</table>
|
|
</p>
|
|
@else
|
|
{{ $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 }}">
|
|
<div class="form-group">
|
|
<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)
|
|
<option value="{{ $key }}">{{ $value }}</option>
|
|
@endforeach
|
|
</select>
|
|
</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
|
|
|
|
@stop
|