Less requests to get Data faster
Load settings with `GetEntryWithSettingsAsync`, update `Hours` and `ViewModels`.
This commit is contained in:
@@ -4,24 +4,45 @@ using System.Collections.ObjectModel;
|
||||
namespace Jugenddienst_Stunden.Types;
|
||||
|
||||
public partial class Hours : ObservableObject {
|
||||
public double? Zeit;
|
||||
/// <summary>
|
||||
/// Total time in seconds for the current context.
|
||||
/// "zeit" is used by the API to represent the current recorded time value.
|
||||
/// </summary>
|
||||
public int zeit;
|
||||
|
||||
public double? Nominal;
|
||||
/// <summary>
|
||||
/// Nominal working time expectation (e.g. seconds per day or month depending on API semantics).
|
||||
/// Represents the expected amount of time to be worked.
|
||||
/// </summary>
|
||||
public int nominal;
|
||||
|
||||
//public Dictionary<DateOnly,NominalDay> nominal_day_api;
|
||||
/// <summary>
|
||||
/// List of nominal day records returned by the API.
|
||||
/// May be null when the API does not provide per-day nominal data.
|
||||
/// </summary>
|
||||
public List<NominalDay>? Nominal_day_api;
|
||||
|
||||
//public Dictionary<int,NominalWeek> nominal_week_api;
|
||||
/// <summary>
|
||||
/// List of nominal week records returned by the API.
|
||||
/// May be null when the API does not provide per-week nominal data.
|
||||
/// </summary>
|
||||
public List<NominalWeek>? Nominal_week_api;
|
||||
|
||||
//public List<string> time_line;
|
||||
public double? Zeit_total;
|
||||
|
||||
//https://stackoverflow.com/questions/29449641/deserialize-json-when-a-value-can-be-an-object-or-an-empty-array/29450279#29450279
|
||||
//[JsonConverter(typeof(JsonSingleOrEmptyArrayConverter<Hours>))]
|
||||
//public Dictionary<int,decimal> zeit_total_daily;
|
||||
/// <summary>
|
||||
/// Total time in seconds reported by the API for the current period. Nullable if not provided.
|
||||
/// </summary>
|
||||
public double? zeit_total;
|
||||
|
||||
/// <summary>
|
||||
/// Daily total time values returned by the API.
|
||||
/// Each entry represents a day with its associated time value.
|
||||
/// </summary>
|
||||
public List<TimeDay> zeit_total_daily_api;
|
||||
|
||||
/// <summary>
|
||||
/// Collection of daytime entries representing individual recorded time slots or events.
|
||||
/// Nullable when the API returns no detailed daytime information.
|
||||
/// </summary>
|
||||
public List<DayTime>? daytime;
|
||||
//public List<string> wochensumme;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user