]> gitweb.hamatoma.de Git - gadeku.git/commitdiff
Korrektur Erzeugen Task
authorHamatoma <author@hamatoma.de>
Wed, 19 Jun 2024 17:56:53 +0000 (19:56 +0200)
committerHamatoma <author@hamatoma.de>
Wed, 19 Jun 2024 17:56:53 +0000 (19:56 +0200)
app/Http/Controllers/TaskController.php
resources/views/task/create.blade.php

index 330143a4818b2c1097b3aa3ee703b54ef47e7f02..0390510e19f329352e0519d9689073e49caa2291 100644 (file)
@@ -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;
index 30dc511f068c83d95cfc543435be7863fe71cc72..4448e96ae73c21e7e0cdc76d92fe2e455e3e8c6c 100644 (file)
@@ -5,6 +5,7 @@
         @csrf
         <x-laraknife.panels.create title="{{ __('Creation of a Task') }}">
             <input type="hidden" name="options" value="{{ $context->valueOf('options') }}">
+            <input type="hidden" name="page_id" value="{{ $context->valueOf('page_id') }}">
             <x-laraknife.forms.combobox position="first" name="category_scope" label="Category" :options="$optionsCategory"
                 width2="4" />
             <x-laraknife.forms.combobox position="last" name="visibility_scope" label="Visibility" :options="$optionsVisibility"