diff --git a/resources/stores/schedule.js b/resources/stores/schedule.js index 8c07e3c..40ab9b0 100644 --- a/resources/stores/schedule.js +++ b/resources/stores/schedule.js @@ -1,15 +1,37 @@ import {defineStore} from "pinia"; +import axios from "axios"; export const useScheduleStore = defineStore('Schedule', { state: () => ({ - fetchingDates: true, - fetchingTable: true, - fetchingLinks: true + dates: Object, + links: Object, + schedules: Object }), getters: { }, actions: { + async getDates(){ + await axios + .get('/api/v1/dates') + .then((response) => { + this.dates = response.data; + }); + }, + async getLinks(){ + await axios + .get('/api/v1/links') + .then((response)=>{ + this.links = response.data; + }) + }, + async getSchedules(){ + await axios + .get('/api/v1/schedules') + .then((response)=>{ + this.schedules = response.data; + }) + } }, }) diff --git a/resources/views/Schedule.vue b/resources/views/Schedule.vue index 803da12..2105671 100644 --- a/resources/views/Schedule.vue +++ b/resources/views/Schedule.vue @@ -10,33 +10,30 @@ diff --git a/resources/views/Schedule/Links.vue b/resources/views/Schedule/Links.vue index 30d62ab..3fb6ce0 100644 --- a/resources/views/Schedule/Links.vue +++ b/resources/views/Schedule/Links.vue @@ -1,22 +1,22 @@