Fix deployment build
This commit is contained in:
parent
4911cdb29b
commit
143b4d6116
@ -7,7 +7,6 @@
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE OverloadedLists #-}
|
||||
|
||||
module Handler.Course where
|
||||
|
||||
@ -19,6 +18,8 @@ import qualified Data.Text as T
|
||||
import Data.Function ((&))
|
||||
-- import Yesod.Form.Bootstrap3
|
||||
|
||||
import qualified Data.Map as Map
|
||||
|
||||
import Colonnade hiding (fromMaybe,bool)
|
||||
-- import Yesod.Colonnade
|
||||
|
||||
@ -67,22 +68,23 @@ getTermCourseListR tid = do
|
||||
Nothing -> MsgCourseMembersCount num
|
||||
Just max -> MsgCourseMembersCountLimited num max
|
||||
]
|
||||
, dbtSorting = [ ( "shorthand"
|
||||
, SortColumn $ \course -> course E.^. CourseShorthand
|
||||
)
|
||||
, ( "register-from"
|
||||
, SortColumn $ \course -> course E.^. CourseRegisterFrom
|
||||
)
|
||||
, ( "register-to"
|
||||
, SortColumn $ \course -> course E.^. CourseRegisterTo
|
||||
)
|
||||
, ( "members"
|
||||
, SortColumn $ \course -> E.sub_select . E.from $ \courseParticipant -> do
|
||||
E.where_ $ courseParticipant E.^. CourseParticipantCourse E.==. course E.^. CourseId
|
||||
return (E.countRows :: E.SqlExpr (E.Value Int64))
|
||||
)
|
||||
]
|
||||
, dbtFilter = []
|
||||
, dbtSorting = Map.fromList
|
||||
[ ( "shorthand"
|
||||
, SortColumn $ \course -> course E.^. CourseShorthand
|
||||
)
|
||||
, ( "register-from"
|
||||
, SortColumn $ \course -> course E.^. CourseRegisterFrom
|
||||
)
|
||||
, ( "register-to"
|
||||
, SortColumn $ \course -> course E.^. CourseRegisterTo
|
||||
)
|
||||
, ( "members"
|
||||
, SortColumn $ \course -> E.sub_select . E.from $ \courseParticipant -> do
|
||||
E.where_ $ courseParticipant E.^. CourseParticipantCourse E.==. course E.^. CourseId
|
||||
return (E.countRows :: E.SqlExpr (E.Value Int64))
|
||||
)
|
||||
]
|
||||
, dbtFilter = mempty
|
||||
, dbtAttrs = tableDefault
|
||||
, dbtIdent = "courses" :: Text
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user