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

fix show update loading info

when updating only single items we should not set the
show loading info to true. otherwhise the whole ShowManager
sub components will be reloaded. also it is not true
that the show is loading.

if we want to indicate an ongoing update of the show, we should
introduce a specific flag for that.
parent 3d7355ff
......@@ -360,13 +360,11 @@ const actions = {
},
updateShow (ctx, data) {
ctx.commit('loading', 'shows')
let uri = process.env.VUE_APP_API_STEERING_SHOWS + data.id + '/'
axios.put(uri, data.show , {
withCredentials: true,
headers: { 'Authorization': 'Bearer ' + ctx.rootState.auth.user.access_token }
}).then(response => {
ctx.commit('finishLoading', 'shows')
if (data && typeof(data.callback) === 'function') { data.callback(response) }
}).catch(error => {
handleApiError(this, error, 'could not update show')
......@@ -392,7 +390,6 @@ const actions = {
},
updateImage (ctx, data) {
ctx.commit('loading', 'shows')
let show = ctx.getters.getShowByDataParam(data)
let uri = process.env.VUE_APP_API_STEERING_SHOWS + data.id + '/'
let formData = new FormData()
......@@ -417,7 +414,6 @@ const actions = {
// TODO: create an issue in steering, to create consistency
value: process.env.VUE_APP_BASEURI_STEERING + response.data[data.type]
})
ctx.commit('finishLoading', 'shows')
if (data && typeof(data.callback) === 'function') { data.callback(response) }
}).catch(error => {
handleApiError(this, error, 'could not update show ' + data.type)
......
Markdown is supported
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