diff --git a/Hushian.Application/Services/ChatService.cs b/Hushian.Application/Services/ChatService.cs index cf15524..6349b82 100644 --- a/Hushian.Application/Services/ChatService.cs +++ b/Hushian.Application/Services/ChatService.cs @@ -281,7 +281,7 @@ namespace Hushian.Application.Services await _ConversationRepository.UPDATE(convModel); } if (dto.Type != ConversationType.UE) - await WriteInHubFromCompany(Response.Value, "U"+convModel.UserID); + await WriteInHubFromCompany(Response.Value, convModel.UserID.ToString()); else { var modelA = convModel.ConversationResponses.OrderBy(o => o.ID) @@ -292,7 +292,7 @@ namespace Hushian.Application.Services if (modelA.Type == ConversationType.EU) user = modelA.ExperID.Value.ToString(); - else if (modelA.Type == ConversationType.CU) user = "C"+modelA.conversation.CompanyID; + else if (modelA.Type == ConversationType.CU) user = modelA.conversation.CompanyID.ToString(); await WriteInHubFromUser(Response.Value, user); @@ -390,9 +390,9 @@ namespace Hushian.Application.Services string user = ""; if (item.Type == ConversationType.EU) user = item.ExperID.Value.ToString(); - else if (item.Type == ConversationType.CU) user = "C" + item.conversation.CompanyID; + else if (item.Type == ConversationType.CU) user = item.conversation.CompanyID.ToString(); - else if (item.Type == ConversationType.UE) user = "U"+ item.conversation.UserID; + else if (item.Type == ConversationType.UE) user = item.conversation.UserID.ToString(); await CheckMarkAsReadInHub(item.ID, user); diff --git a/Hushian.Application/Services/ExMethod.cs b/Hushian.Application/Services/ExMethod.cs index 656e081..00dfee9 100644 --- a/Hushian.Application/Services/ExMethod.cs +++ b/Hushian.Application/Services/ExMethod.cs @@ -28,9 +28,10 @@ namespace Hushian.Application.Services var claims = new[] { new Claim(JwtRegisteredClaimNames.Sub, - Role=="User" ? "U"+userId.ToString() - :Role=="Company" ? "C"+userId.ToString() - :userId.ToString()), + //Role=="User" ? "U"+userId.ToString() + //:Role=="Company" ? "C"+userId.ToString() + //: + userId.ToString()), new Claim(ClaimTypes.NameIdentifier, UserName), new Claim(CustomClaimTypes.Uid,userId.ToString()), new Claim(ClaimTypes.Role, Role) diff --git a/Presentation/HushianWebApp/Layout/MainLayout.razor b/Presentation/HushianWebApp/Layout/MainLayout.razor index 683489b..a9553b5 100644 --- a/Presentation/HushianWebApp/Layout/MainLayout.razor +++ b/Presentation/HushianWebApp/Layout/MainLayout.razor @@ -10,6 +10,7 @@ @inject AuthService authService; @inject BaseController baseController; @inject UserService userService; +@inject IJSRuntime JS
@@ -53,11 +54,11 @@
- لینک گفتگو کاربر با شما + لینک گفتگو کاربر با شما - لینک گفتگو کاربر با دستیار هوش مصنوعی + لینک گفتگو کاربر با دستیار هوش مصنوعی @@ -188,7 +189,10 @@ else if (menu == "page5") NavigationManager.NavigateTo("/Settings"); } - + private async Task route(string route) + { + await JS.InvokeVoidAsync("openSmallWindow", $"/{route}"); + } async Task CheckOnline() { var token = await localStorageService.GetItem("C/key"); @@ -268,4 +272,9 @@ } private void ToggleSidebar() => sidebar.ToggleSidebar(); -} \ No newline at end of file +} + \ No newline at end of file diff --git a/Presentation/HushianWebApp/Pages/Chat.razor b/Presentation/HushianWebApp/Pages/Chat.razor index c93f0bf..5a80618 100644 --- a/Presentation/HushianWebApp/Pages/Chat.razor +++ b/Presentation/HushianWebApp/Pages/Chat.razor @@ -361,7 +361,7 @@ @code { - + Common.Dtos.CurrentUserInfo CurrentUser { get; set; } List _Group = new List(); //------------------------------------- @@ -1865,6 +1865,8 @@ }