From 6ce4a1df4c42c18e3b84605d15845d9caf1a36cf Mon Sep 17 00:00:00 2001 From: bton Date: Wed, 6 Nov 2024 21:09:06 +0100 Subject: [PATCH] fixed stuff --- web/src/views/Ticket.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/web/src/views/Ticket.vue b/web/src/views/Ticket.vue index 63f3515..d11b872 100644 --- a/web/src/views/Ticket.vue +++ b/web/src/views/Ticket.vue @@ -83,7 +83,7 @@ export default { ticket(val) { if (this.selected_state == null) { this.selected_state = val.state; - } + } if (this.selected_assignee == null) { this.selected_assignee = val.assigned_to } @@ -102,6 +102,8 @@ export default { return `ticket+${this.ticket.uuid}@${domain}`; } }, + //this.scheduleAfterInit(() => [this.fetchTicketStates(), this.loadTickets(), this.loadUsers(), + //this.fetchShippingVouchers()]); methods: { ...mapActions(['deleteItem', 'markItemReturned', 'sendMail', 'updateTicketPartial', 'postComment']), ...mapActions(['loadTickets', 'fetchTicketStates', 'loadUsers', 'scheduleAfterInit']), @@ -134,12 +136,16 @@ export default { }, }, mounted() { - this.scheduleAfterInit(() => [this.fetchTicketStates(), this.loadTickets(), this.loadUsers(), - this.fetchShippingVouchers()]); + this.scheduleAfterInit(() => [Promise.all([this.fetchTicketStates(), this.loadTickets(), this.loadUsers(), this.fetchShippingVouchers()]).then(()=>{ + this.selected_state = this.ticket.state; + this.selected_assignee = this.ticket.assigned_to + })]); + //this.scheduleAfterInit(() => [this.fetchTicketStates(), this.loadTickets(), this.loadUsers(), + //this.fetchShippingVouchers()]); } }; \ No newline at end of file +