Remove EventTable in database, redesign frontend URL paths

This commit is contained in:
2024-10-12 15:54:03 +02:00
parent 7b991d2ff8
commit 60e217db03
40 changed files with 955 additions and 1203 deletions

View File

@@ -0,0 +1,37 @@
<script setup lang="ts">
import { getAllExerciseGroups } from '@/data/api/exerciseApi';
import scoreCard from './scoreCard.vue';
import { ref } from 'vue';
import { ExerciseGroupModel } from '@/data/models/exercises/exerciseGroupModel';
import { useFeedbackStore } from '@/data/stores/feedbackStore';
const exerciseGroups = ref<Array<ExerciseGroupModel>>([])
const feedbackStore = useFeedbackStore()
feedbackStore.fetchDataFromServerInProgress = true
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-col>
<score-card :loading="true"
/>
</v-col>
</v-row>
<v-row v-for="exerciseGroup in exerciseGroups">
<v-col>
<score-card
:exercise-group="exerciseGroup"
/>
</v-col>
</v-row>
</v-container>
</template>

View File

@@ -0,0 +1,86 @@
<script setup lang="ts">
import cardView from '@/components/basics/cardView.vue';
import { ExerciseGroupModel } from '@/data/models/exercises/exerciseGroupModel';
defineProps({
exerciseGroup: ExerciseGroupModel,
loading: Boolean
})
</script>
<template>
<card-view v-if="loading" :loading="loading" >
<v-timeline
direction="horizontal"
side="start"
class="pb-3"
>
<v-timeline-item
v-for="i in 3"
dot-color="grey"
icon="mdi-pencil"
>
<v-skeleton-loader
type="list-item"
:loading="loading"
width="200"
/>
<template #opposite>
<v-skeleton-loader
type="sentences"
:loading="loading"
width="200"
/>
</template>
</v-timeline-item>
</v-timeline>
</card-view>
<card-view
v-else
:title="$t('exerciseGroup') + ' ' + exerciseGroup.groupNr + ': ' + exerciseGroup.nameDe"
:loading="loading"
>
<v-timeline
direction="horizontal"
side="start"
class="pb-3"
>
<v-timeline-item
v-for="exercise in exerciseGroup.exercises"
:dot-color="exercise.solved ? 'green' : 'grey'"
:icon="exercise.solved ? 'mdi-check' : 'mdi-pencil'"
>
<v-skeleton-loader
type="text"
:loading="loading"
>
<div class="text-h6">
{{ $t('exercise') }} {{ exercise.exerciseNr }}
</div>
</v-skeleton-loader>
<template #opposite>
<v-skeleton-loader
type="text"
:loading="loading"
>
<div class="text-center">
<div class="text-h6">
{{ exercise.nameDe }}
</div>
<div>
{{ exercise.descriptionDe }}
</div>
</div>
</v-skeleton-loader>
</template>
</v-timeline-item>
</v-timeline>
</card-view>
</template>