1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2024-12-27 17:44:52 +09:00

Fix: Was displaying all tickets instead of just projects'

This commit is contained in:
fr33domlover 2016-05-18 09:38:48 +00:00
parent 1b7cee4b78
commit 604e3ca80a

View file

@ -56,10 +56,12 @@ import Vervis.Settings (widgetFile)
getTicketsR :: Text -> Text -> Handler Html
getTicketsR shar proj = do
rows <- runDB $ select $ from $ \ (ticket, person, sharer) -> do
rows <- runDB $ select $ from $ \ (sharer, project, ticket) -> do
where_ $
ticket ^. TicketCreator E.==. person ^. PersonId &&.
person ^. PersonIdent E.==. sharer ^. SharerId
sharer ^. SharerIdent E.==. val shar &&.
project ^. ProjectSharer E.==. sharer ^. SharerId &&.
project ^. ProjectIdent E.==. val proj &&.
ticket ^. TicketProject E.==. project ^. ProjectId
orderBy [asc $ ticket ^. TicketNumber]
return
( ticket ^. TicketNumber
@ -68,9 +70,7 @@ getTicketsR shar proj = do
, ticket ^. TicketTitle
, ticket ^. TicketDone
)
defaultLayout $ do
setTitle $ toHtml $ T.intercalate " :: " [shar, proj, "Tickes"]
$(widgetFile "ticket/list")
defaultLayout $(widgetFile "ticket/list")
postTicketsR :: Text -> Text -> Handler Html
postTicketsR shar proj = do