diff --git a/app/Http/Controllers/TaskKanbanController.php b/app/Http/Controllers/TaskKanbanController.php index dac34c9fca..5fa87c69d4 100644 --- a/app/Http/Controllers/TaskKanbanController.php +++ b/app/Http/Controllers/TaskKanbanController.php @@ -4,6 +4,8 @@ namespace App\Http\Controllers; use App\Models\Task; use App\Models\TaskStatus; +use App\Models\Project; +use App\Models\Client; class TaskKanbanController extends BaseController { @@ -12,7 +14,9 @@ class TaskKanbanController extends BaseController */ public function index() { - $tasks = Task::scope()->get(); + $tasks = Task::scope()->with(['project', 'client'])->get(); + $projects = Project::scope()->get(); + $clients = Client::scope()->get(); $stauses = TaskStatus::scope()->get(); // check initial statuses exist @@ -37,6 +41,8 @@ class TaskKanbanController extends BaseController 'title' => trans('texts.kanban'), 'statuses' => $stauses, 'tasks' => $tasks, + 'clients' => $clients, + 'projects' => $projects, ]; return view('tasks.kanban', $data); diff --git a/resources/views/tasks/kanban.blade.php b/resources/views/tasks/kanban.blade.php index 7244f6979f..e8601c41c3 100644 --- a/resources/views/tasks/kanban.blade.php +++ b/resources/views/tasks/kanban.blade.php @@ -47,6 +47,12 @@ margin-bottom: -8px; } + .kanban-column-row .fa-circle { + float:right; + padding-top: 10px; + padding-right: 8px; + } + .kanban-column-row .view div { padding: 8px; } @@ -70,6 +76,17 @@ display: none; }​ + .project-group0 { color: #000000; } + .project-group1 { color: #1c9f77; } + .project-group2 { color: #d95d02; } + .project-group3 { color: #716cb1; } + .project-group4 { color: #e62a8b; } + .project-group5 { color: #5fa213; } + .project-group6 { color: #e6aa04; } + .project-group7 { color: #a87821; } + .project-group8 { color: #676767; } + + @stop @@ -80,6 +97,11 @@ var statuses = {!! $statuses !!}; var tasks = {!! $tasks !!}; + var projects = {!! $projects !!}; + var clients = {!! $clients !!}; + + var projectMap = {}; + var clientMap = {}; ko.bindingHandlers.enterkey = { init: function (element, valueAccessor, allBindings, viewModel) { @@ -113,6 +135,16 @@ } self.statuses.push(new StatusModel()); + for (var i=0; i
+