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
a934950a
Commit
a934950a
authored
Jul 29, 2019
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DocsTable] orderBy is DateAsc by default, no Maybe type
parent
8e98fe89
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
DocsTable.purs
src/Gargantext/Components/DocsTable.purs
+8
-8
No files found.
src/Gargantext/Components/DocsTable.purs
View file @
a934950a
...
...
@@ -218,11 +218,11 @@ loadPage :: PageParams -> Aff (Array DocumentsView)
loadPage {nodeId, tabType, query, listId, corpusId, params: {limit, offset, orderBy}} = do
logs "loading documents page: loadPage with Offset and limit"
-- res <- get $ toUrl Back (Tab tabType offset limit (convOrderBy <$> orderBy)) (Just nodeId)
let url = (toUrl Back Node (Just nodeId)) <> "/
search
"
let url = (toUrl Back Node (Just nodeId)) <> "/
table
"
res <- post url $ TabPostQuery {
offset
, limit
, orderBy: convOrderBy
<$>
orderBy
, orderBy: convOrderBy orderBy
, tabType
, query
}
...
...
@@ -241,12 +241,12 @@ loadPage {nodeId, tabType, query, listId, corpusId, params: {limit, offset, orde
, category : r.category
, ngramCount : r.ngramCount
}
convOrderBy (
T.ASC (T.ColumnName "Date"
)) = DateAsc
convOrderBy (
T.DESC (T.ColumnName "Date"
)) = DateDesc
convOrderBy (
T.ASC (T.ColumnName "Title"
)) = TitleAsc
convOrderBy (
T.DESC (T.ColumnName "Title"
)) = TitleDesc
convOrderBy (
T.ASC (T.ColumnName "Source"
)) = SourceAsc
convOrderBy (
T.DESC (T.ColumnName "Source"
)) = SourceDesc
convOrderBy (
Just (T.ASC (T.ColumnName "Date")
)) = DateAsc
convOrderBy (
Just (T.DESC (T.ColumnName "Date")
)) = DateDesc
convOrderBy (
Just (T.ASC (T.ColumnName "Title")
)) = TitleAsc
convOrderBy (
Just (T.DESC (T.ColumnName "Title")
)) = TitleDesc
convOrderBy (
Just (T.ASC (T.ColumnName "Source")
)) = SourceAsc
convOrderBy (
Just (T.DESC (T.ColumnName "Source")
)) = SourceDesc
convOrderBy _ = DateAsc -- TODO
...
...
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