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