spazio-solazzo/lib/spazio_solazzo_web/live/admin/dashboard_live.ex
Víctor Martínez bbc2f08215
feat: build an admin dashboard (#11)
* refactor: update button colors

* feat: add dashboard panel for admins only & update header styles
2026-02-01 19:30:58 +01:00

21 lines
623 B
Elixir

defmodule SpazioSolazzoWeb.Admin.DashboardLive do
@moduledoc """
Admin dashboard home page. Lists the available tools that admins have
"""
use SpazioSolazzoWeb, :live_view
alias SpazioSolazzo.BookingSystem
import SpazioSolazzoWeb.AdminComponents
def mount(_params, _session, socket) do
{:ok, coworking_space} = BookingSystem.get_space_by_slug("coworking", not_found_error?: false)
{:ok, meeting_space} = BookingSystem.get_space_by_slug("meeting", not_found_error?: false)
{:ok,
assign(socket,
coworking_space: coworking_space,
meeting_space: meeting_space
)}
end
end