Admin - Maps Management
<.link navigate={~p"/admin"} class="btn btn-ghost btn-sm"> <.icon name="hero-arrow-left-solid" class="w-4 h-4" /> Back to Admin
<.async_result :let={maps} assign={@maps}>
<:loading>
<:failed :let={reason}>
{inspect(reason)}
<% filtered_maps = filter_maps(maps, @search_term, @show_deleted) %>
<% paginated_maps = paginate(filtered_maps, @page, @per_page) %>
<.table id="admin-maps" rows={paginated_maps} class="!max-h-[60vh] !overflow-y-auto">
<:col :let={map} label="Name">
{map.name}
Deleted
<:col :let={map} label="Slug">
{map.slug}
<:col :let={map} label="Owner">
{owner_name(map.owner)}
<:col :let={map} label="Created">
{format_date(map.inserted_at)}
<:col :let={map} label="Scope">
{map.scope}
<:action :let={map}>
<.link
patch={~p"/admin/maps/#{map.id}/edit"}
class="btn btn-ghost btn-xs hover:text-white"
title="Edit"
>
<.icon name="hero-pencil-solid" class="w-4 h-4" />
<:action :let={map}>
<.link
patch={~p"/admin/maps/#{map.id}/acls"}
class="btn btn-ghost btn-xs hover:text-white"
title="View ACLs"
>
<.icon name="hero-shield-check-solid" class="w-4 h-4" />
<:action :let={map}>
@per_page}
class="flex items-center justify-between mt-4"
>
Page {@page} of {total_pages(filtered_maps, @per_page)} ({length(filtered_maps)} maps)
No maps found