jp.ms.common.modules 1.0.29 → 1.0.30

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.
Files changed (95) hide show
  1. package/dist/exception/error-code.enum.d.ts +4 -0
  2. package/dist/exception/error-code.enum.js +9 -0
  3. package/dist/exception/error-code.enum.js.map +1 -0
  4. package/dist/exception/global-exception-filter.d.ts +5 -0
  5. package/dist/exception/global-exception-filter.js +53 -0
  6. package/dist/exception/global-exception-filter.js.map +1 -0
  7. package/dist/exception/http-exception-wth-snackbar.d.ts +12 -0
  8. package/dist/exception/http-exception-wth-snackbar.js +17 -0
  9. package/dist/exception/http-exception-wth-snackbar.js.map +1 -0
  10. package/dist/exception/index.d.ts +4 -0
  11. package/dist/exception/index.js +12 -0
  12. package/dist/exception/index.js.map +1 -0
  13. package/dist/exception/not-enough-money-for-purchase.exception.d.ts +5 -0
  14. package/dist/exception/not-enough-money-for-purchase.exception.js +12 -0
  15. package/dist/exception/not-enough-money-for-purchase.exception.js.map +1 -0
  16. package/dist/exception/not-found-free-room-for-fast-game.exception.d.ts +5 -0
  17. package/dist/exception/not-found-free-room-for-fast-game.exception.js +12 -0
  18. package/dist/exception/not-found-free-room-for-fast-game.exception.js.map +1 -0
  19. package/dist/index.d.ts +1 -0
  20. package/dist/index.js +1 -0
  21. package/dist/index.js.map +1 -1
  22. package/dist/modules/events/events.gateway.js +1 -1
  23. package/dist/modules/events/events.gateway.js.map +1 -1
  24. package/dist/modules/main/main-tables-list-screen.view.d.ts +11 -1
  25. package/dist/modules/main/main-tables-list-screen.view.js +97 -14
  26. package/dist/modules/main/main-tables-list-screen.view.js.map +1 -1
  27. package/dist/modules/main/main.controller.d.ts +4 -3
  28. package/dist/modules/main/main.controller.js +15 -3
  29. package/dist/modules/main/main.controller.js.map +1 -1
  30. package/dist/modules/main/main.module.js +2 -2
  31. package/dist/modules/main/main.module.js.map +1 -1
  32. package/dist/modules/main/main.service.d.ts +5 -4
  33. package/dist/modules/main/main.service.js +38 -12
  34. package/dist/modules/main/main.service.js.map +1 -1
  35. package/dist/modules/many-tables-tournament/many-tables-tournament-status-screen.view.d.ts +4 -0
  36. package/dist/modules/many-tables-tournament/many-tables-tournament-status-screen.view.js +56 -4
  37. package/dist/modules/many-tables-tournament/many-tables-tournament-status-screen.view.js.map +1 -1
  38. package/dist/modules/many-tables-tournament/many-tables-tournament-tables-list-screen.view.js +3 -3
  39. package/dist/modules/many-tables-tournament/many-tables-tournament-tables-list-screen.view.js.map +1 -1
  40. package/dist/modules/many-tables-tournament/many-tables-tournament.controller.d.ts +3 -4
  41. package/dist/modules/many-tables-tournament/many-tables-tournament.controller.js +5 -17
  42. package/dist/modules/many-tables-tournament/many-tables-tournament.controller.js.map +1 -1
  43. package/dist/modules/many-tables-tournament/many-tables-tournament.service.d.ts +3 -4
  44. package/dist/modules/many-tables-tournament/many-tables-tournament.service.js +20 -27
  45. package/dist/modules/many-tables-tournament/many-tables-tournament.service.js.map +1 -1
  46. package/dist/modules/menu/menu.service.js +1 -2
  47. package/dist/modules/menu/menu.service.js.map +1 -1
  48. package/dist/modules/one-table-tournament/one-table-tournament-status-screen.view.d.ts +1 -0
  49. package/dist/modules/one-table-tournament/one-table-tournament-status-screen.view.js +18 -5
  50. package/dist/modules/one-table-tournament/one-table-tournament-status-screen.view.js.map +1 -1
  51. package/dist/modules/one-table-tournament/one-table-tournament.controller.js.map +1 -1
  52. package/dist/modules/one-table-tournament/one-table-tournament.service.js +1 -2
  53. package/dist/modules/one-table-tournament/one-table-tournament.service.js.map +1 -1
  54. package/dist/modules/simple-rooms-manager/simple-rooms-manager.service.js.map +1 -1
  55. package/dist/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.module.d.ts +3 -1
  56. package/dist/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.module.js +14 -3
  57. package/dist/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.module.js.map +1 -1
  58. package/dist/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.service.d.ts +4 -3
  59. package/dist/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.service.js +49 -25
  60. package/dist/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.service.js.map +1 -1
  61. package/dist/modules/tournament-one-table-rooms-manager/tournament-one-table-rooms-manager.service.js +9 -6
  62. package/dist/modules/tournament-one-table-rooms-manager/tournament-one-table-rooms-manager.service.js.map +1 -1
  63. package/dist/tsconfig.tsbuildinfo +1 -1
  64. package/dist/utils/game-table-result.d.ts +1 -2
  65. package/dist/utils/game-table-result.js +0 -13
  66. package/dist/utils/game-table-result.js.map +1 -1
  67. package/dist/views/tournament-buy-ticket-dialog.view.js +1 -1
  68. package/dist/views/tournament-buy-ticket-dialog.view.js.map +1 -1
  69. package/package.json +4 -4
  70. package/src/exception/error-code.enum.ts +4 -0
  71. package/src/exception/global-exception-filter.ts +50 -0
  72. package/src/exception/http-exception-wth-snackbar.ts +23 -0
  73. package/src/exception/index.ts +4 -0
  74. package/src/exception/not-enough-money-for-purchase.exception.ts +15 -0
  75. package/src/exception/not-found-free-room-for-fast-game.exception.ts +15 -0
  76. package/src/index.ts +1 -0
  77. package/src/modules/events/events.gateway.ts +1 -1
  78. package/src/modules/main/main-tables-list-screen.view.ts +177 -55
  79. package/src/modules/main/main.controller.ts +23 -10
  80. package/src/modules/main/main.module.ts +2 -2
  81. package/src/modules/main/main.service.ts +53 -19
  82. package/src/modules/many-tables-tournament/many-tables-tournament-status-screen.view.ts +97 -31
  83. package/src/modules/many-tables-tournament/many-tables-tournament-tables-list-screen.view.ts +25 -17
  84. package/src/modules/many-tables-tournament/many-tables-tournament.controller.ts +5 -14
  85. package/src/modules/many-tables-tournament/many-tables-tournament.service.ts +45 -57
  86. package/src/modules/menu/menu.service.ts +6 -9
  87. package/src/modules/one-table-tournament/one-table-tournament-status-screen.view.ts +43 -17
  88. package/src/modules/one-table-tournament/one-table-tournament.controller.ts +0 -1
  89. package/src/modules/one-table-tournament/one-table-tournament.service.ts +6 -9
  90. package/src/modules/simple-rooms-manager/simple-rooms-manager.service.ts +0 -2
  91. package/src/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.module.ts +17 -9
  92. package/src/modules/tournament-many-tables-rooms-manager/tournament-many-tables-rooms-manager.service.ts +57 -26
  93. package/src/modules/tournament-one-table-rooms-manager/tournament-one-table-rooms-manager.service.ts +10 -7
  94. package/src/utils/game-table-result.ts +1 -16
  95. package/src/views/tournament-buy-ticket-dialog.view.ts +4 -4
@@ -0,0 +1,4 @@
1
+ export declare enum ErrorCodeEnum {
2
+ NOT_ENOUGH_MONEY_FOR_PURCHASE = "1001",
3
+ NOT_FOUND_FREE_ROOM_FOR_FAST_GAME = "1002"
4
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ErrorCodeEnum = void 0;
4
+ var ErrorCodeEnum;
5
+ (function (ErrorCodeEnum) {
6
+ ErrorCodeEnum["NOT_ENOUGH_MONEY_FOR_PURCHASE"] = "1001";
7
+ ErrorCodeEnum["NOT_FOUND_FREE_ROOM_FOR_FAST_GAME"] = "1002";
8
+ })(ErrorCodeEnum || (exports.ErrorCodeEnum = ErrorCodeEnum = {}));
9
+ //# sourceMappingURL=error-code.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-code.enum.js","sourceRoot":"","sources":["../../src/exception/error-code.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,uDAAsC,CAAA;IACtC,2DAA0C,CAAA;AAC9C,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB"}
@@ -0,0 +1,5 @@
1
+ import { ExceptionFilter, ArgumentsHost } from '@nestjs/common';
2
+ export declare class GlobalExceptionFilter implements ExceptionFilter {
3
+ private readonly logger;
4
+ catch(exception: Error, host: ArgumentsHost): void;
5
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.GlobalExceptionFilter = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const modules_1 = require("../modules");
12
+ const http_exception_wth_snackbar_1 = require("./http-exception-wth-snackbar");
13
+ let GlobalExceptionFilter = class GlobalExceptionFilter {
14
+ logger = new modules_1.JpLoggerService();
15
+ catch(exception, host) {
16
+ this.logger.error(exception);
17
+ const ctx = host.switchToHttp();
18
+ const response = ctx.getResponse();
19
+ if (exception instanceof http_exception_wth_snackbar_1.HttpExceptionWithSnackbar) {
20
+ const data = exception.getResponse();
21
+ const status = exception.getStatus();
22
+ response
23
+ .status(status)
24
+ .json({
25
+ statusCode: status,
26
+ message: exception.message,
27
+ snackbar: data.snackbar,
28
+ });
29
+ return;
30
+ }
31
+ else if (exception instanceof common_1.HttpException) {
32
+ const status = exception.getStatus();
33
+ response
34
+ .status(status)
35
+ .json({
36
+ statusCode: status,
37
+ message: exception.message,
38
+ });
39
+ return;
40
+ }
41
+ response
42
+ .status(common_1.HttpStatus.INTERNAL_SERVER_ERROR)
43
+ .json({
44
+ statusCode: common_1.HttpStatus.INTERNAL_SERVER_ERROR,
45
+ message: exception.message,
46
+ });
47
+ }
48
+ };
49
+ exports.GlobalExceptionFilter = GlobalExceptionFilter;
50
+ exports.GlobalExceptionFilter = GlobalExceptionFilter = __decorate([
51
+ (0, common_1.Catch)(Error)
52
+ ], GlobalExceptionFilter);
53
+ //# sourceMappingURL=global-exception-filter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global-exception-filter.js","sourceRoot":"","sources":["../../src/exception/global-exception-filter.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4G;AAG5G,wCAA6C;AAE7C,+EAAqG;AAG9F,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACf,MAAM,GAAG,IAAI,yBAAe,EAAE,CAAC;IAEhD,KAAK,CAAE,SAAgB,EAAE,IAAmB;QAC1C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC7B,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAChC,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAY,CAAC;QAE7C,IAAI,SAAS,YAAY,uDAAyB,EAAE,CAAC;YACnD,MAAM,IAAI,GAAG,SAAS,CAAC,WAAW,EAA+B,CAAC;YAClE,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC;YAErC,QAAQ;iBACL,MAAM,CAAC,MAAM,CAAC;iBACd,IAAI,CAAC;gBACJ,UAAU,EAAE,MAAM;gBAClB,OAAO,EAAE,SAAS,CAAC,OAAO;gBAC1B,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB,CAAC,CAAC;YAEL,OAAO;QACT,CAAC;aAAM,IAAI,SAAS,YAAY,sBAAa,EAAE,CAAC;YAC9C,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC;YAErC,QAAQ;iBACL,MAAM,CAAC,MAAM,CAAC;iBACd,IAAI,CAAC;gBACJ,UAAU,EAAE,MAAM;gBAClB,OAAO,EAAE,SAAS,CAAC,OAAO;aAC3B,CAAC,CAAC;YAEL,OAAO;QACT,CAAC;QAED,QAAQ;aACL,MAAM,CAAC,mBAAU,CAAC,qBAAqB,CAAC;aACxC,IAAI,CAAC;YACJ,UAAU,EAAE,mBAAU,CAAC,qBAAqB;YAC5C,OAAO,EAAE,SAAS,CAAC,OAAO;SAC3B,CAAC,CAAC;IACP,CAAC;CACF,CAAA;AAzCY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,cAAK,EAAC,KAAK,CAAC;GACA,qBAAqB,CAyCjC"}
@@ -0,0 +1,12 @@
1
+ import { HttpException } from '@nestjs/common';
2
+ import { IAppScreenSnackbar } from 'jp.common.models';
3
+ import { ErrorCodeEnum } from './error-code.enum';
4
+ export interface ErrorResponseWithSnackbar {
5
+ statusCode: number;
6
+ message: string;
7
+ errorCode: string;
8
+ snackbar: IAppScreenSnackbar;
9
+ }
10
+ export declare class HttpExceptionWithSnackbar extends HttpException {
11
+ constructor(message: string, errorCode: ErrorCodeEnum, snackbar: IAppScreenSnackbar);
12
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HttpExceptionWithSnackbar = void 0;
4
+ const common_1 = require("@nestjs/common");
5
+ class HttpExceptionWithSnackbar extends common_1.HttpException {
6
+ constructor(message, errorCode, snackbar) {
7
+ const response = {
8
+ statusCode: common_1.HttpStatus.INTERNAL_SERVER_ERROR,
9
+ message,
10
+ errorCode,
11
+ snackbar,
12
+ };
13
+ super(response, common_1.HttpStatus.INTERNAL_SERVER_ERROR);
14
+ }
15
+ }
16
+ exports.HttpExceptionWithSnackbar = HttpExceptionWithSnackbar;
17
+ //# sourceMappingURL=http-exception-wth-snackbar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-exception-wth-snackbar.js","sourceRoot":"","sources":["../../src/exception/http-exception-wth-snackbar.ts"],"names":[],"mappings":";;;AAAA,2CAA2D;AAY3D,MAAa,yBAA0B,SAAQ,sBAAa;IACxD,YAAY,OAAe,EAAE,SAAwB,EAAE,QAA4B;QAC/E,MAAM,QAAQ,GAA8B;YACxC,UAAU,EAAE,mBAAU,CAAC,qBAAqB;YAC5C,OAAO;YACP,SAAS;YACT,QAAQ;SACX,CAAC;QACF,KAAK,CAAC,QAAQ,EAAE,mBAAU,CAAC,qBAAqB,CAAC,CAAC;IACtD,CAAC;CACJ;AAVD,8DAUC"}
@@ -0,0 +1,4 @@
1
+ export { GlobalExceptionFilter } from './global-exception-filter';
2
+ export { NotEnoughMoneyForPurchaseException } from './not-enough-money-for-purchase.exception';
3
+ export { NotFoundFreeRoomForFastGameException } from './not-found-free-room-for-fast-game.exception';
4
+ export { ErrorCodeEnum } from './error-code.enum';
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ErrorCodeEnum = exports.NotFoundFreeRoomForFastGameException = exports.NotEnoughMoneyForPurchaseException = exports.GlobalExceptionFilter = void 0;
4
+ var global_exception_filter_1 = require("./global-exception-filter");
5
+ Object.defineProperty(exports, "GlobalExceptionFilter", { enumerable: true, get: function () { return global_exception_filter_1.GlobalExceptionFilter; } });
6
+ var not_enough_money_for_purchase_exception_1 = require("./not-enough-money-for-purchase.exception");
7
+ Object.defineProperty(exports, "NotEnoughMoneyForPurchaseException", { enumerable: true, get: function () { return not_enough_money_for_purchase_exception_1.NotEnoughMoneyForPurchaseException; } });
8
+ var not_found_free_room_for_fast_game_exception_1 = require("./not-found-free-room-for-fast-game.exception");
9
+ Object.defineProperty(exports, "NotFoundFreeRoomForFastGameException", { enumerable: true, get: function () { return not_found_free_room_for_fast_game_exception_1.NotFoundFreeRoomForFastGameException; } });
10
+ var error_code_enum_1 = require("./error-code.enum");
11
+ Object.defineProperty(exports, "ErrorCodeEnum", { enumerable: true, get: function () { return error_code_enum_1.ErrorCodeEnum; } });
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exception/index.ts"],"names":[],"mappings":";;;AAAA,qEAAmE;AAA1D,gIAAA,qBAAqB,OAAA;AAC9B,qGAA+F;AAAtF,6JAAA,kCAAkC,OAAA;AAC3C,6GAAqG;AAA5F,mKAAA,oCAAoC,OAAA;AAC7C,qDAAkD;AAAzC,gHAAA,aAAa,OAAA"}
@@ -0,0 +1,5 @@
1
+ import { IAppScreenSnackbar } from 'jp.common.models';
2
+ import { HttpExceptionWithSnackbar } from './http-exception-wth-snackbar';
3
+ export declare class NotEnoughMoneyForPurchaseException extends HttpExceptionWithSnackbar {
4
+ constructor(snackbar: IAppScreenSnackbar);
5
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotEnoughMoneyForPurchaseException = void 0;
4
+ const error_code_enum_1 = require("./error-code.enum");
5
+ const http_exception_wth_snackbar_1 = require("./http-exception-wth-snackbar");
6
+ class NotEnoughMoneyForPurchaseException extends http_exception_wth_snackbar_1.HttpExceptionWithSnackbar {
7
+ constructor(snackbar) {
8
+ super('Not enough money for purchase', error_code_enum_1.ErrorCodeEnum.NOT_ENOUGH_MONEY_FOR_PURCHASE, snackbar);
9
+ }
10
+ }
11
+ exports.NotEnoughMoneyForPurchaseException = NotEnoughMoneyForPurchaseException;
12
+ //# sourceMappingURL=not-enough-money-for-purchase.exception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"not-enough-money-for-purchase.exception.js","sourceRoot":"","sources":["../../src/exception/not-enough-money-for-purchase.exception.ts"],"names":[],"mappings":";;;AAEA,uDAAkD;AAClD,+EAA0E;AAG1E,MAAa,kCAAmC,SAAQ,uDAAyB;IAC7E,YAAY,QAA4B;QACpC,KAAK,CACD,+BAA+B,EAC/B,+BAAa,CAAC,6BAA6B,EAC3C,QAAQ,CACX,CAAC;IACN,CAAC;CACJ;AARD,gFAQC"}
@@ -0,0 +1,5 @@
1
+ import { IAppScreenSnackbar } from 'jp.common.models';
2
+ import { HttpExceptionWithSnackbar } from './http-exception-wth-snackbar';
3
+ export declare class NotFoundFreeRoomForFastGameException extends HttpExceptionWithSnackbar {
4
+ constructor(snackbar: IAppScreenSnackbar);
5
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotFoundFreeRoomForFastGameException = void 0;
4
+ const error_code_enum_1 = require("./error-code.enum");
5
+ const http_exception_wth_snackbar_1 = require("./http-exception-wth-snackbar");
6
+ class NotFoundFreeRoomForFastGameException extends http_exception_wth_snackbar_1.HttpExceptionWithSnackbar {
7
+ constructor(snackbar) {
8
+ super('Not found free room for fast game', error_code_enum_1.ErrorCodeEnum.NOT_FOUND_FREE_ROOM_FOR_FAST_GAME, snackbar);
9
+ }
10
+ }
11
+ exports.NotFoundFreeRoomForFastGameException = NotFoundFreeRoomForFastGameException;
12
+ //# sourceMappingURL=not-found-free-room-for-fast-game.exception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"not-found-free-room-for-fast-game.exception.js","sourceRoot":"","sources":["../../src/exception/not-found-free-room-for-fast-game.exception.ts"],"names":[],"mappings":";;;AAEA,uDAAkD;AAClD,+EAA0E;AAG1E,MAAa,oCAAqC,SAAQ,uDAAyB;IAC/E,YAAY,QAA4B;QACpC,KAAK,CACD,mCAAmC,EACnC,+BAAa,CAAC,iCAAiC,EAC/C,QAAQ,CACX,CAAC;IACN,CAAC;CACJ;AARD,oFAQC"}
package/dist/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './dto';
2
2
  export * from './modules';
3
3
  export * from './config';
4
4
  export * from './adapter';
5
+ export * from './exception';
package/dist/index.js CHANGED
@@ -18,4 +18,5 @@ __exportStar(require("./dto"), exports);
18
18
  __exportStar(require("./modules"), exports);
19
19
  __exportStar(require("./config"), exports);
20
20
  __exportStar(require("./adapter"), exports);
21
+ __exportStar(require("./exception"), exports);
21
22
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,4CAA0B;AAC1B,2CAAyB;AACzB,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,4CAA0B;AAC1B,2CAAyB;AACzB,4CAA0B;AAC1B,8CAA4B"}
@@ -45,7 +45,7 @@ let EventsGateway = class EventsGateway {
45
45
  balance: user.balance,
46
46
  experience: user.experience,
47
47
  level: user.level,
48
- language: user.language,
48
+ language: user.normalizedLang,
49
49
  });
50
50
  this.playersManager.addPlayer(player);
51
51
  player.connections.addConnection(client);
@@ -1 +1 @@
1
- {"version":3,"file":"events.gateway.js","sourceRoot":"","sources":["../../../src/modules/events/events.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAK4B;AAC5B,yCAA2C;AAC3C,iDAAgD;AAChD,2CAAoD;AAEpD,wFAAmF;AAEnF,yDAAoD;AAI7C,IAAM,aAAa,GAAnB,MAAM,aAAa;IAKD;IACA;IACwB;IAL7C,MAAM,CAAS;IAEf,YACqB,cAAqC,EACrC,eAAgC,EACR,OAA6B;QAFrD,mBAAc,GAAd,cAAc,CAAuB;QACrC,oBAAe,GAAf,eAAe,CAAiB;QACR,YAAO,GAAP,OAAO,CAAsB;IAE1E,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAE,MAAc;QAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAA2B,CAAC;QAEnE,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;QACjE,IAAI,MAAM,EAAE,CAAC;YACT,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;YACjE,IAAI,IAAI,EAAE,CAAC;gBACP,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO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C,cAAc;iBAChC,CAAC,CAAC;gBACH,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;gBACtC,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YAC7C,CAAC;QACL,CAAC;IACL,CAAC;IAED,gBAAgB,CAAE,MAAc;QAC5B,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAA2B,CAAC;QACnE,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;QAE1E,IAAI,eAAe,EAAE,CAAC;YAClB,eAAe,CAAC,UAAU,EAAE,CAAC;YAE7B,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE;gBAC3B,CAAC,eAAe,CAAC,aAAa,EAAE;gBAChC,CAAC,eAAe,CAAC,YAAY,EAAE;gBAC/B,CAAC,eAAe,CAAC,iBAAiB,EAAE,EACtC,CAAC;gBACC,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;YACrD,CAAC;QACL,CAAC;IACL,CAAC;CACJ,CAAA;AAnDY,sCAAa;AAEtB;IADC,IAAA,4BAAe,GAAE;8BACV,kBAAM;6CAAC;wBAFN,aAAa;IADzB,IAAA,6BAAgB,EAAC,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC;IAQnC,WAAA,IAAA,eAAM,EAAC,iCAAc,CAAC,CAAA;qCAFU,+CAAqB;QACpB,+BAAe;GAN5C,aAAa,CAmDzB"}
@@ -4,6 +4,16 @@ export declare class MainTablesListScreenView extends UniversalScreenView {
4
4
  private readonly simpleRooms;
5
5
  private readonly oneTableTournamentRooms;
6
6
  private readonly manyTablesTournamentRooms;
7
- constructor(localeService: ILocaleService, lang: string, simpleRooms: Array<SimpleRoom>, oneTableTournamentRooms: Array<OneTableTournamentRoom>, manyTablesTournamentRooms: Array<ManyTablesTournamentRoom>);
7
+ private readonly playerId;
8
+ constructor(localeService: ILocaleService, lang: string, simpleRooms: Array<SimpleRoom>, oneTableTournamentRooms: Array<OneTableTournamentRoom>, manyTablesTournamentRooms: Array<ManyTablesTournamentRoom>, playerId: string);
8
9
  build(): IAppScreen;
10
+ private getSimpleRoomsTableCardList;
11
+ private getOneTableTournamentsCardList;
12
+ private getOneTableTournamentSubtitle;
13
+ private getOneTableTournamentIcon;
14
+ private getManyTablesTournamentsCardList;
15
+ private getManyTablesTournamentsCardListItem;
16
+ private getManyTablesTournamentIcon;
17
+ private getManyTablesTournamentSubtitle;
18
+ private getManyTablesTournamenButtons;
9
19
  }
@@ -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
- constructor(localeService, lang, simpleRooms, oneTableTournamentRooms, manyTablesTournamentRooms) {
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
- const oneTableTournamentsCardList = this.oneTableTournamentRooms.map((room) => jp_common_models_1.AppScreenSectionListItem.CreateCardListItemMini(room.getId(), room.getTitle(this.lang), room.getSubtitle(this.lang), jp_common_models_1.AppScreenSectionImage.CreateIconImage(jp_common_models_1.AppScreenIconEnum.EMOJI_EVENTS), true, jp_common_models_1.router.getOneTableTournamentStatusPath(room.getId())));
19
- const manyTablesTournamentsCardList = this.manyTablesTournamentRooms.map((room) => jp_common_models_1.AppScreenSectionListItem.CreateCardListItemExtended(room.getId(), room.getTitle(this.lang), room.getSubtitle(this.lang), jp_common_models_1.AppScreenSectionImage.CreateIconImage(jp_common_models_1.AppScreenIconEnum.EMOJI_EVENTS), true, true, jp_common_models_1.AppScreenSectionImage.CreateIconImage(jp_common_models_1.AppScreenIconEnum.EMOJI_EVENTS), room.getDescription(this.lang), jp_common_models_1.AppScreenSectionButtons.CreatePrimaryButtonSection(jp_common_models_1.AppScreenSectionButton.CreateTextButton('button'))));
20
- const simpleRoomsTableCardList = this.simpleRooms.reduce((result, room) => {
21
- const list = room.getTables().map((table) => jp_common_models_1.AppScreenSectionListItem.CreateCardListItemMini(table.getId(), table.getTitleWithNumber(this.lang), (0, jp_common_utils_1.replacePattern)(table.getSubtitle(this.lang), {
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.AppScreenSectionImage.CreateUrlImage(`${table.getPlayers().length}/${table.getTableSize()}`), true, jp_common_models_1.router.getRoomPath(table.getId())));
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
- return jp_common_models_1.AppScreen.CreateStandardScreen(jp_common_models_1.AppScreenIdEnum.ROOMS)
28
- .addAppBar(jp_common_models_1.AppScreenAppBar.CreateStandardAppBar(this.localeService.t('common.rooms.screen.title', { lang: this.lang }), jp_common_models_1.AppScreenSectionButton.CreateArrowBackButton(this.localeService.t('common.button.back', { lang: this.lang }))))
29
- .addSection(jp_common_models_1.AppScreenSection.CreateCardListSection('id1', [
30
- ...manyTablesTournamentsCardList,
31
- ...oneTableTournamentsCardList,
32
- ...simpleRoomsTableCardList
33
- ]))
34
- .addDialog(new views_1.TournamentBuyTicketDialogView(this.localeService, this.lang).build());
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":";;;AAAA,uDAc0B;AAM1B,qDAAiD;AAEjD,uCAA4D;AAE5D,MAAa,wBAAyB,SAAQ,sCAAmB;IAC5C,WAAW,CAAoB;IAC/B,uBAAuB,CAAgC;IACvD,yBAAyB,CAAkC;IAE5E,YACI,aAA6B,EAC7B,IAAY,EACZ,WAA8B,EAC9B,uBAAsD,EACtD,yBAA0D;QAE1D,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;QACvD,IAAI,CAAC,yBAAyB,GAAG,yBAAyB,CAAC;IAC/D,CAAC;IAED,KAAK;QACD,MAAM,2BAA2B,GAAG,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAC1E,2CAAwB,CAAC,sBAAsB,CAC3C,IAAI,CAAC,KAAK,EAAE,EACZ,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EACxB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAC3B,wCAAqB,CAAC,eAAe,CAAC,oCAAiB,CAAC,YAAY,CAAC,EACrE,IAAI,EACJ,yBAAM,CAAC,+BAA+B,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CACvD,CAAC,CAAC;QAEP,MAAM,6BAA6B,GAAG,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAC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,GAAG,IAAI,CAAC,CAAC;QAChC,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,4BAAS,CAAC,oBAAoB,CAAC,kCAAe,CAAC,KAAK,CAAC;aACvD,SAAS,CACN,kCAAe,CAAC,oBAAoB,CAChC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,EACtE,yCAAsB,CAAC,qBAAqB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAChH,CACJ;aACA,UAAU,CACP,mCAAgB,CAAC,qBAAqB,CAClC,KAAK,EACL;YACI,GAAG,6BAA6B;YAChC,GAAG,2BAA2B;YAC9B,GAAG,wBAAwB;SAC9B,CACJ,CACJ;aACA,SAAS,CACN,IAAI,qCAA6B,CAC7B,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,IAAI,CACZ,CAAC,KAAK,EAAE,CACZ,CAAA;IACT,CAAC;CACJ;AAlFD,4DAkFC"}
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,uCAA4D;AAE5D,MAAa,wBAAyB,SAAQ,sCAAmB;IAC5C,WAAW,CAAoB;IAC/B,uBAAuB,CAAgC;IACvD,yBAAyB,CAAkC;IAC3D,QAAQ,CAAS;IAElC,YACI,aAA6B,EAC7B,IAAY,EACZ,WAA8B,EAC9B,uBAAsD,EACtD,yBAA0D,EAC1D,QAAgB;QAEhB,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;QACvD,IA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EAAE,CAAC;IACd,CAAC;IAEO,6BAA6B,CAAE,UAAoC;QACvE,IAAI,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC1C,OAAO,IAAI,gDAA6B,CACpC,IAAI,sCAAmB,CACnB,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,kDAAkD,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAChG,CAAC,KAAK,CAAC,uCAAoB,CAAC,8CAA8C,CAAC,CAC/E,CAAC;QACN,CAAC;QAED,OAAO,IAAI,8CAA2B,CAClC,IAAI,sCAAmB,CACnB,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,6CAA6C,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAC3F,CAAC,KAAK,CAAC,uCAAoB,CAAC,oDAAoD,CAAC,EAClF,IAAI,sCAAmB,CACnB,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,kDAAkD,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAChG,CAAC,KAAK,CAAC,uCAAoB,CAAC,8CAA8C,CAAC,CAC/E,CAAC;IACN,CAAC;CACJ;AAnMD,4DAmMC"}
@@ -1,12 +1,13 @@
1
- import { IAppHeaders, IBaseAppScreen } from 'jp.common.models';
2
- import { PlayerCheckStateDto, 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): IBaseAppScreen;
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", Object)
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,2CAA0D;AAG1D,mCAAkE;AAElE,iDAA6C;AAGtC,IAAM,cAAc,GAApB,MAAM,cAAc;IAEF;IADrB,YACqB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;IACzC,CAAC;IAGL,UAAU,CAAY,OAAoB;QACtC,OAAO,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7F,CAAC;IAGD,SAAS,CAAY,OAAoB;QACrC,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAC/D,CAAC;IAGD,uBAAuB,CAAY,OAAoB;QACnD,OAAO,IAAI,CAAC,WAAW,CAAC,uBAAuB,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAC7E,CAAC;IAGD,2BAA2B,CAAY,OAAoB;QACvD,OAAO,IAAI,CAAC,WAAW,CAAC,2BAA2B,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IACjF,CAAC;IAGD,aAAa,CAAY,OAAoB;QACzC,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACrE,CAAC;CACJ,CAAA;AA7BY,wCAAc;AAMvB;IADC,IAAA,YAAG,EAAC,oBAAoB,CAAC;IACd,WAAA,IAAA,gBAAO,GAAE,CAAA;;;;gDAEpB;AAGD;IADC,IAAA,YAAG,EAAC,QAAQ,CAAC;IACH,WAAA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AAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC9F,CAAC;IAID,SAAS,CACkB,YAAoB,EAChC,OAAoB;QAE/B,OAAO,IAAI,CAAC,WAAW,CAAC,8BAA8B,CAClD,OAAO,CAAC,iBAAiB,EACzB,OAAO,CAAC,eAAe,EACvB,YAAY,CACf,CAAC;IACN,CAAC;CACJ,CAAA;AA1CY,wCAAc;AAMvB;IADC,IAAA,YAAG,EAAC,oBAAoB,CAAC;IACb,WAAA,IAAA,gBAAO,GAAE,CAAA;;;;gDAErB;AAGD;IADC,IAAA,YAAG,EAAC,QAAQ,CAAC;IACF,WAAA,IAAA,gBAAO,GAAE,CAAA;;;oCAAwB,sBAAgB;+CAE5D;AAGD;IADC,IAAA,YAAG,EAAC,kBAAkB,CAAC;IACE,WAAA,IAAA,gBAAO,GAAE,CAAA;;;;6DAElC;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,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12,14 @@ export declare class MainService {
12
12
  private readonly manyTablesRoomsManagerService;
13
13
  private readonly playersManager;
14
14
  private readonly eventsBusMainTablesSubscribeService;
15
- private readonly userRepository;
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, userRepository: UsersRepository, activityLogRepository: ActivityLogRepository, options: MainFactoryOptions);
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
  }