Added Search Page. Final Version for 1st internal relaese

This commit is contained in:
Simon Martens
2022-11-02 16:37:50 +01:00
parent 74a952270d
commit 898029713e
20 changed files with 387 additions and 204 deletions

View File

@@ -1,12 +1,6 @@
namespace HaWeb.Models;
using HaDocument.Models;
public enum SearchType {
Letter,
Register,
Marginals
}
public enum SearchResultType {
Success,
OutOfBounds,
@@ -16,22 +10,25 @@ public enum SearchResultType {
public class SucheViewModel {
public List<(int Year, List<BriefeMetaViewModel> LetterList)>? Letters { get; private set; }
public List<CommentModel>? Comments { get; private set; }
public int Count { get; private set; }
public int ActivePage { get; private set; }
public List<string>? AvailablePages { get; private set; }
public string ActiveSearch { get; private set; }
public Dictionary<string, List<SearchResult>>? SearchResults { get; private set; }
public SearchResultType SearchResultType { get; private set; }
public SearchType SearchType { get; private set; }
public string SearchType { get; private set; }
public SucheViewModel(
SearchType searchType,
string searchType,
SearchResultType searchResultType,
int activePage,
List<string>? availablePages,
string activeSearch,
Dictionary<string, List<SearchResult>>? searchResults,
List<(int Year, List<BriefeMetaViewModel> LetterList)>? letters
List<(int Year, List<BriefeMetaViewModel> LetterList)>? letters,
List<CommentModel>? comments
) {
Letters = letters;
if (letters != null)
@@ -45,5 +42,6 @@ public class SucheViewModel {
AvailablePages = availablePages;
ActiveSearch = activeSearch;
SearchResults = searchResults;
Comments = comments;
}
}