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