Skip to content

Conversation

@d-lan1
Copy link

@d-lan1 d-lan1 commented Jan 3, 2020

}

return body.ToString();
var dailyEmail = new DailyEmail() { Items = items.ToList() };
Copy link
Contributor

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.

Copy link
Contributor

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)));
Copy link
Contributor

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?

ediblecode and others added 4 commits January 10, 2020 10:52
Use JSONLD file to look up the key for the evidence type
when we're exporting items via the single API endpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants