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
466f3e38
Commit
466f3e38
authored
Dec 12, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[UserPage][Contact/Page] Empty default info if nothing (still fix needed for Role).
parent
f28c0a8b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
Specs.purs
src/Gargantext/Pages/Annuaire/User/Contacts/Specs.purs
+8
-7
No files found.
src/Gargantext/Pages/Annuaire/User/Contacts/Specs.purs
View file @
466f3e38
...
@@ -69,7 +69,8 @@ getLastName' = fromMaybe "Empty last name" <<< _.lastName <<< unwrap
...
@@ -69,7 +69,8 @@ getLastName' = fromMaybe "Empty last name" <<< _.lastName <<< unwrap
-- TODO factor below
-- TODO factor below
getRole :: Array ContactWhere -> String
getRole :: Array ContactWhere -> String
getRole obj = joinWith ", " $ getRole' <$> obj
getRole obj = joinWith ", " $ getRole' <$> obj
getRole' = fromMaybe "no role" <<< _.role <<< unwrap
where
getRole' = fromMaybe "Empty role" <<< _.role <<< unwrap
getOrga :: Array ContactWhere -> String
getOrga :: Array ContactWhere -> String
getOrga = maybe "Emtpy Contact-Where" getOrga' <<< head
getOrga = maybe "Emtpy Contact-Where" getOrga' <<< head
...
@@ -103,14 +104,14 @@ getTouch :: Array ContactWhere -> Maybe ContactTouch
...
@@ -103,14 +104,14 @@ getTouch :: Array ContactWhere -> Maybe ContactTouch
getTouch = maybe Nothing (\(ContactWhere {touch:x}) -> x) <<< head
getTouch = maybe Nothing (\(ContactWhere {touch:x}) -> x) <<< head
getPhone :: Array ContactWhere -> String
getPhone :: Array ContactWhere -> String
getPhone obj = fromMaybe "" $ getPhone' <$> (getTouch obj)
getPhone obj = fromMaybe "
Empty touch info
" $ getPhone' <$> (getTouch obj)
getPhone' :: ContactTouch -> String
getPhone' :: ContactTouch -> String
getPhone' = fromMaybe "
no
phone" <<< _.phone <<< unwrap
getPhone' = fromMaybe "
Empty
phone" <<< _.phone <<< unwrap
getMail :: Array ContactWhere -> String
getMail :: Array ContactWhere -> String
getMail obj = fromMaybe "" $ getMail' <$> (getTouch obj)
getMail obj = fromMaybe "
Empty info
" $ getMail' <$> (getTouch obj)
getMail' :: ContactTouch -> String
getMail' :: ContactTouch -> String
getMail' = fromMaybe "
no
mail" <<< _.mail <<< unwrap
getMail' = fromMaybe "
Empty
mail" <<< _.mail <<< unwrap
-- | TODO format data in better design (UI) shape
-- | TODO format data in better design (UI) shape
contactInfos :: HyperdataContact -> Array ReactElement
contactInfos :: HyperdataContact -> Array ReactElement
...
...
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