40 lines
864 B
Vue
40 lines
864 B
Vue
<template>
|
|
<section>
|
|
Filter
|
|
</section>
|
|
<section>
|
|
<div class="controls">
|
|
<button>Refresh</button>
|
|
<router-link to="/register">Register as Coach</router-link>
|
|
</div>
|
|
<ul v-if="hasCoaches">
|
|
<coach-item
|
|
v-for="coach in coaches"
|
|
:key="coach.id"
|
|
:id="coach.id"
|
|
:firstName="coach.firstName"
|
|
:lastName="coach.lastName"
|
|
:areas="coach.areas"
|
|
:rate="coach.hourlyRate"
|
|
></coach-item>
|
|
</ul>
|
|
<h3 v-else>No coaches found.</h3>
|
|
</section>
|
|
</template>
|
|
|
|
<script>
|
|
import CoachItem from '../../components/coaches/CoachItem.vue';
|
|
|
|
export default {
|
|
components: { CoachItem },
|
|
computed: {
|
|
filteredCoaches() {
|
|
return this.$store.getters['coaches/coaches'];
|
|
},
|
|
hasCoaches() {
|
|
return this.$store.getters['coaches/hasCoaches'];
|
|
}
|
|
}
|
|
};
|
|
</script>
|