iticket-seatingplan-dev 1.0.31 → 1.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,7 +68,8 @@ const SeatingPlan = _ref => {
68
68
  'basket-key': sessionId
69
69
  }
70
70
  }).then(response => {
71
- if ((response === null || response === void 0 ? void 0 : response.status) === 429 || (response === null || response === void 0 ? void 0 : response.status) === 403) {
71
+ console.log(response);
72
+ if ((response === null || response === void 0 ? void 0 : response.status) === 403) {
72
73
  chosenSeat.circle.target.setStyle({
73
74
  fillColor: statusColors.sold
74
75
  });
@@ -84,23 +85,40 @@ const SeatingPlan = _ref => {
84
85
  };
85
86
  callbackFunction(event);
86
87
  setProcessing(false);
88
+ } else if ((response === null || response === void 0 ? void 0 : response.status) === 429) {
89
+ chosenSeat.circle.target.setStyle({
90
+ fillColor: statusColors.available
91
+ });
92
+ const event = {
93
+ type: 'error',
94
+ details: {
95
+ error: {
96
+ code: 429,
97
+ message: "Someone else selected this first. Please try again"
98
+ }
99
+ }
100
+ };
101
+ callbackFunction(event);
102
+ setProcessing(false);
103
+ } else {
104
+ {
105
+ console.log('rrrrrrrrr', response);
106
+ s.s = 4;
107
+ s.bookedPrice = price;
108
+ chosenSeat.circle.target.setStyle({
109
+ fillColor: statusColors.booked
110
+ });
111
+ setProcessing(false);
112
+ setBookedSeats([...bookedSeats, {
113
+ ssId: s.ssId,
114
+ r: s.r,
115
+ c: s.c,
116
+ showingId: showingId,
117
+ p: price || s.defaultPrice,
118
+ paName: s.priceAgeName
119
+ }]);
120
+ }
87
121
  }
88
- return response.json();
89
- }).then(response => {
90
- s.s = 4;
91
- s.bookedPrice = price;
92
- chosenSeat.circle.target.setStyle({
93
- fillColor: statusColors.booked
94
- });
95
- setProcessing(false);
96
- setBookedSeats([...bookedSeats, {
97
- ssId: s.ssId,
98
- r: s.r,
99
- c: s.c,
100
- showingId: showingId,
101
- p: price || s.defaultPrice,
102
- paName: s.priceAgeName
103
- }]);
104
122
  }).catch(error => {
105
123
  chosenSeat.circle.target.setStyle({
106
124
  fillColor: statusColors.available
@@ -130,7 +148,7 @@ const SeatingPlan = _ref => {
130
148
  headers: {
131
149
  'basket-key': sessionId
132
150
  }
133
- }).then(response => response.json()).then(response => {
151
+ }).then(response => {
134
152
  s.s = 1;
135
153
  s.bookedPrice = null;
136
154
  e.target.setStyle({
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "iticket-seatingplan-dev",
3
3
  "description": "Seating plan with FLEXi pricing",
4
4
  "author": "gedwyne",
5
- "version": "1.0.31",
5
+ "version": "1.0.33",
6
6
  "private": false,
7
7
  "keywords": [
8
8
  "iticket",
@@ -17,7 +17,8 @@
17
17
  "dependencies": {
18
18
  "@babel/polyfill": "^7.12.1",
19
19
  "leaflet": "^1.9.3",
20
- "react-leaflet": "^4.2.1"
20
+ "react-leaflet": "^4.2.1",
21
+ "react-leaflet-custom-control": "^1.3.5"
21
22
  },
22
23
  "codependencies": {
23
24
  "@babel/polyfill": "^7.12.1",