Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
195
Issues
195
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
haskell-gargantext
Commits
53633abe
Commit
53633abe
authored
Dec 04, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Contact] Maybe [] -> []
parent
74bfb3c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
Contact.hs
src/Gargantext/Database/Node/Contact.hs
+7
-7
Insert.hs
src/Gargantext/Database/Node/Document/Insert.hs
+1
-1
IMTUser.hs
src/Gargantext/Ext/IMTUser.hs
+4
-4
No files found.
src/Gargantext/Database/Node/Contact.hs
View file @
53633abe
...
...
@@ -44,7 +44,7 @@ type NodeContact = Node HyperdataContact
data
HyperdataContact
=
HyperdataContact
{
_hc_bdd
::
Maybe
Text
-- ID of Database source
,
_hc_who
::
Maybe
ContactWho
,
_hc_where
::
Maybe
[
ContactWhere
]
,
_hc_where
::
[
ContactWhere
]
,
_hc_title
::
Maybe
Text
-- TODO remove (only demo)
,
_hc_source
::
Maybe
Text
-- TODO remove (only demo)
,
_hc_lastValidation
::
Maybe
Text
...
...
@@ -61,7 +61,7 @@ data ContactMetaData =
arbitraryHyperdataContact
::
HyperdataContact
arbitraryHyperdataContact
=
HyperdataContact
Nothing
Nothing
Nothing
arbitraryHyperdataContact
=
HyperdataContact
Nothing
Nothing
[]
Nothing
Nothing
Nothing
Nothing
Nothing
...
...
@@ -69,13 +69,13 @@ data ContactWho =
ContactWho
{
_cw_id
::
Maybe
Text
,
_cw_firstName
::
Maybe
Text
,
_cw_lastName
::
Maybe
Text
,
_cw_keywords
::
Maybe
[
Text
]
,
_cw_freetags
::
Maybe
[
Text
]
,
_cw_keywords
::
[
Text
]
,
_cw_freetags
::
[
Text
]
}
deriving
(
Eq
,
Show
,
Generic
)
data
ContactWhere
=
ContactWhere
{
_cw_organization
::
Maybe
[
Text
]
,
_cw_labTeamDepts
::
Maybe
[
Text
]
ContactWhere
{
_cw_organization
::
[
Text
]
,
_cw_labTeamDepts
::
[
Text
]
,
_cw_role
::
Maybe
Text
...
...
@@ -112,7 +112,7 @@ instance ToSchema ContactWhere
instance
ToSchema
ContactTouch
instance
Arbitrary
HyperdataContact
where
arbitrary
=
elements
[
HyperdataContact
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
]
arbitrary
=
elements
[
HyperdataContact
Nothing
Nothing
[]
Nothing
Nothing
Nothing
Nothing
Nothing
]
-- | Specific Gargantext instance
...
...
src/Gargantext/Database/Node/Document/Insert.hs
View file @
53633abe
...
...
@@ -244,7 +244,7 @@ addUniqIdsContact hc = set (hc_uniqIdBdd) (Just hashBdd)
hashParametersContact
::
[(
HyperdataContact
->
Text
)]
hashParametersContact
=
[
\
d
->
maybe'
$
view
(
hc_who
.
_Just
.
cw_firstName
)
d
,
\
d
->
maybe'
$
view
(
hc_who
.
_Just
.
cw_lastName
)
d
,
\
d
->
maybe'
$
view
(
hc_where
.
_
Just
.
_
head
.
cw_touch
.
_Just
.
ct_mail
)
d
,
\
d
->
maybe'
$
view
(
hc_where
.
_head
.
cw_touch
.
_Just
.
ct_mail
)
d
]
...
...
src/Gargantext/Ext/IMTUser.hs
View file @
53633abe
...
...
@@ -74,14 +74,14 @@ imtUser2gargContact (IMTUser id' entite' mail' nom' prenom' fonction' tel' _fax'
service'
_groupe'
bureau'
url'
_pservice'
_pfonction'
_afonction'
_grprech'
lieu'
_aprecision'
_atel'
_sexe'
_statut'
_idutilentite'
_entite2'
_service2'
_group2'
_actif'
_idutilsiecoles'
date_modification'
)
=
HyperdataContact
(
Just
"IMT Annuaire"
)
(
Just
qui
)
(
Just
[
ou
])
((
<>
)
<$>
(
fmap
(
\
p
->
p
<>
" "
)
prenom'
)
<*>
nom'
)
entite'
date_modification'
Nothing
Nothing
=
HyperdataContact
(
Just
"IMT Annuaire"
)
(
Just
qui
)
[
ou
]
((
<>
)
<$>
(
fmap
(
\
p
->
p
<>
" "
)
prenom'
)
<*>
nom'
)
entite'
date_modification'
Nothing
Nothing
where
qui
=
ContactWho
(
Just
id'
)
prenom'
nom'
(
Just
$
catMaybes
[
service'
])
Nothing
qui
=
ContactWho
(
Just
id'
)
prenom'
nom'
(
catMaybes
[
service'
])
[]
ou
=
ContactWhere
(
toList
entite'
)
(
toList
service'
)
fonction'
bureau'
(
Just
"France"
)
lieu'
contact
Nothing
Nothing
contact
=
Just
$
ContactTouch
mail'
tel'
url'
-- meta = ContactMetaData (Just "IMT annuaire") date_modification'
toList
Nothing
=
Nothing
toList
(
Just
x
)
=
Just
[
x
]
toList
Nothing
=
[]
toList
(
Just
x
)
=
[
x
]
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