Implementate notifiche
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
@using salesbook.Shared.Core.Dto.PageState
|
||||
@using salesbook.Shared.Core.Entity
|
||||
@using salesbook.Shared.Core.Interface
|
||||
@using salesbook.Shared.Core.Interface.IntegryApi
|
||||
@inject JobSteps JobSteps
|
||||
@inject IManageDataService ManageData
|
||||
@inject IIntegryApiService IntegryApiService
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
@attribute [Authorize]
|
||||
@using salesbook.Shared.Core.Interface
|
||||
@using salesbook.Shared.Components.Layout.Spinner
|
||||
@using salesbook.Shared.Core.Interface.System.Network
|
||||
@using salesbook.Shared.Core.Interface.System.Notification
|
||||
@using salesbook.Shared.Core.Services
|
||||
@inject IFormFactor FormFactor
|
||||
@inject INetworkService NetworkService
|
||||
@inject IFirebaseNotificationService FirebaseNotificationService
|
||||
@inject IShinyNotificationManager NotificationManager
|
||||
@inject PreloadService PreloadService
|
||||
|
||||
<SpinnerLayout FullScreen="true" />
|
||||
@@ -14,6 +17,8 @@
|
||||
{
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await CheckAndRequestPermissions();
|
||||
|
||||
try
|
||||
{
|
||||
await FirebaseNotificationService.InitFirebase();
|
||||
@@ -35,6 +40,14 @@
|
||||
NavigationManager.NavigateTo("/Calendar");
|
||||
}
|
||||
|
||||
private async Task CheckAndRequestPermissions()
|
||||
{
|
||||
await NotificationManager.RequestAccess();
|
||||
|
||||
// if (BatteryOptimizationManagerService.IsBatteryOptimizationEnabled())
|
||||
// BatteryOptimizationManagerService.OpenBatteryOptimizationSettings(_ => { });
|
||||
}
|
||||
|
||||
private Task StartSyncUser()
|
||||
{
|
||||
return Task.Run(() =>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@page "/login"
|
||||
@using salesbook.Shared.Components.Layout.Spinner
|
||||
@using salesbook.Shared.Core.Interface
|
||||
@using salesbook.Shared.Core.Interface.System.Network
|
||||
@using salesbook.Shared.Core.Services
|
||||
@inject IUserAccountService UserAccountService
|
||||
@inject AppAuthenticationStateProvider AuthenticationStateProvider
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
@using salesbook.Shared.Components.Layout
|
||||
@using salesbook.Shared.Core.Authorization.Enum
|
||||
@using salesbook.Shared.Core.Interface
|
||||
@using salesbook.Shared.Core.Interface.System.Network
|
||||
@using salesbook.Shared.Core.Services
|
||||
@inject AppAuthenticationStateProvider AuthenticationStateProvider
|
||||
@inject INetworkService NetworkService
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
@using salesbook.Shared.Core.Dto.Activity
|
||||
@using salesbook.Shared.Core.Dto.JobProgress
|
||||
@using salesbook.Shared.Core.Dto.PageState
|
||||
@using salesbook.Shared.Core.Interface.IntegryApi
|
||||
@implements IAsyncDisposable
|
||||
@inject IManageDataService ManageData
|
||||
@inject IMapper Mapper
|
||||
|
||||
Reference in New Issue
Block a user