Gestite schede nella pagina ispezione e migliorie grafiche

This commit is contained in:
2026-02-23 10:12:36 +01:00
parent b39b7ba751
commit efefd3499b
21 changed files with 253 additions and 37 deletions

View File

@@ -21,7 +21,7 @@ public class Scheda : EntityBase<Scheda>
public string? ActivityTypeId { get; set; }
public string? Note { get; set; }
public string? Responsabile { get; set; }
public int Scadenza { get; set; } = 24;
public int Scadenza { get; set; } = 1460;
[NotMapped]
public JtbFasiDto? Reparto

View File

@@ -23,11 +23,15 @@ public abstract class ModalHelper
return await modal.Result;
}
public static async Task<DialogResult?> OpenFormScheda(IDialogService dialog)
public static async Task<DialogResult?> OpenFormScheda(IDialogService dialog, string codMdep, DateOnly data)
{
var modal = await dialog.ShowAsync<ModalFormScheda>(
"ModalFormScheda",
new DialogParameters(),
new DialogParameters<ModalFormScheda>
{
{ x => x.CodMdep, codMdep },
{ x => x.Data, data },
},
new DialogOptions
{
FullScreen = true,

View File

@@ -9,12 +9,15 @@ public interface IIspezioniService
Task<List<Ispezione>> GetAllIspezioniWithSchedeAsync();
Task AddIspezioneAsync(Ispezione ispezione);
Task<Ispezione> GetOrCreateIspezioneAsync(string codMdep, DateOnly data, string rilevatore);
Task<bool> UpdateIspezioneAsync(Ispezione ispezione);
Task<bool> DeleteIspezioneAsync(string codMdep, DateOnly data, string rilevatore);
// SCHEDE
Task AddSchedaAsync(string codMdep, DateOnly data, string rilevatore, Scheda scheda);
Task<List<Scheda>> GetAllSchedeOfIspezioneAsync(string codMdep, DateOnly data, string rilevatore);
Task<Scheda?> GetSchedaAsync(int schedaId);
Task<Scheda?> GetSchedaWithIspezioneAsync(int schedaId);
Task<bool> UpdateSchedaAsync(Scheda scheda);
Task<bool> DeleteSchedaAsync(int schedaId);
Task<int> DeleteAllSchedeOfIspezioneAsync(string codMdep, DateOnly data, string rilevatore);
}

View File

@@ -0,0 +1,5 @@
using CommunityToolkit.Mvvm.Messaging.Messages;
namespace SteUp.Shared.Core.Messages.Scheda;
public class NewSchedaMessage(object? value = null) : ValueChangedMessage<object?>(value);

View File

@@ -0,0 +1,13 @@
using CommunityToolkit.Mvvm.Messaging;
namespace SteUp.Shared.Core.Messages.Scheda;
public class NewSchedaService
{
public event Action? OnNewScheda;
public NewSchedaService(IMessenger messenger)
{
messenger.Register<NewSchedaMessage>(this, (_, _) => { OnNewScheda?.Invoke(); });
}
}