Skip to content

Commit

Permalink
Merge pull request #219 from pticostaricags/development
Browse files Browse the repository at this point in the history
Improving chat to show name instead of username
  • Loading branch information
efonsecab authored Nov 13, 2024
2 parents 5947c15 + 726a671 commit 6875f04
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,14 @@ public class AspNetUsersModel : IListModel

[StringLength(256)]
public string? UserName { get; set; }
[Required]
[StringLength(50)]
public string? Name { get; set; }

[Required]
[StringLength(50)]
public string? Lastname { get; set; }

public string? FullName => $"{Name} {Lastname}";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ public partial class UserMessageService(
.OrderByDescending(p => p.RowCreationDateTime)
.Select(p => new UserMessageModel()
{
FromApplicationUserFullName = p.FromApplicationUser.UserName,
FromApplicationUserFullName = $"{p.FromApplicationUser.Name} {p.FromApplicationUser.Lastname}",
Message = p.Message,
ReadByDestinatary = p.ReadByDestinatary,
RowCreationDateTime = p.RowCreationDateTime,
ToApplicationUserFullName = p.ToApplicationUser.UserName,
ToApplicationUserFullName = $"{p.ToApplicationUser.Name} {p.ToApplicationUser.Lastname}",
ToApplicationUserId = p.ToApplicationUserId
}).ToArrayAsync(cancellationToken);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
@if (context.Id == this.SelectedUser?.Id)
{
<strong>
@context.UserName
@context.FullName
</strong>
}
else
{
@context.UserName
@context.FullName
}
</FluentButton>
</TemplateColumn>
Expand Down

0 comments on commit 6875f04

Please sign in to comment.