added basic start page setup; began rewrite of parser

This commit is contained in:
schnulller
2022-06-14 00:31:52 +02:00
parent 6be85d495b
commit 9e53de8be3
61 changed files with 532745 additions and 661 deletions

View File

@@ -1,15 +1,21 @@
namespace HaWeb.Models;
public class SucheViewModel {
public List<(int Year, List<BriefeMetaViewModel> LetterList)> Letters { get; private set; }
public List<(int Year, List<BriefeMetaViewModel> LetterList)>? Letters { get; private set; }
public int Count { get; private set; }
public int ActiveYears { get; private set; }
public List<(int StartYear, int EndYear)> AvailableYears { get; private set; }
public int ActiveYear { get; private set; }
public List<(int StartYear, int EndYear)>? AvailableYears { get; private set; }
public string? ActivePerson {get; set; }
public List<(string Key, string Name)>? AvailablePersons { get; private set; }
public SucheViewModel(List<(int Year, List<BriefeMetaViewModel> LetterList)> letters, int count, int activeYears, List<(int StartYear, int EndYear)> availableYears) {
public SucheViewModel(List<(int Year, List<BriefeMetaViewModel> LetterList)>? letters, int activeYear, List<(int StartYear, int EndYear)>? availableYears, List<(string Key, string Name)>? availablePersons) {
Letters = letters;
Count = count;
ActiveYears = activeYears;
if (letters != null)
Count = letters.Select(x => x.LetterList.Count).Aggregate(0, (x, y) => { x += y; return x; });
else
Count = 0;
ActiveYear = activeYear;
AvailableYears = availableYears;
AvailablePersons = availablePersons;
}
}