From 8bd57321a958e91d1339120337f46f6bc843ed1f Mon Sep 17 00:00:00 2001 From: Sean Engelhardt Date: Wed, 24 Apr 2019 15:20:53 +0200 Subject: [PATCH] Temp Fix creation of Workflow States Offers an empty error during the creation of new workflow states --- .../core/repositories/motions/workflow-repository.service.ts | 2 ++ .../components/workflow-detail/workflow-detail.component.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/app/core/repositories/motions/workflow-repository.service.ts b/client/src/app/core/repositories/motions/workflow-repository.service.ts index 5c2a06daa..aa88c1072 100644 --- a/client/src/app/core/repositories/motions/workflow-repository.service.ts +++ b/client/src/app/core/repositories/motions/workflow-repository.service.ts @@ -95,6 +95,8 @@ export class WorkflowRepositoryService extends BaseRepository { const newStatePayload = { name: stateName, + // TODO: The server requires a string-array of restrictions. Should really not be necessary + restriction: [], workflow_id: viewWorkflow.id }; await this.httpService.post(this.restStateUrl, newStatePayload); diff --git a/client/src/app/site/motions/modules/motion-workflow/components/workflow-detail/workflow-detail.component.ts b/client/src/app/site/motions/modules/motion-workflow/components/workflow-detail/workflow-detail.component.ts index f53f3be31..7a8aca5f4 100644 --- a/client/src/app/site/motions/modules/motion-workflow/components/workflow-detail/workflow-detail.component.ts +++ b/client/src/app/site/motions/modules/motion-workflow/components/workflow-detail/workflow-detail.component.ts @@ -49,7 +49,7 @@ interface AmendmentIntoFinal { } /** - * Defines the structre of restrictions + * Defines the structure of restrictions */ interface Restriction { key: string; @@ -107,7 +107,7 @@ export class WorkflowDetailComponent extends BaseViewComponent implements OnInit selector: 'show_recommendation_extension_field', type: 'check' }, - { name: 'Show amendment in parent motoin', selector: 'merge_amendment_into_final', type: 'amendment' }, + { name: 'Show amendment in parent motion', selector: 'merge_amendment_into_final', type: 'amendment' }, { name: 'Restrictions', selector: 'restriction', type: 'restriction' }, { name: 'Label color', selector: 'css_class', type: 'color' }, { name: 'Next states', selector: 'next_states_id', type: 'state' }