feat(ParticipantController, ParticipantModel, ParticipantRoutes, DiaryParticipantsPanel, i18n): implement participant status management and UI updates
- Added functionality to update participant attendance status, allowing for 'excused' and 'cancelled' states. - Enhanced the participant model to include a default attendance status and validation for status values. - Updated participant routes to support status updates and integrated new status handling in the participant controller. - Modified the DiaryParticipantsPanel to visually indicate participant status and added a toggle for changing status. - Expanded localization files to include new keys for participant status, improving accessibility for users in both English and German.
This commit is contained in:
@@ -28,6 +28,14 @@ const Participant = sequelize.define('Participant', {
|
||||
key: 'id'
|
||||
}
|
||||
},
|
||||
attendanceStatus: {
|
||||
type: DataTypes.STRING(32),
|
||||
allowNull: false,
|
||||
defaultValue: 'present',
|
||||
validate: {
|
||||
isIn: [['present', 'excused', 'cancelled']]
|
||||
}
|
||||
},
|
||||
groupId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
|
||||
Reference in New Issue
Block a user