chore(lms): add notifications stub forgotten in previous commit
This commit is contained in:
parent
41a05edcd4
commit
d4c4a60e7c
49
src/Jobs/Handler/SendNotification/Qualification.hs
Normal file
49
src/Jobs/Handler/SendNotification/Qualification.hs
Normal file
@ -0,0 +1,49 @@
|
||||
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-} -- ihamletFile discards do results
|
||||
|
||||
module Jobs.Handler.SendNotification.Qualification
|
||||
( dispatchNotificationQualificationExpiry
|
||||
, dispatchNotificationQualificationRenewal
|
||||
) where
|
||||
|
||||
import Import
|
||||
|
||||
{-
|
||||
import Handler.Utils
|
||||
import Jobs.Handler.SendNotification.Utils
|
||||
|
||||
import Handler.Info (FAQItem(..))
|
||||
|
||||
import Text.Hamlet
|
||||
|
||||
import qualified Database.Esqueleto.Experimental as E
|
||||
import qualified Database.Esqueleto.Utils as E
|
||||
-}
|
||||
|
||||
dispatchNotificationQualificationExpiry :: QualificationId -> Day -> UserId -> Handler ()
|
||||
dispatchNotificationQualificationExpiry _nQualification _nExpiry _jRecipient =
|
||||
error "dispatchNotificationQualificationExpiry not yet implemented TODO"
|
||||
{- userMailT jRecipient $ do
|
||||
(Allocation{..}, Course{..}, hasApplied) <- liftHandler . runDB $ (,,)
|
||||
<$> getJust nAllocation
|
||||
<*> getJust nCourse
|
||||
<*> exists [CourseApplicationAllocation ==. Just nAllocation, CourseApplicationUser ==. jRecipient]
|
||||
|
||||
replaceMailHeader "Auto-Submitted" $ Just "auto-generated"
|
||||
setSubjectI $ MsgMailSubjectAllocationNewCourse allocationName
|
||||
editNotifications <- mkEditNotifications jRecipient
|
||||
|
||||
cID <- encrypt nCourse
|
||||
mayApply <- lift $ orM
|
||||
[ is _Authorized <$> evalAccessFor (Just jRecipient) (AllocationR allocationTerm allocationSchool allocationShorthand ARegisterR) True
|
||||
, is _Authorized <$> evalAccessFor (Just jRecipient) (AllocationR allocationTerm allocationSchool allocationShorthand $ AApplyR cID) True
|
||||
]
|
||||
|
||||
allocUrl <- toTextUrl $ AllocationR allocationTerm allocationSchool allocationShorthand AShowR :#: cID
|
||||
|
||||
addHtmlMarkdownAlternatives $(ihamletFile "templates/mail/allocationNewCourse.hamlet")
|
||||
-}
|
||||
|
||||
dispatchNotificationQualificationRenewal :: QualificationId -> Day -> UserId -> Handler ()
|
||||
dispatchNotificationQualificationRenewal _nQualification _nExpiry _jRecipient =
|
||||
error "dispatchNotificationQualificationRenewal not yet implemented TODO"
|
||||
-- userMailT jRecipient $ do
|
||||
Loading…
Reference in New Issue
Block a user