-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniel Haarhoff
committed
Nov 16, 2024
1 parent
b5092e6
commit 22fc9b0
Showing
1 changed file
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,14 +5,28 @@ type ViewModel = { | |
}; | ||
|
||
const infoSystemsGroupEmailAddress = safe('[email protected]'); | ||
const mailSubject = encodeURIComponent('ISSUE with member records'); | ||
const body = (memberNumber: ViewModel['memberNumber']) => | ||
encodeURIComponent(`Hi, | ||
My member number is ${memberNumber}. | ||
I have the following issue with my records: | ||
... | ||
`); | ||
const mailtoLink = (memberNumber: ViewModel['memberNumber']) => | ||
safe( | ||
`mailto:${infoSystemsGroupEmailAddress}?subject=${mailSubject}&body=${body(memberNumber)}` | ||
); | ||
|
||
export const render = (viewModel: ViewModel) => html` | ||
<div class="stack"> | ||
<h1>Raise an issue</h1> | ||
<h2>If your records are wrong</h2> | ||
<p> | ||
Send the app and records team an email: | ||
<a href="mailto:${infoSystemsGroupEmailAddress}" | ||
<a href="${mailtoLink(viewModel.memberNumber)}" | ||
>${infoSystemsGroupEmailAddress}</a | ||
> | ||
</p> | ||
|