Merge branch 'master' of https://github.com/sebathefox/skolehjem-webapp
This commit is contained in:
commit
32a7e3d3d0
|
@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
use App\Contact;
|
use App\Contact;
|
||||||
|
use phpDocumentor\Reflection\Types\Context;
|
||||||
|
|
||||||
class ContactController extends Controller
|
class ContactController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -59,9 +60,15 @@ class ContactController extends Controller
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$contact = new Contact($requestContact);
|
$contact = new Contact($requestContact);
|
||||||
$contact->save();
|
$saved = $contact->save();
|
||||||
|
|
||||||
|
if(!$saved){
|
||||||
return Response::detect("contacts.store");
|
return Response::detect("contacts.store");
|
||||||
|
}else{
|
||||||
|
$contact = Contact::query()->paginate($request->input("limit", 20));
|
||||||
|
return Response::detect("contacts.index", ['contacts' => $contact]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -101,9 +108,15 @@ class ContactController extends Controller
|
||||||
$data = $request->all();
|
$data = $request->all();
|
||||||
$contact = Contact::find($id);
|
$contact = Contact::find($id);
|
||||||
$contact->update($data);
|
$contact->update($data);
|
||||||
$contact->save();
|
$saved = $contact->save();
|
||||||
|
|
||||||
|
if(!$saved){
|
||||||
return Response::detect("contacts.update", [ "contacts" => $contact ]);
|
return Response::detect("contacts.update", [ "contacts" => $contact ]);
|
||||||
|
}else{
|
||||||
|
$contact = Contact::query()->paginate($request->input("limit", 20));
|
||||||
|
return Response::detect("contacts.index", ['contacts' => $contact]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -64,9 +64,15 @@ class EventController extends Controller
|
||||||
//creates a new Event model with the given parameter
|
//creates a new Event model with the given parameter
|
||||||
$event = new Event($requestBody);
|
$event = new Event($requestBody);
|
||||||
|
|
||||||
$event->save();
|
$saved = $event->save();
|
||||||
|
|
||||||
|
if(!$saved){
|
||||||
return Response::detect("events.store");
|
return Response::detect("events.store");
|
||||||
|
}else{
|
||||||
|
$event = Event::query()->paginate($request->input("limit", 20));
|
||||||
|
return Response::detect("events.index", ['events' => $event]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -105,9 +111,15 @@ class EventController extends Controller
|
||||||
|
|
||||||
$event = Event::find($id);
|
$event = Event::find($id);
|
||||||
$event->update($data);
|
$event->update($data);
|
||||||
$event->save();
|
$saved = $event->save();
|
||||||
|
|
||||||
|
if(!$saved){
|
||||||
return Response::detect("events.update", [ "event" => $event]);
|
return Response::detect("events.update", [ "event" => $event]);
|
||||||
|
}else{
|
||||||
|
$event = Event::query()->paginate($request->input("limit", 20));
|
||||||
|
return Response::detect("events.index", ['events' => $event]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -55,9 +55,15 @@ class ExternalLinkController extends Controller
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$externalLink = new ExternalLink($requestBody);
|
$externalLink = new ExternalLink($requestBody);
|
||||||
$externalLink->save();
|
$saved = $externalLink->save();
|
||||||
|
|
||||||
|
if(!$saved){
|
||||||
return Response::detect("external-links.store");
|
return Response::detect("external-links.store");
|
||||||
|
}else{
|
||||||
|
$externalLink = ExternalLink::query()->paginate($request->input("limit", 20));
|
||||||
|
return Response::detect("external-links.index", ['links' => $externalLink]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -96,9 +102,15 @@ class ExternalLinkController extends Controller
|
||||||
|
|
||||||
$link = ExternalLink::find($id);
|
$link = ExternalLink::find($id);
|
||||||
$link->update($data);
|
$link->update($data);
|
||||||
$link->save();
|
$saved = $link->save();
|
||||||
|
|
||||||
|
if(!$saved){
|
||||||
return Response::detect("external-links.update", [ "link" => $link]);
|
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]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -60,9 +60,14 @@ class MenuPlanController extends Controller
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$menuPlans = new MenuPlan($requestMenuPlanCreate);
|
$menuPlans = new MenuPlan($requestMenuPlanCreate);
|
||||||
$menuPlans->save();
|
$saved = $menuPlans->save();
|
||||||
|
|
||||||
|
if(!$saved){
|
||||||
return Response::detect("menuplans.store");
|
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 = MenuPlan::find($id);
|
||||||
$menuplan->update($data);
|
$menuplan->update($data);
|
||||||
$menuplan->save();
|
$saved = $menuplan->save();
|
||||||
|
|
||||||
|
if(!$saved){
|
||||||
return Response::detect("menuplans.update", [ "menuplan" => $menuplan ]);
|
return Response::detect("menuplans.update", [ "menuplan" => $menuplan ]);
|
||||||
|
}else{
|
||||||
|
$menuPlans = MenuPlan::query()->paginate($request->input("limit", 20));
|
||||||
|
return Response::detect("menuplans.index", ['menuPlans' => $menuPlans]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -45,9 +45,16 @@ class rolesController extends Controller
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$role = new Role($requestRole);
|
$role = new Role($requestRole);
|
||||||
$role->save();
|
$saved = $role->save();
|
||||||
|
|
||||||
|
if(!$saved){
|
||||||
return Response::detect("roles.store");
|
return Response::detect("roles.store");
|
||||||
|
}else{
|
||||||
|
$roles = Role::query()->paginate($request->input("limit", 20));
|
||||||
|
return Response::detect("roles.index", ['roles' => $roles]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -85,9 +92,15 @@ class rolesController extends Controller
|
||||||
$data = $request->all();
|
$data = $request->all();
|
||||||
$role = Role::find($id);
|
$role = Role::find($id);
|
||||||
$role->update($data);
|
$role->update($data);
|
||||||
$role->save();
|
$saved = $role->save();
|
||||||
|
|
||||||
|
if(!$saved){
|
||||||
return Response::detect("roles.update", [ "role" => $role ]);
|
return Response::detect("roles.update", [ "role" => $role ]);
|
||||||
|
}else{
|
||||||
|
$roles = Role::query()->paginate($request->input("limit", 20));
|
||||||
|
return Response::detect("roles.index", ['roles' => $roles]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -153,12 +153,14 @@ class UserController extends Controller
|
||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
$user->update($data);
|
$user->update($data);
|
||||||
|
|
||||||
|
if ($request->roles != null) {
|
||||||
$user->roles()->detach();
|
$user->roles()->detach();
|
||||||
$user->forgetCachedPermissions();
|
$user->forgetCachedPermissions();
|
||||||
|
|
||||||
foreach ($request->roles as $role){
|
foreach ($request->roles as $role){
|
||||||
$user->assignRole($role);
|
$user->assignRole($role);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$user->save();
|
$user->save();
|
||||||
// }
|
// }
|
||||||
|
@ -246,4 +248,9 @@ class UserController extends Controller
|
||||||
{
|
{
|
||||||
return Response::detect("users.edit");
|
return Response::detect("users.edit");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function accounteditpass()
|
||||||
|
{
|
||||||
|
return Response::detect("users.editpass");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,13 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\Foundation\Application;
|
||||||
|
use Illuminate\Contracts\View\Factory;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
|
|
||||||
use App\WashingMachine;
|
use App\WashingMachine;
|
||||||
|
use Illuminate\View\View;
|
||||||
|
|
||||||
class WashingMachineController extends Controller
|
class WashingMachineController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -24,11 +27,11 @@ class WashingMachineController extends Controller
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
*
|
*
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
* @return Application|Factory|View
|
||||||
*/
|
*/
|
||||||
public function index(Request $request)
|
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 ]);
|
return Response::detect("washing-machines.index", [ "machines" => $machines ]);
|
||||||
}
|
}
|
||||||
|
@ -36,7 +39,7 @@ class WashingMachineController extends Controller
|
||||||
/**
|
/**
|
||||||
* Show the form for creating a new resource.
|
* 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()
|
public function create()
|
||||||
{
|
{
|
||||||
|
@ -47,12 +50,12 @@ class WashingMachineController extends Controller
|
||||||
* Store a newly created resource in storage.
|
* Store a newly created resource in storage.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @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)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
$data = $request->validate([
|
$data = $request->validate([
|
||||||
"time" => "required"
|
"name" => "required"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$machine = new WashingMachine($data);
|
$machine = new WashingMachine($data);
|
||||||
|
@ -65,7 +68,7 @@ class WashingMachineController extends Controller
|
||||||
* Display the specified resource.
|
* Display the specified resource.
|
||||||
*
|
*
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
* @return Application|Factory|View
|
||||||
*/
|
*/
|
||||||
public function show($id)
|
public function show($id)
|
||||||
{
|
{
|
||||||
|
@ -80,7 +83,7 @@ class WashingMachineController extends Controller
|
||||||
* Show the form for editing the specified resource.
|
* Show the form for editing the specified resource.
|
||||||
*
|
*
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
* @return Application|Factory|View
|
||||||
*/
|
*/
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
|
@ -96,36 +99,43 @@ class WashingMachineController extends Controller
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param int $id
|
* @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)
|
public function update(Request $request, $id)
|
||||||
{
|
{
|
||||||
$data = $request->validate([
|
$data = $request->validate([
|
||||||
"time" => "required"
|
"name" => "required"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$machine = WashingMachine::find($id);
|
$machine = WashingMachine::find($id);
|
||||||
|
|
||||||
$machine->update($data);
|
$machine->update($data);
|
||||||
|
|
||||||
$machine->save();
|
$saved = $machine->save();
|
||||||
|
|
||||||
return Response::detect("washing-machines.edit", [
|
if(!$saved){
|
||||||
|
return Response::detect("washing-machines.update", [
|
||||||
"machine" => $machine
|
"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.
|
* Remove the specified resource from storage.
|
||||||
*
|
*
|
||||||
* @param int $id
|
* @param $id
|
||||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
* @return Response
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
$machine = WashingMachine::find($id);
|
$machine = WashingMachine::find($id);
|
||||||
$machine->delete();
|
$machine->delete();
|
||||||
|
|
||||||
return Response::detect("washing-machines.destroy");
|
return redirect()->route("washing-machines.index");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,5 +6,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class WashingMachine extends Model
|
class WashingMachine extends Model
|
||||||
{
|
{
|
||||||
//
|
protected $fillable = [
|
||||||
|
'name'
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -6588,16 +6588,18 @@ main {
|
||||||
min-width: 194px;
|
min-width: 194px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.segment {
|
|
||||||
margin-bottom: 1.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.segment > h3 {
|
.segment > h3 {
|
||||||
margin-left: -1rem;
|
margin-left: -1rem;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
width: calc(100% + 2rem);
|
width: calc(100% + 1rem);
|
||||||
background-color: rgba(0, 0, 0, 0.2);
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
margin-bottom: 0;
|
||||||
|
font-size: 1.15em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.segment > h3 > a {
|
||||||
|
padding: 1rem 2rem;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.segment > div {
|
.segment > div {
|
||||||
|
@ -6607,7 +6609,7 @@ main {
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.segment > div:hover {
|
.segment > h3:hover {
|
||||||
background-color: rgba(0, 0, 0, 0.2);
|
background-color: rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6616,6 +6618,16 @@ main {
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-inline {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-inline > img {
|
||||||
|
height: 1em;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
.directorypath {
|
.directorypath {
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
background-color: #333333;
|
background-color: #333333;
|
||||||
|
|
|
@ -4,16 +4,18 @@
|
||||||
min-width: 194px;
|
min-width: 194px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.segment {
|
|
||||||
margin-bottom: 1.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.segment > h3 {
|
.segment > h3 {
|
||||||
margin-left: -1rem;
|
margin-left: -1rem;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
width: calc(100% + 2rem);
|
width: calc(100% + 1rem);
|
||||||
background-color: rgba(0,0,0, 0.2);
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
margin-bottom: 0;
|
||||||
|
font-size: 1.15em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.segment > h3 > a {
|
||||||
|
padding: 1rem 2rem;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.segment > div {
|
.segment > div {
|
||||||
|
@ -23,7 +25,7 @@
|
||||||
margin-bottom: .5rem;
|
margin-bottom: .5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.segment > div:hover {
|
.segment > h3:hover {
|
||||||
background-color: rgba(0,0,0, 0.2);
|
background-color: rgba(0,0,0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,3 +37,13 @@
|
||||||
.segment > div > a {
|
.segment > div > a {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-inline {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-inline > img {
|
||||||
|
height: 1em;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
|
@ -10,7 +10,10 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("content")
|
@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>
|
<tr>
|
||||||
<th>Kontakt Navn</th>
|
<th>Kontakt Navn</th>
|
||||||
<th>Titel</th>
|
<th>Titel</th>
|
||||||
|
|
|
@ -10,7 +10,10 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("content")
|
@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>
|
<tr>
|
||||||
<th>Event Navn</th>
|
<th>Event Navn</th>
|
||||||
<th>Event Beskrivelse</th>
|
<th>Event Beskrivelse</th>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
@csrf
|
@csrf
|
||||||
@method("PUT")
|
@method("PUT")
|
||||||
<label for="title">Titel:</label>
|
<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>
|
<label for="link">Linket:</label>
|
||||||
<input value="{{$link->link}}" type="text" name="link" id="link" required>
|
<input value="{{$link->link}}" type="text" name="link" id="link" required>
|
||||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||||
|
|
|
@ -10,7 +10,10 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("content")
|
@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>
|
<tr>
|
||||||
<th>Title</th>
|
<th>Title</th>
|
||||||
<th>Link</th>
|
<th>Link</th>
|
||||||
|
|
|
@ -11,85 +11,34 @@
|
||||||
<main class="row">
|
<main class="row">
|
||||||
<div class="col nav" style="background-color: #333333;">
|
<div class="col nav" style="background-color: #333333;">
|
||||||
<div class="segment">
|
<div class="segment">
|
||||||
<h3 class="text-white">Brugere</h3>
|
<h3 class="text-white"><a href="{{ route('users.index') }}" class="text-white">Brugere</a></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>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="segment">
|
<div class="segment">
|
||||||
<h3 class="text-white">Roller</h3>
|
<h3 class="text-white"><a href="{{ route("roles.index") }}" class="text-white">Roller</a></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>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="segment">
|
<div class="segment">
|
||||||
<h3 class="text-white">Menuplan</h3>
|
<h3 class="text-white"><a href="{{ route("menu-plans.index")}}" class="text-white">Menuplan</a></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>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="segment">
|
<div class="segment">
|
||||||
<h3 class="text-white">Aktiviteter</h3>
|
<h3 class="text-white"><a href="{{ route("events.index") }}" class="text-white">Aktiviteter</a></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>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="segment">
|
<div class="segment">
|
||||||
<h3 class="text-white">Vaskemaskiner</h3>
|
<h3 class="text-white"><a href="{{ route("washing-machines.index") }}" class="text-white">Vaskemaskiner</a></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>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="segment">
|
<div class="segment">
|
||||||
<h3 class="text-white">Eksterne Links</h3>
|
<h3 class="text-white"><a href="{{ route("washing-reservations.index") }}" class="text-white">Vaskemaskiner Reservationer</a></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>
|
</div>
|
||||||
|
<div class="segment">
|
||||||
|
<h3 class="text-white"><a href="{{ route("external-links.index") }}" class="text-white">Eksterne Links</a></h3>
|
||||||
</div>
|
</div>
|
||||||
{{-- <div class="segment">--}}
|
{{-- <div class="segment">--}}
|
||||||
{{-- <h3 class="text-white">Personale</h3>--}}
|
{{-- <h3 class="text-white"><a href="{{ route('staff.index') }}" class="text-white">Personale</a></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>--}}
|
|
||||||
{{-- </div>--}}
|
{{-- </div>--}}
|
||||||
<div class="segment">
|
<div class="segment">
|
||||||
<h3 class="text-white">Kontakter</h3>
|
<h3 class="text-white"><a href="{{ route("contacts.index") }}" class="text-white">Kontakter</a></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>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="segment">
|
<div class="segment">
|
||||||
<h3 class="text-white">Feedback</h3>
|
<h3 class="text-white"><a href="{{ route('feedbacks.index') }}" class="text-white">Feedback</a></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>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-85" style="background-color: #cccccc;">
|
<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">
|
<img src="{{ URL::asset('/images/logos/Logo-hvid.svg') }}" class="h-100 brand" alt="Syddansk Erhvervsskole">
|
||||||
|
|
||||||
@auth
|
@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>
|
<a href="{{ route('users.logout') }}" class="btn btn-dark text-white m-0 ml-1 mr-1">Log ud</a>
|
||||||
@else
|
@else
|
||||||
<a href="{{ route('users.login') }}" class="btn btn-dark text-white m-0 ml-auto mr-1">Log ind</a>
|
<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
|
@endsection
|
||||||
|
|
||||||
@section("content")
|
@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>
|
<tr>
|
||||||
<th>Uge</th>
|
<th>Uge</th>
|
||||||
<th>Mandag</th>
|
<th>Mandag</th>
|
||||||
|
|
|
@ -10,7 +10,10 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("content")
|
@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>
|
<tr>
|
||||||
<th>Navn</th>
|
<th>Navn</th>
|
||||||
<th>Beskrivelse</th>
|
<th>Beskrivelse</th>
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
<label for="roles">Rolle:</label>
|
<label for="roles">Rolle:</label>
|
||||||
<select name="roles[]" id="roles" class="mb-2" multiple="multiple" required>
|
<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)
|
@foreach($roles as $role)
|
||||||
<option value="{{ $role->name }}">{{ $role->name }}</option>
|
<option value="{{ $role->name }}">{{ $role->name }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
<label for="role">Rolle:</label>
|
<label for="role">Rolle:</label>
|
||||||
<select name="roles[]" id="roles" class="mb-2" multiple="multiple" required>
|
<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)
|
@foreach($roles as $role)
|
||||||
<option value="{{ $role->name }}">{{ $role->name }}</option>
|
<option value="{{ $role->name }}">{{ $role->name }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
|
@ -10,7 +10,10 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("content")
|
@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>
|
<tr>
|
||||||
<th>Fornavn</th>
|
<th>Fornavn</th>
|
||||||
<th>Efternavn</th>
|
<th>Efternavn</th>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("path")
|
@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
|
@endsection
|
||||||
|
|
||||||
@section("content")
|
@section("content")
|
||||||
|
|
|
@ -6,14 +6,15 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("path")
|
@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
|
@endsection
|
||||||
|
|
||||||
@section("content")
|
@section("content")
|
||||||
<form method="post" action="{{ route("washing-machines.store") }}">
|
<form method="post" action="{{ route("washing-machines.update", [ 'washing_machine' => $machine]) }}">
|
||||||
@csrf
|
@csrf
|
||||||
|
@method("put")
|
||||||
<label for="name_first">Vaskemaskine Navn:</label>
|
<label for="name_first">Vaskemaskine Navn:</label>
|
||||||
<input type="text" name="name" id="name" max="60" required>
|
<input type="text" name="name" id="name" max="60" value="{{$machine->name}}" required>
|
||||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||||
</form>
|
</form>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
@ -10,7 +10,10 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("content")
|
@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>
|
<tr>
|
||||||
<th>Navn</th>
|
<th>Navn</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/pencil.svg') }}" alt="Update"></th>
|
||||||
|
@ -18,9 +21,9 @@
|
||||||
</tr>
|
</tr>
|
||||||
@foreach($machines as $machine)
|
@foreach($machines as $machine)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{Navn}</td>
|
<td>{{$machine->name}}</td>
|
||||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></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", [ "machine" => $machine ]) }}" class="w-100 nostyle">
|
<td><form method="post" action="{{ route('washing-machines.destroy', [ 'washing_machine' => $machine ]) }}" class="w-100 nostyle">
|
||||||
@csrf
|
@csrf
|
||||||
@method("delete")
|
@method("delete")
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,10 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("content")
|
@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>
|
<tr>
|
||||||
<th>Fornavn</th>
|
<th>Fornavn</th>
|
||||||
<th>Efternavn</th>
|
<th>Efternavn</th>
|
||||||
|
|
|
@ -11,5 +11,6 @@
|
||||||
<h4 class="mt-0">Email: {{ Auth::user()->email }}</h4>
|
<h4 class="mt-0">Email: {{ Auth::user()->email }}</h4>
|
||||||
<h4 class="mt-0">Telefon Nr.: {{ Auth::user()->phone }}</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.accountedit") }}">Rediger Oplysninger</a>
|
||||||
|
<a class="btn text-center btn-sde-blue mt-1" href="{{ route("users.accounteditpass") }}">Ændre Password</a>
|
||||||
</main>
|
</main>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
@section("content")
|
@section("content")
|
||||||
<main>
|
<main>
|
||||||
<h1 class="text-center sde-blue mt-0">Konto</h1>
|
<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>
|
<span>Navn:</span>
|
||||||
<input type="text" name="name" id="name" value="{{ Auth::user()->name_first . " " . Auth::user()->name_last }}" disabled>
|
<input type="text" name="name" id="name" value="{{ Auth::user()->name_first . " " . Auth::user()->name_last }}" disabled>
|
||||||
<span>Email:</span>
|
<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::post("/forgot", "UserController@forgot")->name("users.forgot");
|
||||||
Route::get("/account", "UserController@account")->name("users.account");
|
Route::get("/account", "UserController@account")->name("users.account");
|
||||||
Route::get("/account/edit", "UserController@accountedit")->name("users.accountedit");
|
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");
|
Route::get("phones", "PhoneController@index")->name("phones.index");
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue