diff --git a/src/Squidex/Areas/Api/Controllers/Apps/AppWorkflowsController.cs b/src/Squidex/Areas/Api/Controllers/Apps/AppWorkflowsController.cs index abc16700a..22e003e75 100644 --- a/src/Squidex/Areas/Api/Controllers/Apps/AppWorkflowsController.cs +++ b/src/Squidex/Areas/Api/Controllers/Apps/AppWorkflowsController.cs @@ -93,7 +93,7 @@ namespace Squidex.Areas.Api.Controllers.Apps [ApiCosts(1)] public async Task PutWorkflow(string app, Guid id, [FromBody] UpdateWorkflowDto request) { - var command = request.ToCommand(); + var command = request.ToCommand(id); var response = await InvokeCommandAsync(command); diff --git a/src/Squidex/Areas/Api/Controllers/Apps/Models/UpdateWorkflowDto.cs b/src/Squidex/Areas/Api/Controllers/Apps/Models/UpdateWorkflowDto.cs index 4831f5ec0..08e1b4fa1 100644 --- a/src/Squidex/Areas/Api/Controllers/Apps/Models/UpdateWorkflowDto.cs +++ b/src/Squidex/Areas/Api/Controllers/Apps/Models/UpdateWorkflowDto.cs @@ -37,7 +37,7 @@ namespace Squidex.Areas.Api.Controllers.Apps.Models /// public Status Initial { get; set; } - public UpdateWorkflow ToCommand() + public UpdateWorkflow ToCommand(Guid id) { var workflow = new Workflow( Initial, @@ -52,7 +52,7 @@ namespace Squidex.Areas.Api.Controllers.Apps.Models SchemaIds, Name); - return new UpdateWorkflow { Workflow = workflow }; + return new UpdateWorkflow { WorkflowId = id, Workflow = workflow }; } } } diff --git a/src/Squidex/app/features/settings/pages/workflows/workflow.component.html b/src/Squidex/app/features/settings/pages/workflows/workflow.component.html index 671b50f2e..b4d834a63 100644 --- a/src/Squidex/app/features/settings/pages/workflows/workflow.component.html +++ b/src/Squidex/app/features/settings/pages/workflows/workflow.component.html @@ -49,10 +49,15 @@
- +
- + + Restrict this workflow to specific schemas or keep it empty for all schemas. diff --git a/src/Squidex/app/features/settings/pages/workflows/workflow.component.ts b/src/Squidex/app/features/settings/pages/workflows/workflow.component.ts index 84c75d613..976fd86b8 100644 --- a/src/Squidex/app/features/settings/pages/workflows/workflow.component.ts +++ b/src/Squidex/app/features/settings/pages/workflows/workflow.component.ts @@ -90,6 +90,10 @@ export class WorkflowComponent implements OnChanges { this.workflow = this.workflow.rename(name); } + public changeSchemaIds(schemaIds: string[]) { + this.workflow = this.workflow.changeSchemaIds(schemaIds); + } + public setInitial(step: WorkflowStep) { this.workflow = this.workflow.setInitial(step.name); } diff --git a/src/Squidex/app/framework/angular/forms/tag-editor.component.ts b/src/Squidex/app/framework/angular/forms/tag-editor.component.ts index c6c735549..a0f6a4472 100644 --- a/src/Squidex/app/framework/angular/forms/tag-editor.component.ts +++ b/src/Squidex/app/framework/angular/forms/tag-editor.component.ts @@ -246,12 +246,12 @@ export class TagEditorComponent extends StatefulControlComponent i for (let value of obj) { if (Types.is(value, TagValue)) { items.push(value); - } - - const converted = this.converter.convertValue(obj); + } else { + const converted = this.converter.convertValue(value); - if (converted) { - items.push(value); + if (converted) { + items.push(converted); + } } } } @@ -289,11 +289,9 @@ export class TagEditorComponent extends StatefulControlComponent i } public resetSize() { - if (!CACHED_FONT) { - return; - } - - if (!this.inputElement.nativeElement) { + if (!CACHED_FONT || + !this.inputElement || + !this.inputElement.nativeElement) { return; }