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
|
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 Ticket
|
Assign 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 Status
|
Change 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
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue