Расписание стримов
- {{ parseDate(dates[0].current_date) }} - {{ parseDate(dates[1].current_date) }}
+
+ {{ parseDate(dates[0].current_date) }} - {{ parseDate(dates[1].current_date) }}
Ссылочки
@@ -12,27 +13,30 @@
import axios from "axios";
import ScheduleTable from "./Schedule/ScheduleTable.vue";
import Links from "./Schedule/Links.vue";
-import {useScheduleStore} from '../stores/Schedule.js';
export default {
name: "Schedule",
components: {Links, ScheduleTable},
data: () => ({
- dates: []
+ dates: [],
+ fetching: true
}),
methods: {
parseDate(date){
let dateArr = date.split("-");
return dateArr[2] + "." + dateArr[1];
+ },
+ async getDates(){
+ await axios
+ .get('/api/v1/dates')
+ .then(response => {
+ this.dates = response.data;
+ this.fetching = false;
+ });
}
},
mounted() {
- axios
- .get('/api/v1/dates')
- .then(response => {
- this.dates = response.data;
- useScheduleStore().fetchingDates = false;
- });
+ this.getDates();
}
}
diff --git a/resources/views/Schedule/Links.vue b/resources/views/Schedule/Links.vue
index a673dd4..42146ef 100644
--- a/resources/views/Schedule/Links.vue
+++ b/resources/views/Schedule/Links.vue
@@ -1,18 +1,18 @@