Commit 8f85bd57 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'todos-filter-empty-state' into 'master'

Fixed todos empty state when filtering

Closes #24127

See merge request !7334
parents 034e8593 dd93079a
...@@ -61,6 +61,10 @@ module TodosHelper ...@@ -61,6 +61,10 @@ module TodosHelper
} }
end end
def todos_filter_empty?
todos_filter_params.values.none?
end
def todos_filter_path(options = {}) def todos_filter_path(options = {})
without = options.delete(:without) without = options.delete(:without)
......
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
- elsif current_user.todos.any? - elsif current_user.todos.any?
.todos-all-done .todos-all-done
= render "shared/empty_states/todos_all_done.svg" = render "shared/empty_states/todos_all_done.svg"
- if todos_filter_empty?
%h4.text-center %h4.text-center
Good job! Looks like you don't have any todos left. Good job! Looks like you don't have any todos left.
%p.text-center %p.text-center
...@@ -91,6 +92,9 @@ ...@@ -91,6 +92,9 @@
contribute to contribute to
= link_to "merge requests", merge_requests_dashboard_path = link_to "merge requests", merge_requests_dashboard_path
or mention someone in a comment to assign a new todo automatically. or mention someone in a comment to assign a new todo automatically.
- else
%h4.text-center
There are no todos to show.
- else - else
.todos-empty .todos-empty
.todos-empty-hero .todos-empty-hero
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment