v0.10.8 - Added - You can only see washingreservations for the day, and are maximum an hour after 'time' in column - Reloads the page after every 5 minutes (This needs a fix)
This commit is contained in:
parent
2430a6a381
commit
82ac44133b
|
@ -13,10 +13,14 @@
|
|||
<p class="text-white" style="margin-left: auto; padding-right: 24px; font-size: 1vw;">Lokation: {{ $location->name }}</p>
|
||||
</header>
|
||||
<main style="min-height: calc(100% - 72px); background-color: #ffffff;">
|
||||
<?php $i = 1; ?>
|
||||
<?php
|
||||
date_default_timezone_set('Europe/Copenhagen');
|
||||
$i = 1;
|
||||
?>
|
||||
<div class="row">
|
||||
@foreach(\App\WashingMachine::query()->where("location_id", "=", $location->id)->get() as $machine)
|
||||
@foreach(\App\WashingReservation::query()->where("machine_id", "=", $machine->id)->where("time", "LIKE", date("Y-m-d"). "%")->orderBy("time", "asc")->get() as $reservation)
|
||||
@if (date('Y-m-d H:i:s', strtotime('-1 hour')) < $reservation->time)
|
||||
@if($i % 3 == 1)
|
||||
</div>
|
||||
<div class="row w-100">
|
||||
|
@ -29,6 +33,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<?php $i++; ?>
|
||||
@endif
|
||||
@endforeach
|
||||
@endforeach
|
||||
@if($i == 1)
|
||||
|
@ -38,6 +43,13 @@
|
|||
</main>
|
||||
|
||||
<script src="{{ mix("/js/app.js") }}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
setTimeout(function(){
|
||||
location.reload(true);
|
||||
}, (60000*5));
|
||||
});
|
||||
</script>
|
||||
@yield("scripts")
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue