@chevre/domain 23.2.0-alpha.33 → 23.2.0-alpha.35
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.
|
@@ -420,22 +420,24 @@ function createInformCategoryCodeTasks(params, setting) {
|
|
|
420
420
|
}
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
|
-
// tslint:disable-next-line:max-func-body-length
|
|
424
423
|
function createInformMovieTheaterTasks(params, setting) {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
) => __awaiter(this, void 0, void 0, function* () {
|
|
424
|
+
// tslint:disable-next-line:max-func-body-length
|
|
425
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
428
426
|
var _a;
|
|
429
|
-
|
|
430
|
-
|
|
427
|
+
// 複数対応(2026-01-18~)
|
|
428
|
+
// if (params.ids.length !== 1) {
|
|
429
|
+
// throw new factory.errors.Argument('id', 'id.length must be 1');
|
|
430
|
+
// }
|
|
431
|
+
if (params.ids.length === 0) {
|
|
432
|
+
return;
|
|
431
433
|
}
|
|
432
|
-
// const informResources = settings.onResourceUpdated.informResource;
|
|
433
434
|
const informResources = (_a = setting === null || setting === void 0 ? void 0 : setting.onResourceUpdated) === null || _a === void 0 ? void 0 : _a.informResource;
|
|
434
435
|
const movieTheaters = yield repos.movieTheater.projectFields({
|
|
435
|
-
limit: 1,
|
|
436
|
-
page: 1,
|
|
436
|
+
// limit: 1,
|
|
437
|
+
// page: 1,
|
|
437
438
|
project: { id: { $eq: params.project.id } },
|
|
438
|
-
id: { $eq: params.ids[0] }
|
|
439
|
+
// id: { $eq: params.ids[0] }
|
|
440
|
+
id: { $in: params.ids }
|
|
439
441
|
}, [
|
|
440
442
|
'additionalProperty',
|
|
441
443
|
'branchCode',
|
|
@@ -450,10 +452,10 @@ function createInformMovieTheaterTasks(params, setting) {
|
|
|
450
452
|
]
|
|
451
453
|
// []
|
|
452
454
|
);
|
|
453
|
-
const movieTheater = movieTheaters.shift();
|
|
454
|
-
if (movieTheater === undefined) {
|
|
455
|
-
|
|
456
|
-
}
|
|
455
|
+
// const movieTheater = movieTheaters.shift();
|
|
456
|
+
// if (movieTheater === undefined) {
|
|
457
|
+
// throw new factory.errors.NotFound(factory.placeType.MovieTheater);
|
|
458
|
+
// }
|
|
457
459
|
// // ルームを検索
|
|
458
460
|
// const screeningRooms = await repos.screeningRoom.findRooms(
|
|
459
461
|
// {
|
|
@@ -461,8 +463,9 @@ function createInformMovieTheaterTasks(params, setting) {
|
|
|
461
463
|
// }
|
|
462
464
|
// );
|
|
463
465
|
// 入場ゲートを廃止(2026-01-17~)
|
|
464
|
-
const
|
|
465
|
-
|
|
466
|
+
const movieTheaters4inform = movieTheaters.map((movieTheater) => {
|
|
467
|
+
const { hasEntranceGate } = movieTheater, movieTheaterWithoutEntranceGates = __rest(movieTheater, ["hasEntranceGate"]);
|
|
468
|
+
return Object.assign({}, movieTheaterWithoutEntranceGates
|
|
466
469
|
// ...movieTheater
|
|
467
470
|
// migrate to IRoomAsNotification(2026-01-16~)
|
|
468
471
|
// containsPlace: screeningRooms.map((room) => {
|
|
@@ -474,7 +477,8 @@ function createInformMovieTheaterTasks(params, setting) {
|
|
|
474
477
|
// address: room.address
|
|
475
478
|
// };
|
|
476
479
|
// })
|
|
477
|
-
)
|
|
480
|
+
);
|
|
481
|
+
});
|
|
478
482
|
if (movieTheaters4inform.length > 0) {
|
|
479
483
|
const taskRunsAt = new Date();
|
|
480
484
|
const informTasks = [];
|
|
@@ -483,8 +487,8 @@ function createInformMovieTheaterTasks(params, setting) {
|
|
|
483
487
|
const informUrl = String((_a = informResource.recipient) === null || _a === void 0 ? void 0 : _a.url);
|
|
484
488
|
movieTheaters4inform.forEach((movieTheater4inform) => {
|
|
485
489
|
var _a;
|
|
486
|
-
// _idは不要であり、存在すると予期せぬ影響を及ぼす可能性がある
|
|
487
|
-
delete movieTheater4inform._id;
|
|
490
|
+
// // _idは不要であり、存在すると予期せぬ影響を及ぼす可能性がある
|
|
491
|
+
// delete (<any>movieTheater4inform)._id;
|
|
488
492
|
const informActionAttributes = {
|
|
489
493
|
object: movieTheater4inform,
|
|
490
494
|
recipient: {
|
|
@@ -721,22 +725,27 @@ function createInformAccountTitleTasks(params, setting) {
|
|
|
721
725
|
}
|
|
722
726
|
function syncMovieTheater(params) {
|
|
723
727
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
724
|
-
if (params.ids.length !== 1) {
|
|
725
|
-
|
|
728
|
+
// if (params.ids.length !== 1) {
|
|
729
|
+
// throw new factory.errors.Argument('id', 'id.length must be 1');
|
|
730
|
+
// }
|
|
731
|
+
if (params.ids.length === 0) {
|
|
732
|
+
return;
|
|
726
733
|
}
|
|
727
734
|
const movieTheaters = yield repos.movieTheater.projectFields({
|
|
728
|
-
id: { $
|
|
735
|
+
id: { $in: params.ids },
|
|
729
736
|
project: { id: { $eq: params.project.id } }
|
|
730
737
|
}, ['id', 'name']
|
|
731
738
|
// []
|
|
732
739
|
);
|
|
733
|
-
const movieTheater = movieTheaters.shift();
|
|
734
|
-
if (movieTheater === undefined) {
|
|
735
|
-
|
|
740
|
+
// const movieTheater = movieTheaters.shift();
|
|
741
|
+
// if (movieTheater === undefined) {
|
|
742
|
+
// throw new factory.errors.NotFound(factory.placeType.MovieTheater);
|
|
743
|
+
// }
|
|
744
|
+
for (const movieTheater of movieTheaters) {
|
|
745
|
+
yield repos.screeningRoom.updateScreeningRoomsByContainedInPlaceId({
|
|
746
|
+
project: { id: params.project.id },
|
|
747
|
+
containedInPlace: movieTheater
|
|
748
|
+
});
|
|
736
749
|
}
|
|
737
|
-
yield repos.screeningRoom.updateScreeningRoomsByContainedInPlaceId({
|
|
738
|
-
project: { id: params.project.id },
|
|
739
|
-
containedInPlace: movieTheater
|
|
740
|
-
});
|
|
741
750
|
});
|
|
742
751
|
}
|
package/package.json
CHANGED