From 893cdafdc565f944f8dd66ea9ea5f85d2cc81381 Mon Sep 17 00:00:00 2001 From: "DESKTOP-T0O5CDB\\DESK-555BD" Date: Tue, 23 Apr 2024 23:42:09 -0600 Subject: [PATCH] Fixes a very minor bug where the persisted year metric blanks out when viewing a different car that doesn't have that specific year. --- Helper/StaticHelper.cs | 2 +- wwwroot/js/reports.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Helper/StaticHelper.cs b/Helper/StaticHelper.cs index 94c77a4..cceb32a 100644 --- a/Helper/StaticHelper.cs +++ b/Helper/StaticHelper.cs @@ -8,7 +8,7 @@ namespace CarCareTracker.Helper /// public static class StaticHelper { - public static string VersionNumber = "1.3.1"; + public static string VersionNumber = "1.3.2"; public static string DbName = "data/cartracker.db"; public static string UserConfigPath = "config/userConfig.json"; public static string GenericErrorMessage = "An error occurred, please try again later"; diff --git a/wwwroot/js/reports.js b/wwwroot/js/reports.js index a63f1e8..3fa91c1 100644 --- a/wwwroot/js/reports.js +++ b/wwwroot/js/reports.js @@ -54,7 +54,10 @@ function getSelectedMetrics() { if (selectedMetricCheckBoxes.length == 6) { $("#selectAllExpenseCheck").prop("checked", true); } - $('#yearOption').val(yearMetric); + //check if option is available + if ($("#yearOption").has(`option[value=${yearMetric}]`).length > 0) { + $('#yearOption').val(yearMetric); + } $("#reminderOption").val(reminderMetric); //retrieve data. yearUpdated();