diff --git a/src/server/app.js b/src/server/app.js index 25f4ead..95dae62 100644 --- a/src/server/app.js +++ b/src/server/app.js @@ -56,6 +56,8 @@ if ( settings.init ) { file = path.join( __dirname + '/../webapp/setup/dist/index.html' ); } +// TODO: Create plugin loader and manager + app.use( ( request, response ) => { response.sendFile( file ); diff --git a/src/server/backend/db/data/seatplan.json b/src/server/backend/db/data/seatplan.json index cb710e8..44c32ae 100644 --- a/src/server/backend/db/data/seatplan.json +++ b/src/server/backend/db/data/seatplan.json @@ -1 +1 @@ -{"test2":{"draft":{},"save":{"seatInfo":{"data":{"1":{"0":22},"2":{"0":9},"3":{"0":9}},"count":0},"data":{"1":{"x":299.02,"y":17.157,"h":564.951,"w":731.618,"active":false,"draggable":true,"resizable":true,"id":1,"origin":1,"shape":"rectangular","type":"seat","startingRow":1,"seatNumberingPosition":1,"sector":"A","text":{"text":"TestText","textSize":20,"colour":"#20FFFF"},"numberingDirection":"left","category":"1"},"2":{"x":359.069,"y":661.765,"h":121.324,"w":604.167,"active":false,"draggable":true,"resizable":true,"id":2,"origin":3,"shape":"rectangular","type":"stage","startingRow":1,"seatNumberingPosition":1,"sector":"A","text":{"text":"TestText","textSize":20,"colour":"#20FFFF"},"ticketCount":1,"numberingDirection":"left","category":"1"},"3":{"x":519.608,"y":671.569,"h":83.333,"w":306.373,"active":false,"draggable":true,"resizable":true,"id":3,"origin":1,"shape":"rectangular","type":"text","startingRow":1,"seatNumberingPosition":2,"sector":"A","text":{"text":"Stage","textSize":25,"colour":"#2160ff"},"ticketCount":1,"numberingDirection":"left","category":"1"}}}},"test":{"draft":{},"save":{"seatInfo":{"data":{"1":{"0":22}},"count":0},"data":{"1":{"x":122.549,"y":122.549,"h":371.324,"w":735.294,"active":false,"draggable":true,"resizable":true,"id":1,"origin":1,"shape":"rectangular","type":"seat","startingRow":1,"seatNumberingPosition":1,"sector":"A","text":{"text":"TestText","textSize":20,"colour":"#20FFFF"},"numberingDirection":"left","category":"1"}}}}} \ No newline at end of file +{"test2":{"draft":{},"save":{"seatInfo":{"data":{"1":{"0":22},"2":{"0":9},"3":{"0":9}},"count":0},"data":{"1":{"x":299.02,"y":17.157,"h":564.951,"w":731.618,"active":false,"draggable":true,"resizable":true,"id":1,"origin":1,"shape":"rectangular","type":"seat","startingRow":1,"seatNumberingPosition":1,"sector":"A","text":{"text":"TestText","textSize":20,"colour":"#20FFFF"},"numberingDirection":"left","category":"1"},"2":{"x":359.069,"y":661.765,"h":121.324,"w":604.167,"active":false,"draggable":true,"resizable":true,"id":2,"origin":3,"shape":"rectangular","type":"stage","startingRow":1,"seatNumberingPosition":1,"sector":"A","text":{"text":"TestText","textSize":20,"colour":"#20FFFF"},"ticketCount":1,"numberingDirection":"left","category":"1"},"3":{"x":519.608,"y":671.569,"h":83.333,"w":306.373,"active":false,"draggable":true,"resizable":true,"id":3,"origin":1,"shape":"rectangular","type":"text","startingRow":1,"seatNumberingPosition":2,"sector":"A","text":{"text":"Stage","textSize":25,"colour":"#2160ff"},"ticketCount":1,"numberingDirection":"left","category":"1"}}}},"test":{"draft":{},"save":{"seatInfo":{"data":{"1":{"0":22}},"count":0},"data":{"1":{"x":427.696,"y":160.539,"h":371.324,"w":734.069,"active":false,"draggable":true,"resizable":true,"id":1,"origin":1,"shape":"rectangular","type":"stand","startingRow":1,"seatNumberingPosition":1,"sector":"A","text":{"text":"TestText","textSize":20,"colour":"#20FFFF"},"numberingDirection":"left","category":"1","ticketCount":50}}}}} \ No newline at end of file diff --git a/src/webapp/main/index.html b/src/webapp/main/index.html index 5ce9aa3..11a4716 100644 --- a/src/webapp/main/index.html +++ b/src/webapp/main/index.html @@ -12,6 +12,7 @@ + diff --git a/src/webapp/main/src/App.vue b/src/webapp/main/src/App.vue index c6f446a..8fe1139 100644 --- a/src/webapp/main/src/App.vue +++ b/src/webapp/main/src/App.vue @@ -178,6 +178,11 @@ export default { } }, created () { + if ( window.webpage.engine.trident ) { + alert( 'Welcome! We have detected that you are still using Internet Explorer or a similar browser. As a modern webapp, libreevent does NOT officially support Internet Explorer. If you run into problems whilst using this webapp, please switch to a modern browser like Firefox.' ) + } else if ( window.webpage.engine.presto ) { + alert( 'Welcome! We have detected that you are a very old version of Opera or related browser. As a modern webapp, libreevent does only support modern browsers. If you run into issues whilst using this webapp, please switch to a modern browser, like Firefox.' ) + } this.theme = localStorage.getItem( 'theme' ) ? localStorage.getItem( 'theme' ) : ''; if ( window.matchMedia( '(prefers-color-scheme: dark)' ).matches || this.theme === '☼' ) { document.documentElement.classList.add( 'dark' ); diff --git a/src/webapp/main/src/components/noseatplan.vue b/src/webapp/main/src/components/noseatplan.vue index 8e489ea..48cc965 100644 --- a/src/webapp/main/src/components/noseatplan.vue +++ b/src/webapp/main/src/components/noseatplan.vue @@ -41,7 +41,7 @@ export default { data () { return { tickets: { 'ticket1': { 'name': 'Ticket 1', 'id': 'ticket1', 'category': 1, 'free': 20 }, 'ticket2': { 'name': 'Ticket 2', 'id': 'ticket2', 'category': 2, 'free': 20 } }, - event: { 'name': 'TestEvent', 'location': 'TestLocation', 'date': 'TestDate', 'RoomName': 'TestRoom', 'currency': 'CHF', 'categories': { '1': { 'price': { '1':25, '2':35 }, 'bg': 'black', 'fg': 'white', 'name': 'Category 1' }, '2': { 'price': { '1':15, '2':20 }, 'bg': 'green', 'fg': 'white', 'name': 'Category 2' } }, 'ageGroups': { '1':{ 'id': 1, 'name':'Child', 'age':'0 - 15.99 years' }, '2':{ 'id': 2, 'name': 'Adult', 'age': null } }, 'ageGroupCount':2, 'stage': true }, + event: { 'name': 'TestEvent', 'location': 'TestLocation', 'date': 'TestDate', 'RoomName': 'TestRoom', 'currency': 'CHF', 'categories': { '1': { 'price': { '1':25, '2':35 }, 'bg': 'black', 'fg': 'white', 'name': 'Category 1' }, '2': { 'price': { '1':15, '2':20 }, 'bg': 'green', 'fg': 'white', 'name': 'Category 2' } }, 'ageGroups': { '1':{ 'id': 1, 'name':'Child', 'age':'0 - 15.99 years' }, '2':{ 'id': 2, 'name': 'Adult', 'age': null } }, 'stage': true }, cart: {}, } }, diff --git a/src/webapp/main/src/components/notifications/popups.vue b/src/webapp/main/src/components/notifications/popups.vue index 0f1aa3e..eddc51b 100644 --- a/src/webapp/main/src/components/notifications/popups.vue +++ b/src/webapp/main/src/components/notifications/popups.vue @@ -42,6 +42,28 @@ +
@@ -66,7 +88,7 @@ data () { return { contentType: 'dropdown', - data: {} + data: {}, } }, methods: { @@ -76,14 +98,32 @@ this.$emit( 'data', { 'data': this.data.selected, 'status': message } ); } }, + selectTicket ( option ) { + let total = 0; + for ( let i in this.data.options.count ) { + total += this.data.options.count[ i ]; + } + + if ( total < this.data.options.max ) { + this.data.options.count[ option ] += 1; + } + }, + deselectTicket ( option ) { + if ( this.data.options.count[ option ] > 0 ) { + this.data.options.count[ option ] -= 1; + } + }, + submitTicket () { + $( '#popup-backdrop' ).fadeOut( 300 ); + this.$emit( 'ticket', { 'data': this.data.options.count, 'component': this.data.options.id } ); + }, closePopupAdvanced ( message, data ) { this.data[ 'selected' ] = data; this.closePopup( message ); }, openPopup ( message, options, dataType, selected ) { - let data = { 'message': message ? message : 'No message defined on method call!!', 'options': options ? options : { '1': { 'value': 'undefined', 'displayName': 'No options specified in call' } }, 'selected': selected ? selected : '' }; - this.data = data; - this.contentType = dataType ? dataType : 'string'; + this.data = { 'message': message ?? 'No message defined on method call!!', 'options': options ?? { '1': { 'value': 'undefined', 'displayName': 'No options specified in call' } }, 'selected': selected ?? '' }; + this.contentType = dataType ?? 'string'; $( '#popup-backdrop' ).fadeIn( 300 ); } }, @@ -200,4 +240,13 @@ .select-button:hover { background-color: var( --hover-color ) !important; } + + .controls { + user-select: none; + cursor: pointer; + font-size: 100%; + font-weight: bold; + border: solid var( --primary-color ) 1px; + border-radius: 100%; + } \ No newline at end of file diff --git a/src/webapp/main/src/components/seatplan/editor/window.vue b/src/webapp/main/src/components/seatplan/editor/window.vue index 053b6bf..ad8622f 100644 --- a/src/webapp/main/src/components/seatplan/editor/window.vue +++ b/src/webapp/main/src/components/seatplan/editor/window.vue @@ -179,9 +179,14 @@ this.available.undo = true; } - let supportedBrowser = []; + if ( window.webpage.engine.trident ) { + alert( 'Welcome! We have detected that you are still using Internet Explorer or a similar browser. As a modern webapp, libreevent does NOT officially support Internet Explorer. If you run into problems whilst using this webapp, please switch to a modern browser like Firefox.' ); + } else if ( window.webpage.engine.presto ) { + alert( 'Welcome! We have detected that you are a very old version of Opera or related browser. As a modern webapp, libreevent does only support modern browsers. If you run into issues whilst using this webapp, please switch to a modern browser, like Firefox.' ); + } else if ( window.webpage.engine.webkit ) { + alert( 'Hello! Whilst tested with some versions of Webkit (the browser engine of Safari), support for this engine is still unofficial. Therefore we cannot guarantee that all the features of the seatplan editor function as they should. If you run into problems, please contact us through the link provided in the documentation.' ); + } this.save(); - // TODO: Add warning for untested browsers & suboptimal window sizes! }, eventHandler ( e ) { if ( this.prevSize.h != window.innerHeight || this.prevSize.w != window.innerWidth ) { diff --git a/src/webapp/main/src/components/seatplan/userApp/seatplanComponents/standing.vue b/src/webapp/main/src/components/seatplan/userApp/seatplanComponents/standing.vue index 756ff5e..6d1c332 100644 --- a/src/webapp/main/src/components/seatplan/userApp/seatplanComponents/standing.vue +++ b/src/webapp/main/src/components/seatplan/userApp/seatplanComponents/standing.vue @@ -94,7 +94,7 @@ export default { this.style = 'border-style: none none none solid'; this.circularStyle = 'top: -100%; right: 100%;'; } - } + }, }, watch: { origin ( value ) { diff --git a/src/webapp/main/src/components/seatplan/userApp/userWindow.vue b/src/webapp/main/src/components/seatplan/userApp/userWindow.vue index 24b9fd8..01b6dd0 100644 --- a/src/webapp/main/src/components/seatplan/userApp/userWindow.vue +++ b/src/webapp/main/src/components/seatplan/userApp/userWindow.vue @@ -31,7 +31,8 @@ @seatSelected="( seat ) => { seatSelected( seat ) }" @seatDeselected="( seat ) => { seatDeselected( seat ) }">Currency codes used must be valid ISO 4217 codes. Read more on this page of the documentation
+Currency codes used must be valid ISO 4217 codes. Read more on this page of the documentation
Please read into the documentation of this section if you want to use the requirements. It requires specific syntax to work. See here for more information
+Please read into the documentation of this section if you want to use the requirements. It requires specific syntax to work. See here for more information