feat: polished admin UI styles + email channels admin CRUD
- Extract inline styles to wwwroot/css/admin.css - Bootstrap Icons for nav and buttons - Styled page headers, table, empty state, readonly fields - Email Channels admin: list, create, edit, delete - GetAllEmailChannelsQuery + handler - AdminChannelsController with full CRUD - form id + form= attribute pattern for EditorLayout footer buttons Ref: IT-628 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
+57
@@ -0,0 +1,57 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using HrynCo.NotificationService.DAL.Abstract.Providers;
|
||||
|
||||
namespace HrynCo.NotificationService.Web.Controllers.Admin.ViewModels;
|
||||
|
||||
public class EmailChannelEditViewModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
// ── Channel fields ─────────────────────────────────────────────────
|
||||
[Required]
|
||||
public string ServiceName { get; set; } = "";
|
||||
|
||||
public int Priority { get; set; } = 1;
|
||||
|
||||
public EmailChannelType EmailChannelType { get; set; } = EmailChannelType.Smtp;
|
||||
|
||||
public int? DailyLimit { get; set; }
|
||||
|
||||
public int? MonthlyLimit { get; set; }
|
||||
|
||||
[Range(1, 100)]
|
||||
public int WarnThresholdPercent { get; set; } = 90;
|
||||
|
||||
public bool IsActive { get; set; } = true;
|
||||
|
||||
// ── SMTP Settings ──────────────────────────────────────────────────
|
||||
[Required]
|
||||
public string Host { get; set; } = "";
|
||||
|
||||
[Range(1, 65535)]
|
||||
public int Port { get; set; } = 587;
|
||||
|
||||
[Required]
|
||||
public string Username { get; set; } = "";
|
||||
|
||||
[Required]
|
||||
public string Password { get; set; } = "";
|
||||
|
||||
public bool UseSsl { get; set; } = true;
|
||||
|
||||
[Required, EmailAddress]
|
||||
public string FromEmail { get; set; } = "";
|
||||
|
||||
[Required]
|
||||
public string FromName { get; set; } = "";
|
||||
|
||||
[Required]
|
||||
public string AppDisplayName { get; set; } = "";
|
||||
|
||||
[Required]
|
||||
public string AppBaseUrl { get; set; } = "";
|
||||
|
||||
// ── Computed ───────────────────────────────────────────────────────
|
||||
public bool IsNew => Id == Guid.Empty;
|
||||
public string PageTitle => IsNew ? "Create Channel" : "Edit Channel";
|
||||
}
|
||||
Reference in New Issue
Block a user