clos slide content
This commit is contained in:
parent
798af8c5ab
commit
7be436594e
@ -4,10 +4,10 @@ interface SlideSpeaker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface CommonListOfSpeakersSlideData {
|
export interface CommonListOfSpeakersSlideData {
|
||||||
waiting: SlideSpeaker[];
|
waiting?: SlideSpeaker[];
|
||||||
current: SlideSpeaker;
|
current?: SlideSpeaker;
|
||||||
finished: SlideSpeaker[];
|
finished?: SlideSpeaker[];
|
||||||
title_information: object;
|
title_information?: object;
|
||||||
content_object_collection: string;
|
content_object_collection?: string;
|
||||||
item_number: string;
|
item_number?: string;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Last speakers -->
|
<!-- 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">
|
<div *ngFor="let speaker of data.data.finished" class="lastSpeakers">
|
||||||
{{ speaker.user }}
|
{{ speaker.user }}
|
||||||
<mat-icon *ngIf="speaker.marked">star</mat-icon>
|
<mat-icon *ngIf="speaker.marked">star</mat-icon>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Next speakers -->
|
<!-- Next speakers -->
|
||||||
<div *ngIf="data.data.waiting.length">
|
<div *ngIf="data.data.waiting && data.data.waiting.length">
|
||||||
<ol class="nextSpeakers">
|
<ol class="nextSpeakers">
|
||||||
<li *ngFor="let speaker of data.data.waiting">
|
<li *ngFor="let speaker of data.data.waiting">
|
||||||
{{ speaker.user }}
|
{{ speaker.user }}
|
||||||
|
@ -16,13 +16,17 @@ export class CommonListOfSpeakersSlideComponent extends BaseSlideComponent<Commo
|
|||||||
}
|
}
|
||||||
|
|
||||||
public getTitle(): string {
|
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 numberPrefix = this.data.data.item_number ? `${this.data.data.item_number} · ` : '';
|
||||||
const repo = this.collectionStringMapperService.getRepository(this.data.data.content_object_collection);
|
const repo = this.collectionStringMapperService.getRepository(this.data.data.content_object_collection);
|
||||||
|
|
||||||
if (isBaseAgendaContentObjectRepository(repo)) {
|
if (isBaseAgendaContentObjectRepository(repo)) {
|
||||||
return numberPrefix + repo.getAgendaTitle(this.data.data.title_information);
|
return numberPrefix + repo.getAgendaTitle(this.data.data.title_information);
|
||||||
} else {
|
} 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">
|
<div id="overlay" *ngIf="data">
|
||||||
TODO
|
<os-common-list-of-speakers-slide [data]="data"></os-common-list-of-speakers-slide>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
background-color: green;
|
background-color: green;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
margin: 10px;
|
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 { CurrentListOfSpeakersOverlaySlideComponent } from './current-list-of-speakers-overlay-slide.component';
|
||||||
import { E2EImportsModule } from '../../../../e2e-imports.module';
|
import { E2EImportsModule } from '../../../../e2e-imports.module';
|
||||||
|
import { CommonListOfSpeakersSlideModule } from '../common/common-list-of-speakers-slide.module';
|
||||||
|
|
||||||
describe('CurrentListOfSpeakersOverlaySlideComponent', () => {
|
describe('CurrentListOfSpeakersOverlaySlideComponent', () => {
|
||||||
let component: CurrentListOfSpeakersOverlaySlideComponent;
|
let component: CurrentListOfSpeakersOverlaySlideComponent;
|
||||||
@ -9,7 +10,7 @@ describe('CurrentListOfSpeakersOverlaySlideComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [E2EImportsModule],
|
imports: [E2EImportsModule, CommonListOfSpeakersSlideModule],
|
||||||
declarations: [CurrentListOfSpeakersOverlaySlideComponent]
|
declarations: [CurrentListOfSpeakersOverlaySlideComponent]
|
||||||
}).compileComponents();
|
}).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 { BaseSlideComponent } from 'app/slides/base-slide-component';
|
||||||
import { CommonListOfSpeakersSlideData } from '../common/common-list-of-speakers-slide-data';
|
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']
|
styleUrls: ['./current-list-of-speakers-overlay-slide.component.scss']
|
||||||
})
|
})
|
||||||
export class CurrentListOfSpeakersOverlaySlideComponent extends BaseSlideComponent<CommonListOfSpeakersSlideData> {
|
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() {
|
public constructor() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,15 @@
|
|||||||
import { NgModule } from '@angular/core';
|
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 { 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 {}
|
export class CurrentListOfSpeakersOverlaySlideModule {}
|
||||||
|
Loading…
Reference in New Issue
Block a user