|
|
@@ -39,7 +39,7 @@ type DiagsForm struct {
|
|
|
|
|
|
|
|
|
|
|
|
func (h *ApplicationHandler) DiagsHome(w http.ResponseWriter, r *http.Request) {
|
|
|
|
func (h *ApplicationHandler) DiagsHome(w http.ResponseWriter, r *http.Request) {
|
|
|
|
resp, err := h.services.GRPC.Diags.GetDiags(context.TODO(), &diags.GetDiagsRequest{
|
|
|
|
resp, err := h.services.GRPC.Diags.GetDiags(context.TODO(), &diags.GetDiagsRequest{
|
|
|
|
Namespaces: []string{"parcoursmob_beneficiaries", "parcoursmob_diagnostiques", "parcoursmob_vehicles"},
|
|
|
|
Namespaces: []string{"parcoursmob_beneficiaries", "parcoursmob_diagnostiques", "parcoursmob_vehicles", "parcoursmob_bookings"},
|
|
|
|
// Mindate: timestamppb.New(time.Now().Add(-24 * time.Hour)),
|
|
|
|
// Mindate: timestamppb.New(time.Now().Add(-24 * time.Hour)),
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
@@ -60,7 +60,7 @@ func (h *ApplicationHandler) DiagsHome(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
|
|
|
|
|
|
|
func (h *ApplicationHandler) DiagsHistory(w http.ResponseWriter, r *http.Request) {
|
|
|
|
func (h *ApplicationHandler) DiagsHistory(w http.ResponseWriter, r *http.Request) {
|
|
|
|
resp, err := h.services.GRPC.Diags.GetDiags(context.TODO(), &diags.GetDiagsRequest{
|
|
|
|
resp, err := h.services.GRPC.Diags.GetDiags(context.TODO(), &diags.GetDiagsRequest{
|
|
|
|
Namespaces: []string{"parcoursmob_diagnostiques"},
|
|
|
|
Namespaces: []string{"parcoursmob_beneficiaries", "parcoursmob_diagnostiques", "parcoursmob_vehicles", "parcoursmob_bookings"},
|
|
|
|
//Maxdate: timestamppb.New(time.Now().Add(24 * time.Hour)),
|
|
|
|
//Maxdate: timestamppb.New(time.Now().Add(24 * time.Hour)),
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
@@ -73,8 +73,10 @@ func (h *ApplicationHandler) DiagsHistory(w http.ResponseWriter, r *http.Request
|
|
|
|
responses := []diagsstorage.Diag{}
|
|
|
|
responses := []diagsstorage.Diag{}
|
|
|
|
|
|
|
|
|
|
|
|
for _, e := range resp.Diags {
|
|
|
|
for _, e := range resp.Diags {
|
|
|
|
|
|
|
|
if e.Deleted {
|
|
|
|
responses = append(responses, e.ToStorageType())
|
|
|
|
responses = append(responses, e.ToStorageType())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
h.Renderer.DiagsHistory(w, r, responses)
|
|
|
|
h.Renderer.DiagsHistory(w, r, responses)
|
|
|
|
}
|
|
|
|
}
|
|
|
|