From d128e6f90aeaae593e263d6d41441656ac6e3901 Mon Sep 17 00:00:00 2001 From: Dhaverd Date: Sat, 20 Apr 2024 01:07:52 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=D0=97=D0=B0=D0=BF=D0=B8=D0=BB=D0=B8=D0=BB?= =?UTF-8?q?=20=D1=81=D1=82=D0=BE=D1=80=20=D0=B4=D0=BB=D1=8F=20=D1=80=D0=B0?= =?UTF-8?q?=D1=81=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D1=8F=20=D1=81=D1=82?= =?UTF-8?q?=D1=80=D0=B8=D0=BC=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/stores/{Schedule.js => schedule.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename resources/stores/{Schedule.js => schedule.js} (100%) diff --git a/resources/stores/Schedule.js b/resources/stores/schedule.js similarity index 100% rename from resources/stores/Schedule.js rename to resources/stores/schedule.js From e04bc5ba98826919b2987b1a72cf4fc7e6b907aa Mon Sep 17 00:00:00 2001 From: Dhaverd Date: Sat, 20 Apr 2024 01:08:18 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=D0=97=D0=B0=D0=BF=D0=B8=D0=BB=D0=B8=D0=BB?= =?UTF-8?q?=20=D1=81=D1=82=D0=BE=D1=80=20=D0=B4=D0=BB=D1=8F=20=D1=80=D0=B0?= =?UTF-8?q?=D1=81=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D1=8F=20=D1=81=D1=82?= =?UTF-8?q?=D1=80=D0=B8=D0=BC=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/stores/schedule.js | 28 +++++++++++++++++++--- resources/views/Schedule.vue | 19 +++++++-------- resources/views/Schedule/Links.vue | 16 ++++++------- resources/views/Schedule/ScheduleTable.vue | 16 ++++++------- 4 files changed, 49 insertions(+), 30 deletions(-) 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 @@ From 35a93c343e0ae864262b816b2c0b4114ef42962a Mon Sep 17 00:00:00 2001 From: Dhaverd Date: Sat, 20 Apr 2024 16:12:45 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=BD=D0=B5=D1=81?= =?UTF-8?q?=20=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D1=8B=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=B1=D1=8D=D0=BA=20=D0=B8=D0=B7=20basya=20=D0=B2=20=D1=81?= =?UTF-8?q?=D1=82=D0=BE=D1=80=20pinia?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/basya.js | 5 ++++- resources/stores/basya.js | 20 ++++++++++++++++++++ resources/stores/schedule.js | 2 +- resources/views/basya/Basya.vue | 18 +++++++++--------- 4 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 resources/stores/basya.js diff --git a/resources/basya.js b/resources/basya.js index 2cb0e3d..2db730f 100644 --- a/resources/basya.js +++ b/resources/basya.js @@ -1,5 +1,6 @@ import './js/bootstrap'; import {createApp} from 'vue' +import { createPinia } from 'pinia' import App from './views/basya/Basya.vue' import { createVuetify } from 'vuetify' import { mdi } from "vuetify/iconsets/mdi"; @@ -8,9 +9,11 @@ import * as components from 'vuetify/components' import * as directives from 'vuetify/directives' import '@mdi/font/css/materialdesignicons.css' +const pinia = createPinia(); + const vuetify = createVuetify({ components, directives }) -createApp(App).use(vuetify).mount("#app") +createApp(App).use(vuetify).use(pinia).mount("#app") diff --git a/resources/stores/basya.js b/resources/stores/basya.js new file mode 100644 index 0000000..e0e281c --- /dev/null +++ b/resources/stores/basya.js @@ -0,0 +1,20 @@ +import {defineStore} from "pinia"; +import axios from "axios"; + +export const useBasyaStore = defineStore('basya', { + state: () => ({ + phrases: Object + }), + getters: { + + }, + actions: { + async getPhrases(){ + await axios + .get('/api/v1/phrases') + .then((response) => { + this.phrases = response.data; + }); + } + }, +}) diff --git a/resources/stores/schedule.js b/resources/stores/schedule.js index 40ab9b0..8715282 100644 --- a/resources/stores/schedule.js +++ b/resources/stores/schedule.js @@ -1,7 +1,7 @@ import {defineStore} from "pinia"; import axios from "axios"; -export const useScheduleStore = defineStore('Schedule', { +export const useScheduleStore = defineStore('schedule', { state: () => ({ dates: Object, links: Object, diff --git a/resources/views/basya/Basya.vue b/resources/views/basya/Basya.vue index 905413a..36cc44d 100644 --- a/resources/views/basya/Basya.vue +++ b/resources/views/basya/Basya.vue @@ -34,7 +34,8 @@