feat(member): condense the overview into composite name and address cells

This commit is contained in:
Simon 2026-07-03 11:35:46 +02:00
parent b79d7ac9ea
commit af2cc2e0d4
17 changed files with 716 additions and 93 deletions

View file

@ -49,6 +49,17 @@ defmodule MvWeb.Components.SearchBarComponent do
phx-target={@myself}
phx-debounce="300"
/>
<button
:if={@query not in [nil, ""]}
type="button"
phx-click="clear_search"
phx-target={@myself}
data-testid="search-clear"
aria-label={gettext("Clear search")}
class="opacity-50 hover:opacity-100 cursor-pointer"
>
<.icon name="hero-x-mark" class="h-[1em]" />
</button>
</label>
</form>
"""
@ -61,4 +72,10 @@ defmodule MvWeb.Components.SearchBarComponent do
send(self(), {:search_changed, q})
{:noreply, assign(socket, :query, q)}
end
# Clears the query and resets the result set to the unfiltered list (§1.3).
def handle_event("clear_search", _params, socket) do
send(self(), {:search_changed, ""})
{:noreply, assign(socket, :query, "")}
end
end