testing fetch with cohorts
This commit is contained in:
@@ -5,6 +5,9 @@ v-container#home(fluid)
|
|||||||
#announcements.mx-1.mt-1(v-if='announcements.length')
|
#announcements.mx-1.mt-1(v-if='announcements.length')
|
||||||
Announcement(v-for='announcement in announcements' :key='`a_${announcement.id}`' :announcement='announcement')
|
Announcement(v-for='announcement in announcements' :key='`a_${announcement.id}`' :announcement='announcement')
|
||||||
|
|
||||||
|
.mb-1.mt-3
|
||||||
|
v-btn(v-for='cohort in cohorts' text color='primary' :key='cohort.id' :to='`g/${cohort.name}`' v-text='cohort.name')
|
||||||
|
|
||||||
//- Calendar and search bar
|
//- Calendar and search bar
|
||||||
v-row.pt-0.pt-sm-2.pl-0.pl-sm-2
|
v-row.pt-0.pt-sm-2.pl-0.pl-sm-2
|
||||||
#calh.col-xl-5.col-lg-5.col-md-7.col-sm-12.col-xs-12.pa-4.pa-sm-3
|
#calh.col-xl-5.col-lg-5.col-md-7.col-sm-12.col-xs-12.pa-4.pa-sm-3
|
||||||
@@ -48,6 +51,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
mdiCloseCircle,
|
mdiCloseCircle,
|
||||||
first: true,
|
first: true,
|
||||||
|
cohorts: [],
|
||||||
isCurrentMonth: true,
|
isCurrentMonth: true,
|
||||||
now: dayjs().unix(),
|
now: dayjs().unix(),
|
||||||
date: dayjs.tz().format('YYYY-MM-DD'),
|
date: dayjs.tz().format('YYYY-MM-DD'),
|
||||||
@@ -57,6 +61,9 @@ export default {
|
|||||||
selectedDay: null
|
selectedDay: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async fetch () {
|
||||||
|
this.cohorts = await this.$axios.$get('cohorts')
|
||||||
|
},
|
||||||
head () {
|
head () {
|
||||||
return {
|
return {
|
||||||
title: this.settings.title,
|
title: this.settings.title,
|
||||||
@@ -73,7 +80,6 @@ export default {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['settings', 'announcements', 'filters']),
|
...mapState(['settings', 'announcements', 'filters']),
|
||||||
filteredEvents () {
|
filteredEvents () {
|
||||||
|
|||||||
Reference in New Issue
Block a user