2018-12-06 12:28:05 +01:00
|
|
|
import { BaseViewModel } from 'app/site/base/base-view-model';
|
|
|
|
import { MotionBlock } from 'app/shared/models/motions/motion-block';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ViewModel for motion blocks.
|
|
|
|
* @ignore
|
|
|
|
*/
|
|
|
|
export class ViewMotionBlock extends BaseViewModel {
|
|
|
|
private _motionBlock: MotionBlock;
|
|
|
|
|
|
|
|
public get motionBlock(): MotionBlock {
|
|
|
|
return this._motionBlock;
|
|
|
|
}
|
|
|
|
|
|
|
|
public get id(): number {
|
|
|
|
return this.motionBlock ? this.motionBlock.id : null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public get title(): string {
|
|
|
|
return this.motionBlock ? this.motionBlock.title : null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public get agenda_item_id(): number {
|
|
|
|
return this.motionBlock ? this.motionBlock.agenda_item_id : null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public constructor(motionBlock: MotionBlock) {
|
|
|
|
super();
|
|
|
|
this._motionBlock = motionBlock;
|
|
|
|
}
|
|
|
|
|
|
|
|
public updateValues(update: MotionBlock): void {
|
|
|
|
this._motionBlock = update;
|
|
|
|
}
|
|
|
|
|
|
|
|
public getTitle(): string {
|
2019-01-10 12:54:48 +01:00
|
|
|
return this.title;
|
2018-12-06 12:28:05 +01:00
|
|
|
}
|
|
|
|
}
|