Skip to content

Commit

Permalink
They said they wanted a checkbox...
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGoumX committed Feb 23, 2020
1 parent fac949b commit f4e3f03
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
22 changes: 10 additions & 12 deletions src/components/UnscheduledLessons/UnscheduledLessons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,16 @@
</div>
</div>
<div class="row pt-3">
<div class="col col-lg-5">
<div class="col col-lg-6">
<b-form-input type="datetime-local" v-model="start" v-bind:placeholder="this.$t('message.ecStart')"></b-form-input>
</div>
<div class="col col-lg-5">
<div class="col col-lg-6">
<b-form-input type="datetime-local" v-model="end" v-bind:placeholder="this.$t('message.ecEnd')"></b-form-input>
</div>
<div class="col col-lg-2">
<multiselect v-model="isOverrideExam" v-bind:placeholder="this.$t('message.ecIsExam')"
:close-on-select="false" :options="isExamsOptions" :multiple="false"
v-bind:select-label="this.$t('message.ecSelect')" v-bind:deselect-label="this.$t('message.ecDeselect')">
<span slot="noResult">Oops! No elements found. Consider changing the search query.</span>
</multiselect>
</div>
<div class="row pt-3">
<div class="col">
<b-form-checkbox v-model="isOverrideExam" v-bind:value="true" v-bind:unchecked-value="false">{{$t('message.ecIsExam')}}</b-form-checkbox>
</div>
</div>
<div class="row pt-3">
Expand Down Expand Up @@ -83,7 +81,7 @@
start: '',
end: '',
date: '',
isOverrideExam: null,
isOverrideExam: false,
roomOptions: [],
room: '',
unscheduledLessons: [],
Expand Down Expand Up @@ -119,7 +117,7 @@
start : this.start,
end : this.end,
rooms : this.room,
isExam : this.isOverrideExam === this.$t('message.optionYes')
isExam : this.isOverrideExam
};
this.unscheduledLessons.push(newExam);
axios({
Expand All @@ -135,7 +133,7 @@
end: new Date(this.end)/1000,
title: this.title,
host: this.host,
isExam : this.isOverrideExam === this.$t('message.optionYes')
isExam : this.isOverrideExam
}
}).then(() => {
this.clearForm();
Expand All @@ -149,7 +147,7 @@
this.start = '';
this.end = '';
this.room = '';
this.isExamsOptions = null;
this.isExamsOptions = false;
},
checkEntry: function (e) {
Expand Down
4 changes: 2 additions & 2 deletions src/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default {
adminHome: "Home",
optionYes: "Yes",
optionNo: "No",
ecIsExam: "Exam"
ecIsExam: "Is Exam?"
}
},
el: {
Expand Down Expand Up @@ -214,7 +214,7 @@ export default {
adminHome: "Home",
optionYes: "Ναι",
optionNo: "Όχι",
ecIsExam: "Εξέταση"
ecIsExam: "Είναι Εξέταση?"
}
}
};

0 comments on commit f4e3f03

Please sign in to comment.