Updated email settings
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using PostFundManagement.Application.Abstractions.Services;
|
||||
using PostFundManagement.Application.Services.Communications;
|
||||
using PostFundManagement.Domain;
|
||||
@@ -33,7 +31,6 @@ public sealed class NonCompliantProjectEventHandler(IDbContextFactory<Applicatio
|
||||
|
||||
var now = DateTime.UtcNow;
|
||||
|
||||
// Fetch active/monitored projects with programme, portfolio, and award organisations
|
||||
var projects = await context.Projects
|
||||
.AsNoTracking()
|
||||
.Include(p => p.Programme)
|
||||
@@ -167,14 +164,8 @@ public sealed class NonCompliantProjectEventHandler(IDbContextFactory<Applicatio
|
||||
messageBody = messageBody.Replace("[ConsoleUrl]", "https://console.ifri.khongisa.co.za");
|
||||
messageBody = messageBody.Replace("[Year]", now.Year.ToString());
|
||||
|
||||
var notificationRequest = new CreateNotificationRequest(
|
||||
organisation.Id,
|
||||
recipientId,
|
||||
NotificationPlatform.Email,
|
||||
$"[Audit Notice] Project Non-Compliance: {project.Name}",
|
||||
recipientEmail,
|
||||
messageBody,
|
||||
NotificationStatus.Queued);
|
||||
var notificationRequest = new CreateNotificationRequest(organisation.Id, recipientId, NotificationPlatform.Email,
|
||||
$"[Audit Notice] Project Non-Compliance: {project.Name}", recipientEmail, messageBody, NotificationStatus.Queued);
|
||||
|
||||
_ = await service.CreateNotificationAsync(notificationRequest, SystemUser, cancellationToken);
|
||||
|
||||
@@ -206,14 +197,9 @@ public sealed class NonCompliantProjectEventHandler(IDbContextFactory<Applicatio
|
||||
progMessageBody = progMessageBody.Replace("[PortalUrl]", "https://partner.ifri.khongisa.co.za");
|
||||
progMessageBody = progMessageBody.Replace("[Year]", now.Year.ToString());
|
||||
|
||||
var progNotificationRequest = new CreateNotificationRequest(
|
||||
organisation.Id,
|
||||
programmeManagerId.Value,
|
||||
NotificationPlatform.Email,
|
||||
$"[Weekly Audit Escalation] Non-Compliant Project: {project.Name} ({programme?.Name})",
|
||||
programmeManagerEmail,
|
||||
progMessageBody,
|
||||
NotificationStatus.Queued);
|
||||
var progNotificationRequest = new CreateNotificationRequest(organisation.Id, programmeManagerId.Value, NotificationPlatform.Email,
|
||||
$"[Weekly Audit Escalation] Non-Compliant Project: {project.Name} ({programme?.Name})",
|
||||
programmeManagerEmail, progMessageBody, NotificationStatus.Queued);
|
||||
|
||||
_ = await service.CreateNotificationAsync(progNotificationRequest, SystemUser, cancellationToken);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user