clos slide content
This commit is contained in:
parent
798af8c5ab
commit
7be436594e
@ -4,10 +4,10 @@ interface SlideSpeaker {
|
||||
}
|
||||
|
||||
export interface CommonListOfSpeakersSlideData {
|
||||
waiting: SlideSpeaker[];
|
||||
current: SlideSpeaker;
|
||||
finished: SlideSpeaker[];
|
||||
title_information: object;
|
||||
content_object_collection: string;
|
||||
item_number: string;
|
||||
waiting?: SlideSpeaker[];
|
||||
current?: SlideSpeaker;
|
||||
finished?: SlideSpeaker[];
|
||||
title_information?: object;
|
||||
content_object_collection?: string;
|
||||
item_number?: string;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Last speakers -->
|
||||
<div *ngIf="data.data.finished.length">
|
||||
<div *ngIf="data.data.finished && data.data.finished.length">
|
||||
<div *ngFor="let speaker of data.data.finished" class="lastSpeakers">
|
||||
{{ speaker.user }}
|
||||
<mat-icon *ngIf="speaker.marked">star</mat-icon>
|
||||
@ -18,7 +18,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Next speakers -->
|
||||
<div *ngIf="data.data.waiting.length">
|
||||
<div *ngIf="data.data.waiting && data.data.waiting.length">
|
||||
<ol class="nextSpeakers">
|
||||
<li *ngFor="let speaker of data.data.waiting">
|
||||
{{ speaker.user }}
|
||||
|
@ -16,13 +16,17 @@ export class CommonListOfSpeakersSlideComponent extends BaseSlideComponent<Commo
|
||||
}
|
||||
|
||||
public getTitle(): string {
|
||||
if (!this.data.data.content_object_collection || !this.data.data.title_information) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const numberPrefix = this.data.data.item_number ? `${this.data.data.item_number} · ` : '';
|
||||
const repo = this.collectionStringMapperService.getRepository(this.data.data.content_object_collection);
|
||||
|
||||
if (isBaseAgendaContentObjectRepository(repo)) {
|
||||
return numberPrefix + repo.getAgendaTitle(this.data.data.title_information);
|
||||
} else {
|
||||
throw new Error('The content object has no agenda based repository!');
|
||||
throw new Error('The content object has no agenda base repository!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
<div id="overlay" *ngIf="data">
|
||||
TODO
|
||||
<os-common-list-of-speakers-slide [data]="data"></os-common-list-of-speakers-slide>
|
||||
</div>
|
||||
|
@ -5,5 +5,5 @@
|
||||
background-color: green;
|
||||
height: 30px;
|
||||
margin: 10px;
|
||||
z-index: 2;
|
||||
z-index: 10;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CurrentListOfSpeakersOverlaySlideComponent } from './current-list-of-speakers-overlay-slide.component';
|
||||
import { E2EImportsModule } from '../../../../e2e-imports.module';
|
||||
import { CommonListOfSpeakersSlideModule } from '../common/common-list-of-speakers-slide.module';
|
||||
|
||||
describe('CurrentListOfSpeakersOverlaySlideComponent', () => {
|
||||
let component: CurrentListOfSpeakersOverlaySlideComponent;
|
||||
@ -9,7 +10,7 @@ describe('CurrentListOfSpeakersOverlaySlideComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [E2EImportsModule],
|
||||
imports: [E2EImportsModule, CommonListOfSpeakersSlideModule],
|
||||
declarations: [CurrentListOfSpeakersOverlaySlideComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
import { BaseSlideComponent } from 'app/slides/base-slide-component';
|
||||
import { CommonListOfSpeakersSlideData } from '../common/common-list-of-speakers-slide-data';
|
||||
@ -9,12 +9,6 @@ import { CommonListOfSpeakersSlideData } from '../common/common-list-of-speakers
|
||||
styleUrls: ['./current-list-of-speakers-overlay-slide.component.scss']
|
||||
})
|
||||
export class CurrentListOfSpeakersOverlaySlideComponent extends BaseSlideComponent<CommonListOfSpeakersSlideData> {
|
||||
// TODO: remove to access data in the template
|
||||
@Input()
|
||||
public set data(value: any) {
|
||||
console.log(value.data);
|
||||
}
|
||||
|
||||
public constructor() {
|
||||
super();
|
||||
}
|
||||
|
@ -1,7 +1,15 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { makeSlideModule } from 'app/slides/base-slide-module';
|
||||
import { CurrentListOfSpeakersOverlaySlideComponent } from './current-list-of-speakers-overlay-slide.component';
|
||||
import { CommonListOfSpeakersSlideModule } from '../common/common-list-of-speakers-slide.module';
|
||||
import { SharedModule } from 'app/shared/shared.module';
|
||||
import { SLIDE } from 'app/slides/slide-token';
|
||||
|
||||
@NgModule(makeSlideModule(CurrentListOfSpeakersOverlaySlideComponent))
|
||||
@NgModule({
|
||||
imports: [CommonModule, SharedModule, CommonListOfSpeakersSlideModule],
|
||||
declarations: [CurrentListOfSpeakersOverlaySlideComponent],
|
||||
providers: [{ provide: SLIDE, useValue: CurrentListOfSpeakersOverlaySlideComponent }],
|
||||
entryComponents: [CurrentListOfSpeakersOverlaySlideComponent]
|
||||
})
|
||||
export class CurrentListOfSpeakersOverlaySlideModule {}
|
||||
|
Loading…
Reference in New Issue
Block a user