iticket-seatingplan-dev 1.0.18 → 1.0.19
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.
|
@@ -29,6 +29,7 @@ const SeatingPlan = _ref => {
|
|
|
29
29
|
baseUrl,
|
|
30
30
|
countryCode
|
|
31
31
|
} = _ref;
|
|
32
|
+
const [map, setMap] = (0, _react.useState)();
|
|
32
33
|
const [position, setPosition] = (0, _react.useState)(null);
|
|
33
34
|
const [height, setHeight] = (0, _react.useState)(0);
|
|
34
35
|
const [width, setWidth] = (0, _react.useState)(0);
|
|
@@ -37,6 +38,7 @@ const SeatingPlan = _ref => {
|
|
|
37
38
|
const [processing, setProcessing] = (0, _react.useState)(false);
|
|
38
39
|
const [bookedSeats, setBookedSeats] = (0, _react.useState)([]);
|
|
39
40
|
const [chosenSeat, setChosenSeat] = (0, _react.useState)(null);
|
|
41
|
+
console.log(map);
|
|
40
42
|
const statusColors = {
|
|
41
43
|
unknown: '#95a5a6',
|
|
42
44
|
available: '#2ecc71',
|
|
@@ -54,6 +56,7 @@ const SeatingPlan = _ref => {
|
|
|
54
56
|
};
|
|
55
57
|
};
|
|
56
58
|
const addTicketToCart = (s, priceAgeId) => {
|
|
59
|
+
map.target.closePopup();
|
|
57
60
|
setProcessing(true);
|
|
58
61
|
fetch("".concat(baseUrl, "/legacy/").concat(countryCode, "/shop/events/").concat(eventId, "/").concat(eventVenueId, "/showings/").concat(showingId, "/tickets/allocated/").concat(areaId), {
|
|
59
62
|
method: 'POST',
|
|
@@ -220,6 +223,7 @@ const SeatingPlan = _ref => {
|
|
|
220
223
|
}, error ? /*#__PURE__*/_react.default.createElement("div", {
|
|
221
224
|
className: "loading"
|
|
222
225
|
}, /*#__PURE__*/_react.default.createElement("h1", null, "OOPS!"), /*#__PURE__*/_react.default.createElement("div", null, error.response.data.message)) : position ? /*#__PURE__*/_react.default.createElement(_reactLeaflet.MapContainer, {
|
|
226
|
+
whenReady: setMap,
|
|
223
227
|
center: position,
|
|
224
228
|
zoom: 5,
|
|
225
229
|
scrollWheelZoom: true,
|