16-12-2022

This commit is contained in:
Jonathan Jenne
2022-12-16 15:59:26 +01:00
parent 63edd9e542
commit 45f8dd2aad
32 changed files with 431 additions and 276 deletions

View File

@@ -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);