31 lines
822 B
Plaintext
31 lines
822 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>
|
|
|
|
<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;
|
|
Helper.SetPageTitle(profile.Job.Name);
|
|
bool result = await Profile.UpdateProfile(profile);
|
|
|
|
if (result == true)
|
|
{
|
|
Navigation.NavigateTo($"/profiles/import/{profile.Id}");
|
|
}
|
|
}
|
|
}
|