iticket-seatingplan-dev 1.0.29 → 1.0.31
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.
- package/dist/components/SeatingPlan.js +36 -15
- package/package.json +1 -1
|
@@ -67,7 +67,26 @@ const SeatingPlan = _ref => {
|
|
|
67
67
|
'content-type': 'application/json',
|
|
68
68
|
'basket-key': sessionId
|
|
69
69
|
}
|
|
70
|
-
}).then(response =>
|
|
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) {
|
|
72
|
+
chosenSeat.circle.target.setStyle({
|
|
73
|
+
fillColor: statusColors.sold
|
|
74
|
+
});
|
|
75
|
+
chosenSeat.seat.s = 2;
|
|
76
|
+
const event = {
|
|
77
|
+
type: 'error',
|
|
78
|
+
details: {
|
|
79
|
+
error: {
|
|
80
|
+
code: 403,
|
|
81
|
+
message: "The seat you're trying to book is no longer available."
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
callbackFunction(event);
|
|
86
|
+
setProcessing(false);
|
|
87
|
+
}
|
|
88
|
+
return response.json();
|
|
89
|
+
}).then(response => {
|
|
71
90
|
s.s = 4;
|
|
72
91
|
s.bookedPrice = price;
|
|
73
92
|
chosenSeat.circle.target.setStyle({
|
|
@@ -172,6 +191,7 @@ const SeatingPlan = _ref => {
|
|
|
172
191
|
}).then(response => response.json() || null).then(data => {
|
|
173
192
|
const img = new Image();
|
|
174
193
|
img.src = data.background;
|
|
194
|
+
console.log(data.background);
|
|
175
195
|
setBookedSeats(data.seats.filter(s => s.s === 4 && s.bookedPrice === price).map(s => ({
|
|
176
196
|
showingSeatId: s.ssId,
|
|
177
197
|
rowName: s.r,
|
|
@@ -181,9 +201,9 @@ const SeatingPlan = _ref => {
|
|
|
181
201
|
priceAgeName: s.priceAgeName
|
|
182
202
|
})));
|
|
183
203
|
img.onload = () => {
|
|
184
|
-
setHeight(img.height);
|
|
185
|
-
setWidth(img.width);
|
|
186
|
-
setPosition([img.height * 0.
|
|
204
|
+
setHeight(img.height * 0.5);
|
|
205
|
+
setWidth(img.width * 0.5);
|
|
206
|
+
setPosition([img.height * 0.005, img.width * 0.005]);
|
|
187
207
|
setSeats(data);
|
|
188
208
|
};
|
|
189
209
|
}).catch(error => {
|
|
@@ -225,7 +245,7 @@ const SeatingPlan = _ref => {
|
|
|
225
245
|
className: "loading"
|
|
226
246
|
}, /*#__PURE__*/_react.default.createElement("h1", null, "OOPS!"), /*#__PURE__*/_react.default.createElement("div", null, error.response.data.message)) : position ? /*#__PURE__*/_react.default.createElement(_reactLeaflet.MapContainer, {
|
|
227
247
|
whenReady: setMap,
|
|
228
|
-
center:
|
|
248
|
+
center: [height * 0.015, width * 0.015],
|
|
229
249
|
zoom: 5,
|
|
230
250
|
scrollWheelZoom: true,
|
|
231
251
|
style: {
|
|
@@ -240,7 +260,7 @@ const SeatingPlan = _ref => {
|
|
|
240
260
|
key: i
|
|
241
261
|
}, /*#__PURE__*/_react.default.createElement(_reactLeaflet.ImageOverlay, {
|
|
242
262
|
url: "https://iticketseatingplan.blob.core.windows.net/embed/static/media/rippleload.08e6a08dd832819226ef.gif",
|
|
243
|
-
bounds: [[height * 0.
|
|
263
|
+
bounds: [[height * 0.05 - s.y / 3.35 - height / 50 - 0.11, s.x * 0.3 + 0.15 - 0.11], [height * 0.05 - s.y / 3.35 - height / 50 + 0.11, s.x * 0.3 + 0.15 + 0.11]
|
|
244
264
|
// [height * 0.0302 - s.y * 0.602 - 0.3, s.x * 0.61 - 0.3],
|
|
245
265
|
// [height * 0.0302 - s.y * 0.602 + 0.3, s.x * 0.61 + 0.3],
|
|
246
266
|
// [height * 0.0302 - s.y * 0.602 - 0.17, s.x * 0.61 - 0.17],
|
|
@@ -260,22 +280,23 @@ const SeatingPlan = _ref => {
|
|
|
260
280
|
// height * 0.0302 - s.y * 0.602 + 0.17,
|
|
261
281
|
// s.x * 0.61 + 0.17,
|
|
262
282
|
// ],
|
|
263
|
-
[height * 0.
|
|
283
|
+
[height * 0.05 - s.y / 3.35 - height / 50 - 0.11, s.x * 0.3 + 0.15 - 0.11], [height * 0.05 - s.y / 3.35 - height / 50 + 0.11, s.x * 0.3 + 0.15 + 0.11]],
|
|
264
284
|
zIndex: 10
|
|
265
285
|
}) : /*#__PURE__*/_react.default.createElement(_reactLeaflet.Circle, {
|
|
266
286
|
center: [
|
|
267
|
-
//
|
|
268
|
-
//
|
|
269
|
-
height *
|
|
270
|
-
// s.y,
|
|
287
|
+
// height * 0.0305 -
|
|
288
|
+
// s.y * 0.57 -
|
|
289
|
+
// height * (height > 700 ? 0.0001 : 0.0006),
|
|
271
290
|
// s.x * 0.6 + 0.25,
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
291
|
+
|
|
292
|
+
height * 0.05 - s.y / 3.35 - height / 50, s.x * 0.3 + 0.15
|
|
293
|
+
|
|
294
|
+
// -s.y * (height * 0.00037) + 24.2,
|
|
295
|
+
// s.x * 0.3 + 0.15,
|
|
275
296
|
],
|
|
276
297
|
|
|
277
298
|
pathOptions: setInitialColor(s),
|
|
278
|
-
radius:
|
|
299
|
+
radius: 12000,
|
|
279
300
|
eventHandlers: {
|
|
280
301
|
click: e => handleClick(e, s)
|
|
281
302
|
}
|