Files
ECMJobRunner/ECM.JobRunner.Web/Pages/ImportProfile/EditProfile.razor
Jonathan Jenne 45f8dd2aad 16-12-2022
2022-12-16 15:59:26 +01:00

32 lines
800 B
Plaintext

@page "/profiles/import/{profileId:int}/edit"
@using ECM.JobRunner.Common.JobRunnerReference;
@using ECM.JobRunner.Web.Data;
@using ECM.JobRunner.Web.Pages.ImportStep;
@inject NavigationManager Navigation;
@inject ImportProfileService Profile;
<PageTitle>Job bearbeiten</PageTitle>
<h3>Job bearbeiten</h3>
<ProfileForm ProfileId="ProfileId" OnValidSubmit="OnFormSubmit" />
@code {
[Parameter]
public int ProfileId { get; set; }
[Parameter]
public int StepId { get; set; }
private async void OnFormSubmit(EditContext ctx)
{
ImportProfile profile = (ImportProfile)ctx.Model;
bool result = await Profile.UpdateProfile(profile);
if (result == true)
{
Navigation.NavigateTo($"/profiles/import/{profile.Id}");
}
}
}