From 25f9c8d43421868614cbeb188c1d5c74bda0ac8a Mon Sep 17 00:00:00 2001 From: Hamatoma Date: Wed, 19 Jun 2024 19:56:53 +0200 Subject: [PATCH] Korrektur Erzeugen Task --- app/Http/Controllers/TaskController.php | 5 +++-- resources/views/task/create.blade.php | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/TaskController.php b/app/Http/Controllers/TaskController.php index 330143a..0390510 100644 --- a/app/Http/Controllers/TaskController.php +++ b/app/Http/Controllers/TaskController.php @@ -61,6 +61,7 @@ class TaskController extends Controller $fields = [ 'title' => '', 'body' => '', + 'page_id' => $pageId, 'category_scope' => '1054', 'visibility_scope' => '1091', 'owner_id' => strval(auth()->id()), @@ -90,7 +91,7 @@ class TaskController extends Controller $rc = back()->withErrors($validator)->withInput(); } else { $fields['module_id'] = Module::idOfModule('Page'); - $fields['reference_id'] = $page->id; + $fields['reference_id'] = $pageId; $fields['notestatus_scope'] = 1011; $fields['options'] .= "\n_task=" . $fields['task']; $fields['owner_id'] = auth()->id(); @@ -124,7 +125,7 @@ class TaskController extends Controller $mode = 'check'; if (count($fields) <= 1) { $mode = 'fill'; - $fields = StringHelper::explodeAssoc($note->options); + $fields = StringHelper::explodeAssoc($note->options ?? ''); $fields['message'] = ''; if ($page != null && $note != null) { $fields['pageId'] = $page->id; diff --git a/resources/views/task/create.blade.php b/resources/views/task/create.blade.php index 30dc511..4448e96 100644 --- a/resources/views/task/create.blade.php +++ b/resources/views/task/create.blade.php @@ -5,6 +5,7 @@ @csrf +