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

TMP (DEL ME) Add AbsenceCreationDialog to Coursebook for testing

until absences page in coursebook is ready.
parent 347a9c05
No related branches found
No related tags found
1 merge request!356Add dialog for creation of long-term absences
Pipeline #189531 failed
<template>
<c-r-u-d-iterator
i18n-key="alsijil.coursebook"
:gql-query="gqlQuery"
:gql-additional-query-args="gqlQueryArgs"
:enable-create="false"
:enable-edit="false"
:elevated="false"
@lastQuery="lastQuery = $event"
ref="iterator"
fixed-header
disable-pagination
hide-default-footer
use-deep-search
>
<template #additionalActions="{ attrs, on }">
<coursebook-filters v-model="filters" />
</template>
<template #default="{ items }">
<coursebook-loader />
<coursebook-day
v-for="{ date, docs, first, last } in groupDocsByDay(items)"
v-intersect="{
handler: intersectHandler(date, first, last),
options: {
rootMargin: '-' + topMargin + 'px 0px 0px 0px',
threshold: [0, 1],
},
}"
:date="date"
:docs="docs"
:lastQuery="lastQuery"
:focus-on-mount="initDate && initDate.toMillis() === date.toMillis()"
@init="transition"
:key="'day-' + date"
ref="days"
/>
<coursebook-loader />
<div>
<c-r-u-d-iterator
i18n-key="alsijil.coursebook"
:gql-query="gqlQuery"
:gql-additional-query-args="gqlQueryArgs"
:enable-create="false"
:enable-edit="false"
:elevated="false"
@lastQuery="lastQuery = $event"
ref="iterator"
fixed-header
disable-pagination
hide-default-footer
use-deep-search
>
<template #additionalActions="{ attrs, on }">
<coursebook-filters v-model="filters" />
</template>
<template #default="{ items }">
<coursebook-loader />
<coursebook-day
v-for="{ date, docs, first, last } in groupDocsByDay(items)"
v-intersect="{
handler: intersectHandler(date, first, last),
options: {
rootMargin: '-' + topMargin + 'px 0px 0px 0px',
threshold: [0, 1],
},
}"
:date="date"
:docs="docs"
:lastQuery="lastQuery"
:focus-on-mount="initDate && initDate.toMillis() === date.toMillis()"
@init="transition"
:key="'day-' + date"
ref="days"
/>
<coursebook-loader />
<date-select-footer
:value="currentDate"
@input="gotoDate"
@prev="gotoPrev"
@next="gotoNext"
/>
</template>
<template #loading>
<coursebook-loader :number-of-days="10" :number-of-docs="5" />
</template>
<date-select-footer
:value="currentDate"
@input="gotoDate"
@prev="gotoPrev"
@next="gotoNext"
/>
</template>
<template #loading>
<coursebook-loader :number-of-days="10" :number-of-docs="5" />
</template>
<template #no-data>
<CoursebookEmptyMessage icon="mdi-book-off-outline">
{{ $t("alsijil.coursebook.no_data") }}
</CoursebookEmptyMessage>
</template>
<template #no-data>
<CoursebookEmptyMessage icon="mdi-book-off-outline">
{{ $t("alsijil.coursebook.no_data") }}
</CoursebookEmptyMessage>
</template>
<template #no-results>
<CoursebookEmptyMessage icon="mdi-book-alert-outline">
{{
$t("alsijil.coursebook.no_results", { search: $refs.iterator.search })
}}
</CoursebookEmptyMessage>
</template>
</c-r-u-d-iterator>
<template #no-results>
<CoursebookEmptyMessage icon="mdi-book-alert-outline">
{{
$t("alsijil.coursebook.no_results", { search: $refs.iterator.search })
}}
</CoursebookEmptyMessage>
</template>
</c-r-u-d-iterator>
<absence-creation-dialog />
</div>
</template>
<script>
......@@ -74,6 +77,8 @@ import CoursebookFilters from "./CoursebookFilters.vue";
import CoursebookLoader from "./CoursebookLoader.vue";
import CoursebookEmptyMessage from "./CoursebookEmptyMessage.vue";
import AbsenceCreationDialog from "./absences/AbsenceCreationDialog.vue";
export default {
name: "Coursebook",
components: {
......@@ -83,6 +88,7 @@ export default {
CRUDIterator,
DateSelectFooter,
CoursebookDay,
AbsenceCreationDialog,
},
props: {
filterType: {
......
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