Compare commits
15 commits
155be1bee7
...
c0388e2b54
Author | SHA1 | Date | |
---|---|---|---|
c0388e2b54 | |||
a7af4f9cdd | |||
98dfc33385 | |||
37da5b38b1 | |||
fe2f8b3b05 | |||
e81bf94dc1 | |||
165bec6496 | |||
03f21feb2f | |||
e58779b98f | |||
40184f12ee | |||
4d8406bd7c | |||
1cfeb34a4c | |||
bbbc6869c1 | |||
dbeb9f4116 | |||
bcc056e451 |
1 changed files with 7 additions and 25 deletions
|
@ -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 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 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
|
||||
})
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue