@chevre/domain 22.5.0-alpha.30 → 22.5.0-alpha.31
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.
|
@@ -39,6 +39,12 @@ export declare function searchEventSeatOffersWithPaging(params: {
|
|
|
39
39
|
id: string;
|
|
40
40
|
};
|
|
41
41
|
$projection?: factory.place.seat.IProjection;
|
|
42
|
+
options: {
|
|
43
|
+
/**
|
|
44
|
+
* add option(2024-10-23~)
|
|
45
|
+
*/
|
|
46
|
+
excludePriceSpecification: boolean;
|
|
47
|
+
};
|
|
42
48
|
}): (repos: {
|
|
43
49
|
event: EventRepo;
|
|
44
50
|
priceSpecification: PriceSpecificationRepo;
|
|
@@ -10,7 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.searchEventSeatOffersWithPaging = exports.addOffers2Seat = exports.product = exports.moneyTransfer = exports.eventServiceByCOA = exports.event = void 0;
|
|
13
|
-
const createDebug = require("debug");
|
|
14
13
|
const moment = require("moment");
|
|
15
14
|
const factory = require("../factory");
|
|
16
15
|
const EventOfferService = require("./offer/event");
|
|
@@ -21,7 +20,6 @@ const MoneyTransferOfferService = require("./offer/moneyTransfer");
|
|
|
21
20
|
exports.moneyTransfer = MoneyTransferOfferService;
|
|
22
21
|
const ProductOfferService = require("./offer/product");
|
|
23
22
|
exports.product = ProductOfferService;
|
|
24
|
-
const debug = createDebug('chevre-domain:service:offer');
|
|
25
23
|
/**
|
|
26
24
|
* 座席にオファー情報を付加する
|
|
27
25
|
*/
|
|
@@ -38,7 +36,6 @@ function addOffers2Seat(params) {
|
|
|
38
36
|
.map(({ appliesToCategoryCode, name, price, priceCurrency, typeOf, valueAddedTaxIncluded }) => {
|
|
39
37
|
return {
|
|
40
38
|
// optimize appliesToCategoryCode(2024-08-02~)
|
|
41
|
-
// appliesToCategoryCode,
|
|
42
39
|
appliesToCategoryCode: appliesToCategoryCode.map(({ codeValue, inCodeSet }) => ({ codeValue, inCodeSet, typeOf: 'CategoryCode' })),
|
|
43
40
|
name, price, priceCurrency, typeOf, valueAddedTaxIncluded
|
|
44
41
|
};
|
|
@@ -63,6 +60,7 @@ function searchEventSeatOffersWithPaging(params) {
|
|
|
63
60
|
// tslint:disable-next-line:max-func-body-length
|
|
64
61
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
65
62
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
63
|
+
const { excludePriceSpecification } = params.options;
|
|
66
64
|
let offers = [];
|
|
67
65
|
// optimize(2024-07-18~)
|
|
68
66
|
const event = yield repos.event.projectEventFieldsById({ id: params.event.id }, ['project', 'startDate', 'offers.itemOffered']);
|
|
@@ -110,24 +108,23 @@ function searchEventSeatOffersWithPaging(params) {
|
|
|
110
108
|
}
|
|
111
109
|
}
|
|
112
110
|
});
|
|
113
|
-
debug('searchEventSeatOffersWithPaging: uniqueSeatingTypes:', uniqueSeatingTypes, event.project.id, roomBranchCode, movieTheaterBranchCode);
|
|
114
111
|
// 座席タイプ価格仕様を検索
|
|
115
112
|
let priceSpecs = [];
|
|
116
|
-
if (
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
113
|
+
if (!excludePriceSpecification) {
|
|
114
|
+
if (Array.isArray(uniqueSeatingTypes) && uniqueSeatingTypes.length > 0) {
|
|
115
|
+
priceSpecs = yield repos.priceSpecification.search({
|
|
116
|
+
project: { id: { $eq: event.project.id } },
|
|
117
|
+
typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification,
|
|
118
|
+
appliesToCategoryCode: {
|
|
119
|
+
inCodeSet: { identifier: { $eq: factory.categoryCode.CategorySetIdentifier.SeatingType } },
|
|
120
|
+
codeValue: { $in: uniqueSeatingTypes } // ルームに含まれる座席区分のみ加算料金を検索(2024-08-05~)
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
125
124
|
}
|
|
126
125
|
offers = seats.map((seat, index) => {
|
|
127
126
|
return addOffers2Seat({
|
|
128
127
|
seat,
|
|
129
|
-
// unavailableOffers: [],
|
|
130
|
-
// availability: availabilities[index].availability,
|
|
131
128
|
availability: (typeof availabilities[index] === 'string')
|
|
132
129
|
? factory.itemAvailability.OutOfStock // ホルダーが存在すればOutOfStock
|
|
133
130
|
: factory.itemAvailability.InStock,
|
package/package.json
CHANGED