diff --git a/web/src/App.vue b/web/src/App.vue index 1607757..d741a99 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -1,7 +1,8 @@ @@ -113,6 +118,12 @@ export default { navigateTo(link) { if (this.$router.currentRoute.path !== link) this.$router.push(link); + }, + isItemView() { + return this.getActiveView === 'items' || this.getActiveView === 'item'; + }, + isTicketView() { + return this.getActiveView === 'tickets' || this.getActiveView === 'ticket'; } } }; diff --git a/web/src/store/index.js b/web/src/store/index.js index 5109142..4a2cc35 100644 --- a/web/src/store/index.js +++ b/web/src/store/index.js @@ -318,6 +318,10 @@ const store = new Vuex.Store({ const {data} = await axios.post(`/2/tickets/${id}/reply/`, {message}); await dispatch('loadTickets'); }, + async postManualTicket({commit, dispatch}, {sender, message, title,}) { + const {data} = await axios.post(`/2/tickets/manual/`, {name: title, sender, body: message, recipient: 'mail@c3lf.de'}); + await dispatch('loadTickets'); + }, async loadUsers({commit}) { const {data} = await axios.get('/2/users/'); commit('replaceUsers', data);