nft-faucet/NftFaucetRadzen/Components/CardList/CardListItemConfigurationDialog.razor.cs
2022-09-17 20:41:56 -05:00

26 lines
823 B
C#

using Microsoft.AspNetCore.Components;
using Radzen;
namespace NftFaucetRadzen.Components.CardList;
public partial class CardListItemConfigurationDialog : BasicComponent
{
[Parameter] public Guid CardListItemId { get; set; }
[Parameter] public CardListItem CardListItem { get; set; }
private async Task OnSavePressed()
{
var result = await CardListItem.Configuration.ConfigureAction(CardListItem.Configuration.Objects);
if (result.IsFailure)
{
NotificationService.Notify(NotificationSeverity.Error, "Invalid configuration", result.Error);
return;
}
await CardListItem.Configuration.ConfigureAction(CardListItem.Configuration.Objects);
RefreshMediator.NotifyStateHasChangedSafe();
DialogService.Close((bool?)true);
}
}