Skip to content
Snippets Groups Projects
Verified Commit a77056f6 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Add validation to coursebook print dialog

parent 641ec995
No related branches found
No related tags found
1 merge request!422Resolve "Add export functionality to course book"
Pipeline #194352 canceled
...@@ -69,9 +69,7 @@ ...@@ -69,9 +69,7 @@
<DocumentationLoader /> <DocumentationLoader />
</template> </template>
</infinite-scrolling-date-sorted-c-r-u-d-iterator> </infinite-scrolling-date-sorted-c-r-u-d-iterator>
<absence-creation-dialog <absence-creation-dialog :absence-reasons="absenceReasons" />
:absence-reasons="absenceReasons"
/>
</div> </div>
</template> </template>
......
...@@ -68,6 +68,7 @@ import CancelButton from "aleksis.core/components/generic/buttons/CancelButton.v ...@@ -68,6 +68,7 @@ import CancelButton from "aleksis.core/components/generic/buttons/CancelButton.v
<primary-action-button <primary-action-button
i18n-key="alsijil.coursebook.print.button" i18n-key="alsijil.coursebook.print.button"
icon-text="$print" icon-text="$print"
:disabled="!valid"
@click="print" @click="print"
/> />
</template> </template>
...@@ -94,7 +95,7 @@ export default { ...@@ -94,7 +95,7 @@ export default {
value: { value: {
type: Array, type: Array,
required: false, required: false,
default: [], default: () => [],
}, },
/** /**
* Loading state * Loading state
...@@ -126,6 +127,15 @@ export default { ...@@ -126,6 +127,15 @@ export default {
return this.currentGroupSelection; return this.currentGroupSelection;
} }
}, },
valid() {
return (
this.currentGroupSelection.length > 0 &&
(this.includeMembersTable ||
this.includeTeachersAndSubjectsTable ||
this.includePersonOverviews ||
this.includeCoursebook)
);
},
}, },
methods: { methods: {
setGroupSelection(groups) { setGroupSelection(groups) {
......
...@@ -103,8 +103,8 @@ ...@@ -103,8 +103,8 @@
"print": { "print": {
"button": "Drucken", "button": "Drucken",
"title": "Kursbuchausdruck", "title": "Kursbuchausdruck",
"groups": "Drucke Gruppen:", "groups": "Gruppen",
"include": "Drucke Abschnitte:", "include": "Abschnitte",
"include_cover": "Deckblatt", "include_cover": "Deckblatt",
"include_abbreviations": "Abkürzungen", "include_abbreviations": "Abkürzungen",
"include_members_table": "Tabelle aller Gruppenmitglieder mit Statistiken", "include_members_table": "Tabelle aller Gruppenmitglieder mit Statistiken",
......
...@@ -133,8 +133,8 @@ ...@@ -133,8 +133,8 @@
"print": { "print": {
"button": "Print", "button": "Print",
"title": "Print Coursebook", "title": "Print Coursebook",
"groups": "Groups to print:", "groups": "Groups",
"include": "Parts to print:", "include": "Parts to include",
"include_cover": "Cover", "include_cover": "Cover",
"include_abbreviations": "Abbreviations", "include_abbreviations": "Abbreviations",
"include_members_table": "Members Table", "include_members_table": "Members Table",
......
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