Commit 20f92af7 authored by Karen Konou's avatar Karen Konou

[Node Write] analysis options UI

parent fcdd3517
Pipeline #3585 failed with stage
in 0 seconds
...@@ -4,10 +4,15 @@ import Gargantext.Prelude ...@@ -4,10 +4,15 @@ import Gargantext.Prelude
import Data.Either (Either) import Data.Either (Either)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Tuple.Nested ((/\))
import Effect.Aff (Aff) import Effect.Aff (Aff)
import Gargantext.Components.App.Store (Boxes) import Gargantext.Components.App.Store (Boxes)
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Forest.Tree.Node.Action.Types (Action(..)) import Gargantext.Components.Forest.Tree.Node.Action.Types (Action(..))
import Gargantext.Components.Forest.Tree.Node.Tools (panel, submitButton) import Gargantext.Components.Forest.Tree.Node.Tools (panel, submitButton)
import Gargantext.Components.Lang (Lang(..))
import Gargantext.Components.ListSelection as ListSelection
import Gargantext.Components.ListSelection.Types as ListSelection
import Gargantext.Config.REST (AffRESTError, RESTError) import Gargantext.Config.REST (AffRESTError, RESTError)
import Gargantext.Routes (SessionRoute(..)) import Gargantext.Routes (SessionRoute(..))
import Gargantext.Sessions (Session, post) import Gargantext.Sessions (Session, post)
...@@ -15,6 +20,8 @@ import Gargantext.Types as GT ...@@ -15,6 +20,8 @@ import Gargantext.Types as GT
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Reactix as R import Reactix as R
import Reactix.DOM.HTML as H import Reactix.DOM.HTML as H
import Toestand as T
here :: R2.Here here :: R2.Here
here = R2.here "Gargantext.Components.Forest.Tree.Node.Action.WriteNodesDocuments" here = R2.here "Gargantext.Components.Forest.Tree.Node.Action.WriteNodesDocuments"
...@@ -31,14 +38,86 @@ actionWriteNodesDocuments = R.createElement actionWriteNodesDocumentsCpt ...@@ -31,14 +38,86 @@ actionWriteNodesDocuments = R.createElement actionWriteNodesDocumentsCpt
actionWriteNodesDocumentsCpt :: R.Component ActionWriteNodesDocuments actionWriteNodesDocumentsCpt :: R.Component ActionWriteNodesDocuments
actionWriteNodesDocumentsCpt = here.component "actionWriteNodesDocuments" cpt where actionWriteNodesDocumentsCpt = here.component "actionWriteNodesDocuments" cpt where
cpt { boxes, dispatch, id, session } _ = do cpt { boxes, dispatch, id, session } _ = do
let bodies =
[ R2.row lang' /\ langBox
[ H.div { className: "col-12 flex-space-around" } <- R2.useBox' EN
[ H.div { className: "form-group" } selection' /\ selectionBox
[ H.text "Will traverse all Write Nodes and insert them as documents into current corpus." ] <- R2.useBox' ListSelection.MyListsFirst
] paragraphs' /\ paragraphBox
] <- R2.useBox' "7"
]
let bodies = [
H.div
{ className: "col-12 flex-space-around" }
[ H.h4 {}
[ H.text "Will traverse all Write Nodes and insert them as documents into current corpus." ]
]
,
-- lang
H.div
{ className: "form-group" }
[
H.div
{ className: "form-group__label" }
[
B.label_ $
"File lang"
]
,
H.div
{ className: "form-group__field" }
[
B.formSelect'
{ callback: flip T.write_ langBox
, value: lang'
, list: [ EN, FR, No_extraction, Universal ]
}
[]
]
]
,
-- paragraph
H.div
{ className: "form-group "}
[
H.div
{ className: "form-group__label" }
[
B.label_ $
"Paragraph size (sentences)"
]
,
H.div
{ className: "form-group__field" }
[
B.formInput
{ callback: flip T.write_ paragraphBox
, value: paragraphs'
}
]
]
,
--selection
H.div
{ className: "form-group" }
[
H.div
{ className: "form-group__label" }
[
B.label_ $
"List selection"
]
,
H.div
{ className: "form-group__field" }
[
ListSelection.selection
{ selection: selectionBox
, session
} []
]
]
]
pure $ panel bodies (submitButton (DocumentsFromWriteNodes { id }) dispatch) pure $ panel bodies (submitButton (DocumentsFromWriteNodes { id }) dispatch)
......
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