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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
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
Hide 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
-> (Action -> Aff Unit)
-> R.Hooks R.Element
update NodeList dispatch = do
meth @( method /\ setMethod ) <- R.useState' Basic
meth @( method
List
/\ setMethod ) <- R.useState' Basic
pure $ panel [ -- H.text "Update with"
formChoiceSafe [Basic, Advanced, WithModel] Basic setMethod
]
(submitButton (UpdateNode $ UpdateNodeParamsList {method}) dispatch)
(submitButton (UpdateNode $ UpdateNodeParamsList {method
List
}) dispatch)
update Graph dispatch = do
meth @( method /\ setMethod ) <- R.useState' Order1
meth @( method
Graph
/\ setMethod ) <- R.useState' Order1
pure $ panel [ -- H.text "Update with"
formChoiceSafe [Order1, Order2] Order1 setMethod
]
(submitButton (UpdateNode $ UpdateNodeParamsGraph {method}) dispatch)
(submitButton (UpdateNode $ UpdateNodeParamsGraph {method
Graph
}) dispatch)
update Texts dispatch = do
meth @( method /\ setMethod ) <- R.useState' NewNgrams
meth @( method
Texts
/\ setMethod ) <- R.useState' NewNgrams
pure $ panel [ -- H.text "Update with"
formChoiceSafe [NewNgrams, NewTexts, Both] NewNgrams setMethod
]
(submitButton (UpdateNode $ UpdateNodeParamsTexts {method}) dispatch)
(submitButton (UpdateNode $ UpdateNodeParamsTexts {method
Texts
}) dispatch)
update Dashboard dispatch = do
meth @( method /\ setMethod ) <- R.useState' All
meth @( method
Board
/\ setMethod ) <- R.useState' All
pure $ panel [ -- H.text "Update with"
formChoiceSafe [All, Sources, Authors, Institutes, Ngrams] All setMethod
]
(submitButton (UpdateNode $ UpdateNodeParamsBoard {method}) dispatch)
(submitButton (UpdateNode $ UpdateNodeParamsBoard {method
Board
}) dispatch)
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(..))
import Gargantext.Prelude (class Eq, class Read, class Show)
data UpdateNodeParams = UpdateNodeParamsList { method :: Method }
| UpdateNodeParamsGraph { method :: Metric }
| UpdateNodeParamsTexts { method :: Granularity }
| UpdateNodeParamsBoard { method :: Charts }
data UpdateNodeParams = UpdateNodeParamsList { method
List
:: Method }
| UpdateNodeParamsGraph { method
Graph
:: Metric }
| UpdateNodeParamsTexts { method
Texts
:: Granularity }
| UpdateNodeParamsBoard { method
Board
:: Charts }
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