skillbox/client/src/pages/me/myTeam.vue

77 lines
1.7 KiB
Vue

<template>
<div class="my-team">
<template v-if="me.team">
<group-list
:active-members="me.team.members"
:can-edit="true"
:show-code-route="showCodeRoute"
:show-code="true"
:name="me.team.name"
title="Mein Team"
/>
</template>
<template v-else>
<h1 class="my-team__heading">Mein Team {{ me.team }}</h1>
<div class="my-team__section">
<h2 class="my-team__subheading">Willst du einem bestehenden Team beitreten?</h2>
<router-link
:to="joinTeamRoute"
class="button button--primary">Zugangscode eingeben
</router-link>
</div>
<div class="my-team__section">
<h2 class="my-team__subheading">Willst du ein neues Team erfassen?</h2>
<router-link
:to="createTeamRoute"
class="button button--primary">Team erfassen
</router-link>
</div>
</template>
</div>
</template>
<script>
import {CREATE_TEAM, JOIN_TEAM, SHOW_TEAM_CODE} from '@/router/me.names';
import me from '@/mixins/me';
import GroupList from '@/components/profile/GroupList';
export default {
mixins: [me],
components: {GroupList},
data() {
return {
joinTeamRoute: {
name: JOIN_TEAM,
},
createTeamRoute: {
name: CREATE_TEAM,
},
showCodeRoute: {
name: SHOW_TEAM_CODE
}
};
},
};
</script>
<style scoped lang="scss">
@import '~styles/helpers';
.my-team {
&__heading {
margin-bottom: $section-spacing;
}
&__section {
margin-bottom: $section-spacing;
}
&__subheading {
@include heading-3;
margin-bottom: $large-spacing;
}
}
</style>