...
This commit is contained in:
@@ -42,7 +42,7 @@ namespace Hushian.Application.Services
|
||||
=> await _ConversationRepository.Get()
|
||||
.Include(inc => inc.Group)
|
||||
.Include(inc => inc.ConversationResponses).ThenInclude(tinc => tinc.Exper)
|
||||
.Where(w => w.ConversationResponses.Any(a => a.ExperID == ExperID) && w.Status == status)
|
||||
.Where(w => w.ConversationResponses.OrderBy(o => o.ID).Last().ExperID == ExperID && w.Status == status)
|
||||
.Select(s => new ChatItemDto()
|
||||
{
|
||||
ID = s.ID,
|
||||
@@ -119,6 +119,7 @@ namespace Hushian.Application.Services
|
||||
.Include(inc => inc.Group)
|
||||
.Include(inc => inc.ConversationResponses).ThenInclude(tinc => tinc.Exper)
|
||||
.Where(w => w.Status == ConversationStatus.Recorded && w.CompanyID == CompanyID);
|
||||
|
||||
if (groupallow != null) request = request.Where(w => !w.GroupID.HasValue || groupallow.Contains(w.GroupID.Value));
|
||||
return await request.Select(s => new ChatItemDto()
|
||||
{
|
||||
@@ -275,7 +276,7 @@ namespace Hushian.Application.Services
|
||||
};
|
||||
Response.Success = statuschangedb.ID > 0;
|
||||
|
||||
if (convModel.Status == ConversationStatus.Recorded && Response.Success)
|
||||
if (dto.Type != ConversationType.UE && convModel.Status == ConversationStatus.Recorded && Response.Success)
|
||||
{
|
||||
convModel.Status = ConversationStatus.InProgress;
|
||||
await _ConversationRepository.UPDATE(convModel);
|
||||
|
@@ -72,7 +72,7 @@ namespace Hushian.Application.Services
|
||||
{
|
||||
return await _ExperRepository.Get().Where(w => w.ID == ExperID).Select(s => new CurrentUserInfo
|
||||
{
|
||||
CompanyID = CompanyID,
|
||||
CompanyID = s.CompanyID,
|
||||
ExperID = ExperID,
|
||||
Username = s.UserName,
|
||||
Role = "Exper"
|
||||
|
@@ -106,11 +106,23 @@
|
||||
</div>
|
||||
}
|
||||
<div class="item-time">
|
||||
<small class="time-text">@item.LastMsgdate</small>
|
||||
<small class="time-text">@item.LastMsgtime</small>
|
||||
<small class="time-text">@item.LastMsgdate @item.LastMsgtime</small>
|
||||
@* <small class="time-text"></small> *@
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-message">@item.LastText</div>
|
||||
|
||||
<div class="item-message">
|
||||
@if (item.LastMsgType == ConversationType.UE)
|
||||
{
|
||||
<Icon Name="IconName.ArrowBarDown" Size="IconSize.x5" Style="height=10px;width=10px" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<Icon Name="IconName.ArrowBarUp" Size="IconSize.x5" Style="height=10px;width=10px" />
|
||||
}
|
||||
|
||||
@item.LastText
|
||||
</div>
|
||||
</div>
|
||||
@if (item.Responses.Count(c => !c.IsRead && c.Type == ConversationType.UE) > 0)
|
||||
{
|
||||
|
@@ -41,12 +41,7 @@
|
||||
<div class="d-flex gap-2 ms-auto">
|
||||
@if (LastOpenChat != null)
|
||||
{
|
||||
@if (LastOpenChat.status == Common.Enums.ConversationStatus.InProgress)
|
||||
{
|
||||
<Button Color="ButtonColor.Danger" Size=ButtonSize.ExtraSmall Outline="true" @onclick="CloseChat" Class="finish-conversation-btn">
|
||||
<Icon Name="IconName.Escape" Class="me-1" /> اتمام گفتگو
|
||||
</Button>
|
||||
}
|
||||
|
||||
<Button Color="ButtonColor.Success" Size=ButtonSize.ExtraSmall Outline="true" @onclick="NewChat" Class="new-conversation-btn">
|
||||
<Icon Name="IconName.ChatDots" Class="me-1" /> گفتگو جدید
|
||||
</Button>
|
||||
@@ -175,7 +170,7 @@
|
||||
<Button Color="ButtonColor.Secondary" Size=ButtonSize.Small Outline="true" @onclick="OpenFileDialog" Class="attach-btn" title="افزودن تصویر">
|
||||
<Icon Name="IconName.Image" />
|
||||
</Button>
|
||||
|
||||
|
||||
<!-- Audio Recording Button -->
|
||||
<Button Color="@(IsRecording ? ButtonColor.Danger : ButtonColor.Secondary)"
|
||||
Size=ButtonSize.Small
|
||||
@@ -234,7 +229,15 @@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
@if (LastOpenChat!=null && LastOpenChat.status == Common.Enums.ConversationStatus.InProgress)
|
||||
{
|
||||
<Button Color="ButtonColor.Danger" Size=ButtonSize.ExtraSmall Outline="true" @onclick="CloseChat" Class="finish-conversation-btn">
|
||||
<Icon Name="IconName.Escape" Class="me-1" /> اتمام گفتگو
|
||||
</Button>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user