@chevre/domain 20.2.0-alpha.4 → 20.2.0-alpha.5
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/lib/chevre/service/offer.js +11 -7
- package/package.json +1 -1
|
@@ -135,31 +135,35 @@ function searchEventSeatOffersWithPaging(params) {
|
|
|
135
135
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
136
136
|
var _a, _b, _c, _d, _e, _f;
|
|
137
137
|
let offers = [];
|
|
138
|
-
const
|
|
138
|
+
const event = yield repos.event.findById({
|
|
139
139
|
id: params.event.id
|
|
140
140
|
});
|
|
141
141
|
// 座席指定利用可能かどうか
|
|
142
|
-
const eventOffers =
|
|
142
|
+
const eventOffers = event.offers;
|
|
143
143
|
const reservedSeatsAvailable = ((_b = (_a = eventOffers === null || eventOffers === void 0 ? void 0 : eventOffers.itemOffered.serviceOutput) === null || _a === void 0 ? void 0 : _a.reservedTicket) === null || _b === void 0 ? void 0 : _b.ticketedSeat) !== undefined;
|
|
144
144
|
if (reservedSeatsAvailable) {
|
|
145
145
|
// 座席タイプ価格仕様を検索
|
|
146
146
|
const priceSpecs = yield repos.priceSpecification.search({
|
|
147
|
-
project: { id: { $eq:
|
|
147
|
+
project: { id: { $eq: event.project.id } },
|
|
148
148
|
typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification,
|
|
149
149
|
appliesToCategoryCode: {
|
|
150
150
|
inCodeSet: { identifier: { $eq: factory.categoryCode.CategorySetIdentifier.SeatingType } }
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
|
-
const
|
|
153
|
+
// const roomBranchCode = event.location.branchCode;
|
|
154
|
+
// const movieTheaterBranchCode = event.superEvent.location.branchCode;
|
|
155
|
+
const roomBranchCode = eventOffers.itemOffered.availableChannel.serviceLocation.branchCode;
|
|
156
|
+
const movieTheaterBranchCode = eventOffers.itemOffered.availableChannel.serviceLocation.containedInPlace.branchCode;
|
|
157
|
+
const seats = yield repos.place.searchSeats(Object.assign(Object.assign({}, params), { project: { id: { $eq: event.project.id } }, containedInPlace: {
|
|
154
158
|
branchCode: {
|
|
155
159
|
$eq: (typeof ((_d = (_c = params.containedInPlace) === null || _c === void 0 ? void 0 : _c.branchCode) === null || _d === void 0 ? void 0 : _d.$eq) === 'string')
|
|
156
160
|
? (_f = (_e = params.containedInPlace) === null || _e === void 0 ? void 0 : _e.branchCode) === null || _f === void 0 ? void 0 : _f.$eq
|
|
157
161
|
: undefined
|
|
158
162
|
},
|
|
159
163
|
containedInPlace: {
|
|
160
|
-
branchCode: { $eq:
|
|
164
|
+
branchCode: { $eq: roomBranchCode },
|
|
161
165
|
containedInPlace: {
|
|
162
|
-
branchCode: { $eq:
|
|
166
|
+
branchCode: { $eq: movieTheaterBranchCode }
|
|
163
167
|
}
|
|
164
168
|
}
|
|
165
169
|
} }));
|
|
@@ -177,7 +181,7 @@ function searchEventSeatOffersWithPaging(params) {
|
|
|
177
181
|
offers = seats.map((seat, index) => {
|
|
178
182
|
var _a;
|
|
179
183
|
return addOffers2Seat({
|
|
180
|
-
project:
|
|
184
|
+
project: event.project,
|
|
181
185
|
seat: seat,
|
|
182
186
|
seatSection: (_a = seat.containedInPlace) === null || _a === void 0 ? void 0 : _a.branchCode,
|
|
183
187
|
unavailableOffers: [],
|
package/package.json
CHANGED