iticket-seatingplan-dev 1.0.30 → 1.0.32
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 +53 -16
- package/package.json +1 -1
|
@@ -67,21 +67,58 @@ const SeatingPlan = _ref => {
|
|
|
67
67
|
'content-type': 'application/json',
|
|
68
68
|
'basket-key': sessionId
|
|
69
69
|
}
|
|
70
|
-
}).then(response =>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
70
|
+
}).then(response => {
|
|
71
|
+
console.log(response);
|
|
72
|
+
if ((response === null || response === void 0 ? void 0 : response.status) === 403) {
|
|
73
|
+
chosenSeat.circle.target.setStyle({
|
|
74
|
+
fillColor: statusColors.sold
|
|
75
|
+
});
|
|
76
|
+
chosenSeat.seat.s = 2;
|
|
77
|
+
const event = {
|
|
78
|
+
type: 'error',
|
|
79
|
+
details: {
|
|
80
|
+
error: {
|
|
81
|
+
code: 403,
|
|
82
|
+
message: "The seat you're trying to book is no longer available."
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
callbackFunction(event);
|
|
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
|
+
}
|
|
121
|
+
}
|
|
85
122
|
}).catch(error => {
|
|
86
123
|
chosenSeat.circle.target.setStyle({
|
|
87
124
|
fillColor: statusColors.available
|
|
@@ -111,7 +148,7 @@ const SeatingPlan = _ref => {
|
|
|
111
148
|
headers: {
|
|
112
149
|
'basket-key': sessionId
|
|
113
150
|
}
|
|
114
|
-
}).then(response =>
|
|
151
|
+
}).then(response => {
|
|
115
152
|
s.s = 1;
|
|
116
153
|
s.bookedPrice = null;
|
|
117
154
|
e.target.setStyle({
|