Merge branch 'master' of https://github.com/sebathefox/skolehjem-webapp
Conflicts: skolehjem/public/css/admin.css
This commit is contained in:
commit
79e5e95695
|
@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
|||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use App\Contact;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
|
||||
class ContactController extends Controller
|
||||
{
|
||||
|
@ -59,9 +60,15 @@ class ContactController extends Controller
|
|||
]);
|
||||
|
||||
$contact = new Contact($requestContact);
|
||||
$contact->save();
|
||||
$saved = $contact->save();
|
||||
|
||||
if(!$saved){
|
||||
return Response::detect("contacts.store");
|
||||
}else{
|
||||
$contact = Contact::query()->paginate($request->input("limit", 20));
|
||||
return Response::detect("contacts.index", ['contacts' => $contact]);
|
||||
}
|
||||
|
||||
return Response::detect("contacts.store");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -101,9 +108,15 @@ class ContactController extends Controller
|
|||
$data = $request->all();
|
||||
$contact = Contact::find($id);
|
||||
$contact->update($data);
|
||||
$contact->save();
|
||||
$saved = $contact->save();
|
||||
|
||||
if(!$saved){
|
||||
return Response::detect("contacts.update", [ "contacts" => $contact ]);
|
||||
}else{
|
||||
$contact = Contact::query()->paginate($request->input("limit", 20));
|
||||
return Response::detect("contacts.index", ['contacts' => $contact]);
|
||||
}
|
||||
|
||||
return Response::detect("contacts.update", [ "contacts" => $contact ]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -28,8 +28,11 @@ class EventController extends Controller
|
|||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
|
||||
$events = Event::query()->paginate($request->input("limit", 20));
|
||||
|
||||
//returns the function with events index page and a parameter of events.
|
||||
//also Response::detect checks screen size to determine if user is on a computer or mobile.
|
||||
return Response::detect("events.index", [ "events" => $events]);
|
||||
}
|
||||
|
||||
|
@ -40,6 +43,7 @@ class EventController extends Controller
|
|||
*/
|
||||
public function create()
|
||||
{
|
||||
//returns "create event" blade
|
||||
return Response::detect("events.create");
|
||||
}
|
||||
|
||||
|
@ -57,11 +61,18 @@ class EventController extends Controller
|
|||
"date" => "required"
|
||||
]);
|
||||
|
||||
//creates a new Event model with the given parameter
|
||||
$event = new Event($requestBody);
|
||||
|
||||
$event->save();
|
||||
$saved = $event->save();
|
||||
|
||||
if(!$saved){
|
||||
return Response::detect("events.store");
|
||||
}else{
|
||||
$event = Event::query()->paginate($request->input("limit", 20));
|
||||
return Response::detect("events.index", ['events' => $event]);
|
||||
}
|
||||
|
||||
return Response::detect("events.store");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -100,9 +111,15 @@ class EventController extends Controller
|
|||
|
||||
$event = Event::find($id);
|
||||
$event->update($data);
|
||||
$event->save();
|
||||
$saved = $event->save();
|
||||
|
||||
if(!$saved){
|
||||
return Response::detect("events.update", [ "event" => $event]);
|
||||
}else{
|
||||
$event = Event::query()->paginate($request->input("limit", 20));
|
||||
return Response::detect("events.index", ['events' => $event]);
|
||||
}
|
||||
|
||||
return Response::detect("events.update", [ "event" => $event]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -55,9 +55,15 @@ class ExternalLinkController extends Controller
|
|||
]);
|
||||
|
||||
$externalLink = new ExternalLink($requestBody);
|
||||
$externalLink->save();
|
||||
$saved = $externalLink->save();
|
||||
|
||||
if(!$saved){
|
||||
return Response::detect("external-links.store");
|
||||
}else{
|
||||
$externalLink = ExternalLink::query()->paginate($request->input("limit", 20));
|
||||
return Response::detect("external-links.index", ['links' => $externalLink]);
|
||||
}
|
||||
|
||||
return Response::detect("external-links.store");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -96,9 +102,15 @@ class ExternalLinkController extends Controller
|
|||
|
||||
$link = ExternalLink::find($id);
|
||||
$link->update($data);
|
||||
$link->save();
|
||||
$saved = $link->save();
|
||||
|
||||
if(!$saved){
|
||||
return Response::detect("external-links.update", [ "link" => $link]);
|
||||
}else{
|
||||
$externalLink = ExternalLink::query()->paginate($request->input("limit", 20));
|
||||
return Response::detect("external-links.index", ['links' => $externalLink]);
|
||||
}
|
||||
|
||||
return Response::detect("external-links.update", [ "link" => $link]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -60,9 +60,14 @@ class MenuPlanController extends Controller
|
|||
]);
|
||||
|
||||
$menuPlans = new MenuPlan($requestMenuPlanCreate);
|
||||
$menuPlans->save();
|
||||
$saved = $menuPlans->save();
|
||||
|
||||
return Response::detect("menuplans.store");
|
||||
if(!$saved){
|
||||
return Response::detect("menuplans.store");
|
||||
}else{
|
||||
$menuPlans = MenuPlan::query()->paginate($request->input("limit", 20));
|
||||
return Response::detect("menuplans.index", ['menuPlans' => $menuPlans]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -102,9 +107,15 @@ class MenuPlanController extends Controller
|
|||
|
||||
$menuplan = MenuPlan::find($id);
|
||||
$menuplan->update($data);
|
||||
$menuplan->save();
|
||||
$saved = $menuplan->save();
|
||||
|
||||
if(!$saved){
|
||||
return Response::detect("menuplans.update", [ "menuplan" => $menuplan ]);
|
||||
}else{
|
||||
$menuPlans = MenuPlan::query()->paginate($request->input("limit", 20));
|
||||
return Response::detect("menuplans.index", ['menuPlans' => $menuPlans]);
|
||||
}
|
||||
|
||||
return Response::detect("menuplans.update", [ "menuplan" => $menuplan ]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\ResourceCategory;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
|
@ -23,9 +24,11 @@ class ResourceCategoryController extends Controller
|
|||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
public function index(Request $request)
|
||||
{
|
||||
//
|
||||
$categories = ResourceCategory::query()->paginate($request->input("limit", 20));
|
||||
|
||||
return Response::detect("resource-categories.index", ["category"=> $categories]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,7 +38,7 @@ class ResourceCategoryController extends Controller
|
|||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
return Response::detect("resource-categories.create");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -46,7 +49,15 @@ class ResourceCategoryController extends Controller
|
|||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
$requestBody = $request->validate([
|
||||
"name" => "unique|required|max:255",
|
||||
"description" => "required|max:255",
|
||||
"slug" => "unique|required|max:255"
|
||||
]);
|
||||
$category = new ResourceCategory($requestBody);
|
||||
$category->save();
|
||||
|
||||
return Response::detect("resource-categories.store");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,9 +66,9 @@ class ResourceCategoryController extends Controller
|
|||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show($id)
|
||||
public function show(ResourceCategory $id)
|
||||
{
|
||||
//
|
||||
return Response::detect("resource-categories.show", ["category" => $id]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -68,7 +79,8 @@ class ResourceCategoryController extends Controller
|
|||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
$category = ResourceCategory::find($id);
|
||||
return Response::detect("resource-categories.edit", ["category" => $category]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -80,7 +92,13 @@ class ResourceCategoryController extends Controller
|
|||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
//
|
||||
$data = $request->all();
|
||||
|
||||
$category = ResourceCategory::find($id);
|
||||
$category->update($data);
|
||||
$category->save();
|
||||
|
||||
return Response::detect("resource-categories.update", ["category" => $category]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -91,6 +109,8 @@ class ResourceCategoryController extends Controller
|
|||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
$category = ResourceCategory::find($id);
|
||||
$category->delete();
|
||||
return redirect()->route("resource-categories.index");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,9 +45,16 @@ class rolesController extends Controller
|
|||
]);
|
||||
|
||||
$role = new Role($requestRole);
|
||||
$role->save();
|
||||
$saved = $role->save();
|
||||
|
||||
if(!$saved){
|
||||
return Response::detect("roles.store");
|
||||
}else{
|
||||
$roles = Role::query()->paginate($request->input("limit", 20));
|
||||
return Response::detect("roles.index", ['roles' => $roles]);
|
||||
}
|
||||
|
||||
|
||||
return Response::detect("roles.store");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,9 +92,15 @@ class rolesController extends Controller
|
|||
$data = $request->all();
|
||||
$role = Role::find($id);
|
||||
$role->update($data);
|
||||
$role->save();
|
||||
$saved = $role->save();
|
||||
|
||||
if(!$saved){
|
||||
return Response::detect("roles.update", [ "role" => $role ]);
|
||||
}else{
|
||||
$roles = Role::query()->paginate($request->input("limit", 20));
|
||||
return Response::detect("roles.index", ['roles' => $roles]);
|
||||
}
|
||||
|
||||
return Response::detect("roles.update", [ "role" => $role ]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -154,11 +154,13 @@ class UserController extends Controller
|
|||
/** @var User $user */
|
||||
$user->update($data);
|
||||
|
||||
$user->roles()->detach();
|
||||
$user->forgetCachedPermissions();
|
||||
if ($request->roles != null) {
|
||||
$user->roles()->detach();
|
||||
$user->forgetCachedPermissions();
|
||||
|
||||
foreach ($request->roles as $role){
|
||||
$user->assignRole($role);
|
||||
foreach ($request->roles as $role){
|
||||
$user->assignRole($role);
|
||||
}
|
||||
}
|
||||
|
||||
$user->save();
|
||||
|
@ -247,4 +249,9 @@ class UserController extends Controller
|
|||
{
|
||||
return Response::detect("users.edit");
|
||||
}
|
||||
|
||||
public function accounteditpass()
|
||||
{
|
||||
return Response::detect("users.editpass");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
use App\WashingMachine;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class WashingMachineController extends Controller
|
||||
{
|
||||
|
@ -24,11 +27,11 @@ class WashingMachineController extends Controller
|
|||
* Display a listing of the resource.
|
||||
*
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$machines = WashingMachine::query()->paginate($request->query("page", 1));
|
||||
$machines = WashingMachine::query()->paginate($request->query("limit", 20));
|
||||
|
||||
return Response::detect("washing-machines.index", [ "machines" => $machines ]);
|
||||
}
|
||||
|
@ -36,7 +39,7 @@ class WashingMachineController extends Controller
|
|||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
|
@ -47,25 +50,30 @@ class WashingMachineController extends Controller
|
|||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$data = $request->validate([
|
||||
"time" => "required"
|
||||
"name" => "required"
|
||||
]);
|
||||
|
||||
$machine = new WashingMachine($data);
|
||||
$machine->save();
|
||||
$saved = $machine->save();
|
||||
|
||||
return Response::detect("washing-machines.store");
|
||||
if(!$saved){
|
||||
return Response::detect("washing-machines.store");
|
||||
}else{
|
||||
$machines = WashingMachine::query()->paginate($request->input("limit", 20));
|
||||
return Response::detect("washing-machines.index", ['machines' => $machines]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
|
@ -80,7 +88,7 @@ class WashingMachineController extends Controller
|
|||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
|
@ -96,36 +104,43 @@ class WashingMachineController extends Controller
|
|||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
$data = $request->validate([
|
||||
"time" => "required"
|
||||
"name" => "required"
|
||||
]);
|
||||
|
||||
$machine = WashingMachine::find($id);
|
||||
|
||||
$machine->update($data);
|
||||
|
||||
$machine->save();
|
||||
$saved = $machine->save();
|
||||
|
||||
return Response::detect("washing-machines.edit", [
|
||||
"machine" => $machine
|
||||
]);
|
||||
if(!$saved){
|
||||
return Response::detect("washing-machines.update", [
|
||||
"machine" => $machine
|
||||
]);
|
||||
} else {
|
||||
$machines = WashingMachine::query()->paginate($request->input("limit", 20));
|
||||
return Response::detect("washing-machines.index", [
|
||||
"machines" => $machines
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @param $id
|
||||
* @return Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
$machine = WashingMachine::find($id);
|
||||
$machine->delete();
|
||||
|
||||
return Response::detect("washing-machines.destroy");
|
||||
return redirect()->route("washing-machines.index");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,15 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\WashingMachine;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
use App\WashingReservation;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class WashingReservationController extends Controller
|
||||
{
|
||||
|
@ -24,11 +29,11 @@ class WashingReservationController extends Controller
|
|||
* Display a listing of the resource.
|
||||
*
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$reservations = WashingReservation::query()->paginate($request->query("page", 1));
|
||||
$reservations = WashingReservation::query()->paginate($request->query("limit", 20));
|
||||
|
||||
return Response::detect("washing-reservations.index", [ "reservations" => $reservations]);
|
||||
}
|
||||
|
@ -36,36 +41,48 @@ class WashingReservationController extends Controller
|
|||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return Response::detect("washing-reservations.create");
|
||||
$machines = WashingMachine::all();
|
||||
return Response::detect("washing-reservations.create", [ 'machines' => $machines ]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$data = $request->validate([
|
||||
"time" => "required"
|
||||
"time" => "required",
|
||||
"machine" => "required"
|
||||
]);
|
||||
|
||||
$machineReservation = new WashingReservation($data);
|
||||
$machineReservation->save();
|
||||
|
||||
return Response::detect("washing-reservations.store");
|
||||
$saved = $machineReservation->save();
|
||||
|
||||
if(!$saved){
|
||||
return Response::detect("washing-reservations.store", [
|
||||
"washing_reservation" => $machineReservation
|
||||
]);
|
||||
}else{
|
||||
$reservations = WashingReservation::query()->paginate($request->input("limit", 20));
|
||||
|
||||
return Response::detect("washing-reservations.index", [ "reservations" => $reservations]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
|
@ -80,11 +97,14 @@ class WashingReservationController extends Controller
|
|||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
return Response::detect("washing-reservations.edit");
|
||||
$reservation = WashingReservation::query()->find($id);
|
||||
$machines = WashingMachine::all();
|
||||
|
||||
return Response::detect("washing-reservations.edit", ['washing_reservation' => $reservation, 'machines' => $machines ]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -92,36 +112,45 @@ class WashingReservationController extends Controller
|
|||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return Application|Factory|View
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
$data = $request->validate([
|
||||
"time" => "required"
|
||||
"time" => "required",
|
||||
"machine" => "required"
|
||||
]);
|
||||
|
||||
$machineReservation = WashingReservation::find($id);
|
||||
|
||||
$machineReservation->update($data);
|
||||
|
||||
$machineReservation->save();
|
||||
$saved = $machineReservation->save();
|
||||
|
||||
return Response::detect("washing-reservations.edit", [
|
||||
"washingReservation" => $machineReservation
|
||||
]);
|
||||
if(!$saved){
|
||||
return Response::detect("washing-reservations.update", [
|
||||
"washing_reservation" => $machineReservation
|
||||
]);
|
||||
}else{
|
||||
$reservations = WashingReservation::query()->paginate($request->query("limit", 20));
|
||||
|
||||
return Response::detect("washing-reservations.index", [ "reservations" => $reservations]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return RedirectResponse
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
$machineReservation = WashingReservation::find($id);
|
||||
$machineReservation->delete();
|
||||
|
||||
return Response::detect("washing-reservations.delete");
|
||||
$reservations = WashingReservation::query()->paginate( 20);
|
||||
|
||||
return redirect()->route("washing-reservations.index", [ "reservations" => $reservations]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,5 +6,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||
|
||||
class WashingMachine extends Model
|
||||
{
|
||||
//
|
||||
protected $fillable = [
|
||||
'name'
|
||||
];
|
||||
}
|
||||
|
|
|
@ -6,5 +6,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||
|
||||
class WashingReservation extends Model
|
||||
{
|
||||
//
|
||||
protected $fillable = [
|
||||
'time', 'machine'
|
||||
];
|
||||
}
|
||||
|
|
|
@ -17,6 +17,8 @@ class CreateWashingReservations extends Migration
|
|||
$table->id();
|
||||
$table->timestamp("time");
|
||||
$table->timestamps();
|
||||
$table->unsignedBigInteger('machine');
|
||||
$table->foreign("machine")->references('id')->on('washing_machines');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateResourceCategories extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('resource_categories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string("name")->unique();
|
||||
$table->text("description");
|
||||
$table->string("slug")->unique();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('resource_categories');
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -4,16 +4,18 @@
|
|||
min-width: 194px;
|
||||
}
|
||||
|
||||
.segment {
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
.segment > h3 {
|
||||
margin-left: -1rem;
|
||||
margin-top: 0;
|
||||
width: calc(100% + 2rem);
|
||||
background-color: rgba(0,0,0, 0.2);
|
||||
width: calc(100% + 1rem);
|
||||
text-align: center;
|
||||
margin-bottom: 0;
|
||||
font-size: 1.15em;
|
||||
}
|
||||
|
||||
.segment > h3 > a {
|
||||
padding: 1rem 2rem;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.segment > div {
|
||||
|
@ -23,8 +25,8 @@
|
|||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
.segment > div:hover {
|
||||
background-color: rgba(0,0,0,0.2);
|
||||
.segment > h3:hover {
|
||||
background-color: rgba(0,0,0, 0.2);
|
||||
}
|
||||
|
||||
.segment > div > a > img {
|
||||
|
@ -35,3 +37,13 @@
|
|||
.segment > div > a {
|
||||
|
||||
}
|
||||
|
||||
.btn-inline {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.btn-inline > img {
|
||||
height: 1em;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('contacts.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Kontakt</a>
|
||||
</div>
|
||||
<table class="tbl mt-2">
|
||||
<tr>
|
||||
<th>Kontakt Navn</th>
|
||||
<th>Titel</th>
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('events.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Event</a>
|
||||
</div>
|
||||
<table class="tbl mt-2">
|
||||
<tr>
|
||||
<th>Event Navn</th>
|
||||
<th>Event Beskrivelse</th>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
@csrf
|
||||
@method("PUT")
|
||||
<label for="title">Titel:</label>
|
||||
<input value="{{$link->name}}" type="text" name="title" id="title" required>
|
||||
<input value="{{$link->name}}" type="text" name="name" id="title" required>
|
||||
<label for="link">Linket:</label>
|
||||
<input value="{{$link->link}}" type="text" name="link" id="link" required>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('external-links.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Ektern Link</a>
|
||||
</div>
|
||||
<table class="tbl mt-2">
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Link</th>
|
||||
|
|
|
@ -11,85 +11,34 @@
|
|||
<main class="row">
|
||||
<div class="col nav" style="background-color: #333333;">
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Brugere</h3>
|
||||
<div class="row">
|
||||
<a href="{{ route('users.index') }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Brugere</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{ route('users.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Bruger</a>
|
||||
</div>
|
||||
<h3 class="text-white"><a href="{{ route('users.index') }}" class="text-white">Brugere</a></h3>
|
||||
</div>
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Roller</h3>
|
||||
<div class="row">
|
||||
<a href="{{ route("roles.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Roller</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{ route('roles.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Rolle</a>
|
||||
</div>
|
||||
<h3 class="text-white"><a href="{{ route("roles.index") }}" class="text-white">Roller</a></h3>
|
||||
</div>
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Menuplan</h3>
|
||||
<div class="row">
|
||||
<a href="{{ route("menu-plans.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Menuplan</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{ route("menu-plans.create") }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Menuplan</a>
|
||||
</div>
|
||||
<h3 class="text-white"><a href="{{ route("menu-plans.index")}}" class="text-white">Menuplan</a></h3>
|
||||
</div>
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Aktiviteter</h3>
|
||||
<div class="row">
|
||||
<a href="{{ route("events.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Aktiviteter</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{ route("events.create") }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Aktivitet</a>
|
||||
</div>
|
||||
<h3 class="text-white"><a href="{{ route("events.index") }}" class="text-white">Aktiviteter</a></h3>
|
||||
</div>
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Vaskemaskiner</h3>
|
||||
<div class="row">
|
||||
<a href="{{ route("washing-machines.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Vaskemaskiner</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 class="row">
|
||||
<a href="{{ route('washing-machines.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Vaskemaskine</a>
|
||||
</div>
|
||||
<h3 class="text-white"><a href="{{ route("washing-machines.index") }}" class="text-white">Vaskemaskiner</a></h3>
|
||||
</div>
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Eksterne Links</h3>
|
||||
<div class="row">
|
||||
<a href="{{ route("external-links.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Links</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{ route('external-links.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Link</a>
|
||||
</div>
|
||||
<h3 class="text-white"><a href="{{ route("washing-reservations.index") }}" class="text-white">Vaskemaskiner Reservationer</a></h3>
|
||||
</div>
|
||||
<div class="segment">
|
||||
<h3 class="text-white"><a href="{{ route("external-links.index") }}" class="text-white">Eksterne Links</a></h3>
|
||||
</div>
|
||||
{{-- <div class="segment">--}}
|
||||
{{-- <h3 class="text-white">Personale</h3>--}}
|
||||
{{-- <div class="row">--}}
|
||||
{{-- <a href="{{ route('staff.index') }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Personale</a>--}}
|
||||
{{-- </div>--}}
|
||||
{{-- <div class="row">--}}
|
||||
{{-- <a href="{{ route('staff.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Personal</a>--}}
|
||||
{{-- </div>--}}
|
||||
{{-- <h3 class="text-white"><a href="{{ route('staff.index') }}" class="text-white">Personale</a></h3>--}}
|
||||
{{-- </div>--}}
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Kontakter</h3>
|
||||
<div class="row">
|
||||
<a href="{{ route("contacts.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Kontakter</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{ route('contacts.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Kontakt</a>
|
||||
</div>
|
||||
<h3 class="text-white"><a href="{{ route("contacts.index") }}" class="text-white">Kontakter</a></h3>
|
||||
</div>
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Feedback</h3>
|
||||
<div class="row">
|
||||
<a href="{{ route('feedbacks.index') }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Feedback</a>
|
||||
</div>
|
||||
<h3 class="text-white"><a href="{{ route('feedbacks.index') }}" class="text-white">Feedback</a></h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-85" style="background-color: #cccccc;">
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<img src="{{ URL::asset('/images/logos/Logo-hvid.svg') }}" class="h-100 brand" alt="Syddansk Erhvervsskole">
|
||||
|
||||
@auth
|
||||
<a href="" class="btn btn-dark text-white m-0 ml-auto">User: {{ Auth::user()->name }}</a>
|
||||
<a href="" class="btn btn-dark text-white m-0 ml-auto">Bruger: {{ ucfirst(Auth::user()->name_first) }} {{ ucfirst(Auth::user()->name_last) }}</a>
|
||||
<a href="{{ route('users.logout') }}" class="btn btn-dark text-white m-0 ml-1 mr-1">Log ud</a>
|
||||
@else
|
||||
<a href="{{ route('users.login') }}" class="btn btn-dark text-white m-0 ml-auto mr-1">Log ind</a>
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('menu-plans.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Menuplan</a>
|
||||
</div>
|
||||
<table class="tbl mt-2">
|
||||
<tr>
|
||||
<th>Uge</th>
|
||||
<th>Mandag</th>
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('roles.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Rolle</a>
|
||||
</div>
|
||||
<table class="tbl mt-2">
|
||||
<tr>
|
||||
<th>Navn</th>
|
||||
<th>Beskrivelse</th>
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
<label for="roles">Rolle:</label>
|
||||
<select name="roles[]" id="roles" class="mb-2" multiple="multiple" required>
|
||||
<option disabled selected value> -- Vælg Rolle(r) -- </option>
|
||||
<option value="">Ingen Rolle</option>
|
||||
@foreach($roles as $role)
|
||||
<option value="{{ $role->name }}">{{ $role->name }}</option>
|
||||
@endforeach
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
<input type="tel" name="phone" id="tel" value="{{ $user->phone }}" required>
|
||||
<label for="role">Rolle:</label>
|
||||
<select name="roles[]" id="roles" class="mb-2" multiple="multiple" required>
|
||||
<option disabled selected value> -- Vælg Rolle(r) -- </option>
|
||||
<option disabled selected value> -- Vælg Rolle(r) -- </option>
|
||||
<option value>Ingen Rolle</option>
|
||||
@foreach($roles as $role)
|
||||
<option value="{{ $role->name }}">{{ $role->name }}</option>
|
||||
@endforeach
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('users.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Bruger</a>
|
||||
</div>
|
||||
<table class="tbl mt-2">
|
||||
<tr>
|
||||
<th>Fornavn</th>
|
||||
<th>Efternavn</th>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('washing-machines.delete') }}" class="text-white">Fjern Vaskemaskine</a> /
|
||||
<a href="{{ route('washing-machines.destroy') }}" class="text-white">Fjern Vaskemaskine</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
|
|
|
@ -6,14 +6,15 @@
|
|||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('washing-machines.edit', ['id' => $user->id]) }}" class="text-white">Rediger Vaskemaskiner</a> /
|
||||
<a href="{{ route('washing-machines.edit', ['washing_machine' => $machine]) }}" class="text-white">Rediger Vaskemaskiner</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<form method="post" action="{{ route("washing-machines.store") }}">
|
||||
<form method="post" action="{{ route("washing-machines.update", [ 'washing_machine' => $machine]) }}">
|
||||
@csrf
|
||||
@method("put")
|
||||
<label for="name_first">Vaskemaskine Navn:</label>
|
||||
<input type="text" name="name" id="name" max="60" required>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
<input type="text" name="name" id="name" max="60" value="{{$machine->name}}" required>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||
</form>
|
||||
@endsection
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('washing-machines.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Vaskemaskine</a>
|
||||
</div>
|
||||
<table class="tbl mt-2">
|
||||
<tr>
|
||||
<th>Navn</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
|
@ -18,9 +21,9 @@
|
|||
</tr>
|
||||
@foreach($machines as $machine)
|
||||
<tr>
|
||||
<td>{Navn}</td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("washing-machines.destroy", [ "machine" => $machine ]) }}" class="w-100 nostyle">
|
||||
<td>{{$machine->name}}</td>
|
||||
<td><a href="{{ route('washing-machines.edit', [ 'washing_machine' => $machine ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route('washing-machines.destroy', [ 'washing_machine' => $machine ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
|
@ -30,6 +33,4 @@
|
|||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
{{ $machines->links() }}
|
||||
@endsection
|
||||
|
|
|
@ -6,21 +6,21 @@
|
|||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('washing-reservations.create') }}" class="text-white">Opret Vaske Reservationer</a> /
|
||||
<a href="{{ route('washing-reservations.create') }}" class="text-white">Opret Vaskemaskine Reservation</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<h1>Opret Booking:</h1>
|
||||
<h1>Opret Reservation:</h1>
|
||||
<form method="post" action="{{ route("washing-reservations.store") }}">
|
||||
@csrf
|
||||
<label for="name_first">Fornavn:</label>
|
||||
<input type="text" name="name_first" id="name_first" required>
|
||||
<label for="name_last">Efternavn:</label>
|
||||
<input type="text" name="name_last" id="name_last" required>
|
||||
<label for="tel">Telefon nr:</label>
|
||||
<input type="tel" name="phone" id="tel" required>
|
||||
<select name="machine_choice">
|
||||
<option>Vaskemaskine 1</option>
|
||||
<label for="time">Tidspunkt:</label>
|
||||
<input type="datetime-local" name="time" id="time" required>
|
||||
<label for="machine">Vaskemaskine:</label>
|
||||
<select name="machine" id="machine" required>
|
||||
<option disabled selected value> -- Vælg Vaskemaskine -- </option>
|
||||
@foreach($machines as $machine)
|
||||
<option value="{{ $machine->id }}">{{ $machine->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
</form>
|
||||
|
|
|
@ -6,22 +6,26 @@
|
|||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('washing-reservations.edit', ['id' => $reservations->id]) }}" class="text-white">Rediger Vaske Reservationer</a> /
|
||||
<a href="{{ route('washing-reservations.edit', ['washing_reservation' => $washing_reservation]) }}" class="text-white">Rediger Vaske Reservationer</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<h1>Rediger Booking:</h1>
|
||||
<form method="post" action="">
|
||||
<form method="post" action="{{ route('washing-reservations.update', ['washing_reservation' => $washing_reservation ]) }}">
|
||||
@csrf
|
||||
<label for="name_first">Fornavn:</label>
|
||||
<input type="text" name="name_first" id="name_first" value="{Fornavn}" required>
|
||||
<label for="name_last">Efternavn:</label>
|
||||
<input type="text" name="name_last" id="name_last" value="{Efternavn}" required>
|
||||
<input type="password" id="password2" value="{Password}" required>
|
||||
<label for="tel">Telefon nr:</label>
|
||||
<input type="tel" name="phone" id="tel" value="{Telefon}" required>
|
||||
<select>
|
||||
<option>Vaskemaskine 1</option>
|
||||
@method("put")
|
||||
<label for="time">Tidspunkt:</label>
|
||||
<input type="datetime-local" name="time" id="time" value="{{ $washing_reservation->time }}" required>
|
||||
<label for="machine">Vaskemaskine:</label>
|
||||
<select name="machine" id="machine" required>
|
||||
<option disabled value> -- Vælg Vaskemaskine -- </option>
|
||||
@foreach($machines as $machine)
|
||||
@if($machine->id == $washing_reservation->machine)
|
||||
<option selected value="{{ $machine->id }}">{{ $machine->name }}</option>
|
||||
@else
|
||||
<option value="{{ $machine->id }}">{{ $machine->name }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||
</form>
|
||||
|
|
|
@ -10,23 +10,22 @@
|
|||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<div class="row align-items-center">
|
||||
<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>
|
||||
</div>
|
||||
<table class="tbl mt-2">
|
||||
<tr>
|
||||
<th>Fornavn</th>
|
||||
<th>Efternavn</th>
|
||||
<th>Tlf nr</th>
|
||||
<th>Vaskemaskine</th>
|
||||
<th>Time</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
</tr>
|
||||
@foreach($reservations as $reservation)
|
||||
<tr>
|
||||
<td>{Fornavn}</td>
|
||||
<td>{Efternavn}</td>
|
||||
<td>{Tlf Nr}</td>
|
||||
<td>{Vaskemaskine Nr.}</td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="" class="w-100 nostyle">
|
||||
<td>{{ \App\WashingMachine::query()->find($reservation->machine)->name }}</td>
|
||||
<td>{{ $reservation->time }}</td>
|
||||
<td><a href="{{ route('washing-reservations.edit', ['washing_reservation' => $reservation]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route('washing-reservations.destroy', ['washing_reservation' => $reservation]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Vaske Reservationer - Rediger
|
||||
Vaskemaskine Reservationer - Rediger
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('washing-reservations.edit') }}" class="text-white">Rediger Vaske Reservationer</a> /
|
||||
<a href="{{ route('washing-reservations.edit', ['washing_reservation' => $washing_reservation]) }}" class="text-white">Rediger Vaskemaskine Reservationer</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
Din Vaske Reservationer blev (ikke) redigeret.
|
||||
Din Vaskemaskine Reservationer blev (ikke) redigeret.
|
||||
@endsection
|
||||
|
|
|
@ -7,11 +7,15 @@
|
|||
@section("content")
|
||||
<main>
|
||||
<h1 class="text-center sde-blue mb-0">Aktiviteter</h1>
|
||||
@foreach($events as $event)
|
||||
<h3 class="sde-blue bold text-center mb-0">{{$event->name}}</h3>
|
||||
<p class="text-center mt-0">{{$event->date}}</p>
|
||||
<p>{{$event->description}}</p>
|
||||
<a class="btn text-center btn-sde-blue btn-disabled" id="tilmeld">Tilmeld</a>
|
||||
@endforeach
|
||||
@if(!$events->isEmpty())
|
||||
@foreach($events as $event)
|
||||
<h3 class="sde-blue bold text-center mb-0">{{$event->name}}</h3>
|
||||
<p class="text-center mt-0">{{$event->date}}</p>
|
||||
<p class="text-center">{{$event->description}}</p>
|
||||
<a class="btn text-center btn-sde-blue" id="tilmeld">Tilmeld</a>
|
||||
@endforeach
|
||||
@else
|
||||
<p class="text-center">Der er ingen aktiviteter!</p>
|
||||
@endif
|
||||
</main>
|
||||
@endsection
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
{{-- <img src="{{URL::asset('/images/icons/Galleri.svg')}}" alt="Galleri">--}}
|
||||
{{-- Galleri--}}
|
||||
{{-- </a>--}}
|
||||
<a href="#">
|
||||
<a href="{{ route("contacts.index") }}">
|
||||
<img src="{{URL::asset('/images/icons/Kontoret.svg')}}" alt="Kontoret">
|
||||
Kontoret
|
||||
</a>
|
||||
|
|
|
@ -11,5 +11,6 @@
|
|||
<h4 class="mt-0">Email: {{ Auth::user()->email }}</h4>
|
||||
<h4 class="mt-0">Telefon Nr.: {{ Auth::user()->phone }}</h4>
|
||||
<a class="btn text-center btn-sde-blue mt-1" href="{{ route("users.accountedit") }}">Rediger Oplysninger</a>
|
||||
<a class="btn text-center btn-sde-blue mt-1" href="{{ route("users.accounteditpass") }}">Ændre Password</a>
|
||||
</main>
|
||||
@endsection
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
@section("content")
|
||||
<main>
|
||||
<h1 class="text-center sde-blue mt-0">Konto</h1>
|
||||
<form action="">
|
||||
<form method="post" action="{{ route("users.update", ['user' => Auth::user()]) }}">
|
||||
@csrf
|
||||
@method("put")
|
||||
<span>Navn:</span>
|
||||
<input type="text" name="name" id="name" value="{{ Auth::user()->name_first . " " . Auth::user()->name_last }}" disabled>
|
||||
<span>Email:</span>
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
@extends("app.layout.base")
|
||||
|
||||
@section("title")
|
||||
Account
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<main>
|
||||
<h1 class="text-center sde-blue mt-0">Konto</h1>
|
||||
<form method="post" action="{{ route("users.update", ['user' => Auth::user()]) }}">
|
||||
@csrf
|
||||
@method("put")
|
||||
<span>Nuværende Password:</span>
|
||||
<input type="password" name="oldpassword" id="old" required>
|
||||
<span>Nyt Password:</span>
|
||||
<input type="password" name="password" id="new" required>
|
||||
<span>Bekræft Nyt Password:</span>
|
||||
<input type="password" name="confirmpassword" id="confirm" required>
|
||||
<button type="submit" class="btn text-center btn-sde-blue mt-1">Rediger</button>
|
||||
</form>
|
||||
</main>
|
||||
@endsection
|
|
@ -27,6 +27,8 @@ Route::get("/forgot", "UserController@showForgot")->name("users.show-forgot");
|
|||
Route::post("/forgot", "UserController@forgot")->name("users.forgot");
|
||||
Route::get("/account", "UserController@account")->name("users.account");
|
||||
Route::get("/account/edit", "UserController@accountedit")->name("users.accountedit");
|
||||
Route::get("/account/editpass", "UserController@accounteditpass")->name("users.accounteditpass");
|
||||
Route::post("/account/update", "UserController@update")->name("users.accountupdate");
|
||||
Route::get("phones", "PhoneController@index")->name("phones.index");
|
||||
|
||||
|
||||
|
@ -40,4 +42,5 @@ Route::resource("washing-reservations", "WashingReservationController");
|
|||
Route::resource("feedbacks", "FeedbackController");
|
||||
Route::resource("external-links", "ExternalLinkController");
|
||||
Route::resource("resource-extensions", "ResourceExtensionController");
|
||||
Route::resource("resource-categories", "ResourceCategoryController");
|
||||
Route::resource("roles", "RolesController");
|
||||
|
|
Loading…
Reference in New Issue