Evaluate default amendment workflow in list
Evaluates the default amendment workflow in the amendment list so users can se the filters accordingly
This commit is contained in:
parent
04477d9ebd
commit
51512fd589
@ -120,4 +120,11 @@ export class AmendmentFilterListService extends MotionFilterListService {
|
|||||||
return [this.motionFilterOptions].concat(super.getFilterDefinitions());
|
return [this.motionFilterOptions].concat(super.getFilterDefinitions());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Override the parents 'isWorkflowEnabled', only consider the enabledWorkflows.amendment
|
||||||
|
*/
|
||||||
|
protected isWorkflowEnabled(workflowId: number): boolean {
|
||||||
|
return workflowId === this.enabledWorkflows.amendment;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ export class MotionFilterListService extends BaseFilterListService<ViewMotion> {
|
|||||||
/**
|
/**
|
||||||
* Listen to the configuration for change in defined/used workflows
|
* Listen to the configuration for change in defined/used workflows
|
||||||
*/
|
*/
|
||||||
private enabledWorkflows = { statuteEnabled: false, statute: null, motion: null };
|
protected enabledWorkflows = { statuteEnabled: false, statute: null, motion: null, amendment: null };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine to show amendments in the motion list
|
* Determine to show amendments in the motion list
|
||||||
@ -216,6 +216,10 @@ export class MotionFilterListService extends BaseFilterListService<ViewMotion> {
|
|||||||
this.enabledWorkflows.motion = +id;
|
this.enabledWorkflows.motion = +id;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.config.get<string>('motions_amendments_workflow').subscribe(id => {
|
||||||
|
this.enabledWorkflows.amendment = +id;
|
||||||
|
});
|
||||||
|
|
||||||
this.config.get<boolean>('motions_statutes_enabled').subscribe(bool => {
|
this.config.get<boolean>('motions_statutes_enabled').subscribe(bool => {
|
||||||
this.enabledWorkflows.statuteEnabled = bool;
|
this.enabledWorkflows.statuteEnabled = bool;
|
||||||
});
|
});
|
||||||
@ -343,7 +347,7 @@ export class MotionFilterListService extends BaseFilterListService<ViewMotion> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private isWorkflowEnabled(workflowId: number): boolean {
|
protected isWorkflowEnabled(workflowId: number): boolean {
|
||||||
return (
|
return (
|
||||||
workflowId === this.enabledWorkflows.motion ||
|
workflowId === this.enabledWorkflows.motion ||
|
||||||
(this.enabledWorkflows.statuteEnabled && workflowId === this.enabledWorkflows.statute)
|
(this.enabledWorkflows.statuteEnabled && workflowId === this.enabledWorkflows.statute)
|
||||||
|
Loading…
Reference in New Issue
Block a user