Merge pull request #107 from hargata/Hargata/fuel.decimal.settings

named setting better and only call userconfig method once in the gas …
This commit is contained in:
Hargata Softworks
2024-01-16 08:46:15 -07:00
committed by GitHub
3 changed files with 8 additions and 7 deletions

View File

@@ -34,7 +34,7 @@
</div>
<div class="form-check form-switch">
<input class="form-check-input" onChange="updateSettings()" type="checkbox" role="switch" id="useThreeDecimal" checked="@Model.UseThreeDecimalGasCost">
<label class="form-check-label" for="useThreeDecimal">Use Three Decimals For Gas Cost</label>
<label class="form-check-label" for="useThreeDecimal">Use Three Decimals For Fuel Cost</label>
</div>
@if (User.IsInRole(nameof(UserData.IsRootUser)))
{

View File

@@ -2,11 +2,12 @@
@inject IConfigHelper config
@model GasRecordViewModelContainer
@{
var enableCsvImports = config.GetUserConfig(User).EnableCsvImports;
var useMPG = config.GetUserConfig(User).UseMPG;
var useUKMPG = config.GetUserConfig(User).UseUKMPG;
var hideZero = config.GetUserConfig(User).HideZero;
var useThreeDecimals = config.GetUserConfig(User).UseThreeDecimalGasCost;
var userConfig = config.GetUserConfig(User);
var enableCsvImports = userConfig.EnableCsvImports;
var useMPG = userConfig.UseMPG;
var useUKMPG = userConfig.UseUKMPG;
var hideZero = userConfig.HideZero;
var useThreeDecimals = userConfig.UseThreeDecimalGasCost;
var gasCostFormat = useThreeDecimals ? "C3" : "C2";
var useKwh = Model.UseKwh;
string consumptionUnit;

View File

@@ -203,7 +203,7 @@ html {
left: 0;
margin: 0;
display: none;
z-index: 10;
z-index: 2000;
}
.lubelogger-mobile-nav-show {