diff --git a/skolehjem/app/Http/Controllers/WashingReservationController.php b/skolehjem/app/Http/Controllers/WashingReservationController.php
index 37ab1b3..e7e2958 100644
--- a/skolehjem/app/Http/Controllers/WashingReservationController.php
+++ b/skolehjem/app/Http/Controllers/WashingReservationController.php
@@ -132,6 +132,7 @@ class WashingReservationController extends Controller
public function destroy($id)
{
$machineReservation = WashingReservation::find($id);
+ dd($id);
$machineReservation->delete();
$reservations = WashingReservation::query()->paginate( 20);
@@ -265,7 +266,7 @@ class WashingReservationController extends Controller
{
WashingReservation::query()->where('time', '<', date('Y-m-d H:i:s', strtotime('-1 hour')))->delete();
- $reservations = WashingReservation::query()->join('washing_machines', 'washing_machines.id', '=', 'washing_reservations.machine_id')->join('locations', 'locations.id', '=', 'washing_machines.location_id')->where("user_id", "=", auth()->user()->id)->orderBY('time' , 'asc')->paginate($request->query("limit", 20));
+ $reservations = WashingReservation::query()->where("user_id", "=", auth()->user()->id)->orderBY('time' , 'asc')->paginate($request->query("limit", 20));
return Response::detect("washing-reservations.index", [ "reservations" => $reservations]);
}
diff --git a/skolehjem/resources/views/admin/roles/create.blade.php b/skolehjem/resources/views/admin/roles/create.blade.php
index f86f240..6f9824e 100644
--- a/skolehjem/resources/views/admin/roles/create.blade.php
+++ b/skolehjem/resources/views/admin/roles/create.blade.php
@@ -32,7 +32,7 @@
@csrf
-
+
@@ -70,14 +70,14 @@
Aktiviteter |
Empty |
- //TEST |
+ |
|
- //TEST |
+ |
Reservationer |
Empty |
- |
+ |
|
|
@@ -98,7 +98,7 @@
Feedback |
Empty |
- |
+ |
|
|
@@ -122,7 +122,8 @@
Admin Panel |
Adgang til admin panelet |
- |
+ |
+ |
Brugere |
@@ -218,7 +219,7 @@
Feedback |
Empty |
|
- |
+ |
|
|
|
diff --git a/skolehjem/resources/views/admin/roles/edit.blade.php b/skolehjem/resources/views/admin/roles/edit.blade.php
index 216babc..9c0bf35 100644
--- a/skolehjem/resources/views/admin/roles/edit.blade.php
+++ b/skolehjem/resources/views/admin/roles/edit.blade.php
@@ -33,7 +33,7 @@
@method("put")
-
+
@@ -70,14 +70,14 @@
Aktiviteter |
Empty |
- //TESThasPermissionTo("userevent.create")) checked @endif> |
+ hasPermissionTo("userevent.create")) checked @endif> |
hasPermissionTo("event.show")) checked @endif> |
- //TESThasPermissionTo("userevent.delete")) checked @endif> |
+ hasPermissionTo("userevent.delete")) checked @endif> |
Reservationer |
Empty |
- hasPermissionTo("washing.machine.reservation.create")) checked @endif> |
+ hasPermissionTo("washing.machine.reservation.create")) checked @endif> |
hasPermissionTo("washing.machine.reservation.show")) checked @endif> |
hasPermissionTo("washing.machine.reservation.delete")) checked @endif> |
@@ -98,7 +98,7 @@
Feedback |
Empty |
- hasPermissionTo("feedback.create")) checked @endif> |
+ hasPermissionTo("feedback.create")) checked @endif> |
|
|
@@ -122,7 +122,8 @@
Admin Panel |
Adgang til admin panelet |
- hasPermissionTo("admin.panel.show")) checked @endif> |
+ |
+ hasPermissionTo("admin.panel.show")) checked @endif> |
Brugere |
diff --git a/skolehjem/resources/views/admin/users/create.blade.php b/skolehjem/resources/views/admin/users/create.blade.php
index aebea0f..668d55e 100644
--- a/skolehjem/resources/views/admin/users/create.blade.php
+++ b/skolehjem/resources/views/admin/users/create.blade.php
@@ -20,7 +20,7 @@
-
+