feat(tournament): enhance external participant management with email and address fields

- Added email and address fields to the external participant model, allowing for more comprehensive participant information.
- Updated the tournament service and controller to handle the new fields when adding external participants.
- Modified frontend components to include input fields for email and address, improving user experience and data collection.
- Updated localization strings to support the new fields, ensuring clarity in the user interface.
This commit is contained in:
Torsten Schulz (local)
2026-02-04 11:12:37 +01:00
parent 10e6d74d93
commit 673a3afbb5
8 changed files with 119 additions and 6 deletions

View File

@@ -53,6 +53,40 @@ const ExternalTournamentParticipant = sequelize.define('ExternalTournamentPartic
return decryptData(encryptedValue);
}
},
email: {
type: DataTypes.STRING(500),
allowNull: true,
set(value) {
if (!value) {
this.setDataValue('email', null);
return;
}
const encryptedValue = encryptData(value);
this.setDataValue('email', encryptedValue);
},
get() {
const encryptedValue = this.getDataValue('email');
if (!encryptedValue) return null;
return decryptData(encryptedValue);
}
},
address: {
type: DataTypes.TEXT,
allowNull: true,
set(value) {
if (!value) {
this.setDataValue('address', null);
return;
}
const encryptedValue = encryptData(value);
this.setDataValue('address', encryptedValue);
},
get() {
const encryptedValue = this.getDataValue('address');
if (!encryptedValue) return null;
return decryptData(encryptedValue);
}
},
birthDate: {
type: DataTypes.STRING,
allowNull: true,