PDF Generator for Exercise progress
This commit is contained in:
@@ -1,14 +1,31 @@
|
||||
<script setup lang="ts">
|
||||
import scoreCard from './scoreCard.vue';
|
||||
import { useExerciseStore } from '@/stores/exercise.store';
|
||||
import outlinedButton from '@/components/basics/outlinedButton.vue';
|
||||
import { generateResultsPdf } from '@/scripts/pdfScripts';
|
||||
import { usePreferencesStore } from '@/stores/preferences.store';
|
||||
|
||||
const exerciseStore = useExerciseStore()
|
||||
const preferencesStore = usePreferencesStore()
|
||||
|
||||
exerciseStore.getAllExercises()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<v-container max-width="1000">
|
||||
<v-row>
|
||||
<v-spacer />
|
||||
|
||||
<v-col cols="auto">
|
||||
<outlined-button
|
||||
prepend-icon="mdi-file-pdf-box"
|
||||
@click="generateResultsPdf()"
|
||||
:disabled="preferencesStore.studentName.length < 3 || preferencesStore.registrationNumber.length < 7"
|
||||
>
|
||||
PDF generieren
|
||||
</outlined-button>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="exerciseStore.fetchInProgress" v-for="i in 3">
|
||||
<v-col>
|
||||
<score-card :loading="true"
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import cardView from '@/components/basics/cardView.vue';
|
||||
import { LanguageEnum } from '@/data/enums/languageEnum';
|
||||
import { ExerciseGroupApiModel } from '@/data/models/exercises/exerciseGroupApiModel';
|
||||
import { usePreferencesStore } from '@/stores/preferences.store';
|
||||
|
||||
defineProps({
|
||||
exerciseGroup: ExerciseGroupApiModel,
|
||||
loading: Boolean
|
||||
})
|
||||
|
||||
const preferencesStore = usePreferencesStore()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -37,10 +41,10 @@ defineProps({
|
||||
</v-timeline>
|
||||
</card-view>
|
||||
|
||||
<!-- todo: English -->
|
||||
<card-view
|
||||
v-else
|
||||
:title="$t('help.scoreBoard.exerciseGroupNr', [exerciseGroup.groupNr]) + exerciseGroup.nameDe"
|
||||
:title="$t('help.scoreBoard.exerciseGroupNr', [exerciseGroup.groupNr]) +
|
||||
(preferencesStore.language == LanguageEnum.GERMAN ? exerciseGroup.nameDe : exerciseGroup.nameEn)"
|
||||
:loading="loading"
|
||||
>
|
||||
<template #borderless>
|
||||
@@ -69,14 +73,14 @@ defineProps({
|
||||
type="text"
|
||||
:loading="loading"
|
||||
>
|
||||
<div class="text-center">
|
||||
<div class="text-center pb-3">
|
||||
<div class="text-h6">
|
||||
{{ exercise.nameDe }}
|
||||
{{ (preferencesStore.language == LanguageEnum.GERMAN ? exercise.nameDe : exercise.nameEn) }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- todo: English -->
|
||||
{{ exercise.descriptionDe }}
|
||||
{{ (preferencesStore.language == LanguageEnum.GERMAN ?
|
||||
exercise.descriptionDe : exercise.descriptionEn) }}
|
||||
</div>
|
||||
</div>
|
||||
</v-skeleton-loader>
|
||||
|
||||
Reference in New Issue
Block a user