From 413187e6da21bcf6f42dd636f1d6b47d9aaa711f Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Fri, 12 Mar 2021 13:33:37 +0100 Subject: [PATCH] Fix filtering on current tasks widget [SCI-5555] --- app/assets/javascripts/dashboard/current_tasks.js | 2 +- app/controllers/dashboard/current_tasks_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/dashboard/current_tasks.js b/app/assets/javascripts/dashboard/current_tasks.js index 50b550fe3..d95c230c8 100644 --- a/app/assets/javascripts/dashboard/current_tasks.js +++ b/app/assets/javascripts/dashboard/current_tasks.js @@ -134,7 +134,7 @@ var DasboardCurrentTasksWidget = (function() { $currentTasksList.find('.widget-placeholder').addClass($('.current-tasks-navbar .active').data('mode')); } } - appendTasksList(result, $currentTasksList); + appendTasksList(result, '.current-tasks-list-wrapper'); PerfectSb().update_all(); if (newList) InfiniteScroll.resetScroll('.current-tasks-list-wrapper'); animateSpinner($currentTasksList, false); diff --git a/app/controllers/dashboard/current_tasks_controller.rb b/app/controllers/dashboard/current_tasks_controller.rb index 840a1eb8a..846abc7e1 100644 --- a/app/controllers/dashboard/current_tasks_controller.rb +++ b/app/controllers/dashboard/current_tasks_controller.rb @@ -26,7 +26,7 @@ module Dashboard tasks = tasks.left_outer_joins(:user_my_modules).where(user_my_modules: { user_id: current_user.id }) end - tasks = tasks.where(my_module_status_id: task_filters[:statuses]) + tasks = tasks.where(my_module_status_id: task_filters[:statuses]) if task_filters[:statuses].present? case task_filters[:sort] when 'start_date'