Merge pull request #5613 from tsiegleauq/invisible-agenda-item-issue
Fix hidden motions in agenda list
This commit is contained in:
commit
de474e9eae
@ -82,10 +82,13 @@ export class ProjectorService {
|
||||
*/
|
||||
public isProjected(obj: Projectable | ProjectorElementBuildDeskriptor | IdentifiableProjectorElement): boolean {
|
||||
const element = this.getProjectorElement(obj);
|
||||
if (element.getIdentifiers) {
|
||||
return this.DS.getAll<Projector>('core/projector').some(projector => {
|
||||
return projector.isElementShown(element);
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all projectors where the object is prejected on.
|
||||
|
@ -81,8 +81,12 @@ export abstract class BaseIsAgendaItemContentObjectRepository<
|
||||
*/
|
||||
public getAgendaListTitle(titleInformation: T): AgendaListTitle {
|
||||
// Return the agenda title with the model's verbose name appended
|
||||
const numberPrefix = titleInformation.agenda_item_number() ? `${titleInformation.agenda_item_number()} · ` : '';
|
||||
const title = numberPrefix + this.getTitle(titleInformation) + ' (' + this.getVerboseName() + ')';
|
||||
let numberPrefix = '';
|
||||
if (titleInformation.agenda_item_number && titleInformation.agenda_item_number()) {
|
||||
numberPrefix = `${titleInformation.agenda_item_number()} · `;
|
||||
}
|
||||
|
||||
const title = `${numberPrefix}${this.getTitle(titleInformation)} (${this.getVerboseName()})`;
|
||||
return { title };
|
||||
}
|
||||
|
||||
|
@ -271,7 +271,15 @@ export class MotionRepositoryService extends BaseIsAgendaItemAndListOfSpeakersCo
|
||||
};
|
||||
|
||||
public getAgendaListTitle = (titleInformation: MotionTitleInformation) => {
|
||||
const numberPrefix = titleInformation.agenda_item_number() ? `${titleInformation.agenda_item_number()} · ` : '';
|
||||
let numberPrefix = '';
|
||||
/**
|
||||
* after reloading, titleInformation.agenda_item_number is undefined. It gets defined after
|
||||
* an autoupdate
|
||||
*/
|
||||
if (titleInformation.agenda_item_number && titleInformation.agenda_item_number()) {
|
||||
numberPrefix = `${titleInformation.agenda_item_number()} · `;
|
||||
}
|
||||
|
||||
// Append the verbose name only, if not the special format 'Motion <identifier>' is used.
|
||||
let title;
|
||||
if (titleInformation.identifier) {
|
||||
|
@ -458,7 +458,8 @@ export class ListViewTableComponent<V extends BaseViewModel | BaseViewModelWithC
|
||||
}
|
||||
|
||||
public isElementProjected = (context: PblNgridRowContext<V>) => {
|
||||
if (this.allowProjector && this.projectorService.isProjected(this.getProjectable(context.$implicit as V))) {
|
||||
const model = context.$implicit as V;
|
||||
if (this.allowProjector && this.projectorService.isProjected(this.getProjectable(model))) {
|
||||
return 'projected';
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user