...
This commit is contained in:
@@ -118,9 +118,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<Icon Name="IconName.ArrowBarUp" Size="IconSize.x5" Style="height=10px;width=10px" />
|
||||
<Icon Name="IconName.ArrowBarUp" Size="IconSize.x5" Style="height=10px;width=10px" />
|
||||
}
|
||||
|
||||
|
||||
@item.LastText
|
||||
</div>
|
||||
</div>
|
||||
@@ -166,9 +166,11 @@
|
||||
|
||||
<!-- Main Chat Section (B) -->
|
||||
<div class="col-md-9 d-flex flex-column" id="B">
|
||||
|
||||
<div class="input-group">
|
||||
@if (ChatCurrent != null)
|
||||
{
|
||||
<small>@ChatCurrent?.ID)</small>
|
||||
<p type="text" class="form-control fw-bold text-primary" style="border:none;align-self: center;" aria-describedby="basic-addon1">@SelectedChatUserName</p>
|
||||
<div class="d-flex gap-2 ms-auto">
|
||||
@if (ChatCurrent.status == Common.Enums.ConversationStatus.InProgress)
|
||||
@@ -373,7 +375,7 @@
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
|
||||
Common.Dtos.CurrentUserInfo CurrentUser { get; set; }
|
||||
List<Read_GroupDto> _Group = new List<Read_GroupDto>();
|
||||
//-------------------------------------
|
||||
@@ -386,7 +388,7 @@
|
||||
/////////////
|
||||
ChatItemDto? ChatCurrent { get; set; } = null;
|
||||
string MsgInput { get; set; }
|
||||
IBrowserFile? SelectedImageFile = null;
|
||||
IBrowserFile? SelectedImageFile = null;
|
||||
byte[]? SelectedImageBytes = null;
|
||||
string? SelectedImagePreview = null;
|
||||
|
||||
@@ -400,7 +402,7 @@
|
||||
private DateTime recordingStartTime;
|
||||
|
||||
bool chatloading = false;
|
||||
string SelectedChatUserName = "مهدی ربیع نژاد";
|
||||
string SelectedChatUserName = "";
|
||||
private bool _shouldObserveVisibility = false;
|
||||
private ConfirmDialog dialog = default!;
|
||||
private Modal modal = default!;
|
||||
@@ -453,7 +455,7 @@
|
||||
//NewChat
|
||||
hubConnection.On<int>("NewChat", async (companyid) =>
|
||||
{
|
||||
if (CurrentUser.CompanyID==companyid)
|
||||
if (CurrentUser.CompanyID==companyid)
|
||||
{ Inbox1Items = await chatService.ChatAwaitingOurResponse(); StateHasChanged(); }
|
||||
});
|
||||
await hubConnection.StartAsync();
|
||||
@@ -555,7 +557,21 @@
|
||||
{
|
||||
|
||||
chatloading = true;
|
||||
SelectedChatUserName = "در حال گفتگو با " + chatItem.UserFullName;
|
||||
|
||||
SelectedChatUserName = "در حال گفتگو با '" + chatItem.UserFullName + "'";
|
||||
|
||||
if (CurrentUser.Role == "Company")
|
||||
{
|
||||
var mo = chatItem.Responses.OrderBy(o => o.ID).Last(l => l.Type != ConversationType.UE);
|
||||
if (mo!=null && mo.Type == Common.Enums.ConversationType.EU)
|
||||
SelectedChatUserName = "گفتگوی '" + mo.ExperName + "' با '" + chatItem.UserFullName+"'";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ChatCurrent = chatItem;
|
||||
|
||||
_shouldObserveVisibility = true; // فعال کن تا در OnAfterRenderAsync صدا زده بشه
|
||||
|
Reference in New Issue
Block a user