Skip to content
Snippets Groups Projects
Commit c7458331 authored by permcu's avatar permcu
Browse files

Add loading placeholders

Not shure if they should be kept insided the main
StatisticsForPersonCard or pushed into the subcomponents.

Previously there was a statistics undefined error while apollo was
still loading.
parent e6b33a2a
No related branches found
No related tags found
1 merge request!361Resolve "Add statistics page for absences"
<template>
<v-card>
<v-card-title v-if="compact">
<v-skeleton-loader v-if="$apollo.loading"
type="card-heading"
/>
<v-card-title v-else-if="compact">
{{ $t("alsijil.coursebook.statistics.person_compact.title") }}
<v-spacer />
<!-- TODO: Maximize button -->
......@@ -8,19 +11,30 @@
<v-card-title v-else>
{{ $t("alsijil.coursebook.statistics.person_page.title") }}
</v-card-title>
<statistics-absences-card
<v-skeleton-loader v-if="$apollo.loading"
type="card"
/>
<statistics-absences-card v-else
:absence-reasons="statistics.absenceReasons"
/>
<statistics-tardiness-card
<v-skeleton-loader v-if="$apollo.loading"
type="card"
/>
<statistics-tardiness-card v-else
:tardiness-sum="statistics.tardinessSum"
:tardiness-count="statistics.tardinessCount"
/>
<statistics-extra-marks-card
<v-skeleton-loader v-if="$apollo.loading"
type="card"
/>
<statistics-extra-marks-card v-else
:extra-marks="statistics.extraMarks"
/>
<statistics-personal-notes-list
v-if="compact"
<v-skeleton-loader v-if="compact && $apollo.loading"
type="card"
/>
<statistics-personal-notes-list v-else-if="compact" />
</v-card>
</template>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment