Commit 09029c54 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] warnings

parent 81bcc365
...@@ -2,17 +2,13 @@ module Gargantext.Components.Forest.Tree.Node where ...@@ -2,17 +2,13 @@ module Gargantext.Components.Forest.Tree.Node where
import Prelude (class Eq, class Show, show, (&&), (<>), (==)) import Prelude (class Eq, class Show, show, (&&), (<>), (==))
import Data.Array (foldl) import Data.Array (foldl)
import Data.Maybe (Maybe(..))
import Data.Tuple (Tuple(..))
import Gargantext.Types import Gargantext.Types
------------------------------------------------------------------------ ------------------------------------------------------------------------
------------------------------------------------------------------------ ------------------------------------------------------------------------
{- {-
-- | TODO -- | RIGHT Management
filterWithRights (show action if user can only) if user has access to node then he can do all his related actions
-} -}
------------------------------------------------------------------------ ------------------------------------------------------------------------
------------------------------------------------------------------------ ------------------------------------------------------------------------
...@@ -38,8 +34,8 @@ instance eqNodeAction :: Eq NodeAction where ...@@ -38,8 +34,8 @@ instance eqNodeAction :: Eq NodeAction where
eq Clone Clone = true eq Clone Clone = true
eq Delete Delete = true eq Delete Delete = true
eq Share Share = true eq Share Share = true
eq (Link x) (Link y) = true && (x == y) eq (Link x) (Link y) = (x == y)
eq (Add x) (Add y) = true && (x == y) eq (Add x) (Add y) = (x == y)
eq CopyFromCorpus CopyFromCorpus = true eq CopyFromCorpus CopyFromCorpus = true
eq Config Config = true eq Config Config = true
eq _ _ = false eq _ _ = false
......
module Gargantext.Components.Forest.Tree.Node.Action where module Gargantext.Components.Forest.Tree.Node.Action where
import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, jsonEmptyObject, (.:), (:=), (~>))
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Generic.Rep.Eq (genericEq)
import Data.Generic.Rep.Show (genericShow) import Data.Generic.Rep.Show (genericShow)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe)
import Data.Newtype (class Newtype)
import Effect.Aff (Aff) import Effect.Aff (Aff)
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.Components.Lang (Lang) import Gargantext.Sessions (Session)
import Gargantext.Routes (SessionRoute(..))
import Gargantext.Routes as GR
import Gargantext.Sessions (Session, get, put, post, delete)
import Gargantext.Types as GT import Gargantext.Types as GT
import Gargantext.Components.Forest.Tree.Node (NodeAction(..), glyphiconNodeAction) import Gargantext.Components.Forest.Tree.Node (NodeAction(..), glyphiconNodeAction)
...@@ -33,13 +28,13 @@ data Action = AddNode String GT.NodeType ...@@ -33,13 +28,13 @@ data Action = AddNode String GT.NodeType
instance showShow :: Show Action where instance showShow :: Show Action where
show DeleteNode = "DeleteNode" show DeleteNode = "DeleteNode"
show RefreshTree = "RefreshTree" show RefreshTree = "RefreshTree"
show (ShareNode _) = "ShareNode" show (ShareNode _ )= "ShareNode"
show (UpdateNode _) = "UpdateNode" show (UpdateNode _ )= "UpdateNode"
show (RenameNode _) = "RenameNode" show (RenameNode _ )= "RenameNode"
show (DoSearch _) = "SearchQuery" show (DoSearch _ )= "SearchQuery"
show (AddNode _ _) = "AddNode" show (AddNode _ _ )= "AddNode"
show (UploadFile _ _ _ _)= "UploadFile" show (UploadFile _ _ _ _)= "UploadFile"
----------------------------------------------------------------------- -----------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment