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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Grégoire Locqueville
purescript-gargantext
Commits
b15eeb79
Commit
b15eeb79
authored
Sep 30, 2019
by
James Laver
Browse files
Options
Browse Files
Download
Plain Diff
Merge changes made to dev-backend-connection since refactor started
parents
1105cefb
78e620bf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
13 deletions
+18
-13
FacetsTable.purs
src/Gargantext/Components/FacetsTable.purs
+3
-5
Tree.purs
src/Gargantext/Components/Tree.purs
+1
-4
Annuaire.purs
src/Gargantext/Pages/Annuaire.purs
+6
-4
yarn.lock
yarn.lock
+8
-0
No files found.
src/Gargantext/Components/FacetsTable.purs
View file @
b15eeb79
...
...
@@ -24,7 +24,6 @@ import Gargantext.Config.REST (post, deleteWithBody)
import Gargantext.Ends (url)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Components.Search.Types (Category(..), CategoryQuery(..), favCategory, decodeCategory, putCategories)
import Gargantext.Components.Table as T
import Gargantext.Routes (SessionRoute(Search,NodeAPI))
import Gargantext.Sessions (Session)
...
...
@@ -314,7 +313,6 @@ pageCpt = R.staticComponent "G.C.FacetsTable.Page" cpt
| delete = H.div { style: { textDecoration: "line-through" } }
| otherwise = H.div {}
---------------------------------------------------------
newtype DeleteDocumentQuery = DeleteDocumentQuery { documents :: Array Int }
...
...
@@ -323,6 +321,6 @@ instance encodeJsonDDQuery :: EncodeJson DeleteDocumentQuery where
encodeJson (DeleteDocumentQuery post) =
"documents" := post.documents ~> jsonEmptyObject
deleteDocuments ::
Session ->
Int -> DeleteDocumentQuery -> Aff (Array Int)
deleteDocuments
session nodeId = deleteWithBody to
where to = url session (NodeAPI Node (Just nodeId)) <> "/documents"
deleteDocuments :: Int -> DeleteDocumentQuery -> Aff (Array Int)
deleteDocuments
nodeId = deleteWithBody (toUrl endConfigStateful Back Node (Just nodeId) <> "/documents")
src/Gargantext/Components/Tree.purs
View file @
b15eeb79
...
...
@@ -4,7 +4,7 @@ import Prelude hiding (div)
import DOM.Simple.Console (log2)
import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, jsonEmptyObject, (.:), (:=), (~>))
import Data.Array (filter)
import Data.Array (filter
, head
)
import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq)
import Data.Generic.Rep.Show (genericShow)
...
...
@@ -139,8 +139,6 @@ performAction session _ ({tree: NTree (LNode {id}) _} /\ _) (UploadFile fileType
hashes <- uploadFile session id fileType contents
liftEffect $ log2 "uploaded:" hashes
------------------------------------------------------------------------
mCorpusId :: Maybe AppRoute -> Maybe Int
...
...
@@ -279,7 +277,6 @@ childNodes session reload (true /\ _) mCurrentRoute ary = map (\ctree -> childNo
el = R.hooksComponent "ChildNodeView" cpt
cpt {tree} _ = do
treeState <- R.useState' {tree}
pure $ toHtml reload treeState session mCurrentRoute
-- END toHtml
...
...
src/Gargantext/Pages/Annuaire.purs
View file @
b15eeb79
...
...
@@ -66,6 +66,7 @@ annuaireCpt = R.staticComponent "G.P.Annuaire.annuaire" cpt
headerProps = { title: name, desc: name, query: "", date, user: ""}
date = "Last update: " <> date'
style = {width: "250px", display: "inline-block"}
type PagePath = { nodeId :: Int, params :: T.Params }
type PageLayoutProps =
...
...
@@ -98,10 +99,11 @@ page props = R.createElement pageCpt props []
pageCpt :: R.Component PageProps
pageCpt = R.staticComponent "LoadedAnnuairePage" cpt
where
cpt { session, annuairePath, pagePath, table: (AnnuaireTable {annuaireTable}) } _ = do
cpt { session, annuairePath, pagePath
, table: (AnnuaireTable {annuaireTable}) } _ = do
T.table { rows, setParams, container, colNames, totalRecords }
where
totalRecords =4361 -- TODO
totalRecords =
4361 -- TODO
rows = (\c -> {row: contactCells session c, delete: false}) <$> annuaireTable
setParams params = snd pagePath $ const {params, nodeId: fst annuairePath}
container = T.defaultContainer { title: "Annuaire" } -- TODO
...
...
@@ -176,7 +178,9 @@ instance decodeAnnuaireTable :: DecodeJson AnnuaireTable where
decodeJson json = do
rows <- decodeJson json
pure $ AnnuaireTable { annuaireTable : rows}
------------------------------------------------------------------------
loadPage :: Session -> PagePath -> Aff AnnuaireTable
loadPage session {nodeId, params: { offset, limit, orderBy }} =
get $ url session children
...
...
@@ -190,8 +194,6 @@ loadPage session {nodeId, params: { offset, limit, orderBy }} =
where
children = Children NodeContact offset limit Nothing {-(convOrderBy <$> orderBy)-} (Just nodeId)
------ Annuaire loading ------
getAnnuaireInfo :: Session -> Int -> Aff AnnuaireInfo
getAnnuaireInfo session id = get $ url session (NodeAPI Node (Just id))
yarn.lock
View file @
b15eeb79
...
...
@@ -1074,6 +1074,14 @@ anymatch@^3.0.1:
normalize-path "^3.0.0"
picomatch "^2.0.4"
anymatch@^3.0.1:
version "3.0.3"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.0.3.tgz#2fb624fe0e84bccab00afee3d0006ed310f22f09"
integrity sha512-c6IvoeBECQlMVuYUjSwimnhmztImpErfxJzWZhIQinIvQWoGOnB0dLIgifbPHQt5heS6mNlaZG16f06H3C8t1g==
dependencies:
normalize-path "^3.0.0"
picomatch "^2.0.4"
aproba@^1.0.3, aproba@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
...
...
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