diff --git a/client/src/app/site/motions/models/view-motion.ts b/client/src/app/site/motions/models/view-motion.ts index 665da9e9a..f5a75fa5f 100644 --- a/client/src/app/site/motions/models/view-motion.ts +++ b/client/src/app/site/motions/models/view-motion.ts @@ -40,6 +40,11 @@ export enum ChangeRecoMode { ModifiedFinal = 'modified_final_version' } +export enum AmendmentType { + Amendment = 1, + Parent +} + export const verboseChangeRecoMode = { original: 'Original version', changed: 'Changed version', @@ -340,6 +345,34 @@ export class ViewMotion extends BaseViewModelWithAgendaItemAndListOfSpeakers { ] }; + public AmendmentFilterOption: OsFilter = { + property: 'amendmentType', + label: 'Amendment', + options: [ + { condition: AmendmentType.Amendment, label: this.translate.instant('Is amendment') }, + { condition: AmendmentType.Parent, label: this.translate.instant('Has amendment') } + ] + }; + public personalNoteFilterOptions = [ { property: 'star', @@ -226,9 +235,14 @@ export class MotionFilterListService extends BaseFilterListService { filterDefinitions.push(this.hasSpeakerOptions); } + if (this.showAmendmentsInMainTable) { + filterDefinitions.push(this.AmendmentFilterOption); + } + if (!this.operator.isAnonymous) { filterDefinitions = filterDefinitions.concat(this.personalNoteFilterOptions); } + return filterDefinitions; }