From 7edb7a9760a486cd4aa0db309d8bc13c8c47c394 Mon Sep 17 00:00:00 2001 From: Pere Lev Date: Thu, 2 Nov 2023 23:14:29 +0200 Subject: [PATCH] Fix some little bugs in component implementation --- src/Vervis/Data/Actor.hs | 1 + src/Vervis/Handler/Deck.hs | 8 ++++---- templates/deck/projects.hamlet | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Vervis/Data/Actor.hs b/src/Vervis/Data/Actor.hs index b3fb7e5..ad69f3f 100644 --- a/src/Vervis/Data/Actor.hs +++ b/src/Vervis/Data/Actor.hs @@ -101,6 +101,7 @@ parseLocalActivityURI' luAct = do parseOutboxItemRoute (RepoOutboxItemR r i) = Just (LocalActorRepo r, i) parseOutboxItemRoute (DeckOutboxItemR d i) = Just (LocalActorDeck d, i) parseOutboxItemRoute (LoomOutboxItemR l i) = Just (LocalActorLoom l, i) + parseOutboxItemRoute (ProjectOutboxItemR r i) = Just (LocalActorProject r, i) parseOutboxItemRoute _ = Nothing -- | If the given URI is remote, return as is. If the URI is local, verify that diff --git a/src/Vervis/Handler/Deck.hs b/src/Vervis/Handler/Deck.hs index 47326ec..fa8bd14 100644 --- a/src/Vervis/Handler/Deck.hs +++ b/src/Vervis/Handler/Deck.hs @@ -538,11 +538,11 @@ getDeckProjectsR deckHash = do deck <- get404 deckID actor <- getJust $ deckActor deck stems <- - E.select $ E.from $ \ (ident `E.InnerJoin` stem `E.InnerJoin` accept `E.LeftOuterJoin` deleg `E.LeftOuterJoin` gestl `E.LeftOuterJoin` gestr) -> do + E.select $ E.from $ \ (ident `E.InnerJoin` stem `E.LeftOuterJoin` accept `E.LeftOuterJoin` deleg `E.LeftOuterJoin` gestl `E.LeftOuterJoin` gestr) -> do E.on $ E.just (stem E.^. StemId) E.==. gestr E.?. StemComponentGestureRemoteStem E.on $ E.just (stem E.^. StemId) E.==. gestl E.?. StemComponentGestureLocalStem - E.on $ E.just (accept E.^. StemComponentAcceptId) E.==. deleg E.?. StemDelegateLocalStem - E.on $ stem E.^. StemId E.==. accept E.^. StemComponentAcceptStem + E.on $ accept E.?. StemComponentAcceptId E.==. deleg E.?. StemDelegateLocalStem + E.on $ E.just (stem E.^. StemId) E.==. accept E.?. StemComponentAcceptStem E.on $ ident E.^. StemIdentDeckStem E.==. stem E.^. StemId E.where_ $ ident E.^. StemIdentDeckDeck E.==. E.val deckID return (stem, deleg, gestl, gestr) @@ -624,7 +624,7 @@ postDeckApproveCompR deckHash stemHash = do Left e -> do setMessage $ toHtml e Right removeID -> do - setMessage "Remove sent" + setMessage "Accept sent" redirect $ DeckProjectsR deckHash diff --git a/templates/deck/projects.hamlet b/templates/deck/projects.hamlet index 9e8b1ed..24946f5 100644 --- a/templates/deck/projects.hamlet +++ b/templates/deck/projects.hamlet @@ -14,7 +14,7 @@ $# . ^{deckNavW (Entity deckID deck) actor} -

Collaborators +

Projects