Zooflow: Improve Search Ribbon, Process Independent Search

This commit is contained in:
Jonathan Jenne
2022-05-19 12:17:57 +02:00
parent 26a82f4af0
commit 4555fe4e34
21 changed files with 632 additions and 165 deletions

View File

@@ -2,25 +2,25 @@
Public Class SearchFilter
Public Shared Property DefaultFilters As New List(Of FilterTimeframe) From {
New FilterTimeframe() With {.Name = "Kein", .DisableFilter = True, .[To] = Nothing},
New FilterTimeframe() With {.Name = "Eigener", .CustomFilter = True, .[To] = Date.Now, .From = Date.Now},
New FilterTimeframe() With {
.Name = "letzte 7 Tage",
.From = Date.Now.Subtract(TimeSpan.FromDays(7))
},
New FilterTimeframe() With {
.Name = "letzte 14 Tage",
.From = Date.Now.Subtract(TimeSpan.FromDays(14))
},
New FilterTimeframe() With {
.Name = "letzte 30 Tage",
.From = Date.Now.Subtract(TimeSpan.FromDays(30))
},
New FilterTimeframe() With {
.Name = "aktueller Monat",
.From = New Date(Now.Year, Now.Month, 1)
New FilterTimeframe() With {.Name = "Kein", .DisableFilter = True, .[To] = Nothing},
New FilterTimeframe() With {.Name = "Eigener", .CustomFilter = True, .[To] = Date.Now, .From = Date.Now},
New FilterTimeframe() With {
.Name = "letzte 7 Tage",
.From = Date.Now.Subtract(TimeSpan.FromDays(7))
},
New FilterTimeframe() With {
.Name = "letzte 14 Tage",
.From = Date.Now.Subtract(TimeSpan.FromDays(14))
},
New FilterTimeframe() With {
.Name = "letzte 30 Tage",
.From = Date.Now.Subtract(TimeSpan.FromDays(30))
},
New FilterTimeframe() With {
.Name = "aktueller Monat",
.From = New Date(Now.Year, Now.Month, 1)
}
}
}
Public Class FilterTimeframe
Public Property Name As String

View File

@@ -1,25 +0,0 @@
Namespace Search
Public Class SearchToken
Public Class AttributeValueToken
Public AttributeTitle As String
Public AttributeId As Integer
Public TermValue As String
Public TermId As Integer
Public Overrides Function GetHashCode() As Integer
Return (TermId.GetHashCode & AttributeId.GetHashCode).GetHashCode()
End Function
Public Overrides Function Equals(obj As Object) As Boolean
Return Me.GetHashCode() = DirectCast(obj, AttributeValueToken).GetHashCode()
End Function
Public Overrides Function ToString() As String
Return $"{TermValue} ({AttributeTitle})"
End Function
End Class
End Class
End Namespace