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

Prevent double loading of some data in coursebook

parent 8d501e18
No related branches found
No related tags found
1 merge request!429Resolve "Adapt to active school term"
Pipeline #193896 failed
......@@ -70,7 +70,10 @@
</template>
</infinite-scrolling-date-sorted-c-r-u-d-iterator>
<v-scale-transition>
<absence-creation-dialog v-if="pageType === 'absences'" />
<absence-creation-dialog
v-if="pageType === 'absences'"
:absence-reasons="absenceReasons"
/>
</v-scale-transition>
</div>
</template>
......
......@@ -30,6 +30,7 @@
:end-date="endDate"
:comment="comment"
:absence-reason="absenceReason"
:absence-reasons="absenceReasons"
@valid="formValid = $event"
@persons="persons = $event"
@start-date="startDate = $event"
......@@ -121,6 +122,12 @@ export default {
absenceReason: "",
};
},
props: {
absenceReasons: {
type: Array,
required: true,
},
},
mounted() {
this.addPermissions(["alsijil.view_register_absence_rule"]);
this.clearForm();
......
......@@ -61,6 +61,7 @@
<absence-reason-group-select
:rules="$rules().required.build()"
:value="absenceReason"
:custom-absence-reasons="absenceReasons"
@input="$emit('absence-reason', $event)"
/>
</div>
......@@ -115,6 +116,10 @@ export default {
type: String,
required: true,
},
absenceReasons: {
type: Array,
required: true,
},
},
computed: {
maxStartTime() {
......
query absenceReasons($orderBy: [String], $filters: JSONString) {
items: coursebookAbsenceReasons(orderBy: $orderBy, filters: $filters) {
id
shortName
name
colour
default
canEdit
canDelete
}
}
......@@ -111,7 +111,6 @@ query documentationsForCoursebook(
oldId
canEdit
futureNotice
canDelete
futureNoticeParticipationStatus
canEditParticipationStatus
canViewParticipationStatus
......
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