Open should mean everything except closed and not now

This commit is contained in:
Jason Zimdars
2025-10-29 16:07:29 -05:00
parent 18f0782b37
commit 2ab737b032
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -22,6 +22,7 @@ class Filter < ApplicationRecord
result = result.indexed_by(indexed_by)
result = result.sorted_by(sorted_by)
result = result.where(id: card_ids) if card_ids.present?
result = result.where.missing(:not_now) unless include_not_now_cards?
result = result.open unless include_closed_cards?
result = result.unassigned if assignment_status.unassigned?
result = result.assigned_to(assignees.ids) if assignees.present?
@@ -67,4 +68,8 @@ class Filter < ApplicationRecord
def include_closed_cards?
only_closed? || card_ids.present? || creator_ids.present?
end
def include_not_now_cards?
indexed_by.not_now? || card_ids.present?
end
end
@@ -23,7 +23,7 @@
<% Filter::INDEXES.each do |index| %>
<%= tag.li class: "popup__item", data: { navigable_list_target: "item", combobox_target: "item", combobox_value: index, combobox_label: index.humanize }, role: "checkbox", aria: { checked: filter.indexed_by == index } do %>
<button type="button" class="btn popup__btn" data-action="dialog#close combobox#change filter-settings#change form#submit">
<span class="overflow-ellipsis flex-item-grow"><%= index == "all" ? "All" : index.humanize %></span>
<span class="overflow-ellipsis flex-item-grow"><%= index == "all" ? "Open" : index.humanize %></span>
<%= icon_tag "check", class: "checked flex-item-justify-end" %>
</button>
<% end %>