-
Notifications
You must be signed in to change notification settings - Fork 1
MAS-121 send email with preferences V2 #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| } | ||
|
|
||
| return body.ToString(); | ||
| var dailyEmail = new DailyEmail() { Items = items.ToList() }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The email HTML generation and logic belongs in this service, hence the method name (CreateEmailBody or now CreateDailyEmailBody), it doesn't seem right to move this into a model. Also, we're doing work in #31 to have a service for async rendering a view into a string (see https://github.com/nice-digital/MAS/pull/31/files#diff-7cd77f4b3d2d846715c218e95176e069) which we'll use for creating the body of the emails, so we're not doing HTML generation inside classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I'd pause until that's merged
|
|
||
| foreach (var group in GroupedItems) | ||
| { | ||
| string specInEvidenceType = String.Join(',', group.SelectMany(x => x.Speciality.Select(y => y.Title))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need de duping?
# Conflicts: # cms/models/Item.js
Use JSONLD file to look up the key for the evidence type when we're exporting items via the single API endpoint
…om/nhsevidence/MAS into MAS-121-SendEmailWithPreferences-2
https://nicedigital.atlassian.net/browse/MAS-121