@mtgame/core 0.1.71 → 0.1.73

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.
@@ -1545,6 +1545,32 @@
1545
1545
  function TournamentSettings() {
1546
1546
  return _super !== null && _super.apply(this, arguments) || this;
1547
1547
  }
1548
+ Object.defineProperty(TournamentSettings.prototype, "genderTitle", {
1549
+ get: function () {
1550
+ var yearDiff = new Date().getFullYear() - this.birthYearTo;
1551
+ if (this.gender === exports.TournamentGender.male) {
1552
+ if (yearDiff < 15) {
1553
+ return 'Мальчики';
1554
+ }
1555
+ if (yearDiff < 21) {
1556
+ return 'Юноши';
1557
+ }
1558
+ return 'Мужчины';
1559
+ }
1560
+ if (this.gender === exports.TournamentGender.female) {
1561
+ if (yearDiff < 15) {
1562
+ return 'Девочки';
1563
+ }
1564
+ if (yearDiff < 21) {
1565
+ return 'Девушки';
1566
+ }
1567
+ return 'Женщины';
1568
+ }
1569
+ return 'Смешанный';
1570
+ },
1571
+ enumerable: false,
1572
+ configurable: true
1573
+ });
1548
1574
  TournamentSettings.toFront = function (data) { };
1549
1575
  TournamentSettings.toBack = function (data) { };
1550
1576
  return TournamentSettings;
@@ -1560,8 +1586,8 @@
1560
1586
  mappingFields: {
1561
1587
  id: 'id',
1562
1588
  gender: 'gender',
1563
- age_from: 'ageFrom',
1564
- age_to: 'ageTo',
1589
+ birth_year_from: 'birthYearFrom',
1590
+ birth_year_to: 'birthYearTo',
1565
1591
  max_team_players: 'maxTeamPlayers',
1566
1592
  max_game_players: 'maxGamePlayers',
1567
1593
  type: 'type',
@@ -4469,6 +4495,20 @@
4469
4495
  enumerable: false,
4470
4496
  configurable: true
4471
4497
  });
4498
+ Object.defineProperty(FootballStatistic.prototype, "penalties", {
4499
+ get: function () {
4500
+ return (this.penaltyGoals || 0) + (this.penaltyAttempts || 0);
4501
+ },
4502
+ enumerable: false,
4503
+ configurable: true
4504
+ });
4505
+ Object.defineProperty(FootballStatistic.prototype, "smallPenalties", {
4506
+ get: function () {
4507
+ return (this.smallPenaltyGoals || 0) + (this.smallPenaltyAttempts || 0);
4508
+ },
4509
+ enumerable: false,
4510
+ configurable: true
4511
+ });
4472
4512
  Object.defineProperty(FootballStatistic.prototype, "tournamentTeamPoints", {
4473
4513
  get: function () {
4474
4514
  return this.tournamentTeam && this.tournamentTeam.points;