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