Skip to content

Commit

Permalink
Add filter for discarded products
Browse files Browse the repository at this point in the history
Changes include:
- Addition of new filter in `filters` method in the products index component,
  now includes an additional filter for 'with_discarded' products.

Please note that this is a special case of filters in the context of
transitioning from the old to the new products index page.
This change ensures that the feature set between the old and new product index
page remains consistent.

Co-Authored-By: Elia Schito <[email protected]>
  • Loading branch information
rainerdema and elia committed Aug 3, 2023
1 parent d05ce2c commit c3e90b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ def batch_actions
end

def filters
[]
[
{
name: 'q[with_discarded]',
value: true,
label: t('.filters.with_deleted'),
},
]
end

def columns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ en:
delete: 'Delete'
discontinue: 'Discontinue'
activate: 'Activate'
filters:
with_deleted: Include deleted

0 comments on commit c3e90b8

Please sign in to comment.