diff --git a/app/assets/javascripts/dashboard/current_tasks.js b/app/assets/javascripts/dashboard/current_tasks.js index 46f94c77e..1daed59b5 100644 --- a/app/assets/javascripts/dashboard/current_tasks.js +++ b/app/assets/javascripts/dashboard/current_tasks.js @@ -26,8 +26,10 @@ var DasboardCurrentTasksWidget = (function() { stateText = I18n.t('dashboard.current_tasks.progress_bar.in_progress'); if (task.overdue) { stateText = I18n.t('dashboard.current_tasks.progress_bar.overdue'); } if (task.steps_state.all_steps !== 0) { - stateText += I18n.t('dashboard.current_tasks.progress_bar.completed_steps', - { steps: task.steps_state.completed_steps, total_steps: task.steps_state.all_steps }); + stateText += I18n.t( + 'dashboard.current_tasks.progress_bar.completed_steps', + { steps: task.steps_state.completed_steps, total_steps: task.steps_state.all_steps } + ); } } currentTaskItem = ` @@ -74,13 +76,13 @@ var DasboardCurrentTasksWidget = (function() { mode: $('.current-tasks-navbar .active').data('mode') }; animateSpinner($currentTasksList, true); - $.get($currentTasksList.data('tasksListUrl'), params, function(data) { + $.get($currentTasksList.data('tasksListUrl'), params, function(result) { $currentTasksList.find('.current-task-item, .no-tasks').remove(); // Toggle empty state - if (data.data.length === 0) { + if (result.data.length === 0) { $currentTasksList.append(emptyState); } - generateTasksListHtml(data, $currentTasksList); + generateTasksListHtml(result, $currentTasksList); PerfectSb().update_all(); if (newList) InfiniteScroll.resetScroll('.current-tasks-list'); animateSpinner($currentTasksList, false); diff --git a/app/assets/stylesheets/dashboard/current_tasks.scss b/app/assets/stylesheets/dashboard/current_tasks.scss index f6f811cfe..2c2486397 100644 --- a/app/assets/stylesheets/dashboard/current_tasks.scss +++ b/app/assets/stylesheets/dashboard/current_tasks.scss @@ -287,6 +287,10 @@ .dashboard-container .current-tasks-widget { grid-column: 1 / span 12; grid-row: 1 / span 4; + + .no-tasks .fas { + margin-left: 500px; + } } } diff --git a/app/views/dashboards/_current_tasks.html.erb b/app/views/dashboards/_current_tasks.html.erb index 8aa4ececa..f3a6165b2 100644 --- a/app/views/dashboards/_current_tasks.html.erb +++ b/app/views/dashboards/_current_tasks.html.erb @@ -59,7 +59,7 @@
-