add event data

This commit is contained in:
soukainna 2023-02-22 11:03:33 +01:00
parent fa065f2a43
commit d1818b6251
1 changed files with 3 additions and 1 deletions

View File

@ -3,12 +3,13 @@ package renderer
import (
"net/http"
agendastorage "git.coopgo.io/coopgo-platform/agenda/storage"
mobilityaccountsstorage "git.coopgo.io/coopgo-platform/mobility-accounts/storage"
)
const administrationMenu = "administration"
func (renderer *Renderer) Administration(w http.ResponseWriter, r *http.Request, accounts any, beneficiaries any, groups any, bookings any) {
func (renderer *Renderer) Administration(w http.ResponseWriter, r *http.Request, accounts any, beneficiaries any, groups any, bookings any, events []agendastorage.Event) {
files := renderer.ThemeConfig.GetStringSlice("views.administration.home.files")
state := NewState(r, renderer.ThemeConfig, administrationMenu)
state.ViewState = map[string]any{
@ -16,6 +17,7 @@ func (renderer *Renderer) Administration(w http.ResponseWriter, r *http.Request,
"beneficiaries": beneficiaries,
"bookings": bookings,
"groups": groups,
"events": events,
}
renderer.Render("administration", w, r, files, state)