Skip to content
Snippets Groups Projects
Commit e775eff1 authored by Erik Borgeteien Hansen's avatar Erik Borgeteien Hansen
Browse files

Merge branch 'UserCardFix' into 'main'

User card fix

See merge request idatt2106_2022_02/boco-frontend!163
parents 64233157 247be354
No related branches found
No related tags found
1 merge request!163User card fix
Pipeline #182509 failed
......@@ -27,7 +27,7 @@
<!-- Buttons -->
<div class="flex flex-row gap-4">
<IconButton
v-if="buttons.includes('chat')"
v-if="buttons.includes('chat') && userID != user.userId"
@click="openChatWithUser()"
:text="'Chat'"
:buttonColor="'blue'"
......@@ -36,7 +36,7 @@
/></IconButton>
<IconButton
v-if="buttons.includes('kick')"
v-if="buttons.includes('kick') && userID != user.userId"
@click="kickUserFromCommunity()"
:buttonColor="'red'"
:text="'Spark'"
......@@ -66,6 +66,7 @@
import RatingComponent from "@/components/UserProfileComponents/RatingComponents/Rating.vue";
import IconButton from "@/components/BaseComponents/IconButton.vue";
import CommunityAdminService from "@/services/community-admin.service";
import { parseCurrentUser } from "@/utils/token-utils";
import {
ChatIcon,
......@@ -98,6 +99,9 @@ export default {
rating: Number,
},
computed: {
userID() {
return parseCurrentUser().accountId;
},
/**
* returns the user's profile picture. If the user does not have any
* profile picture the default profile picture is returned.
......
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