argos/dmp-frontend/src/app/core/model/dmp/invitation/dmp-invitation-user.ts

26 lines
541 B
TypeScript
Raw Normal View History

2019-01-18 18:03:45 +01:00
import { FormBuilder, FormGroup } from '@angular/forms';
import { Serializable } from '@common/types/json/serializable';
2019-01-18 18:03:45 +01:00
export class DmpInvitationUser implements Serializable<DmpInvitationUser> {
2018-01-05 16:40:19 +01:00
2018-10-05 17:00:54 +02:00
public id: string;
public email: string;
public name: string;
2018-01-05 16:40:19 +01:00
2019-01-18 18:03:45 +01:00
fromJSONObject(item: any): DmpInvitationUser {
2018-10-05 17:00:54 +02:00
this.id = item.id;
this.email = item.email;
this.name = item.name;
return this;
}
2018-01-05 16:40:19 +01:00
2018-10-05 17:00:54 +02:00
buildForm(): FormGroup {
return new FormBuilder().group({
id: [this.id],
email: [this.email],
name: [this.name]
});
}
}