diff --git a/app/Fileshare/Actions/FileshareApiIndexAction.php b/app/Fileshare/Actions/FileshareApiIndexAction.php new file mode 100644 index 00000000..4ee530e1 --- /dev/null +++ b/app/Fileshare/Actions/FileshareApiIndexAction.php @@ -0,0 +1,21 @@ +put('menu', 'setting'); + session()->put('title', 'Datei-Verbindungen'); + + return FileshareResource::collection(Fileshare::paginate(15)); + } +} diff --git a/app/Fileshare/Actions/FileshareIndexAction.php b/app/Fileshare/Actions/FileshareIndexAction.php index 4aa80e13..53874994 100644 --- a/app/Fileshare/Actions/FileshareIndexAction.php +++ b/app/Fileshare/Actions/FileshareIndexAction.php @@ -17,7 +17,7 @@ class FileshareIndexAction session()->put('menu', 'setting'); session()->put('title', 'Datei-Verbindungen'); - return Inertia::render('fileshareconnection/Index', [ + return Inertia::render('fileshare/Index', [ 'data' => FileshareResource::collection(Fileshare::paginate(15)), ]); } diff --git a/app/Fileshare/Actions/FileshareStoreAction.php b/app/Fileshare/Actions/FileshareStoreAction.php index 54a59463..86608b4b 100644 --- a/app/Fileshare/Actions/FileshareStoreAction.php +++ b/app/Fileshare/Actions/FileshareStoreAction.php @@ -3,6 +3,7 @@ namespace App\Fileshare\Actions; use App\Fileshare\Models\Fileshare; +use App\Lib\Events\Succeeded; use Illuminate\Validation\ValidationException; use Lorisleiva\Actions\ActionRequest; use Lorisleiva\Actions\Concerns\AsAction; @@ -35,5 +36,7 @@ class FileshareStoreAction ...$request->validated(), 'type' => $type, ]); + + Succeeded::message('Verbindung erstellt.')->dispatch(); } } diff --git a/app/Fileshare/Actions/FileshareUpdateAction.php b/app/Fileshare/Actions/FileshareUpdateAction.php index d0f77b13..a4e456d1 100644 --- a/app/Fileshare/Actions/FileshareUpdateAction.php +++ b/app/Fileshare/Actions/FileshareUpdateAction.php @@ -3,6 +3,7 @@ namespace App\Fileshare\Actions; use App\Fileshare\Models\Fileshare; +use App\Lib\Events\Succeeded; use Illuminate\Validation\ValidationException; use Lorisleiva\Actions\ActionRequest; use Lorisleiva\Actions\Concerns\AsAction; @@ -35,5 +36,7 @@ class FileshareUpdateAction ...$request->validated(), 'type' => $type, ]); + + Succeeded::message('Verbindung bearbeitet.')->dispatch(); } } diff --git a/resources/js/views/fileshareconnection/Index.vue b/resources/js/views/fileshare/Index.vue similarity index 63% rename from resources/js/views/fileshareconnection/Index.vue rename to resources/js/views/fileshare/Index.vue index ffef24af..c6740b71 100644 --- a/resources/js/views/fileshareconnection/Index.vue +++ b/resources/js/views/fileshare/Index.vue @@ -7,18 +7,32 @@