Participation panel revamp and fixes

Apollo is a pain in the ass with pagination & filters, so this removes
the tabs system and uses a <select> to filter instead

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-06-18 15:23:05 +02:00
parent 8676582080
commit b61d12b5fd
18 changed files with 347 additions and 486 deletions

View File

@@ -752,7 +752,6 @@ defmodule Mobilizon.Events do
end
@moderator_roles [:moderator, :administrator, :creator]
@default_participant_roles [:participant] ++ @moderator_roles
@doc """
Returns the list of participants for an event.
@@ -762,13 +761,14 @@ defmodule Mobilizon.Events do
Page.t()
def list_participants_for_event(
id,
roles \\ @default_participant_roles,
roles \\ [],
page \\ nil,
limit \\ nil
) do
id
|> list_participants_for_event_query()
|> filter_role(roles)
|> order_by(asc: :role)
|> Page.build_page(page, limit)
end