Compare commits
16 commits
c0388e2b54
...
155be1bee7
Author | SHA1 | Date | |
---|---|---|---|
155be1bee7 | |||
305d1622fb | |||
3fd417c954 | |||
b24844831c | |||
1c9afb6bad | |||
af00daca51 | |||
884c621fbf | |||
d7b814cfc0 | |||
8f6041ffa5 | |||
01f235439b | |||
105f360550 | |||
381061a2fd | |||
b6d1422a77 | |||
bc074ffb3f | |||
2036c0a65d | |||
767d34f8b7 |
1 changed files with 25 additions and 7 deletions
|
@ -15,21 +15,25 @@
|
||||||
Delete
|
Delete
|
||||||
</button-->
|
</button-->
|
||||||
<div class="btn-group">
|
<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>
|
<option v-for="user in users" :value="user.username">{{ user.username }}</option>
|
||||||
</select>
|
</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 Ticket
|
Assign Ticket
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group">
|
<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">{{
|
<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" @click="changeTicketStatus(ticket)">
|
<button class="form-control btn btn-success"
|
||||||
|
@click="changeTicketStatus(ticket)"
|
||||||
|
:disabled="(selected_state == ticket.state)">
|
||||||
Change Status
|
Change Status
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -70,7 +74,19 @@ export default {
|
||||||
components: {AsyncLoader, ClipboardButton, Timeline},
|
components: {AsyncLoader, ClipboardButton, Timeline},
|
||||||
data() {
|
data() {
|
||||||
return {
|
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: {
|
computed: {
|
||||||
|
@ -103,15 +119,17 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeTicketStatus(ticket) {
|
changeTicketStatus(ticket) {
|
||||||
|
ticket.state = this.selected_state;
|
||||||
this.updateTicketPartial({
|
this.updateTicketPartial({
|
||||||
id: ticket.id,
|
id: ticket.id,
|
||||||
state: ticket.state
|
state: this.selected_state,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
assignTicket(ticket) {
|
assignTicket(ticket) {
|
||||||
|
ticket.assigned_to = this.selected_assignee;
|
||||||
this.updateTicketPartial({
|
this.updateTicketPartial({
|
||||||
id: ticket.id,
|
id: ticket.id,
|
||||||
assigned_to: ticket.assigned_to
|
assigned_to: this.selected_assignee
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue