Commit e547c48d authored by Jacob Priddy's avatar Jacob Priddy 👌

Remove some unneeded files

parent f02e3f4b
......@@ -165,10 +165,14 @@ class DoorsController extends Controller
$doorGroups->getGroupsForDoor($doorId, $presenter);
return view('admin.doorGroups', array_merge(
return view('layouts.admin.groups', array_merge(
$presenter->getViewModel(),
$groupsPresenter->all('allGroups'),
['doorId' => $doorId],
[
'resourceId' => $doorId,
'control' => 'detachDoorGroup',
'resource' => 'door',
],
));
}
......
......@@ -16,8 +16,8 @@ use Source\UseCases\Users\DeleteUser\DeleteUserUseCase;
use Source\UseCases\Users\UpdateUser\UpdateUserUseCase;
use Source\UseCases\Doors\GetDoors\MePresenter as DoorsPresenter;
use Source\UseCases\GroupUser\GetUserGroups\GetUserGroupsUseCase;
use Source\UseCases\GroupUser\AddUserToGroup\AddUserToGroupUseCase;
use Source\UseCases\Users\GetUser\WebPresenter as GetUserPresenter;
use Source\UseCases\GroupUser\AddUserToGroup\AddUserToGroupUseCase;
use Source\UseCases\Groups\GetGroups\WebPresenter as GroupsPresenter;
use Source\UseCases\Users\GetUsers\WebPresenter as GetUsersPresenter;
use Source\UseCases\Users\CreateUser\WebPresenter as CreateUserPresenter;
......@@ -186,10 +186,14 @@ class UsersController extends Controller
$userGroups->getGroupsForUser($userId, $presenter);
return view('admin.userGroups', array_merge(
return view('layouts.admin.groups', array_merge(
$presenter->getViewModel(),
$groupsPresenter->all('allGroups'),
['userId' => $userId],
[
'resourceId' => $userId,
'control' => 'detachUserGroup',
'resource' => 'user',
],
));
}
......
@extends('layouts.admin.groups', [
'resource' => 'door',
'control' => 'detachDoorGroup',
'resourceId' => $doorId,
])
@extends('layouts.admin.groups', [
'resource' => 'user',
'control' => 'detachUserGroup',
'resourceId' => $userId,
])
<form action="{{ route('web.admin.doors.removeGroup', ['doorId' => $doorId, 'groupId' => $id]) }}" method="POST">
<form action="{{ route('web.admin.doors.removeGroup', ['doorId' => $resourceId, 'groupId' => $id]) }}" method="POST">
@csrf
@method('DELETE')
<button class="btn btn-danger" type="submit" data-toggle="tooltip" title="Detach door from group.">
......
<form action="{{ route('web.admin.users.removeGroup', ['userId' => $userId, 'groupId' => $id]) }}" method="POST">
<form action="{{ route('web.admin.users.removeGroup', ['userId' => $resourceId, 'groupId' => $id]) }}" method="POST">
@csrf
@method('DELETE')
<button class="btn btn-danger" type="submit" data-toggle="tooltip" title="Detach user from group.">
......
......@@ -127,6 +127,10 @@ Route::name('web.')->middleware(['auth:api'])->group(static function () {
Route::put('/{scheduleId}', [SchedulesController::class, 'update'])->name('update');
Route::delete('/{scheduleId}', [SchedulesController::class, 'destroy'])->name('destroy');
Route::get('/{scheduleId}/events', [SchedulesController::class, 'events'])->name('events');
// Route::get('/{scheduleId}/groups', [SchedulesController::class, 'groups'])->name('groups');
// Route::post('/{scheduleId}/groups', [SchedulesController::class, 'addGroup'])->name('addGroup');
// Route::delete('/{scheduleId}/group/{groupId}', [SchedulesController::class, 'removeGroup'])->name('removeGroup');
});
Route::name('overrides.')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment