Refactor TravelMate Admin: Remove quickstart and SQL reference documents, update app settings to use JSON configuration, enhance database service error handling, and implement MVVM pattern with observable properties for messages and support requests. Update UI to display connection errors and improve navigation.

This commit is contained in:
Van Leemput Dayron
2026-01-12 19:23:57 +01:00
parent f9690045ea
commit 1c89209cfa
20 changed files with 207 additions and 1702 deletions

View File

@@ -1,16 +1,26 @@
using CommunityToolkit.Mvvm.ComponentModel;
namespace TravelMateAdmin.Models;
public class Message
public partial class Message : ObservableObject
{
public int Id { get; set; }
public string Nom { get; set; } = string.Empty;
public string Prenom { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string MessageText { get; set; } = string.Empty;
public bool Done { get; set; }
[ObservableProperty]
private bool done;
public DateTime CreatedAt { get; set; }
public string FullName => $"{Prenom} {Nom}";
public string StatusText => Done ? "Traité" : "En attente";
public string CreatedAtFormatted => CreatedAt.ToString("dd/MM/yyyy HH:mm");
partial void OnDoneChanged(bool value)
{
OnPropertyChanged(nameof(StatusText));
}
}

View File

@@ -1,6 +1,8 @@
using CommunityToolkit.Mvvm.ComponentModel;
namespace TravelMateAdmin.Models;
public class SupportRequest
public partial class SupportRequest : ObservableObject
{
public int Id { get; set; }
public string Nom { get; set; } = string.Empty;
@@ -8,10 +10,18 @@ public class SupportRequest
public string AccountEmail { get; set; } = string.Empty;
public string ContactEmail { get; set; } = string.Empty;
public string MessageText { get; set; } = string.Empty;
public bool Done { get; set; }
[ObservableProperty]
private bool done;
public DateTime CreatedAt { get; set; }
public string FullName => $"{Prenom} {Nom}";
public string StatusText => Done ? "Traité" : "En attente";
public string CreatedAtFormatted => CreatedAt.ToString("dd/MM/yyyy HH:mm");
partial void OnDoneChanged(bool value)
{
OnPropertyChanged(nameof(StatusText));
}
}