1
0
Fork 0
mirror of https://code.naskya.net/repos/ndqEd synced 2025-01-10 20:26:46 +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 :: Text -> Text -> Handler Html
getTicketsR shar proj = do getTicketsR shar proj = do
rows <- runDB $ select $ from $ \ (ticket, person, sharer) -> do rows <- runDB $ select $ from $ \ (sharer, project, ticket) -> do
where_ $ where_ $
ticket ^. TicketCreator E.==. person ^. PersonId &&. sharer ^. SharerIdent E.==. val shar &&.
person ^. PersonIdent E.==. sharer ^. SharerId project ^. ProjectSharer E.==. sharer ^. SharerId &&.
project ^. ProjectIdent E.==. val proj &&.
ticket ^. TicketProject E.==. project ^. ProjectId
orderBy [asc $ ticket ^. TicketNumber] orderBy [asc $ ticket ^. TicketNumber]
return return
( ticket ^. TicketNumber ( ticket ^. TicketNumber
@ -68,9 +70,7 @@ getTicketsR shar proj = do
, ticket ^. TicketTitle , ticket ^. TicketTitle
, ticket ^. TicketDone , ticket ^. TicketDone
) )
defaultLayout $ do defaultLayout $(widgetFile "ticket/list")
setTitle $ toHtml $ T.intercalate " :: " [shar, proj, "Tickes"]
$(widgetFile "ticket/list")
postTicketsR :: Text -> Text -> Handler Html postTicketsR :: Text -> Text -> Handler Html
postTicketsR shar proj = do postTicketsR shar proj = do