2019-07-17 16:13:49 +02:00
|
|
|
import { Submitter } from 'app/shared/models/motions/submitter';
|
|
|
|
import { BaseViewModel } from 'app/site/base/base-view-model';
|
2019-07-26 11:46:59 +02:00
|
|
|
import { ViewUser } from 'app/site/users/models/view-user';
|
2019-07-17 16:13:49 +02:00
|
|
|
|
|
|
|
export class ViewSubmitter extends BaseViewModel<Submitter> {
|
|
|
|
public static COLLECTIONSTRING = Submitter.COLLECTIONSTRING;
|
2019-08-05 15:00:21 +02:00
|
|
|
protected _collectionString = Submitter.COLLECTIONSTRING;
|
|
|
|
|
2019-07-17 16:13:49 +02:00
|
|
|
private _user?: ViewUser;
|
|
|
|
|
|
|
|
public get submitter(): Submitter {
|
|
|
|
return this._model;
|
|
|
|
}
|
|
|
|
|
|
|
|
public get user(): ViewUser {
|
|
|
|
return this._user;
|
|
|
|
}
|
|
|
|
|
|
|
|
public get id(): number {
|
|
|
|
return this.submitter.id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public get user_id(): number {
|
|
|
|
return this.submitter.user_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public get motion_id(): number {
|
|
|
|
return this.submitter.motion_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public get weight(): number {
|
|
|
|
return this.submitter.weight;
|
|
|
|
}
|
|
|
|
|
|
|
|
public getTitle = () => {
|
|
|
|
return this.user ? this.user.getTitle() : '';
|
|
|
|
};
|
|
|
|
|
|
|
|
public getListTitle = () => {
|
|
|
|
return this.getTitle();
|
|
|
|
};
|
|
|
|
}
|