refreshed logic.
This commit is contained in:
@@ -12,25 +12,25 @@
|
|||||||
if (useKwh)
|
if (useKwh)
|
||||||
{
|
{
|
||||||
consumptionUnit = "kWh";
|
consumptionUnit = "kWh";
|
||||||
fuelEconomyUnit = useMPG ? "mi/kWh" : "kWh/100km";
|
fuelEconomyUnit = useMPG ? "mi./kWh" : "kWh/100km";
|
||||||
}
|
}
|
||||||
else if (useMPG && useUKMPG)
|
else if (useMPG && useUKMPG)
|
||||||
{
|
{
|
||||||
consumptionUnit = "imp gal";
|
consumptionUnit = "imp gal";
|
||||||
fuelEconomyUnit = "mpg";
|
fuelEconomyUnit = "mpg";
|
||||||
|
distanceUnit = "mi.";
|
||||||
|
} else if (useUKMPG)
|
||||||
|
{
|
||||||
|
fuelEconomyUnit = "l/100mi.";
|
||||||
|
consumptionUnit = "l";
|
||||||
|
distanceUnit = "mi.";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
consumptionUnit = useMPG ? "US gal" : "l";
|
consumptionUnit = useMPG ? "US gal" : "l";
|
||||||
fuelEconomyUnit = useMPG ? "mpg" : "l/100km";
|
fuelEconomyUnit = useMPG ? "mpg" : "l/100km";
|
||||||
|
distanceUnit = useMPG ? "mi." : "km";
|
||||||
}
|
}
|
||||||
if (useUKMPG)
|
|
||||||
{
|
|
||||||
distanceUnit = "mi.";
|
|
||||||
} else {
|
|
||||||
distanceUnit = useMPG ? "mi" : "km";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr class="d-flex">
|
<tr class="d-flex">
|
||||||
<th scope="col" class="col-2">Date Refueled</th>
|
<th scope="col" class="col-2">Date Refueled</th>
|
||||||
<th scope="col" class="col-2">Odometer(@distanceUnit)</th>
|
<th scope="col" class="col-2">Odometer(@(distanceUnit))</th>
|
||||||
<th scope="col" class="col-2">Consumption(@(consumptionUnit))</th>
|
<th scope="col" class="col-2">Consumption(@(consumptionUnit))</th>
|
||||||
<th scope="col" class="col-4">Fuel Economy(@(fuelEconomyUnit))</th>
|
<th scope="col" class="col-4">Fuel Economy(@(fuelEconomyUnit))</th>
|
||||||
<th scope="col" class="col-1">Cost</th>
|
<th scope="col" class="col-1">Cost</th>
|
||||||
|
|||||||
Reference in New Issue
Block a user