feat(tournament): add number of tables feature and update related logic

- Introduced a new field `numberOfTables` in the Tournament model to track the number of tables for tournaments.
- Updated the tournament update logic to include `numberOfTables` when modifying tournament details.
- Added a new endpoint to set the table number for matches, enhancing match management.
- Updated frontend components to support the new `numberOfTables` feature, including input fields and table distribution logic.
- Enhanced internationalization with new translation keys for table-related features.
This commit is contained in:
Torsten Schulz (local)
2026-02-06 15:12:05 +01:00
parent 1191636d92
commit 566361e46a
14 changed files with 352 additions and 3139 deletions

View File

@@ -45,6 +45,12 @@ const Tournament = sequelize.define('Tournament', {
field: 'mini_championship_year',
comment: 'Jahr der Minimeisterschaft; nur gesetzt bei Minimeisterschaften'
},
numberOfTables: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: 'Anzahl der Tische, auf denen gespielt wird'
},
}, {
underscored: true,
tableName: 'tournament',

View File

@@ -63,6 +63,12 @@ const TournamentMatch = sequelize.define('TournamentMatch', {
type: DataTypes.STRING,
allowNull: true,
},
tableNumber: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: 'Tischnummer, an der das Match stattfindet'
},
}, {
underscored: true,
tableName: 'tournament_match',