Merge pull request #5084 from GabrielInTheWorld/filterAgenda
Adds filtering by collection as a new filter for the agenda
This commit is contained in:
commit
8335662e9b
@ -43,5 +43,14 @@ export class ViewItem extends BaseViewModelWithContentObject<Item, BaseViewModel
|
|||||||
const type = ItemVisibilityChoices.find(choice => choice.key === this.type);
|
const type = ItemVisibilityChoices.find(choice => choice.key === this.type);
|
||||||
return type ? type.csvName : '';
|
return type ? type.csvName : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the collection of the underlying content-object.
|
||||||
|
*
|
||||||
|
* @returns The collection as string.
|
||||||
|
*/
|
||||||
|
public get collection(): string {
|
||||||
|
return this.contentObjectData.collection;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
export interface ViewItem extends Item {}
|
export interface ViewItem extends Item {}
|
||||||
|
@ -47,6 +47,16 @@ export class AgendaFilterListService extends BaseFilterListService<ViewItem> {
|
|||||||
{ label: this.translate.instant('Open items'), condition: false },
|
{ label: this.translate.instant('Open items'), condition: false },
|
||||||
{ label: this.translate.instant('Closed items'), condition: true }
|
{ label: this.translate.instant('Closed items'), condition: true }
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Type',
|
||||||
|
property: 'collection',
|
||||||
|
options: [
|
||||||
|
{ label: this.translate.instant('Motions'), condition: 'motions/motion' },
|
||||||
|
{ label: this.translate.instant('Topics'), condition: 'topics/topic' },
|
||||||
|
{ label: this.translate.instant('Motion blocks'), condition: 'motions/motion-block' },
|
||||||
|
{ label: this.translate.instant('Elections'), condition: 'assignments/assignment' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user