Browse Source

Add Chart.vue and Table.vue

No login or actions, only the routing elements
main
Haris Razis 4 years ago
parent
commit
77641ee517
  1. 25
      web/src/router/index.ts
  2. 21
      web/src/views/Chart.vue
  3. 21
      web/src/views/Table.vue

25
web/src/router/index.ts

@ -41,6 +41,31 @@ const routes: Array<RouteRecordRaw> = [
name: 'Athlete', name: 'Athlete',
component: () => import('../views/Athlete.vue') component: () => import('../views/Athlete.vue')
}, },
{
path: 'athletes/:id/table',
name: 'Table',
component: () => import('../views/Table.vue')
},
{
path: 'athletes/:id/chart',
name: 'Chart',
component: () => import('../views/Chart.vue')
},
{
path: 'guide',
name: 'Guide',
component: () => import('../views/DashboardHome.vue')
},
{
path: 'ticket',
name: 'Ticket',
component: () => import('../views/DashboardHome.vue')
},
{
path: 'docs',
name: 'Docs',
component: () => import('../views/DashboardHome.vue')
},
], ],
meta: { meta: {
requiresAuth: true requiresAuth: true

21
web/src/views/Chart.vue

@ -0,0 +1,21 @@
<template>
<h1 class="title is-2">/athletes/{{ athlete.name }}/chart</h1>
</template>
<script lang="ts">
import {Vue} from 'vue-class-component';
import {AthleteInterface} from "@/store/modules/athletes";
export default class Chart extends Vue {
private athlete = <AthleteInterface>{}
mounted() {
this.athlete = this.$store.getters.currentAthlete
}
}
</script>
<style scoped>
</style>

21
web/src/views/Table.vue

@ -0,0 +1,21 @@
<template>
<h1 class="title is-2">/athletes/{{ athlete.name }}/table</h1>
</template>
<script lang="ts">
import {Vue} from 'vue-class-component';
import {AthleteInterface} from "@/store/modules/athletes";
export default class Table extends Vue {
private athlete = <AthleteInterface>{}
mounted() {
this.athlete = this.$store.getters.currentAthlete
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save