This commit is contained in:
Sebastian Davaris 2020-06-26 10:52:39 +02:00
commit ecf1488bef
11 changed files with 49 additions and 25 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="laravel.sqlite" uuid="9d32b2d2-cbb3-4fd4-8566-2790c2a354f4">
<data-source source="LOCAL" name="Laravel.sqlite" uuid="428bc9e4-1a43-4d98-aec6-555a9cf65fb5">
<driver-ref>sqlite.xerial</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>

View File

@ -19,7 +19,7 @@ class EventController extends Controller
{
$events = Event::query()->paginate($request->input("limit", 20));
return Response::detect("bookings.index", [ "events" => $events]);
return Response::detect("events.index", [ "events" => $events]);
}
/**
@ -29,7 +29,7 @@ class EventController extends Controller
*/
public function create()
{
return Response::detect("bookings.create");
return Response::detect("events.create");
}
/**
@ -49,7 +49,7 @@ class EventController extends Controller
$event->save();
return Response::detect("bookings.store");
return Response::detect("events.store");
}
/**
@ -60,7 +60,7 @@ class EventController extends Controller
*/
public function show(Event $id)
{
return Response::detect("bookings.show", [ "event" => $id ]);
return Response::detect("events.show", [ "event" => $id ]);
}
/**
@ -71,7 +71,7 @@ class EventController extends Controller
*/
public function edit(Event $id)
{
return Response::detect("bookings.edit", [ "event" => $id ]);
return Response::detect("events.edit", [ "event" => $id ]);
}
/**
@ -91,7 +91,7 @@ class EventController extends Controller
$id->update($requestBody);
$id->save();
return Response::detect("bookings.update");
return Response::detect("events.update");
}
/**
@ -105,6 +105,6 @@ class EventController extends Controller
{
$id->delete();
return Response::detect("bookings.destroy");
return Response::detect("events.destroy");
}
}

View File

@ -45,7 +45,7 @@ class MenuPlanController extends Controller
"link" => "required|max:255"
]);
$menuPlans = new ExternalLink($requestMenuPlanCreate);
$menuPlans = new MenuPlan($requestMenuPlanCreate);
$menuPlans->save();
return Response::detect("menuplans.store");

View File

@ -16,6 +16,7 @@
"laravel/framework": "^7.0",
"laravel/tinker": "^2.0",
"laravel/ui": "^2.0",
"laravelcollective/html": "^6.1",
"spatie/laravel-permission": "^3.13"
},
"require-dev": {

View File

@ -29,12 +29,12 @@
</div>
</div>
<div class="segment">
<h3 class="text-white">Booking</h3>
<h3 class="text-white">Reservationer</h3>
<div class="row">
<a href="{{ route("washing-reservations.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Bookings</a>
<a href="{{ route("washing-reservations.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Reservationer</a>
</div>
<div class="row">
<a href="{{ route('washing-reservations.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Booking</a>
<a href="{{ route('washing-reservations.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Reservationer</a>
</div>
</div>
<div class="segment">
@ -45,9 +45,6 @@
<div class="row">
<a href="{{ route('washing-machines.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Vaskemaskine</a>
</div>
<div class="row">
<a href="{{ route("washing-reservations.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Vaskemaskine Reservationer</a>
</div>
</div>
</div>
<div class="w-85" style="background-color: #cccccc;">

View File

@ -6,12 +6,13 @@
@endsection
@section("path")
<a href="{{ route('menuplans.create') }}" class="text-white">Opret Menuplan</a> /
<a href="{{ route('menu-plans.create') }}" class="text-white">Opret Menuplan</a> /
@endsection
@section("content")
<h1>Opret Menuplan:</h1>
<form method="post" action="">
<form action="{{ action('MenuPlanController@store') }}" method="post">
@csrf
<label for="mandag">Mandag:</label>
<input type="text" name="mandag" id="mandag" required>
<label for="tirsdag">Tirsdag:</label>

View File

@ -6,7 +6,7 @@
@endsection
@section("path")
<a href="" class="text-white">Opret Vaskemaskiner</a> /
<a href="{{ route('menu-plans.create') }}" class="text-white">Opret Vaskemaskiner</a> /
@endsection
@section("content")

View File

@ -0,0 +1,21 @@
@extends("app.layout.base")
@extends("app.layout.header")
@section("title")
Aktiviteter
@endsection
@section("content")
<main>
<h1 class="text-center sde-blue mb-0">Aktiviteter</h1>
<h3 class="sde-blue bold text-center mb-0">{Aktivitet}</h3>
<p class="text-center mt-0">{Dato}</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sodales pulvinar congue aenean suspendisse.</p>
<a class="btn text-center btn-sde-blue btn-disabled" id="tilmeld">Tilmeld</a>
<h3 class="sde-blue bold text-center mb-0">{Aktivitet2}</h3>
<p class="text-center mt-0">{Dato}</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sodales pulvinar congue aenean suspendisse.</p>
<a class="btn text-center btn-sde-blue btn-disabled" id="tilmeld">Tilmeld</a>
</main>
@endsection

View File

@ -16,17 +16,17 @@
</button>
</header>
<div class="d-none bg-sde-blue col" id="menu">
<a href="">
<a href="menu-plans">
<img src="{{URL::asset('/images/icons/Menuplan.svg')}}" alt="Menuplan">
Menuplan
</a>
<a href="">
<a href="events">
<img src="{{URL::asset('/images/icons/Aktiviteter.svg')}}" alt="Aktiviteter">
Aktiviteter
</a>
<a href="">
<img src="{{URL::asset('/images/icons/Vaske booking liste.svg')}}" alt="Vaske booking liste">
Vaske booking liste
<a href="washing-reservations">
<img src="{{URL::asset('/images/icons/Vaske booking liste.svg')}}" alt="Reservationer">
Reservationer
</a>
<a href="">
<img src="{{URL::asset('/images/icons/Galleri.svg')}}" alt="Galleri">

View File

@ -11,9 +11,11 @@
{{--Register--}}
{{--@extends("app.users.register")--}}
{{--Events--}}
{{----}}@extends("app.events.index")
{{--Vagttelefon--}}
{{----}}@extends("app.vagttelefons.index")
{{--@extends("app.vagttelefons.index")--}}
{{--Booking Liste--}}
{{--@extends("app.washing-reservations.index")--}}
@ -22,7 +24,7 @@
{{--@extends("app.menuplans.index")--}}
{{--Contact--}}
{{----}}@extends("app.contact.index")
{{--@extends("app.contact.index")--}}
{{----}}
{{------Admin Panel

View File

@ -25,6 +25,8 @@ Route::post("/login", "UserController@login")->name("users.login");
Route::get("/logout", "UserController@logout")->name("users.logout");
Route::resource("menu-plans", "MenuPlanController");
Route::resource("users", "UserController");
Route::resource("events", "EventController");