Merge pull request #4621 from tsiegleauq/workflow-state-creation

Temp Fix creation of Workflow States
This commit is contained in:
Emanuel Schütze 2019-04-26 16:07:27 +02:00 committed by GitHub
commit 729b7f151b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -95,6 +95,8 @@ export class WorkflowRepositoryService extends BaseRepository<ViewWorkflow, Work
public async addState(stateName: string, viewWorkflow: ViewWorkflow): Promise<void> { public async addState(stateName: string, viewWorkflow: ViewWorkflow): Promise<void> {
const newStatePayload = { const newStatePayload = {
name: stateName, name: stateName,
// TODO: The server requires a string-array of restrictions. Should really not be necessary
restriction: [],
workflow_id: viewWorkflow.id workflow_id: viewWorkflow.id
}; };
await this.httpService.post(this.restStateUrl, newStatePayload); await this.httpService.post(this.restStateUrl, newStatePayload);

View File

@ -49,7 +49,7 @@ interface AmendmentIntoFinal {
} }
/** /**
* Defines the structre of restrictions * Defines the structure of restrictions
*/ */
interface Restriction { interface Restriction {
key: string; key: string;
@ -107,7 +107,7 @@ export class WorkflowDetailComponent extends BaseViewComponent implements OnInit
selector: 'show_recommendation_extension_field', selector: 'show_recommendation_extension_field',
type: 'check' 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: 'Restrictions', selector: 'restriction', type: 'restriction' },
{ name: 'Label color', selector: 'css_class', type: 'color' }, { name: 'Label color', selector: 'css_class', type: 'color' },
{ name: 'Next states', selector: 'next_states_id', type: 'state' } { name: 'Next states', selector: 'next_states_id', type: 'state' }