Skip to content
Snippets Groups Projects
Commit 78ffa651 authored by Ingrid Martinsheimen Egge's avatar Ingrid Martinsheimen Egge :cow2:
Browse files

store

parent 3c896e5c
No related branches found
No related tags found
1 merge request!21Merge profilinnstillinger into main
......@@ -9,12 +9,12 @@
<Icon icon="material-symbols:person" :color=iconColor :style="{ fontSize: '500px'}" />
</div>
<h2>{{currentProfile.name}}</h2>
<h2>{{profile.name}}</h2>
<button id="changeUserBtn" >Bytt bruker</button>
<form @submit.prevent="submit">
<label for="brukernavn">Profilnavn</label><br>
<input type="text" required v-model="currentProfile.name"><br>
<input type="text" required><br>
<br>
<h4>Brukertype</h4>
<input type="radio" id="normal" value="false">
......@@ -76,7 +76,6 @@
<p class="infoText">OBS: Kontakt admin dersom du ønsker å oppdatere epost</p><br>
<p>Epost:</p>
<p>{{userStore.user.email}}</p><br>
<label for="password">Endre passord</label><br>
<input type="password" id="password" >
......@@ -99,29 +98,38 @@
<br><br><br>
</main>
</template>
<script setup>
<script>
</script>
<script>
import {mapStores} from "pinia";
import {Icon} from "@iconify/vue";
import {API} from "@/util/API";
import {mapState, mapStores} from "pinia";
//import {useAuthStore} from "../stores/authStore";
import { useAuthStore } from "@/stores/authStore";
export default {
name: "ProfileSettings",
components: {Icon},
setup() {
const userStore = useAuthStore()
return {...mapStores(userStore)}
//const store = useAuthStore();
//this.curruser= store.user;
},
computed: {
...mapStores(useAuthStore),
profile() {
const store = useAuthStore();
return store.profile
},
currentUser() {
const store = useAuthStore()
return store.user;
//return store.user;
},
currentProfile() {
const store = useAuthStore()
return store.profile;
//return store.profile;
},
iconColor() {
return "#000000"
......@@ -133,6 +141,7 @@ export default {
},
data() {
return {
curruser : "",
/*user: {
id: "",
username: "petter@hello.no",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment