Files
Hushian/Presentation/HushianWebApp/Components/UserPanel/ConversionHistoryComponent.razor

43 lines
1.5 KiB
Plaintext
Raw Normal View History

2025-07-12 21:33:44 +03:30
@using Common.Dtos.Conversation
2025-07-11 20:37:28 +03:30
<small>پیام های اخیر شما ...</small>
<div class="row">
@foreach (var item in Conversations)
{
<div class="col-sm-3">
<Card>
<CardBody>
2025-07-12 21:33:44 +03:30
<CardText>@GetTitleCon(item.LastText)</CardText>
2025-07-11 20:37:28 +03:30
<Button Color="ButtonColor.Primary" @onclick="async()=>await OnMultipleOfThree.InvokeAsync(item.ID)" Type="ButtonType.Link">Go somewhere</Button>
</CardBody>
<ul class="list-group list-group-flush">
2025-07-12 21:33:44 +03:30
<li class="list-group-item">@item.ExperFullName (@item.LastMsgdate @item.LastMsgtime)</li>
2025-07-11 20:37:28 +03:30
</ul>
2025-07-12 21:33:44 +03:30
@if (item.status == Common.Enums.ConversationStatus.InProgress && item.NoReadCount > 0)
2025-07-11 20:37:28 +03:30
{
<Badge Color="BadgeColor.Danger"
Position="Position.Absolute"
Placement="BadgePlacement.TopLeft"
IndicatorType="BadgeIndicatorType.RoundedPill"
VisuallyHiddenText="unread messages">@item.NoReadCount </Badge>
}
2025-07-26 16:52:59 +03:30
2025-07-11 20:37:28 +03:30
</Card>
</div>
}
</div>
@code {
[Parameter] public EventCallback<int> OnMultipleOfThree { get; set; }
2025-07-12 21:33:44 +03:30
[Parameter] public List<Read_ConversationDto> Conversations { get; set; }
2025-07-11 20:37:28 +03:30
string GetTitleCon(string str)
{
if (str.Length > 15) return str.Substring(0, 15) + "...";
return str;
}
}