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