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
266175af
Commit
266175af
authored
Nov 26, 2020
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ngramsTable] add score column
Based on ngramsCount.
parent
d9a55b09
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
DocsTable.purs
src/Gargantext/Components/DocsTable.purs
+8
-2
Contacts.purs
src/Gargantext/Components/Nodes/Annuaire/User/Contacts.purs
+0
-1
No files found.
src/Gargantext/Components/DocsTable.purs
View file @
266175af
...
@@ -19,6 +19,7 @@ import DOM.Simple.Console (log, log2)
...
@@ -19,6 +19,7 @@ import DOM.Simple.Console (log, log2)
import DOM.Simple.Event as DE
import DOM.Simple.Event as DE
import Effect (Effect)
import Effect (Effect)
import Effect.Aff (Aff)
import Effect.Aff (Aff)
import Effect.Class (liftEffect)
import Reactix as R
import Reactix as R
import Reactix.DOM.HTML as H
import Reactix.DOM.HTML as H
------------------------------------------------------------------------
------------------------------------------------------------------------
...
@@ -274,7 +275,11 @@ pageLayoutCpt = R.hooksComponentWithModule thisModule "pageLayout" cpt where
...
@@ -274,7 +275,11 @@ pageLayoutCpt = R.hooksComponentWithModule thisModule "pageLayout" cpt where
localCategories <- R.useState' (mempty :: LocalCategories)
localCategories <- R.useState' (mempty :: LocalCategories)
paramsS <- R.useState' params
paramsS <- R.useState' params
let loader p = do
let loader p = do
res <- get session $ tableRouteWithPage (p { params = fst paramsS, query = query })
let route = tableRouteWithPage (p { params = fst paramsS, query = query })
res <- get session $ route
liftEffect $ do
log2 "[pageLayout] table route" route
log2 "[pageLayout] table res" res
pure $ handleResponse res
pure $ handleResponse res
render (Tuple count documents) = pagePaintRaw { documents
render (Tuple count documents) = pagePaintRaw { documents
, layout: props { params = fst paramsS
, layout: props { params = fst paramsS
...
@@ -372,7 +377,7 @@ pagePaintRawCpt = R.hooksComponentWithModule thisModule "pagePaintRawCpt" cpt wh
...
@@ -372,7 +377,7 @@ pagePaintRawCpt = R.hooksComponentWithModule thisModule "pagePaintRawCpt" cpt wh
corpusDocument
corpusDocument
| Just cid <- mCorpusId = Routes.CorpusDocument sid cid listId
| Just cid <- mCorpusId = Routes.CorpusDocument sid cid listId
| otherwise = Routes.Document sid listId
| otherwise = Routes.Document sid listId
colNames = T.ColumnName <$> [ "Tag", "Date", "Title", "Source"]
colNames = T.ColumnName <$> [ "Tag", "Date", "Title", "Source"
, "Score"
]
wrapColElts = const identity
wrapColElts = const identity
getCategory (lc /\ _) {_id, category} = fromMaybe category (lc ^. at _id)
getCategory (lc /\ _) {_id, category} = fromMaybe category (lc ^. at _id)
rows reload lc@(_ /\ setLocalCategories) = row <$> A.toUnfoldable documents
rows reload lc@(_ /\ setLocalCategories) = row <$> A.toUnfoldable documents
...
@@ -391,6 +396,7 @@ pagePaintRawCpt = R.hooksComponentWithModule thisModule "pagePaintRawCpt" cpt wh
...
@@ -391,6 +396,7 @@ pagePaintRawCpt = R.hooksComponentWithModule thisModule "pagePaintRawCpt" cpt wh
H.a { href: url frontends $ corpusDocument r._id, target: "_blank"} [ H.text r.title ]
H.a { href: url frontends $ corpusDocument r._id, target: "_blank"} [ H.text r.title ]
]
]
, H.div { className: tClassName } [ H.text $ if r.source == "" then "Source" else r.source ]
, H.div { className: tClassName } [ H.text $ if r.source == "" then "Source" else r.source ]
, H.div {} [ H.text $ show r.ngramCount ]
]
]
, delete: true }
, delete: true }
where
where
...
...
src/Gargantext/Components/Nodes/Annuaire/User/Contacts.purs
View file @
266175af
...
@@ -20,7 +20,6 @@ import Gargantext.Components.InputWithEnter (inputWithEnter)
...
@@ -20,7 +20,6 @@ import Gargantext.Components.InputWithEnter (inputWithEnter)
import Gargantext.Components.Nodes.Annuaire.User.Contacts.Tabs as Tabs
import Gargantext.Components.Nodes.Annuaire.User.Contacts.Tabs as Tabs
import Gargantext.Components.Nodes.Annuaire.User.Contacts.Types (Contact(..), ContactData, ContactTouch(..), ContactWhere(..), ContactWho(..), HyperdataContact(..), HyperdataUser(..), _city, _country, _firstName, _labTeamDeptsJoinComma, _lastName, _mail, _office, _organizationJoinComma, _ouFirst, _phone, _role, _shared, _touch, _who, defaultContactTouch, defaultContactWhere, defaultContactWho, defaultHyperdataContact, defaultHyperdataUser)
import Gargantext.Components.Nodes.Annuaire.User.Contacts.Types (Contact(..), ContactData, ContactTouch(..), ContactWhere(..), ContactWho(..), HyperdataContact(..), HyperdataUser(..), _city, _country, _firstName, _labTeamDeptsJoinComma, _lastName, _mail, _office, _organizationJoinComma, _ouFirst, _phone, _role, _shared, _touch, _who, defaultContactTouch, defaultContactWhere, defaultContactWho, defaultHyperdataContact, defaultHyperdataUser)
import Gargantext.Components.Nodes.Lists.Types as LT
import Gargantext.Components.Nodes.Lists.Types as LT
import Gargantext.Components.Nodes.Texts.Types as TT
import Gargantext.Ends (Frontends)
import Gargantext.Ends (Frontends)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Prelude (Unit, bind, const, discard, pure, show, unit, ($), (+), (<$>), (<<<), (<>), (==))
import Gargantext.Prelude (Unit, bind, const, discard, pure, show, unit, ($), (+), (<$>), (<<<), (<>), (==))
...
...
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