Search.Types: Add All

parent 94fa4018
...@@ -19,21 +19,23 @@ import Gargantext.Pages.Layout.Specs.AddCorpus.States (Response, State) ...@@ -19,21 +19,23 @@ import Gargantext.Pages.Layout.Specs.AddCorpus.States (Response, State)
import Gargantext.Utils (id) import Gargantext.Utils (id)
import URI.Extra.QueryPairs as QP import URI.Extra.QueryPairs as QP
data Database = PubMed | HAL data Database = PubMed | HAL | All
instance showDatabase :: Show Database where instance showDatabase :: Show Database where
show PubMed = "PubMed" show PubMed = "PubMed"
show HAL = "HAL" show HAL = "HAL"
show All = "All"
readDatabase :: String -> Maybe Database readDatabase :: String -> Maybe Database
readDatabase "PubMed" = Just PubMed readDatabase "PubMed" = Just PubMed
readDatabase "HAL" = Just HAL readDatabase "HAL" = Just HAL
readDatabase "All" = Just All
readDatabase _ = Nothing readDatabase _ = Nothing
derive instance eqDatabase :: Eq Database derive instance eqDatabase :: Eq Database
allDatabases :: Array Database allDatabases :: Array Database
allDatabases = [PubMed, HAL] allDatabases = [PubMed, HAL, All]
data SearchOrder data SearchOrder
= DateAsc = DateAsc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment