diff --git a/Enum/ImportMode.cs b/Enum/ImportMode.cs index feee263..27e3f58 100644 --- a/Enum/ImportMode.cs +++ b/Enum/ImportMode.cs @@ -6,6 +6,9 @@ RepairRecord = 1, GasRecord = 2, TaxRecord = 3, - UpgradeRecord = 4 + UpgradeRecord = 4, + ReminderRecord = 5, + NoteRecord = 6, + SupplyRecord = 7 } } diff --git a/Helper/ConfigHelper.cs b/Helper/ConfigHelper.cs index 5a57555..50c3d99 100644 --- a/Helper/ConfigHelper.cs +++ b/Helper/ConfigHelper.cs @@ -94,7 +94,8 @@ namespace CarCareTracker.Helper EnableAuth = bool.Parse(_config[nameof(UserConfig.EnableAuth)]), HideZero = bool.Parse(_config[nameof(UserConfig.HideZero)]), UseUKMPG = bool.Parse(_config[nameof(UserConfig.UseUKMPG)]), - UseThreeDecimalGasCost = bool.Parse(_config[nameof(UserConfig.UseThreeDecimalGasCost)]) + UseThreeDecimalGasCost = bool.Parse(_config[nameof(UserConfig.UseThreeDecimalGasCost)]), + VisibleTabs = _config.GetSection("VisibleTabs").Get>() }; int userId = 0; if (user != null) diff --git a/Models/UserConfig.cs b/Models/UserConfig.cs index 376ea56..94d45be 100644 --- a/Models/UserConfig.cs +++ b/Models/UserConfig.cs @@ -12,5 +12,6 @@ public bool UseThreeDecimalGasCost { get; set; } public string UserNameHash { get; set; } public string UserPasswordHash { get; set;} + public List VisibleTabs { get; set; } = new List(); } } \ No newline at end of file diff --git a/Views/Vehicle/Index.cshtml b/Views/Vehicle/Index.cshtml index ef89385..711b3ac 100644 --- a/Views/Vehicle/Index.cshtml +++ b/Views/Vehicle/Index.cshtml @@ -1,6 +1,11 @@ -@{ +@using CarCareTracker.Helper +@{ ViewData["Title"] = "LubeLogger - View Vehicle"; } +@inject IConfigHelper config +@{ + var visibleTabs = config.GetUserConfig(User).VisibleTabs; +} @model Vehicle @section Scripts { @@ -26,25 +31,25 @@