Implementate notifiche

This commit is contained in:
2025-09-09 11:43:07 +02:00
parent 54be40518a
commit dfb86e3cd7
36 changed files with 338 additions and 33 deletions

View File

@@ -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

View File

@@ -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(() =>

View File

@@ -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

View File

@@ -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

View File

@@ -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