This commit is contained in:
1 parent
4bb13dbb06
commit
bc419ce57a
6 files changed
+11
-7
No files matched your search
@@ -13,7 +13,7 @@ namespace Elwig.Dialogs {
|
||||
public bool DeletePaymentData { get; set; }
|
||||
|
||||
public DeleteMemberDialog(int mgnr, string name, int numAreaCmts, int numDeliveries, int numCredits) {
|
||||
NameParts = name.ToLower().Split(' ').Where(p => p.Length > 0).Append($"{mgnr}").ToArray();
|
||||
NameParts = [.. name.ToLower().Split(' ', System.StringSplitOptions.RemoveEmptyEntries), $"{mgnr}"];
|
||||
InitializeComponent();
|
||||
Title += " - " + name;
|
||||
AreaCmtInput.IsEnabled = numAreaCmts != 0;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Elwig.Models.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Controls;
|
||||
@@ -15,7 +16,7 @@ namespace Elwig.ViewModels {
|
||||
[ObservableProperty]
|
||||
public partial string? SearchQuery { get; set; } = "";
|
||||
public List<string> TextFilter {
|
||||
get => [.. SearchQuery?.ToLower().Split(' ').ToList().FindAll(e => e.Length > 0) ?? []];
|
||||
get => [.. SearchQuery?.ToLower().Split(' ', StringSplitOptions.RemoveEmptyEntries) ?? []];
|
||||
set => SearchQuery = string.Join(' ', value.Where(e => e.Length > 0));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Elwig.Helpers;
|
||||
using Elwig.Models.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
@@ -18,7 +19,7 @@ namespace Elwig.ViewModels {
|
||||
|
||||
[ObservableProperty]
|
||||
public partial string? SearchQuery { get; set; } = "";
|
||||
public List<string> TextFilter => [.. SearchQuery?.ToLower().Split(' ').ToList().FindAll(e => e.Length > 0) ?? []];
|
||||
public List<string> TextFilter => [.. SearchQuery?.ToLower().Split(' ', StringSplitOptions.RemoveEmptyEntries) ?? []];
|
||||
|
||||
[ObservableProperty]
|
||||
public partial string? LastScaleError { get; set; }
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Elwig.Models.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
@@ -13,7 +14,7 @@ namespace Elwig.ViewModels {
|
||||
|
||||
[ObservableProperty]
|
||||
public partial string? SearchQuery { get; set; } = "";
|
||||
public List<string> TextFilter => [.. SearchQuery?.ToLower().Split(' ').ToList().FindAll(e => e.Length > 0) ?? []];
|
||||
public List<string> TextFilter => [.. SearchQuery?.ToLower().Split(' ', StringSplitOptions.RemoveEmptyEntries) ?? []];
|
||||
|
||||
[ObservableProperty]
|
||||
public partial bool FilterOnlyUpcoming { get; set; }
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Elwig.ViewModels {
|
||||
|
||||
[ObservableProperty]
|
||||
public partial string? SearchQuery { get; set; } = "";
|
||||
public List<string> TextFilter => [.. SearchQuery?.ToLower().Split(' ').ToList().FindAll(e => e.Length > 0) ?? []];
|
||||
public List<string> TextFilter => [.. SearchQuery?.ToLower().Split(' ', StringSplitOptions.RemoveEmptyEntries) ?? []];
|
||||
|
||||
[ObservableProperty]
|
||||
public partial bool FilterOnlyUpcoming { get; set; }
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Elwig.Helpers;
|
||||
using Elwig.Models.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
@@ -17,11 +18,11 @@ namespace Elwig.ViewModels {
|
||||
public int? TransferPredecessorAreaCmts { get; set; } = null;
|
||||
public int? CancelAreaCmts { get; set; } = null;
|
||||
|
||||
public ObservableCollection<KeyValuePair<string, string>> PhoneNrTypes { get; set; } = new(Utils.PhoneNrTypes);
|
||||
public ObservableCollection<KeyValuePair<string, string>> PhoneNrTypes { get; set; } = [with(Utils.PhoneNrTypes)];
|
||||
|
||||
[ObservableProperty]
|
||||
public partial string? SearchQuery { get; set; } = "";
|
||||
public List<string> TextFilter => [.. SearchQuery?.ToLower().Split(' ').ToList().FindAll(e => e.Length > 0) ?? []];
|
||||
public List<string> TextFilter => [.. SearchQuery?.ToLower().Split(' ', StringSplitOptions.RemoveEmptyEntries) ?? []];
|
||||
|
||||
[ObservableProperty]
|
||||
public partial bool ShowOnlyActiveMembers { get; set; } = true;
|
||||
|
||||
Reference in new issue
Block a user