Anatolii Grynchuk
2a0a5f737d
feat: add MVC Razor admin UI for email templates
...
- GetAllEmailTemplatesQuery + handler (new GetAll use case)
- IEmailTemplateRepository.GetAllAsync + EF implementation
- AdminTemplatesController: Index, Create, Edit, Save, Delete
- EmailTemplateEditViewModel with IsNew/PageTitle helpers
- Views/_ViewStart, _ViewImports, Shared/_Layout (Bootstrap 5)
- Shared/_EditorLayout (chained layout for all edit screens)
- Views/AdminTemplates/Index (table with edit/delete actions)
- Views/AdminTemplates/Edit (card form, readonly composite key on edit)
- Program.cs: AddControllersWithViews, UseStaticFiles, MapDefaultControllerRoute
Ref: IT-634
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-05-02 02:06:08 +03:00
Anatolii Grynchuk
5cf5f888eb
feat: wire up Program.cs, DI extensions, Serilog, and appsettings
...
- ServiceCollectionExtensions in DAL.EF: AddNotificationDataAccess (DbContext, UoW, repositories)
- ServiceCollectionExtensions in Services: AddNotificationServices (MediatR + TransactionBehavior)
- Api/Program.cs: Serilog, OpenAPI, controllers, DI wiring
- Worker/Program.cs: Serilog, DI wiring
- appsettings.json: Serilog config with Console + Seq sinks, connection string
- appsettings.Development.json: Debug log level overrides
Ref: IT-628
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-05-02 00:24:54 +03:00
Anatolii Grynchuk
6dcc911fc2
refactor: rename domain types and introduce TransactionBehavior pattern
...
- Rename Template -> EmailTemplate, Provider -> EmailChannel,
ProviderSettings -> EmailChannelSettings, ProviderType -> EmailChannelType,
ProviderUsage -> EmailChannelUsage throughout all layers
- Add Undefined = 0 to EmailChannelType enum for safe default handling
- Remove SaveChangesAsync from EfRepository methods — repositories now only stage changes
- Add SaveChangesAsync to IUnitOfWork and EfUnitOfWork
- Add TransactionBehavior MediatR pipeline: wraps every handler in a transaction,
saves and commits on success, rolls back on exception
- Add MediatR package reference to Services project
Ref: IT-628
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-05-02 00:16:47 +03:00
Anatolii Grynchuk
7cb691db14
feat: add base entity abstractions and domain model to DAL.Abstract
...
- IEntity<TId>, Entity<TId>, Entity base classes in Entities/
- Template, TemplateVariable domain models in Templates/
- Provider, ProviderSettings, SmtpProviderSettings, ProviderUsage, ProviderType in Providers/
- ITemplateRepository, IProviderRepository, IProviderUsageRepository in Repositories/
- ProviderUsage tracks daily counts; monthly derived by summing daily records
- IEntity<TId> lives in DAL.Abstract (not DAL.EF) — boundary enforced from the start
Ref: IT-628
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-05-01 19:28:34 +03:00