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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
purescript-gargantext
Commits
2c5ab6c1
Commit
2c5ab6c1
authored
Apr 09, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CorpusView/Trash] Activating the REST route.
parent
d8e86fc8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
DocsTable.purs
src/Gargantext/Components/DocsTable.purs
+5
-5
Specs.purs
src/Gargantext/Pages/Corpus/Tabs/Specs.purs
+11
-4
No files found.
src/Gargantext/Components/DocsTable.purs
View file @
2c5ab6c1
...
...
@@ -47,10 +47,10 @@ type NodeID = Int
type TotalRecords = Int
type Props =
{ nodeId :: Int
{ nodeId
:: Int
, totalRecords :: Int
, chart :: ReactElement
, tabType :: TabType
, chart
:: ReactElement
, tabType
:: TabType
-- ^ tabType is not ideal here since it is too much entangled with tabs and
-- ngramtable. Let's see how this evolves.
}
...
...
@@ -69,8 +69,8 @@ initialState =
}
_documentIdsToDelete = prop (SProxy :: SProxy "documentIdsToDelete")
_documentIdsDeleted = prop (SProxy :: SProxy "documentIdsDeleted")
_localFavorites = prop (SProxy :: SProxy "localFavorites")
_documentIdsDeleted
= prop (SProxy :: SProxy "documentIdsDeleted")
_localFavorites
= prop (SProxy :: SProxy "localFavorites")
data Action
= MarkFavorites Int Boolean
...
...
src/Gargantext/Pages/Corpus/Tabs/Specs.purs
View file @
2c5ab6c1
...
...
@@ -30,10 +30,10 @@ instance showMode :: Show Mode where
derive instance eqMode :: Eq Mode
modeTabType :: Mode -> CTabNgramType
modeTabType Authors = CTabAuthors
modeTabType Sources = CTabSources
modeTabType Authors
= CTabAuthors
modeTabType Sources
= CTabSources
modeTabType Institutes = CTabInstitutes
modeTabType Terms = CTabTerms
modeTabType Terms
= CTabTerms
pureTabs :: Spec {} Props Void
pureTabs = hideState (const {activeTab: 0}) statefulTabs
...
...
@@ -46,15 +46,22 @@ statefulTabs =
, Tuple "Sources" $ ngramsViewSpec {mode: Sources}
, Tuple "Institutes" $ ngramsViewSpec {mode: Institutes}
, Tuple "Terms" $ ngramsViewSpec {mode: Terms}
, Tuple "Trash" $
docs -- TODO pass-in trash mode
, Tuple "Trash" $
trash
]
where
-- TODO totalRecords
chart = ECharts.chart globalPublis
docs = cmapProps (\{path: nodeId} ->
{nodeId, chart, tabType: TabCorpus TabDocs, totalRecords: 4736}) $
noState DT.docViewSpec
trash = cmapProps (\{path: nodeId} ->
{nodeId, chart, tabType: TabCorpus TabTrash, totalRecords: 4736}) $
noState DT.docViewSpec
ngramsViewSpec :: {mode :: Mode} -> Spec Tab.State Props Tab.Action
ngramsViewSpec {mode} =
noState (
...
...
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