Add more motion filter options

Adds a motion filter option for motions which have no
amendments and are no amendments
This commit is contained in:
Sean Engelhardt 2019-12-09 14:24:05 +01:00
parent 50ce5e7d61
commit d17ad04b6c
3 changed files with 9 additions and 8 deletions

View File

@ -165,14 +165,13 @@ export class ViewMotion extends BaseViewModelWithAgendaItemAndListOfSpeakers<Mot
/**
* Determine if the motion has parents, is a parent or neither
*/
public get amendmentType(): number {
if (this.hasAmendments) {
return AmendmentType.Parent;
} else if (this.hasParent) {
public get amendmentType(): AmendmentType {
if (this.hasParent) {
return AmendmentType.Amendment;
} else if (this.hasAmendments) {
return AmendmentType.Parent;
} else {
// not any amendment
return 0;
return AmendmentType.Lead;
}
}

View File

@ -55,7 +55,8 @@ export enum ChangeRecoMode {
export enum AmendmentType {
Amendment = 1,
Parent
Parent,
Lead
}
export const verboseChangeRecoMode = {

View File

@ -104,7 +104,8 @@ export class MotionFilterListService extends BaseFilterListService<ViewMotion> {
label: 'Amendment',
options: [
{ condition: AmendmentType.Amendment, label: this.translate.instant('Is amendment') },
{ condition: AmendmentType.Parent, label: this.translate.instant('Has amendments') }
{ condition: AmendmentType.Parent, label: this.translate.instant('Has amendments') },
{ condition: AmendmentType.Lead, label: this.translate.instant('Is no amendment and has no amendments') }
]
};