Temp Fix creation of Workflow States

Offers an empty error during the creation of new workflow states
This commit is contained in:
Sean Engelhardt 2019-04-24 15:20:53 +02:00
parent d4ac7441fa
commit 8bd57321a9
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' }