...
This commit is contained in:
@@ -4,9 +4,13 @@
|
||||
@using Common.Dtos.Group
|
||||
@using HushianWebApp.Service
|
||||
@using HushianWebApp.Services
|
||||
@inject ChatService ChatService
|
||||
@inject ILocalStorageService localStorageService;
|
||||
@inject AuthService authService;
|
||||
@inject BaseController baseController;
|
||||
@inject CompanyService companyService
|
||||
@inject UserService userService
|
||||
@inject GroupService groupService
|
||||
@layout UserPanelLayout
|
||||
<div class="container-fluid">
|
||||
<div class="row" style="height:85vh">
|
||||
@@ -117,7 +121,7 @@
|
||||
@code {
|
||||
[Parameter] public int CompanyID { get; set; }
|
||||
|
||||
ReadANDUpdate_CompanyDto CompanyInfo = new();
|
||||
ReadANDUpdate_CompanyDto? CompanyInfo = new();
|
||||
Common.Dtos.CurrentUserInfo CurrentUser = new();
|
||||
List<Read_GroupDto> CompanyGroups = new();
|
||||
ChatItemDto? LastOpenChat = new();
|
||||
@@ -129,6 +133,7 @@
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CompanyInfo == null) return string.Empty;
|
||||
string value = $"{CompanyInfo.FullName}";
|
||||
if (LastOpenChat != null)
|
||||
{
|
||||
@@ -187,18 +192,20 @@
|
||||
async Task Afterlogin()
|
||||
{
|
||||
IsLogin = true;
|
||||
CurrentUser = new();
|
||||
CurrentUser =await userService.GetCurrentUserInfo();
|
||||
await IsCompany();
|
||||
}
|
||||
async Task IsCompany()
|
||||
{
|
||||
CompanyInfo = new();
|
||||
CompanyGroups = new();
|
||||
CompanyInfo = await companyService.GetCompany(CompanyID);
|
||||
if (CompanyInfo!=null)
|
||||
CompanyGroups = await groupService.GetGroupsCompany(CompanyID);
|
||||
await IsLastChat();
|
||||
}
|
||||
async Task IsLastChat()
|
||||
{
|
||||
LastOpenChat = null;
|
||||
if (CompanyInfo != null)
|
||||
LastOpenChat =await ChatService.GetLastChatInCompany(CompanyID);
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user