diff --git a/web/src/views/Ticket.vue b/web/src/views/Ticket.vue
index 97051b4..e92fb8e 100644
--- a/web/src/views/Ticket.vue
+++ b/web/src/views/Ticket.vue
@@ -14,25 +14,18 @@
Delete
-
-
-
+
+
-
+
Change Status
@@ -65,26 +58,13 @@
import {mapActions, mapGetters, mapState} from 'vuex';
import Timeline from "@/components/Timeline.vue";
import ClipboardButton from "@/components/inputs/ClipboardButton.vue";
-import AsyncLoader from "@/components/AsyncLoader.vue";
export default {
name: 'Ticket',
- components: {AsyncLoader, ClipboardButton, Timeline},
+ components: {ClipboardButton, Timeline},
data() {
return {
- selected_state: null,
- selected_assignee: null,
- shipping_voucher_type: null,
- }
- },
- watch: {
- ticket(val) {
- if (this.selected_state == null) {
- this.selected_state = val.state;
- }
- if (this.selected_assignee == null) {
- this.selected_assignee = val.assigned_to
- }
+ shipping_voucher_type: null
}
},
computed: {
@@ -103,7 +83,7 @@ export default {
methods: {
...mapActions(['deleteItem', 'markItemReturned', 'sendMail', 'updateTicketPartial', 'postComment']),
...mapActions(['loadTickets', 'fetchTicketStates', 'loadUsers', 'scheduleAfterInit']),
- ...mapActions(['claimShippingVoucher', 'fetchShippingVouchers']),
+ ...mapActions(['claimShippingVoucher']),
handleMail(mail) {
this.sendMail({
id: this.ticket.id,
@@ -117,23 +97,20 @@ export default {
})
},
changeTicketStatus(ticket) {
- ticket.state = this.selected_state;
this.updateTicketPartial({
id: ticket.id,
- state: this.selected_state,
+ state: ticket.state
})
},
- assignTicket(ticket) {
- ticket.assigned_to = this.selected_assignee;
+ assigTicket(ticket) {
this.updateTicketPartial({
id: ticket.id,
- assigned_to: this.selected_assignee
+ assigned_to: ticket.assigned_to
})
},
},
mounted() {
- this.scheduleAfterInit(() => [this.fetchTicketStates(), this.loadTickets(), this.loadUsers(),
- this.fetchShippingVouchers()]);
+ this.scheduleAfterInit(() => [this.fetchTicketStates(), this.loadTickets(), this.loadUsers()]);
}
};