aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Costasdev.Busurbano.Backend/Services/Providers/VitrasaTransitProvider.cs5
-rw-r--r--src/frontend/app/components/Stops/ConsolidatedCirculationCard.css1
-rw-r--r--src/frontend/app/components/Stops/ConsolidatedCirculationCard.tsx42
-rw-r--r--src/gtfs_perstop_report/src/street_name.py12
4 files changed, 36 insertions, 24 deletions
diff --git a/src/Costasdev.Busurbano.Backend/Services/Providers/VitrasaTransitProvider.cs b/src/Costasdev.Busurbano.Backend/Services/Providers/VitrasaTransitProvider.cs
index 7993b01..60703a0 100644
--- a/src/Costasdev.Busurbano.Backend/Services/Providers/VitrasaTransitProvider.cs
+++ b/src/Costasdev.Busurbano.Backend/Services/Providers/VitrasaTransitProvider.cs
@@ -104,7 +104,10 @@ public class VitrasaTransitProvider : ITransitProvider
var scheduleRoute = NormalizeRouteName(c.Route);
var scheduleTerminus = NormalizeRouteName(c.TerminusName);
- return scheduleRoute == estimateRoute || scheduleTerminus == estimateRoute;
+ // TODO: Replace ñapa with fuzzy matching or better logic
+ Console.WriteLine($"Matching estimate route '{estimate.Route}' (normalized '{estimateRoute}') with schedule route '{c.Route}' (normalized '{scheduleRoute}') and terminus '{c.TerminusName}' (normalized '{scheduleTerminus}')");
+ return scheduleRoute == estimateRoute || scheduleTerminus == estimateRoute ||
+ scheduleRoute.Contains(estimateRoute) || estimateRoute.Contains(scheduleRoute);
})
.OrderBy(c => c.CallingDateTime(nowLocal.Date)!.Value)
.ToArray();
diff --git a/src/frontend/app/components/Stops/ConsolidatedCirculationCard.css b/src/frontend/app/components/Stops/ConsolidatedCirculationCard.css
index 935c06d..d9ed38f 100644
--- a/src/frontend/app/components/Stops/ConsolidatedCirculationCard.css
+++ b/src/frontend/app/components/Stops/ConsolidatedCirculationCard.css
@@ -117,6 +117,7 @@
.consolidated-circulation-card .card-row.meta {
justify-content: flex-start;
+ flex-wrap: wrap;
gap: 0.4rem;
}
diff --git a/src/frontend/app/components/Stops/ConsolidatedCirculationCard.tsx b/src/frontend/app/components/Stops/ConsolidatedCirculationCard.tsx
index 425cf7b..679345f 100644
--- a/src/frontend/app/components/Stops/ConsolidatedCirculationCard.tsx
+++ b/src/frontend/app/components/Stops/ConsolidatedCirculationCard.tsx
@@ -250,28 +250,32 @@ export const ConsolidatedCirculationCard: React.FC<
});
}
- if (estimate.currentPosition) {
- if (estimate.isPreviousTrip) {
- chips.push({ label: t("estimates.previous_trip"), kind: "gps" });
- } else {
- chips.push({ label: t("estimates.bus_gps_position"), kind: "gps" });
+ if (!reduced) {
+ if (estimate.currentPosition) {
+ if (estimate.isPreviousTrip) {
+ chips.push({ label: t("estimates.previous_trip"), kind: "gps" });
+ } else {
+ chips.push({ label: t("estimates.bus_gps_position"), kind: "gps" });
+ }
}
- }
- if (timeClass === "time-delayed") {
- chips.push({
- label: reduced ? "!" : t("estimates.low_accuracy"),
- tone: "warning",
- kind: "warning",
- });
- }
+ if (driver !== "renfe") {
+ if (timeClass === "time-delayed") {
+ chips.push({
+ label: reduced ? "!" : t("estimates.low_accuracy"),
+ tone: "warning",
+ kind: "warning",
+ });
+ }
- if (timeClass === "time-scheduled") {
- chips.push({
- label: reduced ? "⧗" : t("estimates.no_realtime"),
- tone: "warning",
- kind: "warning",
- });
+ if (timeClass === "time-scheduled") {
+ chips.push({
+ label: reduced ? "⧗" : t("estimates.no_realtime"),
+ tone: "warning",
+ kind: "warning",
+ });
+ }
+ }
}
return chips;
diff --git a/src/gtfs_perstop_report/src/street_name.py b/src/gtfs_perstop_report/src/street_name.py
index 81d419b..e744ea3 100644
--- a/src/gtfs_perstop_report/src/street_name.py
+++ b/src/gtfs_perstop_report/src/street_name.py
@@ -14,10 +14,14 @@ NAME_REPLACEMENTS = {
"FORA DE SERVIZO.G.B.": "",
"Praza de Fernando O Católico": "",
"Rúa da Travesía de Vigo": "Travesía de Vigo",
- " de ": " ",
- " do ": " ",
- " da ": " ",
- " das ": " ",
+ "Rúa de ": " ",
+ "Rúa do ": " ",
+ "Rúa da ": " ",
+ "Rúa das ": " ",
+ "Avda. de ": " ",
+ "Avda. do ": " ",
+ "Avda. da ": " ",
+ "Avda. das ": " ",
"Riós": "Ríos",
}