fixed addresstickets view
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
Vue.component('AddressTickets', {
|
||||
template: `
|
||||
<div>
|
||||
<tt-card class="mb-4">
|
||||
<h3 class="text-center mb-3">Tickets</h3>
|
||||
<div class="table-responsive">
|
||||
<tt-card class="mb-4 mt-4">
|
||||
<h3 class="text-center mb-3">Tickets - {{ customerName }} ({{ customerNumber }})</h3>
|
||||
<div v-if="tickets.length === 0" class="alert alert-info text-center">
|
||||
Keine Tickets gefunden.
|
||||
</div>
|
||||
<div v-else class="table-responsive">
|
||||
<table class="table table-striped table-hover table-sm">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>Kundennummer</th>
|
||||
<th>Erstellt am</th>
|
||||
<th>Betreff</th>
|
||||
<th>Letztes Update</th>
|
||||
@@ -16,7 +18,6 @@ Vue.component('AddressTickets', {
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="ticket in tickets" :key="ticket.id">
|
||||
<td>{{ ticket.customField7 }}</td>
|
||||
<td>{{ formatDate(ticket.createdAt) }}</td>
|
||||
<td>{{ ticket.subject }}</td>
|
||||
<td>{{ formatDate(ticket.updatedAt) }}</td>
|
||||
@@ -30,7 +31,10 @@ Vue.component('AddressTickets', {
|
||||
|
||||
<tt-card>
|
||||
<h3 class="text-center mb-3">Lieferscheine</h3>
|
||||
<div class="table-responsive">
|
||||
<div v-if="shippingNotes.length === 0" class="alert alert-info text-center">
|
||||
Keine Lieferscheine gefunden.
|
||||
</div>
|
||||
<div v-else class="table-responsive">
|
||||
<table class="table table-striped table-hover table-sm">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
@@ -65,10 +69,15 @@ Vue.component('AddressTickets', {
|
||||
return {window: window};
|
||||
},
|
||||
computed: {
|
||||
customerName() {
|
||||
return this.window.TT_CONFIG?.CUSTOMER_NAME || '';
|
||||
},
|
||||
customerNumber() {
|
||||
return this.window.TT_CONFIG?.CUSTOMER_NUMBER || '';
|
||||
},
|
||||
tickets() {
|
||||
return (this.window.TT_CONFIG?.TICKETS || []).map(t => ({
|
||||
id: t.id,
|
||||
customField7: t.customField7,
|
||||
createdAt: t.createdAt,
|
||||
subject: t.subject,
|
||||
updatedAt: t.updatedAt,
|
||||
|
||||
Reference in New Issue
Block a user