Compare commits

..

16 commits

Author SHA1 Message Date
155be1bee7 stash 2024-11-03 21:41:46 +01:00
305d1622fb add dev docker 2024-11-03 21:41:46 +01:00
3fd417c954 stash events admin frontend 2024-11-03 21:41:46 +01:00
b24844831c stash 2024-11-03 21:41:46 +01:00
1c9afb6bad stash 2024-11-03 21:41:46 +01:00
af00daca51 stash 2024-11-03 21:41:46 +01:00
884c621fbf stash 2024-11-03 21:41:46 +01:00
d7b814cfc0 stash 2024-11-03 21:41:46 +01:00
8f6041ffa5 stash 2024-11-03 21:41:46 +01:00
01f235439b stash 2024-11-03 21:41:46 +01:00
105f360550 stash 2024-11-03 21:41:43 +01:00
381061a2fd stash 2024-11-03 21:40:38 +01:00
b6d1422a77 stash 2024-11-03 21:40:38 +01:00
bc074ffb3f stash 2024-11-03 21:40:38 +01:00
2036c0a65d stash 2024-11-03 21:40:38 +01:00
767d34f8b7 state button has the state pre selected 2024-11-03 21:30:08 +01:00

View file

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