mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-28 23:44:51 +09:00
Re-enable UI for removing ticket deps
This commit is contained in:
parent
1cb3812ef5
commit
c5996bd226
1 changed files with 11 additions and 8 deletions
|
@ -988,27 +988,30 @@ getTicketDepNewR shr prj tkhid = do
|
||||||
defaultLayout $(widgetFile "ticket/dep/new")
|
defaultLayout $(widgetFile "ticket/dep/new")
|
||||||
|
|
||||||
postTicketDepOldR :: ShrIdent -> PrjIdent -> KeyHashid Ticket -> KeyHashid Ticket -> Handler Html
|
postTicketDepOldR :: ShrIdent -> PrjIdent -> KeyHashid Ticket -> KeyHashid Ticket -> Handler Html
|
||||||
postTicketDepOldR shr prj pnum cnum = error "Disabled for now"
|
postTicketDepOldR shr prj pnum cnum = do
|
||||||
{-
|
|
||||||
mmethod <- lookupPostParam "_method"
|
mmethod <- lookupPostParam "_method"
|
||||||
case mmethod of
|
case mmethod of
|
||||||
Just "DELETE" -> deleteTicketDepOldR shr prj pnum cnum
|
Just "DELETE" -> deleteTicketDepOldR shr prj pnum cnum
|
||||||
_ -> notFound
|
_ -> notFound
|
||||||
-}
|
|
||||||
|
|
||||||
deleteTicketDepOldR :: ShrIdent -> PrjIdent -> KeyHashid Ticket -> KeyHashid Ticket -> Handler Html
|
deleteTicketDepOldR :: ShrIdent -> PrjIdent -> KeyHashid Ticket -> KeyHashid Ticket -> Handler Html
|
||||||
deleteTicketDepOldR shr prj pnum cnum = error "Disabled for now"
|
deleteTicketDepOldR shr prj pnum cnum = do
|
||||||
{-
|
|
||||||
runDB $ do
|
runDB $ do
|
||||||
Entity sid _ <- getBy404 $ UniqueSharer shr
|
Entity sid _ <- getBy404 $ UniqueSharer shr
|
||||||
Entity jid _ <- getBy404 $ UniqueProject prj sid
|
Entity jid _ <- getBy404 $ UniqueProject prj sid
|
||||||
Entity ptid _ <- getBy404 $ UniqueTicket jid pnum
|
|
||||||
Entity ctid _ <- getBy404 $ UniqueTicket jid cnum
|
ptid <- decodeKeyHashid404 pnum
|
||||||
|
pt <- get404 ptid
|
||||||
|
unless (ticketProject pt == jid) notFound
|
||||||
|
|
||||||
|
ctid <- decodeKeyHashid404 cnum
|
||||||
|
ct <- get404 ctid
|
||||||
|
unless (ticketProject ct == jid) notFound
|
||||||
|
|
||||||
Entity tdid _ <- getBy404 $ UniqueTicketDependency ptid ctid
|
Entity tdid _ <- getBy404 $ UniqueTicketDependency ptid ctid
|
||||||
delete tdid
|
delete tdid
|
||||||
setMessage "Ticket dependency removed."
|
setMessage "Ticket dependency removed."
|
||||||
redirect $ TicketDepsR shr prj pnum
|
redirect $ TicketDepsR shr prj pnum
|
||||||
-}
|
|
||||||
|
|
||||||
getTicketReverseDepsR
|
getTicketReverseDepsR
|
||||||
:: ShrIdent -> PrjIdent -> KeyHashid Ticket -> Handler TypedContent
|
:: ShrIdent -> PrjIdent -> KeyHashid Ticket -> Handler TypedContent
|
||||||
|
|
Loading…
Reference in a new issue