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:
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user