From e197ac65dfd41efc9c1383d70155db67ea27e717 Mon Sep 17 00:00:00 2001 From: Alexander Gabriel Date: Mon, 8 Jun 2026 18:03:07 +0000 Subject: [PATCH] =?UTF-8?q?aufl=C3=B6sung=20der=20zugewiesenen=20Benutzer?= =?UTF-8?q?=20korrigiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Todo.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/Todo.php b/app/Models/Todo.php index 5aad3ef..2895e3d 100644 --- a/app/Models/Todo.php +++ b/app/Models/Todo.php @@ -25,13 +25,13 @@ class Todo extends Model public function is_owner_or_assigned() { if(filament()->auth()->user()->id == $this->user_id) return true; - if($this->todoable_type == Group::class && in_array(filament()->auth()->user()->id, $this->todoable()->first()->get()->users()->get()->pluck('id')->toArray())) return true; - if($this->todoable_type == User::class && $this->todoable()->first()->get()->id == filament()->auth()->user()->id) return true; + if($this->todoable_type == Group::class && in_array(filament()->auth()->user()->id, $this->todoable()->first()->users()->get()->pluck('id')->toArray())) return true; + if($this->todoable_type == User::class && $this->todoable()->first()->id == filament()->auth()->user()->id) return true; else return false; } public function getassignetusers() { if($this->todoable_type == Group::class) return $this->todoable()->first()->users()->get(); - if($this->todoable_type == User::class) return [$this->todoable()->first()->get()]; + if($this->todoable_type == User::class) return [$this->todoable()->first()]; } }