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
7545f83f
Commit
7545f83f
authored
Sep 05, 2024
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/687-dev-document-star' into dev
parents
d7508602
8c3900e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
DocsTable.purs
src/Gargantext/Components/DocsTable.purs
+13
-4
No files found.
src/Gargantext/Components/DocsTable.purs
View file @
7545f83f
...
...
@@ -38,6 +38,7 @@ import Gargantext.Components.Table.Types as TT
import Gargantext.Config.REST (AffRESTError)
import Gargantext.Config.Utils (handleRESTError)
import Gargantext.Ends (Frontends, url)
import Gargantext.Hooks.LinkHandler (useLinkHandler)
import Gargantext.Hooks.Loader (useLoader, useLoaderWithCacheAPI, HashedResponse(..))
import Gargantext.Routes (SessionRoute(NodeAPI))
import Gargantext.Routes as Routes
...
...
@@ -603,6 +604,8 @@ tableRowCpt = here.component "tableRow" cpt where
, session } _ = do
mCurrentDocId' <- T.useLive T.unequal mCurrentDocId
{ goToURL } <- useLinkHandler
let cat :: Category
cat = fromMaybe category (localCategories ^. at _id)
selected = mCurrentDocId' == Just r._id
...
...
@@ -648,10 +651,16 @@ tableRowCpt = here.component "tableRow" cpt where
H.div
{ className: tClassName }
[
H.a
{ href: url frontends $ corpusDocument r._id
, target: "_blank"
, className: "text-primary"
H.button
{ on: { click: \_ -> do
let categoryMarked = markCategoryChecked categoryS'
launchAff_ $ do
_ <- updateNodeContextCategory session r._id (fromMaybe 0 mCorpusId) $ cat2score categoryMarked
pure unit
T.write_ categoryMarked categoryS
goToURL $ url frontends $ corpusDocument r._id }
, className: "btn btn-link text-primary"
, type: "Button"
}
[ H.text r.title
, H.i { className: "fa fa-external-link mx-1 small" } []
...
...
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