Commit 6782074a authored by jackie / Andrea Ida Malkah Klaura's avatar jackie / Andrea Ida Malkah Klaura
Browse files

FIX #32 use start & end to load all timeslots

parent 60981067
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</div> </div>
<div v-else> <div v-else>
<p>This is a recurring event: <b>{{ rruleRender(schedule.rrule) }}</b>, until: {{ prettyDate(schedule.until) }}</p> <p>This is a recurring event: <b>{{ rruleRender(schedule.rrule) }}</b>, until: {{ prettyDate(schedule.until) }}</p>
<p>All <i>upcoming</i> timeslots of this schedule:</p> <p>All timeslots of this schedule:</p>
<ul v-if="loaded.scheduleTimeslots"> <ul v-if="loaded.scheduleTimeslots">
<li <li
v-for="slot in scheduleTimeslots" v-for="slot in scheduleTimeslots"
...@@ -256,6 +256,7 @@ export default { ...@@ -256,6 +256,7 @@ export default {
}).then(response => { }).then(response => {
this.schedule = response.data this.schedule = response.data
this.loaded.schedule = true this.loaded.schedule = true
this.loadScheduleTimeslots(this.schedule.id)
}).catch(error => { }).catch(error => {
this.$log.error(error.response.status + ' ' + error.response.statusText) this.$log.error(error.response.status + ' ' + error.response.statusText)
this.$log.error(error.response) this.$log.error(error.response)
...@@ -266,6 +267,7 @@ export default { ...@@ -266,6 +267,7 @@ export default {
loadScheduleTimeslots (id) { loadScheduleTimeslots (id) {
this.loaded.scheduleTimeslots = false this.loaded.scheduleTimeslots = false
let uri = process.env.VUE_APP_API_STEERING + 'shows/' + this.show.id + '/schedules/' + id + '/timeslots/' let uri = process.env.VUE_APP_API_STEERING + 'shows/' + this.show.id + '/schedules/' + id + '/timeslots/'
uri += '?start=' + this.schedule.dstart + '&end=' + this.schedule.until
axios.get(uri, { axios.get(uri, {
withCredentials: true, withCredentials: true,
headers: { 'Authorization': 'Bearer ' + this.$parent.$parent.user.access_token } headers: { 'Authorization': 'Bearer ' + this.$parent.$parent.user.access_token }
...@@ -286,7 +288,6 @@ export default { ...@@ -286,7 +288,6 @@ export default {
this.loaded.modal = true this.loaded.modal = true
this.$refs.modalEmissionManagerEdit.show() this.$refs.modalEmissionManagerEdit.show()
this.loadSchedule(timeslot.schedule) this.loadSchedule(timeslot.schedule)
this.loadScheduleTimeslots(timeslot.schedule)
}, },
notYetImplemented: function () { notYetImplemented: function () {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment