[+] adding in beneficiary-events the agenda-widget

This commit is contained in:
2023-09-06 13:28:02 +02:00
parent 0e00a839a3
commit 0f50b5e678
14 changed files with 131 additions and 63 deletions

View File

@@ -5,6 +5,7 @@ import (
"html/template"
"net/http"
agendastorage "git.coopgo.io/coopgo-platform/agenda/storage"
mobilityaccountsstorage "git.coopgo.io/coopgo-platform/mobility-accounts/storage"
)
@@ -52,7 +53,7 @@ type BeneficiariesDisplayState struct {
Beneficiary any
}
func (renderer *Renderer) BeneficiaryDisplay(w http.ResponseWriter, r *http.Request, beneficiary any, bookings []any, organizations []any, beneficiaries_file_types []string, file_types_map map[string]string, documents any) {
func (renderer *Renderer) BeneficiaryDisplay(w http.ResponseWriter, r *http.Request, beneficiary any, bookings []any, organizations []any, beneficiaries_file_types []string, file_types_map map[string]string, documents any, event []agendastorage.Event) {
files := renderer.ThemeConfig.GetStringSlice("views.beneficiaries.display.files")
state := NewState(r, renderer.ThemeConfig, beneficiariesMenu)
state.ViewState = map[string]any{
@@ -62,6 +63,7 @@ func (renderer *Renderer) BeneficiaryDisplay(w http.ResponseWriter, r *http.Requ
"file_types_map": file_types_map,
"documents": documents,
"organizations": organizations,
"event": event,
}
renderer.Render("beneficiaries_display", w, r, files, state)