Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
63b43fbf
Commit
63b43fbf
authored
Jun 17, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Types] fix for backend (WIP)
parent
30d727dd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
Update.purs
...Gargantext/Components/Forest/Tree/Node/Action/Update.purs
+8
-8
Types.purs
...text/Components/Forest/Tree/Node/Action/Update/Types.purs
+4
-4
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Update.purs
View file @
63b43fbf
...
@@ -46,32 +46,32 @@ update :: NodeType
...
@@ -46,32 +46,32 @@ update :: NodeType
-> (Action -> Aff Unit)
-> (Action -> Aff Unit)
-> R.Hooks R.Element
-> R.Hooks R.Element
update NodeList dispatch = do
update NodeList dispatch = do
meth @( method /\ setMethod ) <- R.useState' Basic
meth @( method
List
/\ setMethod ) <- R.useState' Basic
pure $ panel [ -- H.text "Update with"
pure $ panel [ -- H.text "Update with"
formChoiceSafe [Basic, Advanced, WithModel] Basic setMethod
formChoiceSafe [Basic, Advanced, WithModel] Basic setMethod
]
]
(submitButton (UpdateNode $ UpdateNodeParamsList {method}) dispatch)
(submitButton (UpdateNode $ UpdateNodeParamsList {method
List
}) dispatch)
update Graph dispatch = do
update Graph dispatch = do
meth @( method /\ setMethod ) <- R.useState' Order1
meth @( method
Graph
/\ setMethod ) <- R.useState' Order1
pure $ panel [ -- H.text "Update with"
pure $ panel [ -- H.text "Update with"
formChoiceSafe [Order1, Order2] Order1 setMethod
formChoiceSafe [Order1, Order2] Order1 setMethod
]
]
(submitButton (UpdateNode $ UpdateNodeParamsGraph {method}) dispatch)
(submitButton (UpdateNode $ UpdateNodeParamsGraph {method
Graph
}) dispatch)
update Texts dispatch = do
update Texts dispatch = do
meth @( method /\ setMethod ) <- R.useState' NewNgrams
meth @( method
Texts
/\ setMethod ) <- R.useState' NewNgrams
pure $ panel [ -- H.text "Update with"
pure $ panel [ -- H.text "Update with"
formChoiceSafe [NewNgrams, NewTexts, Both] NewNgrams setMethod
formChoiceSafe [NewNgrams, NewTexts, Both] NewNgrams setMethod
]
]
(submitButton (UpdateNode $ UpdateNodeParamsTexts {method}) dispatch)
(submitButton (UpdateNode $ UpdateNodeParamsTexts {method
Texts
}) dispatch)
update Dashboard dispatch = do
update Dashboard dispatch = do
meth @( method /\ setMethod ) <- R.useState' All
meth @( method
Board
/\ setMethod ) <- R.useState' All
pure $ panel [ -- H.text "Update with"
pure $ panel [ -- H.text "Update with"
formChoiceSafe [All, Sources, Authors, Institutes, Ngrams] All setMethod
formChoiceSafe [All, Sources, Authors, Institutes, Ngrams] All setMethod
]
]
(submitButton (UpdateNode $ UpdateNodeParamsBoard {method}) dispatch)
(submitButton (UpdateNode $ UpdateNodeParamsBoard {method
Board
}) dispatch)
update _ _ = pure $ H.div {} []
update _ _ = pure $ H.div {} []
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Update/Types.purs
View file @
63b43fbf
...
@@ -8,10 +8,10 @@ import Data.Maybe (Maybe(..))
...
@@ -8,10 +8,10 @@ import Data.Maybe (Maybe(..))
import Gargantext.Prelude (class Eq, class Read, class Show)
import Gargantext.Prelude (class Eq, class Read, class Show)
data UpdateNodeParams = UpdateNodeParamsList { method :: Method }
data UpdateNodeParams = UpdateNodeParamsList { method
List
:: Method }
| UpdateNodeParamsGraph { method :: Metric }
| UpdateNodeParamsGraph { method
Graph
:: Metric }
| UpdateNodeParamsTexts { method :: Granularity }
| UpdateNodeParamsTexts { method
Texts
:: Granularity }
| UpdateNodeParamsBoard { method :: Charts }
| UpdateNodeParamsBoard { method
Board
:: Charts }
derive instance eqUpdateNodeParams :: Eq UpdateNodeParams
derive instance eqUpdateNodeParams :: Eq UpdateNodeParams
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment