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
390aa390
Unverified
Commit
390aa390
authored
Oct 22, 2018
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/user-form' into annuaire
parents
6f401f9b
32c5689d
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
159 additions
and
57 deletions
+159
-57
Annuaire.purs
src/Gargantext/Pages/Annuaire.purs
+10
-9
Contacts.purs
src/Gargantext/Pages/Annuaire/User/Contacts.purs
+7
-0
API.purs
src/Gargantext/Pages/Annuaire/User/Contacts/API.purs
+25
-0
Specs.purs
src/Gargantext/Pages/Annuaire/User/Contacts/Specs.purs
+7
-7
Documents.purs
...gantext/Pages/Annuaire/User/Contacts/Specs/Documents.purs
+1
-1
Renders.purs
...argantext/Pages/Annuaire/User/Contacts/Specs/Renders.purs
+76
-0
Types.purs
src/Gargantext/Pages/Annuaire/User/Contacts/Types.purs
+20
-20
Users.purs
src/Gargantext/Pages/Annuaire/User/Users.purs
+0
-7
Layout.purs
src/Gargantext/Pages/Layout.purs
+2
-2
Actions.purs
src/Gargantext/Pages/Layout/Actions.purs
+3
-3
Specs.purs
src/Gargantext/Pages/Layout/Specs.purs
+2
-2
States.purs
src/Gargantext/Pages/Layout/States.purs
+6
-6
No files found.
src/Gargantext/Pages/Annuaire.purs
View file @
390aa390
...
@@ -15,7 +15,8 @@ import Thermite (Render, Spec
...
@@ -15,7 +15,8 @@ import Thermite (Render, Spec
import Gargantext.Prelude
import Gargantext.Prelude
import Gargantext.Config (toUrl, NodeType(..), TabType(..), End(..))
import Gargantext.Config (toUrl, NodeType(..), TabType(..), End(..))
import Gargantext.Config.REST (get)
import Gargantext.Config.REST (get)
import Gargantext.Pages.Annuaire.User.Users.Types (User(..), HyperData(..))
import Gargantext.Pages.Annuaire.User.Contacts.Types (Contact(..), HyperData(..))
import Gargantext.Utils.DecodeMaybe ((.?|))
import Data.Argonaut (class DecodeJson, decodeJson, (.?))
import Data.Argonaut (class DecodeJson, decodeJson, (.?))
------------------------------------------------------------------------------
------------------------------------------------------------------------------
type State = { info :: Maybe AnnuaireInfo
type State = { info :: Maybe AnnuaireInfo
...
@@ -68,7 +69,7 @@ defaultAnnuaireInfo = AnnuaireInfo { id : 0
...
@@ -68,7 +69,7 @@ defaultAnnuaireInfo = AnnuaireInfo { id : 0
, hyperdata : ""
, hyperdata : ""
}
}
------------------------------------------------------------------------------
------------------------------------------------------------------------------
toRows :: AnnuaireTable -> Array (Maybe
User
)
toRows :: AnnuaireTable -> Array (Maybe
Contact
)
toRows (AnnuaireTable a) = a.annuaireTable
toRows (AnnuaireTable a) = a.annuaireTable
layoutAnnuaire :: Spec State {} Action
layoutAnnuaire :: Spec State {} Action
...
@@ -130,14 +131,14 @@ layoutAnnuaire = simpleSpec performAction render
...
@@ -130,14 +131,14 @@ layoutAnnuaire = simpleSpec performAction render
individuals = maybe (toRows defaultAnnuaireTable) toRows state.stable
individuals = maybe (toRows defaultAnnuaireTable) toRows state.stable
showRow :: Maybe
User
-> ReactElement
showRow :: Maybe
Contact
-> ReactElement
showRow Nothing = tr [][]
showRow Nothing = tr [][]
showRow (Just (
User { id : id, hyperdata : (HyperData user
) })) =
showRow (Just (
Contact { id : id, hyperdata : (HyperData contact
) })) =
tr []
tr []
[ td [] [ a [ href (toUrl Front NodeUser id) ] [ text $ maybe'
user.nom <> " " <> maybe' user
.prenom ] ]
[ td [] [ a [ href (toUrl Front NodeUser id) ] [ text $ maybe'
contact.nom <> " " <> maybe' contact
.prenom ] ]
, td [] [text $ maybe'
user
.fonction]
, td [] [text $ maybe'
contact
.fonction]
, td [] [text $ maybe'
user
.service]
, td [] [text $ maybe'
contact
.service]
, td [] [text $ maybe'
user
.groupe]
, td [] [text $ maybe'
contact
.groupe]
]
]
where
where
maybe' = maybe "" identity
maybe' = maybe "" identity
...
@@ -173,7 +174,7 @@ instance decodeAnnuaireInfo :: DecodeJson AnnuaireInfo where
...
@@ -173,7 +174,7 @@ instance decodeAnnuaireInfo :: DecodeJson AnnuaireInfo where
}
}
newtype AnnuaireTable = AnnuaireTable { annuaireTable :: Array (Maybe
User
)}
newtype AnnuaireTable = AnnuaireTable { annuaireTable :: Array (Maybe
Contact
)}
instance decodeAnnuaireTable :: DecodeJson AnnuaireTable where
instance decodeAnnuaireTable :: DecodeJson AnnuaireTable where
decodeJson json = do
decodeJson json = do
rows <- decodeJson json
rows <- decodeJson json
...
...
src/Gargantext/Pages/Annuaire/User/Contacts.purs
0 → 100644
View file @
390aa390
module Gargantext.Pages.Annuaire.User.Contacts
(module Gargantext.Pages.Annuaire.User.Contacts.Types,
module Gargantext.Pages.Annuaire.User.Contacts.Specs)
where
import Gargantext.Pages.Annuaire.User.Contacts.Types
import Gargantext.Pages.Annuaire.User.Contacts.Specs
src/Gargantext/Pages/Annuaire/User/
User
s/API.purs
→
src/Gargantext/Pages/Annuaire/User/
Contact
s/API.purs
View file @
390aa390
module Gargantext.Pages.Annuaire.User.
User
s.API where
module Gargantext.Pages.Annuaire.User.
Contact
s.API where
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Class (lift)
import Data.Either (Either(..))
import Data.Either (Either(..))
...
@@ -11,14 +11,15 @@ import Thermite (StateCoTransformer, modifyState)
...
@@ -11,14 +11,15 @@ import Thermite (StateCoTransformer, modifyState)
import Gargantext.Config (toUrl, NodeType(..), End(..))
import Gargantext.Config (toUrl, NodeType(..), End(..))
import Gargantext.Config.REST (get)
import Gargantext.Config.REST (get)
import Gargantext.Pages.Annuaire.User.Users.Types (Action(..), State, User, _user)
import Gargantext.Prelude
import Gargantext.Prelude
import Gargantext.Pages.Annuaire.User.Contacts.Types (Action(..), State, Contact, _contact)
import Thermite (PerformAction, modifyState)
get
User :: Int -> Aff User
get
Contact :: Int -> Aff Contact
get
User
id = get $ toUrl Back Node id
get
Contact
id = get $ toUrl Back Node id
fetch
User
:: Int -> StateCoTransformer State Unit
fetch
Contact
:: Int -> StateCoTransformer State Unit
fetch
User user
Id = do
fetch
Contact contact
Id = do
user <- lift $ getUser user
Id
contact <- lift $ getContact contact
Id
void $ modifyState $ _
user ?~ user
void $ modifyState $ _
contact ?~ contact
logs "Fetching
user
..."
logs "Fetching
contact
..."
src/Gargantext/Pages/Annuaire/User/
User
s/Specs.purs
→
src/Gargantext/Pages/Annuaire/User/
Contact
s/Specs.purs
View file @
390aa390
module Gargantext.Pages.Annuaire.User.
User
s.Specs
module Gargantext.Pages.Annuaire.User.
Contact
s.Specs
(module Gargantext.Pages.Annuaire.User.
User
s.Specs.Renders,
(module Gargantext.Pages.Annuaire.User.
Contact
s.Specs.Renders,
brevetSpec,
brevetSpec,
projectSpec,
projectSpec,
facets,
facets,
...
@@ -13,16 +13,16 @@ import Thermite (Render, PerformAction, Spec, focus, noState, defaultPerformActi
...
@@ -13,16 +13,16 @@ import Thermite (Render, PerformAction, Spec, focus, noState, defaultPerformActi
import Gargantext.Prelude
import Gargantext.Prelude
import Gargantext.Components.Tab as Tab
import Gargantext.Components.Tab as Tab
import Gargantext.Pages.Annuaire.User.Brevets as B
import Gargantext.Pages.Annuaire.User.Brevets as B
import Gargantext.Pages.Annuaire.User.
User
s.Specs.Documents as P
import Gargantext.Pages.Annuaire.User.
Contact
s.Specs.Documents as P
import Gargantext.Pages.Annuaire.User.
User
s.Types (Action(..), State, _tablens, _tabAction)
import Gargantext.Pages.Annuaire.User.
Contact
s.Types (Action(..), State, _tablens, _tabAction)
import Gargantext.Pages.Annuaire.User.
Users.API (fetchUser
)
import Gargantext.Pages.Annuaire.User.
Contacts.API (fetchContact
)
import Gargantext.Pages.Annuaire.User.
User
s.Specs.Renders (render)
import Gargantext.Pages.Annuaire.User.
Contact
s.Specs.Renders (render)
layoutUser :: Spec State {} Action
layoutUser :: Spec State {} Action
layoutUser = simpleSpec performAction render
layoutUser = simpleSpec performAction render
where
where
performAction :: PerformAction State {} Action
performAction :: PerformAction State {} Action
performAction (Fetch
User userId) _ _ = fetchUser user
Id
performAction (Fetch
Contact contactId) _ _ = fetchContact contact
Id
performAction (TabA _) _ _ = pure unit
performAction (TabA _) _ _ = pure unit
brevetSpec :: Spec State {} Action
brevetSpec :: Spec State {} Action
...
...
src/Gargantext/Pages/Annuaire/User/
User
s/Specs/Documents.purs
→
src/Gargantext/Pages/Annuaire/User/
Contact
s/Specs/Documents.purs
View file @
390aa390
module Gargantext.Pages.Annuaire.User.
User
s.Specs.Documents where
module Gargantext.Pages.Annuaire.User.
Contact
s.Specs.Documents where
import Prelude
import Prelude
import React.DOM (table, tbody, td, text, th, thead, tr)
import React.DOM (table, tbody, td, text, th, thead, tr)
...
...
src/Gargantext/Pages/Annuaire/User/
User
s/Specs/Renders.purs
→
src/Gargantext/Pages/Annuaire/User/
Contact
s/Specs/Renders.purs
View file @
390aa390
module Gargantext.Pages.Annuaire.User.
User
s.Specs.Renders
module Gargantext.Pages.Annuaire.User.
Contact
s.Specs.Renders
where
where
import Gargantext.Pages.Annuaire.User.
User
s.Types
import Gargantext.Pages.Annuaire.User.
Contact
s.Types
import Data.List (List, zipWith, catMaybes, toUnfoldable)
import Data.Unfoldable (class Unfoldable)
import Data.Map (Map, empty, keys, values, lookup)
import Data.Set (toUnfoldable) as S
import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe(..))
import Data.Tuple (Tuple(..))
import Data.Tuple (Tuple(..)
, uncurry
)
import Prelude (($), (<<<))
import Prelude (($), (<<<)
, (<$>), flip, class Ord
)
import React (ReactElement)
import React (ReactElement)
import React.DOM (div, h3, img, li, span, text, ul)
import React.DOM (div, h3, img, li, span, text, ul)
import React.DOM.Props (_id, className, src)
import React.DOM.Props (_id, className, src)
...
@@ -16,53 +20,57 @@ render :: Render State {} Action
...
@@ -16,53 +20,57 @@ render :: Render State {} Action
render dispatch _ state _ =
render dispatch _ state _ =
[
[
div [className "col-md-12"]
div [className "col-md-12"]
$ case state.
user
of
$ case state.
contact
of
(Just (
User user)) -> display user.name [userInfos user
.hyperdata]
(Just (
Contact contact)) -> display contact.name [contactInfos contact
.hyperdata]
Nothing -> display "
User
not found" []
Nothing -> display "
Contact
not found" []
]
]
display :: String -> Array ReactElement -> Array ReactElement
display :: String -> Array ReactElement -> Array ReactElement
display title elems =
display title elems =
[ div [className "container-fluid"]
[ div [className "container-fluid"]
[ div [className "row", _id "
user
-page-header"]
[ div [className "row", _id "
contact
-page-header"]
[ div [className "col-md-6"] [ h3 [] [text title] ]
[ div [className "col-md-6"] [ h3 [] [text title] ]
, div [className "col-md-8"] []
, div [className "col-md-8"] []
, div [className "col-md-2"] [ span [] [text ""] ]
, div [className "col-md-2"] [ span [] [text ""] ]
]
]
, div [className "row", _id "
user
-page-info"]
, div [className "row", _id "
contact
-page-info"]
[ div [className "col-md-12"]
[ div [className "col-md-12"]
[ div [className "row"]
[ div [className "row"]
[ div [className "col-md-2"]
[ div [className "col-md-2"]
[ img [src "/images/Gargantextuel-212x300.jpg"] ]
[ img [src "/images/Gargantextuel-212x300.jpg"] ]
, div [className "col-md-1"] []
, div [className "col-md-1"] []
, div [className "col-md-8"] elems
, div [className "col-md
Data.Unfoldable
-8"] elems
]
]
]
]
]
]
]
]
]
]
userInfos :: HyperData -> ReactElement
mapMyMap :: forall k v x f. Ord k => Unfoldable f => (k -> v -> x) -> Map k v -> f x
userInfos (HyperData user) =
mapMyMap f m = toUnfoldable
ul [className "list-group"]
$ zipWith f mapKeys
[
(catMaybes $ flip lookup m <$> mapKeys)
listElement <<< infoRender <<< Tuple "Fonction: " $ checkMaybe user.fonction
where mapKeys = S.toUnfoldable $ keys m
, listElement <<< infoRender <<< Tuple "Entité, service: " $ checkMaybe user.entite
, listElement <<< infoRender <<< Tuple "Téléphone: " $ checkMaybe user.atel
infixl 4 mapMyMap as <.~$>
, listElement <<< infoRender <<< Tuple "Courriel: " $ checkMaybe user.mail
, listElement <<< infoRender <<< Tuple "Bureau: " $ checkMaybe user.bureau
contactInfos :: HyperData -> ReactElement
, listElement <<< infoRender <<< Tuple "Appelation: " $ checkMaybe user.fonction
contactInfos hyperdata =
, listElement <<< infoRender $ Tuple "Lieu: " $ checkMaybe user.lieu
ul [className "list-group"] [] {- $
]
listInfo <.~$> hyperdata
where
where
checkMaybe (Nothing) = ""
checkMaybe (Nothing) = empty
checkMaybe (Just a) = a
checkMaybe (Just (HyperData a)) = a
-}
listElement :: Array ReactElement
-> ReactElement
listInfo :: Tuple String String
-> ReactElement
listElement = li [className "list-group-item justify-content-between"]
listInfo s = listElement $ infoRender s
infoRender :: Tuple String String -> Array ReactElement
listElement :: Array ReactElement -> ReactElement
infoRender (Tuple title content) =
listElement = li [className "list-group-item justify-content-between"]
[ span [] [text title]
, span [className "badge badge-default badge-pill"] [text content]
infoRender :: Tuple String String -> Array ReactElement
]
infoRender (Tuple title content) =
[ span [] [text title]
, span [className "badge badge-default badge-pill"] [text content]
]
src/Gargantext/Pages/Annuaire/User/
User
s/Types.purs
→
src/Gargantext/Pages/Annuaire/User/
Contact
s/Types.purs
View file @
390aa390
module Gargantext.Pages.Annuaire.User.
User
s.Types where
module Gargantext.Pages.Annuaire.User.
Contact
s.Types where
import Prelude
import Prelude
...
@@ -10,15 +10,15 @@ import Data.Maybe (Maybe(..))
...
@@ -10,15 +10,15 @@ import Data.Maybe (Maybe(..))
import Gargantext.Components.Tab as Tab
import Gargantext.Components.Tab as Tab
import Gargantext.Utils.DecodeMaybe ((.?|))
import Gargantext.Utils.DecodeMaybe ((.?|))
newtype
User =
newtype
Contact = Contact
User
{ id :: Int
{ id :: Int
, typename :: Maybe Int
, typename :: Maybe Int
, userId :: Int
, userId :: Int
, parentId :: Int
, parentId :: Int
, name :: String
, name :: String
, date :: Maybe String
, date :: Maybe String
, hyperdata :: HyperData
, hyperdata :: HyperData
}
}
newtype HyperData =
newtype HyperData =
HyperData
HyperData
...
@@ -79,7 +79,7 @@ instance decodeUserHyperData :: DecodeJson HyperData where
...
@@ -79,7 +79,7 @@ instance decodeUserHyperData :: DecodeJson HyperData where
, entite2, mail
, entite2, mail
}
}
instance decodeUser :: DecodeJson
User
where
instance decodeUser :: DecodeJson
Contact
where
decodeJson json = do
decodeJson json = do
obj <- decodeJson json
obj <- decodeJson json
id <- obj .? "id"
id <- obj .? "id"
...
@@ -89,28 +89,28 @@ instance decodeUser :: DecodeJson User where
...
@@ -89,28 +89,28 @@ instance decodeUser :: DecodeJson User where
name <- obj .? "name"
name <- obj .? "name"
date <- obj .?| "date"
date <- obj .?| "date"
hyperdata <- obj .? "hyperdata"
hyperdata <- obj .? "hyperdata"
pure $
User
{ id, typename, userId
pure $
Contact
{ id, typename, userId
, parentId, name, date
, parentId, name, date
, hyperdata
, hyperdata
}
}
data Action
data Action
= TabA Tab.Action
= TabA Tab.Action
| Fetch
User
Int
| Fetch
Contact
Int
type State =
type State =
{ activeTab :: Int
{ activeTab :: Int
,
user :: Maybe User
,
contact :: Maybe Contact
}
}
initialState :: State
initialState :: State
initialState =
initialState =
{ activeTab : 0
{ activeTab : 0
,
user
: Nothing
,
contact
: Nothing
}
}
_
user :: Lens' State (Maybe User
)
_
contact :: Lens' State (Maybe Contact
)
_
user = lens (\s -> s.user) (\s ss -> s{user
= ss})
_
contact = lens (\s -> s.contact) (\s ss -> s{contact
= ss})
_tablens :: Lens' State Tab.State
_tablens :: Lens' State Tab.State
_tablens = lens (\s -> s.activeTab) (\s ss -> s {activeTab = ss})
_tablens = lens (\s -> s.activeTab) (\s ss -> s {activeTab = ss})
...
...
src/Gargantext/Pages/Annuaire/User/Users.purs
deleted
100644 → 0
View file @
6f401f9b
module Gargantext.Pages.Annuaire.User.Users
(module Gargantext.Pages.Annuaire.User.Users.Types,
module Gargantext.Pages.Annuaire.User.Users.Specs)
where
import Gargantext.Pages.Annuaire.User.Users.Types
import Gargantext.Pages.Annuaire.User.Users.Specs
src/Gargantext/Pages/Layout.purs
View file @
390aa390
...
@@ -10,7 +10,7 @@ import Gargantext.Pages.Corpus.Document as Document
...
@@ -10,7 +10,7 @@ import Gargantext.Pages.Corpus.Document as Document
import Gargantext.Pages.Corpus.Graph as GE
import Gargantext.Pages.Corpus.Graph as GE
-- import Gargantext.Pages.Corpus.Tabs.Terms.NgramsTable as NG
-- import Gargantext.Pages.Corpus.Tabs.Terms.NgramsTable as NG
import Gargantext.Pages.Annuaire.User.
Users as U
import Gargantext.Pages.Annuaire.User.
Contacts as C
import Gargantext.Pages.Annuaire as Annuaire
import Gargantext.Pages.Annuaire as Annuaire
-- import Gargantext.Pages.Home as L
-- import Gargantext.Pages.Home as L
-- import Gargantext.Pages.Layout.Specs.Search as S
-- import Gargantext.Pages.Layout.Specs.Search as S
...
@@ -44,7 +44,7 @@ dispatchAction dispatcher _ SearchView = do
...
@@ -44,7 +44,7 @@ dispatchAction dispatcher _ SearchView = do
dispatchAction dispatcher _ (UserPage id) = do
dispatchAction dispatcher _ (UserPage id) = do
dispatcher $ SetRoute $ UserPage id
dispatcher $ SetRoute $ UserPage id
-- dispatcher $ UserPageA TODO
-- dispatcher $ UserPageA TODO
dispatcher $ UserPageA $
U.FetchUser
id
dispatcher $ UserPageA $
C.FetchContact
id
dispatchAction dispatcher _ (Annuaire id) = do
dispatchAction dispatcher _ (Annuaire id) = do
dispatcher $ SetRoute $ Annuaire id
dispatcher $ SetRoute $ Annuaire id
...
...
src/Gargantext/Pages/Layout/Actions.purs
View file @
390aa390
...
@@ -12,7 +12,7 @@ import Gargantext.Components.Login as LN
...
@@ -12,7 +12,7 @@ import Gargantext.Components.Login as LN
import Gargantext.Components.Modals.Modal (modalShow)
import Gargantext.Components.Modals.Modal (modalShow)
import Gargantext.Components.Tree as Tree
import Gargantext.Components.Tree as Tree
import Gargantext.Pages.Annuaire as Annuaire
import Gargantext.Pages.Annuaire as Annuaire
import Gargantext.Pages.Annuaire.User.
Users as U
import Gargantext.Pages.Annuaire.User.
Contacts as C
import Gargantext.Pages.Corpus.Document as D
import Gargantext.Pages.Corpus.Document as D
import Gargantext.Pages.Corpus.Graph as GE
import Gargantext.Pages.Corpus.Graph as GE
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
...
@@ -34,7 +34,7 @@ data Action
...
@@ -34,7 +34,7 @@ data Action
| GraphExplorerA GE.Action
| GraphExplorerA GE.Action
| DocumentViewA D.Action
| DocumentViewA D.Action
| AnnuaireAction Annuaire.Action
| AnnuaireAction Annuaire.Action
| UserPageA
U
.Action
| UserPageA
C
.Action
| Go
| Go
| ShowLogin
| ShowLogin
| ShowAddcorpus
| ShowAddcorpus
...
@@ -101,7 +101,7 @@ _searchAction = prism SearchA \action ->
...
@@ -101,7 +101,7 @@ _searchAction = prism SearchA \action ->
SearchA caction -> Right caction
SearchA caction -> Right caction
_-> Left action
_-> Left action
_userPageAction :: Prism' Action
U
.Action
_userPageAction :: Prism' Action
C
.Action
_userPageAction = prism UserPageA \action ->
_userPageAction = prism UserPageA \action ->
case action of
case action of
UserPageA caction -> Right caction
UserPageA caction -> Right caction
...
...
src/Gargantext/Pages/Layout/Specs.purs
View file @
390aa390
...
@@ -16,7 +16,7 @@ import Gargantext.Components.Login as LN
...
@@ -16,7 +16,7 @@ import Gargantext.Components.Login as LN
import Gargantext.Components.Tree as Tree
import Gargantext.Components.Tree as Tree
import Gargantext.Folder as F
import Gargantext.Folder as F
import Gargantext.Pages.Annuaire as A
import Gargantext.Pages.Annuaire as A
import Gargantext.Pages.Annuaire.User.
Users as U
import Gargantext.Pages.Annuaire.User.
Contacts as C
import Gargantext.Pages.Corpus as Corpus
import Gargantext.Pages.Corpus as Corpus
import Gargantext.Pages.Corpus.Document as Annotation
import Gargantext.Pages.Corpus.Document as Annotation
import Gargantext.Pages.Corpus.Dashboard as Dsh
import Gargantext.Pages.Corpus.Dashboard as Dsh
...
@@ -63,7 +63,7 @@ pagesComponent s = case s.currentRoute of
...
@@ -63,7 +63,7 @@ pagesComponent s = case s.currentRoute of
selectSpec Dashboard = layout0 $ noState Dsh.layoutDashboard
selectSpec Dashboard = layout0 $ noState Dsh.layoutDashboard
selectSpec (Annuaire i) = layout0 $ focus _annuaireState _annuaireAction A.layoutAnnuaire
selectSpec (Annuaire i) = layout0 $ focus _annuaireState _annuaireAction A.layoutAnnuaire
selectSpec (UserPage i) = layout0 $ focus _userPageState _userPageAction
U
.layoutUser
selectSpec (UserPage i) = layout0 $ focus _userPageState _userPageAction
C
.layoutUser
-- To be removed
-- To be removed
selectSpec NGramsTable = layout0 $ noState NG.ngramsTableSpec
selectSpec NGramsTable = layout0 $ noState NG.ngramsTableSpec
...
...
src/Gargantext/Pages/Layout/States.purs
View file @
390aa390
...
@@ -11,7 +11,7 @@ import Gargantext.Pages.Corpus.Document as D
...
@@ -11,7 +11,7 @@ import Gargantext.Pages.Corpus.Document as D
import Gargantext.Pages.Annuaire as Annuaire
import Gargantext.Pages.Annuaire as Annuaire
import Gargantext.Pages.Corpus.Tabs.Documents as DV
import Gargantext.Pages.Corpus.Tabs.Documents as DV
import Gargantext.Pages.Corpus.Graph as GE
import Gargantext.Pages.Corpus.Graph as GE
import Gargantext.Pages.Annuaire.User.
Users as U
import Gargantext.Pages.Annuaire.User.
Contacts as C
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Layout.Specs.Search as S
import Gargantext.Pages.Layout.Specs.Search as S
import Gargantext.Router (Routes(..))
import Gargantext.Router (Routes(..))
...
@@ -22,8 +22,8 @@ type AppState =
...
@@ -22,8 +22,8 @@ type AppState =
, addCorpusState :: AC.State
, addCorpusState :: AC.State
, docViewState :: DV.State
, docViewState :: DV.State
, searchState :: S.State
, searchState :: S.State
, userPageState ::
U
.State
, userPageState ::
C
.State
, documentState :: D.State
, documentState
:: D.State
, annuaireState :: Annuaire.State
, annuaireState :: Annuaire.State
, ntreeState :: Tree.State
, ntreeState :: Tree.State
, search :: String
, search :: String
...
@@ -40,8 +40,8 @@ initAppState =
...
@@ -40,8 +40,8 @@ initAppState =
, addCorpusState : AC.initialState
, addCorpusState : AC.initialState
, docViewState : DV.initialState
, docViewState : DV.initialState
, searchState : S.initialState
, searchState : S.initialState
, userPageState :
U
.initialState
, userPageState :
C
.initialState
, documentState : D.initialState
, documentState
: D.initialState
, ntreeState : Tree.exampleTree
, ntreeState : Tree.exampleTree
, annuaireState : Annuaire.initialState
, annuaireState : Annuaire.initialState
, search : ""
, search : ""
...
@@ -64,7 +64,7 @@ _docViewState = lens (\s -> s.docViewState) (\s ss -> s{docViewState = ss})
...
@@ -64,7 +64,7 @@ _docViewState = lens (\s -> s.docViewState) (\s ss -> s{docViewState = ss})
_searchState :: Lens' AppState S.State
_searchState :: Lens' AppState S.State
_searchState = lens (\s -> s.searchState) (\s ss -> s{searchState = ss})
_searchState = lens (\s -> s.searchState) (\s ss -> s{searchState = ss})
_userPageState :: Lens' AppState
U
.State
_userPageState :: Lens' AppState
C
.State
_userPageState = lens (\s -> s.userPageState) (\s ss -> s{userPageState = ss})
_userPageState = lens (\s -> s.userPageState) (\s ss -> s{userPageState = ss})
_annuaireState :: Lens' AppState Annuaire.State
_annuaireState :: Lens' AppState Annuaire.State
...
...
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