2020-06-15 06:56:21 +00:00
|
|
|
@extends("admin.layout.base")
|
|
|
|
@extends("admin.layout.header")
|
|
|
|
|
|
|
|
@section("title")
|
2020-10-07 06:23:26 +00:00
|
|
|
Dashboard - Admin Panel
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section("path")
|
|
|
|
<a href="{{ route('root.index') }}" class="text-white">Dashboard</a> /
|
2020-06-15 06:56:21 +00:00
|
|
|
@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;
|
|
|
|
}
|
2020-10-21 07:12:53 +00:00
|
|
|
|
|
|
|
.letterSpaceTable{
|
|
|
|
letter-spacing: 1.2px;
|
2020-10-30 13:18:28 +00:00
|
|
|
|
2020-10-21 07:12:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.letterSpaceNotTable{
|
|
|
|
letter-spacing: 2px;
|
|
|
|
}
|
|
|
|
|
2020-11-24 12:14:25 +00:00
|
|
|
|
|
|
|
.dot {
|
|
|
|
height: 10px;
|
|
|
|
width: 10px;
|
|
|
|
background-color: #bbb;
|
|
|
|
border-radius: 50%;
|
|
|
|
display: inline-block;
|
2020-10-30 13:18:28 +00:00
|
|
|
}
|
|
|
|
|
2020-10-21 07:12:53 +00:00
|
|
|
|
2020-08-17 08:28:54 +00:00
|
|
|
</style>
|
|
|
|
|
2020-11-24 12:14:25 +00:00
|
|
|
<div class="card fixOverflow">
|
2020-10-21 07:12:53 +00:00
|
|
|
<div class="head letterSpaceNotTable" style="background-color: #575756;">
|
2020-08-17 08:28:54 +00:00
|
|
|
<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>
|
2020-10-30 13:18:28 +00:00
|
|
|
<table class="tbl mt-1 ">
|
2020-08-17 08:28:54 +00:00
|
|
|
<tr>
|
2020-10-21 07:12:53 +00:00
|
|
|
<th class="text-white text-center letterSpaceTable" style="background-color: #575756;">Nyeste brugere</th>
|
2020-08-17 08:28:54 +00:00
|
|
|
</tr>
|
2020-08-17 12:24:27 +00:00
|
|
|
@for($i = 0; $i < 10 && $i < count(\App\User::query()->orderByDesc("id")->get()); $i++)
|
2020-10-21 07:12:53 +00:00
|
|
|
<tr class="letterSpaceTable">
|
2020-11-24 12:14:25 +00:00
|
|
|
<td>{!! (ucfirst(strtolower(\App\User::query()->orderByDesc("id")->get()[$i]->name_first))) . ' ' . \App\Helpers::closetags(substr(ucfirst(strtolower(\App\User::query()->orderByDesc("id")->get()[$i]->name_last)), 0, 23) ) !!}</td>
|
2020-08-17 08:28:54 +00:00
|
|
|
</tr>
|
|
|
|
@endfor
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
2020-11-24 12:14:25 +00:00
|
|
|
<div class="card fixOverflow">
|
2020-10-21 07:12:53 +00:00
|
|
|
<div class="head letterSpaceNotTable" style="background-color: #6796b0;">
|
2020-08-17 08:28:54 +00:00
|
|
|
<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>
|
2020-10-21 07:12:53 +00:00
|
|
|
<th class="text-white text-center letterSpaceTable" style="background-color: #6796b0;">Næste aktivitet</th>
|
2020-08-17 08:28:54 +00:00
|
|
|
</tr>
|
2020-09-10 10:59:12 +00:00
|
|
|
@if(\App\Event::query()->orderBy("date", "asc")->first() == null)
|
2020-08-18 06:35:53 +00:00
|
|
|
<tr>
|
2020-10-30 13:18:28 +00:00
|
|
|
<td class="text-center letterSpaceTable">Der er ingen aktiviteter</td>
|
2020-08-18 06:35:53 +00:00
|
|
|
</tr>
|
|
|
|
@endif
|
2020-08-17 08:28:54 +00:00
|
|
|
</table>
|
2020-09-10 10:59:12 +00:00
|
|
|
@if(\App\Event::query()->orderBy("date", "asc")->first() !== null)
|
2020-08-17 08:28:54 +00:00
|
|
|
<div class="event_card">
|
2020-11-26 09:19:12 +00:00
|
|
|
<div class="header pt-0">
|
2020-10-21 07:12:53 +00:00
|
|
|
<table class="tbl mt-0 letterSpaceTable">
|
2020-08-18 05:49:00 +00:00
|
|
|
<tr>
|
2020-11-24 12:14:25 +00:00
|
|
|
<td><label>Aktivitets navn <span class="dot"></span> {!! (\App\Event::query()->orderBy("date", "asc")->first()->name) !!}</label></td>
|
2020-08-18 05:49:00 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2020-11-24 12:14:25 +00:00
|
|
|
<td><label>Aktivitets ansvarlig <span class="dot"></span> {!! (\App\Event::query()->orderBy("date", "asc")->first()->accountable) !!}</label></td>
|
2020-08-18 05:49:00 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2020-11-24 12:14:25 +00:00
|
|
|
<td><label>Tidspunkt <span class="dot"></span> {{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime(\App\Event::query()->orderBy("date", "asc")->first()->date))->format('d/m/Y \k\l\. H:i') }}</label></td>
|
2020-08-18 05:49:00 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
2020-11-26 09:19:12 +00:00
|
|
|
<div class="container letterSpaceTable mt-1">
|
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>
|
2021-04-10 11:43:06 +00:00
|
|
|
<td> {!! \App\Helpers::closetags(substr(ucfirst(strtolower(\App\Event::query()->orderBy("date", "asc")->first()->description)), 0, 300) ) !!}</td>
|
2020-08-17 11:22:08 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
2020-09-10 10:59:12 +00:00
|
|
|
<input type="hidden" name="event_id" value="{{ \App\Event::query()->orderBy("date", "asc")->first()->id }}">
|
2020-11-26 09:19:12 +00:00
|
|
|
<div class="row justify-content-space mt-1">
|
|
|
|
<a class="sde-blue text-center m-none p-none bold" href="{{route("events.signups", ["event" => \App\Event::query()->orderBy("date", "asc")->first()->id ])}}">Se deltagere</a>
|
2020-08-17 08:28:54 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
|
2020-11-24 12:14:25 +00:00
|
|
|
<div class="card fixOverflow">
|
2020-10-21 07:12:53 +00:00
|
|
|
<div class="head letterSpaceNotTable" style="background-color: #152f4b;">
|
2020-08-17 08:28:54 +00:00
|
|
|
<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>
|
2020-11-23 11:53:19 +00:00
|
|
|
<table class="tbl mt-1 ">
|
2020-08-17 08:28:54 +00:00
|
|
|
<tr>
|
2020-10-21 07:12:53 +00:00
|
|
|
<th class="text-white text-center letterSpaceTable" style="background-color: #152f4b;">Seneste Vejledninger</th>
|
2020-08-17 08:28:54 +00:00
|
|
|
</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-11-23 11:53:19 +00:00
|
|
|
<tr class="letterSpaceTable" style="overflow: hidden">
|
|
|
|
<td>{!! \App\Helpers::closetags(substr(ucfirst(strtolower(\App\Guide::query()->orderByDesc("id")->get()[$i]->name)), 0, 45) ) !!}</td>
|
2020-08-17 08:28:54 +00:00
|
|
|
</tr>
|
|
|
|
@endfor
|
|
|
|
@else
|
|
|
|
<tr>
|
2020-10-30 13:18:28 +00:00
|
|
|
<td class="text-center letterSpaceTable">Der er ingen vejledninger</td>
|
2020-08-17 08:28:54 +00:00
|
|
|
</tr>
|
|
|
|
@endif
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
2020-11-24 12:14:25 +00:00
|
|
|
<div class="card fixOverflow">
|
2020-10-21 07:12:53 +00:00
|
|
|
<div class="head" style="background-color: #01788a; letter-spacing: 2px;">
|
2020-08-17 08:28:54 +00:00
|
|
|
<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-10-21 07:12:53 +00:00
|
|
|
<th class="text-white text-center" colspan="2" style="background-color: #01788a; letter-spacing: 2px;">Ugens Menuplan</th>
|
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>
|
2020-10-21 07:12:53 +00:00
|
|
|
<td class="letterSpaceTable"><label>Mandag </label></td>
|
2020-11-24 12:14:25 +00:00
|
|
|
<td class="letterSpaceTable">{!! (\App\MenuPlan::query()->where("week", "=", date('W'))->first()->monday) !!}</td>
|
2020-08-17 10:24:43 +00:00
|
|
|
</tr>
|
2020-10-21 07:12:53 +00:00
|
|
|
<td class="letterSpaceTable"><label>Tirsdag</label></td>
|
2020-11-24 12:14:25 +00:00
|
|
|
<td class="letterSpaceTable">{!! (\App\MenuPlan::query()->where("week", "=", date('W'))->first()->tuesday) !!}</td>
|
2020-08-17 10:24:43 +00:00
|
|
|
</tr>
|
2020-10-21 07:12:53 +00:00
|
|
|
<td class="letterSpaceTable"><label>Onsdag</label></td>
|
2020-11-24 12:14:25 +00:00
|
|
|
<td class="letterSpaceTable">{!! (\App\MenuPlan::query()->where("week", "=", date('W'))->first()->wednesday) !!}</td>
|
2020-08-17 10:24:43 +00:00
|
|
|
</tr>
|
2020-10-21 07:12:53 +00:00
|
|
|
<td class="letterSpaceTable"><label>Torsdag</label></td>
|
2020-11-24 12:14:25 +00:00
|
|
|
<td class="letterSpaceTable">{!! (\App\MenuPlan::query()->where("week", "=", date('W'))->first()->thursday) !!}</td>
|
2020-08-17 10:24:43 +00:00
|
|
|
</tr>
|
2020-10-21 07:12:53 +00:00
|
|
|
|
2020-10-30 13:18:28 +00:00
|
|
|
<!--The code above is retarded, but it is what it is :) BigSmoke -->
|
2020-08-17 08:28:54 +00:00
|
|
|
@else
|
2020-08-18 06:35:53 +00:00
|
|
|
<tr>
|
2020-11-24 12:14:25 +00:00
|
|
|
<td colspan="2" class="text-center letterSpaceTable">Ingen menuplan</td>
|
2020-08-18 06:35:53 +00:00
|
|
|
</tr>
|
2020-08-17 08:28:54 +00:00
|
|
|
@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
|