Skip to content
Snippets Groups Projects
Verified Commit 0cec36a5 authored by magicfelix's avatar magicfelix
Browse files

Only offer future periods in selection

parent 9748f4a0
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
<v-row>
<v-col cols="6">
<v-select
:items="plannedLessonperiodsDatetimes"
:items="emptyLessonperiods"
label="Choose Lesson date"
:item-text="getLessonText"
v-model="selectedLessonperiodDatetime"
......@@ -59,9 +59,15 @@
{ text: "Group note", value: "groupNote" }
],
lessonDocumentationEdit: {},
selectedLessonperiodDatetime: {}
selectedLessonperiodDatetime: {},
}
},
computed: {
emptyLessonperiods() {
let currentDatetime = new Date()
return this.plannedLessonperiodsDatetimes.filter(lp => new Date(lp.datetimeStart) > currentDatetime)
},
},
methods: {
async loadLessonDocumentation(item) {
const result = await this.$apollo.mutate({
......
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