Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
community
pount
pount-front
Commits
cd52def6
Commit
cd52def6
authored
Aug 19, 2021
by
Jean Rabreau
Browse files
💄
don't show labs fields if internal has none.
parent
a5926646
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/components/profile/ProfileFormPersonalInfo.vue
View file @
cd52def6
<
template
>
<v-form
ref=
"personalInfoForm"
>
<fieldset
:disabled=
"!isExternal"
>
<legend>
{{
$t
(
'
profile.personalInfo
'
)
}}
</legend>
<legend
id=
"personal__infos"
>
{{
$t
(
'
profile.personalInfo
'
)
}}
</legend>
<v-col>
<v-text-field
v-model=
"newPersonalInfo.firstName"
...
...
@@ -23,15 +23,14 @@
:rules=
"requiredField"
/>
</v-col>
<fieldset>
<v-col>
<v-textarea
v-model=
"newPersonalInfo.info.bio"
:label=
"$t('profile.bio')"
/>
</v-col>
</fieldset>
</fieldset>
<v-col>
<v-textarea
v-model=
"newPersonalInfo.info.bio"
:label=
"$t('profile.bio')"
/>
</v-col>
<fieldset>
<legend>
Affiliations
</legend>
<fieldset
:disabled=
"!isExternal"
>
...
...
@@ -45,7 +44,7 @@
</v-col>
</fieldset>
<fieldset
:disabled=
"!isExternal"
>
<fieldset
:disabled=
"!isExternal"
v-if=
"labDisplay"
>
<legend>
{{
$t
(
'
profile.researchLab.field
'
)
}}
<div
v-if=
"isExternal"
>
...
...
@@ -132,9 +131,14 @@ export default {
default
:
false
,
},
},
data
:
()
=>
({
newPersonalInfo
:
{},
}),
data
()
{
return
{
labDisplay
:
this
.
isExternal
||
!!
this
.
personalInfo
.
info
.
researchLabs
.
length
,
newPersonalInfo
:
{
...
this
.
personalInfo
},
}
},
methods
:
{
onSubmit
()
{
if
(
this
.
$refs
.
personalInfoForm
.
validate
())
{
...
...
@@ -150,20 +154,9 @@ export default {
})
},
removeLab
()
{
const
labs
=
this
.
newPersonalInfo
.
info
.
researchLabs
if
(
labs
.
length
<
2
)
{
const
lastLab
=
labs
[
0
]
for
(
const
key
in
lastLab
)
{
lastLab
[
key
]
=
''
}
}
else
{
labs
.
pop
()
}
this
.
newPersonalInfo
.
info
.
researchLabs
.
pop
()
}
},
created
()
{
this
.
newPersonalInfo
=
this
.
personalInfo
},
};
</
script
>
...
...
src/views/Profile.vue
View file @
cd52def6
...
...
@@ -12,9 +12,7 @@
<profile-form
ref=
"profileForm"
:personalInfo.sync=
"personalInfo"
:email.sync=
"email"
:is-external=
"isExternal"
@
change-password=
"onChangePassword"
/>
<v-dialog
v-if=
"isExternal"
v-model=
"passModal"
>
<template
v-slot:activator=
"
{ attrs }">
...
...
Write
Preview
Supports
Markdown
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