@mtgame/core 0.1.72 → 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',