Include travel info documents, adjust layout
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<th>Preis</th>
|
||||
<th>offen</th>
|
||||
<th>Status</th>
|
||||
<th>Best./Rg.</th>
|
||||
<th>Dokumente</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -21,14 +21,19 @@
|
||||
<td>{{ event.reisedatum | date }}</td>
|
||||
<td>{{ event.reise }}</td>
|
||||
<td>
|
||||
<ul>
|
||||
<ul class="list-unstyled">
|
||||
<li v-for="customer in event.customers">{{ customer.name }}, {{ customer.vorname }}</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td style="white-space: nowrap">{{ event.preis }} EUR</td>
|
||||
<td style="white-space: nowrap">{{ event.preis }} €</td>
|
||||
<td style="white-space: nowrap">{{ calculateBalance(event) }}</td>
|
||||
<td>{{ status[event.status] }}</td>
|
||||
<td><a :href="getDownloadUrl(event)" target="_blank"><i class="fa fa-file-pdf-o"></i></a></td>
|
||||
<td>
|
||||
<a :href="getDownloadUrl(event, 'confirmation')" target="_blank">Bestätigung</a>
|
||||
<template v-if="event.reisedokument">
|
||||
<a :href="getDownloadUrl(event, 'documents')" target="_blank">Reiseinfos</a>
|
||||
</template>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -71,11 +76,11 @@
|
||||
}
|
||||
return dayjs(date).format('DD.MM.YYYY');
|
||||
},
|
||||
getDownloadUrl (event) {
|
||||
getDownloadUrl (event, type) {
|
||||
return this.$store.state.config.myEpApiBaseUrl
|
||||
+ '/api/events/'
|
||||
+ event.id
|
||||
+ '/confirmation?token='
|
||||
+ '/' + type + '?token='
|
||||
+ this.$store.getters.authToken;
|
||||
},
|
||||
calculateBalance (event) {
|
||||
@@ -86,7 +91,7 @@
|
||||
const payment = parseFloat(event.zahlung.replace(',', '.'));
|
||||
const balance = price - payment;
|
||||
if (balance > 0) {
|
||||
return balance.toFixed(2).replace('.', ',') + ' EUR';
|
||||
return balance.toFixed(2).replace('.', ',') + ' €';
|
||||
}
|
||||
|
||||
return '-';
|
||||
|
||||
Reference in New Issue
Block a user