16-12-2022
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
@using ECM.JobRunner.Common.JobRunnerReference;
|
||||
@using ECM.JobRunner.Web.Data;
|
||||
@inject NavigationManager Navigation;
|
||||
@inject ImportService Profile;
|
||||
@inject ImportProfileService Profile;
|
||||
|
||||
<PageTitle>Schritt bearbeiten</PageTitle>
|
||||
<PageTitle>Neuen Schritt erstellen</PageTitle>
|
||||
|
||||
<h3>Schritt bearbeiten</h3>
|
||||
<h3>Neuen Schritt erstellen</h3>
|
||||
|
||||
<StepForm ProfileId="ProfileId" StepId="-1" OnValidSubmit="OnFormSubmit" />
|
||||
|
||||
@@ -21,9 +21,12 @@
|
||||
|
||||
private async void OnFormSubmit(EditContext ctx)
|
||||
{
|
||||
ImportProfile profile = await Profile.GetProfile(ProfileId);
|
||||
ImportProfile? profile = await Profile.GetProfile(ProfileId);
|
||||
ImportProfileStep step = (ImportProfileStep)ctx.Model;
|
||||
|
||||
if (profile == null)
|
||||
return;
|
||||
|
||||
// TODO: This is ugly and manual and needs to be abstracted.
|
||||
var steps = profile.Steps.ToList();
|
||||
steps.Add(step);
|
||||
|
||||
Reference in New Issue
Block a user