Purchase
-
Personal information
-
-
-
Log in with an existing account
+
+ Log in with an existing account
+ Create new account
+ Purchase as guest
+
+
+
Order summary
+
+
Your tickets
+
+ - {{ event.name }}
+
+ - {{ ticket.name }} ({{ ticket.category.name }}, {{ ticket.ageGroup }}) {{ event.currency }} {{ ticket.price }}
+
+
+
+
+
Total: {{ backend.currency }} {{ backend.total }}
+ Buy now
+
+
+
+ Cart is empty. Please add tickets here
+
-
@@ -69,10 +98,30 @@ export default {
name: 'PurchaseView',
data () {
return {
- settings: { 'accountRequired':true },
- isAuthenticated: false,
- formData: {}
+ settings: { 'accountRequired': true },
+ isAuthenticated: true,
+ tickets: {},
+ backend: {},
+ cartNotEmpty: false,
}
+ },
+ methods: {
+ loadData () {
+ this.cartNotEmpty = false;
+ let tickets = JSON.parse( sessionStorage.getItem( 'cart' ) );
+
+ for ( let event in tickets ) {
+ if ( Object.keys( tickets[ event ][ 'selectedSeats' ] ).length ) {
+ this.cartNotEmpty = true;
+ };
+ }
+
+ this.tickets = tickets;
+ this.backend = JSON.parse( sessionStorage.getItem( 'backend' ) );
+ },
+ },
+ created () {
+ this.loadData();
}
};
diff --git a/src/webapp/src/views/admin/AdminView.vue b/src/webapp/src/views/admin/AdminView.vue
index af5b736..d1a8b51 100644
--- a/src/webapp/src/views/admin/AdminView.vue
+++ b/src/webapp/src/views/admin/AdminView.vue
@@ -10,7 +10,7 @@
-
+
@@ -69,9 +69,14 @@
padding: 4% 0%;
width: 100%;
background-color: rgba( 0, 0, 0, 0 );
- color: white;
+ color: var( --secondary-color );
+ cursor: pointer;
+ font-family: Avenir, Helvetica, Arial, sans-serif;
+ font-weight: bold;
text-decoration: none;
transition: 1s;
+ font-size: 100%;
+ border-style: none;
}
nav a.router-link-exact-active {
@@ -106,7 +111,12 @@
},
methods: {
logout () {
- this.userStore.setAdminAuth( false );
+ if ( confirm( 'Do you really want to log out?' ) ) {
+ fetch( '/admin/logout' ).then( _ => {
+ this.userStore.setAdminAuth( false );
+ this.$router.push( '/admin/login' );
+ } );
+ }
}
}
};