From 367ea4ce0bbcf42e3e213b08545ba48c715fcfd3 Mon Sep 17 00:00:00 2001 From: Renzo Date: Sat, 30 Jul 2016 00:30:32 -0500 Subject: [PATCH] List only active tasks --- app/controllers/JobTaskController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/JobTaskController.php b/app/controllers/JobTaskController.php index 9369622..cd4d282 100755 --- a/app/controllers/JobTaskController.php +++ b/app/controllers/JobTaskController.php @@ -3,7 +3,8 @@ class JobTaskController extends ApplicationController { public function index() { - $this->job_tasks = JobTask::order("id DESC")->paginate($this->page_number(), 25); + $activeTypes = "'" . implode("', '", CONFIG()->active_job_tasks) . "'"; + $this->job_tasks = JobTask::order("id DESC")->where("task_type IN ($activeTypes)")->paginate($this->page_number(), 25); } public function show() @@ -34,7 +35,7 @@ class JobTaskController extends ApplicationController $this->redirectTo(['action' => "show", 'id' => $this->job_task->id]); } } - + protected function filters() { return [