2020-06-15 06:56:21 +00:00
|
|
|
@extends("admin.layout.base")
|
|
|
|
@extends("admin.layout.header")
|
|
|
|
|
|
|
|
@section("title")
|
|
|
|
Home - Admin Panel
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section("content")
|
2020-08-17 08:28:54 +00:00
|
|
|
<style>
|
|
|
|
.card {
|
|
|
|
min-width: 200px;
|
|
|
|
width: calc(25% - 16px);
|
|
|
|
margin: 0 8px 0 8px;
|
|
|
|
}
|
|
|
|
.content {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
flex-direction: row;
|
|
|
|
}
|
|
|
|
.card > .head {
|
|
|
|
padding: 0 8px;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
width: calc(100% - 16px);
|
|
|
|
min-height: 170px;
|
|
|
|
}
|
|
|
|
.mr-2 {
|
|
|
|
margin-right: 1rem;
|
|
|
|
}
|
2020-06-15 06:56:21 +00:00
|
|
|
|
2020-08-17 08:28:54 +00:00
|
|
|
h3 {
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.event_card > .header {
|
|
|
|
padding-top: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ql-align-center {
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ql-align-center > strong {
|
|
|
|
color: lightseagreen;
|
|
|
|
margin: auto;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
<div class="head" style="background-color: orange;">
|
|
|
|
<div>
|
|
|
|
<img style="width: 4rem;" src="{{ asset("/images/icons/users-hvid.svg") }}" alt="">
|
|
|
|
<h1 class="text-white">Brugere</h1>
|
|
|
|
</div>
|
|
|
|
<h1 class="text-white ml-auto mr-2" style="font-size: 3.5rem;">{{ count(\App\User::all()) }}</h1>
|
|
|
|
</div>
|
|
|
|
<table class="tbl mt-1">
|
|
|
|
<tr>
|
|
|
|
<th class="text-white text-center" style="background-color: orange;">Nyeste brugere</th>
|
|
|
|
</tr>
|
2020-08-17 12:24:27 +00:00
|
|
|
@for($i = 0; $i < 10 && $i < count(\App\User::query()->orderByDesc("id")->get()); $i++)
|
2020-08-17 08:28:54 +00:00
|
|
|
<tr>
|
|
|
|
<td>{{ ucfirst(strtolower(\App\User::query()->orderByDesc("id")->get()[$i]->name_first)) . ' ' . ucfirst(strtolower(\App\User::query()->orderByDesc("id")->get()[$i]->name_last)) }}</td>
|
|
|
|
</tr>
|
|
|
|
@endfor
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
<div class="head" style="background-color: red;">
|
|
|
|
<div>
|
|
|
|
<img style="margin-top: 8px;width: 3rem;" src="{{ asset("/images/icons/Aktiviteter.svg") }}" alt="">
|
|
|
|
<h1 class="text-white">Aktiviteter</h1>
|
|
|
|
</div>
|
|
|
|
<h1 class="text-white ml-auto mr-2" style="font-size: 3.5rem;">{{ count(\App\Event::all()) }}</h1>
|
|
|
|
</div>
|
|
|
|
<table class="tbl mt-1">
|
|
|
|
<tr>
|
|
|
|
<th class="text-white text-center" style="background-color: red;">Næste aktivitet</th>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
@if(\App\Event::query()->orderByDesc("date")->first() !== null)
|
|
|
|
<div class="event_card">
|
|
|
|
@if(\App\Event::query()->orderByDesc("date")->first()->resource_id !== null)
|
2020-08-17 11:22:08 +00:00
|
|
|
<div class="header" style="padding-top: 0">
|
|
|
|
<table class="tbl mt-0">
|
|
|
|
<tr>
|
|
|
|
<td><label>Event navn</label></td>
|
|
|
|
<td>{{ \App\Event::query()->orderByDesc("date")->first()->name }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><label>Event ansvarlig</label></td>
|
|
|
|
<td>{{__('msg.af')}}: {{ \App\Event::query()->orderByDesc("date")->first()->accountable }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><label>Tidspunkt</label></td>
|
|
|
|
<td>{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime(\App\Event::query()->orderByDesc("date")->first()->date))->format('d/m/Y \k\l\. H:i') }}</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2020-08-17 08:28:54 +00:00
|
|
|
</div>
|
|
|
|
@else
|
|
|
|
<div class="header">
|
|
|
|
<h3>{{ \App\Event::query()->orderByDesc("date")->first()->name }}</h3>
|
|
|
|
<p class="text-center mt-0">Af: {{ \App\Event::query()->orderByDesc("date")->first()->accountable }}</p>
|
|
|
|
<p class="text-center mt-0">{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime(\App\Event::query()->orderByDesc("date")->first()->date))->format('d/m/Y \k\l\. H:i') }}</p>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<div class="container" style="margin-top: 8px;">
|
2020-08-17 13:06:35 +00:00
|
|
|
<table style="border: 1px solid lightgrey; width: 100%;">
|
2020-08-17 11:22:08 +00:00
|
|
|
<tr>
|
|
|
|
<td> {!! \App\Helpers::closetags(substr(\App\Event::query()->orderByDesc("date")->first()->description, 0, 300) )!!}</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2020-08-17 08:28:54 +00:00
|
|
|
<input type="hidden" name="event_id" value="{{ \App\Event::query()->orderByDesc("date")->first()->id }}">
|
|
|
|
<div class="row" style="justify-content: space-between; margin-top: 16px;">
|
2020-08-17 11:52:51 +00:00
|
|
|
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="{{route("events.signups", ["event" => \App\Event::query()->orderByDesc("date")->first()->id ])}}">{{__('msg.sedeltagere')}}</a>
|
2020-08-17 08:28:54 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@else
|
2020-08-17 13:06:48 +00:00
|
|
|
<p style="padding: 0 4px; text-align: center">Der er ingen aktiviteter</p>
|
2020-08-17 08:28:54 +00:00
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
<div class="head" style="background-color: deepskyblue;">
|
|
|
|
<div>
|
|
|
|
<img style="width: 4rem;" src="{{ asset("/images/icons/Vejledninger.svg") }}" alt="">
|
|
|
|
<h1 class="text-white">Vejledninger</h1>
|
|
|
|
</div>
|
|
|
|
<h1 class="text-white ml-auto mr-2" style="font-size: 3.5rem;">{{ count(\App\Guide::all()) }}</h1>
|
|
|
|
</div>
|
|
|
|
<table class="tbl mt-1">
|
|
|
|
<tr>
|
|
|
|
<th class="text-white text-center" style="background-color: deepskyblue;">Seneste Vejledninger</th>
|
|
|
|
</tr>
|
|
|
|
@if(count(\App\Guide::all()) > 0)
|
2020-08-17 12:24:27 +00:00
|
|
|
@for($i = 0; $i < 10 && $i < count(\App\Guide::query()->orderByDesc("id")->get()); $i++)
|
2020-08-17 08:28:54 +00:00
|
|
|
<tr>
|
|
|
|
<td>{{ ucfirst(strtolower(\App\Guide::query()->orderByDesc("id")->get()[$i]->name)) }}</td>
|
|
|
|
</tr>
|
|
|
|
@endfor
|
|
|
|
@else
|
|
|
|
<tr>
|
|
|
|
<td class="text-center">Der er ingen vejledninger</td>
|
|
|
|
</tr>
|
|
|
|
@endif
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
<div class="head" style="background-color: lightseagreen;">
|
|
|
|
<div>
|
|
|
|
<img style="width: 4rem;" src="{{ asset("/images/icons/Menuplan.svg") }}" alt="">
|
|
|
|
<h1 class="text-white">Menuplan</h1>
|
|
|
|
</div>
|
|
|
|
<h1 class="text-white ml-auto mr-2" style="font-size: 3.5rem;">{{ count(\App\MenuPlan::all()) }}</h1>
|
|
|
|
</div>
|
|
|
|
<table class="tbl mt-1">
|
|
|
|
<tr>
|
2020-08-17 13:06:35 +00:00
|
|
|
<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; border-left: unset;"></th> <!--Maybe fix ?-->
|
2020-08-17 08:28:54 +00:00
|
|
|
</tr>
|
|
|
|
@if(\App\MenuPlan::query()->where("week", "=", date('W'))->first() !== null)
|
2020-08-17 10:24:43 +00:00
|
|
|
{{-- \App\MenuPlan::query()->where("week", "=", date('W'))->first() --}}
|
|
|
|
<tr>
|
|
|
|
<td><label>Mandag </label></td>
|
|
|
|
<td>{{ \App\MenuPlan::query()->where("week", "=", date('W'))->first()->monday }}</td>
|
|
|
|
</tr>
|
|
|
|
<td><label>Tirsdag</label></td>
|
|
|
|
<td>{{ \App\MenuPlan::query()->where("week", "=", date('W'))->first()->tuesday }}</td>
|
|
|
|
</tr>
|
|
|
|
<td><label>Onsdag</label></td>
|
|
|
|
<td>{{ \App\MenuPlan::query()->where("week", "=", date('W'))->first()->wednesday }}</td>
|
|
|
|
</tr>
|
|
|
|
<td><label>Torsdag</label></td>
|
|
|
|
<td>{{ \App\MenuPlan::query()->where("week", "=", date('W'))->first()->thursday }}</td>
|
|
|
|
</tr>
|
2020-08-17 08:28:54 +00:00
|
|
|
@else
|
2020-08-17 13:06:35 +00:00
|
|
|
</table>
|
2020-08-17 08:28:54 +00:00
|
|
|
<p class="text-center">Der er ingen menuplan for denne uge</p>
|
|
|
|
@endif
|
2020-08-17 10:24:43 +00:00
|
|
|
</table>
|
2020-08-17 08:28:54 +00:00
|
|
|
</div>
|
2020-06-15 06:56:21 +00:00
|
|
|
@endsection
|