|
@ -1,5 +1,5 @@ |
|
|
<template> |
|
|
<template> |
|
|
<h1 class="title is-2">Athletes</h1> |
|
|
<h1 class="title is-2">/athletes</h1> |
|
|
<div class="tile"> |
|
|
<div class="tile"> |
|
|
<table |
|
|
<table |
|
|
class="table |
|
|
class="table |
|
@ -11,24 +11,22 @@ has-text-left" |
|
|
> |
|
|
> |
|
|
<thead> |
|
|
<thead> |
|
|
<tr> |
|
|
<tr> |
|
|
<th>Athlete id</th> |
|
|
<th><span class="icon mr-1"><i class="fa fa-id-card"></i></span> |
|
|
<th>Name</th> |
|
|
Athlete id |
|
|
|
|
|
</th> |
|
|
|
|
|
<th><span class="icon mr-1"><i class="fas fa-running"></i></span> |
|
|
|
|
|
Name |
|
|
|
|
|
</th> |
|
|
<th>Trainer</th> |
|
|
<th>Trainer</th> |
|
|
<th>Actions</th> |
|
|
<th>Actions</th> |
|
|
</tr> |
|
|
</tr> |
|
|
</thead> |
|
|
</thead> |
|
|
<tr v-for="(athlete, index) in athletes" :key="index"> |
|
|
<tr v-for="(athlete, index) in athletes" :key="index"> |
|
|
<td class="is-family-monospace"> |
|
|
<td class="is-family-monospace"> |
|
|
<span class="icon-text"> |
|
|
|
|
|
<span class="icon mr-1"><i class="fa fa-id-card"></i></span> |
|
|
|
|
|
<span>{{ athlete.id }}</span> |
|
|
<span>{{ athlete.id }}</span> |
|
|
</span> |
|
|
|
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<span class="icon-text"> |
|
|
|
|
|
<span class="icon mr-1"><i class="fa fa-signature"></i></span> |
|
|
|
|
|
<span>{{ athlete.name }}</span> |
|
|
<span>{{ athlete.name }}</span> |
|
|
</span> |
|
|
|
|
|
</td> |
|
|
</td> |
|
|
<td v-if="athlete._trainer"> |
|
|
<td v-if="athlete._trainer"> |
|
|
<span class="icon mr-1"><i class="fa fa-check"></i></span> |
|
|
<span class="icon mr-1"><i class="fa fa-check"></i></span> |
|
@ -38,10 +36,21 @@ has-text-left" |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
<td> |
|
|
<router-link :to="{ name: 'Athlete', params: { id: athlete._id }}" @click="saveAthlete(athlete)"> |
|
|
<router-link :to="{ name: 'Athlete', params: { id: athlete._id }}" @click="saveAthlete(athlete)"> |
|
|
<span class="icon has-text-primary-dark"> |
|
|
<span class="icon is-medium has-background-warning has-text-white mr-1"> |
|
|
<i class="fa fa-2x fa-user-edit"></i> |
|
|
<i class="fa fa-lg fa-user-edit"></i> |
|
|
</span> |
|
|
</span> |
|
|
</router-link> |
|
|
</router-link> |
|
|
|
|
|
<router-link :to="{ name: 'Table', params: { id: athlete._id }}" @click="saveAthlete(athlete)"> |
|
|
|
|
|
<span class="icon is-medium has-background-primary has-text-white mr-1"> |
|
|
|
|
|
<i class="fa fa-lg fa-table"></i> |
|
|
|
|
|
</span> |
|
|
|
|
|
</router-link> |
|
|
|
|
|
<router-link :to="{ name: 'Chart', params: { id: athlete._id }}" @click="saveAthlete(athlete)"> |
|
|
|
|
|
<span class="icon is-medium has-background-primary has-text-white mr-1"> |
|
|
|
|
|
<i class="fa fa-lg fa-chart-area"></i> |
|
|
|
|
|
</span> |
|
|
|
|
|
</router-link> |
|
|
|
|
|
|
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
</table> |
|
|
</table> |
|
@ -51,7 +60,6 @@ has-text-left" |
|
|
<script lang="ts"> |
|
|
<script lang="ts"> |
|
|
import {Vue} from "vue-class-component"; |
|
|
import {Vue} from "vue-class-component"; |
|
|
import {AthleteInterface} from "@/store/modules/athletes"; |
|
|
import {AthleteInterface} from "@/store/modules/athletes"; |
|
|
import {UserInterface} from "@/store/modules/user"; |
|
|
|
|
|
|
|
|
|
|
|
export default class Athletes extends Vue { |
|
|
export default class Athletes extends Vue { |
|
|
private athletes = [<AthleteInterface>{}] |
|
|
private athletes = [<AthleteInterface>{}] |
|
|