Compare commits

..

15 commits

Author SHA1 Message Date
c0388e2b54 stash 2024-11-03 19:31:12 +01:00
a7af4f9cdd add dev docker 2024-11-03 19:24:14 +01:00
98dfc33385 stash events admin frontend 2024-11-03 19:24:10 +01:00
37da5b38b1 stash 2024-11-03 19:23:53 +01:00
fe2f8b3b05 stash 2024-11-03 19:23:53 +01:00
e81bf94dc1 stash 2024-11-03 19:23:53 +01:00
165bec6496 stash 2024-11-03 19:23:53 +01:00
03f21feb2f stash 2024-11-03 19:23:53 +01:00
e58779b98f stash 2024-11-03 19:23:53 +01:00
40184f12ee stash 2024-11-03 19:23:53 +01:00
4d8406bd7c stash 2024-11-03 19:23:53 +01:00
1cfeb34a4c stash 2024-11-03 19:23:53 +01:00
bbbc6869c1 stash 2024-11-03 19:23:53 +01:00
dbeb9f4116 stash 2024-11-03 19:23:53 +01:00
bcc056e451 stash 2024-11-03 19:23:49 +01:00

View file

@ -15,25 +15,21 @@
Delete
</button-->
<div class="btn-group">
<select class="form-control" v-model="selected_assignee">
<select class="form-control" v-model="ticket.assigned_to">
<option v-for="user in users" :value="user.username">{{ user.username }}</option>
</select>
<button class="form-control btn btn-success"
@click="assignTicket(ticket)"
:disabled="!selected_assignee || (selected_assignee == ticket.assigned_to)">
<button class="form-control btn btn-success" @click="assignTicket(ticket)">
Assign&nbsp;Ticket
</button>
</div>
<div class="btn-group">
<select class="form-control" v-model="selected_state">
<select class="form-control" v-model="ticket.state">
<option v-for="status in state_options" :value="status.value">{{
status.text
}}
</option>
</select>
<button class="form-control btn btn-success"
@click="changeTicketStatus(ticket)"
:disabled="(selected_state == ticket.state)">
<button class="form-control btn btn-success" @click="changeTicketStatus(ticket)">
Change&nbsp;Status
</button>
</div>
@ -74,19 +70,7 @@ export default {
components: {AsyncLoader, 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: {
@ -119,17 +103,15 @@ 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;
this.updateTicketPartial({
id: ticket.id,
assigned_to: this.selected_assignee
assigned_to: ticket.assigned_to
})
},
},