add button to copy shipping contact email to clipboard
This commit is contained in:
parent
d6df034ad0
commit
5a1de437b6
3 changed files with 30 additions and 3 deletions
|
@ -16,6 +16,10 @@
|
|||
<button-- class="btn btn-success" @click="markItemReturned({type: 'tickets', id: ticket.id})">Mark
|
||||
as returned
|
||||
</button-->
|
||||
<ClipboardButton :payload="shippingEmail" class="btn btn-primary">
|
||||
<font-awesome-icon icon="clipboard"/>
|
||||
Copy DHL contact to clipboard
|
||||
</ClipboardButton>
|
||||
<div class="btn-group">
|
||||
<select class="form-control" v-model="ticket.state">
|
||||
<option v-for="status in state_options" :value="status.value">{{ status.text }}</option>
|
||||
|
@ -32,16 +36,21 @@
|
|||
<script>
|
||||
import {mapActions, mapState} from 'vuex';
|
||||
import Timeline from "@/components/Timeline.vue";
|
||||
import ClipboardButton from "@/components/inputs/ClipboardButton.vue";
|
||||
|
||||
export default {
|
||||
name: 'Ticket',
|
||||
components: {Timeline},
|
||||
components: {ClipboardButton, Timeline},
|
||||
computed: {
|
||||
...mapState(['tickets', 'state_options']),
|
||||
ticket() {
|
||||
const id = parseInt(this.$route.params.id)
|
||||
const ret = this.tickets.find(ticket => ticket.id === id);
|
||||
return ret ? ret : {};
|
||||
},
|
||||
shippingEmail() {
|
||||
const domain = document.location.hostname;
|
||||
return `ticket+${this.ticket.uuid}@${domain}`;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue