jp.ms.common.modules 1.0.29 → 1.0.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.
- package/dist/dto/app-screen/index.d.ts +1 -0
- package/dist/dto/app-screen/index.js +3 -1
- package/dist/dto/app-screen/index.js.map +1 -1
- package/dist/dto/{table-game/cards → app-table}/card.dto.d.ts +2 -2
- package/dist/dto/app-table/card.dto.js.map +1 -0
- package/dist/dto/app-table/cards-deck.dto.d.ts +6 -0
- package/dist/dto/app-table/cards-deck.dto.js +38 -0
- package/dist/dto/app-table/cards-deck.dto.js.map +1 -0
- package/dist/dto/{table-game/cards/card-pair-slot.dto.d.ts → app-table/cards-pair-slots-item.dto.d.ts} +2 -2
- package/dist/dto/{table-game/cards/card-pair-slot.dto.js → app-table/cards-pair-slots-item.dto.js} +9 -9
- package/dist/dto/app-table/cards-pair-slots-item.dto.js.map +1 -0
- package/dist/dto/app-table/cards-pair-slots.dto.d.ts +5 -0
- package/dist/dto/app-table/cards-pair-slots.dto.js +27 -0
- package/dist/dto/app-table/cards-pair-slots.dto.js.map +1 -0
- package/dist/dto/app-table/cards-panel.dto.d.ts +10 -0
- package/dist/dto/{table-game/cards → app-table}/cards-panel.dto.js +4 -4
- package/dist/dto/app-table/cards-panel.dto.js.map +1 -0
- package/dist/dto/app-table/cards-player.dto.d.ts +6 -0
- package/dist/dto/{table-game/cards/card-player.dto.js → app-table/cards-player.dto.js} +6 -6
- package/dist/dto/app-table/cards-player.dto.js.map +1 -0
- package/dist/dto/app-table/index.d.ts +11 -0
- package/dist/dto/app-table/index.js +26 -0
- package/dist/dto/app-table/index.js.map +1 -0
- package/dist/dto/app-table/moves-panel-button.dto.d.ts +5 -0
- package/dist/dto/{table-game/base/base-table-yours-action.dto.js → app-table/moves-panel-button.dto.js} +6 -6
- package/dist/dto/app-table/moves-panel-button.dto.js.map +1 -0
- package/dist/dto/app-table/moves-panel.dto.d.ts +6 -0
- package/dist/dto/{table-game/base/base-table-moves-panel.dto.js → app-table/moves-panel.dto.js} +9 -9
- package/dist/dto/app-table/moves-panel.dto.js.map +1 -0
- package/dist/dto/{table-game/base/game-player.dto.d.ts → app-table/player.dto.d.ts} +2 -2
- package/dist/dto/{table-game/base/game-player.dto.js → app-table/player.dto.js} +11 -11
- package/dist/dto/app-table/player.dto.js.map +1 -0
- package/dist/dto/app-table/summary-item.dto.d.ts +8 -0
- package/dist/dto/{table-game/base/base-table-summary-item.dto.js → app-table/summary-item.dto.js} +9 -9
- package/dist/dto/app-table/summary-item.dto.js.map +1 -0
- package/dist/dto/app-table/summary.dto.d.ts +5 -0
- package/dist/dto/{table-game/base/base-table-summary.dto.js → app-table/summary.dto.js} +7 -7
- package/dist/dto/app-table/summary.dto.js.map +1 -0
- package/dist/dto/games/fool/fool-player.dto.d.ts +3 -0
- package/dist/dto/games/fool/fool-player.dto.js +8 -0
- package/dist/dto/games/fool/fool-player.dto.js.map +1 -0
- package/dist/dto/games/fool/fool-table.dto.d.ts +18 -0
- package/dist/dto/games/fool/fool-table.dto.js +105 -0
- package/dist/dto/games/fool/fool-table.dto.js.map +1 -0
- package/dist/dto/games/index.d.ts +1 -0
- package/dist/dto/games/index.js +18 -0
- package/dist/dto/games/index.js.map +1 -0
- package/dist/dto/index.d.ts +2 -1
- package/dist/dto/index.js +2 -1
- package/dist/dto/index.js.map +1 -1
- package/dist/exception/error-code.enum.d.ts +4 -0
- package/dist/exception/error-code.enum.js +9 -0
- package/dist/exception/error-code.enum.js.map +1 -0
- package/dist/exception/global-exception-filter.d.ts +5 -0
- package/dist/exception/global-exception-filter.js +53 -0
- package/dist/exception/global-exception-filter.js.map +1 -0
- package/dist/exception/http-exception-wth-snackbar.d.ts +12 -0
- package/dist/exception/http-exception-wth-snackbar.js +17 -0
- package/dist/exception/http-exception-wth-snackbar.js.map +1 -0
- package/dist/exception/index.d.ts +4 -0
- package/dist/exception/index.js +12 -0
- package/dist/exception/index.js.map +1 -0
- package/dist/exception/not-enough-money-for-purchase.exception.d.ts +5 -0
- package/dist/exception/not-enough-money-for-purchase.exception.js +12 -0
- package/dist/exception/not-enough-money-for-purchase.exception.js.map +1 -0
- package/dist/exception/not-found-free-room-for-fast-game.exception.d.ts +5 -0
- package/dist/exception/not-found-free-room-for-fast-game.exception.js +12 -0
- package/dist/exception/not-found-free-room-for-fast-game.exception.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/modules/events/events.gateway.js +1 -1
- package/dist/modules/events/events.gateway.js.map +1 -1
- package/dist/modules/main/main-tables-list-screen.view.d.ts +11 -1
- package/dist/modules/main/main-tables-list-screen.view.js +97 -14
- package/dist/modules/main/main-tables-list-screen.view.js.map +1 -1
- package/dist/modules/main/main.controller.d.ts +4 -3
- package/dist/modules/main/main.controller.js +15 -3
- package/dist/modules/main/main.controller.js.map +1 -1
- package/dist/modules/main/main.module.js +2 -2
- package/dist/modules/main/main.module.js.map +1 -1
- package/dist/modules/main/main.service.d.ts +5 -4
- package/dist/modules/main/main.service.js +38 -12
- package/dist/modules/main/main.service.js.map +1 -1
- package/dist/modules/many-tables-tournament/many-tables-tournament-status-screen.view.d.ts +4 -0
- package/dist/modules/many-tables-tournament/many-tables-tournament-status-screen.view.js +56 -4
- package/dist/modules/many-tables-tournament/many-tables-tournament-status-screen.view.js.map +1 -1
- package/dist/modules/many-tables-tournament/many-tables-tournament-tables-list-screen.view.js +3 -3
- package/dist/modules/many-tables-tournament/many-tables-tournament-tables-list-screen.view.js.map +1 -1
- package/dist/modules/many-tables-tournament/many-tables-tournament.controller.d.ts +6 -7
- package/dist/modules/many-tables-tournament/many-tables-tournament.controller.js +5 -17
- package/dist/modules/many-tables-tournament/many-tables-tournament.controller.js.map +1 -1
- package/dist/modules/many-tables-tournament/many-tables-tournament.service.d.ts +6 -7
- package/dist/modules/many-tables-tournament/many-tables-tournament.service.js +20 -27
- package/dist/modules/many-tables-tournament/many-tables-tournament.service.js.map +1 -1
- package/dist/modules/menu/menu.service.js +1 -2
- package/dist/modules/menu/menu.service.js.map +1 -1
- package/dist/modules/one-table-tournament/one-table-tournament-status-screen.view.d.ts +1 -0
- package/dist/modules/one-table-tournament/one-table-tournament-status-screen.view.js +18 -5
- package/dist/modules/one-table-tournament/one-table-tournament-status-screen.view.js.map +1 -1
- package/dist/modules/one-table-tournament/one-table-tournament.controller.d.ts +3 -3
- package/dist/modules/one-table-tournament/one-table-tournament.controller.js.map +1 -1
- package/dist/modules/one-table-tournament/one-table-tournament.service.d.ts +3 -3
- package/dist/modules/one-table-tournament/one-table-tournament.service.js +1 -2
- package/dist/modules/one-table-tournament/one-table-tournament.service.js.map +1 -1
- package/dist/modules/simple-rooms/simple-rooms.controller.d.ts +5 -5
- package/dist/modules/simple-rooms/simple-rooms.service.d.ts +5 -5
- package/dist/modules/simple-rooms-manager/simple-rooms-manager.service.js.map +1 -1
- package/dist/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.module.d.ts +3 -1
- package/dist/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.module.js +14 -3
- package/dist/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.module.js.map +1 -1
- package/dist/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.service.d.ts +4 -3
- package/dist/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.service.js +49 -25
- package/dist/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.service.js.map +1 -1
- package/dist/modules/tournament-one-table-rooms-manager/tournament-one-table-rooms-manager.service.js +9 -6
- package/dist/modules/tournament-one-table-rooms-manager/tournament-one-table-rooms-manager.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/game-table-result.d.ts +1 -2
- package/dist/utils/game-table-result.js +0 -13
- package/dist/utils/game-table-result.js.map +1 -1
- package/dist/views/index.d.ts +3 -0
- package/dist/views/index.js +7 -1
- package/dist/views/index.js.map +1 -1
- package/dist/views/many-tables-tournament-conifrm-exit-dialog.view.d.ts +4 -0
- package/dist/views/many-tables-tournament-conifrm-exit-dialog.view.js +11 -0
- package/dist/views/many-tables-tournament-conifrm-exit-dialog.view.js.map +1 -0
- package/dist/views/one-table-tournament-conifrm-exit-dialog.view.d.ts +4 -0
- package/dist/views/one-table-tournament-conifrm-exit-dialog.view.js +11 -0
- package/dist/views/one-table-tournament-conifrm-exit-dialog.view.js.map +1 -0
- package/dist/views/table-summary.view.d.ts +11 -0
- package/dist/views/table-summary.view.js +47 -0
- package/dist/views/table-summary.view.js.map +1 -0
- package/dist/views/tournament-buy-ticket-dialog.view.js +1 -1
- package/dist/views/tournament-buy-ticket-dialog.view.js.map +1 -1
- package/package.json +4 -4
- package/src/dto/app-screen/index.ts +1 -0
- package/src/dto/{table-game/cards → app-table}/card.dto.ts +2 -2
- package/src/dto/app-table/cards-deck.dto.ts +22 -0
- package/src/dto/{table-game/cards/card-pair-slot.dto.ts → app-table/cards-pair-slots-item.dto.ts} +2 -2
- package/src/dto/app-table/cards-pair-slots.dto.ts +13 -0
- package/src/dto/{table-game/cards → app-table}/cards-panel.dto.ts +5 -6
- package/src/dto/app-table/cards-player.dto.ts +14 -0
- package/src/dto/app-table/index.ts +11 -0
- package/src/dto/{table-game/base/base-table-yours-action.dto.ts → app-table/moves-panel-button.dto.ts} +2 -3
- package/src/dto/{table-game/base/base-table-moves-panel.dto.ts → app-table/moves-panel.dto.ts} +5 -5
- package/src/dto/{table-game/base/game-player.dto.ts → app-table/player.dto.ts} +2 -2
- package/src/dto/{table-game/base/base-table-summary-item.dto.ts → app-table/summary-item.dto.ts} +2 -3
- package/src/dto/app-table/summary.dto.ts +13 -0
- package/src/dto/games/fool/fool-player.dto.ts +3 -0
- package/src/dto/games/fool/fool-table.dto.ts +79 -0
- package/src/dto/games/index.ts +1 -0
- package/src/dto/index.ts +2 -1
- package/src/exception/error-code.enum.ts +4 -0
- package/src/exception/global-exception-filter.ts +50 -0
- package/src/exception/http-exception-wth-snackbar.ts +23 -0
- package/src/exception/index.ts +4 -0
- package/src/exception/not-enough-money-for-purchase.exception.ts +15 -0
- package/src/exception/not-found-free-room-for-fast-game.exception.ts +15 -0
- package/src/index.ts +2 -1
- package/src/modules/events/events.gateway.ts +1 -1
- package/src/modules/main/main-tables-list-screen.view.ts +177 -55
- package/src/modules/main/main.controller.ts +23 -10
- package/src/modules/main/main.module.ts +2 -2
- package/src/modules/main/main.service.ts +53 -19
- package/src/modules/many-tables-tournament/many-tables-tournament-status-screen.view.ts +97 -31
- package/src/modules/many-tables-tournament/many-tables-tournament-tables-list-screen.view.ts +25 -17
- package/src/modules/many-tables-tournament/many-tables-tournament.controller.ts +8 -17
- package/src/modules/many-tables-tournament/many-tables-tournament.service.ts +46 -58
- package/src/modules/menu/menu.service.ts +6 -9
- package/src/modules/one-table-tournament/one-table-tournament-status-screen.view.ts +43 -17
- package/src/modules/one-table-tournament/one-table-tournament.controller.ts +3 -4
- package/src/modules/one-table-tournament/one-table-tournament.service.ts +9 -12
- package/src/modules/simple-rooms/simple-rooms.controller.ts +5 -5
- package/src/modules/simple-rooms/simple-rooms.service.ts +5 -5
- package/src/modules/simple-rooms-manager/simple-rooms-manager.service.ts +0 -2
- package/src/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.module.ts +17 -9
- package/src/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.service.ts +57 -26
- package/src/modules/tournament-one-table-rooms-manager/tournament-one-table-rooms-manager.service.ts +10 -7
- package/src/utils/game-table-result.ts +1 -16
- package/src/views/index.ts +4 -1
- package/src/views/many-tables-tournament-conifrm-exit-dialog.view.ts +21 -0
- package/src/views/one-table-tournament-conifrm-exit-dialog.view.ts +21 -0
- package/src/views/table-summary.view.ts +87 -0
- package/src/views/tournament-buy-ticket-dialog.view.ts +4 -4
- package/dist/adapter/base-table-game-state-adapter.d.ts +0 -36
- package/dist/adapter/base-table-game-state-adapter.js +0 -183
- package/dist/adapter/base-table-game-state-adapter.js.map +0 -1
- package/dist/adapter/card-table-game-state-adapter.d.ts +0 -14
- package/dist/adapter/card-table-game-state-adapter.js +0 -51
- package/dist/adapter/card-table-game-state-adapter.js.map +0 -1
- package/dist/adapter/index.d.ts +0 -1
- package/dist/adapter/index.js +0 -6
- package/dist/adapter/index.js.map +0 -1
- package/dist/dto/table-game/base/base-table-game-state.dto.d.ts +0 -17
- package/dist/dto/table-game/base/base-table-game-state.dto.js +0 -128
- package/dist/dto/table-game/base/base-table-game-state.dto.js.map +0 -1
- package/dist/dto/table-game/base/base-table-moves-panel.dto.d.ts +0 -6
- package/dist/dto/table-game/base/base-table-moves-panel.dto.js.map +0 -1
- package/dist/dto/table-game/base/base-table-summary-item.dto.d.ts +0 -8
- package/dist/dto/table-game/base/base-table-summary-item.dto.js.map +0 -1
- package/dist/dto/table-game/base/base-table-summary.dto.d.ts +0 -5
- package/dist/dto/table-game/base/base-table-summary.dto.js.map +0 -1
- package/dist/dto/table-game/base/base-table-yours-action.dto.d.ts +0 -5
- package/dist/dto/table-game/base/base-table-yours-action.dto.js.map +0 -1
- package/dist/dto/table-game/base/game-player.dto.js.map +0 -1
- package/dist/dto/table-game/cards/card-pair-slot.dto.js.map +0 -1
- package/dist/dto/table-game/cards/card-player.dto.d.ts +0 -6
- package/dist/dto/table-game/cards/card-player.dto.js.map +0 -1
- package/dist/dto/table-game/cards/card-table-game-state.dto.d.ts +0 -16
- package/dist/dto/table-game/cards/card-table-game-state.dto.js +0 -68
- package/dist/dto/table-game/cards/card-table-game-state.dto.js.map +0 -1
- package/dist/dto/table-game/cards/card.dto.js.map +0 -1
- package/dist/dto/table-game/cards/cards-panel.dto.d.ts +0 -10
- package/dist/dto/table-game/cards/cards-panel.dto.js.map +0 -1
- package/dist/dto/table-game/index.d.ts +0 -1
- package/dist/dto/table-game/index.js +0 -6
- package/dist/dto/table-game/index.js.map +0 -1
- package/src/adapter/base-table-game-state-adapter.ts +0 -272
- package/src/adapter/card-table-game-state-adapter.ts +0 -78
- package/src/adapter/index.ts +0 -1
- package/src/dto/table-game/base/base-table-game-state.dto.ts +0 -95
- package/src/dto/table-game/base/base-table-summary.dto.ts +0 -13
- package/src/dto/table-game/cards/card-player.dto.ts +0 -15
- package/src/dto/table-game/cards/card-table-game-state.dto.ts +0 -50
- package/src/dto/table-game/index.ts +0 -2
- /package/dist/dto/{table-game/cards → app-table}/card.dto.js +0 -0
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.MainTablesListScreenView = void 0;
|
|
7
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
4
8
|
const jp_common_models_1 = require("jp.common.models");
|
|
5
9
|
const jp_common_utils_1 = require("jp.common.utils");
|
|
6
10
|
const views_1 = require("../../views");
|
|
@@ -8,30 +12,109 @@ class MainTablesListScreenView extends jp_common_models_1.UniversalScreenView {
|
|
|
8
12
|
simpleRooms;
|
|
9
13
|
oneTableTournamentRooms;
|
|
10
14
|
manyTablesTournamentRooms;
|
|
11
|
-
|
|
15
|
+
playerId;
|
|
16
|
+
constructor(localeService, lang, simpleRooms, oneTableTournamentRooms, manyTablesTournamentRooms, playerId) {
|
|
12
17
|
super(localeService, lang);
|
|
13
18
|
this.simpleRooms = simpleRooms;
|
|
14
19
|
this.oneTableTournamentRooms = oneTableTournamentRooms;
|
|
15
20
|
this.manyTablesTournamentRooms = manyTablesTournamentRooms;
|
|
21
|
+
this.playerId = playerId;
|
|
16
22
|
}
|
|
17
23
|
build() {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
return new jp_common_models_1.StandardScreenComponent(jp_common_models_1.AppScreenIdEnum.ROOMS)
|
|
25
|
+
.addAppBar(new jp_common_models_1.StandardAppBarComponent(this.localeService.t('common.rooms.screen.title', { lang: this.lang }), new jp_common_models_1.ArrowBackButtonComponent(this.localeService.t('common.button.back', { lang: this.lang }))))
|
|
26
|
+
.addSection(new jp_common_models_1.CardListSectionComponent('id1', [
|
|
27
|
+
...this.getManyTablesTournamentsCardList(),
|
|
28
|
+
...this.getOneTableTournamentsCardList(),
|
|
29
|
+
...this.getSimpleRoomsTableCardList(),
|
|
30
|
+
]))
|
|
31
|
+
.addDialog(new views_1.TournamentBuyTicketDialogView(this.localeService, this.lang).build());
|
|
32
|
+
}
|
|
33
|
+
getSimpleRoomsTableCardList() {
|
|
34
|
+
return this.simpleRooms.reduce((result, room) => {
|
|
35
|
+
const list = room.getTables().map((table) => new jp_common_models_1.MiniCardSectionListItemComponent(table.getId(), table.getTitleWithNumber(this.lang), (0, jp_common_utils_1.replacePattern)(table.getSubtitle(this.lang), {
|
|
22
36
|
HALF_BET: table.getHalfBet().toString(),
|
|
23
37
|
BET: table.getBet().toString()
|
|
24
|
-
}), jp_common_models_1.
|
|
38
|
+
}), new jp_common_models_1.UrlImageComponent(`${table.getPlayers().length}/${table.getTableSize()}`), true, true, jp_common_models_1.AppScreenRouter.getSimpleRoomTablePath(table.getId())));
|
|
25
39
|
return [...result, ...list];
|
|
26
40
|
}, []);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
41
|
+
}
|
|
42
|
+
getOneTableTournamentsCardList() {
|
|
43
|
+
return this.oneTableTournamentRooms.map((room) => new jp_common_models_1.MiniCardSectionListItemComponent(room.getId(), room.getTitle(this.lang), this.getOneTableTournamentSubtitle(room), this.getOneTableTournamentIcon(room), true, true, jp_common_models_1.AppScreenRouter.getOneTableTournamentStatusPath(room.getId())));
|
|
44
|
+
}
|
|
45
|
+
getOneTableTournamentSubtitle(tournament) {
|
|
46
|
+
if (tournament.getRoomMaster().isCancelled()) {
|
|
47
|
+
return this.localeService.t('common.tournaments.status.4', { lang: this.lang });
|
|
48
|
+
}
|
|
49
|
+
else if (tournament.getRoomMaster().isFinish()) {
|
|
50
|
+
return this.localeService.t('common.tournaments.status.3', { lang: this.lang });
|
|
51
|
+
}
|
|
52
|
+
else if (tournament.getRoomMaster().isInProgress()) {
|
|
53
|
+
return this.localeService.t('common.tournaments.status.2', { lang: this.lang });
|
|
54
|
+
}
|
|
55
|
+
else if (tournament.getRoomMaster().isWaiting()) {
|
|
56
|
+
return tournament.getSubtitle(this.lang);
|
|
57
|
+
}
|
|
58
|
+
return '';
|
|
59
|
+
}
|
|
60
|
+
getOneTableTournamentIcon(tournament) {
|
|
61
|
+
if (tournament.getRoomMaster().isFinish()) {
|
|
62
|
+
return new jp_common_models_1.IconImageComponent(jp_common_models_1.AppScreenIconEnum.EMOJI_EVENTS);
|
|
63
|
+
}
|
|
64
|
+
if (tournament.getRoomMaster().isCancelled()) {
|
|
65
|
+
return new jp_common_models_1.IconImageComponent(jp_common_models_1.AppScreenIconEnum.INFO);
|
|
66
|
+
}
|
|
67
|
+
if (tournament.getRoomMaster().isInProgress()) {
|
|
68
|
+
return new jp_common_models_1.IconImageComponent(jp_common_models_1.AppScreenIconEnum.BOLT);
|
|
69
|
+
}
|
|
70
|
+
return new jp_common_models_1.UrlImageComponent(`${tournament.getParticipants().length}/${tournament.getTableSize()}`);
|
|
71
|
+
}
|
|
72
|
+
getManyTablesTournamentsCardList() {
|
|
73
|
+
return this.manyTablesTournamentRooms.map((room) => this.getManyTablesTournamentsCardListItem(room));
|
|
74
|
+
}
|
|
75
|
+
getManyTablesTournamentsCardListItem(tournament) {
|
|
76
|
+
if (tournament.getRoomMaster().isWaiting() || tournament.getRoomMaster().isInProgress()) {
|
|
77
|
+
return new jp_common_models_1.ExtendedCardSectionListItemComponent(tournament.getId(), tournament.getTitle(this.lang), this.getManyTablesTournamentSubtitle(tournament), this.getManyTablesTournamentIcon(tournament), true, true, this.getManyTablesTournamentIcon(tournament), (0, jp_common_utils_1.replacePattern)(tournament.getDescription(this.lang), {
|
|
78
|
+
PARTICIPANTS: tournament.getParticipants().length.toString(),
|
|
79
|
+
TOTAL_PARTICIPANTS: tournament.getMaxParticipants().toString(),
|
|
80
|
+
}), this.getManyTablesTournamenButtons(tournament));
|
|
81
|
+
}
|
|
82
|
+
return new jp_common_models_1.MiniCardSectionListItemComponent(tournament.getId(), tournament.getTitle(this.lang), this.getManyTablesTournamentSubtitle(tournament), this.getManyTablesTournamentIcon(tournament), true, true, jp_common_models_1.AppScreenRouter.getManyTablesTournamentStatusPath(tournament.getId()));
|
|
83
|
+
}
|
|
84
|
+
getManyTablesTournamentIcon(tournament) {
|
|
85
|
+
if (tournament.getRoomMaster().isCancelled()) {
|
|
86
|
+
return new jp_common_models_1.IconImageComponent(jp_common_models_1.AppScreenIconEnum.INFO);
|
|
87
|
+
}
|
|
88
|
+
if (tournament.getRoomMaster().isInProgress()) {
|
|
89
|
+
return new jp_common_models_1.IconImageComponent(jp_common_models_1.AppScreenIconEnum.BOLT);
|
|
90
|
+
}
|
|
91
|
+
return new jp_common_models_1.IconImageComponent(jp_common_models_1.AppScreenIconEnum.EMOJI_EVENTS);
|
|
92
|
+
}
|
|
93
|
+
getManyTablesTournamentSubtitle(tournament) {
|
|
94
|
+
if (tournament.getRoomMaster().isCancelled()) {
|
|
95
|
+
return this.localeService.t('common.tournaments.status.4', { lang: this.lang });
|
|
96
|
+
}
|
|
97
|
+
else if (tournament.getRoomMaster().isFinish()) {
|
|
98
|
+
return this.localeService.t('common.tournaments.status.3', { lang: this.lang });
|
|
99
|
+
}
|
|
100
|
+
else if (tournament.getRoomMaster().isInProgress()) {
|
|
101
|
+
return this.localeService.t('common.tournaments.status.2', { lang: this.lang });
|
|
102
|
+
}
|
|
103
|
+
else if (tournament.getRoomMaster().isWaiting()) {
|
|
104
|
+
return (0, jp_common_utils_1.replacePattern)(tournament.getSubtitle(this.lang), {
|
|
105
|
+
DATE: (0, dayjs_1.default)(tournament.getScheduleDate()).isToday() ?
|
|
106
|
+
this.localeService.t('common.tournaments.status.today', { lang: this.lang }) :
|
|
107
|
+
(0, jp_common_utils_1.formatDate)(tournament.getScheduleDate() ?? ''),
|
|
108
|
+
SCHEDULE_DATE: (0, jp_common_utils_1.formatTime)(tournament.getScheduleDate() ?? ''),
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
return '';
|
|
112
|
+
}
|
|
113
|
+
getManyTablesTournamenButtons(tournament) {
|
|
114
|
+
if (tournament.isParticipant(this.playerId)) {
|
|
115
|
+
return new jp_common_models_1.PrimaryButtonButtonsComponent(new jp_common_models_1.TextButtonComponent(this.localeService.t('common.tournaments.screen.button.join.tournament', { lang: this.lang })).setId(jp_common_models_1.AppScreeButtonIdEnum.BUTTON_MAIN_TABLES_MANY_TABLES_TOURNAMENT_JOIN));
|
|
116
|
+
}
|
|
117
|
+
return new jp_common_models_1.FullButtonsButtonsComponent(new jp_common_models_1.TextButtonComponent(this.localeService.t('common.tournaments.screen.button.buy.ticket', { lang: this.lang })).setId(jp_common_models_1.AppScreeButtonIdEnum.BUTTON_MAIN_TABLES_MANY_TABLES_TOURNAMENT_BUY_TICKET), new jp_common_models_1.TextButtonComponent(this.localeService.t('common.tournaments.screen.button.join.tournament', { lang: this.lang })).setId(jp_common_models_1.AppScreeButtonIdEnum.BUTTON_MAIN_TABLES_MANY_TABLES_TOURNAMENT_JOIN));
|
|
35
118
|
}
|
|
36
119
|
}
|
|
37
120
|
exports.MainTablesListScreenView = MainTablesListScreenView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main-tables-list-screen.view.js","sourceRoot":"","sources":["../../../src/modules/main/main-tables-list-screen.view.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main-tables-list-screen.view.js","sourceRoot":"","sources":["../../../src/modules/main/main-tables-list-screen.view.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,uDAoB0B;AAQ1B,qDAAyE;AAEzE,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, FindFreeTableDto } from '../../dto';
|
|
1
|
+
import { IAppHeaders } from 'jp.common.models';
|
|
2
|
+
import { PlayerCheckStateDto, FindFreeTableDto, BaseAppScreenDto } from '../../dto';
|
|
3
3
|
import { MainService } from './main.service';
|
|
4
4
|
export declare class MainController {
|
|
5
5
|
private readonly mainService;
|
|
6
6
|
constructor(mainService: MainService);
|
|
7
7
|
checkState(headers: IAppHeaders): Promise<PlayerCheckStateDto>;
|
|
8
|
-
getScreen(headers: IAppHeaders):
|
|
8
|
+
getScreen(headers: IAppHeaders): BaseAppScreenDto;
|
|
9
9
|
subscribeOnTablesScreen(headers: IAppHeaders): Promise<void>;
|
|
10
10
|
unsubscribeFromTablesScreen(headers: IAppHeaders): Promise<void>;
|
|
11
11
|
findFreeTable(headers: IAppHeaders): FindFreeTableDto;
|
|
12
|
+
buyTicket(tournamentId: string, headers: IAppHeaders): Promise<BaseAppScreenDto>;
|
|
12
13
|
}
|
|
@@ -25,7 +25,7 @@ let MainController = class MainController {
|
|
|
25
25
|
return this.mainService.playerCheckState(headers.client_auth_token, headers.client_game);
|
|
26
26
|
}
|
|
27
27
|
getScreen(headers) {
|
|
28
|
-
return this.mainService.getScreen(headers.client_language);
|
|
28
|
+
return this.mainService.getScreen(headers.client_language, headers.client_auth_token);
|
|
29
29
|
}
|
|
30
30
|
subscribeOnTablesScreen(headers) {
|
|
31
31
|
return this.mainService.subscribeOnTablesScreen(headers.client_language);
|
|
@@ -34,7 +34,10 @@ let MainController = class MainController {
|
|
|
34
34
|
return this.mainService.unsubscribeFromTablesScreen(headers.client_language);
|
|
35
35
|
}
|
|
36
36
|
findFreeTable(headers) {
|
|
37
|
-
return this.mainService.findFreeTable(headers.client_auth_token);
|
|
37
|
+
return this.mainService.findFreeTable(headers.client_auth_token, headers.client_language);
|
|
38
|
+
}
|
|
39
|
+
buyTicket(tournamentId, headers) {
|
|
40
|
+
return this.mainService.manyTablesTournamentbBuyTicket(headers.client_auth_token, headers.client_language, tournamentId);
|
|
38
41
|
}
|
|
39
42
|
};
|
|
40
43
|
exports.MainController = MainController;
|
|
@@ -50,7 +53,7 @@ __decorate([
|
|
|
50
53
|
__param(0, (0, common_1.Headers)()),
|
|
51
54
|
__metadata("design:type", Function),
|
|
52
55
|
__metadata("design:paramtypes", [Object]),
|
|
53
|
-
__metadata("design:returntype",
|
|
56
|
+
__metadata("design:returntype", dto_1.BaseAppScreenDto)
|
|
54
57
|
], MainController.prototype, "getScreen", null);
|
|
55
58
|
__decorate([
|
|
56
59
|
(0, common_1.Get)('tables/subscribe'),
|
|
@@ -73,6 +76,15 @@ __decorate([
|
|
|
73
76
|
__metadata("design:paramtypes", [Object]),
|
|
74
77
|
__metadata("design:returntype", dto_1.FindFreeTableDto)
|
|
75
78
|
], MainController.prototype, "findFreeTable", null);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, common_1.Post)('many_tables_tournament/buy_ticket/:tournamentId'),
|
|
81
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
82
|
+
__param(0, (0, common_1.Param)('tournamentId')),
|
|
83
|
+
__param(1, (0, common_1.Headers)()),
|
|
84
|
+
__metadata("design:type", Function),
|
|
85
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
86
|
+
__metadata("design:returntype", Promise)
|
|
87
|
+
], MainController.prototype, "buyTicket", null);
|
|
76
88
|
exports.MainController = MainController = __decorate([
|
|
77
89
|
(0, common_1.Controller)('main'),
|
|
78
90
|
__metadata("design:paramtypes", [main_service_1.MainService])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.controller.js","sourceRoot":"","sources":["../../../src/modules/main/main.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"main.controller.js","sourceRoot":"","sources":["../../../src/modules/main/main.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAsH;AAGtH,mCAAoF;AAEpF,iDAA6C;AAGtC,IAAM,cAAc,GAApB,MA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ElC;AAGD;IADC,IAAA,YAAG,EAAC,oBAAoB,CAAC;IACI,WAAA,IAAA,gBAAO,GAAE,CAAA;;;;iEAEtC;AAGD;IADC,IAAA,YAAG,EAAC,iBAAiB,CAAC;IACP,WAAA,IAAA,gBAAO,GAAE,CAAA;;;oCAAwB,sBAAgB;mDAEhE;AAID;IAFC,IAAA,aAAI,EAAC,iDAAiD,CAAC;IACvD,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IAEnB,WAAA,IAAA,cAAK,EAAC,cAAc,CAAC,CAAA;IACrB,WAAA,IAAA,gBAAO,GAAE,CAAA;;;;+CAOb;yBAzCQ,cAAc;IAD1B,IAAA,mBAAU,EAAC,MAAM,CAAC;qCAGmB,0BAAW;GAFpC,cAAc,CA0C1B"}
|
|
@@ -44,7 +44,7 @@ let MainModule = MainModule_1 = class MainModule {
|
|
|
44
44
|
}
|
|
45
45
|
onHandleStatusRoomChange = (event) => {
|
|
46
46
|
this.eventsBusMainTablesSubscribeService.getTablesSubscribers().forEach((subscriber) => {
|
|
47
|
-
const screen = this.mainService.getScreen(subscriber.language);
|
|
47
|
+
const screen = this.mainService.getScreen(subscriber.language, subscriber.id);
|
|
48
48
|
subscriber.sendMessage(new jp_ms_common_engine_1.MainTablesUpdateListWsEvent(event.game, screen));
|
|
49
49
|
});
|
|
50
50
|
};
|
|
@@ -61,7 +61,7 @@ exports.MainModule = MainModule = MainModule_1 = __decorate([
|
|
|
61
61
|
main_service_1.MainService,
|
|
62
62
|
jp_db_schemas_1.UsersRepository,
|
|
63
63
|
jp_db_schemas_1.ActivityLogRepository,
|
|
64
|
-
]
|
|
64
|
+
],
|
|
65
65
|
}),
|
|
66
66
|
__metadata("design:paramtypes", [event_bus_1.EventsBusMainTablesSubscribeService,
|
|
67
67
|
main_service_1.MainService])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.module.js","sourceRoot":"","sources":["../../../src/modules/main/main.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAiE;AACjE,+CAAkD;AAClD,6DAAoG;AACpG,iDAAyH;AAEzH,4CAAmE;AAEnE,uDAAmD;AACnD,iDAA6C;AAC7C,qDAAgD;AAezC,IAAM,UAAU,kBAAhB,MAAM,UAAU;IAEE;IACA;IAFrB,YACqB,mCAAwE,EACxE,WAAwB;QADxB,wCAAmC,GAAnC,mCAAmC,CAAqC;QACxE,gBAAW,GAAX,WAAW,CAAa;IACzC,CAAC;IAEL,MAAM,CAAC,YAAY,CAAE,OAA0B;QAC3C,OAAO;YACH,MAAM,EAAE,YAAU;YAClB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,EAAE;YAC9B,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,6BAAY;oBACrB,UAAU,EAAE,OAAO,CAAC,UAAU;oBAC9B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;iBACnB;aAChB;SACJ,CAAC;IACN,CAAC;IAED,KAAK,CAAC,YAAY;QACd,IAAI,CAAC,mCAAmC,CAAC,SAAS,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;IACtF,CAAC;IAEO,wBAAwB,GAAG,CAAC,KAA2B,EAAE,EAAE;QAC/D,IAAI,CAAC,mCAAmC,CAAC,oBAAoB,EAAE,CAAC,OAAO,CAAC,CAAC,UAAsB,EAAE,EAAE;YAC/F,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"main.module.js","sourceRoot":"","sources":["../../../src/modules/main/main.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAiE;AACjE,+CAAkD;AAClD,6DAAoG;AACpG,iDAAyH;AAEzH,4CAAmE;AAEnE,uDAAmD;AACnD,iDAA6C;AAC7C,qDAAgD;AAezC,IAAM,UAAU,kBAAhB,MAAM,UAAU;IAEE;IACA;IAFrB,YACqB,mCAAwE,EACxE,WAAwB;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AAc,CAAC;QAC7B,SAAS,EAAE;YACP,0BAAW;YACX,+BAAe;YACf,qCAAqB;SACxB;KACJ,CAAC;qCAG4D,+CAAmC;QAC3D,0BAAW;GAHpC,UAAU,CA8BtB"}
|
|
@@ -12,13 +12,14 @@ export declare class MainService {
|
|
|
12
12
|
private readonly manyTablesRoomsManagerService;
|
|
13
13
|
private readonly playersManager;
|
|
14
14
|
private readonly eventsBusMainTablesSubscribeService;
|
|
15
|
-
private readonly
|
|
15
|
+
private readonly usersRepository;
|
|
16
16
|
private readonly activityLogRepository;
|
|
17
17
|
private readonly options;
|
|
18
|
-
constructor(simpleRoomsManager: SimpleRoomsManagerService, oneTableRoomsManagerService: TournamentOneTableRoomsManagerService, manyTablesRoomsManagerService: TournamentManyTablesRoomsManagerService, playersManager: PlayersManagerService, eventsBusMainTablesSubscribeService: EventsBusMainTablesSubscribeService,
|
|
19
|
-
getScreen(lang: string): BaseAppScreenDto;
|
|
18
|
+
constructor(simpleRoomsManager: SimpleRoomsManagerService, oneTableRoomsManagerService: TournamentOneTableRoomsManagerService, manyTablesRoomsManagerService: TournamentManyTablesRoomsManagerService, playersManager: PlayersManagerService, eventsBusMainTablesSubscribeService: EventsBusMainTablesSubscribeService, usersRepository: UsersRepository, activityLogRepository: ActivityLogRepository, options: MainFactoryOptions);
|
|
19
|
+
getScreen(lang: string, clientAuthToken: string): BaseAppScreenDto;
|
|
20
20
|
subscribeOnTablesScreen(clientAuthToken: string): Promise<void>;
|
|
21
21
|
unsubscribeFromTablesScreen(clientAuthToken: string): Promise<void>;
|
|
22
22
|
playerCheckState(clientAuthToken: string, game: string): Promise<PlayerCheckStateDto>;
|
|
23
|
-
findFreeTable(clientAuthToken: string): FindFreeTableDto;
|
|
23
|
+
findFreeTable(clientAuthToken: string, lang: string): FindFreeTableDto;
|
|
24
|
+
manyTablesTournamentbBuyTicket(clientAuthToken: string, lang: string, tournamentId: string): Promise<BaseAppScreenDto>;
|
|
24
25
|
}
|
|
@@ -17,16 +17,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.MainService = void 0;
|
|
19
19
|
const common_1 = require("@nestjs/common");
|
|
20
|
-
const jp_common_models_1 = require("jp.common.models");
|
|
21
20
|
const dayjs_1 = __importDefault(require("dayjs"));
|
|
22
21
|
const isToday_1 = __importDefault(require("dayjs/plugin/isToday"));
|
|
23
22
|
const jp_db_schemas_1 = require("jp.db.schemas");
|
|
23
|
+
const jp_ms_common_engine_1 = require("jp.ms.common.engine");
|
|
24
|
+
const jp_common_models_1 = require("jp.common.models");
|
|
24
25
|
const dto_1 = require("../../dto");
|
|
25
26
|
const simple_rooms_manager_1 = require("../simple-rooms-manager");
|
|
26
27
|
const players_manager_1 = require("../players-manager");
|
|
27
28
|
const tournament_one_table_rooms_manager_1 = require("../tournament-one-table-rooms-manager");
|
|
28
29
|
const tournament_many_tables_rooms_manager_1 = require("../tournament-many-tables-rooms-manager");
|
|
29
30
|
const events_bus_main_tables_subscribe_service_1 = require("../event-bus/events-bus.main-tables.subscribe.service");
|
|
31
|
+
const exception_1 = require("../../exception");
|
|
30
32
|
const main_constants_1 = require("./main.constants");
|
|
31
33
|
const main_tables_list_screen_view_1 = require("./main-tables-list-screen.view");
|
|
32
34
|
let MainService = class MainService {
|
|
@@ -35,22 +37,22 @@ let MainService = class MainService {
|
|
|
35
37
|
manyTablesRoomsManagerService;
|
|
36
38
|
playersManager;
|
|
37
39
|
eventsBusMainTablesSubscribeService;
|
|
38
|
-
|
|
40
|
+
usersRepository;
|
|
39
41
|
activityLogRepository;
|
|
40
42
|
options;
|
|
41
|
-
constructor(simpleRoomsManager, oneTableRoomsManagerService, manyTablesRoomsManagerService, playersManager, eventsBusMainTablesSubscribeService,
|
|
43
|
+
constructor(simpleRoomsManager, oneTableRoomsManagerService, manyTablesRoomsManagerService, playersManager, eventsBusMainTablesSubscribeService, usersRepository, activityLogRepository, options) {
|
|
42
44
|
this.simpleRoomsManager = simpleRoomsManager;
|
|
43
45
|
this.oneTableRoomsManagerService = oneTableRoomsManagerService;
|
|
44
46
|
this.manyTablesRoomsManagerService = manyTablesRoomsManagerService;
|
|
45
47
|
this.playersManager = playersManager;
|
|
46
48
|
this.eventsBusMainTablesSubscribeService = eventsBusMainTablesSubscribeService;
|
|
47
|
-
this.
|
|
49
|
+
this.usersRepository = usersRepository;
|
|
48
50
|
this.activityLogRepository = activityLogRepository;
|
|
49
51
|
this.options = options;
|
|
50
52
|
dayjs_1.default.extend(isToday_1.default);
|
|
51
53
|
}
|
|
52
|
-
getScreen(lang) {
|
|
53
|
-
return new dto_1.BaseAppScreenDto(new
|
|
54
|
+
getScreen(lang, clientAuthToken) {
|
|
55
|
+
return new dto_1.BaseAppScreenDto(new main_tables_list_screen_view_1.MainTablesListScreenView(this.options.i18n, lang, this.simpleRoomsManager.getRooms(), this.oneTableRoomsManagerService.getRooms(), this.manyTablesRoomsManagerService.getRooms(), clientAuthToken).buildBS());
|
|
54
56
|
}
|
|
55
57
|
subscribeOnTablesScreen(clientAuthToken) {
|
|
56
58
|
const player = this.playersManager.getPlayerById(clientAuthToken);
|
|
@@ -69,14 +71,22 @@ let MainService = class MainService {
|
|
|
69
71
|
async playerCheckState(clientAuthToken, game) {
|
|
70
72
|
const player = this.playersManager.getPlayerById(clientAuthToken);
|
|
71
73
|
let redirectUrl = jp_common_models_1.AppScreenRoutesEnum.MENU;
|
|
72
|
-
const foundUser = await this.
|
|
74
|
+
const foundUser = await this.usersRepository.findById(clientAuthToken);
|
|
73
75
|
const isNewbie = await this.activityLogRepository.userIsNewbie(clientAuthToken);
|
|
74
76
|
const last7logins = await this.activityLogRepository.findLast7DaysLogins(game, clientAuthToken);
|
|
75
77
|
if (!foundUser) {
|
|
76
78
|
throw new common_1.InternalServerErrorException();
|
|
77
79
|
}
|
|
78
|
-
if (player
|
|
79
|
-
|
|
80
|
+
if (player && (player.isPlayer() || player.isTableQueuer()) && player.tableId) {
|
|
81
|
+
if (player.room instanceof jp_ms_common_engine_1.SimpleRoom) {
|
|
82
|
+
redirectUrl = jp_common_models_1.AppScreenRouter.getSimpleRoomTablePath(player.tableId);
|
|
83
|
+
}
|
|
84
|
+
else if (player.room instanceof jp_ms_common_engine_1.OneTableTournamentRoom) {
|
|
85
|
+
redirectUrl = jp_common_models_1.AppScreenRouter.getOneTableTournamentTablePath(player.tableId);
|
|
86
|
+
}
|
|
87
|
+
else if (player.room instanceof jp_ms_common_engine_1.ManyTablesTournamentRoom) {
|
|
88
|
+
redirectUrl = jp_common_models_1.AppScreenRouter.getManyTablesTournamentTablePath(player.tableId);
|
|
89
|
+
}
|
|
80
90
|
}
|
|
81
91
|
else if (isNewbie) {
|
|
82
92
|
redirectUrl = jp_common_models_1.AppScreenRoutesEnum.WELCOME;
|
|
@@ -89,10 +99,26 @@ let MainService = class MainService {
|
|
|
89
99
|
}
|
|
90
100
|
return dto_1.PlayerCheckStateDto.fromEntities(redirectUrl, player?.id ?? '');
|
|
91
101
|
}
|
|
92
|
-
findFreeTable(clientAuthToken) {
|
|
102
|
+
findFreeTable(clientAuthToken, lang) {
|
|
103
|
+
const player = this.playersManager.getPlayerById(clientAuthToken);
|
|
104
|
+
const tableId = this.simpleRoomsManager.getFreeFastGameRoom()?.getId();
|
|
105
|
+
if (!player || !tableId) {
|
|
106
|
+
throw new exception_1.NotFoundFreeRoomForFastGameException(new jp_common_models_1.ErrorSnackbarComponent(exception_1.ErrorCodeEnum.NOT_FOUND_FREE_ROOM_FOR_FAST_GAME, this.options.i18n.t('common.server.message.code.4003', { lang })));
|
|
107
|
+
}
|
|
108
|
+
return dto_1.FindFreeTableDto.fromEntities(jp_common_models_1.AppScreenRouter.getSimpleRoomTablePath(tableId), player.id);
|
|
109
|
+
}
|
|
110
|
+
async manyTablesTournamentbBuyTicket(clientAuthToken, lang, tournamentId) {
|
|
93
111
|
const player = this.playersManager.getPlayerById(clientAuthToken);
|
|
94
|
-
const
|
|
95
|
-
|
|
112
|
+
const tournament = this.manyTablesRoomsManagerService.getRoomByTableId(tournamentId);
|
|
113
|
+
const user = await this.usersRepository.findById(player?.id ?? '');
|
|
114
|
+
if (!player || !tournament || !user) {
|
|
115
|
+
throw new common_1.InternalServerErrorException();
|
|
116
|
+
}
|
|
117
|
+
if (user.balance < tournament.getTicketPrice()) {
|
|
118
|
+
throw new exception_1.NotEnoughMoneyForPurchaseException(new jp_common_models_1.ErrorSnackbarComponent(exception_1.ErrorCodeEnum.NOT_ENOUGH_MONEY_FOR_PURCHASE, this.options.i18n.t('common.server.message.code.4004', { lang })));
|
|
119
|
+
}
|
|
120
|
+
await this.manyTablesRoomsManagerService.buyTicket(tournamentId, player);
|
|
121
|
+
return this.getScreen(lang, clientAuthToken);
|
|
96
122
|
}
|
|
97
123
|
};
|
|
98
124
|
exports.MainService = MainService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.service.js","sourceRoot":"","sources":["../../../src/modules/main/main.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAAkF;AAClF,
|
|
1
|
+
{"version":3,"file":"main.service.js","sourceRoot":"","sources":["../../../src/modules/main/main.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAAkF;AAClF,kDAA0B;AAC1B,mEAA2C;AAC3C,iDAAuE;AACvE,6DAAmG;AACnG,uDAAgG;AAEhG,mCAAoF;AACpF,kEAAoE;AACpE,wDAA2D;AAC3D,8FAA8F;AAC9F,kGAAkG;AAClG,oHAA4G;AAC5G,+CAA0H;AAG1H,qDAAgD;AAChD,iFAA0E;AAGnE,IAAM,WAAW,GAAjB,MAAM,WAAW;IAEC;IACA;IACA;IACA;IACA;IACA;IACA;IACsB;IAR3C,YACqB,kBAA6C,EAC7C,2BAAkE,EAClE,6BAAsE,EACtE,cAAqC,EACrC,mCAAwE,EACxE,eAAgC,EAChC,qBAA4C,EACtB,OAA2B;QAPjD,uBAAkB,GAAlB,kBAAkB,CA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AAQ,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QAEnE,IAAI,CAAC,MAAM,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,EAAE,CAAC;YAClC,MAAM,IAAI,qCAA4B,EAAE,CAAC;QAC7C,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,cAAc,EAAE,EAAE,CAAC;YAC7C,MAAM,IAAI,8CAAkC,CAAC,IAAI,yCAAsB,CACnE,yBAAa,CAAC,6BAA6B,EAC3C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,iCAAiC,EAAE,EAAE,IAAI,EAAE,CAAC,CACnE,CAAC,CAAC;QACP,CAAC;QAED,MAAM,IAAI,CAAC,6BAA6B,CAAC,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QAEzE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IACjD,CAAC;CACJ,CAAA;AAtHY,kCAAW;sBAAX,WAAW;IADvB,IAAA,mBAAU,GAAE;IAUJ,WAAA,IAAA,eAAM,EAAC,6BAAY,CAAC,CAAA;qCAPgB,gDAAyB;QAChB,0EAAqC;QACnC,8EAAuC;QACtD,uCAAqB;QACA,8EAAmC;QACvD,+BAAe;QACT,qCAAqB;GARxD,WAAW,CAsHvB"}
|
|
@@ -4,4 +4,8 @@ export declare class ManyTablesTournamentStatusScreenView extends UniversalScree
|
|
|
4
4
|
private readonly tournament;
|
|
5
5
|
constructor(localeService: ILocaleService, lang: string, tournament: ManyTablesTournamentRoom);
|
|
6
6
|
build(): IAppScreen;
|
|
7
|
+
private getPlayersList;
|
|
8
|
+
private getStatusHeader;
|
|
9
|
+
private getStatusIcon;
|
|
10
|
+
private getStatusDescription;
|
|
7
11
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.ManyTablesTournamentStatusScreenView = void 0;
|
|
7
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
4
8
|
const jp_common_models_1 = require("jp.common.models");
|
|
9
|
+
const jp_common_utils_1 = require("jp.common.utils");
|
|
5
10
|
class ManyTablesTournamentStatusScreenView extends jp_common_models_1.UniversalScreenView {
|
|
6
11
|
tournament;
|
|
7
12
|
constructor(localeService, lang, tournament) {
|
|
@@ -9,10 +14,57 @@ class ManyTablesTournamentStatusScreenView extends jp_common_models_1.UniversalS
|
|
|
9
14
|
this.tournament = tournament;
|
|
10
15
|
}
|
|
11
16
|
build() {
|
|
12
|
-
return jp_common_models_1.
|
|
13
|
-
.addAppBar(jp_common_models_1.
|
|
14
|
-
.addSection(
|
|
15
|
-
.addSection(jp_common_models_1.
|
|
17
|
+
return new jp_common_models_1.StandardScreenComponent(jp_common_models_1.AppScreenIdEnum.ROOMS)
|
|
18
|
+
.addAppBar(new jp_common_models_1.StatusAppBarComponent(this.tournament.getTitle(this.lang), new jp_common_models_1.ArrowBackButtonComponent(this.localeService.t('common.button.back', { lang: this.lang }))))
|
|
19
|
+
.addSection(this.getStatusHeader())
|
|
20
|
+
.addSection(new jp_common_models_1.CardListSectionComponent('id1', this.getPlayersList()));
|
|
21
|
+
}
|
|
22
|
+
getPlayersList() {
|
|
23
|
+
if (this.tournament.getRoomMaster().isFinish()) {
|
|
24
|
+
return this.tournament.getWinners().map((item) => (new jp_common_models_1.MiniCardSectionListItemComponent(item.playerId, item.playerName, this.localeService.t('common.tournaments.status.screen.finish.description', {
|
|
25
|
+
lang: this.lang,
|
|
26
|
+
args: {
|
|
27
|
+
RANK: item.rank.toString(),
|
|
28
|
+
PRIZE: (0, jp_common_utils_1.formatChips)(item.profit, this.lang, true),
|
|
29
|
+
}
|
|
30
|
+
}), new jp_common_models_1.UrlImageComponent(item.playerAvatarUrl), true, true, '')));
|
|
31
|
+
}
|
|
32
|
+
return this.tournament.getParticipants().map((item) => (new jp_common_models_1.MiniCardSectionListItemComponent(item.playerId, item.playerName, '', new jp_common_models_1.UrlImageComponent(item.playerAvatarUrl), true, true, '')));
|
|
33
|
+
}
|
|
34
|
+
getStatusHeader() {
|
|
35
|
+
return new jp_common_models_1.StatusHeaderSectionComponent('status', this.getStatusDescription(), new jp_common_models_1.IconImageComponent(this.getStatusIcon()));
|
|
36
|
+
}
|
|
37
|
+
getStatusIcon() {
|
|
38
|
+
if (this.tournament.getRoomMaster().isCancelled()) {
|
|
39
|
+
return jp_common_models_1.AppScreenIconEnum.INFO;
|
|
40
|
+
}
|
|
41
|
+
else if (this.tournament.getRoomMaster().isFinish()) {
|
|
42
|
+
return jp_common_models_1.AppScreenIconEnum.EMOJI_EVENTS;
|
|
43
|
+
}
|
|
44
|
+
else if (this.tournament.getRoomMaster().isWaiting()) {
|
|
45
|
+
return jp_common_models_1.AppScreenIconEnum.HOURGLASS_EMPTY;
|
|
46
|
+
}
|
|
47
|
+
return '';
|
|
48
|
+
}
|
|
49
|
+
getStatusDescription() {
|
|
50
|
+
if (this.tournament.getRoomMaster().isCancelled()) {
|
|
51
|
+
return this.localeService.t('common.tournaments.status.4', { lang: this.lang });
|
|
52
|
+
}
|
|
53
|
+
else if (this.tournament.getRoomMaster().isFinish()) {
|
|
54
|
+
return this.localeService.t('common.tournaments.status.3', { lang: this.lang });
|
|
55
|
+
}
|
|
56
|
+
else if (this.tournament.getRoomMaster().isInProgress()) {
|
|
57
|
+
return this.localeService.t('common.tournaments.status.2', { lang: this.lang });
|
|
58
|
+
}
|
|
59
|
+
else if (this.tournament.getRoomMaster().isWaiting()) {
|
|
60
|
+
return (0, jp_common_utils_1.replacePattern)(this.tournament.getSubtitle(this.lang), {
|
|
61
|
+
DATE: (0, dayjs_1.default)(this.tournament.getScheduleDate()).isToday() ?
|
|
62
|
+
this.localeService.t('common.tournaments.status.today', { lang: this.lang }) :
|
|
63
|
+
(0, jp_common_utils_1.formatDate)(this.tournament.getScheduleDate() ?? ''),
|
|
64
|
+
SCHEDULE_DATE: (0, jp_common_utils_1.formatTime)(this.tournament.getScheduleDate() ?? ''),
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return '';
|
|
16
68
|
}
|
|
17
69
|
}
|
|
18
70
|
exports.ManyTablesTournamentStatusScreenView = ManyTablesTournamentStatusScreenView;
|
package/dist/modules/many-tables-tournament/many-tables-tournament-status-screen.view.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"many-tables-tournament-status-screen.view.js","sourceRoot":"","sources":["../../../src/modules/many-tables-tournament/many-tables-tournament-status-screen.view.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"many-tables-tournament-status-screen.view.js","sourceRoot":"","sources":["../../../src/modules/many-tables-tournament/many-tables-tournament-status-screen.view.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,uDAc0B;AAC1B,qDAAsF;AAGtF,MAAa,oCAAqC,SAAQ,sCAAmB;IACxD,UAAU,CAA2B;IAEtD,YACI,aAA6B,EAC7B,IAAY,EACZ,UAAoC;QAEpC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,KAAK;QACD,OAAO,IAAI,0CAAuB,CAAC,kCAAe,CAAC,KAAK,CAAC;aACpD,SAAS,CACN,IAAI,wCAAqB,CACrB,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EACnC,IAAI,2CAAwB,CACxB,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAClE,CACJ,CACJ;aACA,UAAU,CACP,IAAI,CAAC,eAAe,EAAE,CACzB;aACA,UAAU,CACP,IAAI,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C1D,IAAI,EAAE,IAAA,eAAK,EAAC,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;oBACtD,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,iCAAiC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;oBAC9E,IAAA,4BAAU,EAAC,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,IAAI,EAAE,CAAC;gBACvD,aAAa,EAAE,IAAA,4BAAU,EAAC,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,IAAI,EAAE,CAAC;aACrE,CAAC,CAAC;QACP,CAAC;QAED,OAAO,EAAE,CAAC;IACd,CAAC;CACJ;AAzGD,oFAyGC"}
|
package/dist/modules/many-tables-tournament/many-tables-tournament-tables-list-screen.view.js
CHANGED
|
@@ -9,9 +9,9 @@ class ManyTablesTournamentTablesListScreenView extends jp_common_models_1.Univer
|
|
|
9
9
|
this.tournament = tournament;
|
|
10
10
|
}
|
|
11
11
|
build() {
|
|
12
|
-
return jp_common_models_1.
|
|
13
|
-
.addAppBar(jp_common_models_1.
|
|
14
|
-
.addSection(jp_common_models_1.
|
|
12
|
+
return new jp_common_models_1.StandardScreenComponent(jp_common_models_1.AppScreenIdEnum.ROOMS)
|
|
13
|
+
.addAppBar(new jp_common_models_1.StandardAppBarComponent(this.localeService.t('common.rooms.screen.title', { lang: this.lang }), new jp_common_models_1.ArrowBackButtonComponent(this.localeService.t('common.button.back', { lang: this.lang }))))
|
|
14
|
+
.addSection(new jp_common_models_1.CardListSectionComponent('id1', this.tournament?.getTables().map((table) => new jp_common_models_1.MiniCardSectionListItemComponent(table.getId(), table.getTitle(this.lang), this.localeService.t('common.tournaments.screen.table.title', { lang: this.lang, args: { NUMBER: table.getNumber().toString() } }), new jp_common_models_1.UrlImageComponent(`${table.getPlayers().length}/${table.getTableSize()}`), true, true, jp_common_models_1.AppScreenRouter.getManyTablesTournamentTablePath(table.getId()))) ?? []));
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
exports.ManyTablesTournamentTablesListScreenView = ManyTablesTournamentTablesListScreenView;
|
package/dist/modules/many-tables-tournament/many-tables-tournament-tables-list-screen.view.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"many-tables-tournament-tables-list-screen.view.js","sourceRoot":"","sources":["../../../src/modules/many-tables-tournament/many-tables-tournament-tables-list-screen.view.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"many-tables-tournament-tables-list-screen.view.js","sourceRoot":"","sources":["../../../src/modules/many-tables-tournament/many-tables-tournament-tables-list-screen.view.ts"],"names":[],"mappings":";;;AAAA,uDAY0B;AAG1B,MAAa,wCAAyC,SAAQ,sCAAmB;IAC5D,UAAU,CAA2B;IAEtD,YACI,aAA6B,EAC7B,IAAY,EACZ,UAAoC;QAEpC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,KAAK;QACD,OAAO,IAAI,0CAAuB,CAAC,kCAAe,CAAC,KAAK,CAAC;aACpD,SAAS,CACN,IAAI,0CAAuB,CACvB,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,EACtE,IAAI,2CAAwB,CACxB,IAAI,CAAC,aAAa,CAAC,CAAC,CAChB,oBAAoB,EACpB,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CACtB,CACJ,CACJ,CACJ;aACA,UAAU,CACP,IAAI,2CAAwB,CACxB,KAAK,EACL,IAAI,CAAC,UAAU,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACvC,IAAI,mDAAgC,CAChC,KAAK,CAAC,KAAK,EAAE,EACb,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EACzB,IAAI,CAAC,aAAa,CAAC,CAAC,CAChB,uCAAuC,EACvC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,CACtE,EACD,IAAI,oCAAiB,CAAC,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC,MAAM,IAAI,KAAK,CAAC,YAAY,EAAE,EAAE,CAAC,EAC7E,IAAI,EACJ,IAAI,EACJ,kCAAe,CAAC,gCAAgC,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAClE,CACJ,IAAI,EAAE,CACV,CACJ,CAAC;IACV,CAAC;CACJ;AA7CD,4FA6CC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAppHeaders, IBaseAppScreen, IBaseMoveData,
|
|
1
|
+
import { IAppHeaders, IBaseAppScreen, IBaseMoveData, IAppTableState } from 'jp.common.models';
|
|
2
2
|
import { ManyTablesTournamentService } from './many-tables-tournament.service';
|
|
3
3
|
import { JoinTournamentDto } from '../../dto/common/join-tournament.dto';
|
|
4
4
|
import { ManyTablesTournamentCreateDto } from '../../dto/common/many-tables-tournament-create.dto';
|
|
@@ -7,14 +7,13 @@ export declare class ManyTablesTournamentController {
|
|
|
7
7
|
private readonly tournamentService;
|
|
8
8
|
constructor(tournamentService: ManyTablesTournamentService);
|
|
9
9
|
getStatusScreen(tournamentId: string, headers: IAppHeaders): IBaseAppScreen;
|
|
10
|
-
subscribeOnStatusScreen(tournamentId: string, headers: IAppHeaders):
|
|
11
|
-
unsubscribeFromStatusScreen(tournamentId: string, headers: IAppHeaders):
|
|
10
|
+
subscribeOnStatusScreen(tournamentId: string, headers: IAppHeaders): void;
|
|
11
|
+
unsubscribeFromStatusScreen(tournamentId: string, headers: IAppHeaders): void;
|
|
12
12
|
getTableListScreen(tournamentId: string, headers: IAppHeaders): Promise<IBaseAppScreen>;
|
|
13
|
-
watchTheTable(tableId: string, headers: IAppHeaders):
|
|
14
|
-
moveOnTheTable(tableId: string, baseMoveData: IBaseMoveData, headers: IAppHeaders):
|
|
13
|
+
watchTheTable(tableId: string, headers: IAppHeaders): IAppTableState;
|
|
14
|
+
moveOnTheTable(tableId: string, baseMoveData: IBaseMoveData, headers: IAppHeaders): IAppTableState;
|
|
15
15
|
joinTournament(tournamentId: string, headers: IAppHeaders): JoinTournamentDto;
|
|
16
|
-
leaveTournament(tournamentId: string, headers: IAppHeaders):
|
|
17
|
-
buyTicket(tournamentId: string, headers: IAppHeaders): Promise<void>;
|
|
16
|
+
leaveTournament(tournamentId: string, headers: IAppHeaders): void;
|
|
18
17
|
createTournament(headers: IAppHeaders, createTournamentDto: ManyTablesTournamentCreateDto): Promise<void>;
|
|
19
18
|
updateTournament(tournamentId: string, updateTournamentDto: ManyTablesTournamentUpdateDto, headers: IAppHeaders): Promise<void>;
|
|
20
19
|
removeTournament(tournamentId: string, headers: IAppHeaders): Promise<void>;
|