Merge remote-tracking branch 'origin/master'

# Conflicts:
#	skolehjem/app/MenuPlan.php
This commit is contained in:
Anders
2020-06-30 12:40:02 +02:00
70 changed files with 990 additions and 504 deletions
+18
View File
@@ -93,6 +93,7 @@ function generateCalendar(weekOffset = 0) {
function onDateSelect(date) {
let events;
let machinez;
let buttonz;
let container = document.getElementById("event-container");
@@ -129,6 +130,23 @@ function onDateSelect(date) {
events = document.getElementById("events");
}
if(document.getElementById("create-reservation") != undefined)
buttonz = document.getElementById("create-reservation");
else {
// let span = document.createElement("span");
// span.classList.add("events__title");
// span.innerText = "Tider";
let button = document.createElement("button");
// button.classList.add("events__title");
button.id = "create-reservation";
button.innerText = "Reserver";
// container.appendChild(span);
container.appendChild(button);
buttonz = document.getElementById("events");
}
// events.innerHTML = "";
+5
View File
@@ -55,3 +55,8 @@ input.appinput {
line-height: 2rem;
margin-bottom: 1rem;
}
.appinput::placeholder {
opacity: 1;
color: white;
}
@@ -6,7 +6,7 @@
@endsection
@section("path")
<a href="" class="text-white">Opret Kontakt</a> /
<a href="{{ route('contacts.create') }}" class="text-white">Opret Kontakt</a> /
@endsection
@section("content")
@@ -6,7 +6,7 @@
@endsection
@section("path")
<a href="" class="text-white">Slet Kontakt</a> /
<a href="{{ route('contacts.destroy') }}" class="text-white">Slet Kontakt</a> /
@endsection
@section("content")
@@ -6,7 +6,7 @@
@endsection
@section("path")
<a href="" class="text-white">Vis Kontakter</a> /
<a href="{{ route('contacts.index', [ 'contacts' => $contacts ]) }}" class="text-white">Vis Kontakter</a> /
@endsection
@section("content")
@@ -6,7 +6,7 @@
@endsection
@section("path")
<a href="" class="text-white">Slet Kontakt</a> /
<a href="{{ route('contacts.destroy') }}" class="text-white">Slet Kontakt</a> /
@endsection
@section("content")
@@ -6,7 +6,7 @@
@endsection
@section("path")
<a href="" class="text-white">Opbevar Kontakt</a> /
<a href="{{ route('contacts.store') }}" class="text-white">Opbevar Kontakt</a> /
@endsection
@section("content")
@@ -6,7 +6,7 @@
@endsection
@section("path")
<a href="" class="text-white">Vis Events</a> /
<a href="{{route("events.edit", ["event" => $event])}}" class="text-white">Vis Events</a> /
@endsection
@section("content")
@@ -14,10 +14,13 @@
<form method="post" action="{{route("events.update", ["event" => $event])}}">
@csrf
@method("PUT")
<label for="title">Titel:</label>
<input value="{{$event->name}}" type="text" name="title" id="title" required>
<label for="link">Linket:</label>
<input value="{{$event->description}}" type="text" name="link" id="link" required>
<label for="event_title">Event Titel:</label>
<input value="{{$event->name}}" type="text" name="name" id="event_title" required>
<label for="description">Beskrivelse</label>
<input value="{{$event->description}}" type="text" name="description" id="description" required>
<label for="date">Beskrivelse</label>
<input value="{{$event->date}}" type="date" name="date" id="date" required>
<input type="submit" class="btn btn-dark text-white" value="Rediger">
</form>
@endsection
@@ -19,8 +19,8 @@
</tr>
@foreach($links as $link)
<tr>
<th>{{$link->name}}</th>
<th><a href="{{$link->link}}">{{$link->link}}</th>
<td>{{$link->name}}</td>
<td><a href="{{$link->link}}">{{$link->link}}</td>
<td><a href="{{ route("external-links.edit", [ "external_link" => $link ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
<td><form method="post" action="{{ route("external-links.destroy", [ "external_link" => $link ]) }}" class="w-100 nostyle">
@csrf
@@ -19,6 +19,15 @@
<a href="{{ route('users.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Bruger</a>
</div>
</div>
<div class="segment">
<h3 class="text-white">Roller</h3>
<div class="row">
<a href="{{ route("roles.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Roller</a>
</div>
<div class="row">
<a href="{{ route('roles.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Rolle</a>
</div>
</div>
<div class="segment">
<h3 class="text-white">Menuplan</h3>
<div class="row">
@@ -49,22 +58,31 @@
<a href="{{ route('washing-machines.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Vaskemaskine</a>
</div>
</div>
<div class="segment">
<h3 class="text-white">Eksterne Links</h3>
<div class="row">
<a href="{{ route("external-links.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Links</a>
</div>
<div class="row">
<a href="{{ route('external-links.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Link</a>
</div>
</div>
{{-- <div class="segment">--}}
{{-- <h3 class="text-white">Personale</h3>--}}
{{-- <div class="row">--}}
{{-- <a href="{{ route('staff.index') }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Personale</a>--}}
{{-- </div>--}}
{{-- <div class="row">--}}
{{-- <a href="{{ route('staff.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Personal</a>--}}
{{-- </div>--}}
{{-- </div>--}}
<div class="segment">
<h3 class="text-white">Kontakter</h3>
<div class="row">
<a href="{{ route("contacts.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Kontakter</a>
</div>
<div class="row">
<a href="{{ route("contacts.create") }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Kontakt</a>
</div>
</div>
<div class="segment">
<h3 class="text-white">Personale</h3>
<div class="row">
<a href="{{ route('staff.index') }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Personale</a>
</div>
<div class="row">
<a href="{{ route('staff.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Personal</a>
<a href="{{ route('contacts.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Kontakt</a>
</div>
</div>
<div class="segment">
@@ -0,0 +1,22 @@
@extends("admin.layout.base")
@extends("admin.layout.header")
@section("title")
Rolle - Opret
@endsection
@section("path")
<a href="{{ route('roles.create') }}" class="text-white">Opret Rolle</a> /
@endsection
@section("content")
<h1>Opret Rolle:</h1>
<form method="post" action="{{ route("roles.store") }}">
@csrf
<label for="name">Navn:</label>
<input type="text" name="name" id="name" placeholder="Admin" required>
<label for="name">Beskrivelse:</label>
<input type="text" name="description" id="description" placeholder="Admin rollen bruges til administratorene" required>
<input type="submit" class="btn btn-dark text-white" value="Opret">
</form>
@endsection
@@ -0,0 +1,13 @@
@extends("admin.layout.base")
@extends("admin.layout.header")
@section("title")
Rolle - Fjern
@endsection
@section("path")
<a href="{{ route('roles.delete') }}" class="text-white">Fjern Rolle</a> /
@endsection
@section("content")
@endsection
@@ -0,0 +1,23 @@
@extends("admin.layout.base")
@extends("admin.layout.header")
@section("title")
Rolle - Rediger
@endsection
@section("path")
<a href="{{ route('roles.edit', ['role' => $role]) }}" class="text-white">Rediger Rolle</a> /
@endsection
@section("content")
<h1>Rediger Rolle:</h1>
<form method="post" action="{{ route("roles.update", ['role' => $role]) }}">
@csrf
@method("put")
<label for="name">Navn:</label>
<input type="text" name="name" id="name" placeholder="Admin" value="{{ $role->name }}" required>
<label for="name">Beskrivelse:</label>
<input type="text" name="description" id="description" placeholder="Admin rollen bruges til administratorene" value="{{ $role->description }}" required>
<input type="submit" class="btn btn-dark text-white" value="Rediger">
</form>
@endsection
@@ -0,0 +1,35 @@
@extends("admin.layout.base")
@extends("admin.layout.header")
@section("title")
Rolle - Vis
@endsection
@section("path")
<a href="{{ route('roles.index') }}" class="text-white">Vis Roller</a> /
@endsection
@section("content")
<table class="tbl">
<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>
</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">
@csrf
@method("delete")
<button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form>
</td>
</tr>
@endforeach
</table>
@endsection
@@ -0,0 +1,14 @@
@extends("admin.layout.base")
@extends("admin.layout.header")
@section("title")
Rolle - Vis
@endsection
@section("path")
<a href="{{ route('rolle.index') }}" class="text-white">Vis Brugere</a> /
@endsection
@section("content")
show.blade.php
@endsection
@@ -0,0 +1,14 @@
@extends("admin.layout.base")
@extends("admin.layout.header")
@section("title")
Rolle - Opret
@endsection
@section("path")
<a href="{{ route('roles.create') }}" class="text-white">Opret Roller</a> /
@endsection
@section("content")
Rollen blev (ikke) oprettet.
@endsection
@@ -0,0 +1,14 @@
@extends("admin.layout.base")
@extends("admin.layout.header")
@section("title")
Rolle - Rediger
@endsection
@section("path")
<a href="{{ route('roles.edit', ['role' => $role]) }}" class="text-white">Rediger Rolle</a> /
@endsection
@section("content")
Din rolle blev (ikke) redigeret.
@endsection
@@ -27,9 +27,10 @@
<input type="tel" name="phone" id="tel" placeholder="12345678" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required>
<label for="role">Rolle:</label>
<select name="role" id="role" class="mb-2" required>
<option value="admin">Admin</option>
<option value="staff">Personale</option>
<option value="resident">Beboer</option>
<option disabled selected value> -- Vælg en Rolle -- </option>
@foreach($roles as $role)
<option value="{{ $role->name }}">{{ $role->name }}</option>
@endforeach
</select>
<input type="submit" class="btn btn-dark text-white" value="Opret">
</form>
@@ -28,9 +28,10 @@
<input type="tel" name="phone" id="tel" value="{{ $user->phone }}" required>
<label for="role">Rolle:</label>
<select name="role" id="role" class="mb-2" required>
<option value="admin">Admin</option>
<option value="staff">Personale</option>
<option value="resident">Beboer</option>
<option disabled selected value> -- Vælg en Rolle -- </option>
@foreach($roles as $role)
<option value="{{ $role->name }}">{{ $role->name }}</option>
@endforeach
</select>
<input type="submit" class="btn btn-dark text-white" value="Rediger">
</form>
@@ -0,0 +1,18 @@
@extends("user.layout.base")
@section("title")
Login
@endsection
@section("content")
<main style="background-color: #00788a; height: 100%;">
<div class="brand">
<img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole">
</div>
<form action="" method="post">
@csrf
<input class="appinput" type="email" name="email" placeholder="Email" required>
<input class="btn btn-dark" type="submit" value="Send reset mail">
</form>
</main>
@endsection
@@ -1,4 +1,4 @@
@extends("app.layout.base")
@extends("user.layout.base")
@section("title")
Login
@@ -9,7 +9,7 @@
<div class="brand">
<img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole">
</div>
<form action="" method="post">
<form action="{{ route("users.login") }}" method="post">
@csrf
<input class="appinput" type="email" name="email" placeholder="Email" required>
<input class="appinput" type="password" name="password" placeholder="Password" required>
@@ -20,8 +20,7 @@
</span>
</label>
<input class="btn btn-dark" type="submit" value="Sign in">
<button class="btn" onclick="window.location = '';">Sign up</button>
</form>
<a class="text-white text-center" href="">Forgot password?</a>
<a class="text-white text-center" href="{{ route('users.show-forgot') }}">Forgot password?</a>
</main>
@endsection
@@ -16,6 +16,10 @@
</button>
</header>
<div class="d-none bg-sde-blue col" id="menu">
<a href="{{ route("root.index") }}">
Home
</a>
<a href="{{ route("menu-plans.index") }}">
<img src="{{URL::asset('/images/icons/Menuplan.svg')}}" alt="Menuplan">
Menuplan
@@ -28,15 +32,16 @@
<img src="{{URL::asset('/images/icons/Vaske booking liste.svg')}}" alt="Reservationer">
Reservationer
</a>
{{-- IKKE SLETTES!!!! --}}
{{-- <a href="#">--}}
{{-- <img src="{{URL::asset('/images/icons/Galleri.svg')}}" alt="Galleri">--}}
{{-- Galleri--}}
{{-- </a>--}}
<a href="#">
<img src="{{URL::asset('/images/icons/Galleri.svg')}}" alt="Galleri">
Galleri
</a>
<a href="{{ route("contacts.index") }}">
<img src="{{URL::asset('/images/icons/Kontoret.svg')}}" alt="Kontoret">
Kontoret
</a>
<a href="#">
<a href="{{ route("phones.index") }}">
<img src="{{URL::asset('/images/icons/Vagttelefon-hvid.svg')}}" alt="Vagttelefon">
Vagttelefon
</a>
@@ -0,0 +1,18 @@
@extends("user.layout.base")
@section("title")
Login
@endsection
@section("content")
<main style="background-color: #00788a; height: 100%;">
<div class="brand">
<img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole">
</div>
<form action="" method="post">
@csrf
<input class="appinput" type="email" name="email" placeholder="Email" required>
<input class="btn btn-dark" type="submit" value="Send reset mail">
</form>
</main>
@endsection
@@ -1,4 +1,4 @@
@extends("app.layout.base")
@extends("user.layout.base")
@section("title")
Login
@@ -9,7 +9,8 @@
<div class="brand">
<img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole">
</div>
<form action="" method="post">
<form action="{{ route("users.login") }}" method="post">
@csrf
<input class="appinput" type="email" name="email" placeholder="Email" required>
<input class="appinput" type="password" name="password" placeholder="Password" required>
<label class="toggle">
@@ -19,8 +20,7 @@
</span>
</label>
<input class="btn btn-dark" type="submit" value="Sign in">
<button class="btn" onclick="window.location = '';">Sign up</button>
</form>
<a class="text-white text-center" href="">Forgot password?</a>
<a class="text-white text-center" href="{{ route('users.show-forgot') }}">Forgot password?</a>
</main>
@endsection
@@ -1,27 +0,0 @@
@extends('layout.base')
@section("title")
Opret Bruger
@endsection
@section('content')
<div>
<form action="{{ route("users.store") }}" method="post">
@csrf
<label for="name_first">First Name</label>
<input id="name_first" type="text" name="name_first">
<label for="name_last">Last Name</label>
<input id="name_last" type="text" name="name_last">
<label for="email">Email</label>
<input id="email" type="email" name="email">
<label for="password">Password</label>
<input id="password" type="password" name="password">
<input type="submit" value="Opret">
</form>
</div>
@endsection
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>@yield("title")</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link type="text/css" rel="stylesheet" href="{{ mix("/css/webapp.css") }}">
</head>
<body style="background-color: #00788a;">
@yield("content")
<script src="{{ mix("/js/app.js") }}"></script>
@yield("scripts")
</body>
</html>
-100
View File
@@ -1,100 +0,0 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title>
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
<!-- Styles -->
<style>
html, body {
background-color: #fff;
color: #636b6f;
font-family: 'Nunito', sans-serif;
font-weight: 200;
height: 100vh;
margin: 0;
}
.full-height {
height: 100vh;
}
.flex-center {
align-items: center;
display: flex;
justify-content: center;
}
.position-ref {
position: relative;
}
.top-right {
position: absolute;
right: 10px;
top: 18px;
}
.content {
text-align: center;
}
.title {
font-size: 84px;
}
.links > a {
color: #636b6f;
padding: 0 25px;
font-size: 13px;
font-weight: 600;
letter-spacing: .1rem;
text-decoration: none;
text-transform: uppercase;
}
.m-b-md {
margin-bottom: 30px;
}
</style>
</head>
<body>
<div class="flex-center position-ref full-height">
@if (Route::has('login'))
<div class="top-right links">
@auth
<a href="{{ url('/home') }}">Home</a>
@else
<a href="{{ route('login') }}">Login</a>
@if (Route::has('register'))
<a href="{{ route('register') }}">Register</a>
@endif
@endauth
</div>
@endif
<div class="content">
<div class="title m-b-md">
Laravel
</div>
<div class="links">
<a href="https://laravel.com/docs">Docs</a>
<a href="https://laracasts.com">Laracasts</a>
<a href="https://laravel-news.com">News</a>
<a href="https://blog.laravel.com">Blog</a>
<a href="https://nova.laravel.com">Nova</a>
<a href="https://forge.laravel.com">Forge</a>
<a href="https://vapor.laravel.com">Vapor</a>
<a href="https://github.com/laravel/laravel">GitHub</a>
</div>
</div>
</div>
</body>
</html>