package renderer import ( "net/http" agendastorage "git.coopgo.io/coopgo-platform/agenda/storage" fleetstorage "git.coopgo.io/coopgo-platform/fleets/storage" ) const dashboardMenu = "dashboard" func (renderer *Renderer) Dashboard(w http.ResponseWriter, r *http.Request, accounts []any, nbaccounts int, count_members int, events []agendastorage.Event, fleets []fleetstorage.Booking) { files := renderer.ThemeConfig.GetStringSlice("views.dashboard.files") state := NewState(r, renderer.ThemeConfig, dashboardMenu) state.ViewState = map[string]any{ "beneficiaries": map[string]any{ "count": nbaccounts, "latest": accounts, }, "count_members": count_members, "events": events, "fleets": fleets, } renderer.Render("dashboard", w, r, files, state) }