Skip to content

Commit

Permalink
(#126) udpate the email subject factory for the report cancelled
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintAngeLs committed Jun 1, 2024
1 parent 2f0c96f commit 66fba2e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class EmailSubjectFactory
{ NotificationEventType.ReportResolved, new ReportResolvedSubject() },
{ NotificationEventType.ReportReviewStarted, new ReportReviewStartedSubject() },
{ NotificationEventType.NewEventInvitation, new NewEventInvitationSubject() },
{ NotificationEventType.ReportCancelled, new ReportCancelledSubject() },
{ NotificationEventType.Other, new OtherSubject() }
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public enum NotificationEventType
ReportRejected,
ReportResolved,
ReportReviewStarted,
ReportCancelled,
NewEventInvitation,
Other
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,11 @@ public class NewEventInvitationSubject : IEmailSubjectStrategy
public string GenerateSubject(string details) => "You're invited to a new event!";
}

public class ReportCancelledSubject : IEmailSubjectStrategy
{
public string GenerateSubject(string details)
{
return $"A report has been cancelled: {details}";
}
}
}

0 comments on commit 66fba2e

Please sign in to comment.