...
This commit is contained in:
@@ -26,7 +26,10 @@
|
||||
VisuallyHiddenText="status"></Badge>
|
||||
<small>پاسخگویی سوالات شما هستیم</small>
|
||||
</span>
|
||||
<button class="btn-close btn-close-white" @onclick="CloseChat"></button>
|
||||
@if (ConversationID.HasValue)
|
||||
{
|
||||
<button class="btn-close btn-close-white" @onclick="CloseChat"></button>
|
||||
}
|
||||
</div>
|
||||
<div class="card-body" style="max-height: 500px; overflow-y: auto; background-color: #f9f9f9;">
|
||||
|
||||
@@ -61,7 +64,7 @@
|
||||
}
|
||||
|
||||
</div>
|
||||
@if (IsLogin && (Conversations.Count == 0 && SelectedConversation == null) || (Conversations.Count > 0 && SelectedConversation != null && SelectedConversation.status == Common.Enums.ConversationStatus.InProgress))
|
||||
@if (IsLogin && (@* Conversations.Count == 0 && *@ SelectedConversation == null) || (@* Conversations.Count > 0 && *@ SelectedConversation != null && SelectedConversation.status == Common.Enums.ConversationStatus.InProgress))
|
||||
{
|
||||
<div class="card-header text-white d-flex justify-content-between align-items-center">
|
||||
<input type="text" class="form-control" @bind-value="InputMessage" placeholder="پیام خود را بنویسید..." style="margin-left:10px" />
|
||||
@@ -111,8 +114,8 @@
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
if (ConversationID.HasValue && ConversationID > 0 && Conversations.Count > 0)
|
||||
await SelectedConv(ConversationID.Value);
|
||||
// if (ConversationID.HasValue && ConversationID > 0 && Conversations.Count > 0)
|
||||
// await SelectedConv(ConversationID.Value);
|
||||
|
||||
await base.OnParametersSetAsync();
|
||||
}
|
||||
@@ -189,8 +192,10 @@
|
||||
Conversations = await conversationService.MyConversationUserSide(CompanyID);
|
||||
if (Conversations.Count > 0)
|
||||
ConversationsContent =@<ConversionHistoryComponent Conversations="Conversations"
|
||||
OnMultipleOfThree="EventCallback.Factory.Create<int>(this, SelectedConv)" />
|
||||
;
|
||||
OnMultipleOfThree="EventCallback.Factory.Create<int>(this, SelectedConv)" />;
|
||||
|
||||
if (ConversationID.HasValue && ConversationID > 0 && Conversations.Count > 0)
|
||||
await SelectedConv(ConversationID.Value);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -204,6 +209,7 @@
|
||||
SelectedConversation = Conversations.FirstOrDefault(f => f.ID == ID);
|
||||
SelectedConversationItems = await conversationService.GetConversationItems(ID);
|
||||
SelectedGroup = SelectedConversation.GroupID;
|
||||
ConversationID = ID;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
@@ -211,6 +217,11 @@
|
||||
private void CloseChat()
|
||||
{
|
||||
// میتوان اینجا حالت مخفیسازی کامپوننت را تنظیم کرد
|
||||
SelectedConversation = null;
|
||||
SelectedConversationItems = null;
|
||||
SelectedGroup = null;
|
||||
ConversationID = null;
|
||||
StateHasChanged();
|
||||
}
|
||||
private void GoBack()
|
||||
{
|
||||
@@ -218,6 +229,12 @@
|
||||
}
|
||||
async Task OnClickSendMssage()
|
||||
{
|
||||
// SelectedConversationItems.Add(new Read_ConversationResponseDto()
|
||||
// {
|
||||
// ConversationID=1,
|
||||
|
||||
// });
|
||||
// return;
|
||||
Sending = true;
|
||||
if (SelectedConversation != null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user