Only show the list with teams if there are any teams

This commit is contained in:
kolaente 2021-01-08 23:07:17 +01:00
parent aa427c7a7d
commit 36f5f0eabc
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -1,19 +1,21 @@
<template> <template>
<div class="content loader-container is-max-width-desktop" v-bind:class="{ 'is-loading': teamService.loading}"> <div class="content loader-container is-max-width-desktop" v-bind:class="{ 'is-loading': teamService.loading}">
<router-link :to="{name:'teams.create'}" class="button is-success button-right"> <router-link :to="{name:'teams.create'}" class="button is-primary button-right">
<span class="icon is-small"> <span class="icon is-small">
<icon icon="plus"/> <icon icon="plus"/>
</span> </span>
New Team New Team
</router-link> </router-link>
<h1>Teams</h1> <h1>Teams</h1>
<ul class="teams box"> <ul class="teams box" v-if="teams.length > 0">
<li :key="t.id" v-for="t in teams"> <li :key="t.id" v-for="t in teams">
<router-link :to="{name: 'teams.edit', params: {id: t.id}}"> <router-link :to="{name: 'teams.edit', params: {id: t.id}}">
{{ t.name }} {{ t.name }}
</router-link> </router-link>
</li> </li>
</ul> </ul>
<p v-else class="has-text-centered has-text-grey">You are currently not part of any teams.</p>
</div> </div>
</template> </template>