iticket-seatingplan-dev 1.1.5 → 1.1.6
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.
|
@@ -42,6 +42,7 @@ const SeatingPlan = _ref => {
|
|
|
42
42
|
const [processing, setProcessing] = (0, _react.useState)(false);
|
|
43
43
|
const [bookedSeats, setBookedSeats] = (0, _react.useState)([]);
|
|
44
44
|
const [chosenSeat, setChosenSeat] = (0, _react.useState)(null);
|
|
45
|
+
const [area, setArea] = (0, _react.useState)(null);
|
|
45
46
|
const statusColors = {
|
|
46
47
|
unknown: '#95a5a6',
|
|
47
48
|
available: '#00E640',
|
|
@@ -255,10 +256,11 @@ const SeatingPlan = _ref => {
|
|
|
255
256
|
});
|
|
256
257
|
};
|
|
257
258
|
(0, _react.useEffect)(() => {
|
|
258
|
-
if (!
|
|
259
|
+
if (!error && areaId !== area) {
|
|
260
|
+
setArea(areaId);
|
|
259
261
|
initialFetch();
|
|
260
262
|
}
|
|
261
|
-
}, [
|
|
263
|
+
}, [areaId]);
|
|
262
264
|
(0, _react.useEffect)(() => {
|
|
263
265
|
if (bookedSeats && position && chosenSeat) {
|
|
264
266
|
const event = {
|
|
@@ -296,6 +298,69 @@ const SeatingPlan = _ref => {
|
|
|
296
298
|
height: '100%'
|
|
297
299
|
}
|
|
298
300
|
}, /*#__PURE__*/_react.default.createElement(_reactLeafletCustomControl.default, {
|
|
301
|
+
position: "bottomright"
|
|
302
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
303
|
+
className: "legendBox"
|
|
304
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
305
|
+
className: "legendHeader"
|
|
306
|
+
}, "LEGEND:"), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
307
|
+
style: {
|
|
308
|
+
display: 'inline-flex'
|
|
309
|
+
}
|
|
310
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
311
|
+
style: {
|
|
312
|
+
width: '1rem',
|
|
313
|
+
height: '1rem',
|
|
314
|
+
borderRadius: '100%',
|
|
315
|
+
background: '#00E640'
|
|
316
|
+
}
|
|
317
|
+
}), /*#__PURE__*/_react.default.createElement("p", {
|
|
318
|
+
style: {
|
|
319
|
+
margin: '0 0.5rem'
|
|
320
|
+
}
|
|
321
|
+
}, "available"))), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
322
|
+
style: {
|
|
323
|
+
display: 'inline-flex'
|
|
324
|
+
}
|
|
325
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
326
|
+
style: {
|
|
327
|
+
width: '1rem',
|
|
328
|
+
height: '1rem',
|
|
329
|
+
borderRadius: '100%',
|
|
330
|
+
background: '#95a5a6'
|
|
331
|
+
}
|
|
332
|
+
}), /*#__PURE__*/_react.default.createElement("p", {
|
|
333
|
+
style: {
|
|
334
|
+
margin: '0 0.5rem'
|
|
335
|
+
}
|
|
336
|
+
}, "sold"))), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
337
|
+
style: {
|
|
338
|
+
display: 'inline-flex'
|
|
339
|
+
}
|
|
340
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
341
|
+
style: {
|
|
342
|
+
width: '1rem',
|
|
343
|
+
height: '1rem',
|
|
344
|
+
borderRadius: '100%',
|
|
345
|
+
background: '#e74c3c'
|
|
346
|
+
}
|
|
347
|
+
}), /*#__PURE__*/_react.default.createElement("p", {
|
|
348
|
+
style: {
|
|
349
|
+
margin: '0 0.5rem'
|
|
350
|
+
}
|
|
351
|
+
}, "in cart"))), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
352
|
+
style: {
|
|
353
|
+
display: 'inline-flex'
|
|
354
|
+
}
|
|
355
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
356
|
+
src: wheelchairSeat,
|
|
357
|
+
width: 15,
|
|
358
|
+
height: 15
|
|
359
|
+
}), /*#__PURE__*/_react.default.createElement("p", {
|
|
360
|
+
style: {
|
|
361
|
+
margin: '0 0.5rem'
|
|
362
|
+
}
|
|
363
|
+
}, "wheelchair"))))), /*#__PURE__*/_react.default.createElement(_reactLeafletCustomControl.default, {
|
|
299
364
|
position: "topleft"
|
|
300
365
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
301
366
|
style: {
|
|
@@ -7,6 +7,20 @@
|
|
|
7
7
|
-moz-osx-font-smoothing: grayscale;
|
|
8
8
|
} */
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
.legendBox {
|
|
13
|
+
background: rgba(0, 0, 0, 0.03);
|
|
14
|
+
padding: 0.5rem 1rem;
|
|
15
|
+
border-radius: 3px;
|
|
16
|
+
text-align: left;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.legendHeader {
|
|
20
|
+
font-weight: bold;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
10
24
|
.rotate {
|
|
11
25
|
animation: rotation 2s infinite linear;
|
|
12
26
|
}
|