diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/Events.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/Events.vue index 86a0e77d..2c5c20fc 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/Events.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/Events.vue @@ -5,23 +5,23 @@ - - - - - - + + + + + + - - - - - - + + + + + +
BuchungsdatumReisedatumReisePreisoffenStatusBuchungsdatumReisedatumReisePreisoffenStatus
{{ formatBookingDate(event.dateBooking) }}{{ event.dateTravel | date }}{{ event.product }}{{ event.price }} €{{ calculateBalance(event) }}{{ status[event.status] }}{{ formatBookingDate(event.dateBooking) }}{{ event.dateTravel | date }}{{ event.product }}{{ formatCurrency(event.price) }}{{ calculateBalance(event) }}{{ status[event.status] }} Bestätigung @@ -90,15 +90,21 @@ import {mapState, mapMutations, mapGetters} from 'vuex' + sessionStorage.getItem('myep-auth-token'); }, calculateBalance (event) { - if (!event.price || !event.payment) { + if (!event.price) { return '-'; } const balance = event.price - event.payment; if (balance > 0) { - return balance.toFixed(2).replace('.', ',') + ' €'; + return this.formatCurrency(balance); } return '-'; + }, + hasOutstandingPayment (event) { + return (event.price - event.payment) > 0; + }, + formatCurrency (value) { + return value.toFixed(2).replace('.', ',') + ' €'; } }, computed: { @@ -107,10 +113,3 @@ import {mapState, mapMutations, mapGetters} from 'vuex' } } - -