This commit is contained in:
parent
a4f0dfe82d
commit
f1fdfd7100
@ -118,30 +118,35 @@ func declareTrafficRoutes(router *gin.RouterGroup) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
icr := effectGradation(disruption.Severity.Effect)
|
if disruption.Cause == "travaux" {
|
||||||
if icr > slug {
|
pgt.Slug = "normal_trav"
|
||||||
slug = icr
|
} else {
|
||||||
switch disruption.Severity.Effect {
|
icr := effectGradation(disruption.Severity.Effect)
|
||||||
case navitia.JourneyStatusUnknownEffect:
|
if icr > slug {
|
||||||
pgt.Slug = "critique"
|
slug = icr
|
||||||
case navitia.EffectNoService:
|
switch disruption.Severity.Effect {
|
||||||
pgt.Slug = "critique"
|
case navitia.JourneyStatusUnknownEffect:
|
||||||
case navitia.JourneyStatusReducedService:
|
pgt.Slug = "critique"
|
||||||
pgt.Slug = "alerte"
|
case navitia.EffectNoService:
|
||||||
case navitia.JourneyStatusSignificantDelay:
|
pgt.Slug = "critique"
|
||||||
pgt.Slug = "alerte"
|
case navitia.JourneyStatusReducedService:
|
||||||
case navitia.JourneyStatusDetour:
|
pgt.Slug = "alerte"
|
||||||
pgt.Slug = "normal_trav"
|
case navitia.JourneyStatusSignificantDelay:
|
||||||
case navitia.JourneyStatusAdditionalService:
|
pgt.Slug = "alerte"
|
||||||
pgt.Slug = "normal_trav"
|
case navitia.JourneyStatusDetour:
|
||||||
case navitia.JourneyStatusOtherEffect:
|
pgt.Slug = "alerte"
|
||||||
pgt.Slug = "normal_trav"
|
case navitia.JourneyStatusAdditionalService:
|
||||||
case navitia.JourneyStatusStopMoved:
|
pgt.Slug = "alerte"
|
||||||
pgt.Slug = "normal_trav"
|
case navitia.JourneyStatusOtherEffect:
|
||||||
default:
|
pgt.Slug = "alerte"
|
||||||
pgt.Slug = "normal"
|
case navitia.JourneyStatusStopMoved:
|
||||||
|
pgt.Slug = "alerte"
|
||||||
|
default:
|
||||||
|
pgt.Slug = "normal"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if pgt.Title == "" {
|
if pgt.Title == "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user