Commit 6808a0ff authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[Frame] draft implementation of importing ethercalc

parent 6e088030
...@@ -10,7 +10,8 @@ import Data.Maybe (Maybe(..)) ...@@ -10,7 +10,8 @@ import Data.Maybe (Maybe(..))
import Data.Newtype (class Newtype) import Data.Newtype (class Newtype)
import Data.Nullable (Nullable, null, toMaybe) import Data.Nullable (Nullable, null, toMaybe)
import Data.Show.Generic (genericShow) import Data.Show.Generic (genericShow)
import Effect.Aff (Aff) import Effect.Aff (Aff, launchAff_)
import Effect.Class (liftEffect)
import Gargantext.Components.FolderView as FV import Gargantext.Components.FolderView as FV
import Gargantext.Components.Node (NodePoly(..)) import Gargantext.Components.Node (NodePoly(..))
import Gargantext.Config.REST (RESTError, logRESTError) import Gargantext.Config.REST (RESTError, logRESTError)
...@@ -139,9 +140,11 @@ importIntoListButtonCpt = here.component "importIntoListButton" cpt where ...@@ -139,9 +140,11 @@ importIntoListButtonCpt = here.component "importIntoListButton" cpt where
let url = base <> "/" <> frame_id let url = base <> "/" <> frame_id
--task = GT.AsyncTaskWithType { task, typ: GT.ListCSVUpload } --task = GT.AsyncTaskWithType { task, typ: GT.ListCSVUpload }
uploadPath = GR.NodeAPI NodeList (Just id) $ GT.asyncTaskTypePath GT.ListCSVUpload uploadPath = GR.NodeAPI NodeList (Just id) $ GT.asyncTaskTypePath GT.ListCSVUpload
csv <- EC.downloadCSV base frame_id launchAff_ $ do
here.log2 "[importIntoListButton] CSV: " csv -- TODO Get corpus_id
--eTask <- postWwwUrlencoded session uploadPath body csv <- EC.downloadCSV base frame_id
liftEffect $ here.log2 "[importIntoListButton] CSV: " csv
--eTask <- postWwwUrlencoded session uploadPath body
pure unit pure unit
type NodeFrameVisioProps = type NodeFrameVisioProps =
......
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