Commit 3f57c035 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] merge asyncTasks

parent 20879d3c
......@@ -49,9 +49,9 @@ treeView props = R.createElement treeViewCpt props []
treeViewCpt :: R.Component Props
treeViewCpt = R.hooksComponent "G.C.Tree.treeView" cpt
where
cpt { root, mCurrentRoute, session, frontends, openNodes, reload } _children = do
cpt { root, mCurrentRoute, session, frontends, openNodes, reload, asyncTasks} _children = do
pure $ treeLoadView
{ root, mCurrentRoute, session, frontends, openNodes, reload }
{ root, mCurrentRoute, session, frontends, openNodes, reload, asyncTasks}
treeLoadView :: Record Props -> R.Element
treeLoadView p = R.createElement treeLoadViewCpt p []
......@@ -192,11 +192,12 @@ performAction { reload: (_ /\ setReload)
performAction { reload: (_ /\ setReload)
, session
, tasks: (_ /\ setAsyncTasks)
, tasks: {onTaskAdd}
, tree: (NTree (LNode {id}) _) } (UpdateNode task) = do
liftEffect $ setAsyncTasks $ A.cons task
liftEffect $ onTaskAdd task
liftEffect $ log2 "[performAction] UpdateNode task:" task
performAction p@{ reload: (_ /\ setReload)
, session
, tree: (NTree (LNode {id}) _) } (Submit name) = do
......
......@@ -31,9 +31,9 @@ type Dispatch = Action -> Aff Unit
type Props =
( dispatch :: Dispatch
, id :: Int
, id :: Int
, nodeType :: GT.NodeType
, session :: Session
, session :: Session
)
......@@ -110,8 +110,7 @@ uploadFileViewCpt = R.hooksComponent "G.C.F.T.N.A.U.UploadFileView" cpt
type UploadButtonProps =
(
dispatch :: Dispatch
( dispatch :: Dispatch
, fileType :: R.State FileType
, id :: Int
, lang :: R.State (Maybe Lang)
......@@ -285,8 +284,7 @@ uploadTermListViewCpt = R.hooksComponent "G.C.F.T.N.A.U.UploadTermListView" cpt
type UploadTermButtonProps =
(
dispatch :: Dispatch
( dispatch :: Dispatch
, id :: Int
, mFile :: R.State (Maybe UploadFile)
, nodeType :: GT.NodeType
......@@ -324,9 +322,8 @@ copyFromCorpusViewCpt = R.hooksComponent "G.C.F.T.N.A.U.copyFromCorpusView" cpt
copyFromCorpusViewLoaded {dispatch, id, nodeType, session, tree}
type CorpusTreeProps =
(
tree :: FTree
| Props
( tree :: FTree
| Props
)
copyFromCorpusViewLoaded :: Record CorpusTreeProps -> R.Element
......
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