change function's name in solidarity_mobility folders

This commit is contained in:
Maxime 2024-04-25 15:16:06 +02:00
parent b0129aae79
commit 982d07e8ad
3 changed files with 4 additions and 12 deletions

View File

@ -6,11 +6,11 @@ import (
storage "git.coopgo.io/sbouaram/solidarity-service/storage"
)
func (h *ApplicationHandler) SilvermobiBookingList(w http.ResponseWriter, r *http.Request) {
func (h *ApplicationHandler) SolidarityMobilityDiverList(w http.ResponseWriter, r *http.Request) {
storage.GetDriver()
h.Renderer.SilvermobiBookingList(w, r)
h.Renderer.SolidarityMobilityDiverList(w, r)
}

View File

@ -139,7 +139,7 @@ func main() {
//=================================silvermobi====================================
application.HandleFunc("/silvermobi/create", applicationHandler.SilvermobiBookingCreate)
application.HandleFunc("/solidarity_mobility/", applicationHandler.SilvermobiBookingList)
application.HandleFunc("/solidarity_mobility/", applicationHandler.SolidarityMobilityDiverList)
application.HandleFunc("/silvermobi/update/{memberid}/{bookingid}", applicationHandler.SilvermobiBookingUpdate)
application.HandleFunc("/silvermobi/delete/{memberid}/{bookingid}", applicationHandler.SilvermobiBookingDelete)

View File

@ -7,17 +7,9 @@ import (
const solidaritymobilityMenu = "solidarity_mobility"
func (renderer *Renderer) SilvermobiBookingList( w http.ResponseWriter, r *http.Request) {
func (renderer *Renderer) SolidarityMobilityDiverList( w http.ResponseWriter, r *http.Request) {
files:= renderer.ThemeConfig.GetStringSlice("views.solidarity_mobility.list.files")
state := NewState(r, renderer.ThemeConfig, solidaritymobilityMenu)
state.ViewState = map[string]any{
"beneficiaries": map[string]any{
"count": "nbaccounts",
"latest": "accounts",
},
"count_members": "count_members",
"events": "events",
}
renderer.Render("solidarity_mobility", w, r, files, state)