Namespaceanpassungen
This commit is contained in:
@@ -6,7 +6,7 @@ using Microsoft.Maui.LifecycleEvents;
|
|||||||
using ZXing.Net.Maui.Controls;
|
using ZXing.Net.Maui.Controls;
|
||||||
|
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden {
|
namespace Jugenddienst_Stunden;
|
||||||
public static class MauiProgram {
|
public static class MauiProgram {
|
||||||
public static MauiApp CreateMauiApp() {
|
public static MauiApp CreateMauiApp() {
|
||||||
var builder = MauiApp.CreateBuilder();
|
var builder = MauiApp.CreateBuilder();
|
||||||
@@ -29,4 +29,3 @@ namespace Jugenddienst_Stunden {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,17 +1,12 @@
|
|||||||
using System;
|
using System.Diagnostics;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Jugenddienst_Stunden.Types;
|
using Jugenddienst_Stunden.Types;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using ZXing.QrCode.Internal;
|
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Models {
|
|
||||||
|
namespace Jugenddienst_Stunden.Models;
|
||||||
|
|
||||||
class Auth {
|
class Auth {
|
||||||
|
|
||||||
|
|
||||||
public static async Task<string> GetApiDataWithAuthAsync(string url, string token) {
|
public static async Task<string> GetApiDataWithAuthAsync(string url, string token) {
|
||||||
// Erstellen eines HttpClient-Objekts
|
// Erstellen eines HttpClient-Objekts
|
||||||
using (HttpClient client = new HttpClient() { Timeout = TimeSpan.FromSeconds(15) }) {
|
using (HttpClient client = new HttpClient() { Timeout = TimeSpan.FromSeconds(15) }) {
|
||||||
@@ -22,10 +17,6 @@ namespace Jugenddienst_Stunden.Models {
|
|||||||
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token);
|
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token);
|
||||||
|
|
||||||
|
|
||||||
//Beim Debugging im Lokalen Netz mit meinem Smartphone kommt es hier zu
|
|
||||||
//system.net.webexception nachricht = socket closed
|
|
||||||
//Grund: Falscher DNS-Server liefert falsche Server-IP
|
|
||||||
|
|
||||||
// Senden der Anfrage und Abrufen der Antwort
|
// Senden der Anfrage und Abrufen der Antwort
|
||||||
using (HttpResponseMessage HttpResponseMessage = await client.GetAsync(url).ConfigureAwait(false)) {
|
using (HttpResponseMessage HttpResponseMessage = await client.GetAsync(url).ConfigureAwait(false)) {
|
||||||
// Überprüfen, ob die Anfrage erfolgreich war
|
// Überprüfen, ob die Anfrage erfolgreich war
|
||||||
@@ -88,4 +79,3 @@ namespace Jugenddienst_Stunden.Models {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Models {
|
namespace Jugenddienst_Stunden.Models;
|
||||||
internal class Note {
|
internal class Note {
|
||||||
public string Filename { get; set; }
|
public string Filename { get; set; }
|
||||||
public string Text { get; set; }
|
public string Text { get; set; }
|
||||||
@@ -53,4 +53,3 @@ File.WriteAllText(System.IO.Path.Combine(FileSystem.AppDataDirectory, Filename),
|
|||||||
Text = "";
|
Text = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using Jugenddienst_Stunden.ViewModels;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Models {
|
namespace Jugenddienst_Stunden.Models;
|
||||||
public class Operator : ObservableObject {
|
public class Operator : ObservableObject {
|
||||||
public string id;
|
public string id;
|
||||||
public string name;
|
public string name;
|
||||||
@@ -50,4 +50,3 @@ namespace Jugenddienst_Stunden.Models {
|
|||||||
return OperatorVar;
|
return OperatorVar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,43 +1,36 @@
|
|||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Microsoft.Maui.Networking;
|
|
||||||
using Microsoft.Maui.Controls;
|
|
||||||
using System;
|
|
||||||
using System.Text;
|
|
||||||
using System.Text.Json;
|
|
||||||
using Jugenddienst_Stunden.Types;
|
using Jugenddienst_Stunden.Types;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
namespace Jugenddienst_Stunden.Models;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Models {
|
|
||||||
internal class Stunde : ObservableObject {
|
internal class Stunde : ObservableObject {
|
||||||
|
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
|
|
||||||
//Default-Werte zum Testen
|
//Default-Werte zum Testen
|
||||||
|
public static string apiKey = Preferences.Default.Get("apiKey", "M3xraUdoSktrdGowaUZoaStJbDJLWmIyTFhYeDh8aHR0cDovL2hvdXJzLmRhdW5pLm1pbmUubnU6ODEvYXBwYXBp");
|
||||||
//Katharina
|
|
||||||
//public static string apiKey = Preferences.Default.Get("apiKey", "MTAyfEJZZnB1L3VwcnhoVms0dDlLZENPZWtUVy85b3xodHRwOi8vaG91cnMuZGF1bmkubWluZS5udTo4MS9hcHBhcGk=");
|
|
||||||
//public static string name = Preferences.Default.Get("name", "Katharina");
|
|
||||||
//public static string surname = Preferences.Default.Get("surname", "Weger");
|
|
||||||
|
|
||||||
//Christine Feichter
|
|
||||||
public static string apiKey = Preferences.Default.Get("apiKey", "");
|
|
||||||
public static int EmployeeId = Preferences.Default.Get("employeeId", 3);
|
public static int EmployeeId = Preferences.Default.Get("employeeId", 3);
|
||||||
public static string name = Preferences.Default.Get("name", "Vorname");
|
public static string name = Preferences.Default.Get("name", "Vorname");
|
||||||
public static string surname = Preferences.Default.Get("surname", "Nachname");
|
public static string surname = Preferences.Default.Get("surname", "Nachname");
|
||||||
public static string apiUrl = Preferences.Default.Get("apiUrl", "https://");
|
public static string apiUrl = Preferences.Default.Get("apiUrl", "http://hours.dauni.mine.nu:81/appapi");
|
||||||
|
|
||||||
//Damian
|
|
||||||
//public static string apiKey = Preferences.Default.Get("apiKey", "MTU0fGpkQUNYTGkvcjMvVk4rNkMyK0dDQkJmMkFwVXxodHRwOi8vaG91cnMuZGF1bmkubWluZS5udTo4MS9hcHBhcGk=");
|
|
||||||
|
|
||||||
//private static readonly string requestUrl = $"{BaseAddress}/appapi?hours";
|
|
||||||
|
|
||||||
//public static string apiKey = "Mnx6amdpUkFCdWMvc0lmZ3dWeXRVSWx3VGRDRDh8aHR0cDovL2hvdXJzLmRhdW5pLm1pbmUubnU6ODEvYXBwYXBp"; //Daniel Pichler
|
|
||||||
//public static string apiKey = "M3xraUdoSktrdGowaUZoaStJbDJLWmIyTFhYeDh8aHR0cDovL2hvdXJzLmRhdW5pLm1pbmUubnU6ODEvYXBwYXBp"; //Le Mair
|
|
||||||
|
|
||||||
|
|
||||||
public static async Task<Hours> LoadData() {
|
public static async Task<Hours> LoadData() {
|
||||||
|
Preferences.Default.Set("apiKey", "NXw5NDdCcEdLMVNDZTRENmphWG02MjlyeFFDenN8aHR0cDovL2hvdXJzLmRhdW5pLm1pbmUubnU6ODEvYXBwYXBp");
|
||||||
|
Preferences.Default.Set("name", "Johannes");
|
||||||
|
Preferences.Default.Set("surname", "Fink");
|
||||||
|
Preferences.Default.Set("EmployeeId", 5);
|
||||||
|
Preferences.Default.Set("apiUrl", "http://hours.dauni.mine.nu:81/appapi");
|
||||||
|
|
||||||
|
apiKey = Preferences.Default.Get("apiKey", "NXw5NDdCcEdLMVNDZTRENmphWG02MjlyeFFDenN8aHR0cDovL2hvdXJzLmRhdW5pLm1pbmUubnU6ODEvYXBwYXBp");
|
||||||
|
EmployeeId = Preferences.Default.Get("employeeId", 5);
|
||||||
|
name = Preferences.Default.Get("name", "Johannes");
|
||||||
|
surname = Preferences.Default.Get("surname", "Fink");
|
||||||
|
apiUrl = Preferences.Default.Get("apiUrl", "http://hours.dauni.mine.nu:81/appapi");
|
||||||
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(apiKey)) {
|
if (string.IsNullOrEmpty(apiKey)) {
|
||||||
throw new Exception("Kein APIKEY, bitte zuerst Login durchführen");
|
throw new Exception("Kein APIKEY, bitte zuerst Login durchführen");
|
||||||
}
|
}
|
||||||
@@ -67,9 +60,13 @@ namespace Jugenddienst_Stunden.Models {
|
|||||||
return hours;
|
return hours;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Basisdaten: Mitarbeiterdaten, Projekte, Gemeinden, Freistellungen.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="Exception"></exception>
|
||||||
public static async Task<Hours> LoadBasicData() {
|
public static async Task<Hours> LoadBasicData() {
|
||||||
|
|
||||||
|
|
||||||
Hours hours = new Hours();
|
Hours hours = new Hours();
|
||||||
|
|
||||||
if (Connectivity.Current.NetworkAccess == NetworkAccess.None) {
|
if (Connectivity.Current.NetworkAccess == NetworkAccess.None) {
|
||||||
@@ -94,6 +91,13 @@ namespace Jugenddienst_Stunden.Models {
|
|||||||
return hours;
|
return hours;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Zeiten eines Tages holen
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="date"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="Exception"></exception>
|
||||||
public static async Task<List<DayTime>> LoadDay(DateTime date) {
|
public static async Task<List<DayTime>> LoadDay(DateTime date) {
|
||||||
if (string.IsNullOrEmpty(apiKey)) {
|
if (string.IsNullOrEmpty(apiKey)) {
|
||||||
throw new Exception("Kein APIKEY, bitte zuerst Login durchführen");
|
throw new Exception("Kein APIKEY, bitte zuerst Login durchführen");
|
||||||
@@ -126,6 +130,11 @@ namespace Jugenddienst_Stunden.Models {
|
|||||||
return daytimes;
|
return daytimes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Einzelnen Stundeneintrag holen
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public static async Task<DayTime> LoadEntry(int id) {
|
public static async Task<DayTime> LoadEntry(int id) {
|
||||||
|
|
||||||
var tokendata = new TokenData(apiKey);
|
var tokendata = new TokenData(apiKey);
|
||||||
@@ -139,6 +148,7 @@ namespace Jugenddienst_Stunden.Models {
|
|||||||
return hours;
|
return hours;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static Stunde Load(string filename) {
|
public static Stunde Load(string filename) {
|
||||||
filename = System.IO.Path.Combine(FileSystem.AppDataDirectory, filename);
|
filename = System.IO.Path.Combine(FileSystem.AppDataDirectory, filename);
|
||||||
|
|
||||||
@@ -153,6 +163,11 @@ namespace Jugenddienst_Stunden.Models {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Eintrag speichern
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="stunde"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public static async Task<DayTime> SaveEntry(DayTime stunde) { //, string begin, string end, string freistellung, string bemerkung) {
|
public static async Task<DayTime> SaveEntry(DayTime stunde) { //, string begin, string end, string freistellung, string bemerkung) {
|
||||||
|
|
||||||
var tokendata = new TokenData(apiKey);
|
var tokendata = new TokenData(apiKey);
|
||||||
@@ -164,6 +179,11 @@ namespace Jugenddienst_Stunden.Models {
|
|||||||
return stunde;
|
return stunde;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Eintrag löschen
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="stunde"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public static async Task<DayTime> DeleteEntry(DayTime stunde) { //, string begin, string end, string freistellung, string bemerkung) {
|
public static async Task<DayTime> DeleteEntry(DayTime stunde) { //, string begin, string end, string freistellung, string bemerkung) {
|
||||||
|
|
||||||
var tokendata = new TokenData(apiKey);
|
var tokendata = new TokenData(apiKey);
|
||||||
@@ -171,5 +191,6 @@ namespace Jugenddienst_Stunden.Models {
|
|||||||
|
|
||||||
return stunde;
|
return stunde;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Models {
|
namespace Jugenddienst_Stunden.Models;
|
||||||
class TokenData {
|
class TokenData {
|
||||||
public string token { get; set; }
|
public string token { get; set; }
|
||||||
public string apiKey { get; set; }
|
public string apiKey { get; set; }
|
||||||
@@ -20,4 +20,3 @@ namespace Jugenddienst_Stunden.Models {
|
|||||||
this.apiKey = apiKey;
|
this.apiKey = apiKey;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Types {
|
namespace Jugenddienst_Stunden.Types;
|
||||||
public class Base {
|
public class Base {
|
||||||
public Collection<Projekt> Projekte { get; set; }
|
public Collection<Projekt> Projekte { get; set; }
|
||||||
public Collection<Gemeinde> Gemeinden { get; set; }
|
public Collection<Gemeinde> Gemeinden { get; set; }
|
||||||
@@ -16,4 +16,3 @@ namespace Jugenddienst_Stunden.Types {
|
|||||||
public List<DayTime> daytime { get; set; }
|
public List<DayTime> daytime { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using Jugenddienst_Stunden.Models;
|
using Jugenddienst_Stunden.Models;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Types {
|
namespace Jugenddienst_Stunden.Types;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a day time entry for an employee.
|
/// Represents a day time entry for an employee.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -39,4 +39,3 @@ namespace Jugenddienst_Stunden.Types {
|
|||||||
|
|
||||||
public Freistellung FreistellungAktiv { get; set; }
|
public Freistellung FreistellungAktiv { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,9 +4,8 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Types {
|
namespace Jugenddienst_Stunden.Types;
|
||||||
public class Freistellung {
|
public class Freistellung {
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Types
|
namespace Jugenddienst_Stunden.Types;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Repräsentiert eine Gemeinde mit einer eindeutigen Id und einem Namen.
|
/// Repräsentiert eine Gemeinde mit einer eindeutigen Id und einem Namen.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -20,4 +20,3 @@ namespace Jugenddienst_Stunden.Types
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
|
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using Jugenddienst_Stunden.Models;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Types
|
namespace Jugenddienst_Stunden.Types;
|
||||||
{
|
|
||||||
public class Hours : ObservableObject
|
public class Hours : ObservableObject {
|
||||||
{
|
|
||||||
public string zeit;
|
public string zeit;
|
||||||
public string nominal;
|
public string nominal;
|
||||||
//public Dictionary<DateOnly,NominalDay> nominal_day_api;
|
//public Dictionary<DateOnly,NominalDay> nominal_day_api;
|
||||||
@@ -45,4 +43,3 @@ namespace Jugenddienst_Stunden.Types
|
|||||||
public int EmployeeId { get; set; }
|
public int EmployeeId { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Models {
|
namespace Jugenddienst_Stunden.Types;
|
||||||
public class NominalDay {
|
public class NominalDay {
|
||||||
public int day_number;
|
public int day_number;
|
||||||
public int month_number;
|
public int month_number;
|
||||||
public decimal hours;
|
public decimal hours;
|
||||||
public DateOnly date;
|
public DateOnly date;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Types
|
namespace Jugenddienst_Stunden.Types;
|
||||||
{
|
|
||||||
public class NominalWeek
|
public class NominalWeek
|
||||||
{
|
{
|
||||||
public int week_number;
|
public int week_number;
|
||||||
public decimal hours;
|
public decimal hours;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Types
|
namespace Jugenddienst_Stunden.Types;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Repräsentiert ein Projekt mit einer eindeutigen ID und einem Namen.
|
/// Repräsentiert ein Projekt mit einer eindeutigen ID und einem Namen.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -20,4 +20,3 @@ namespace Jugenddienst_Stunden.Types
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Types
|
namespace Jugenddienst_Stunden.Types;
|
||||||
{
|
|
||||||
public class TimeDay
|
public class TimeDay
|
||||||
{
|
{
|
||||||
public int Day { get; set; }
|
public int Day { get; set; }
|
||||||
public decimal Hours { get; set; }
|
public decimal Hours { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Types
|
namespace Jugenddienst_Stunden.Types;
|
||||||
{
|
|
||||||
internal class Timetable
|
internal class Timetable
|
||||||
{
|
{
|
||||||
public List<TimetableEntry> timetable;
|
public List<TimetableEntry> timetable;
|
||||||
public decimal wochensumme;
|
public decimal wochensumme;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,12 +4,11 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.Types
|
namespace Jugenddienst_Stunden.Types;
|
||||||
{
|
|
||||||
internal class TimetableEntry
|
internal class TimetableEntry
|
||||||
{
|
{
|
||||||
public List<TimeOnly>? von;
|
public List<TimeOnly>? von;
|
||||||
public List<TimeOnly>? bis;
|
public List<TimeOnly>? bis;
|
||||||
public decimal summe { get; set; }
|
public decimal summe { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,17 +4,16 @@ using Microsoft.Maui.Dispatching;
|
|||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
//using BarcodeScanning;
|
//using BarcodeScanning;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.ViewModels {
|
namespace Jugenddienst_Stunden.ViewModels;
|
||||||
public class LoginViewModel {
|
public class LoginViewModel {
|
||||||
public string AppTitle => AppInfo.Name;
|
public string AppTitle => AppInfo.Name;
|
||||||
public string Version => AppInfo.VersionString;
|
public string Version => AppInfo.VersionString;
|
||||||
|
|
||||||
public string Message => "Scanne den QR-Code von deinem Benutzerprofil auf der Stundenseite.";
|
public string Message => "Scanne den QR-Code von deinem Benutzerprofil auf der Stundenseite.";
|
||||||
|
|
||||||
public string Server { get; set; } = "Server: " + Preferences.Default.Get("apiUrl", "https://").Replace("/appapi","");
|
public string Server { get; set; } = "Server: " + Preferences.Default.Get("apiUrl","").Replace("/appapi","").Replace("https://","").Replace("http://","");
|
||||||
|
|
||||||
public string Title { get; set; } = Preferences.Default.Get("name", "") + " " + Preferences.Default.Get("surname", "");
|
public string Title { get; set; } = Preferences.Default.Get("name", "") + " " + Preferences.Default.Get("surname", "");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.ViewModels {
|
namespace Jugenddienst_Stunden.ViewModels;
|
||||||
internal class NoteViewModel : ObservableObject, IQueryAttributable {
|
internal class NoteViewModel : ObservableObject, IQueryAttributable {
|
||||||
private Models.Note _note;
|
private Models.Note _note;
|
||||||
public string Text {
|
public string Text {
|
||||||
@@ -62,4 +62,3 @@ namespace Jugenddienst_Stunden.ViewModels {
|
|||||||
OnPropertyChanged(nameof(Date));
|
OnPropertyChanged(nameof(Date));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.ViewModels {
|
namespace Jugenddienst_Stunden.ViewModels;
|
||||||
internal class StundeViewModel : ObservableObject, IQueryAttributable {
|
internal class StundeViewModel : ObservableObject, IQueryAttributable {
|
||||||
|
|
||||||
public int id { get; set; }
|
public int id { get; set; }
|
||||||
@@ -164,4 +164,3 @@ namespace Jugenddienst_Stunden.ViewModels {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ using System.Globalization;
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
||||||
namespace Jugenddienst_Stunden.ViewModels {
|
namespace Jugenddienst_Stunden.ViewModels;
|
||||||
internal class StundenViewModel : ObservableObject, IQueryAttributable {
|
internal class StundenViewModel : ObservableObject, IQueryAttributable {
|
||||||
public string Name => AppInfo.Name;
|
public string Name => AppInfo.Name;
|
||||||
public string Surname => AppInfo.VersionString;
|
public string Surname => AppInfo.VersionString;
|
||||||
@@ -206,4 +206,3 @@ namespace Jugenddienst_Stunden.ViewModels {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user