Ekapp/skolehjem/resources/views/app/washing-reservations/index.blade.php

32 lines
1.5 KiB
PHP
Raw Normal View History

2020-06-26 10:51:05 +00:00
@extends("app.layout.base")
@section("title")
Reservationer
2020-06-26 10:51:05 +00:00
@endsection
@section("content")
<main style="min-height: calc(100% - 61.34px);">
<h2 class="text-center sde-blue mb-0">Dine reservationer</h2>
@foreach($reservations as $reservation)
<div class="reservation" style="margin: 0 32px;">
<h3>{{ \App\WashingMachine::query()->find($reservation->machine_id)->name }}</h3>
<div class="row align-items-center">
<span style="font-size: 4vw"><b>Tid:</b> {{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($reservation->time))->format('d/m/Y \k\l\. H:i') }}</span>
<form class="ml-auto" method="post" action="{{ route("washing-reservations.destroy", [ "washing_reservation" => $reservation ]) }}">
@csrf
@method("delete")
<input type="hidden" name="id" value="{{ $reservation->id }}">
<button class="btn btn-sde-blue mb-0" type="submit" onclick="return confirm('Are you sure you want to remove this reservation?');">Fjern</button>
</form>
2020-06-26 10:51:05 +00:00
</div>
</div>
@endforeach
@if(count($reservations) < 1)
<p style="margin: 0 18px;">Du har ingen reservationer.</p>
@endif
<a href="{{ route("washing-reservations.create") }}" class="btn btn-sde-blue mt-auto mb-1">Reserver vaskemaskine</a>
2020-06-26 10:51:05 +00:00
</main>
@endsection
2020-07-28 12:26:32 +00:00
@section("scripts")
@endsection