Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anders
2020-08-06 14:47:28 +02:00
46 changed files with 961 additions and 144 deletions
@@ -15,8 +15,10 @@
<h4 class="mt-0 mb-0">Telefontid:</h4>
{!! $contact->phonetimes !!}
@endif
<span class="text-center sde-black-20 mt-1">+45 {{ chunk_split($contact->phone, 2, ' ') }}</span>
<a class="btn text-center btn-sde-blue mt-1" href="tel:+45{{ $contact->phone }}">Ring</a>
@if($contact->phone)
<span class="text-center sde-black-20 mt-1">+45 {{ chunk_split($contact->phone, 2, ' ') }}</span>
<a class="btn text-center btn-sde-blue mt-1" href="tel:+45{{ $contact->phone }}">Ring</a>
@endif
@endforeach
@else
<p class="text-center">Der er ingen kontakter!</p>
@@ -13,7 +13,7 @@
<option>Ros</option>
<option>Ris</option>
</select>
<textarea name="message" placeholder="Skriv Ris/Ros besked her" required></textarea>
<textarea name="message" placeholder="Skriv Ris/Ros besked her" style="resize: vertical;" required></textarea>
<button type="submit" class="btn btn-sde-blue mt-2">Send Ris/Ros</button>
</form>
</main>
@@ -0,0 +1,69 @@
<!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>
<header class="row align-items-center" id="header">
<img class="w-50" id="sdeLogo" src="{{URL::asset('/images/logos/Logo-normal.svg')}}" onclick="location.href = '{{ route("root.index") }}';" alt="Syddansk Erhvervsskole">
<button class="ml-auto" id="toggle">
<i id="icon" class="fas fa-bars"></i>
</button>
</header>
<div class="d-none bg-sde-blue col" id="menu">
<a href="{{ route("root.index") }}">
<img src="{{URL::asset('/images/icons/Home.svg')}}" alt="Home">
Home
</a>
<a href="{{ route("menu-plans.index") }}">
<img src="{{URL::asset('/images/icons/Menuplan.svg')}}" alt="Menuplan">
Menuplan
</a>
<a href="{{ route("events.index") }}">
<img src="{{URL::asset('/images/icons/Aktiviteter.svg')}}" alt="Aktiviteter">
Aktiviteter
</a>
<a href="{{ route("washing-reservations.appindex") }}">
<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="{{ route("contacts.index") }}">
<img src="{{URL::asset('/images/icons/Kontoret.svg')}}" alt="Kontoret">
Kontoret
</a>
<a href="{{ route("phones.index") }}">
<img src="{{URL::asset('/images/icons/Vagttelefon-hvid.svg')}}" alt="Vagttelefon">
Vagttelefon
</a>
<a href="{{ route("guides.index") }}">
<img src="{{URL::asset('/images/icons/Vejledninger.svg')}}" alt="Guide">
Vejledninger
</a>
<a href="{{ route("users.account") }}">
<img src="{{URL::asset('/images/icons/user-hvid.svg')}}" alt="Konto">
Konto
</a>
<a href="{{ route('users.logout') }}">
<img src="{{URL::asset('/images/icons/Logout.svg')}}" alt="Logud">
Log Ud
</a>
</div>
<main>
@foreach(\App\News::query()->orderBy("created_at", "desc")->get() as $new)
<h2 class="sde-blue">{{ $new->name }}</h2>
{!! $new->content !!}
@endforeach
</main>
<script src="{{ mix("/js/app.js") }}"></script>
@yield("scripts")
</body>
</html>
@@ -1,70 +1 @@
{{----}}
{{------app
{{----}}
{{--Index--}}
{{----}}@extends("app.users.index")
{{--Login--}}
{{--@extends("app.users.login")--}}
{{--Register--}}
{{--@extends("app.users.register")--}}
{{--Events--}}
{{--@extends("app.events.index")--}}
{{--Vagttelefon--}}
{{--@extends("app.vagttelefons.index")--}}
{{--Booking Liste--}}
{{--@extends("app.washing-reservations.index")--}}
{{--Menuplan--}}
{{--@extends("app.menuplans.index")--}}
{{--Contact--}}
{{--@extends("app.contact.index")--}}
{{--Account--}}
{{--@extends("app.users.index")--}}
{{--Feedback--}}
{{--@extends("app.feedbacks.index")--}}
{{----}}
{{------Admin Panel
{{----}}
{{--Index--}}
{{--@extends("admin.index")--}}
{{--Create User--}}
{{--@extends("admin.users.create")--}}
{{--Read User--}}
{{--@extends("admin.users.show")--}}
{{--Update User--}}
{{--@extends("admin.users.update")--}}
{{--Create Menuplan--}}
{{--@extends("admin.menuplans.create")--}}
{{--Read Menuplan--}}
{{--@extends("admin.menuplans.show")--}}
{{--Update Menuplan--}}
{{--@extends("admin.menuplans.update")--}}
{{--Create booking--}}
{{--@extends("admin.washing-reservations.create")--}}
{{--Read booking--}}
{{--@extends("admin.washing-reservations.show")--}}
{{--Create washing-machine--}}
{{--@extends("admin.washing-machines.create")--}}
{{--Read washing-machine--}}
{{--@extends("admin.washing-machines.show")--}}
@extends("app.news.index")
@@ -13,6 +13,7 @@
@csrf
<input class="appinput" type="email" name="email" placeholder="Email" required>
<input class="btn btn-dark" type="submit" value="Send reset mail">
<button class="btn btn-dark" onclick="window.location.href = '{{ route("users.login") }}';">Tilbage</button>
</form>
</main>
@endsection
@@ -97,8 +97,8 @@
}
function onDateSelect(date, dayHolder, datetext) {
console.log("Opdaterer selects");
let events;
let locationz;
let machinez;
let buttonz;
@@ -114,20 +114,47 @@
dayHolder.classList.add("selected");
let machine_id;
let location_id;
if(document.getElementById('washing-machines'))
machine_id = document.getElementById('washing-machines').value;
else
machine_id = 0;
if(document.getElementById('locations'))
location_id = document.getElementById('locations').value;
else
location_id = 0;
axios({
method: 'get',
url: '{{ route("washing-reservations.api") }}',
params: { 'date': date, 'machine_id': machine_id, 'datetext': datetext }
params: { 'date': date, 'machine_id': machine_id, 'datetext': datetext, 'location_id': location_id }
}).then(function (response) {
console.log(response.data["unavailable_times"]);
var data = response.data;
if(document.getElementById("locations") != undefined)
locationz = document.getElementById("locations");
else {
let span = document.createElement("span");
span.classList.add("events__title");
span.innerText = "Lokation";
let select = document.createElement("select");
select.classList.add("events__title");
select.id = "locations";
select.name = "location_id";
select.onchange = function() {
onDateSelect(date, dayHolder, datetext);
}
container.appendChild(span);
container.appendChild(select);
locationz = document.getElementById("locations");
}
if(document.getElementById("washing-machines") != undefined)
machinez = document.getElementById("washing-machines");
else {
@@ -180,6 +207,24 @@
buttonz = document.getElementById("events");
}
let locations = data["locations"];
locationz.innerHTML = "";
locationz.onchange = function () {
onDateSelect(date, dayHolder, datetext);
}
for (let i = 0; i < locations.length; i++) {
let option = document.createElement("option");
option.text = locations[i]["name"];
option.value = locations[i]["id"];
if(location_id == locations[i]["id"])
option.selected = "selected";
locationz.appendChild(option);
}
let machines = data["washingmachines"];
machinez.innerHTML = "";
@@ -213,7 +258,6 @@
let unavailable_times = data["unavailable_times"];
unavailable_times.forEach(function (item, index) {
console.log(item);
document.getElementById(item).remove();
});