aboutsummaryrefslogtreecommitdiff
path: root/src/Enmarcha.Backend/Services
diff options
context:
space:
mode:
Diffstat (limited to 'src/Enmarcha.Backend/Services')
-rw-r--r--src/Enmarcha.Backend/Services/FareService.cs12
-rw-r--r--src/Enmarcha.Backend/Services/FeedService.cs2
2 files changed, 13 insertions, 1 deletions
diff --git a/src/Enmarcha.Backend/Services/FareService.cs b/src/Enmarcha.Backend/Services/FareService.cs
index fda5eb5..294166d 100644
--- a/src/Enmarcha.Backend/Services/FareService.cs
+++ b/src/Enmarcha.Backend/Services/FareService.cs
@@ -25,6 +25,9 @@ public class FareService
private const decimal OurenseCashFare = 0.85M;
private const decimal OurenseCardFare = 0.49M;
+ private const decimal LugoCashFare = 0.64M;
+ private const decimal LugoCardFare = 0.45M;
+
public FareService(
IOptions<AppConfiguration> config,
XuntaFareProvider xuntaFareProvider,
@@ -77,6 +80,9 @@ public class FareService
case "ourense":
total += OurenseCashFare;
break;
+ case "lugo":
+ total += LugoCashFare;
+ break;
case "xunta":
// TODO: Handle potentiall blow-ups
if (leg.From is not { ZoneId: not null })
@@ -137,6 +143,12 @@ public class FareService
maxUsages = 2;
initialFare = OurenseCardFare;
break;
+ case "lugo":
+ // IDK About card rules, so we set it to zero
+ maxMinutes = 0;
+ maxUsages = 0;
+ initialFare = LugoCardFare;
+ break;
case "xunta":
if (leg.From?.ZoneId == null || leg.To?.ZoneId == null)
{
diff --git a/src/Enmarcha.Backend/Services/FeedService.cs b/src/Enmarcha.Backend/Services/FeedService.cs
index 4ea3752..4e0547b 100644
--- a/src/Enmarcha.Backend/Services/FeedService.cs
+++ b/src/Enmarcha.Backend/Services/FeedService.cs
@@ -30,7 +30,6 @@ public class FeedService
{ "Riós", "Ríos" },
{ "Avda. Beiramar Porto Pesqueiro Berbés", "Berbés" },
{ "Conde de Torrecedeira", "Torrecedeira" },
-
};
public (string Color, string TextColor) GetFallbackColourForFeed(string feed)
@@ -41,6 +40,7 @@ public class FeedService
"tussa" => ("#508096", "#FFFFFF"),
"tranvias" => ("#E61C29", "#FFFFFF"),
"ourense" => ("#ffb319", "#000000"),
+ "lugo" => ("#FDC609", "#000000"),
"xunta" => ("#007BC4", "#FFFFFF"),
"renfe" => ("#870164", "#FFFFFF"),
"feve" => ("#EE3D32", "#FFFFFF"),