Gestito aggiornamento elenco contatti in caso di aggiunta o modifica del prospect / cliente
This commit is contained in:
17
salesbook.Shared/Core/Messages/Contact/NewContactService.cs
Normal file
17
salesbook.Shared/Core/Messages/Contact/NewContactService.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using salesbook.Shared.Core.Dto;
|
||||
|
||||
namespace salesbook.Shared.Core.Messages.Contact;
|
||||
|
||||
public class NewContactService
|
||||
{
|
||||
public event Action<CRMCreateContactResponseDTO>? OnContactCreated;
|
||||
|
||||
public NewContactService(IMessenger messenger)
|
||||
{
|
||||
messenger.Register<NewContactMessage>(this, (_, o) =>
|
||||
{
|
||||
OnContactCreated?.Invoke(o.Value);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user