diff --git a/src/iRLeagueManager.Web/Components/MultiSelectAutoComplete.razor b/src/iRLeagueManager.Web/Components/MultiSelectAutoComplete.razor index a2c57a54..51c758d5 100644 --- a/src/iRLeagueManager.Web/Components/MultiSelectAutoComplete.razor +++ b/src/iRLeagueManager.Web/Components/MultiSelectAutoComplete.razor @@ -19,8 +19,9 @@ ErrorText="@ErrorText" @attributes="AdditionalAttributes" @ref=Autocomplete - NoItemsTemplate="NoItemsTemplate" - MaxItems="MaxItems" /> + NoItemsTemplate="NoItemsTemplate" + MaxItems="MaxItems" + MinCharacters="MinCharacters" /> @foreach (var val in selectedValues) { @@ -78,6 +79,9 @@ [Parameter] public int MaxItems { get; set; } = 100; + [Parameter] + public int MinCharacters { get; set; } = 0; + private HashSet selectedValues = new HashSet(); private MudAutocomplete Autocomplete { get; set; } = default!; diff --git a/src/iRLeagueManager.Web/Components/Settings/Dialogs/FilterConditionDialog.razor b/src/iRLeagueManager.Web/Components/Settings/Dialogs/FilterConditionDialog.razor index d2355539..8799aaed 100644 --- a/src/iRLeagueManager.Web/Components/Settings/Dialogs/FilterConditionDialog.razor +++ b/src/iRLeagueManager.Web/Components/Settings/Dialogs/FilterConditionDialog.razor @@ -52,15 +52,17 @@ var propertyType = GetColumnPropertyType(Condition.ColumnPropertyName); - @foreach (var compType in Enum.GetValues().Where(x => x != ComparatorType.InList)) + @foreach (var compType in Enum.GetValues()) { if (AllowForEach == false && compType == ComparatorType.ForEach) { continue; } - @compType.GetText() + + @compType.GetText() + } @@ -70,7 +72,12 @@ } else if (Condition.Comparator == ComparatorType.InList) { - @*TODO: Fill in Component for values selection from list*@ + } else if (propertyType == typeof(RaceStatus)) { @@ -82,10 +89,10 @@ } else if (propertyType == typeof(string) - || propertyType == typeof(double) - || propertyType == typeof(double?) - || propertyType == typeof(int) - || propertyType == typeof(int?)) + || propertyType == typeof(double) + || propertyType == typeof(double?) + || propertyType == typeof(int) + || propertyType == typeof(int?)) { var isNumeric = propertyType == typeof(double) || propertyType == typeof(double?) || propertyType == typeof(int) || propertyType == typeof(int?); @@ -220,4 +227,16 @@ var property = typeof(ResultRowModel).GetProperty(name); return property?.PropertyType; } + + private string GetComparatorHelperText(ComparatorType comparator) => comparator switch + { + ComparatorType.IsSmaller => "match if smaller than given value", + ComparatorType.IsSmallerOrEqual => "match if smaller or equal to given value", + ComparatorType.IsEqual => "match if equal to given value", + ComparatorType.IsBiggerOrEqual => "match if bigger or equal to given value", + ComparatorType.IsBigger => "match if bigger than given value", + ComparatorType.NotEqual => "match if not equal to given value", + ComparatorType.InList => "match if equal to one of the values in list", + _ => "", + }; } diff --git a/src/iRLeagueManager.Web/iRLeagueManager.Web.csproj b/src/iRLeagueManager.Web/iRLeagueManager.Web.csproj index 1273eba6..24918b59 100644 --- a/src/iRLeagueManager.Web/iRLeagueManager.Web.csproj +++ b/src/iRLeagueManager.Web/iRLeagueManager.Web.csproj @@ -2,7 +2,7 @@ net7.0 - 0.11.5 + 0.11.6 enable enable aspnet-iRLeagueManager.Web-2B05F9DC-55A3-49D1-BD64-31507000EDF3