Merge pull request #5087 from tsiegleauq/proxy-filter-issues
Repair motion filter for proxies
This commit is contained in:
commit
985e54dcd5
@ -11,6 +11,7 @@ import { Searchable } from 'app/site/base/searchable';
|
||||
import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile';
|
||||
import { ViewTag } from 'app/site/tags/models/view-tag';
|
||||
import { ViewUser } from 'app/site/users/models/view-user';
|
||||
import { AmendmentType } from '../motions.constants';
|
||||
import { ViewCategory } from './view-category';
|
||||
import { ViewMotionBlock } from './view-motion-block';
|
||||
import { ViewMotionChangeRecommendation } from './view-motion-change-recommendation';
|
||||
@ -161,6 +162,20 @@ export class ViewMotion extends BaseViewModelWithAgendaItemAndListOfSpeakers<Mot
|
||||
return !!this.amendments && !!this.amendments.length;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
return AmendmentType.Amendment;
|
||||
} else {
|
||||
// not any amendment
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of the first diff line, in case a motion is an amendment
|
||||
*/
|
||||
|
@ -55,13 +55,14 @@ export class MotionFilterListService extends BaseFilterListService<ViewMotion> {
|
||||
* getFilterOptions (as the workflows available may change)
|
||||
*/
|
||||
public stateFilterOptions: OsFilter = {
|
||||
property: 'state',
|
||||
property: 'state_id',
|
||||
label: 'State',
|
||||
options: []
|
||||
};
|
||||
|
||||
public categoryFilterOptions: OsFilter = {
|
||||
property: 'category',
|
||||
property: 'category_id',
|
||||
label: 'Category',
|
||||
options: []
|
||||
};
|
||||
|
||||
@ -78,13 +79,13 @@ export class MotionFilterListService extends BaseFilterListService<ViewMotion> {
|
||||
};
|
||||
|
||||
public recommendationFilterOptions: OsFilter = {
|
||||
property: 'recommendation',
|
||||
property: 'recommendation_id',
|
||||
label: 'Recommendation',
|
||||
options: []
|
||||
};
|
||||
|
||||
public tagFilterOptions: OsFilter = {
|
||||
property: 'tags',
|
||||
property: 'tags_id',
|
||||
label: 'Tags',
|
||||
options: []
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user