diff --git a/ProcessMaker/Http/Controllers/TaskController.php b/ProcessMaker/Http/Controllers/TaskController.php index b1f0783def..a0c8095bee 100644 --- a/ProcessMaker/Http/Controllers/TaskController.php +++ b/ProcessMaker/Http/Controllers/TaskController.php @@ -110,7 +110,16 @@ public function edit(ProcessRequestToken $task, string $preview = '') } UserResourceView::setViewed(Auth::user(), $task); - + $currentUser = Auth::user()->only([ + 'id', + 'username', + 'fullname', + 'firstname', + 'lastname', + 'avatar', + 'timezone', + 'datetime_format' + ]); return view('tasks.edit', [ 'task' => $task, 'dueLabels' => self::$dueLabels, @@ -120,6 +129,7 @@ public function edit(ProcessRequestToken $task, string $preview = '') 'addons' => $this->getPluginAddons('edit', []), 'assignedToAddons' => $this->getPluginAddons('edit.assignedTo', []), 'dataActionsAddons' => $this->getPluginAddons('edit.dataActions', []), + 'currentUser' => $currentUser, ]); } } diff --git a/resources/views/tasks/edit.blade.php b/resources/views/tasks/edit.blade.php index ffb32af096..807fae6c0f 100644 --- a/resources/views/tasks/edit.blade.php +++ b/resources/views/tasks/edit.blade.php @@ -465,7 +465,8 @@ class="d-inline-flex pull-left align-items-center" window.ProcessMaker.isSelfService = this.isSelfService; } }); - window.ProcessMaker.breadcrumbs.taskTitle = @json($task->element_name) + window.ProcessMaker.breadcrumbs.taskTitle = @json($task->element_name); + window.Processmaker.user = @json($currentUser); @endsection