Skip to content
Snippets Groups Projects

Resolve "Add export functionality to course book"

Merged permcu requested to merge 258-add-export-functionality-to-course-book into master
2 files
+ 12
0
Compare changes
  • Side-by-side
  • Inline
Files
2
<script setup>
import CoursebookPrintDialog from "./CoursebookPrintDialog.vue";
</script>
<template>
<div
class="d-flex flex-column flex-sm-row flex-nowrap flex-grow-1 justify-end gap align-stretch"
@@ -56,14 +60,22 @@
hide-details
/>
</div>
<v-btn
outlined
color="primary"
:loading="selectLoading"
@click="togglePageType()"
>
{{ pageTypeButtonText }}
</v-btn>
<div class="d-flex flex-column gap">
<v-btn
outlined
color="primary"
:loading="selectLoading"
@click="togglePageType()"
>
{{ pageTypeButtonText }}
</v-btn>
<coursebook-print-dialog
v-if="pageType === 'documentations'"
:loading="selectLoading"
:available-groups="groups"
:value="currentGroups"
/>
</div>
</div>
</template>
@@ -125,6 +137,13 @@ export default {
o.id === this.value.objId,
);
},
currentGroups() {
return this.groups.filter(
(o) =>
TYPENAMES_TO_TYPES[o.__typename] === this.value.objType &&
o.id === this.value.objId,
);
},
pageTypeButtonText() {
if (this.value.pageType === "documentations") {
return this.$t("alsijil.coursebook.filter.page_type.absences");
Loading