GuestLog - Moved Enums

- Enums moved to Enum folder (by type).
- ResultCode class changed to enum to ensure type safety in results.
This commit is contained in:
2026-08-25 15:18:02 +02:00
parent b18bd7caa6
commit 4f22cd4541
13 changed files with 51 additions and 45 deletions
@@ -1,9 +1,9 @@
using Microsoft.Extensions.Localization;
using MudBlazor;
using Somnia.GuestLog.Models;
using Somnia.GuestLog.Enums.Services;
using Somnia.GuestLog.Enums.UI;
using Somnia.GuestLog.Models.DTOs;
using Somnia.GuestLog.Resources;
using MessageKind = Somnia.GuestLog.Services.IUserMessageService.MessageKind;
namespace Somnia.GuestLog.Services;
@@ -59,9 +59,9 @@ public class UserMessageService(
snackbar.Add(message: msg, severity: GetSnackbarSeveryForMessageKind(kind));
}
private string GetMsgForResultCode(string resultCode)
private string GetMsgForResultCode(ResultCode resultCode)
{
return _localizer[$"resultCode.{resultCode}"];
return _localizer[$"resultCode.{Enum.GetName(resultCode)}"];
}
private static string GetFormatedMessage(string template, params object[]? parameters)