Added button to calendar.js

This commit is contained in:
Sebastian Davaris 2020-06-29 10:14:47 +02:00
parent 0afa8a7aa3
commit c823bdd963
3 changed files with 29 additions and 2 deletions

View File

@ -93,6 +93,7 @@ function generateCalendar(weekOffset = 0) {
function onDateSelect(date) { function onDateSelect(date) {
let events; let events;
let machinez; let machinez;
let buttonz;
let container = document.getElementById("event-container"); let container = document.getElementById("event-container");
@ -129,6 +130,23 @@ function onDateSelect(date) {
events = document.getElementById("events"); 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 = ""; // events.innerHTML = "";

View File

@ -19,8 +19,8 @@
</tr> </tr>
@foreach($links as $link) @foreach($links as $link)
<tr> <tr>
<th>{{$link->name}}</th> <td>{{$link->name}}</td>
<th><a href="{{$link->link}}">{{$link->link}}</th> <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><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"> <td> <form method="post" action="{{ route("external-links.destroy", [ "external_link" => $link ]) }}" class="w-100">
@csrf @csrf

View File

@ -40,6 +40,15 @@
<a href="{{ route('washing-machines.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Vaskemaskine</a> <a href="{{ route('washing-machines.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Vaskemaskine</a>
</div> </div>
</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> </div>
<div class="w-85" style="background-color: #cccccc;"> <div class="w-85" style="background-color: #cccccc;">
<div class="directorypath text-white"> <div class="directorypath text-white">