Streamlined stores

This commit is contained in:
2024-10-22 18:47:27 +02:00
parent 780ab85a9e
commit 9140765772
45 changed files with 384 additions and 387 deletions

View File

@@ -2,24 +2,21 @@
import { getAllExerciseGroups } from '@/data/api/exerciseApi';
import scoreCard from './scoreCard.vue';
import { ref } from 'vue';
import { useFeedbackStore } from '@/stores/feedbackStore';
import { ExerciseGroupApiModel } from '@/data/models/exercises/exerciseGroupApiModel';
import { usePreferencesStore } from '@/stores/preferences.store';
const exerciseGroups = ref<Array<ExerciseGroupApiModel>>([])
const feedbackStore = useFeedbackStore()
feedbackStore.fetchDataFromServerInProgress = true
const preferencesStore = usePreferencesStore()
getAllExerciseGroups()
.then(result => {
exerciseGroups.value = result.data
feedbackStore.fetchDataFromServerInProgress = false
})
</script>
<template>
<v-container max-width="1000">
<v-row v-if="feedbackStore.fetchDataFromServerInProgress" v-for="i in 3">
<v-row v-if="preferencesStore.fetchInProgress" v-for="i in 3">
<v-col>
<score-card :loading="true"
/>