- Übersicht
+
+
+
+ Anzahl Freigetränke
+
+
+ {{free_drink_list_history_without_canceled.length}}
+
+
+ Summe Freigetränke
+
+
+ {{ (sum/100).toFixed(2)}} €
+
+
+
+
+ Anzahl Dienstgetränke
+
+
+ {{ free_drink_list_history_job_without_canceled.length }}
+
+
+ Summe Dienstgetränke
+
+
+ {{(sumJob/100).toFixed(2)}} €
+
+
+
+
+ Anzahl AG-Getränke
+
+
+ {{ free_drink_list_history_workgroup_without_canceled.length }}
+
+
+ Summe AG-Getränke
+
+
+ {{(sumWorkgroup/100).toFixed(2)}} €
+
+
+
+
+ Anzahl Bandgetränke
+
+
+ {{ free_drink_list_history_band_without_canceled.length }}
+
+
+ Summe Bandgetränke
+
+
+ {{(sumBand/100).toFixed(2)}} €
+
+
+
+
diff --git a/src/plugins/routes.js b/src/plugins/routes.js
index cef3e5a..e974d25 100644
--- a/src/plugins/routes.js
+++ b/src/plugins/routes.js
@@ -30,6 +30,7 @@ const url = {
resetPassword: main + 'passwordReset',
freeDrinkListConfig: main + 'freeDrinkListConfig',
freeDrinkListHistory: main + 'freeDrinkListHistory',
+ freeDrinkListHistoryFromTo: main + 'freeDrinkListHistoryFromTo',
deleteDrinkListHistory: main + 'deleteDrinkListHistory',
freeDrinkListReasons: main + 'freeDrinkListReasons',
freeDrinkTypes: main + 'freeDrinkTypes',
diff --git a/src/router/index.js b/src/router/index.js
index b90dbcf..55690e2 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -31,6 +31,7 @@ import ResetPassword from '@/components/ResetPassword'
import FreeDrinkList from '@/components/vorstand/FreeDrinkList'
import FreeDrinkListMain from '@/components/vorstand/FreeDrinkList/FreeDrinkListMain'
import FreeDrinkListConfig from '@/components/vorstand/FreeDrinkList/FreeDrinkListConfig'
+import FreeDrinkListJob from '@/components/vorstand/FreeDrinkList/FreeDrinkListJob'
Vue.use(VueRouter)
@@ -100,6 +101,11 @@ const routes = [
path: 'config',
name: 'freeDrinkListConfig',
component: FreeDrinkListConfig
+ },
+ {
+ path: 'freeDrinkListJob',
+ name: 'freeDrinkListJob',
+ component: FreeDrinkListJob
}
]
}
diff --git a/src/store/modules/freeDrinkList.js b/src/store/modules/freeDrinkList.js
index 44f9434..c46d651 100644
--- a/src/store/modules/freeDrinkList.js
+++ b/src/store/modules/freeDrinkList.js
@@ -109,6 +109,24 @@ const actions = {
commit('set_free_drink_list_history_loading', false)
}
},
+ async get_free_drink_list_history_from_to({ commit, dispatch, rootState }, data) {
+ try {
+ commit('set_free_drink_list_history_loading', true)
+ const response = await axios.post(url.freeDrinkListHistoryFromTo, {...data},{
+ headers: { Token: rootState.login.user.accessToken },
+ timeout
+ })
+ commit('set_free_drink_list_history', response.data)
+ } catch (e) {
+ if (e.message == 'Network Error') {
+ dispatch('connectionError/addError', null, { root: true })
+ }
+ if (e.response)
+ if (e.response.status === 401) dispatch('logout', null, { root: true })
+ } finally {
+ commit('set_free_drink_list_history_loading', false)
+ }
+ },
async set_free_drink_list_history({ commit, dispatch, rootState }, data) {
try {
commit('set_free_drink_list_history_loading', true)
@@ -280,6 +298,11 @@ const getters = {
free_drink_list_history(state) {
return state.free_drink_list_history
},
+ free_drink_list_history_without_canceled(state) {
+ return state.free_drink_list_history.filter(item => {
+ return !item.canceled
+ })
+ },
free_drink_list_history_band(state) {
return state.free_drink_list_history.filter(item => {
return item.free_drink_type.id == 3
@@ -290,6 +313,11 @@ const getters = {
return item.free_drink_type.id == 3 && !item.canceled
})
},
+ free_drink_list_history_job_without_canceled(state) {
+ return state.free_drink_list_history.filter(item => {
+ return item.free_drink_type.id == 1 && !item.canceled
+ })
+ },
free_drink_list_history_job_credit(state) {
let jobDrinks = state.free_drink_list_history.filter(item => {
return item.free_drink_type.id == 1 && !item.canceled