Reworking Stundenpage
Todo: Summary not showing anymore
This commit is contained in:
@@ -4,6 +4,8 @@ using System.Windows.Input;
|
||||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui.Networking;
|
||||
using ZXing.Net.Maui;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Jugenddienst_Stunden.ViewModels {
|
||||
@@ -34,16 +36,47 @@ 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 ObservableCollection<string> Options { get; }
|
||||
public ObservableCollection<string> OptionsProjekt { get; }
|
||||
private string selectedOption;
|
||||
public string SelectedOption {
|
||||
get => selectedOption;
|
||||
set {
|
||||
if (selectedOption != value) {
|
||||
selectedOption = value;
|
||||
OnPropertyChanged(nameof(SelectedOption));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public StundenViewModel() {
|
||||
|
||||
|
||||
Options = new ObservableCollection<string> {
|
||||
"Gemeinde 1",
|
||||
"Gemeinde 2",
|
||||
"Gemeinde 3"
|
||||
};
|
||||
OptionsProjekt = new ObservableCollection<string> {
|
||||
"Projekt 1",
|
||||
"Projekt 2",
|
||||
"Projekt 3"
|
||||
};
|
||||
_hour = new Models.Hours();
|
||||
LoadDataCommand = new AsyncRelayCommand(LoadData);
|
||||
|
||||
}
|
||||
|
||||
protected void OnPropertyChanged(string propertyName) {
|
||||
//PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
//public async Task LoadData() =>
|
||||
@@ -67,6 +100,6 @@ namespace Jugenddienst_Stunden.ViewModels {
|
||||
OnPropertyChanged(nameof(ZeitTotalDaily));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user