Gestite schede nella pagina ispezione e migliorie grafiche
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
5
SteUp.Shared/Core/Messages/Scheda/NewSchedaMessage.cs
Normal file
5
SteUp.Shared/Core/Messages/Scheda/NewSchedaMessage.cs
Normal 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);
|
||||
13
SteUp.Shared/Core/Messages/Scheda/NewSchedaService.cs
Normal file
13
SteUp.Shared/Core/Messages/Scheda/NewSchedaService.cs
Normal 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(); });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user