Problem with Empty Json
Cannot create Object, when zeit_total_daily is empty
This commit is contained in:
@@ -34,6 +34,11 @@ namespace Jugenddienst_Stunden.ViewModels {
|
||||
public string OvertimeMonth {
|
||||
get => _hour.overtime_month;
|
||||
}
|
||||
|
||||
public Dictionary<int, decimal> ZeitTotalDaily {
|
||||
get => _hour.zeit_total_daily;
|
||||
}
|
||||
|
||||
public string Title { get; set; } = Preferences.Default.Get("name", "") + " " + Preferences.Default.Get("surname", "");
|
||||
|
||||
public StundenViewModel() {
|
||||
@@ -46,7 +51,7 @@ namespace Jugenddienst_Stunden.ViewModels {
|
||||
|
||||
public async Task LoadData() {
|
||||
_hour = await Models.Stunde.LoadData();
|
||||
Models.Hours Hours = new Models.Hours();
|
||||
//Models.Hours Hours = new Models.Hours();
|
||||
//Title = _hour.operator_api.name + " " + _hour.operator_api.surname;
|
||||
RefreshProperties();
|
||||
}
|
||||
@@ -59,6 +64,7 @@ namespace Jugenddienst_Stunden.ViewModels {
|
||||
OnPropertyChanged(nameof(ZeitDone));
|
||||
OnPropertyChanged(nameof(Hours));
|
||||
OnPropertyChanged(nameof(Title));
|
||||
OnPropertyChanged(nameof(ZeitTotalDaily));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user