Compare commits
No commits in common. "714b3768205a04c69209db756dfae992bb2cb8e5" and "70faba18553c76210343d193a431849daa689061" have entirely different histories.
714b376820
...
70faba1855
|
|
@ -28,18 +28,5 @@ namespace TIAMMobileApp.Services
|
||||||
}
|
}
|
||||||
public Guid DriverPersmissionId { get; set; } = Guid.Empty;
|
public Guid DriverPersmissionId { get; set; } = Guid.Empty;
|
||||||
|
|
||||||
public async Task ClearAll()
|
|
||||||
{
|
|
||||||
SessionId = "";
|
|
||||||
User = null;
|
|
||||||
IPAddress = null;
|
|
||||||
IsAuthenticated = false;
|
|
||||||
HasCompany = false;
|
|
||||||
IsDriver = false;
|
|
||||||
IsDevAdmin = false;
|
|
||||||
IsSysAdmin = false;
|
|
||||||
DriverPersmissionId = Guid.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,8 @@
|
||||||
UserDataService.Logout(userBasicDetail.RefreshToken);
|
UserDataService.Logout(userBasicDetail.RefreshToken);
|
||||||
AuthStateProvider.GetAuthenticationStateAsync();
|
AuthStateProvider.GetAuthenticationStateAsync();
|
||||||
SecureStorageHandler.ClearAllSecureStorageAsync();
|
SecureStorageHandler.ClearAllSecureStorageAsync();
|
||||||
sessionService.ClearAll().Forget();
|
sessionService.User = null;
|
||||||
|
sessionService.IsAuthenticated = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CultureInfo Culture
|
CultureInfo Culture
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,8 @@ namespace TIAMSharedUI.Shared.Components
|
||||||
await SecureStorageHandler.ClearAllSecureStorageAsync();
|
await SecureStorageHandler.ClearAllSecureStorageAsync();
|
||||||
var result = await AuthStateProvider.GetAuthenticationStateAsync();
|
var result = await AuthStateProvider.GetAuthenticationStateAsync();
|
||||||
|
|
||||||
await sessionService.ClearAll();
|
sessionService.User = null;
|
||||||
|
sessionService.IsAuthenticated = false;
|
||||||
navigationManager.NavigateTo("/");
|
navigationManager.NavigateTo("/");
|
||||||
myUser = false;
|
myUser = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,60 +11,12 @@
|
||||||
@inject AuthenticationStateProvider AuthStateProvider
|
@inject AuthenticationStateProvider AuthStateProvider
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
||||||
@inject IJSRuntime jsRuntime
|
|
||||||
|
|
||||||
|
|
||||||
<div class="w-100" style="height:40px; position:fixed; z-index: 10000;">
|
<div class="w-100" style="height:40px; position:fixed; z-index: 10000;">
|
||||||
<DxMenu CssClass="my-menu" SizeMode="SizeMode.Medium" Title="Tour I Am" ItemsPosition="ItemPosition.End" CollapseItemsToHamburgerMenu="true"
|
<DxMenu Title="Tour I Am" ItemsPosition="ItemPosition.End" CollapseItemsToHamburgerMenu="true"
|
||||||
Orientation="Orientation"
|
Orientation="Orientation"
|
||||||
DisplayMode="DisplayMode"
|
DisplayMode="DisplayMode">
|
||||||
HamburgerButtonPosition="MenuHamburgerButtonPosition.Right">
|
|
||||||
<TitleTemplate>
|
|
||||||
@{
|
|
||||||
if (_isMobile)
|
|
||||||
{
|
|
||||||
string url1 = $"user/sysadmin";
|
|
||||||
string url2 = $"driver/transfers/{driverPermissionId}";
|
|
||||||
string url3 = $"user/messages/{userId}";
|
|
||||||
<DxToolbar SizeMode="SizeMode.Medium">
|
|
||||||
<Items>
|
|
||||||
@*<DxToolbarItem Name="Item1" Text="Item1" Tooltip="Item1" />
|
|
||||||
<DxToolbarItem Name="Item2" Text="Item2" Tooltip="Item2" />
|
|
||||||
<DxToolbarItem Name="Left" BeginGroup="true" IconCssClass="tb-icon tb-icon-align-left"
|
|
||||||
Tooltip="Align Left" />
|
|
||||||
<DxToolbarItem Name="Center" IconCssClass="tb-icon tb-icon-align-center"
|
|
||||||
Tooltip="Align Center" />*@
|
|
||||||
@if (IsSysAdmin)
|
|
||||||
{
|
|
||||||
<DxToolbarItem Name="Transfers"
|
|
||||||
BeginGroup="true"
|
|
||||||
IconCssClass="fa-solid fa-face-smile"
|
|
||||||
Tooltip="Transfers"
|
|
||||||
Alignment="ToolbarItemAlignment.Right"
|
|
||||||
Click="() => NavigationManager.NavigateTo(url1)" />
|
|
||||||
|
|
||||||
}
|
|
||||||
@if (IsDriver)
|
|
||||||
{
|
|
||||||
<DxToolbarItem Name="Transfers"
|
|
||||||
BeginGroup="true"
|
|
||||||
IconCssClass="fa-solid fa-taxi"
|
|
||||||
Tooltip="My tasks"
|
|
||||||
Alignment="ToolbarItemAlignment.Right"
|
|
||||||
Click="() => NavigationManager.NavigateTo(url2)" />
|
|
||||||
|
|
||||||
}
|
|
||||||
<DxToolbarItem Name="Messages"
|
|
||||||
BeginGroup="true"
|
|
||||||
IconCssClass="fa-solid fa-envelope"
|
|
||||||
Tooltip="Messages"
|
|
||||||
Alignment="ToolbarItemAlignment.Right"
|
|
||||||
Click="() => NavigationManager.NavigateTo(url3)" />
|
|
||||||
</Items>
|
|
||||||
</DxToolbar>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</TitleTemplate>
|
|
||||||
<Items>
|
<Items>
|
||||||
<DxMenuItem NavigateUrl="/" Text="Home" IconCssClass="menu-icon-home menu-icon" />
|
<DxMenuItem NavigateUrl="/" Text="Home" IconCssClass="menu-icon-home menu-icon" />
|
||||||
@{
|
@{
|
||||||
|
|
@ -178,8 +130,6 @@
|
||||||
|
|
||||||
private ILogger _logger;
|
private ILogger _logger;
|
||||||
|
|
||||||
private bool _isMobile;
|
|
||||||
|
|
||||||
MenuDisplayMode DisplayMode { get; set; } = MenuDisplayMode.Auto;
|
MenuDisplayMode DisplayMode { get; set; } = MenuDisplayMode.Auto;
|
||||||
Orientation Orientation { get; set; } = Orientation.Horizontal;
|
Orientation Orientation { get; set; } = Orientation.Horizontal;
|
||||||
|
|
||||||
|
|
@ -189,9 +139,8 @@
|
||||||
NavigationManager.NavigateTo(url);
|
NavigationManager.NavigateTo(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override void OnInitialized()
|
||||||
{
|
{
|
||||||
_isMobile = await jsRuntime.InvokeAsync<bool>("isDevice");
|
|
||||||
_logger = new LoggerClient<AdminNavMenu>(LogWriters.ToArray());
|
_logger = new LoggerClient<AdminNavMenu>(LogWriters.ToArray());
|
||||||
//_logger.Debug($"UserId: {SessionService.User.UserModelDto.Id}"); //errorokat dobott
|
//_logger.Debug($"UserId: {SessionService.User.UserModelDto.Id}"); //errorokat dobott
|
||||||
IsDevAdmin = SessionService.IsDevAdmin;
|
IsDevAdmin = SessionService.IsDevAdmin;
|
||||||
|
|
@ -215,7 +164,7 @@
|
||||||
userFullName = SessionService.User.UserModelDto.ProfileDto.FullName;
|
userFullName = SessionService.User.UserModelDto.ProfileDto.FullName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await base.OnInitializedAsync();
|
base.OnInitialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ToggleNavMenu()
|
private void ToggleNavMenu()
|
||||||
|
|
@ -240,7 +189,8 @@
|
||||||
await SecureStorageHandler.ClearAllSecureStorageAsync();
|
await SecureStorageHandler.ClearAllSecureStorageAsync();
|
||||||
var result = await AuthStateProvider.GetAuthenticationStateAsync();
|
var result = await AuthStateProvider.GetAuthenticationStateAsync();
|
||||||
|
|
||||||
await SessionService.ClearAll();
|
SessionService.User = null;
|
||||||
|
SessionService.IsAuthenticated = false;
|
||||||
NavigationManager.NavigateTo("/");
|
NavigationManager.NavigateTo("/");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -415,13 +415,9 @@ select:focus-visible {
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-menu {
|
|
||||||
|
|
||||||
}
|
|
||||||
.my-menu.dxbl-menu-horizontal > .dxbl-menu-nav .dxbl-menu-nav-bar.dxbl-menu-hamburger-btn-pos-right > .dxbl-menu-title {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
/*forms*/
|
/*forms*/
|
||||||
|
|
||||||
|
|
||||||
/* Reseting */
|
/* Reseting */
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
||||||
|
|
@ -30,18 +30,5 @@ namespace TIAMWebApp.Client.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
public Guid DriverPersmissionId { get; set; } = Guid.Empty;
|
public Guid DriverPersmissionId { get; set; } = Guid.Empty;
|
||||||
|
|
||||||
public async Task ClearAll()
|
|
||||||
{
|
|
||||||
SessionId = "";
|
|
||||||
User = null;
|
|
||||||
IPAddress = null;
|
|
||||||
IsAuthenticated = false;
|
|
||||||
HasCompany = false;
|
|
||||||
IsDriver = false;
|
|
||||||
IsDevAdmin = false;
|
|
||||||
IsSysAdmin = false;
|
|
||||||
DriverPersmissionId = Guid.Empty;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,5 @@ namespace TIAMWebApp.Shared.Application.Interfaces
|
||||||
public bool IsSysAdmin { get; set; }
|
public bool IsSysAdmin { get; set; }
|
||||||
public List<Product> GetHotels();
|
public List<Product> GetHotels();
|
||||||
public Guid DriverPersmissionId { get; set; }
|
public Guid DriverPersmissionId { get; set; }
|
||||||
public Task ClearAll();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue