iticket-seatingplan-dev 1.4.6 → 1.4.7
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/Map.js
CHANGED
|
@@ -113,7 +113,7 @@ function Map(_ref) {
|
|
|
113
113
|
onClick: () => map.fitBounds(bounds),
|
|
114
114
|
className: "leaflet-control-zoom-in"
|
|
115
115
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
116
|
-
src: "
|
|
116
|
+
src: "/images/fit-icon.jpg",
|
|
117
117
|
style: {
|
|
118
118
|
height: "17px"
|
|
119
119
|
}
|
|
@@ -130,7 +130,7 @@ function Map(_ref) {
|
|
|
130
130
|
}
|
|
131
131
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
132
132
|
className: isReloading ? "rotate" : "",
|
|
133
|
-
src: "
|
|
133
|
+
src: "/images/refresh.png",
|
|
134
134
|
style: {
|
|
135
135
|
height: "17px"
|
|
136
136
|
}
|
|
@@ -169,7 +169,7 @@ function Map(_ref) {
|
|
|
169
169
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
170
170
|
key: i
|
|
171
171
|
}, /*#__PURE__*/_react.default.createElement(_reactLeaflet.ImageOverlay, {
|
|
172
|
-
url: "
|
|
172
|
+
url: "/images/rippleload.gif",
|
|
173
173
|
bounds: [[(s.r.includes("NORTH") ? height / 33.33 - height / 33.33 * s.y * 0.0105 + 1.4 : height * 0.05 - s.y / (height > 800 ? height > 999 ? 3.45 : 3.3 : 3.35) - (height > 800 ? height > 999 ? height * 0.0201 : height * 0.0198 : height > 587 ? height * 0.0201 : height > 399 ? height * 0.02035 : height * 0.0207)) - 0.11, s.x * 0.3 + 0.15 - 0.11], [(s.r.includes("NORTH") ? height / 33.33 - height / 33.33 * s.y * 0.0105 + 1.4 : height * 0.05 - s.y / (height > 800 ? height > 999 ? 3.45 : 3.3 : 3.35) - (height > 800 ? height > 999 ? height * 0.0201 : height * 0.0198 : height > 587 ? height * 0.0201 : height > 399 ? height * 0.02035 : height * 0.0207)) + 0.11, s.x * 0.3 + 0.15 + 0.11]
|
|
174
174
|
// [height * 0.0302 - s.y * 0.602 - 0.3, s.x * 0.61 - 0.3],
|
|
175
175
|
// [height * 0.0302 - s.y * 0.602 + 0.3, s.x * 0.61 + 0.3],
|
|
@@ -262,15 +262,18 @@ function Map(_ref) {
|
|
|
262
262
|
alt: "close"
|
|
263
263
|
}))), /*#__PURE__*/_react.default.createElement("p", {
|
|
264
264
|
className: "heading"
|
|
265
|
-
}, "Select option:"), seats.pricing.filter(price => (!priceSectionIds || priceSectionIds.includes(price.psId)) && price.psId === s.psId).map(price => /*#__PURE__*/_react.default.createElement("
|
|
265
|
+
}, "Select option:"), seats.pricing.filter(price => (!priceSectionIds || priceSectionIds.includes(price.psId)) && price.psId === s.psId).map(price => /*#__PURE__*/_react.default.createElement("button", {
|
|
266
266
|
key: price.paId,
|
|
267
267
|
className: "priceage",
|
|
268
268
|
onClick: () => {
|
|
269
269
|
s.loading = true;
|
|
270
270
|
addTicketToCart(s, price);
|
|
271
|
-
}
|
|
271
|
+
},
|
|
272
|
+
disabled: price.is_available === false
|
|
272
273
|
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
273
274
|
className: "price"
|
|
274
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, price.paName), /*#__PURE__*/_react.default.createElement("span", null, _utils.NZDollar.format(price.p)))
|
|
275
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, price.paName), /*#__PURE__*/_react.default.createElement("span", null, _utils.NZDollar.format(price.p))), price.is_available === false && /*#__PURE__*/_react.default.createElement("span", {
|
|
276
|
+
className: "unavailable"
|
|
277
|
+
}, "Allocation exhausted"))))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null));
|
|
275
278
|
}));
|
|
276
279
|
}
|
|
@@ -54,6 +54,30 @@ const SeatingPlan = _ref => {
|
|
|
54
54
|
(0, _react.useLayoutEffect)(() => setMounted(true), []);
|
|
55
55
|
const addTicketToCart = (s, priceage, cs) => {
|
|
56
56
|
var _mapRef$current, _mapRef$current$targe;
|
|
57
|
+
if (s.s !== _utils.statuses.UNSOLD && s.s !== _utils.statuses.USER_PENDING || bookedSeats.length >= quantity && s.s === _utils.statuses.UNSOLD) {
|
|
58
|
+
if (bookedSeats.length >= quantity) {
|
|
59
|
+
const event = {
|
|
60
|
+
type: "error",
|
|
61
|
+
details: {
|
|
62
|
+
message: "Maximum ticket booking quantity specified reached."
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
callbackFunction(event);
|
|
66
|
+
}
|
|
67
|
+
s.loading = false;
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (priceage.is_available === false) {
|
|
71
|
+
const event = {
|
|
72
|
+
type: "error",
|
|
73
|
+
details: {
|
|
74
|
+
message: "Allocation exhausted, please try another area or price."
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
callbackFunction(event);
|
|
78
|
+
s.loading = false;
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
57
81
|
(_mapRef$current = mapRef.current) === null || _mapRef$current === void 0 ? void 0 : (_mapRef$current$targe = _mapRef$current.target) === null || _mapRef$current$targe === void 0 ? void 0 : _mapRef$current$targe.closePopup();
|
|
58
82
|
setProcessing(true);
|
|
59
83
|
fetch("".concat(baseUrl, "/legacy/").concat(countryCode, "/shop/events/").concat(eventId, "/").concat(eventVenueId, "/showings/").concat(showingId, "/tickets/allocated/").concat(areaId), {
|
|
@@ -212,6 +236,10 @@ const SeatingPlan = _ref => {
|
|
|
212
236
|
});
|
|
213
237
|
};
|
|
214
238
|
const handleClickSeat = (e, s) => {
|
|
239
|
+
setChosenSeat({
|
|
240
|
+
circle: e,
|
|
241
|
+
seat: s
|
|
242
|
+
});
|
|
215
243
|
if (s.s !== _utils.statuses.UNSOLD && s.s !== _utils.statuses.USER_PENDING || bookedSeats.length >= quantity && s.s === _utils.statuses.UNSOLD) {
|
|
216
244
|
if (bookedSeats.length >= quantity) {
|
|
217
245
|
const event = {
|
|
@@ -224,10 +252,6 @@ const SeatingPlan = _ref => {
|
|
|
224
252
|
}
|
|
225
253
|
return;
|
|
226
254
|
}
|
|
227
|
-
setChosenSeat({
|
|
228
|
-
circle: e,
|
|
229
|
-
seat: s
|
|
230
|
-
});
|
|
231
255
|
if (s.s === _utils.statuses.UNSOLD) {
|
|
232
256
|
const availablePrices = seats.pricing.filter(price => (!priceSectionIds || priceSectionIds.includes(price.psId)) && s.psId === price.psId);
|
|
233
257
|
if (availablePrices.length === 1) {
|
|
@@ -248,8 +272,7 @@ const SeatingPlan = _ref => {
|
|
|
248
272
|
setIsReloading(true);
|
|
249
273
|
}
|
|
250
274
|
setInitialiseMessage("Initialising seating plan...");
|
|
251
|
-
fetch( // `http://localhost:3155/api/legacy/shop/events/
|
|
252
|
-
// `${baseUrl}/legacy/shop/events/${eventId}/${eventVenueId}/showings/${showingId}/tickets/allocated/${areaId}`,
|
|
275
|
+
fetch( // `http://localhost:3155/api/legacy/shop/events/${eventId}/${eventVenueId}/showings/${showingId}/tickets/allocated/${areaId}`,
|
|
253
276
|
"".concat(baseUrl, "/legacy/").concat(countryCode, "/shop/events/").concat(eventId, "/").concat(eventVenueId, "/showings/").concat(showingId, "/tickets/allocated/").concat(areaId).concat(promoCode ? "?promo=".concat(promoCode) : ""), {
|
|
254
277
|
headers: {
|
|
255
278
|
"basket-key": sessionId,
|
|
@@ -142,7 +142,9 @@
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
.priceage {
|
|
145
|
-
|
|
145
|
+
display: block;
|
|
146
|
+
background: transparent;
|
|
147
|
+
min-width: 12rem;
|
|
146
148
|
border-radius: 0.25rem;
|
|
147
149
|
padding: 0.5rem;
|
|
148
150
|
border: 1px solid #bdc3c7;
|
|
@@ -150,7 +152,11 @@
|
|
|
150
152
|
cursor: pointer;
|
|
151
153
|
}
|
|
152
154
|
|
|
153
|
-
.priceage:
|
|
155
|
+
.priceage:disabled {
|
|
156
|
+
cursor: default;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.priceage:hover:not(:disabled) {
|
|
154
160
|
background: #ecf0f1;
|
|
155
161
|
border: 1px solid #ecf0f1 !important;
|
|
156
162
|
transition: 0.5s;
|
|
@@ -168,6 +174,13 @@
|
|
|
168
174
|
display: inline-block;
|
|
169
175
|
}
|
|
170
176
|
|
|
177
|
+
.priceage .unavailable {
|
|
178
|
+
display: flex;
|
|
179
|
+
text-align: left;
|
|
180
|
+
font-size: 12px;
|
|
181
|
+
margin-top: 2.5px;
|
|
182
|
+
}
|
|
183
|
+
|
|
171
184
|
code {
|
|
172
185
|
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
|
|
173
186
|
monospace;
|
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.4.
|
|
5
|
+
"version": "1.4.7",
|
|
6
6
|
"private": false,
|
|
7
7
|
"keywords": [
|
|
8
8
|
"iticket",
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
"@babel/preset-env": "^7.22.5",
|
|
52
52
|
"@babel/preset-react": "^7.22.5"
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|