Enhance group member management: add last name support in GroupMember model, update member display in chat and trip details, and implement pseudo change functionality in chat group.
This commit is contained in:
@@ -956,6 +956,7 @@ class _CreateTripContentState extends State<CreateTripContent> {
|
||||
GroupMember(
|
||||
userId: currentUser.id,
|
||||
firstName: currentUser.prenom,
|
||||
lastName: currentUser.nom,
|
||||
pseudo: currentUser.prenom,
|
||||
role: 'admin',
|
||||
profilePictureUrl: currentUser.profilePictureUrl,
|
||||
@@ -963,6 +964,7 @@ class _CreateTripContentState extends State<CreateTripContent> {
|
||||
...participantsData.map((p) => GroupMember(
|
||||
userId: p['id'] as String,
|
||||
firstName: p['firstName'] as String,
|
||||
lastName: p['lastName'] as String? ?? '',
|
||||
pseudo: p['firstName'] as String,
|
||||
role: 'member',
|
||||
profilePictureUrl: p['profilePictureUrl'] as String?,
|
||||
@@ -1151,11 +1153,13 @@ class _CreateTripContentState extends State<CreateTripContent> {
|
||||
if (userId != null) {
|
||||
final userDoc = await _userService.getUserById(userId);
|
||||
final firstName = userDoc?.prenom ?? 'Utilisateur';
|
||||
final lastName = userDoc?.nom ?? '';
|
||||
final profilePictureUrl = userDoc?.profilePictureUrl;
|
||||
|
||||
participantsData.add({
|
||||
'id': userId,
|
||||
'firstName': firstName,
|
||||
'lastName': lastName,
|
||||
'profilePictureUrl': profilePictureUrl,
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user