Rename salesbook
This commit is contained in:
28
salesbook.Shared/Core/Helpers/ModalHelpers.cs
Normal file
28
salesbook.Shared/Core/Helpers/ModalHelpers.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using MudBlazor;
|
||||
using salesbook.Shared.Components.SingleElements.Modal;
|
||||
using salesbook.Shared.Core.Dto;
|
||||
|
||||
namespace salesbook.Shared.Core.Helpers;
|
||||
|
||||
public class ModalHelpers
|
||||
{
|
||||
public static async Task<DialogResult?> OpenActivityForm(IDialogService dialog, ActivityDTO? activity, string? id)
|
||||
{
|
||||
var modal = await dialog.ShowAsync<ActivityForm>(
|
||||
"Activity form",
|
||||
new DialogParameters<ActivityForm>
|
||||
{
|
||||
{ x => x.Id, id },
|
||||
{ x => x.ActivityCopied, activity }
|
||||
},
|
||||
new DialogOptions
|
||||
{
|
||||
FullScreen = true,
|
||||
CloseButton = false,
|
||||
NoHeader = true
|
||||
}
|
||||
);
|
||||
|
||||
return await modal.Result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user