Commit dbbc0fdf authored by James Laver's avatar James Laver

misc fixes for G.Pages

parent 3e5b2663
...@@ -134,8 +134,8 @@ data HyperdataAnnuaire = HyperdataAnnuaire ...@@ -134,8 +134,8 @@ data HyperdataAnnuaire = HyperdataAnnuaire
instance decodeHyperdataAnnuaire :: DecodeJson HyperdataAnnuaire where instance decodeHyperdataAnnuaire :: DecodeJson HyperdataAnnuaire where
decodeJson json = do decodeJson json = do
obj <- decodeJson json obj <- decodeJson json
title <- obj .:? "title" title <- obj .:! "title"
desc <- obj .:? "desc" desc <- obj .:! "desc"
pure $ HyperdataAnnuaire { title, desc } pure $ HyperdataAnnuaire { title, desc }
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
......
...@@ -2,7 +2,7 @@ module Gargantext.Pages.Annuaire.User.Contacts.Types where ...@@ -2,7 +2,7 @@ module Gargantext.Pages.Annuaire.User.Contacts.Types where
import Prelude import Prelude
import Data.Argonaut (class DecodeJson, decodeJson, (.?), (.??)) import Data.Argonaut (class DecodeJson, decodeJson, (.:), (.:!), (.?), (.??))
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.Lens (Lens', Prism', lens, prism) import Data.Lens (Lens', Prism', lens, prism)
import Data.Maybe (Maybe(..), maybe, fromMaybe) import Data.Maybe (Maybe(..), maybe, fromMaybe)
......
...@@ -13,7 +13,7 @@ corpusLayout props = R.createElement corpusLayoutCpt props [] ...@@ -13,7 +13,7 @@ corpusLayout props = R.createElement corpusLayoutCpt props []
corpusLayoutCpt :: R.Component Props corpusLayoutCpt :: R.Component Props
corpusLayoutCpt = R.staticComponent "G.P.Corpus.corpusLayout" cpt corpusLayoutCpt = R.staticComponent "G.P.Corpus.corpusLayout" cpt
where where
cpt {nodeId} _children = do cpt {nodeId} _children =
pure $ H.div {} [ H.h1 {} [H.text "Corpus Description"] H.div {}
, H.p {} [H.text "Soon: corpus synthesis here (when all others charts/features will be stabilized)."] [ H.h1 {} [H.text "Corpus Description"]
] , H.p {} [H.text "Soon: corpus synthesis here (when all others charts/features will be stabilized)."] ]
module Gargantext.Pages.Corpus.Document where module Gargantext.Pages.Corpus.Document where
import Data.Argonaut (class DecodeJson, decodeJson, (.:), (.:?)) import Data.Argonaut (class DecodeJson, decodeJson, (.:), (.:!))
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow) import Data.Generic.Rep.Show (genericShow)
import Data.Maybe (Maybe(..), maybe) import Data.Maybe (Maybe(..), maybe)
...@@ -199,7 +199,7 @@ instance decodeDocumentV3 :: DecodeJson DocumentV3 ...@@ -199,7 +199,7 @@ instance decodeDocumentV3 :: DecodeJson DocumentV3
where where
decodeJson json = do decodeJson json = do
obj <- decodeJson json obj <- decodeJson json
abstract <- obj .:? "abstract" abstract <- obj .:! "abstract"
authors <- obj .: "authors" authors <- obj .: "authors"
--error <- obj .: "error" --error <- obj .: "error"
language_iso2 <- obj .: "language_iso2" language_iso2 <- obj .: "language_iso2"
...@@ -239,23 +239,23 @@ instance decodeDocument :: DecodeJson Document ...@@ -239,23 +239,23 @@ instance decodeDocument :: DecodeJson Document
where where
decodeJson json = do decodeJson json = do
obj <- decodeJson json obj <- decodeJson json
abstract <- obj .:? "abstract" abstract <- obj .:! "abstract"
authors <- obj .:? "authors" authors <- obj .:! "authors"
bdd <- obj .:? "bdd" bdd <- obj .:! "bdd"
doi <- obj .:? "doi" doi <- obj .:! "doi"
language_iso2 <- obj .:? "language_iso2" language_iso2 <- obj .:! "language_iso2"
-- page <- obj .:? "page" -- page <- obj .:! "page"
publication_date <- obj .:? "publication_date" publication_date <- obj .:! "publication_date"
--publication_second <- obj .:? "publication_second" --publication_second <- obj .:! "publication_second"
--publication_minute <- obj .:? "publication_minute" --publication_minute <- obj .:! "publication_minute"
--publication_hour <- obj .:? "publication_hour" --publication_hour <- obj .:! "publication_hour"
publication_day <- obj .:? "publication_day" publication_day <- obj .:! "publication_day"
publication_month <- obj .:? "publication_month" publication_month <- obj .:! "publication_month"
publication_year <- obj .:? "publication_year" publication_year <- obj .:! "publication_year"
source <- obj .:? "sources" source <- obj .:! "sources"
institutes <- obj .:? "institutes" institutes <- obj .:! "institutes"
title <- obj .:? "title" title <- obj .:! "title"
uniqId <- obj .:? "uniqId" uniqId <- obj .:! "uniqId"
--url <- obj .: "url" --url <- obj .: "url"
--text <- obj .: "text" --text <- obj .: "text"
pure $ Document { abstract pure $ Document { abstract
......
This diff is collapsed.
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