Add filter prefix constants and shared FilterParams module
- Mv.Constants: group_filter_prefix/0, fee_type_filter_prefix/0 - MvWeb.MemberLive.Index.FilterParams: parse_in_not_in_value/1 for URL param parsing
This commit is contained in:
parent
3af52f2829
commit
ae07e3efc2
2 changed files with 36 additions and 0 deletions
|
|
@ -22,6 +22,10 @@ defmodule Mv.Constants do
|
|||
|
||||
@boolean_filter_prefix "bf_"
|
||||
|
||||
@group_filter_prefix "group_"
|
||||
|
||||
@fee_type_filter_prefix "fee_type_"
|
||||
|
||||
@max_boolean_filters 50
|
||||
|
||||
@max_uuid_length 36
|
||||
|
|
@ -70,6 +74,16 @@ defmodule Mv.Constants do
|
|||
"""
|
||||
def boolean_filter_prefix, do: @boolean_filter_prefix
|
||||
|
||||
@doc """
|
||||
Returns the prefix for group filter URL parameters (e.g. group_<uuid>=in|not_in).
|
||||
"""
|
||||
def group_filter_prefix, do: @group_filter_prefix
|
||||
|
||||
@doc """
|
||||
Returns the prefix for fee type filter URL parameters (e.g. fee_type_<uuid>=in|not_in).
|
||||
"""
|
||||
def fee_type_filter_prefix, do: @fee_type_filter_prefix
|
||||
|
||||
@doc """
|
||||
Returns the maximum number of boolean custom field filters allowed per request.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue