This commit is contained in:
mmrbnjd
2025-07-12 21:33:44 +03:30
parent d397f70b9a
commit 8a6ff3da67
32 changed files with 320 additions and 403 deletions

View File

@@ -1,4 +1,4 @@
@using Hushian.Application.Dtos
@using Common.Dtos.Conversation
<div style="display: flex; "
dir="rtl" class="p-1 rounded w-100">
@@ -22,6 +22,6 @@
@code {
[Parameter] public List<ConversationDto> Conversations { get; set; }
[Parameter] public List<ConversationItemDto> SelectedConversationItems { get; set; }
[Parameter] public List<Read_ConversationDto> Conversations { get; set; }
[Parameter] public List<Read_ConversationResponseDto> SelectedConversationItems { get; set; }
}

View File

@@ -1,5 +1,5 @@
@inject ConversationService conversationService
@using Hushian.Application.Dtos
@using Common.Dtos.Group
@using HushianWebApp.Service
@if (groups.Where(w => w.Available).Count() > 0)
{
@@ -10,7 +10,7 @@
@code {
[Parameter]
public List<GroupDto> groups { get; set; }
public List<Read_GroupDto> groups { get; set; }
[Parameter] public EventCallback<int> OnMultipleOfThree { get; set; }
[Parameter] public int CompanyID { get; set; }
async Task onClickSelectedGroup(int ID)

View File

@@ -57,7 +57,10 @@
async Task Login()
{
visible = true;
ID= await AuthService.login(Username);
ID= await AuthService.login(new Common.Models.Auth.UserSide.AuthRequestFromUserSide()
{
Mobile=Username
});
visible = false;
}
async Task ver()

View File

@@ -1,5 +1,6 @@
@using Hushian.Application.Dtos
@using Hushian.Application.Dtos.Company
@using Common.Dtos.Company
@using Common.Dtos.Conversation
@using Common.Dtos.Group
@using HushianWebApp.Components.UserPanel
@using HushianWebApp.Service
@using HushianWebApp.Services
@@ -60,7 +61,7 @@
}
</div>
@if (IsLogin && (Conversations.Count == 0 && SelectedConversation == null) || (Conversations.Count > 0 && SelectedConversation != null && SelectedConversation.status == Hushian.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" />
@@ -91,13 +92,13 @@
[Parameter] public int? ConversationID { get; set; }
#endregion
#region Fild
public ConversationDto? SelectedConversation { get; set; } = null;
public List<ConversationDto> Conversations { get; set; } = new();
public List<ConversationItemDto>? SelectedConversationItems { get; set; } = null;
public Read_ConversationDto? SelectedConversation { get; set; } = null;
public List<Read_ConversationDto> Conversations { get; set; } = new();
public List<Read_ConversationResponseDto>? SelectedConversationItems { get; set; } = null;
public RenderFragment GCContent { get; set; }
public RenderFragment ConversationsContent { get; set; }
List<GroupDto> groups = new List<GroupDto>();
public CompanyDto company { get; set; } = new();
List<Read_GroupDto> groups = new List<Read_GroupDto>();
public ReadANDUpdate_CompanyDto company { get; set; } = new();
int CountQueueCompany = 0;
public string CompanyName { get; set; } = "هوشیان";
public bool IsLogin { get; set; } = false;
@@ -167,7 +168,7 @@
}
else
{
CompanyName = _company.Fullname;
CompanyName = _company.FullName;
company = _company;
var _groups = await groupService.GetGroupsCompany(CompanyID);
@@ -220,15 +221,15 @@
Sending = true;
if (SelectedConversation != null)
{
var item = new ADDConversationItemDto()
var item = new ADD_ConversationResponseDto()
{
ConversationID = SelectedConversation.ID,
text = InputMessage
Text = InputMessage
};
}
else
{
var Item = new ADDConversationDto()
var Item = new ADD_ConversationDto()
{
CompanyID = CompanyID,
GroupID = SelectedGroup,