Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
58c6d08ca2
|
@ -16,6 +16,7 @@ class DatabaseSeeder extends Seeder
|
||||||
$this->call(UserSeeder::class);
|
$this->call(UserSeeder::class);
|
||||||
$this->call(ContactSeeder::class);
|
$this->call(ContactSeeder::class);
|
||||||
$this->call(LocationSeeder::class);
|
$this->call(LocationSeeder::class);
|
||||||
|
$this->call(WashingMachineSeeder::class);
|
||||||
$this->call(NewsTypeSeeder::class);
|
$this->call(NewsTypeSeeder::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use App\User;
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
|
class WashingMachineSeeder extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the database seeds.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$machines = [
|
||||||
|
[
|
||||||
|
"name" => "Vaskemaskine nr. 1",
|
||||||
|
"location_id" => 1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"name" => "Vaskemaskine nr. 2",
|
||||||
|
"location_id" => 1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"name" => "Vaskemaskine nr. 3",
|
||||||
|
"location_id" => 1
|
||||||
|
],
|
||||||
|
|
||||||
|
[
|
||||||
|
"name" => "Vaskemaskine nr. 1",
|
||||||
|
"location_id" => 2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"name" => "Vaskemaskine nr. 2",
|
||||||
|
"location_id" => 2
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($machines as $machineData) {
|
||||||
|
$machine = new \App\WashingMachine();
|
||||||
|
|
||||||
|
$machine->name = $machineData["name"];
|
||||||
|
$machine->location_id = $machineData["location_id"];
|
||||||
|
|
||||||
|
$machine->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -47,7 +47,6 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
{{-- Brugere --}}
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="head" style="background-color: orange;">
|
<div class="head" style="background-color: orange;">
|
||||||
<div>
|
<div>
|
||||||
|
@ -68,7 +67,6 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Aktiviteter --}}
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="head" style="background-color: red;">
|
<div class="head" style="background-color: red;">
|
||||||
<div>
|
<div>
|
||||||
|
@ -110,7 +108,7 @@
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="container" style="margin-top: 8px;">
|
<div class="container" style="margin-top: 8px;">
|
||||||
<table style="border: 1px solid lightgrey">
|
<table style="border: 1px solid lightgrey; width: 100%;">
|
||||||
<tr>
|
<tr>
|
||||||
<td> {!! \App\Helpers::closetags(substr(\App\Event::query()->orderByDesc("date")->first()->description, 0, 300) )!!}</td>
|
<td> {!! \App\Helpers::closetags(substr(\App\Event::query()->orderByDesc("date")->first()->description, 0, 300) )!!}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -162,8 +160,8 @@
|
||||||
</div>
|
</div>
|
||||||
<table class="tbl mt-1">
|
<table class="tbl mt-1">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-white text-center" style="background-color: lightseagreen;">Ugens Menuplan</th>
|
<th class="text-white text-center" style="background-color: lightseagreen; border-right: unset;">Ugens Menuplan</th>
|
||||||
<th class="text-white text-center" style="background-color: lightseagreen;"></th> <!--Maybe fix ?-->
|
<th class="text-white text-center" style="background-color: lightseagreen; border-left: unset;"></th> <!--Maybe fix ?-->
|
||||||
</tr>
|
</tr>
|
||||||
@if(\App\MenuPlan::query()->where("week", "=", date('W'))->first() !== null)
|
@if(\App\MenuPlan::query()->where("week", "=", date('W'))->first() !== null)
|
||||||
{{-- \App\MenuPlan::query()->where("week", "=", date('W'))->first() --}}
|
{{-- \App\MenuPlan::query()->where("week", "=", date('W'))->first() --}}
|
||||||
|
@ -181,6 +179,7 @@
|
||||||
<td>{{ \App\MenuPlan::query()->where("week", "=", date('W'))->first()->thursday }}</td>
|
<td>{{ \App\MenuPlan::query()->where("week", "=", date('W'))->first()->thursday }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@else
|
@else
|
||||||
|
</table>
|
||||||
<p class="text-center">Der er ingen menuplan for denne uge</p>
|
<p class="text-center">Der er ingen menuplan for denne uge</p>
|
||||||
@endif
|
@endif
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -10,26 +10,9 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("content")
|
@section("content")
|
||||||
<div class="row align-items-center">
|
<table class="tbl mt-0">
|
||||||
<!--<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('washing-reservations.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Reservation</a>!-->
|
|
||||||
|
|
||||||
<form method="post" action="{{ route("washing-reservations.store") }}">
|
|
||||||
@csrf
|
|
||||||
<input type="text" class="form-controller" id="search" name="search" placeholder="//TODO: Søg på vaskemaskine, tid, bruger"></input>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
<input class="checkbox-inline" type="checkbox" name="checkbox" id="vaskemaskine" value="vaskemaskine">
|
|
||||||
<label for="navn">Vaskemaskine</label>
|
|
||||||
<input class="checkbox-inline" type="checkbox" name="checkbox" id="tidspunkt" value="tidspunkt">
|
|
||||||
<label for="efternavn">Tidspunkt</label>
|
|
||||||
<input class="checkbox-inline" type="checkbox" name="checkbox" id="bruger" value="bruger">
|
|
||||||
<label for="email">Bruger</label>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<table class="tbl mt-2">
|
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>Lokation</th>
|
||||||
<th>Vaskemaskine</th>
|
<th>Vaskemaskine</th>
|
||||||
<th>Tidspunkt</th>
|
<th>Tidspunkt</th>
|
||||||
<th>Bruger</th>
|
<th>Bruger</th>
|
||||||
|
@ -37,6 +20,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
@foreach($reservations as $reservation)
|
@foreach($reservations as $reservation)
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>{{ \App\Location::query()->find(\App\WashingMachine::query()->find($reservation->machine_id)->location_id)->name }}</td>
|
||||||
<td>{{ \App\WashingMachine::query()->find($reservation->machine_id)->name }}</td>
|
<td>{{ \App\WashingMachine::query()->find($reservation->machine_id)->name }}</td>
|
||||||
<td>{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($reservation->time))->format('d/m/Y \k\l\. H:i') }}</td>
|
<td>{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($reservation->time))->format('d/m/Y \k\l\. H:i') }}</td>
|
||||||
<td>{{ ucfirst(\App\User::query()->find($reservation->user_id)->name_first) }} {{ ucfirst(\App\User::query()->find($reservation->user_id)->name_last) }}</td>
|
<td>{{ ucfirst(\App\User::query()->find($reservation->user_id)->name_first) }} {{ ucfirst(\App\User::query()->find($reservation->user_id)->name_last) }}</td>
|
||||||
|
|
Loading…
Reference in New Issue