Skip to content

Commit f47eadc

Browse files
author
dylan
committed
MAS-121 Add merge tags to daily email
1 parent 6adbe19 commit f47eadc

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

lambda/MAS/Models/DailyEmail.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,18 @@ public string HTML
2727

2828
foreach (var group in GroupedItems)
2929
{
30-
var evidenceType = group.Key;
31-
30+
string specInEvidenceType = String.Join(',', group.SelectMany(x => x.Speciality.Select(y => y.Title)));
31+
body.Append("*|INTERESTED:Daily specialities of interest:" + specInEvidenceType + "|*");
3232
body.Append("<div class='evidenceType'>");
33+
34+
var evidenceType = group.Key;
3335
body.Append("<strong>" + evidenceType + "</strong>");
3436

35-
foreach(var item in group)
37+
foreach (var item in group)
3638
{
39+
string itemSpecList = String.Join(',', item.Speciality.Select(x => x.Title));
40+
body.Append("*|INTERESTED:Daily specialities of interest:" + itemSpecList + "|*");
41+
3742
body.Append("<div class='item'>");
3843
body.Append(item.Title);
3944
body.Append("<br>");
@@ -45,9 +50,12 @@ public string HTML
4550
body.Append("<br>");
4651
body.Append("<a href='https://www.medicinesresources.nhs.uk/" + @item.Slug + "'>SPS Comment</a>");
4752
body.Append("</div>");
53+
54+
body.Append("*|END:INTERESTED|*");
4855
}
4956

5057
body.Append("</div>");
58+
body.Append("*|END:INTERESTED|*");
5159
}
5260

5361
return body.ToString();

0 commit comments

Comments
 (0)