GetExpersCompany
GetGroupsCompany
This commit is contained in:
@@ -76,7 +76,7 @@
|
||||
public string Username { get; set; }
|
||||
public string Fullname { get; set; }
|
||||
public byte[]? img { get; set; }
|
||||
public List<string> Roles { get; set; } = new();
|
||||
public string Role { get; set; }
|
||||
bool isonline = false;
|
||||
bool isAuthorizedCompanyUser = false;
|
||||
public string TitleRole { get; set; } = "";
|
||||
@@ -93,9 +93,9 @@
|
||||
}
|
||||
|
||||
|
||||
TitleRole = Roles.Any(a => a == "Company") ? "مدیر" : "کارشناس";
|
||||
TitleRole = Role == "Company" ? "مدیر" : "کارشناس";
|
||||
|
||||
isAuthorizedCompanyUser = Roles.Contains("Company") || (Roles.Contains("Exper") && await userService.CheckAvailableExperInCompany());
|
||||
isAuthorizedCompanyUser = Role=="Company" || Role=="Exper" && await userService.CheckAvailableExperInCompany();
|
||||
|
||||
string route = NavigationManager.Uri.Replace(NavigationManager.BaseUri, "").ToLower();
|
||||
if (route.Length > 0)
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
async Task CheckOnline()
|
||||
{
|
||||
var token = await localStorageService.GetItem<string>("key");
|
||||
var token = await localStorageService.GetItem<string>("C/key");
|
||||
if (string.IsNullOrEmpty(token))
|
||||
{
|
||||
isonline = false;
|
||||
@@ -188,8 +188,8 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
Roles = await localStorageService.GetItem<List<string>>("Role");
|
||||
if (Roles.Count == 1 && Roles.Contains("HushianUserCompany"))
|
||||
Role = await localStorageService.GetItem<string>("C/Role");
|
||||
if (Role=="User")
|
||||
{
|
||||
isonline = false;
|
||||
NavigationManager.NavigateTo("/NotFound");
|
||||
|
Reference in New Issue
Block a user