Skip to content
12 changes: 11 additions & 1 deletion ProcessMaker/Http/Controllers/TaskController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
]);
}
}
Expand Down
3 changes: 2 additions & 1 deletion resources/views/tasks/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
</script>
@endsection

Expand Down