From a856f227bc3d1fa77d35e1136a382615d87cfbdb Mon Sep 17 00:00:00 2001 From: janis Date: Mon, 18 Sep 2023 16:14:57 +0200 Subject: [PATCH] various changes to components --- src/server/config/settings.config.json | 6 +++--- src/server/data/eventDrafts.json | 2 +- src/server/data/events.json | 2 +- src/server/data/locations.json | 2 +- src/server/data/seatplan.json | 2 +- .../main/src/components/notifications/notifications.vue | 5 ++++- src/webapp/main/src/components/seatplan/editor/window.vue | 5 +++++ 7 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/server/config/settings.config.json b/src/server/config/settings.config.json index 54cad01..06161c2 100644 --- a/src/server/config/settings.config.json +++ b/src/server/config/settings.config.json @@ -1,10 +1,10 @@ { "init":true, - "setupDone":false, + "setupDone":true, "twoFA":"enforce", "twoFAMode":"enhanced", - "db":"mysql", - "payments":"payrexx", + "db":"json", + "payments":"stripe", "name":"libreevent", "yourDomain":"http://localhost:8080", "mailSender":"libreevent ", diff --git a/src/server/data/eventDrafts.json b/src/server/data/eventDrafts.json index 837d3b6..ce755dd 100644 --- a/src/server/data/eventDrafts.json +++ b/src/server/data/eventDrafts.json @@ -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":1}} \ No newline at end of file +{"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}} \ No newline at end of file diff --git a/src/server/data/events.json b/src/server/data/events.json index 837d3b6..ce755dd 100644 --- a/src/server/data/events.json +++ b/src/server/data/events.json @@ -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":1}} \ No newline at end of file +{"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}} \ No newline at end of file diff --git a/src/server/data/locations.json b/src/server/data/locations.json index d2c4d71..57a0d73 100644 --- a/src/server/data/locations.json +++ b/src/server/data/locations.json @@ -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":0}} \ No newline at end of file +{"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}} \ No newline at end of file diff --git a/src/server/data/seatplan.json b/src/server/data/seatplan.json index e6f6a31..855ddc4 100644 --- a/src/server/data/seatplan.json +++ b/src/server/data/seatplan.json @@ -1 +1 @@ -{"test2":{"draft":{"seatInfo":{"data":{"1":{"0":22,"1":22,"2":22,"3":22,"4":22,"5":22,"6":22,"7":22,"8":22,"9":22,"10":22,"11":22,"12":22,"13":22,"14":22,"15":22}},"count":352},"data":{"1":{"x":296.892,"y":13.495,"h":560.66,"w":728.735,"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":357.007,"y":660.033,"h":117.775,"w":601.145,"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":517.721,"y":669.847,"h":80.971,"w":304.253,"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"}}},"save":{"seatInfo":{"data":{"1":{"0":22,"1":22,"2":22,"3":22,"4":22,"5":22,"6":22,"7":22,"8":22,"9":22,"10":22,"11":22,"12":22,"13":22,"14":22,"15":22}},"count":0},"data":{"1":{"x":296.892,"y":13.495,"h":560.66,"w":728.735,"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":357.375,"y":660.049,"h":117.775,"w":601.145,"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":517.828,"y":670.99,"h":80.971,"w":304.253,"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}}}},"testLocationNoSeatplan":{"draft":{},"save":{"seatInfo":{"data":{"1":{"0":9,"1":9,"2":9,"startingRow":1}},"count":0},"data":{"1":{"x":375,"y":169.118,"h":294.118,"w":750,"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 +{"test2":{"draft":{"seatInfo":{"data":{"1":{"0":22,"1":22,"2":22,"3":22,"4":22,"5":22,"6":22,"7":22,"8":22,"9":22,"10":22,"11":22,"12":22,"13":22,"14":22,"15":22}},"count":352},"data":{"1":{"x":296.892,"y":13.495,"h":560.66,"w":728.735,"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":357.007,"y":660.033,"h":117.775,"w":601.145,"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":517.721,"y":669.847,"h":80.971,"w":304.253,"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"}}},"save":{"seatInfo":{"data":{"1":{"0":22,"1":22,"2":22,"3":22,"4":22,"5":22,"6":22,"7":22,"8":22,"9":22,"10":22,"11":22,"12":22,"13":22,"14":22,"15":22}},"count":0},"data":{"1":{"x":296.892,"y":13.495,"h":560.66,"w":728.735,"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":357.375,"y":660.049,"h":117.775,"w":601.145,"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":517.828,"y":670.99,"h":80.971,"w":304.253,"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}}}},"testLocationNoSeatplan":{"draft":{"seatInfo":{"data":{"1":{"0":13,"1":13,"2":13,"3":13,"4":13,"startingRow":1}},"count":50},"data":{"1":{"x":371.961,"y":165.924,"h":289.911,"w":747.569,"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}}},"save":{"seatInfo":{"data":{"1":{"0":13,"1":13,"2":13,"3":13,"4":13,"startingRow":1}},"count":50},"data":{"1":{"x":373.784,"y":167.747,"h":291.734,"w":749.392,"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/src/components/notifications/notifications.vue b/src/webapp/main/src/components/notifications/notifications.vue index 3ad6450..44f615b 100644 --- a/src/webapp/main/src/components/notifications/notifications.vue +++ b/src/webapp/main/src/components/notifications/notifications.vue @@ -75,7 +75,10 @@ */ try { delete this.notifications[ id ]; - delete this.queue[ this.queue.findIndex( id ) ]; + console.log( this.notifications ); + console.log( this.queue.findIndex( id ) ); + console.log( this.queue ); + delete this.queue[ this.queue.findIndex( id ) - 1 ]; } catch ( error ) { console.log( 'notification to be deleted is nonexistent or currently being displayed' ); } diff --git a/src/webapp/main/src/components/seatplan/editor/window.vue b/src/webapp/main/src/components/seatplan/editor/window.vue index 254c901..80d187a 100644 --- a/src/webapp/main/src/components/seatplan/editor/window.vue +++ b/src/webapp/main/src/components/seatplan/editor/window.vue @@ -417,6 +417,11 @@ }, getSeatCount () { this.seatCountInfo[ 'count' ] = document.getElementsByClassName( 'seats' ).length; + for ( let draggable in this.draggables ) { + if ( this.draggables[ draggable ][ 'ticketCount' ] ) { + this.seatCountInfo[ 'count' ] += this.draggables[ draggable ][ 'ticketCount' ]; + } + } }, }, created () {