diff --git a/Views/Vehicle/Index.cshtml b/Views/Vehicle/Index.cshtml index bfb756a..1f13356 100644 --- a/Views/Vehicle/Index.cshtml +++ b/Views/Vehicle/Index.cshtml @@ -14,9 +14,7 @@

@($"{Model.Year} {Model.Make} {Model.Model}(License # {Model.LicensePlate})")

-
- -
+

diff --git a/Views/Vehicle/_Gas.cshtml b/Views/Vehicle/_Gas.cshtml index cf0b922..e27af1e 100644 --- a/Views/Vehicle/_Gas.cshtml +++ b/Views/Vehicle/_Gas.cshtml @@ -1,4 +1,8 @@ -@model List +@inject IConfiguration Configuration +@{ + var enableCsvImports = bool.Parse(Configuration["EnableCsvImports"]); +} +@model List
@@ -12,15 +16,20 @@ @($"Total Fuel Consumed: {Model.Sum(x=>x.Gallons)}") @($"Total Cost: {Model.Sum(x => x.Cost).ToString("C")}")
-
+ @if (enableCsvImports) + { +
+ + + +
+ } else { - - -
+ }
diff --git a/appsettings.json b/appsettings.json index 2aa9e16..528a826 100644 --- a/appsettings.json +++ b/appsettings.json @@ -6,5 +6,6 @@ } }, "AllowedHosts": "*", - "DarkMode": true + "DarkMode": true, + "EnableCsvImports": false }