Settings geht noch nicht ganz

This commit is contained in:
2024-10-18 18:42:58 +02:00
parent b27e8ffcce
commit fbd650c174
8 changed files with 623 additions and 481 deletions

View File

@@ -4,103 +4,107 @@ namespace Jugenddienst_Stunden.Types;
/// <summary>
/// Represents a day time entry for an employee.
/// </summary>
public class DayTime {
/// <summary>
/// ID des Stundeneintrages
/// </summary>
public int? id { get; set; }
public class DayTime
{
/// <summary>
/// ID des Stundeneintrages
/// </summary>
public int? id { get; set; }
/// <summary>
/// Mitarbeiter-ID
/// </summary>
public int EmployeeId { get; set; }
/// <summary>
/// Mitarbeiter-ID
/// </summary>
public int EmployeeId { get; set; }
/// <summary>
/// Der betreffende Tag
/// </summary>
public DateTime day { get; set; }
/// <summary>
/// Der betreffende Tag
/// </summary>
public DateTime day { get; set; }
/// <summary>
/// Der Wochentag
/// </summary>
public int wday { get; set; }
/// <summary>
/// Der Wochentag
/// </summary>
public int wday { get; set; }
/// <summary>
/// Arbeitsbeginn
/// </summary>
public TimeOnly begin { get; set; }
/// <summary>
/// Arbeitsbeginn
/// </summary>
public TimeOnly begin { get; set; }
/// <summary>
/// Arbeitsende
/// </summary>
public TimeOnly end { get; set; }
/// <summary>
/// Arbeitsende
/// </summary>
public TimeOnly end { get; set; }
/// <summary>
/// Beschreibung der Arbeit
/// </summary>
public string description { get; set; }
/// <summary>
/// Beschreibung der Arbeit
/// </summary>
public string description { get; set; }
/// <summary>
/// Freistellung
/// </summary>
public string? free { get; set; }
/// <summary>
/// Freistellung
/// </summary>
public string? free { get; set; }
/// <summary>
/// Freisetellung genehmigt?
/// </summary>
public bool? approved { get; set; }
/// <summary>
/// Freisetellung genehmigt?
/// </summary>
public bool? approved { get; set; }
/// <summary>
/// Sollte nix sein
/// </summary>
public int? type { get; set; }
/// <summary>
/// Sollte nix sein
/// </summary>
public int? type { get; set; }
/// <summary>
/// Das gewählte Projekt
/// </summary>
public int? projekt { get; set; }
/// <summary>
/// Das gewählte Projekt
/// </summary>
public int? projekt { get; set; }
/// <summary>
/// Die gewählte Gemeinde
/// </summary>
public int? gemeinde { get; set; }
/// <summary>
/// Die gewählte Gemeinde
/// </summary>
public int? gemeinde { get; set; }
/// <summary>
/// Nachtstunden
/// </summary>
public TimeOnly night { get; set; }
/// <summary>
/// Nachtstunden
/// </summary>
public TimeOnly night { get; set; }
/// <summary>
/// Summe Arbeitszeit (inklusive Nachstunden mit Faktor)
/// </summary>
public Dictionary<string, TimeOnly> total { get; set; }
public TimeOnly end_print { get; set; }
public TimeSpan TimeSpanVon { get; set; }
public TimeSpan TimeSpanBis { get; set; }
/// <summary>
/// Summe Arbeitszeit (inklusive Nachstunden mit Faktor)
/// </summary>
public Dictionary<string, TimeOnly> total { get; set; }
public TimeOnly end_print { get; set; }
public TimeSpan TimeSpanVon { get; set; }
public TimeSpan TimeSpanBis { get; set; }
/// <summary>
/// Projekte für die Auswahlliste
/// </summary>
public Collection<Projekt> Projekte { get; set; }
/// <summary>
/// Projekte für die Auswahlliste
/// </summary>
public Collection<Projekt> Projekte { get; set; }
/// <summary>
/// Gemeinden für die Auswahlliste
/// </summary>
public Collection<Gemeinde> Gemeinden { get; set; }
public Collection<Freistellung> Freistellungen { get; set; }
/// <summary>
/// Gemeinden für die Auswahlliste
/// </summary>
public Collection<Gemeinde> Gemeinden { get; set; }
public Collection<Freistellung> Freistellungen { get; set; }
/// <summary>
/// Gets the active Gemeinde based on the gemeinde ID.
/// </summary>
public Gemeinde GemeindeAktiv { get; set; }
/// <summary>
/// Gets the active Gemeinde based on the gemeinde ID.
/// </summary>
public Gemeinde GemeindeAktiv { get; set; }
/// <summary>
/// Gets the active Projekt based on the projekt ID.
/// </summary>
public Projekt ProjektAktiv { get; set; }
/// <summary>
/// Gets the active Projekt based on the projekt ID.
/// </summary>
public Projekt ProjektAktiv { get; set; }
/// <summary>
/// Gets the active Freistellung based on the Freistellung ID
/// </summary>
public Freistellung FreistellungAktiv { get; set; }
/// <summary>
/// Gets the active Freistellung based on the Freistellung ID
/// </summary>
public Freistellung FreistellungAktiv { get; set; }
public bool ProjektAktivSet { get; set; } = false;
public bool GemeindeAktivSet { get; set; } = false;
}

View File

@@ -0,0 +1,15 @@
using System.Collections.ObjectModel;
namespace Jugenddienst_Stunden.Types;
/// <summary>
/// Einstellungen
/// </summary>
public class Settings
{
public bool ProjektAktivSet { get; set; }
public bool GemeindeAktivSet { get; set; }
public Collection<Projekt> Projekte { get; set; }
public Collection<Gemeinde> Gemeinden { get; set; }
public Collection<Freistellung> Freistellungen { get; set; }
}