chore(lms): fix convenience link formatting in lms mails and pdf

This commit is contained in:
Steffen Jost 2022-09-15 15:42:27 +02:00
parent 17f760a522
commit 4d375e7680
3 changed files with 8 additions and 5 deletions

View File

@ -66,6 +66,7 @@ dispatchNotificationQualificationRenewal nQualification jRecipient = do
expiryDate <- formatTimeUser SelFormatDate qualificationUserValidUntil $ Just entRecipient
let printJobName = "RenewalPin"
lmsUrl = "https://drive.fraport.de"
prepAddress upa = userDisplayName : (upa & html2textlines) -- TODO: use supervisor's address
lmsIdent = lmsUserIdent & getLmsIdent
pdfMeta = mkMeta
@ -77,7 +78,8 @@ dispatchNotificationQualificationRenewal nQualification jRecipient = do
, mbMeta "address" (prepAddress <$> userPostAddress)
, toMeta "expiry" expiryDate
, mbMeta "validduration" (show <$> qualificationValidDuration)
, toMeta "url" ("[https://drive.fraport.de](https://drive.fraport.de/?login=" <> lmsIdent <> ")")
, toMeta "url-text" lmsUrl
, toMeta "url" (lmsUrl <> "/?login=" <> lmsIdent)
]
pdfRenewal pdfMeta >>= \case
Left err -> do

View File

@ -21,7 +21,8 @@ encludes:
hyperrefoptions: hidelinks
### Metadaten, welche automatisch ersetzt werden:
url: <https://drive.fraport.de>
url-text: 'https://drive.fraport.de'
url: 'https://drive.fraport.de'
date: 11.11.1111
expiry: 00.00.0000
lang: de-de
@ -66,7 +67,7 @@ Prüfling
URL
: $url$
: [$url-text$]($url$)
Sobald die Frist abgelaufen ist, muss zur Wiedererlangung des Vorfeldführerscheins
@ -93,7 +94,7 @@ Examinee
URL
: $url$
:[$url-text$]($url$)
Should your apron driving licence expire before completing this

View File

@ -27,7 +27,7 @@ $newline never
$if is _AuthPWHash userAuthentication
<p>
_{SomeMessage MsgAuthPWHashTip}
<dd>
<dl>
<dt>
_{SomeMessage MsgPWHashIdent}
<dd .email>