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