Fehler im Verlauf der FreeDrinkList in der baransicht wurde behoben

This commit is contained in:
Tim Gröger 2020-09-01 10:18:09 +02:00
parent f212c5962c
commit 0563740e9c
3 changed files with 8 additions and 11 deletions

View File

@ -110,7 +110,7 @@
</v-list-item>
<v-divider />
<div
v-for="freeDrinkHistory in free_drink_list_history"
v-for="freeDrinkHistory in free_drink_list_history_bar"
:key="freeDrinkHistory.id"
>
<v-list-item
@ -406,6 +406,11 @@ export default {
sum += item.free_drink_config.price
})
return sum
},
free_drink_list_history_bar() {
return this.free_drink_list_history.filter(item => {
return item.free_drink_type.id == 1 || item.free_drink_type.id == 3
})
}
},
beforeDestroy() {

View File

@ -1,8 +1,8 @@
//const main = 'https://192.168.5.128:5000/'
//const main = 'http://localhost:5000/'
const main = 'http://localhost:5000/'
//const main = 'http://192.168.5.118:5000/'
//const main = 'https://groeger-clan.duckdns.org:5000/'
const main = 'https://flaschengeist.wu5.de:5000/'
//const main = 'https://flaschengeist.wu5.de:5000/'
const url = {
login: main + 'login',

View File

@ -54,7 +54,6 @@ const mutations = {
data.visible = false
}
}, 5000)
console.log(data)
state.snackbar_messages.unshift(data)
},
set_free_drink_list_reasons(state, data) {
@ -100,10 +99,8 @@ const actions = {
headers: { Token: rootState.login.user.accessToken },
timeout
})
console.log(response.data)
commit('set_free_drink_list_history', response.data)
} catch (e) {
console.log(e)
if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true })
}
@ -142,7 +139,6 @@ const actions = {
timeout
}
)
console.log(data)
commit('set_free_drink_list_history', response.data)
commit('add_snackbar_message', { data, error: false })
} catch (e) {
@ -158,18 +154,15 @@ const actions = {
},
async update_free_drink_list_history({ commit, dispatch, rootState }, data) {
try {
console.log(data)
commit('set_free_drink_list_history_loading', true)
const response = await axios.put(
url.freeDrinkListHistory,
{ ...data },
{ headers: { Token: rootState.login.user.accessToken }, timeout }
)
console.log(response.data)
commit('set_free_drink_list_history', response.data)
commit('add_snackbar_message', { data, error: false })
} catch (e) {
console.log(e)
dispatch('connectionError/addError', null, { root: true })
if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true })
@ -342,7 +335,6 @@ const getters = {
},
free_drink_list_config_job(state) {
return state.free_drink_list_config.filter(item => {
console.log(item)
return item.free_drink_types.find(drink_type => {
return drink_type.id == 1
})