Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IDATT2106 Scrum Team 02
Frontend
Commits
21bbe407
Commit
21bbe407
authored
1 year ago
by
Ingrid Martinsheimen Egge
Browse files
Options
Downloads
Patches
Plain Diff
v-modeling til faktiske verdier
parent
78ffa651
No related branches found
Branches containing commit
No related tags found
1 merge request
!21
Merge profilinnstillinger into main
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/views/ProfileSettings.vue
+17
-22
17 additions, 22 deletions
src/views/ProfileSettings.vue
with
17 additions
and
22 deletions
src/views/ProfileSettings.vue
+
17
−
22
View file @
21bbe407
...
...
@@ -9,18 +9,18 @@
<Icon
icon=
"material-symbols:person"
:color=
iconColor
:style=
"
{ fontSize: '500px'}" />
</div>
<h2>
{{
p
rofile
.
name
}}
</h2>
<h2>
{{
this
.
currentP
rofile
.
name
}}
</h2>
<button
id=
"changeUserBtn"
>
Bytt bruker
</button>
<form
@
submit.prevent=
"submit"
>
<label
for=
"brukernavn"
>
Profilnavn
</label><br>
<input
type=
"text"
required
><br>
<input
type=
"text"
required
v-model=
"this.currentProfile.name"
><br>
<br>
<h4>
Brukertype
</h4>
<input
type=
"radio"
id=
"normal"
value=
"false"
>
<input
type=
"radio"
id=
"normal"
value=
"false"
v-model=
"this.currentProfile.isRestricted"
>
<label
for=
"normal"
>
Standard
</label><br>
<input
type=
"radio"
id=
"restricted"
value=
"true"
>
<input
type=
"radio"
id=
"restricted"
value=
"true"
v-model=
"this.currentProfile.isRestricted"
>
<label
for=
"restricted"
>
Begrenset - Kan ikke redigere ukeplan eller handleliste
</label><br>
<br>
...
...
@@ -42,8 +42,8 @@
</form>
<h1>
App-innstillinger
</h1>
<!--
<h1>
App-innstillinger
</h1>
<form
@
submit.prevent=
"submit"
>
<h2>
-Matpreferanser-
</h2>
...
...
@@ -69,7 +69,7 @@
<button
class=
"saveBtn"
@
click=
"saveFoodPreference"
>
Lagre matpreferanser
<br>
og allergener
</button>
</form>
-->
<h1>
Konto-innstillinger
</h1>
<form
@
submit.prevent=
"submit"
>
...
...
@@ -115,21 +115,17 @@ import { useAuthStore } from "@/stores/authStore";
export
default
{
name
:
"
ProfileSettings
"
,
components
:
{
Icon
},
setup
()
{
//const store = useAuthStore();
//this.curruser= store.user;
},
computed
:
{
...
mapStores
(
useAuthStore
),
profile
()
{
const
store
=
useAuthStore
();
this
.
currentProfile
.
name
=
store
.
profile
.
name
;
this
.
currentProfile
.
isRestricted
=
store
.
profile
.
restricted
;
return
store
.
profile
},
currentUser
()
{
//return store.user;
},
currentProfile
()
{
//return store.profile;
user
()
{
const
store
=
useAuthStore
();
return
store
.
user
},
iconColor
()
{
return
"
#000000
"
...
...
@@ -141,18 +137,16 @@ export default {
},
data
()
{
return
{
curruser
:
""
,
/*user: {
id: "",
currentUser
:
{
username
:
"
petter@hello.no
"
,
password
:
""
,
},
qp
rofile: {
name: "
Petter
",
isRestricted:
fals
e,
currentP
rofile
:
{
name
:
""
,
isRestricted
:
tru
e
,
image
:
"
../components/images/w66XcIlw.jpeg
"
,
},
*/
},
foodPreferences
:
[],
allergens
:
[],
deletionConfirmation
:
false
,
...
...
@@ -166,6 +160,7 @@ export default {
},
methods
:
{
saveUserSettings
(){
console
.
log
(
this
.
currentProfile
.
isRestricted
)
alert
(
"
(Denne knappen gjør ingen ting) brukerinnstillinger lagret!
"
)
API
.
updateProfile
(
this
.
user
.
id
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment