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
d232ce36
Commit
d232ce36
authored
Dec 16, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code Design
parent
b7a25acc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
26 deletions
+25
-26
SearchField.purs
...omponents/Forest/Tree/Node/Action/Search/SearchField.purs
+24
-25
Types.purs
...text/Components/Forest/Tree/Node/Action/Search/Types.purs
+1
-1
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Search/SearchField.purs
View file @
d232ce36
...
@@ -583,43 +583,42 @@ triggerSearch { onSearch, errors, session, selection, search } =
...
@@ -583,43 +583,42 @@ triggerSearch { onSearch, errors, session, selection, search } =
searchQuery :: ListSelection.Selection -> Search -> SearchQuery
searchQuery :: ListSelection.Selection -> Search -> SearchQuery
searchQuery selection { datafield: Nothing, term } =
searchQuery selection { datafield: Nothing, term } =
over SearchQuery (_ { query = term
over SearchQuery (_ { query = term
, selection = selection }) defaultSearchQuery
, selection = selection }) defaultSearchQuery
-- TODO Simplify both HAL Nothing and HAL (Just IMT) cases
-- TODO Simplify both HAL Nothing and HAL (Just IMT) cases
searchQuery selection { databases
searchQuery selection { databases
, datafield: datafield@(Just (External (Just (HAL Nothing))))
, datafield: datafield@(Just (External (Just (HAL Nothing))))
, lang
, lang
, term
, term
, node_id
, node_id
, years } =
, years } = over SearchQuery (_ { databases = databases
over SearchQuery (_ { databases = databases
, datafield = datafield
, datafield = datafield
, lang = lang
, lang = lang
, node_id = node_id
, node_id = node_id
, query = queryHAL term Nothing lang years
, query = queryHAL term Nothing lang years
, selection = selection
, selection = selection
}) defaultSearchQuery
}) defaultSearchQuery
searchQuery selection { databases
searchQuery selection { databases
, datafield: datafield@(Just (External (Just (HAL (Just (IMT imtOrgs))))))
, datafield: datafield@(Just (External (Just (HAL (Just (IMT imtOrgs))))))
, lang
, lang
, term
, term
, node_id
, node_id
, years } =
, years } =
over SearchQuery (_ { databases = databases
over SearchQuery (_ { databases = databases
, datafield = datafield
, datafield = datafield
, lang = lang
, lang = lang
, node_id = node_id
, node_id = node_id
, query = queryHAL term (Just imtOrgs) lang years
, query = queryHAL term (Just imtOrgs) lang years
, selection = selection
, selection = selection
}) defaultSearchQuery
}) defaultSearchQuery
searchQuery selection { databases, datafield, lang, term, node_id } =
searchQuery selection { databases, datafield, lang, term, node_id } =
over SearchQuery (_ { databases = databases
over SearchQuery (_ { databases = databases
, datafield = datafield
, datafield = datafield
, lang = lang
, lang = lang
, node_id = node_id
, node_id = node_id
, query = term
, query = term
, selection = selection
, selection = selection
}) defaultSearchQuery
}) defaultSearchQuery
queryHAL :: String -> Maybe (Set.Set IMT_org) -> Maybe Lang -> Array String -> String
queryHAL :: String -> Maybe (Set.Set IMT_org) -> Maybe Lang -> Array String -> String
queryHAL term mIMTOrgs lang years =
queryHAL term mIMTOrgs lang years =
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Search/Types.purs
View file @
d232ce36
...
@@ -280,7 +280,7 @@ defaultSearchQuery = SearchQuery
...
@@ -280,7 +280,7 @@ defaultSearchQuery = SearchQuery
, node_id : Nothing
, node_id : Nothing
, offset : Nothing
, offset : Nothing
, order : Nothing
, order : Nothing
, selection : ListSelection.MyListsFirst
, selection : ListSelection.
NoList --
MyListsFirst
}
}
performSearch :: Session -> Int -> SearchQuery -> AffRESTError GT.AsyncTaskWithType
performSearch :: Session -> Int -> SearchQuery -> AffRESTError GT.AsyncTaskWithType
...
...
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