Include travel info documents, adjust layout

This commit is contained in:
Björn Fromme
2018-12-12 10:50:46 +01:00
parent cee4cc0773
commit 2cab426846
@@ -12,7 +12,7 @@
<th>Preis</th> <th>Preis</th>
<th>offen</th> <th>offen</th>
<th>Status</th> <th>Status</th>
<th>Best./Rg.</th> <th>Dokumente</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -21,14 +21,19 @@
<td>{{ event.reisedatum | date }}</td> <td>{{ event.reisedatum | date }}</td>
<td>{{ event.reise }}</td> <td>{{ event.reise }}</td>
<td> <td>
<ul> <ul class="list-unstyled">
<li v-for="customer in event.customers">{{ customer.name }}, {{ customer.vorname }}</li> <li v-for="customer in event.customers">{{ customer.name }}, {{ customer.vorname }}</li>
</ul> </ul>
</td> </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 style="white-space: nowrap">{{ calculateBalance(event) }}</td>
<td>{{ status[event.status] }}</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> </tr>
</tbody> </tbody>
</table> </table>
@@ -71,11 +76,11 @@
} }
return dayjs(date).format('DD.MM.YYYY'); return dayjs(date).format('DD.MM.YYYY');
}, },
getDownloadUrl (event) { getDownloadUrl (event, type) {
return this.$store.state.config.myEpApiBaseUrl return this.$store.state.config.myEpApiBaseUrl
+ '/api/events/' + '/api/events/'
+ event.id + event.id
+ '/confirmation?token=' + '/' + type + '?token='
+ this.$store.getters.authToken; + this.$store.getters.authToken;
}, },
calculateBalance (event) { calculateBalance (event) {
@@ -86,7 +91,7 @@
const payment = parseFloat(event.zahlung.replace(',', '.')); const payment = parseFloat(event.zahlung.replace(',', '.'));
const balance = price - payment; const balance = price - payment;
if (balance > 0) { if (balance > 0) {
return balance.toFixed(2).replace('.', ',') + ' EUR'; return balance.toFixed(2).replace('.', ',') + ' ';
} }
return '-'; return '-';