Implementato controllo conessione dispositivo e servizi. Completata pagination commesse e attività per cliente

This commit is contained in:
2025-09-08 10:24:50 +02:00
parent 014e2ffc41
commit 82d268d9f8
23 changed files with 530 additions and 139 deletions

View File

@@ -250,8 +250,8 @@
private List<PtbPros> Pros { get; set; } = [];
private List<ActivityFileDto>? ActivityFileList { get; set; }
private bool IsNew => Id.IsNullOrEmpty();
private bool IsView => !NetworkService.IsNetworkAvailable();
private bool IsNew { get; set; }
private bool IsView => !NetworkService.ConnectionAvailable;
private string? LabelSave { get; set; }
@@ -276,18 +276,18 @@
{
Snackbar.Configuration.PositionClass = Defaults.Classes.Position.TopCenter;
_ = LoadData();
LabelSave = IsNew ? "Aggiungi" : null;
if (!Id.IsNullOrEmpty())
ActivityModel = (await ManageData.GetActivity(new WhereCondActivity { ActivityId = Id }, true)).Last();
if (ActivityCopied != null)
{
ActivityModel = ActivityCopied.Clone();
}
else if (!Id.IsNullOrEmpty())
ActivityModel = (await ManageData.GetActivity(new WhereCondActivity { ActivityId = Id }, true)).Last();
if (Id.IsNullOrEmpty()) Id = ActivityModel.ActivityId;
IsNew = Id.IsNullOrEmpty();
LabelSave = IsNew ? "Aggiungi" : null;
_ = LoadData();
await LoadCommesse();
if (IsNew)

View File

@@ -280,7 +280,7 @@
}
else
{
@if (NetworkService.IsNetworkAvailable() && !ContactModel.IsContact)
@if (NetworkService.ConnectionAvailable && !ContactModel.IsContact)
{
<MudButton Class="button-settings blue-icon"
FullWidth="true"
@@ -332,7 +332,7 @@
private List<StbUser> Users { get; set; } = [];
private bool IsNew => OriginalModel is null;
private bool IsView => !NetworkService.IsNetworkAvailable();
private bool IsView => !NetworkService.ConnectionAvailable;
private string? LabelSave { get; set; }

View File

@@ -118,7 +118,7 @@
private PersRifDTO PersRifModel { get; set; } = new();
private bool IsNew => OriginalModel is null;
private bool IsView => !NetworkService.IsNetworkAvailable();
private bool IsView => !NetworkService.ConnectionAvailable;
private string? LabelSave { get; set; }