iticket-seatingplan-dev 1.0.31 → 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 +36 -18
- package/package.json +1 -1
|
@@ -68,7 +68,8 @@ const SeatingPlan = _ref => {
|
|
|
68
68
|
'basket-key': sessionId
|
|
69
69
|
}
|
|
70
70
|
}).then(response => {
|
|
71
|
-
|
|
71
|
+
console.log(response);
|
|
72
|
+
if ((response === null || response === void 0 ? void 0 : response.status) === 403) {
|
|
72
73
|
chosenSeat.circle.target.setStyle({
|
|
73
74
|
fillColor: statusColors.sold
|
|
74
75
|
});
|
|
@@ -84,23 +85,40 @@ const SeatingPlan = _ref => {
|
|
|
84
85
|
};
|
|
85
86
|
callbackFunction(event);
|
|
86
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
|
+
}
|
|
87
121
|
}
|
|
88
|
-
return response.json();
|
|
89
|
-
}).then(response => {
|
|
90
|
-
s.s = 4;
|
|
91
|
-
s.bookedPrice = price;
|
|
92
|
-
chosenSeat.circle.target.setStyle({
|
|
93
|
-
fillColor: statusColors.booked
|
|
94
|
-
});
|
|
95
|
-
setProcessing(false);
|
|
96
|
-
setBookedSeats([...bookedSeats, {
|
|
97
|
-
ssId: s.ssId,
|
|
98
|
-
r: s.r,
|
|
99
|
-
c: s.c,
|
|
100
|
-
showingId: showingId,
|
|
101
|
-
p: price || s.defaultPrice,
|
|
102
|
-
paName: s.priceAgeName
|
|
103
|
-
}]);
|
|
104
122
|
}).catch(error => {
|
|
105
123
|
chosenSeat.circle.target.setStyle({
|
|
106
124
|
fillColor: statusColors.available
|
|
@@ -130,7 +148,7 @@ const SeatingPlan = _ref => {
|
|
|
130
148
|
headers: {
|
|
131
149
|
'basket-key': sessionId
|
|
132
150
|
}
|
|
133
|
-
}).then(response =>
|
|
151
|
+
}).then(response => {
|
|
134
152
|
s.s = 1;
|
|
135
153
|
s.bookedPrice = null;
|
|
136
154
|
e.target.setStyle({
|