2024-05-02 07:54:51 +00:00
|
|
|
package renderer
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
2024-08-28 12:10:03 +00:00
|
|
|
solidarity_service "git.coopgo.io/sbouaram/solidarity-service/servers/grpc/proto"
|
2024-05-02 07:54:51 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const solidarityserviceMenu = "solidarity_service"
|
|
|
|
|
2024-08-28 12:10:03 +00:00
|
|
|
func (renderer *Renderer) SolidarityServiceBookingList(w http.ResponseWriter, r *http.Request, drivers *solidarity_service.DriverJourneysResponse) {
|
|
|
|
files := renderer.ThemeConfig.GetStringSlice("views.solidarity_service.list.files")
|
2024-05-02 07:54:51 +00:00
|
|
|
state := NewState(r, renderer.ThemeConfig, solidarityserviceMenu)
|
2024-08-28 12:10:03 +00:00
|
|
|
state.ViewState = map[string]any{
|
|
|
|
"drivers": drivers,
|
|
|
|
}
|
2024-05-02 07:54:51 +00:00
|
|
|
|
|
|
|
renderer.Render("solidarity_service", w, r, files, state)
|
|
|
|
}
|
2024-06-07 09:51:01 +00:00
|
|
|
|
2024-08-28 12:10:03 +00:00
|
|
|
func (renderer *Renderer) SolidarityServiceBookingCreate(w http.ResponseWriter, r *http.Request) {
|
|
|
|
files := renderer.ThemeConfig.GetStringSlice("views.solidarity_service.list.files")
|
2024-06-07 09:51:01 +00:00
|
|
|
state := NewState(r, renderer.ThemeConfig, solidarityserviceMenu)
|
|
|
|
|
|
|
|
renderer.Render("solidarity_service", w, r, files, state)
|
|
|
|
}
|