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
153
Issues
153
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
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
582b58e0
Commit
582b58e0
authored
Jul 03, 2022
by
Karen Konou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[User] Description field
parent
4e677956
Pipeline
#2979
failed with stage
in 54 minutes and 10 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
5 deletions
+15
-5
UserInfo.hs
src/Gargantext/API/GraphQL/UserInfo.hs
+9
-2
Search.hs
src/Gargantext/API/Search.hs
+1
-1
IMTUser.hs
src/Gargantext/Core/Ext/IMTUser.hs
+2
-1
Contact.hs
src/Gargantext/Database/Admin/Types/Hyperdata/Contact.hs
+3
-1
No files found.
src/Gargantext/API/GraphQL/UserInfo.hs
View file @
582b58e0
...
@@ -34,6 +34,7 @@ import Gargantext.Database.Admin.Types.Hyperdata.Contact
...
@@ -34,6 +34,7 @@ import Gargantext.Database.Admin.Types.Hyperdata.Contact
,
cw_organization
,
cw_organization
,
cw_role
,
cw_role
,
cw_touch
,
cw_touch
,
cw_description
,
ct_mail
,
ct_mail
,
ct_phone
,
ct_phone
,
hc_who
,
hc_who
...
@@ -64,6 +65,7 @@ data UserInfo = UserInfo
...
@@ -64,6 +65,7 @@ data UserInfo = UserInfo
,
ui_cwRole
::
Maybe
Text
,
ui_cwRole
::
Maybe
Text
,
ui_cwTouchPhone
::
Maybe
Text
,
ui_cwTouchPhone
::
Maybe
Text
,
ui_cwTouchMail
::
Maybe
Text
-- TODO: Remove. userLight_email should be used instead
,
ui_cwTouchMail
::
Maybe
Text
-- TODO: Remove. userLight_email should be used instead
,
ui_cwDescription
::
Maybe
Text
}
}
deriving
(
Generic
,
GQLType
,
Show
)
deriving
(
Generic
,
GQLType
,
Show
)
...
@@ -92,6 +94,7 @@ data UserInfoMArgs
...
@@ -92,6 +94,7 @@ data UserInfoMArgs
,
ui_cwRole
::
Maybe
Text
,
ui_cwRole
::
Maybe
Text
,
ui_cwTouchPhone
::
Maybe
Text
,
ui_cwTouchPhone
::
Maybe
Text
,
ui_cwTouchMail
::
Maybe
Text
,
ui_cwTouchMail
::
Maybe
Text
,
ui_cwDescription
::
Maybe
Text
}
deriving
(
Generic
,
GQLType
)
}
deriving
(
Generic
,
GQLType
)
type
GqlM
e
env
=
Resolver
QUERY
e
(
GargM
env
GargError
)
type
GqlM
e
env
=
Resolver
QUERY
e
(
GargM
env
GargError
)
...
@@ -132,6 +135,7 @@ updateUserInfo (UserInfoMArgs { ui_id, .. }) = do
...
@@ -132,6 +135,7 @@ updateUserInfo (UserInfoMArgs { ui_id, .. }) = do
uh
ui_cwRoleL
ui_cwRole
$
uh
ui_cwRoleL
ui_cwRole
$
uh
ui_cwTouchMailL
ui_cwTouchMail
$
uh
ui_cwTouchMailL
ui_cwTouchMail
$
uh
ui_cwTouchPhoneL
ui_cwTouchPhone
$
uh
ui_cwTouchPhoneL
ui_cwTouchPhone
$
uh
ui_cwDescriptionL
ui_cwDescription
u_hyperdata
u_hyperdata
-- NOTE: We have 1 username and 2 emails: userLight_email and ui_cwTouchMail
-- NOTE: We have 1 username and 2 emails: userLight_email and ui_cwTouchMail
-- The userLight_email is more important: it is used for login and sending mail.
-- The userLight_email is more important: it is used for login and sending mail.
...
@@ -179,7 +183,8 @@ toUser (UserLight { .. }, u_hyperdata) =
...
@@ -179,7 +183,8 @@ toUser (UserLight { .. }, u_hyperdata) =
,
ui_cwRole
=
u_hyperdata
^.
ui_cwRoleL
,
ui_cwRole
=
u_hyperdata
^.
ui_cwRoleL
--, ui_cwTouchMail = u_hyperdata ^. ui_cwTouchMailL
--, ui_cwTouchMail = u_hyperdata ^. ui_cwTouchMailL
,
ui_cwTouchMail
=
Just
userLight_email
,
ui_cwTouchMail
=
Just
userLight_email
,
ui_cwTouchPhone
=
u_hyperdata
^.
ui_cwTouchPhoneL
}
,
ui_cwTouchPhone
=
u_hyperdata
^.
ui_cwTouchPhoneL
,
ui_cwDescription
=
u_hyperdata
^.
ui_cwDescriptionL
}
sharedL
::
Traversal'
HyperdataUser
HyperdataContact
sharedL
::
Traversal'
HyperdataUser
HyperdataContact
sharedL
=
hu_shared
.
_Just
sharedL
=
hu_shared
.
_Just
...
@@ -213,3 +218,5 @@ ui_cwTouchMailL = hu_shared . _Just . (hc_where . (ix 0) . cw_touch . _Just . ct
...
@@ -213,3 +218,5 @@ ui_cwTouchMailL = hu_shared . _Just . (hc_where . (ix 0) . cw_touch . _Just . ct
ui_cwTouchPhoneL
::
Traversal'
HyperdataUser
(
Maybe
Text
)
ui_cwTouchPhoneL
::
Traversal'
HyperdataUser
(
Maybe
Text
)
ui_cwTouchPhoneL
=
hu_shared
.
_Just
.
(
hc_where
.
(
ix
0
)
.
cw_touch
.
_Just
.
ct_phone
)
ui_cwTouchPhoneL
=
hu_shared
.
_Just
.
(
hc_where
.
(
ix
0
)
.
cw_touch
.
_Just
.
ct_phone
)
--ui_cwTouchPhoneL = contactWhereL . cw_touch . _Just . ct_phone
--ui_cwTouchPhoneL = contactWhereL . cw_touch . _Just . ct_phone
ui_cwDescriptionL
::
Traversal'
HyperdataUser
(
Maybe
Text
)
ui_cwDescriptionL
=
contactWhoL
.
cw_description
src/Gargantext/API/Search.hs
View file @
582b58e0
...
@@ -272,7 +272,7 @@ instance ToHyperdataRow HyperdataDocument where
...
@@ -272,7 +272,7 @@ instance ToHyperdataRow HyperdataDocument where
,
_hr_uniqIdBdd
=
fromMaybe
""
_hd_uniqIdBdd
}
,
_hr_uniqIdBdd
=
fromMaybe
""
_hd_uniqIdBdd
}
instance
ToHyperdataRow
HyperdataContact
where
instance
ToHyperdataRow
HyperdataContact
where
toHyperdataRow
(
HyperdataContact
{
_hc_who
=
Just
(
ContactWho
_
fn
ln
_
_
),
_hc_where
=
ou
}
)
=
toHyperdataRow
(
HyperdataContact
{
_hc_who
=
Just
(
ContactWho
_
fn
ln
_
_
_
),
_hc_where
=
ou
}
)
=
HyperdataRowContact
(
fromMaybe
"FirstName"
fn
)
(
fromMaybe
"LastName"
ln
)
ou'
HyperdataRowContact
(
fromMaybe
"FirstName"
fn
)
(
fromMaybe
"LastName"
ln
)
ou'
where
where
ou'
=
maybe
"CNRS"
(
Text
.
intercalate
" "
.
_cw_organization
)
(
head
ou
)
ou'
=
maybe
"CNRS"
(
Text
.
intercalate
" "
.
_cw_organization
)
(
head
ou
)
...
...
src/Gargantext/Core/Ext/IMTUser.hs
View file @
582b58e0
...
@@ -169,7 +169,8 @@ imtUser2gargContact (IMTUser { id
...
@@ -169,7 +169,8 @@ imtUser2gargContact (IMTUser { id
,
_cw_firstName
=
prenom
,
_cw_firstName
=
prenom
,
_cw_lastName
=
nom
,
_cw_lastName
=
nom
,
_cw_keywords
=
catMaybes
[
service
]
,
_cw_keywords
=
catMaybes
[
service
]
,
_cw_freetags
=
[]
}
,
_cw_freetags
=
[]
,
_cw_description
=
Nothing
}
ou
=
ContactWhere
{
_cw_organization
=
toList
entite
ou
=
ContactWhere
{
_cw_organization
=
toList
entite
,
_cw_labTeamDepts
=
toList
service
,
_cw_labTeamDepts
=
toList
service
,
_cw_role
=
fonction
,
_cw_role
=
fonction
...
...
src/Gargantext/Database/Admin/Types/Hyperdata/Contact.hs
View file @
582b58e0
...
@@ -103,6 +103,7 @@ data ContactWho =
...
@@ -103,6 +103,7 @@ data ContactWho =
,
_cw_lastName
::
Maybe
Text
,
_cw_lastName
::
Maybe
Text
,
_cw_keywords
::
[
Text
]
,
_cw_keywords
::
[
Text
]
,
_cw_freetags
::
[
Text
]
,
_cw_freetags
::
[
Text
]
,
_cw_description
::
Maybe
Text
}
deriving
(
Eq
,
Show
,
Generic
)
}
deriving
(
Eq
,
Show
,
Generic
)
instance
GQLType
ContactWho
where
instance
GQLType
ContactWho
where
...
@@ -120,7 +121,8 @@ contactWho fn ln =
...
@@ -120,7 +121,8 @@ contactWho fn ln =
,
_cw_firstName
=
Just
fn
,
_cw_firstName
=
Just
fn
,
_cw_lastName
=
Just
ln
,
_cw_lastName
=
Just
ln
,
_cw_keywords
=
[]
,
_cw_keywords
=
[]
,
_cw_freetags
=
[]
}
,
_cw_freetags
=
[]
,
_cw_description
=
Nothing
}
data
ContactWhere
=
data
ContactWhere
=
ContactWhere
{
_cw_organization
::
[
Text
]
ContactWhere
{
_cw_organization
::
[
Text
]
...
...
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