v0.10.14c - Various fixes
This commit is contained in:
@@ -8,7 +8,16 @@
|
||||
<script src="{{ asset("/js/jquery-3.2.1.min.js") }}"></script>
|
||||
<main style="justify-content: unset">
|
||||
<h1 class="text-center sde-blue mt-1">{{__('msg.konto')}}</h1>
|
||||
<h4 class="mt-0">{{__('msg.navn')}}: {{ Auth::user()->name_first . " " . Auth::user()->name_last }}</h4>
|
||||
@if(\App\Resource::query()->where("id", "=", Auth::user()->resource_id)->first() !== null)
|
||||
<img style="width: calc(100% - 72px); margin: auto;" src="{{ \App\Resource::query()->where("id", "=",Auth::user()->resource_id)->first()->filename }}">
|
||||
@else
|
||||
@if(request()->cookie("mode") == "dark")
|
||||
<img style="width: calc(100% - 72px); margin: auto;" src="{{ asset("/images/icons/user-hvid.svg") }}">
|
||||
@else
|
||||
<img style="width: calc(100% - 72px); margin: auto;" src="{{ asset("/images/icons/user.svg") }}">
|
||||
@endif
|
||||
@endif
|
||||
<h4 class="mt-2">{{__('msg.navn')}}: {{ Auth::user()->name_first . " " . Auth::user()->name_last }}</h4>
|
||||
<h4 class="mt-0">{{__('msg.email')}}: {{ Auth::user()->email }}</h4>
|
||||
<h4 class="mt-0">{{__('msg.telefon')}} Nr.: {{ Auth::user()->phone }}</h4>
|
||||
|
||||
|
||||
@@ -86,6 +86,8 @@
|
||||
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,9 +97,16 @@
|
||||
|
||||
dayHolder.appendChild(day);
|
||||
|
||||
//When clicking on a date run "onDateSelect()"
|
||||
dayHolder.onclick = function() {
|
||||
onDateSelect(date, dayHolder, datetext);
|
||||
//If date hasn't already happened
|
||||
if(date > moment().subtract(1, "days").locale("da")) {
|
||||
//When clicking on a date run "onDateSelect()"
|
||||
dayHolder.onclick = function () {
|
||||
onDateSelect(date, dayHolder, datetext);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dayHolder.classList.add("disabled");
|
||||
}
|
||||
|
||||
calendarRow.appendChild(dayHolder);
|
||||
@@ -301,12 +310,15 @@
|
||||
|
||||
|
||||
//Add times 8:00-20:00
|
||||
for (let hour = 8; hour <= 20; hour++) {
|
||||
for (let hour = 8; hour < 20; hour++) {
|
||||
if(hour < new Date().getHours())
|
||||
continue;
|
||||
|
||||
let value = datetext + " " + prependZero(hour) + ":00:00";
|
||||
|
||||
let option = document.createElement("option");
|
||||
|
||||
option.text = prependZero(hour) + ":00";
|
||||
option.text = prependZero(hour) + ":00-" + prependZero(hour+1) + ":00";
|
||||
option.value = value;
|
||||
option.id = value;
|
||||
element.appendChild(option);
|
||||
|
||||
Reference in New Issue
Block a user