release v2.0.0 #4

Merged
crimsen merged 481 commits from develop into master 2024-01-18 15:15:08 +00:00
3 changed files with 15 additions and 3 deletions
Showing only changes of commit f212c5962c - Show all commits

View File

@ -285,6 +285,8 @@ export default {
'ERROR: ' + message.free_drink_type.name +': Konnte ' + message.label + ' für ' +
(message.price / 100).toFixed(2) +
'€ nicht hinzufügen.'
} else if (message.canceled) {
text = `${message.free_drink_type.name}: ${message.label} wurde für ${(message.price/100).toFixed(2)}€ storniert.`
} else {
text = message.free_drink_type.name + ': ' + message.label + ' wurde für ' + (message.price / 100).toFixed(2) + '€ hinzugefügt.'
}

View File

@ -296,7 +296,7 @@ export default {
this.amount = null
this.selectedReason = null
this.reasonDescription = null
this.drinkCount = 0
this.drinkCount = 1
this.free_drink_type_id = null
this.free_drink = null
},
@ -321,6 +321,8 @@ export default {
' für ' +
(message.price / 100).toFixed(2) +
'€ nicht hinzufügen.'
} else if (message.canceled) {
text = `${message.free_drink_type.name}: ${message.label} wurde für ${(message.price/100).toFixed(2)}€ storniert.`
} else {
text =
message.free_drink_type.name +

View File

@ -44,9 +44,11 @@ const mutations = {
add_snackbar_message(state, { data, error }) {
data.error = error
data.visible = true
data.free_drink_type = data.free_drink_types.find(item => {
data.label = data.free_drink_config != null && data.label == null ? data.free_drink_config.label : data.label
data.price = data.free_drink_config != null && data.price == null ? data.free_drink_config.price : data.price
data.free_drink_type = data.free_drink_type == null ? data.free_drink_types.find(item => {
return item.id == data.free_drink_type_id
})
}) : data.free_drink_type
data.timer = setTimeout(() => {
if (!data.error) {
data.visible = false
@ -98,8 +100,10 @@ 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 })
}
@ -138,6 +142,7 @@ const actions = {
timeout
}
)
console.log(data)
commit('set_free_drink_list_history', response.data)
commit('add_snackbar_message', { data, error: false })
} catch (e) {
@ -153,15 +158,18 @@ 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 })