diff --git a/Jugenddienst Stunden/AppShell.xaml b/Jugenddienst Stunden/AppShell.xaml
index 77036a3..666f0e9 100644
--- a/Jugenddienst Stunden/AppShell.xaml
+++ b/Jugenddienst Stunden/AppShell.xaml
@@ -13,12 +13,7 @@
Icon="{OnPlatform 'icon_watch.png', iOS='icon_watch_ios.png', MacCatalyst='icon_watch_ios.png'}" />
-
-
diff --git a/Jugenddienst Stunden/ViewModels/StundeViewModel.cs b/Jugenddienst Stunden/ViewModels/StundeViewModel.cs
index 6f5438a..b99fec9 100644
--- a/Jugenddienst Stunden/ViewModels/StundeViewModel.cs
+++ b/Jugenddienst Stunden/ViewModels/StundeViewModel.cs
@@ -1,5 +1,6 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
+using Jugenddienst_Stunden.Types;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -13,6 +14,8 @@ namespace Jugenddienst_Stunden.ViewModels {
public int id { get; set; }
private Types.DayTime _stunde;
+ public DayTime Stunde { get => _stunde; }
+
public string Description {
get => _stunde.description;
set {
@@ -56,9 +59,8 @@ namespace Jugenddienst_Stunden.ViewModels {
if (query.ContainsKey("load")) {
//DateTime heute = DateTime.Now;
_stunde = await Models.Stunde.LoadEntry(Convert.ToInt32(query["load"]));
- //_stunde = await Models.Stunde.LoadData();
- //_note = Models.Note.Load(query["load"].ToString());
- //RefreshProperties();
+
+ OnPropertyChanged(nameof(Stunde));
}
}
}
diff --git a/Jugenddienst Stunden/ViewModels/StundenViewModel.cs b/Jugenddienst Stunden/ViewModels/StundenViewModel.cs
index 1819e0b..31d60de 100644
--- a/Jugenddienst Stunden/ViewModels/StundenViewModel.cs
+++ b/Jugenddienst Stunden/ViewModels/StundenViewModel.cs
@@ -25,7 +25,7 @@ namespace Jugenddienst_Stunden.ViewModels {
public ICommand LoadDataCommand { get; private set; }
public object Stunden { get; }
-
+
private List _stunde;
public List Stunde {
get => _stunde;
@@ -74,7 +74,7 @@ namespace Jugenddienst_Stunden.ViewModels {
GetDay = value;
OnPropertyChanged();
_ = LoadDay(value); // Use discard operator to explicitly ignore the returned Task
- //RefreshProperties();
+ //RefreshProperties();
OnPropertyChanged(nameof(TimeDay));
OnPropertyChanged(nameof(ShowDay));
OnPropertyChanged(nameof(DayTimes));
@@ -114,22 +114,22 @@ namespace Jugenddienst_Stunden.ViewModels {
public StundenViewModel() {
- // Options = new ObservableCollection {
- // "Gemeinde 1",
- // "Gemeinde 2",
- // "Gemeinde 3",
- // "Gemeinde 4"
- //};
- // OptionsProjekt = new ObservableCollection {
- // "Projekt 1",
- // "Projekt 2",
- // "Projekt 3"
- //};
- // OptionsFreistellung = new ObservableCollection {
- // "Urlaub",
- // "Krankheit",
- // "Elternzeit"
- //};
+ // Options = new ObservableCollection {
+ // "Gemeinde 1",
+ // "Gemeinde 2",
+ // "Gemeinde 3",
+ // "Gemeinde 4"
+ //};
+ // OptionsProjekt = new ObservableCollection {
+ // "Projekt 1",
+ // "Projekt 2",
+ // "Projekt 3"
+ //};
+ // OptionsFreistellung = new ObservableCollection {
+ // "Urlaub",
+ // "Krankheit",
+ // "Elternzeit"
+ //};
_hour = new Types.Hours();
LoadDataCommand = new AsyncRelayCommand(LoadData);
@@ -138,8 +138,10 @@ namespace Jugenddienst_Stunden.ViewModels {
}
private async Task SelectEntryAsync(DayTime entry) {
- if (entry != null)
+
+ if (entry != null && entry.id != null)
await Shell.Current.GoToAsync($"{nameof(Views.StundePage)}?load={entry.id}");
+ else AlertEvent?.Invoke(this, "Auswahl enthält keine Daten");
}
@@ -160,11 +162,11 @@ namespace Jugenddienst_Stunden.ViewModels {
try {
_hour.daytime = await Models.Stunde.LoadDay(date);
////if (_hour.zeit_total_daily_api != null) {
- ////TimeDay = _hour.zeit_total_daily_api.Where(static p => p.Day == GetDay.Day).ToList() ?? new List { new TimeDay { Day = GetDay.Day, Hours = 0 } };
- //RefreshProperties();
- OnPropertyChanged(nameof(ShowDay));
- OnPropertyChanged(nameof(TimeDay));
- OnPropertyChanged(nameof(DayTimes));
+ ////TimeDay = _hour.zeit_total_daily_api.Where(static p => p.Day == GetDay.Day).ToList() ?? new List { new TimeDay { Day = GetDay.Day, Hours = 0 } };
+ //RefreshProperties();
+ OnPropertyChanged(nameof(ShowDay));
+ OnPropertyChanged(nameof(TimeDay));
+ OnPropertyChanged(nameof(DayTimes));
////}
} catch (Exception e) {
AlertEvent?.Invoke(this, e.Message);
diff --git a/Jugenddienst Stunden/Views/AllNotesPage.xaml b/Jugenddienst Stunden/Views/AllNotesPage.xaml
index b06afa8..f38bce7 100644
--- a/Jugenddienst Stunden/Views/AllNotesPage.xaml
+++ b/Jugenddienst Stunden/Views/AllNotesPage.xaml
@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:viewModels="clr-namespace:Jugenddienst_Stunden.ViewModels"
x:Class="Jugenddienst_Stunden.Views.AllNotesPage"
- Title="Your Notes"
+ Title="Deine Notizen"
NavigatedTo="ContentPage_NavigatedTo">
@@ -14,6 +14,7 @@
+
+ HeightRequest="80" />
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Jugenddienst Stunden/Views/StundePage.xaml.cs b/Jugenddienst Stunden/Views/StundePage.xaml.cs
index f90e75d..4f575d8 100644
--- a/Jugenddienst Stunden/Views/StundePage.xaml.cs
+++ b/Jugenddienst Stunden/Views/StundePage.xaml.cs
@@ -19,7 +19,7 @@ public partial class StundePage : ContentPage
_stunde = await Models.Stunde.LoadEntry(4096);
//_stunde = new DayTime();
//_stunde.description = "asd";
- StundeDescription.Text = _stunde.description;
+ //StundeDescription.Text = _stunde.description;
}
private void GetDayTime(object sender, EventArgs e) {
diff --git a/Jugenddienst Stunden/Views/StundenPage.xaml b/Jugenddienst Stunden/Views/StundenPage.xaml
index bc31ea0..b7a0669 100644
--- a/Jugenddienst Stunden/Views/StundenPage.xaml
+++ b/Jugenddienst Stunden/Views/StundenPage.xaml
@@ -9,6 +9,10 @@
+
+
+
+