chore(pdf): add pdflatex depency; also merge minor stuff
This commit is contained in:
parent
34f193e9ad
commit
318c403b34
@ -23,6 +23,7 @@ let
|
|||||||
prev.dockerTools.binSh findutils coreutils
|
prev.dockerTools.binSh findutils coreutils
|
||||||
cups # needed for interface with print center
|
cups # needed for interface with print center
|
||||||
# texlive.combined.scheme-medium # Causes container to be too large! However, might be needed by the pandoc library to produce PDFs, but nix ought to include the necessary parts already
|
# texlive.combined.scheme-medium # Causes container to be too large! However, might be needed by the pandoc library to produce PDFs, but nix ought to include the necessary parts already
|
||||||
|
texlive.combined.scheme-basic # for PDFLaTeX for pandoc PDF creation
|
||||||
# pandoc # just for manual testing within the pod, remove for production, since we use the library instead!
|
# pandoc # just for manual testing within the pod, remove for production, since we use the library instead!
|
||||||
curl wget netcat # just for manual testing within the pod, remove for production!
|
curl wget netcat # just for manual testing within the pod, remove for production!
|
||||||
openldap # just for manual testing within the pod, remove for production!
|
openldap # just for manual testing within the pod, remove for production!
|
||||||
|
|||||||
@ -35,19 +35,31 @@ dispatchNotificationQualificationExpiry nQualification _nExpiry jRecipient = use
|
|||||||
addHtmlMarkdownAlternatives $(ihamletFile "templates/mail/qualificationExpiry.hamlet")
|
addHtmlMarkdownAlternatives $(ihamletFile "templates/mail/qualificationExpiry.hamlet")
|
||||||
|
|
||||||
|
|
||||||
|
checkEmailOk :: a -> Bool
|
||||||
|
checkEmailOk = const True -- TODO
|
||||||
|
|
||||||
|
|
||||||
dispatchNotificationQualificationRenewal :: QualificationId -> UserId -> Handler ()
|
dispatchNotificationQualificationRenewal :: QualificationId -> UserId -> Handler ()
|
||||||
dispatchNotificationQualificationRenewal nQualification jRecipient = userMailT jRecipient $ do
|
dispatchNotificationQualificationRenewal nQualification jRecipient = do
|
||||||
(User{..}, Qualification{..}, Entity _ QualificationUser{..}) <- liftHandler . runDB $ (,,)
|
(User{..}, Qualification{..}, Entity _ QualificationUser{..}) <- runDB $ (,,)
|
||||||
<$> getJust jRecipient
|
<$> getJust jRecipient
|
||||||
<*> getJust nQualification
|
<*> getJust nQualification
|
||||||
<*> getJustBy (UniqueQualificationUser nQualification jRecipient)
|
<*> getJustBy (UniqueQualificationUser nQualification jRecipient)
|
||||||
|
|
||||||
let qname = CI.original qualificationName
|
let qname = CI.original qualificationName
|
||||||
replaceMailHeader "Auto-Submitted" $ Just "auto-generated"
|
_content = $(i18nWidgetFile "qualification/renewal")
|
||||||
setSubjectI $ MsgMailSubjectQualificationRenewal qname
|
if | checkEmailOk userEmail -> userMailT jRecipient $ do
|
||||||
|
|
||||||
|
replaceMailHeader "Auto-Submitted" $ Just "auto-generated"
|
||||||
|
setSubjectI $ MsgMailSubjectQualificationRenewal qname
|
||||||
|
|
||||||
|
editNotifications <- mkEditNotifications jRecipient -- TODO: add to hamlet file again
|
||||||
|
-- addHtmlMarkdownAlternatives $(i18nWidgetFile "qualification/renewal")
|
||||||
|
-- TODO: this is just a dummy to continue while i18nHamletFile usage is unclear
|
||||||
|
addHtmlMarkdownAlternatives $(ihamletFile "templates/mail/qualificationRenewal.hamlet")
|
||||||
|
|
||||||
|
| otherwise -> do
|
||||||
|
let _letterHead = error "TODO"
|
||||||
|
-- makePDF "pdflatex" [] writer woptions pandoc
|
||||||
|
error "TODO"
|
||||||
|
|
||||||
editNotifications <- mkEditNotifications jRecipient -- TODO: add to hamlet file again
|
|
||||||
--addHtmlMarkdownAlternatives $(i18nHamletFile "qualification/renewal")
|
|
||||||
-- TODO: this is just a dummy to continue while i18nHamletFile usage is unclear
|
|
||||||
addHtmlMarkdownAlternatives $(ihamletFile "templates/mail/qualificationRenewal.hamlet")
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user