mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 21:34:24 +00:00
progress on seat numbering algorithm
This commit is contained in:
@@ -1 +1 @@
|
||||
{"test4":{"name":"Test4Event","description":"Let's see what happens if I update the description, how fast it is reflected in the UI","location":"test2","date":"2023-10-30T10:00:00.000Z","categories":{"1":{"price":{"1":20,"2":30},"bg":"#ff0000","fg":"#ff0000","name":"Category 1","id":"1","ticketCount":1}},"ageGroups":{"1":{"id":1,"name":"Child","age":"0 - 15.99"},"2":{"id":2,"name":"Adult"}},"maxTickets":0,"eventID":"test4","time":"10:00:00.000","startingPrice":20,"currency":"CHF","isDraft":true,"locationName":"TestLocation2","hasSeatplan":true,"totalSeats":353},"test3":{"name":"TestEvent3","description":"This is another test event, this time without seat plan","location":"test","date":"2023-11-25T19:00:00.000Z","categories":{"1":{"price":{"1":20,"2":25},"bg":"#FFFFFF","fg":"#000000","name":"Category 1","id":1,"ticketCount":50},"2":{"price":{"1":30,"2":35},"bg":"#FFFFFF","fg":"#000000","name":"Category 2","id":2,"ticketCount":50}},"ageGroups":{"1":{"id":1,"name":"Child","age":"0 - 15.99"},"2":{"id":2,"name":"Adult"}},"maxTickets":0,"eventID":"test3","time":"19:00:00.000","startingPrice":20,"currency":"CHF","locationName":"TestLocation","hasSeatplan":false,"totalSeats":100},"testStanding":{"name":"Standing Test event","description":"Teststsatahadsf","location":"testLocationNoSeatplan","date":"2023-11-25T10:00:00.000Z","categories":{"1":{"price":{"1":10,"2":15},"bg":"#FFFFFF","fg":"#ff0000","name":"Category 1","id":"1","ticketCount":1}},"ageGroups":{"1":{"id":1,"name":"Child","age":"0 - 15.99"},"2":{"id":2,"name":"Adult"}},"maxTickets":0,"eventID":"testStanding","time":"10:00:00.000","startingPrice":10,"currency":"CHF","locationName":"TestLocationWithoutSeatplan","hasSeatplan":true,"totalSeats":51}}
|
||||
{"test4":{"name":"Test4Event","description":"Let's see what happens if I update the description, how fast it is reflected in the UI","location":"test2","date":"2023-10-30T10:00:00.000Z","categories":{"1":{"price":{"1":20,"2":30},"bg":"#ff0000","fg":"#ff0000","name":"Category 1","id":"1","ticketCount":1}},"ageGroups":{"1":{"id":1,"name":"Child","age":"0 - 15.99"},"2":{"id":2,"name":"Adult"}},"maxTickets":0,"eventID":"test4","time":"10:00:00.000","startingPrice":20,"currency":"CHF","isDraft":true,"locationName":"TestLocation2","hasSeatplan":true,"totalSeats":353},"test3":{"name":"TestEvent3","description":"This is another test event, this time without seat plan","location":"test","date":"2023-11-25T19:00:00.000Z","categories":{"1":{"price":{"1":20,"2":25},"bg":"#FFFFFF","fg":"#000000","name":"Category 1","id":1,"ticketCount":50},"2":{"price":{"1":30,"2":35},"bg":"#FFFFFF","fg":"#000000","name":"Category 2","id":2,"ticketCount":50}},"ageGroups":{"1":{"id":1,"name":"Child","age":"0 - 15.99"},"2":{"id":2,"name":"Adult"}},"maxTickets":0,"eventID":"test3","time":"19:00:00.000","startingPrice":20,"currency":"CHF","locationName":"TestLocation","hasSeatplan":false,"totalSeats":100},"testStanding":{"name":"Standing Test event","description":"Teststsatahadsf","location":"testLocationNoSeatplan","date":"2023-11-25T10:00:00.000Z","categories":{"1":{"price":{"1":10,"2":15},"bg":"#FFFFFF","fg":"#ff0000","name":"Category 1","id":"1","ticketCount":1}},"ageGroups":{"1":{"id":1,"name":"Child","age":"0 - 15.99"},"2":{"id":2,"name":"Adult"}},"maxTickets":0,"eventID":"testStanding","time":"10:00:00.000","startingPrice":10,"currency":"CHF","locationName":"TestLocationWithoutSeatplan","hasSeatplan":true,"totalSeats":51},"complexLocationTest":{"name":"Complex Location Testing","description":"asfoigup agsöjkhdf gasjklgadfslkj","location":"complexSeatplan","date":"2024-01-17T10:00:00.000Z","categories":{"1":{"price":{"1":10,"2":20},"bg":"#FFFFFF","fg":"#0040ff","name":"Category 1","id":"1","ticketCount":1},"2":{"price":{"1":20,"2":30},"bg":"#FFFFFF","fg":"#ff0000","name":"Category 2","id":2,"ticketCount":1}},"ageGroups":{"1":{"id":1,"name":"Child","age":"0 - 15.99"},"2":{"id":2,"name":"Adult"}},"maxTickets":0,"eventID":"complexLocationTest","time":"10:00:00.000","startingPrice":10,"currency":"CHF","locationName":"Complex Seat Plan","hasSeatplan":true,"totalSeats":246}}
|
||||
@@ -1 +1 @@
|
||||
{"test4":{"name":"Test4Event","description":"Let's see what happens if I update the description, how fast it is reflected in the UI","location":"test2","date":"2023-10-30T10:00:00.000Z","categories":{"1":{"price":{"1":20,"2":30},"bg":"#ff0000","fg":"#ff0000","name":"Category 1","id":"1","ticketCount":1}},"ageGroups":{"1":{"id":1,"name":"Child","age":"0 - 15.99"},"2":{"id":2,"name":"Adult"}},"maxTickets":0,"eventID":"test4","time":"10:00:00.000","startingPrice":20,"currency":"CHF","isDraft":true,"locationName":"TestLocation2","hasSeatplan":true,"totalSeats":353},"test3":{"name":"TestEvent3","description":"This is another test event, this time without seat plan","location":"test","date":"2023-11-25T19:00:00.000Z","categories":{"1":{"price":{"1":20,"2":25},"bg":"#FFFFFF","fg":"#000000","name":"Category 1","id":1,"ticketCount":50},"2":{"price":{"1":30,"2":35},"bg":"#FFFFFF","fg":"#000000","name":"Category 2","id":2,"ticketCount":50}},"ageGroups":{"1":{"id":1,"name":"Child","age":"0 - 15.99"},"2":{"id":2,"name":"Adult"}},"maxTickets":0,"eventID":"test3","time":"19:00:00.000","startingPrice":20,"currency":"CHF","locationName":"TestLocation","hasSeatplan":false,"totalSeats":100},"testStanding":{"name":"Standing Test event","description":"Teststsatahadsf","location":"testLocationNoSeatplan","date":"2023-11-25T10:00:00.000Z","categories":{"1":{"price":{"1":10,"2":15},"bg":"#FFFFFF","fg":"#ff0000","name":"Category 1","id":"1","ticketCount":1}},"ageGroups":{"1":{"id":1,"name":"Child","age":"0 - 15.99"},"2":{"id":2,"name":"Adult"}},"maxTickets":0,"eventID":"testStanding","time":"10:00:00.000","startingPrice":10,"currency":"CHF","locationName":"TestLocationWithoutSeatplan","hasSeatplan":true,"totalSeats":51}}
|
||||
{"test4":{"name":"Test4Event","description":"Let's see what happens if I update the description, how fast it is reflected in the UI","location":"test2","date":"2023-10-30T10:00:00.000Z","categories":{"1":{"price":{"1":20,"2":30},"bg":"#ff0000","fg":"#ff0000","name":"Category 1","id":"1","ticketCount":1}},"ageGroups":{"1":{"id":1,"name":"Child","age":"0 - 15.99"},"2":{"id":2,"name":"Adult"}},"maxTickets":0,"eventID":"test4","time":"10:00:00.000","startingPrice":20,"currency":"CHF","isDraft":true,"locationName":"TestLocation2","hasSeatplan":true,"totalSeats":353},"test3":{"name":"TestEvent3","description":"This is another test event, this time without seat plan","location":"test","date":"2023-11-25T19:00:00.000Z","categories":{"1":{"price":{"1":20,"2":25},"bg":"#FFFFFF","fg":"#000000","name":"Category 1","id":1,"ticketCount":50},"2":{"price":{"1":30,"2":35},"bg":"#FFFFFF","fg":"#000000","name":"Category 2","id":2,"ticketCount":50}},"ageGroups":{"1":{"id":1,"name":"Child","age":"0 - 15.99"},"2":{"id":2,"name":"Adult"}},"maxTickets":0,"eventID":"test3","time":"19:00:00.000","startingPrice":20,"currency":"CHF","locationName":"TestLocation","hasSeatplan":false,"totalSeats":100},"testStanding":{"name":"Standing Test event","description":"Teststsatahadsf","location":"testLocationNoSeatplan","date":"2023-11-25T10:00:00.000Z","categories":{"1":{"price":{"1":10,"2":15},"bg":"#FFFFFF","fg":"#ff0000","name":"Category 1","id":"1","ticketCount":1}},"ageGroups":{"1":{"id":1,"name":"Child","age":"0 - 15.99"},"2":{"id":2,"name":"Adult"}},"maxTickets":0,"eventID":"testStanding","time":"10:00:00.000","startingPrice":10,"currency":"CHF","locationName":"TestLocationWithoutSeatplan","hasSeatplan":true,"totalSeats":51},"complexLocationTest":{"name":"Complex Location Testing","description":"asfoigup agsöjkhdf gasjklgadfslkj","location":"complexSeatplan","date":"2024-01-17T10:00:00.000Z","categories":{"1":{"price":{"1":10,"2":20},"bg":"#FFFFFF","fg":"#0040ff","name":"Category 1","id":"1","ticketCount":1},"2":{"price":{"1":20,"2":30},"bg":"#FFFFFF","fg":"#ff0000","name":"Category 2","id":2,"ticketCount":1}},"ageGroups":{"1":{"id":1,"name":"Child","age":"0 - 15.99"},"2":{"id":2,"name":"Adult"}},"maxTickets":0,"eventID":"complexLocationTest","time":"10:00:00.000","startingPrice":10,"currency":"CHF","locationName":"Complex Seat Plan","hasSeatplan":true,"totalSeats":246}}
|
||||
@@ -1 +1 @@
|
||||
{"test2":{"locationID":"test2","name":"TestLocation2","seatplan-enabled":true,"totalSeats":352},"test":{"locationID":"test","name":"TestLocation","seatplan-enabled":false},"testLocationNoSeatplan":{"locationID":"testLocationNoSeatplan","name":"TestLocationWithoutSeatplan","seatplan-enabled":true,"totalSeats":50}}
|
||||
{"test2":{"locationID":"test2","name":"TestLocation2","seatplan-enabled":true,"totalSeats":352},"test":{"locationID":"test","name":"TestLocation","seatplan-enabled":false},"testLocationNoSeatplan":{"locationID":"testLocationNoSeatplan","name":"TestLocationWithoutSeatplan","seatplan-enabled":true,"totalSeats":50},"complexSeatplan":{"locationID":"complexSeatplan","name":"Complex Seat Plan","seatplan-enabled":true,"totalSeats":244}}
|
||||
File diff suppressed because one or more lines are too long
@@ -82,7 +82,7 @@
|
||||
zoomFactor: 1,
|
||||
historyPos: 0,
|
||||
generalSettings: { 'namingScheme': 'numeric' },
|
||||
seatCountInfo: { 'data': {}, 'count': 0 },
|
||||
seatCountInfo: { 'details': {}, 'count': 0 },
|
||||
autoSave: null,
|
||||
}
|
||||
},
|
||||
@@ -317,7 +317,10 @@
|
||||
sessionStorage.setItem( 'seatplan', JSON.stringify( this.scaleDown( this.draggables ) ) );
|
||||
},
|
||||
saveDraft () {
|
||||
this.getSeatCount();
|
||||
if ( !this.getSeatCount() ) {
|
||||
this.$refs.notification.createNotification( 'Collision of seat count!', 10, 'error', 'normal' );
|
||||
return;
|
||||
}
|
||||
let progressNotification = this.$refs.notification.createNotification( 'Saving as draft', 5, 'progress', 'normal' );
|
||||
sessionStorage.setItem( 'seatplan', JSON.stringify( this.scaleDown( this.draggables ) ) );
|
||||
const options = {
|
||||
@@ -342,7 +345,10 @@
|
||||
// TODO: add warning if no component has a seat start point if any component is a seat component
|
||||
},
|
||||
deploy () {
|
||||
this.getSeatCount();
|
||||
if ( !this.getSeatCount() ) {
|
||||
this.$refs.notification.createNotification( 'Collision of seat count!', 10, 'error', 'normal' );
|
||||
return;
|
||||
}
|
||||
let deployNotification = this.$refs.notification.createNotification( 'Deploying...', 5, 'progress', 'normal' );
|
||||
const options = {
|
||||
method: 'post',
|
||||
@@ -412,8 +418,8 @@
|
||||
}
|
||||
},
|
||||
handleSeatCountInfo ( info ) {
|
||||
this.seatCountInfo[ 'data' ][ info.id ] = info.data;
|
||||
this.seatCountInfo[ 'data' ][ info.id ][ 'startingRow' ] = this.draggables[ info.id ].startingRow;
|
||||
this.seatCountInfo[ 'details' ][ info.id ] = info.data;
|
||||
this.seatCountInfo[ 'details' ][ info.id ][ 'startingRow' ] = this.draggables[ info.id ].startingRow;
|
||||
},
|
||||
getSeatCount () {
|
||||
this.seatCountInfo[ 'count' ] = document.getElementsByClassName( 'seats' ).length;
|
||||
@@ -422,6 +428,16 @@
|
||||
this.seatCountInfo[ 'count' ] += this.draggables[ draggable ][ 'ticketCount' ];
|
||||
}
|
||||
}
|
||||
// Remap seat count info
|
||||
this.seatCountInfo[ 'data' ] = {};
|
||||
for ( let element in this.seatCountInfo[ 'details' ] ) {
|
||||
if ( !this.seatCountInfo[ 'data' ][ this.draggables[ 1 ].sector ] ) {
|
||||
this.seatCountInfo[ 'data' ][ this.draggables[ 1 ].sector ] = {};
|
||||
}
|
||||
if ( this.seatCountInfo[ 'data' ][ this.draggables[ 1 ].sector ][ this.draggables[ element ].seatNumberingPosition ] ) return false;
|
||||
this.seatCountInfo[ 'data' ][ this.draggables[ 1 ].sector ][ this.draggables[ element ].seatNumberingPosition ] = this.seatCountInfo[ 'details' ][ element ];
|
||||
}
|
||||
return true;
|
||||
},
|
||||
},
|
||||
created () {
|
||||
|
||||
@@ -70,6 +70,17 @@ export default {
|
||||
calculateChairs () {
|
||||
// Size of seat at scale 1 is 32px
|
||||
// w & h are normalised
|
||||
console.log( this.data.seatInfo );
|
||||
let offsets = {};
|
||||
if ( this.data.seatInfo ) {
|
||||
for ( let element in this.data.seatInfo.data ) {
|
||||
if ( this.data.seatInfo.data[ element ] > this.data.seatNumbering ) {
|
||||
for ( let row in this.data.seatInfo.data[ element ] ) {
|
||||
offsets[ row ] += this.data.seatInfo.data[ element ][ row ];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let w = Math.round( this.w / this.scaleFactor );
|
||||
let h = Math.round( this.h / this.scaleFactor );
|
||||
const size = 33;
|
||||
@@ -79,17 +90,25 @@ export default {
|
||||
let nn = row * ( Math.PI / 2 );
|
||||
let r = row * size;
|
||||
this.seats[ row ] = {};
|
||||
for ( let n = 0; n < nn; n++ ) {
|
||||
this.seats[ row ][ n ] = { 'style': '', 'id': 'sec' + this.data.sector + 'r' + row + 's' + n, 'displayName': ( this.data.sectorCount > 1 ? 'Sector ' + this.data.sector + ', ' : '' ) + 'Row ' + row + ', Seat ' + ( n + 1 ), 'status': 'av', 'row': row, 'seat': n };
|
||||
for ( let n = ( offsets[ row ] ?? 0 ); n < ( nn + ( offsets[ row ] ?? 0 ) ); n++ ) {
|
||||
const seatNumber = this.data.numberingDirection === 'right' ? ( Math.floor( w / size ) + ( offsets[ row ] ?? 0 ) ) - n: n;
|
||||
this.seats[ row ][ n ] = {
|
||||
'style': '',
|
||||
'id': 'comp' + this.id + 'sec' + this.data.sector + 'r' + row + 's' + seatNumber,
|
||||
'displayName': ( this.data.sectorCount > 1 ? 'Sector ' + this.data.sector + ', ' : '' ) + 'Row ' + row + ', Seat ' + ( seatNumber + 1 ),
|
||||
'status': 'av',
|
||||
'row': row,
|
||||
'seat': n
|
||||
};
|
||||
let phi = n * size / ( row * size );
|
||||
if ( this.origin === 1 ) {
|
||||
this.seats[ row ][ n ][ 'style' ] = `bottom: ${ r * Math.cos( phi ) * this.scaleFactor }px; left: ${ r * Math.sin( phi ) * this.scaleFactor }px; rotate: ${ phi }rad`;
|
||||
this.seats[ row ][ n ][ 'style' ] = `bottom: ${ r * Math.cos( phi ) * this.scaleFactor }px; left: ${ r * Math.sin( phi ) * this.scaleFactor }px; rotate: ${ phi }rad;`;
|
||||
} else if ( this.origin === 2 ) {
|
||||
this.seats[ row ][ n ][ 'style' ] = `bottom: ${ r * Math.cos( phi ) * this.scaleFactor }px; right: ${ r * Math.sin( phi ) * this.scaleFactor }px; rotate: ${ Math.PI * 2 - phi }rad`;
|
||||
this.seats[ row ][ n ][ 'style' ] = `bottom: ${ r * Math.cos( phi ) * this.scaleFactor }px; right: ${ r * Math.sin( phi ) * this.scaleFactor }px; rotate: ${ Math.PI * 2 - phi }rad;`;
|
||||
} else if ( this.origin === 3 ) {
|
||||
this.seats[ row ][ n ][ 'style' ] = `top: ${ r * Math.cos( phi ) * this.scaleFactor }px; right: ${ r * Math.sin( phi ) * this.scaleFactor }px; rotate: ${ phi + Math.PI }rad`;
|
||||
this.seats[ row ][ n ][ 'style' ] = `top: ${ r * Math.cos( phi ) * this.scaleFactor }px; right: ${ r * Math.sin( phi ) * this.scaleFactor }px; rotate: ${ phi + Math.PI }rad;`;
|
||||
} else if ( this.origin === 4 ) {
|
||||
this.seats[ row ][ n ][ 'style' ] = `top: ${ r * Math.cos( phi ) * this.scaleFactor }px; left: ${ r * Math.sin( phi ) * this.scaleFactor }px; rotate: ${ Math.PI - phi }rad`;
|
||||
this.seats[ row ][ n ][ 'style' ] = `top: ${ r * Math.cos( phi ) * this.scaleFactor }px; left: ${ r * Math.sin( phi ) * this.scaleFactor }px; rotate: ${ Math.PI - phi }rad;`;
|
||||
}
|
||||
this.seats[ row ][ n ][ 'scaling' ] = `font-size: ${this.scaleFactor * 200}%; `;
|
||||
if ( this.data.categoryInfo.color ) {
|
||||
|
||||
@@ -74,7 +74,6 @@ export default {
|
||||
calculateChairs () {
|
||||
// Size of seat at scale 1 is 32px
|
||||
// w & h are normalised
|
||||
// TODO: Numbering direction
|
||||
let offsets = {};
|
||||
if ( this.data.seatInfo ) {
|
||||
for ( let element in this.data.seatInfo.data ) {
|
||||
@@ -92,7 +91,15 @@ export default {
|
||||
for ( let row = 0; row < Math.floor( h / size ); row++ ) {
|
||||
this.seats[ row ] = {};
|
||||
for ( let n = ( offsets[ row ] ?? 0 ); n < ( Math.floor( w / size ) + ( offsets[ row ] ?? 0 ) ); n++ ) {
|
||||
this.seats[ row ][ n ] = { 'style': '', 'id': 'sec' + this.data.sector + 'r' + row + 's' + n, 'displayName': ( this.data.sectorCount > 1 ? 'Sector ' + this.data.sector + ', ' : '' ) + 'Row ' + ( row + 1 ) + ', Seat ' + ( n + 1 ), 'status': 'av', 'row': row, 'seat': n };
|
||||
const seatNumber = this.data.numberingDirection === 'right' ? ( Math.floor( w / size ) + ( offsets[ row ] ?? 0 ) ) - n: n;
|
||||
this.seats[ row ][ n ] = {
|
||||
'style': '',
|
||||
'id': 'comp' + this.id + 'sec' + this.data.sector + 'r' + row + 's' + seatNumber,
|
||||
'displayName': ( this.data.sectorCount > 1 ? 'Sector ' + this.data.sector + ', ' : '' ) + 'Row ' + ( row + 1 ) + ', Seat ' + ( seatNumber + 1 ),
|
||||
'status': 'av',
|
||||
'row': row,
|
||||
'seat': n
|
||||
};
|
||||
if ( this.origin === 1 ) {
|
||||
this.seats[ row ][ n ][ 'style' ] = `bottom: ${ row * size * this.scaleFactor }px; left: ${ n * size * this.scaleFactor }px; rotate: ${ this.origin / 4 - 0.25 }turn;`;
|
||||
} else if ( this.origin === 2 ) {
|
||||
|
||||
@@ -70,6 +70,17 @@ export default {
|
||||
calculateChairs () {
|
||||
// Size of seat at scale 1 is 32px
|
||||
// w & h are normalised
|
||||
// TODO: update to new algorithm
|
||||
let offsets = {};
|
||||
if ( this.data.seatInfo ) {
|
||||
for ( let element in this.data.seatInfo.data ) {
|
||||
if ( this.data.seatInfo.data[ element ] > this.data.seatNumbering ) {
|
||||
for ( let row in this.data.seatInfo.data[ element ] ) {
|
||||
offsets[ row ] += this.data.seatInfo.data[ element ][ row ];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let w = Math.round( this.w / this.scaleFactor );
|
||||
let h = Math.round( this.h / this.scaleFactor );
|
||||
const size = 33;
|
||||
@@ -82,17 +93,25 @@ export default {
|
||||
for ( let row = this.startingRow; row < count; row++ ) {
|
||||
let nn = 2 + ( row - 1 ) * 2;
|
||||
this.seats[ row ] = {};
|
||||
for ( let n = 0; n < nn; n++ ) {
|
||||
this.seats[ row ][ n ] = { 'style': '', 'id': 'sec' + this.data.sector + 'r' + row + 's' + n, 'displayName': ( this.data.sectorCount > 1 ? 'Sector ' + this.data.sector + ', ' : '' ) + 'Row ' + row + ', Seat ' + ( n + 1 ), 'status': 'av', 'row': row, 'seat': n };
|
||||
for ( let n = ( offsets[ row ] ?? 0 ); n < ( nn + ( offsets[ row ] ?? 0 ) ); n++ ) {
|
||||
const seatNumber = this.data.numberingDirection === 'right' ? ( Math.floor( w / size ) + ( offsets[ row ] ?? 0 ) ) - n: n;
|
||||
this.seats[ row ][ n ] = {
|
||||
'style': '',
|
||||
'id': 'comp' + this.id + 'sec' + this.data.sector + 'r' + row + 's' + seatNumber,
|
||||
'displayName': ( this.data.sectorCount > 1 ? 'Sector ' + this.data.sector + ', ' : '' ) + 'Row ' + row + ', Seat ' + ( seatNumber + 1 ),
|
||||
'status': 'av',
|
||||
'row': row,
|
||||
'seat': n
|
||||
};
|
||||
let side = n * sideOffset;
|
||||
if ( this.origin === 1 ) {
|
||||
this.seats[ row ][ n ][ 'style' ] = `bottom: ${ ( side + 5 ) * this.scaleFactor }px; left: ${ ( row * sideOffset * 2 - side ) * this.scaleFactor }px; rotate: ${ angle }rad`;
|
||||
this.seats[ row ][ n ][ 'style' ] = `bottom: ${ ( side + 5 ) * this.scaleFactor }px; left: ${ ( row * sideOffset * 2 - side ) * this.scaleFactor }px; rotate: ${ angle }rad;`;
|
||||
} else if ( this.origin === 2 ) {
|
||||
this.seats[ row ][ n ][ 'style' ] = `bottom: ${ ( side + 5 ) * this.scaleFactor }px; right: ${ ( row * sideOffset * 2 - side ) * this.scaleFactor }px; rotate: ${ Math.PI * 2 - angle }rad`;
|
||||
this.seats[ row ][ n ][ 'style' ] = `bottom: ${ ( side + 5 ) * this.scaleFactor }px; right: ${ ( row * sideOffset * 2 - side ) * this.scaleFactor }px; rotate: ${ Math.PI * 2 - angle }rad;`;
|
||||
} else if ( this.origin === 3 ) {
|
||||
this.seats[ row ][ n ][ 'style' ] = `top: ${ ( side + 5 ) * this.scaleFactor }px; right: ${ ( row * sideOffset * 2 - side ) * this.scaleFactor }px; rotate: ${ angle + Math.PI }rad`;
|
||||
this.seats[ row ][ n ][ 'style' ] = `top: ${ ( side + 5 ) * this.scaleFactor }px; right: ${ ( row * sideOffset * 2 - side ) * this.scaleFactor }px; rotate: ${ angle + Math.PI }rad;`;
|
||||
} else if ( this.origin === 4 ) {
|
||||
this.seats[ row ][ n ][ 'style' ] = `top: ${ ( side + 5 ) * this.scaleFactor }px; left: ${ ( row * sideOffset * 2 - side ) * this.scaleFactor }px; rotate: ${ Math.PI - angle }rad`;
|
||||
this.seats[ row ][ n ][ 'style' ] = `top: ${ ( side + 5 ) * this.scaleFactor }px; left: ${ ( row * sideOffset * 2 - side ) * this.scaleFactor }px; rotate: ${ Math.PI - angle }rad;`;
|
||||
}
|
||||
|
||||
this.seats[ row ][ n ][ 'scaling' ] = `font-size: ${this.scaleFactor * 200}%; `;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<h2>Locations</h2>
|
||||
<p>Here you can change everything regarding event locations. All locations can have a seating plan.</p>
|
||||
<p>Here you can change everything regarding event locations. All locations can have a seating plan. Right click for more options.</p>
|
||||
<button @click="addLocation();">Add new location</button>
|
||||
<div class="location-app" v-if="Object.keys( locations ).length">
|
||||
<ul>
|
||||
@@ -78,16 +78,6 @@
|
||||
'value': this.locations[ locationID ][ 'seatplan-enabled' ],
|
||||
'type': 'toggle',
|
||||
},
|
||||
'seatplanEditor': {
|
||||
'display': 'Seat plan editor',
|
||||
'id': 'seatplanEditor',
|
||||
'tooltip':'The seat plan editor allows you to create a seat plan that closely resembles the location you host the event in.',
|
||||
'type': 'link',
|
||||
'restrictions': {
|
||||
'to': '/admin/seatplan',
|
||||
'displayName': 'Edit seat plan'
|
||||
}
|
||||
},
|
||||
}
|
||||
, 'settings' );
|
||||
},
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<div class="category-details">{{ ageGroup.name }}<div style="display: inline;" v-if="ageGroup.age"> ({{ ageGroup.age }})</div>:</div>
|
||||
</td>
|
||||
<td>
|
||||
{{ event.currency }} <input type="number" v-model="category.price[ ageGroup.id ]">
|
||||
{{ currency }} <input type="number" v-model="category.price[ ageGroup.id ]">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -272,17 +272,21 @@
|
||||
},
|
||||
methods: {
|
||||
loadData () {
|
||||
if ( !sessionStorage.getItem( 'selectedTicket' ) ) {
|
||||
this.$router.push( '/admin/events' );
|
||||
}
|
||||
fetch( localStorage.getItem( 'url' ) + '/admin/getAPI/getCurrency' ).then( res => {
|
||||
res.text().then( currency => {
|
||||
this.currency = currency;
|
||||
} );
|
||||
} );
|
||||
if ( !sessionStorage.getItem( 'selectedTicket' ) ) {
|
||||
this.$router.push( '/admin/events' );
|
||||
}
|
||||
fetch( localStorage.getItem( 'url' ) + '/admin/getAPI/getEventStatus' ).then( res => {
|
||||
res.text().then( status => {
|
||||
this.hasLiveVersion = Boolean( status );
|
||||
if ( status === 'true' ) {
|
||||
this.hasLiveVersion = true;
|
||||
} else {
|
||||
this.hasLiveVersion = false;
|
||||
}
|
||||
} );
|
||||
} );
|
||||
this.eventID = sessionStorage.getItem( 'selectedTicket' );
|
||||
|
||||
Reference in New Issue
Block a user