Merge branch 'master' of https://github.com/sebathefox/skolehjem-webapp into master
Conflicts: skolehjem/app/Http/Controllers/RootController.php
This commit is contained in:
+4
@@ -4,6 +4,7 @@ function toggleMenu(menu) {
|
||||
let htmlElement = document.getElementsByTagName('html')[0];
|
||||
let mainElement = document.getElementsByTagName('main')[0];
|
||||
let iconElement = document.getElementById("icon");
|
||||
let headerElement = document.getElementById("header");
|
||||
|
||||
if(menuElement.classList.contains("hide")) {
|
||||
menuElement.classList.remove("hide");
|
||||
@@ -12,6 +13,7 @@ function toggleMenu(menu) {
|
||||
logoElement.src = '/images/logos/Logo-hvid.svg';
|
||||
iconElement.classList.remove("fa-times");
|
||||
iconElement.classList.add("fa-bars");
|
||||
headerElement.style.position = 'fixed';
|
||||
} else {
|
||||
menuElement.classList.add("hide");
|
||||
mainElement.classList.add("d-none");
|
||||
@@ -19,6 +21,8 @@ function toggleMenu(menu) {
|
||||
logoElement.src = '/images/logos/Logo-hvid.svg';
|
||||
iconElement.classList.remove("fa-bars");
|
||||
iconElement.classList.add("fa-times");
|
||||
headerElement.style.position = 'relative';
|
||||
headerElement.style.top = '0';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
html, body {
|
||||
background-color: rgb(102, 102, 102);
|
||||
background-color: #2c2f33;
|
||||
}
|
||||
|
||||
main {
|
||||
background-color: rgb(102, 102, 102);
|
||||
background-color: #2c2f33;
|
||||
}
|
||||
|
||||
* {
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
|
||||
@section("content")
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('contacts.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Kontakt</a>
|
||||
@if(auth()->user()->can('contact.create'))
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('contacts.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Kontakt</a>
|
||||
@endif
|
||||
|
||||
<form method="post" action="{{ route("users.store") }}">
|
||||
@csrf
|
||||
@@ -20,7 +22,7 @@
|
||||
<button id="filterButton" type="button" class="btn btn-sde-blue mb-0">Filter</button>
|
||||
</div>
|
||||
|
||||
<div id="showHideCheckbox" class="mt-1 ">
|
||||
<div id="showHideCheckbox" class="mt-1">
|
||||
<input class="checkbox-inline" type="checkbox" name="checkbox" id="navn" value="navn">
|
||||
<label for="navn">Navn</label>
|
||||
<input class="checkbox-inline" type="checkbox" name="checkbox" id="titel" value="titel">
|
||||
@@ -38,8 +40,12 @@
|
||||
<th>Titel</th>
|
||||
<th>E-mail</th>
|
||||
<th>Tlf</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>
|
||||
@if(auth()->user()->can('contact.edit'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
@endif
|
||||
@if(auth()->user()->can('contact.delete'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@endif
|
||||
</tr>
|
||||
@foreach($contacts as $contact)
|
||||
<tr>
|
||||
@@ -47,14 +53,18 @@
|
||||
<td>{{ $contact->title }}</td>
|
||||
<td>{{ $contact->email }}</td>
|
||||
<td>{{ $contact->phone }}</td>
|
||||
<td><a href="{{ route("contacts.edit", [ "contact" => $contact ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("contacts.destroy", [ "contact" => $contact ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
@if(auth()->user()->can('contact.edit'))
|
||||
<td><a href="{{ route("contacts.edit", [ "contact" => $contact ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
@endif
|
||||
@if(auth()->user()->can('contact.delete'))
|
||||
<td><form method="post" action="{{ route("contacts.destroy", [ "contact" => $contact ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
<button class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
date_default_timezone_set('Europe/Copenhagen');
|
||||
?>
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('events.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Aktivitet</a>
|
||||
@if(auth()->user()->can('event.show'))
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('events.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Aktivitet</a>
|
||||
@endif
|
||||
|
||||
<form method="post" action="{{ route("events.store") }}">
|
||||
@csrf
|
||||
@@ -28,8 +30,12 @@
|
||||
<th>Aktivitet Ansvarlig</th>
|
||||
<th>Aktivitet Dato</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>
|
||||
@if(auth()->user()->can('event.edit'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
@endif
|
||||
@if(auth()->user()->can('event.delete'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@endif
|
||||
</tr>
|
||||
@foreach($events as $event)
|
||||
@if (date('Y-m-d H:i', strtotime('-1 day')) < date('Y-m-d H:i', strtotime($event->date)))
|
||||
@@ -38,14 +44,18 @@
|
||||
<td>{{ $event->accountable }}</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="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
|
||||
@method("delete")
|
||||
@if(auth()->user()->can('event.edit'))
|
||||
<td><a href="{{ route("events.edit", [ "event" => $event ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
@endif
|
||||
@if(auth()->user()->can('event.delete'))
|
||||
<td><form method="post" action="{{ route("events.destroy", [ "event" => $event ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
<button class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@@ -34,20 +34,24 @@
|
||||
<th style="width: 6em;">Dato</th>
|
||||
<th>Feedback Besked</th>
|
||||
<th style="width: 5em;">Ris el. Ros</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@if(auth()->user()->can('feedback.delete'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@endif
|
||||
</tr>
|
||||
@foreach($feedback as $fb)
|
||||
<tr>
|
||||
<td>{{ date('d-m-Y', strtotime($fb->created_at)) }}</td>
|
||||
<td>{{ $fb->message }}</td>
|
||||
<td>{{ $fb->suggestion_form }}</td>
|
||||
<td><form method="post" action="{{ route("feedbacks.destroy", [ "feedback" => $fb ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
@if(auth()->user()->can('feedback.delete'))
|
||||
<td><form method="post" action="{{ route("feedbacks.destroy", [ "feedback" => $fb ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
@@ -10,26 +10,36 @@
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('guides.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Bruger Vejledning</a>
|
||||
</div>
|
||||
<table class="tbl mt-2">
|
||||
@if(auth()->user()->can('guides.create'))
|
||||
<div class="row align-items-center mb-2">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('guides.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Bruger Vejledning</a>
|
||||
</div>
|
||||
@endif
|
||||
<table class="tbl">
|
||||
<tr>
|
||||
<th>Navn</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>
|
||||
@if(auth()->user()->can('guides.edit'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
@endif
|
||||
@if(auth()->user()->can('guides.delete'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@endif
|
||||
</tr>
|
||||
@foreach($guides as $guide)
|
||||
<tr>
|
||||
<td>{{$guide->name}}</td>
|
||||
<td><a href="{{ route("guides.edit", [ "guide" => $guide ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("guides.destroy", [ "guide" => $guide ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
@if(auth()->user()->can('guides.edit'))
|
||||
<td><a href="{{ route("guides.edit", [ "guide" => $guide ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
@endif
|
||||
@if(auth()->user()->can('guides.delete'))
|
||||
<td><form method="post" action="{{ route("guides.destroy", [ "guide" => $guide ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
@@ -125,39 +125,61 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(auth()->user()->can('user.show'))
|
||||
<div class="segment @if(\Illuminate\Support\Facades\Request::route()->getName() == "users.index") active @endif">
|
||||
<div class="tooltip"><h3 class="text-white"><a href="{{ route('users.index') }}" class="text-white"><img src="{{asset("/images/icons/users-hvid.svg")}}" class="fa"><span style="margin-left: 4px;">Brugere</span></a></h3><span class="tooltiptext">Brugere</span></div>
|
||||
</div>
|
||||
@endif
|
||||
@if(auth()->user()->can('roles.show'))
|
||||
<div class="segment @if(\Illuminate\Support\Facades\Request::route()->getName() == "roles.index") active @endif">
|
||||
<div class="tooltip"><h3 class="text-white"><a href="{{ route('roles.index') }}" class="text-white"><img src="{{asset("/images/icons/role.svg")}}" class="fa"><span style="margin-left: 4px;">Roller</span></a></h3><span class="tooltiptext">Roller</span></div>
|
||||
</div>
|
||||
@endif
|
||||
@if(auth()->user()->can('news.show'))
|
||||
<div class="segment @if(\Illuminate\Support\Facades\Request::route()->getName() == "news.index") active @endif">
|
||||
<div class="tooltip"><h3 class="text-white"><a href="{{ route('news.index') }}" class="text-white"><img src="{{asset("/images/icons/news.svg")}}" class="fa"><span style="margin-left: 4px;">Nyheder</span></a></h3><span class="tooltiptext">Nyheder</span></div>
|
||||
</div>
|
||||
@endif
|
||||
@if(auth()->user()->can('menuplan.show'))
|
||||
<div class="segment @if(\Illuminate\Support\Facades\Request::route()->getName() == "menu-plans.index") active @endif">
|
||||
<div class="tooltip"><h3 class="text-white"><a href="{{ route('menu-plans.index') }}" class="text-white"><img src="{{asset("/images/icons/Menuplan.svg")}}" class="fa"><span style="margin-left: 4px;">Menuplan</span></a></h3><span class="tooltiptext">Menuplan</span></div>
|
||||
</div>
|
||||
@endif
|
||||
@if(auth()->user()->can('event.show'))
|
||||
<div class="segment @if(\Illuminate\Support\Facades\Request::route()->getName() == "events.index") active @endif">
|
||||
<div class="tooltip"><h3 class="text-white"><a href="{{ route('events.index') }}" class="text-white"><img src="{{asset("/images/icons/Aktiviteter.svg")}}" class="fa"><span style="margin-left: 4px;">Aktiviteter</span></a></h3><span class="tooltiptext">Aktiviteter</span></div>
|
||||
</div>
|
||||
@endif
|
||||
@if(auth()->user()->can('locations.show'))
|
||||
<div class="segment @if(\Illuminate\Support\Facades\Request::route()->getName() == "locations.index") active @endif">
|
||||
<div class="tooltip"><h3 class="text-white"><a href="{{ route('locations.index') }}" class="text-white"><img src="{{asset("/images/icons/location.svg")}}" class="fa"><span style="margin-left: 4px;">Lokationer</span></a></h3><span class="tooltiptext">Lokationer</span></div>
|
||||
</div>
|
||||
@endif
|
||||
@if(auth()->user()->can('washing.machine.show'))
|
||||
<div class="segment @if(\Illuminate\Support\Facades\Request::route()->getName() == "washing-machines.index") active @endif">
|
||||
<div class="tooltip"><h3 class="text-white"><a href="{{ route('washing-machines.index') }}" class="text-white"><img src="{{asset("/images/icons/wash.svg")}}" class="fa"><span style="margin-left: 4px;">Vaskemaskiner</span></a></h3><span class="tooltiptext">Vaskemaskiner</span></div>
|
||||
</div>
|
||||
@endif
|
||||
@if(auth()->user()->can('washing.machine.reservation.show'))
|
||||
<div class="segment @if(\Illuminate\Support\Facades\Request::route()->getName() == "washing-reservations.index") active @endif">
|
||||
<div class="tooltip"><h3 class="text-white"><a href="{{ route('washing-reservations.index') }}" class="text-white"><img src="{{asset("/images/icons/wash_res.svg")}}" class="fa"><span style="margin-left: 4px;">Reservationer</span></a></h3><span class="tooltiptext">Reservationer</span></div>
|
||||
</div>
|
||||
@endif
|
||||
@if(auth()->user()->can('contact.show'))
|
||||
<div class="segment @if(\Illuminate\Support\Facades\Request::route()->getName() == "contacts.index") active @endif">
|
||||
<div class="tooltip"><h3 class="text-white"><a href="{{ route('contacts.index') }}" class="text-white"><img src="{{asset("/images/icons/phone.svg")}}" class="fa"><span style="margin-left: 4px;">Kontakter</span></a></h3><span class="tooltiptext">Kontakter</span></div>
|
||||
</div>
|
||||
@endif
|
||||
@if(auth()->user()->can('guides.show'))
|
||||
<div class="segment @if(\Illuminate\Support\Facades\Request::route()->getName() == "guides.index") active @endif">
|
||||
<div class="tooltip"><h3 class="text-white"><a href="{{ route('guides.index') }}" class="text-white"><img src="{{asset("/images/icons/Vejledninger.svg")}}" class="fa"><span style="margin-left: 4px;">Vejledning</span></a></h3><span class="tooltiptext">Vejledning</span></div>
|
||||
</div>
|
||||
@endif
|
||||
@if(auth()->user()->can('feedback.show'))
|
||||
<div class="segment @if(\Illuminate\Support\Facades\Request::route()->getName() == "feedbacks.index") active @endif">
|
||||
<div class="tooltip"><h3 class="text-white"><a href="{{ route('feedbacks.index') }}" class="text-white"><img src="{{asset("/images/icons/feedback.svg")}}" class="fa"><span style="margin-left: 4px;">Feedback</span></a></h3><span class="tooltiptext">Feedback</span></div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="w-85" style="background-color: #cccccc;">
|
||||
<div class="directorypath text-white">
|
||||
|
||||
@@ -10,28 +10,38 @@
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('locations.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Lokation</a>
|
||||
</div>
|
||||
<table class="tbl mt-2">
|
||||
@if(auth()->user()->can('locations.create'))
|
||||
<div class="row align-items-center mb-2">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('locations.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Lokation</a>
|
||||
</div>
|
||||
@endif
|
||||
<table class="tbl">
|
||||
<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>
|
||||
@if(auth()->user()->can('locations.edit'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
@endif
|
||||
@if(auth()->user()->can('locations.delete'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@endif
|
||||
</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
|
||||
@method("delete")
|
||||
@if(auth()->user()->can('locations.edit'))
|
||||
<td><a href="{{ route("locations.edit", [ "location" => $location ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
@endif
|
||||
@if(auth()->user()->can('locations.delete'))
|
||||
<td><form method="post" action="{{ route("locations.destroy", [ "location" => $location ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
@@ -11,29 +11,39 @@
|
||||
|
||||
@section("content")
|
||||
<script src="{{ asset("/js/jquery-3.2.1.min.js") }}"></script>
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('menu-plans.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Menuplan</a>
|
||||
</div>
|
||||
@if(auth()->user()->can('menuplan.create'))
|
||||
<div class="row align-items-center mb-2">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('menu-plans.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Menuplan</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<table class="tbl mt-2">
|
||||
<table class="tbl">
|
||||
<tr>
|
||||
<th>Uge</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/print-hvid.svg') }}" alt="Print"></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>
|
||||
@if(auth()->user()->can('menuplan.edit'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
@endif
|
||||
@if(auth()->user()->can('menuplan.delete'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@endif
|
||||
</tr>
|
||||
@foreach($menuPlans as $menuplan)
|
||||
<tr>
|
||||
<td>{{$menuplan->week}}</td>
|
||||
<td><a href="{{ route("pdf.genPDF", [ "menuPlan" => $menuplan ]) }}" target="_blank"><img class="w-100" src="{{ asset('/images/icons/print.svg') }}" alt="Print"></a></td>
|
||||
<td><a href="{{ route("menu-plans.edit", [ "menu_plan" => $menuplan ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("menu-plans.destroy", [ "menu_plan" => $menuplan ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
@if(auth()->user()->can('menuplan.edit'))
|
||||
<td><a href="{{ route("menu-plans.edit", [ "menu_plan" => $menuplan ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
@endif
|
||||
@if(auth()->user()->can('menuplan.delete'))
|
||||
<td><form method="post" action="{{ route("menu-plans.destroy", [ "menu_plan" => $menuplan ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
@@ -10,26 +10,36 @@
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('news.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Nyheder</a>
|
||||
</div>
|
||||
<table class="tbl mt-2">
|
||||
@if(auth()->user()->can('news.create'))
|
||||
<div class="row align-items-center mb-2">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('news.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Nyheder</a>
|
||||
</div>
|
||||
@endif
|
||||
<table class="tbl">
|
||||
<tr>
|
||||
<th>Navn</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>
|
||||
@if(auth()->user()->can('news.edit'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
@endif
|
||||
@if(auth()->user()->can('news.delete'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@endif
|
||||
</tr>
|
||||
@foreach($news as $new)
|
||||
<tr>
|
||||
<td>{{$new->subname}}</td>
|
||||
<td><a href="{{ route("news.edit", [ "news" => $new ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("news.destroy", [ "news" => $new ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
@if(auth()->user()->can('news.edit'))
|
||||
<td><a href="{{ route("news.edit", [ "news" => $new ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
@endif
|
||||
@if(auth()->user()->can('news.delete'))
|
||||
<td><form method="post" action="{{ route("news.destroy", [ "news" => $new ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
|
||||
@section("content")
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('roles.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Rolle</a>
|
||||
@if(auth()->user()->can('roles.create'))
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('roles.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Rolle</a>
|
||||
@endif
|
||||
|
||||
<form method="post" action="{{ route("roles.store") }}">
|
||||
@csrf
|
||||
@@ -23,21 +25,29 @@
|
||||
<tr>
|
||||
<th>Navn</th>
|
||||
<th>Beskrivelse</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>
|
||||
@if(auth()->user()->can('roles.edit'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
@endif
|
||||
@if(auth()->user()->can('roles.delete'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@endif
|
||||
</tr>
|
||||
@foreach($roles as $role)
|
||||
<tr>
|
||||
<td>{{ $role->name }}</td>
|
||||
<td>{{ $role->description }}</td>
|
||||
<td><a href="{{ route("roles.edit", [ "role" => $role->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("roles.destroy", [ "role" => $role ]) }}" class="w-100 nostyle">
|
||||
@if(auth()->user()->can('roles.edit'))
|
||||
<td><a href="{{ route("roles.edit", [ "role" => $role->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
@endif
|
||||
@if(auth()->user()->can('roles.delete'))
|
||||
<td><form method="post" action="{{ route("roles.destroy", [ "role" => $role ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
@@ -50,7 +50,9 @@
|
||||
|
||||
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('users.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Bruger</a>
|
||||
@if(auth()->user()->can('user.create'))
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('users.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Bruger</a>
|
||||
@endif
|
||||
|
||||
<form method="post" action="{{ route("users.store") }}">
|
||||
@csrf
|
||||
@@ -82,8 +84,12 @@
|
||||
<th>Tlf nr</th>
|
||||
<th>Rolle(r)</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/eye.svg') }}" alt="ShowImage"></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>
|
||||
@if(auth()->user()->can('user.edit'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
@endif
|
||||
@if(auth()->user()->can('user.delete'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@endif
|
||||
</tr>
|
||||
@foreach($users as $user)
|
||||
<tr>
|
||||
@@ -106,14 +112,18 @@
|
||||
@else
|
||||
<td style="overflow: visible"><a class="showUsers noImages"><img src="{{ asset('/images/icons/eye-dark.svg') }}"><img src="" class="showUserImages"></a></td>
|
||||
@endif
|
||||
<td><a href="{{ route("users.edit", [ "user" => $user->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("users.destroy", [ "user" => $user ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
@if(auth()->user()->can('user.edit'))
|
||||
<td><a href="{{ route("users.edit", [ "user" => $user->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
@endif
|
||||
@if(auth()->user()->can('user.delete'))
|
||||
<td><form method="post" action="{{ route("users.destroy", [ "user" => $user ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
<button class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
|
||||
@section("content")
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('washing-machines.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Vaskemaskine</a>
|
||||
@if(auth()->user()->can('washing.machine.create'))
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('washing-machines.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Vaskemaskine</a>
|
||||
@endif
|
||||
<div class="mt-1 ml-1">
|
||||
<select name="risRosName" id="locationID">
|
||||
<option selected="selected" name="all" value="all">Alle</option>
|
||||
@@ -25,21 +27,29 @@
|
||||
<tr>
|
||||
<th>Navn</th>
|
||||
<th>Lokation</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>
|
||||
@if(auth()->user()->can('washing.machine.edit'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
@endif
|
||||
@if(auth()->user()->can('washing.machine.delete'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@endif
|
||||
</tr>
|
||||
@foreach($machines as $machine)
|
||||
<tr>
|
||||
<td>{{$machine->name}}</td>
|
||||
<td>{{\App\Location::query()->where("id", "=", $machine->location_id)->first()->name}}</td>
|
||||
<td><a href="{{ route('washing-machines.edit', [ 'washing_machine' => $machine ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route('washing-machines.destroy', [ 'washing_machine' => $machine ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
@if(auth()->user()->can('washing.machine.edit'))
|
||||
<td><a href="{{ route('washing-machines.edit', [ 'washing_machine' => $machine ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
@endif
|
||||
@if(auth()->user()->can('washing.machine.delete'))
|
||||
<td><form method="post" action="{{ route('washing-machines.destroy', [ 'washing_machine' => $machine ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
<button class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
<th>Vaskemaskine</th>
|
||||
<th>Tidspunkt</th>
|
||||
<th>Bruger</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@if(auth()->user()->can('washing.machine.reservation.delete'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@endif
|
||||
</tr>
|
||||
@foreach($reservations as $reservation)
|
||||
@if(date('Y-m-d H:i:s', strtotime('-1 hour')) < $reservation->time)
|
||||
@@ -28,13 +30,15 @@
|
||||
<td>{{ \App\WashingMachine::query()->find($reservation->machine_id)->name }}</td>
|
||||
<td>{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($reservation->time))->format('d/m/Y \k\l\. H:i') }}</td>
|
||||
<td>{{ ucfirst(\App\User::query()->find($reservation->user_id)->name_first) }} {{ ucfirst(\App\User::query()->find($reservation->user_id)->name_last) }}</td>
|
||||
<td><form method="post" action="{{ route('washing-reservations.destroy', ['washing_reservation' => $reservation]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
@if(auth()->user()->can('washing.machine.reservation.delete'))
|
||||
<td><form method="post" action="{{ route('washing-reservations.destroy', ['washing_reservation' => $reservation]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
<button class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@@ -47,7 +47,8 @@
|
||||
</div>
|
||||
@endif
|
||||
<div class="container">
|
||||
{!! \App\Helpers::closetags(substr($guide->guide_articles, 0, 300)) !!}
|
||||
@php $tags = [ '<p>', '<b>', '<em>', '<a>', '<u>', '<s>', '<sub>', '<ul>', '<li>', '<sup>', '<div>', '<blockquote>', '<ol>', '<strong>', '<br>', '<h1>', '<h2>', '<h3>', '<h4>', '<h5>', '<h6>', '<h7>', '<span>'] @endphp
|
||||
{!! \App\Helpers::closetags(substr(strip_tags($guide->guide_articles, $tags), 0, 300)) !!}
|
||||
<div class="row" style="justify-content: center;">
|
||||
<a style="margin: 0; padding: 0; text-align: center; font-weight: 700;" class="sde-blue" href="{{route("guides.show", ["guide" => $guide->id ])}}">{{__('msg.læsmere')}}</a>
|
||||
</div>
|
||||
|
||||
@@ -34,30 +34,40 @@
|
||||
<img src="{{URL::asset('/images/icons/Home.svg')}}" alt="Home">
|
||||
Home
|
||||
</a>
|
||||
@if(auth()->user()->can('menuplan.show'))
|
||||
<a href="{{ route("menu-plans.index") }}">
|
||||
<img src="{{URL::asset('/images/icons/Menuplan.svg')}}" alt="Menuplan">
|
||||
{{ __('msg.menuplan') }}
|
||||
</a>
|
||||
@endif
|
||||
@if(auth()->user()->can('event.show'))
|
||||
<a href="{{ route("events.index") }}">
|
||||
<img src="{{URL::asset('/images/icons/Aktiviteter.svg')}}" alt="Aktiviteter">
|
||||
{{ __('msg.aktiviteter') }}
|
||||
</a>
|
||||
@endif
|
||||
@if(auth()->user()->can('washing.machine.reservation.show'))
|
||||
<a href="{{ route("washing-reservations.appindex") }}">
|
||||
<img src="{{URL::asset('/images/icons/Vaske booking liste.svg')}}" alt="Reservationer">
|
||||
{{ __('msg.reservationer') }}
|
||||
</a>
|
||||
@endif
|
||||
@if(auth()->user()->can('contact.show'))
|
||||
<a href="{{ route("contacts.index") }}">
|
||||
<img src="{{URL::asset('/images/icons/Kontoret.svg')}}" alt="Kontakter">
|
||||
{{ __('msg.kontoret') }}
|
||||
</a>
|
||||
@endif
|
||||
<a href="{{ route("phones.index") }}">
|
||||
<img src="{{URL::asset('/images/icons/Vagttelefon-hvid.svg')}}" alt="Vagttelefon">
|
||||
{{ __('msg.vagttelefon') }}
|
||||
</a>
|
||||
@if(auth()->user()->can('guides.show'))
|
||||
<a href="{{ route("guides.index") }}">
|
||||
<img src="{{URL::asset('/images/icons/Vejledninger.svg')}}" alt="Guide">
|
||||
{{ __('msg.vejledning') }}
|
||||
</a>
|
||||
@endif
|
||||
<a href="{{ route("users.account") }}">
|
||||
<img src="{{URL::asset('/images/icons/user-hvid.svg')}}" alt="Konto">
|
||||
{{ __('msg.konto') }}
|
||||
|
||||
@@ -86,8 +86,6 @@
|
||||
let date = moment().locale("da").day(weekDay).week(week);
|
||||
var datetext = moment().locale("da").day(weekDay).week(week).year() + "-" + prependZero((moment().locale("da").day(weekDay).week(week).month() + 1)) + "-" + prependZero(moment().locale("da").day(weekDay).week(week).date());
|
||||
|
||||
|
||||
|
||||
let dayHolder = document.createElement("div");
|
||||
dayHolder.classList.add("calendar-table__col");
|
||||
|
||||
@@ -95,6 +93,11 @@
|
||||
day.classList.add("calendar-table__item");
|
||||
day.innerText = date.date();
|
||||
|
||||
//If any date is selected, Add selected class to the selected day
|
||||
if(momentDate !== null)
|
||||
if(date.diff(momentDate, 'hours') == 0)
|
||||
dayHolder.classList.add("selected");
|
||||
|
||||
dayHolder.appendChild(day);
|
||||
|
||||
//If date hasn't already happened
|
||||
@@ -175,7 +178,7 @@
|
||||
fillMachines(data["washingmachines"], machine_id);
|
||||
|
||||
//Fill events (times) and remove unavailable_times
|
||||
fillTimes(data["unavailable_times"], datetext);
|
||||
fillTimes(data["unavailable_times"], datetext, date);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -281,7 +284,7 @@
|
||||
}
|
||||
|
||||
//Fill events (times) and remove unavailable_times
|
||||
function fillTimes(unavailable_times, datetext) {
|
||||
function fillTimes(unavailable_times, datetext, date) {
|
||||
var element;
|
||||
|
||||
//If a events (times) select exists, set element to the select element
|
||||
@@ -311,7 +314,7 @@
|
||||
|
||||
//Add times 8:00-20:00
|
||||
for (let hour = 8; hour < 20; hour++) {
|
||||
if(hour < new Date().getHours())
|
||||
if(hour < new Date().getHours() && moment().locale("da").diff(date, 'hours') == 0)
|
||||
continue;
|
||||
|
||||
let value = datetext + " " + prependZero(hour) + ":00:00";
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
<div class="reservation" style="margin: 0 32px 1.75rem 32px;">
|
||||
<h3>{{ \App\WashingMachine::query()->find($reservation->machine_id)->name }}</h3>
|
||||
<div class="row align-items-center">
|
||||
<span style="font-size: 4vw"><b>{{__('msg.tid')}}:</b> {{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($reservation->time))->format('d/m/Y \k\l\. H:i') }}</span>
|
||||
<span style="font-size: 4vw; white-space: pre-line;"><b>{{__('msg.tid')}}:</b> {{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($reservation->time))->format('d/m/Y \k\l\. H:i') }}
|
||||
- {{ $reservation->name }}</span>
|
||||
<form class="ml-auto" method="post" action="{{ route("washing-reservations.destroy", [ "washing_reservation" => $reservation ]) }}">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="onLoadRedirect()">
|
||||
<body>
|
||||
|
||||
<main style="justify-content: unset">
|
||||
<h1 class="sde-blue" style="font-size: 12vw; text-align: center">{{__("msg.error")}}</h1>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="onLoadRedirect()">
|
||||
<body>
|
||||
|
||||
<main style="justify-content: unset">
|
||||
<h1 class="sde-blue" style="font-size: 12vw; text-align: center">{{__("msg.error")}}</h1>
|
||||
|
||||
Reference in New Issue
Block a user