Gestita pagina notifiche
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
using AutoMapper;
|
||||
using MudBlazor.Extensions;
|
||||
using salesbook.Shared.Core.Dto;
|
||||
using salesbook.Shared.Core.Dto.Activity;
|
||||
using salesbook.Shared.Core.Dto.Contact;
|
||||
using salesbook.Shared.Core.Entity;
|
||||
using salesbook.Shared.Core.Helpers.Enum;
|
||||
using salesbook.Shared.Core.Interface;
|
||||
using Sentry.Protocol;
|
||||
using System.Linq.Expressions;
|
||||
using salesbook.Shared.Core.Interface.IntegryApi;
|
||||
using salesbook.Shared.Core.Interface.System.Network;
|
||||
using Sentry.Protocol;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace salesbook.Maui.Core.Services;
|
||||
|
||||
@@ -211,6 +212,15 @@ public class ManageDataService(
|
||||
{
|
||||
var dto = mapper.Map<ActivityDTO>(activity);
|
||||
|
||||
if (activity is { AlarmTime: not null, EstimatedTime: not null })
|
||||
{
|
||||
var minuteBefore = activity.EstimatedTime.Value - activity.AlarmTime.Value;
|
||||
dto.MinuteBefore = (int)Math.Abs(minuteBefore.TotalMinutes);
|
||||
|
||||
dto.NotificationDate = dto.MinuteBefore == 0 ?
|
||||
activity.EstimatedTime : activity.AlarmTime;
|
||||
}
|
||||
|
||||
if (activity.CodJcom != null)
|
||||
{
|
||||
dto.Category = ActivityCategoryEnum.Commessa;
|
||||
|
||||
Reference in New Issue
Block a user