Skip to content
Snippets Groups Projects
Commit afa83852 authored by Julian's avatar Julian
Browse files

Show laoding animation in main coursebook view

parent 8d0ec93b
No related branches found
No related tags found
2 merge requests!352Draft: Resolve "Add dialog with each lesson's students",!350Resolve "Add simple course book list"
Pipeline #170947 failed
<template> <template>
<c-r-u-d-iterator <c-r-u-d-iterator
i18n-key="coursebook" i18n-key="coursebook"
:gql-query="gqlQuery" :gql-query="gqlQuery"
:gql-additional-query-args="gqlQueryArgs" :gql-additional-query-args="gqlQueryArgs"
:enable-create="false" :enable-create="false"
:enable-edit="false" :enable-edit="false"
@lastQuery="lastQuery = $event" @lastQuery="lastQuery = $event"
ref="iterator"
> >
<template #additionalActions="{ attrs, on }"> <template #additionalActions="{ attrs, on }">
<v-autocomplete <v-autocomplete
:items="selectable" :items="selectable"
item-text="name" item-text="name"
clearable clearable
return-object return-object
filled filled
dense dense
hide-details hide-details
@input="changeSelection" :loading="selectLoading"
@input="changeSelection"
/> />
</template> </template>
<template #default="{ items }"> <template #default="{ items }">
<v-list-item v-for="day in groupDocsByDay(items)" two-line> <template v-if="!$refs.iterator.loading">
<v-list-item-content> <v-list-item v-for="day in groupDocsByDay(items)" two-line>
<v-list-item-title>{{ $d(day[0], "short") }}</v-list-item-title> <v-list-item-content>
<v-list max-width="100%"> <v-list-item-title>{{ $d(day[0], "short") }}</v-list-item-title>
<v-list-item v-for="doc in day.slice(1)"> <v-list max-width="100%">
<documentation-modal <v-list-item v-for="doc in day.slice(1)">
:documentation="doc" <documentation-modal
:affected-query="lastQuery" :documentation="doc"
/> :affected-query="lastQuery"
</v-list-item> />
</v-list> </v-list-item>
</v-list-item-content> </v-list>
</v-list-item> </v-list-item-content>
</v-list-item>
</template>
<template v-else>
<v-list-item v-for="_ in 10">
<v-list-item-content>
<v-list-item-title>
<v-skeleton-loader type="heading"/>
</v-list-item-title>
<v-list max-width="100%">
<v-list-item v-for="_ in 5">
<v-card class="my-2 full-width">
<div class="full-width d-flex flex-column align-stretch flex-md-row">
<v-card-text>
<v-skeleton-loader
type="avatar, heading, chip"
class="d-flex full-width align-center gap"
height="100%"
/>
</v-card-text>
<v-card-text>
<v-skeleton-loader
type="heading@2"
class="d-flex full-width align-center gap"
height="100%"
/>
</v-card-text>
<v-card-text>
<v-skeleton-loader
type="chip@3"
class="d-flex full-width align-center justify-end gap"
height="100%"
/>
</v-card-text>
</div>
</v-card>
</v-list-item>
</v-list>
</v-list-item-content>
</v-list-item>
</template>
</template> </template>
</c-r-u-d-iterator> </c-r-u-d-iterator>
</template> </template>
...@@ -114,6 +156,9 @@ export default { ...@@ -114,6 +156,9 @@ export default {
...this.courses.map((course) => ({ type: "course", ...course })), ...this.courses.map((course) => ({ type: "course", ...course })),
]; ];
}, },
selectLoading() {
return this.$apollo.queries.groups.loading || this.$apollo.queries.courses.loading;
}
}, },
methods: { methods: {
changeSelection(selection) { changeSelection(selection) {
......
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