v0.10.3 - Added user "X X" to seeder, and fixed analytics

This commit is contained in:
frederikpyt 2020-08-18 08:35:53 +02:00
parent 55153521b4
commit 1e405d9f3c
2 changed files with 27 additions and 23 deletions

View File

@ -13,33 +13,34 @@ class UserSeeder extends Seeder
*/
public function run()
{
// try {
//
// } catch (Exception $e) {
// }
/*if(User::where("name_first", "admin"))
{
return;
}*/
/**
* A user is created as the Admin with the below fields.
* Super User or Admin. Is allowed for all permission and is not to exist in final product release but purely for testing.
*/
Log::debug("OPRET");
$user = new \App\User();
$user->name_first = "Admin";
$user->name_last = "Admin";
$user->email = "admin@admin.local";
$user->setPasswordAttribute("1234");
$user->phone = 12345678;
$user->phone = "12345678";
//Gives Administrator role to the Admin
$user->assignRole("Administrator");
$user->save();
/**
* A user is created as the Admin with the below fields.
* Super User or Admin. Is allowed for all permission and is not to exist in final product release but purely for testing.
*/
$user = new \App\User();
$user->name_first = "X";
$user->name_last = "X";
$user->email = "x@x.x";
$user->setPasswordAttribute("1");
$user->phone = "12345679";
//Gives Administrator role to the Admin
$user->assignRole("Administrator");

View File

@ -79,6 +79,11 @@
<tr>
<th class="text-white text-center" style="background-color: red;">Næste aktivitet</th>
</tr>
@if(\App\Event::query()->orderByDesc("date")->first() == null)
<tr>
<td class="text-center">Der er ingen aktiviteter</td>
</tr>
@endif
</table>
@if(\App\Event::query()->orderByDesc("date")->first() !== null)
<div class="event_card">
@ -110,8 +115,6 @@
</div>
</div>
</div>
@else
<p style="padding: 0 4px; text-align: center">Der er ingen aktiviteter</p>
@endif
</div>
@ -151,8 +154,7 @@
</div>
<table class="tbl mt-1">
<tr>
<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 ?-->
<th class="text-white text-center" colspan="2" style="background-color: lightseagreen;">Ugens Menuplan</th>
</tr>
@if(\App\MenuPlan::query()->where("week", "=", date('W'))->first() !== null)
{{-- \App\MenuPlan::query()->where("week", "=", date('W'))->first() --}}
@ -170,8 +172,9 @@
<td>{{ \App\MenuPlan::query()->where("week", "=", date('W'))->first()->thursday }}</td>
</tr>
@else
</table>
<p class="text-center">Der er ingen menuplan for denne uge</p>
<tr>
<td colspan="2" class="text-center">Der er ingen menuplan for denne uge</td>
</tr>
@endif
</table>
</div>