fix testsand load performance
This commit is contained in:
parent
0333f9e722
commit
0fd1b7e142
2 changed files with 5 additions and 8 deletions
|
|
@ -68,18 +68,15 @@ defmodule MvWeb.MemberLive.Index do
|
|||
# This is appropriate for initialization errors that should be visible to the user.
|
||||
actor = current_actor(socket)
|
||||
|
||||
custom_fields_visible =
|
||||
Mv.Membership.CustomField
|
||||
|> Ash.Query.filter(expr(show_in_overview == true))
|
||||
|> Ash.Query.sort(name: :asc)
|
||||
|> Ash.read!(actor: actor)
|
||||
|
||||
# Load ALL custom fields for the dropdown (to show all available fields)
|
||||
all_custom_fields =
|
||||
Mv.Membership.CustomField
|
||||
|> Ash.Query.sort(name: :asc)
|
||||
|> Ash.read!(actor: actor)
|
||||
|
||||
custom_fields_visible =
|
||||
all_custom_fields
|
||||
|> Enum.filter(& &1.show_in_overview)
|
||||
|
||||
# Load boolean custom fields (filtered and sorted from all_custom_fields)
|
||||
boolean_custom_fields =
|
||||
all_custom_fields
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue