getAllDrivers
This commit is contained in:
@@ -5,8 +5,8 @@ import (
|
||||
"html/template"
|
||||
"net/http"
|
||||
|
||||
solidarity_service "git.coopgo.io/sbouaram/solidarity-service/servers/grpc/proto"
|
||||
mobilityaccountsstorage "git.coopgo.io/coopgo-platform/mobility-accounts/storage"
|
||||
solidarity_service "git.coopgo.io/sbouaram/solidarity-service/servers/grpc/proto"
|
||||
)
|
||||
|
||||
const solidarityserviceMenu = "solidarity_service"
|
||||
@@ -22,10 +22,11 @@ type SolidarityListState struct {
|
||||
}
|
||||
|
||||
type BeneficiariesSolidarityListState struct {
|
||||
Count int `json:"count"`
|
||||
CacheId string `json:"cache_id"`
|
||||
BeneficiariesSolidarity *solidarity_service.GetAllPassengersResponse `json:"beneficiariessolidarity"`
|
||||
Beneficiaries []mobilityaccountsstorage.Account `json:"beneficiaries"`
|
||||
Count int `json:"count"`
|
||||
CacheId string `json:"cache_id"`
|
||||
BeneficiariesSolidarity *solidarity_service.GetAllPassengersResponse `json:"beneficiariessolidarity"`
|
||||
Beneficiaries []mobilityaccountsstorage.Account `json:"beneficiaries"`
|
||||
Drivers *solidarity_service.GetAllDriversResponse `json:"drivers"`
|
||||
|
||||
}
|
||||
|
||||
@@ -34,7 +35,6 @@ type SolidarityBookingsState struct {
|
||||
Beneficiaries []mobilityaccountsstorage.Account `json:"beneficiaries"`
|
||||
BeneficiariesSolidarity *solidarity_service.GetAllPassengersResponse `json:"beneficiariessolidarity"`
|
||||
|
||||
|
||||
}
|
||||
|
||||
func (s BeneficiariesSolidarityListState) JSON() template.JS {
|
||||
@@ -80,7 +80,7 @@ func (renderer *Renderer) SolidarityService(w http.ResponseWriter, r *http.Reque
|
||||
renderer.Render("solidarity_service", w, r, files, state)
|
||||
}
|
||||
|
||||
func (renderer *Renderer) BeneficiariesSolidarity(w http.ResponseWriter, r *http.Request, accounts *solidarity_service.GetAllPassengersResponse, parcourmobAccounts []mobilityaccountsstorage.Account, cacheid string) {
|
||||
func (renderer *Renderer) BeneficiariesSolidarity(w http.ResponseWriter, r *http.Request, accounts *solidarity_service.GetAllPassengersResponse, drivers *solidarity_service.GetAllDriversResponse, parcourmobAccounts []mobilityaccountsstorage.Account, cacheid string) {
|
||||
files := renderer.ThemeConfig.GetStringSlice("views.solidarity_service.list.files")
|
||||
state := NewState(r, renderer.ThemeConfig, solidarityserviceMenu)
|
||||
state.ViewState = BeneficiariesSolidarityListState{
|
||||
@@ -88,6 +88,7 @@ func (renderer *Renderer) BeneficiariesSolidarity(w http.ResponseWriter, r *http
|
||||
CacheId: cacheid,
|
||||
Beneficiaries: parcourmobAccounts,
|
||||
BeneficiariesSolidarity: accounts,
|
||||
Drivers: drivers,
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user