refactor(lpr): lms link switched to https and includes pre-filled login

This commit is contained in:
Steffen Jost 2022-09-09 12:33:20 +02:00
parent 77f76fbe8d
commit 2221b30771
2 changed files with 5 additions and 3 deletions

View File

@ -66,16 +66,18 @@ dispatchNotificationQualificationRenewal nQualification jRecipient = do
expiryDate <- formatTimeUser SelFormatDate qualificationUserValidUntil $ Just entRecipient
let printJobName = "RenewalPin"
prepAddress upa = userDisplayName : (upa & html2textlines) -- TODO: use supervisor's address
prepAddress upa = userDisplayName : (upa & html2textlines) -- TODO: use supervisor's address
lmsIdent = lmsUserIdent & getLmsIdent
pdfMeta = mkMeta
[ toMeta "date" letterDate
, toMeta "lang" (selectDeEn userLanguages) -- select either German or English only, see Utils.Lang
, toMeta "login" (lmsUserIdent & getLmsIdent)
, toMeta "login" lmsIdent
, toMeta "pin" lmsUserPin
, toMeta "recipient" userDisplayName
, mbMeta "address" (prepAddress <$> userPostAddress)
, toMeta "expiry" expiryDate
, mbMeta "validduration" (show <$> qualificationValidDuration)
, toMeta "url" ("<https://drive.fraport.de/?login=" <> lmsIdent <> ">")
]
pdfRenewal pdfMeta >>= \case
Left err -> do

View File

@ -6,7 +6,6 @@ en-subject: Renewal of apron driving License
author: Fraport AG - Fahrerausbildung (AVN-AR)
phone: +49 69 690-30306
email: fahrerausbildung@fraport.de
url: <http://drive.fraport.de>
place: Frankfurt/Main
return-address:
- 60547 Frankfurt
@ -22,6 +21,7 @@ encludes:
hyperrefoptions: hidelinks
### Metadaten, welche automatisch ersetzt werden:
url: <https://drive.fraport.de>
date: 11.11.1111
expiry: 00.00.0000
lang: de-de