From 906adbe0db5c83b753482781d8b3da9b357df496 Mon Sep 17 00:00:00 2001 From: jedi Date: Sat, 23 Dec 2023 01:17:35 +0100 Subject: [PATCH] stash --- web/src/App.vue | 25 +++++++++----- web/src/components/AddTicketModal.vue | 49 +++++++++++++++++++++++++++ web/src/components/Navbar.vue | 25 ++++++++++---- web/src/store/index.js | 4 +++ 4 files changed, 88 insertions(+), 15 deletions(-) create mode 100644 web/src/components/AddTicketModal.vue 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);