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