2019-07-11 23:55:51 +02:00
|
|
|
@extends('layout.app')
|
|
|
|
|
|
|
|
@section('left-menu')
|
|
|
|
@parent
|
|
|
|
<ul>
|
2019-11-17 17:08:02 +01:00
|
|
|
<a href="/pojazdy/add"><li>Dodaj<img src="img/left_menu_icon/add.png"></li></a>
|
2019-07-11 23:55:51 +02:00
|
|
|
</ul>
|
|
|
|
@stop
|
|
|
|
|
|
|
|
@section('center-area')
|
|
|
|
@parent
|
2019-11-17 17:08:02 +01:00
|
|
|
@if( auth()->check())
|
|
|
|
@if( auth()->user()->fireStationID == NULL)
|
|
|
|
Jednostka nie istnieje
|
|
|
|
@else
|
2019-07-11 23:55:51 +02:00
|
|
|
|
2019-11-17 17:08:02 +01:00
|
|
|
<table class='firefighterViewTable'>
|
|
|
|
<tr class='table-header'>
|
|
|
|
<td>LP</td>
|
|
|
|
<td>Typ Pojazdu</td>
|
|
|
|
<td>Marka</td>
|
|
|
|
<td>Nr rej.</td>
|
|
|
|
<td>Kryptonim</td>
|
|
|
|
<td>Rok Produkcji</td>
|
|
|
|
<td>Rodzaj napędu</td>
|
|
|
|
<td>Przegląd</td>
|
|
|
|
<td>OC</td>
|
|
|
|
@php
|
|
|
|
$lp=0 // liczba porządkowa
|
|
|
|
@endphp
|
|
|
|
@foreach($vehicles as $vehicle)
|
|
|
|
@php
|
|
|
|
$lp = $lp + 1
|
|
|
|
@endphp
|
|
|
|
<tr>
|
2019-12-06 21:22:15 +01:00
|
|
|
<form action="{{ route('vehicles.destroy', $vehicle->id)}}" method="post">
|
2019-11-17 17:08:02 +01:00
|
|
|
<td>{{ $lp }}</td>
|
|
|
|
<td id="name{{ $vehicle->id }}">{{ $vehicle->name }}</td>
|
|
|
|
<td id="brand{{ $vehicle->id }}">{{ $vehicle->brand }}</td>
|
|
|
|
<td id="registrationNumber{{ $vehicle->id }}">{{ $vehicle->registrationNumber }}</td>
|
|
|
|
<td id="codename{{ $vehicle->id }}">{{ $vehicle->codename }}</td>
|
|
|
|
<td id="productionYear{{ $vehicle->id }}">{{ $vehicle->productionYear }}</td>
|
|
|
|
<td id="driveType{{ $vehicle->id }}">{{ $vehicle->driveType }}</td>
|
|
|
|
<td id="examExpirationDate{{ $vehicle->id }}">{{ $vehicle->examExpirationDate }}</td>
|
|
|
|
<td id="insuranceExpirationDate{{ $vehicle->id }}">{{ $vehicle->insuranceExpirationDate }}</td>
|
2019-12-28 19:01:42 +01:00
|
|
|
<td><a href="{{ URL::asset('pojazdy/edit/'.$vehicle->id) }}"><input type="button" onclick="" value="Edytuj"> </a></td>
|
2019-12-06 21:22:15 +01:00
|
|
|
{{ csrf_field() }}
|
|
|
|
@method('DELETE')
|
2019-12-28 19:01:42 +01:00
|
|
|
<td><button class="btn btn-danger" type="submit">Usuń</button></td>
|
|
|
|
</form>
|
|
|
|
@if ($vehicle->status == 1)
|
|
|
|
<form method="POST" action="/pojazdy/deactivate">
|
|
|
|
{{ csrf_field() }}
|
|
|
|
<input type="hidden" class="form-control" name="vehicleID" value="{{ $vehicle->id }}">
|
|
|
|
<td><button style="cursor:pointer" type="submit" class="btn btn-primary">Zawieś</button></td>
|
|
|
|
</form>
|
|
|
|
@elseif ($vehicle->status == 0)
|
|
|
|
<form method="POST" action="/pojazdy/activate">
|
|
|
|
{{ csrf_field() }}
|
|
|
|
<input type="hidden" class="form-control" name="vehicleID" value="{{ $vehicle->id }}">
|
|
|
|
<td><button style="cursor:pointer" type="submit" class="btn btn-primary">Przywróć do służby</button></td>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
@endif
|
|
|
|
|
2019-11-17 17:08:02 +01:00
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</table>
|
|
|
|
|
|
|
|
@endif
|
|
|
|
@else
|
|
|
|
Brak autoryzacji
|
|
|
|
@endif
|
2019-07-11 23:55:51 +02:00
|
|
|
@stop
|