Tutor selection now persists between observation sessions.
This commit is contained in:
parent
73a9592be7
commit
3211a5af50
@ -26,13 +26,6 @@ export default new Vuex.Store({
|
||||
},
|
||||
setWhom(state, newWhom) {
|
||||
state.whom = newWhom;
|
||||
},
|
||||
resetStore(state) {
|
||||
state.site = null;
|
||||
state.tutors = [];
|
||||
state.description = null;
|
||||
state.type = null;
|
||||
state.whom = null;
|
||||
}
|
||||
},
|
||||
actions: {}
|
||||
|
@ -64,8 +64,7 @@
|
||||
<b-form-group label="Tutor(s)">
|
||||
<p v-if="site == null">Select a site first.</p>
|
||||
<v-icon name="spinner" spin v-if="loadingTutors"/>
|
||||
<b-form-checkbox-group :value="tutors" @input="setTutors"
|
||||
:options="tutorOptions"></b-form-checkbox-group>
|
||||
<b-form-checkbox-group v-model="iTutors" :options="tutorOptions"></b-form-checkbox-group>
|
||||
</b-form-group>
|
||||
</b-col>
|
||||
</b-row>
|
||||
@ -95,10 +94,12 @@ export default {
|
||||
loadingTutors: false,
|
||||
loaded: false,
|
||||
errorMessage: null,
|
||||
errorStatus: null
|
||||
errorStatus: null,
|
||||
iTutors: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.iTutors = this.tutors;
|
||||
Vue.axios
|
||||
.get("/site")
|
||||
.then(response => {
|
||||
@ -125,8 +126,13 @@ export default {
|
||||
site: function() {
|
||||
this.loadingTutors = true;
|
||||
this.tutorOptions = [];
|
||||
this.tutors = [];
|
||||
this.getTutors();
|
||||
this.iTutors = this.iTutors.filter(x => this.tutorOptions.indexOf(x) !== -1)
|
||||
},
|
||||
iTutors: function() {
|
||||
if(this.tutors !== this.iTutors) {
|
||||
this.setTutors(this.iTutors)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
Loading…
Reference in New Issue
Block a user