Skip to content

Commit

Permalink
(#433) wasm: update user card in teh search
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintAngeLs committed Oct 13, 2024
1 parent 3ddc9f2 commit 35550ac
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions MiniSpace.Web/src/Astravent.Web.Wasm/DTO/StudentDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class StudentDto
public List<string> Interests { get; set; }
public IEnumerable<EducationDto> Education { get; set; }
public IEnumerable<WorkDto> Work { get; set; }
public WorkDto LastWorkExperience => Work?.OrderByDescending(w => w.StartDate).FirstOrDefault();
public bool IsTwoFactorEnabled { get; set; }
public string TwoFactorSecret { get; set; }
public IEnumerable<Guid> InterestedInEvents { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
.friend-card {
display: flex;
background-color: #ffffff;
background-color: var(--mud-palette-background-gray);
margin-bottom: 1rem !important;
border: 1px solid #ddd;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,23 @@
@foreach (var student in students)
{
<MudItem xs="12">
<MudPaper Class="p-3 mb-2" Elevation="2" Style="border-radius: 10px; background-color: #f7f9fa; cursor: pointer;" @onclick="() => ViewDetails(student.Id)">
<MudPaper Class="p-3 mb-2" Elevation="2" Style="border-radius: 10px; cursor: pointer;" @onclick="() => ViewDetails(student.Id)">
<MudGrid>
<MudItem xs="2" Class="d-flex justify-content-center align-items-center">
<MudAvatar Image="@GetProfileImageUrl(student.ProfileImageUrl)" Alt="Student Image" Size="Size.Large" Class="border border-primary" />
</MudItem>
<MudItem xs="10">
<MudText Typo="Typo.h6" Class="mb-0" Style="font-weight: bold;">@($"{student.FirstName} {student.LastName}")</MudText>
@if (student.LastWorkExperience != null)
{
<MudText Typo="Typo.subtitle2">
@($"{student.LastWorkExperience.Position} in {student.LastWorkExperience.Company}")
</MudText>
}
else
{
<MudText Typo="Typo.subtitle2"> </MudText>
}
<MudButtonGroup>
@if (student.Id != IdentityService.GetCurrentUserId() && !(sentRequests?.Any(r => r.InviteeId == student.Id) ?? false) && !(allFriends?.Any(f => f.FriendId == student.Id) ?? false))
{
Expand Down Expand Up @@ -134,7 +144,7 @@
.friend-card {
display: flex;
background-color: #ffffff;
background-color: var(--mud-palette-background-gray);
margin-bottom: 1rem !important;
border: 1px solid #ddd;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
Expand Down

0 comments on commit 35550ac

Please sign in to comment.