This commit is contained in:
parent
fbbf8352cf
commit
2677f4b8b6
2 changed files with 17 additions and 1 deletions
|
@ -61,7 +61,6 @@ const store = createStore({
|
|||
'2kg-de': '2kg Paket (DE)',
|
||||
'5kg-de': '5kg Paket (DE)',
|
||||
'10kg-de': '10kg Paket (DE)',
|
||||
'2kg-eu': '2kg Paket (EU)',
|
||||
'5kg-eu': '5kg Paket (EU)',
|
||||
'10kg-eu': '10kg Paket (EU)',
|
||||
}
|
||||
|
@ -564,6 +563,14 @@ const store = createStore({
|
|||
state.fetchedData.tickets = 0;
|
||||
await Promise.all([dispatch('loadTickets'), dispatch('fetchShippingVouchers')]);
|
||||
}
|
||||
},
|
||||
async linkTicketItem({dispatch, state, getters}, {ticket_id, item_id}) {
|
||||
const {data, success} = await getters.session.post(`/2/matches/`, {issue_thread: ticket_id, item: item_id});
|
||||
if (data && success) {
|
||||
state.fetchedData.tickets = 0;
|
||||
state.fetchedData.items = 0;
|
||||
await Promise.all([dispatch('loadTickets'), dispatch('loadEventItems')]);
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [persistentStatePlugin({ // TODO change remember to some kind of enable field
|
||||
|
|
|
@ -81,6 +81,13 @@
|
|||
<font-awesome-icon icon="clipboard"/>
|
||||
Copy DHL contact to clipboard
|
||||
</ClipboardButton>
|
||||
<div class="btn-group">
|
||||
<input type="text" class="form-control" v-model="item_id">
|
||||
<button class="form-control btn btn-success"
|
||||
@click="linkTicketItem({ticket_id: ticket.id, item_id: item_id}).then(()=>item_id='')">
|
||||
Link Item
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<select class="form-control" v-model="shipping_voucher_type">
|
||||
<option v-for="type in availableShippingVoucherTypes.filter(t=>t.count>0)"
|
||||
|
@ -141,6 +148,7 @@ export default {
|
|||
selected_state: null,
|
||||
selected_assignee: null,
|
||||
shipping_voucher_type: null,
|
||||
item_id: "",
|
||||
newMail: "",
|
||||
newComment: ""
|
||||
}
|
||||
|
@ -166,6 +174,7 @@ export default {
|
|||
...mapActions(['deleteItem', 'markItemReturned', 'sendMail', 'updateTicketPartial', 'postComment']),
|
||||
...mapActions(['loadTickets', 'fetchTicketStates', 'loadUsers', 'scheduleAfterInit']),
|
||||
...mapActions(['claimShippingVoucher', 'fetchShippingVouchers']),
|
||||
...mapActions(['linkTicketItem']),
|
||||
...mapMutations(['openLightboxModalWith']),
|
||||
changeTicketStatus() {
|
||||
this.ticket.state = this.selected_state;
|
||||
|
|
Loading…
Add table
Reference in a new issue