v0.5.4 - Created the "reservations in location" screen and added a location option when creating reservations.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<th>Event Navn</th>
|
||||
<th>Event Beskrivelse</th>
|
||||
<th>Event Dato</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/eye.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/eye.svg') }}" alt="Show"></th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
</tr>
|
||||
@@ -34,7 +34,7 @@
|
||||
<td>{{ $event->name }}</td>
|
||||
<td>{{ $event->description }}</td>
|
||||
<td>{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($event->date))->format('d/m/Y \k\l\. H:i') }}</td>
|
||||
<td><a href="{{ route("events.signups", [ "event" => $event ]) }}"><img class="w-100" src="{{ asset('/images/icons/eye-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><a href="{{ route("events.signups", [ "event" => $event ]) }}"><img class="w-100" src="{{ asset('/images/icons/eye-dark.svg') }}" alt="Show"></a></td>
|
||||
<td><a href="{{ route("events.edit", [ "event" => $event ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("events.destroy", [ "event" => $event ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
|
||||
@@ -16,12 +16,14 @@
|
||||
<table class="tbl mt-2">
|
||||
<tr>
|
||||
<th>Navn</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/eye.svg') }}" alt="Show"></th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
</tr>
|
||||
@foreach($locations as $location)
|
||||
<tr>
|
||||
<td>{{$location->name}}</td>
|
||||
<td><a href="{{ route("locations.show", [ "location" => $location ]) }}"><img class="w-100" src="{{ asset('/images/icons/eye-dark.svg') }}" alt="Show"></a></td>
|
||||
<td><a href="{{ route("locations.edit", [ "location" => $location ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("locations.destroy", [ "location" => $location ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>@yield("title")</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link type="text/css" rel="stylesheet" href="{{ mix("/css/admin.css") }}">
|
||||
<script src="http://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
|
||||
</head>
|
||||
<body>
|
||||
<header class="row align-items-center" style="background-color: #00788a;">
|
||||
<img src="{{ URL::asset('/images/logos/Logo-hvid.svg') }}" class="brand" alt="Syddansk Erhvervsskole">
|
||||
<p class="text-white" style="margin-left: auto; padding-right: 24px">Lokation: {{ $location->name }}</p>
|
||||
</header>
|
||||
<main style="min-height: calc(100% - 72px); background-color: #ffffff;">
|
||||
<?php $i = 1; ?>
|
||||
<div class="row">
|
||||
@foreach(\App\WashingMachine::query()->where("location_id", "=", $location->id)->get() as $machine)
|
||||
@foreach(\App\WashingReservation::query()->where("machine_id", "=", $machine->id)->where("time", "LIKE", date("Y-m-d"). "%")->orderBy("time", "asc")->get() as $reservation)
|
||||
@if($i % 3 == 1)
|
||||
</div>
|
||||
<div class="row w-100">
|
||||
@endif
|
||||
<div class="reservation col align-items-center" style="margin: 0 32px 1.75rem 32px; width: calc(33% - 64px);">
|
||||
<h2 style="font-size: 2vw">{{ \App\WashingMachine::query()->find($reservation->machine_id)->name }}</h2>
|
||||
<div class="col align-items-center">
|
||||
<span style="font-size: 1vw"><b>Dato:</b> {{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($reservation->time))->format('d/m/Y') }}</span>
|
||||
<span style="font-size: 2vw"><b>Tid:</b> {{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($reservation->time))->format('\k\l\. H:i') }} - {{ \App\User::query()->where("id", "=", $reservation->user_id)->first()->name_first }} {{ \App\User::query()->where("id", "=", $reservation->user_id)->first()->name_last }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php $i++; ?>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script src="{{ mix("/js/app.js") }}"></script>
|
||||
@yield("scripts")
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user