création de session fix en cours
This commit is contained in:
@@ -118,7 +118,7 @@ export class Session{
|
||||
name!: string;
|
||||
activitesID: number[] = [];
|
||||
activites: Activite[] = [];
|
||||
isRecurrent! : Boolean;
|
||||
isRecurrent! : boolean;
|
||||
creneau!: Date;
|
||||
coach!: Coach;
|
||||
athletesID!: number[]
|
||||
@@ -145,6 +145,21 @@ export class Session{
|
||||
this.ligne = []; //TODO
|
||||
|
||||
}
|
||||
|
||||
toDTO():SessionDTO{
|
||||
const dto:SessionDTO = {
|
||||
id: 0,
|
||||
name: this.name,
|
||||
isRecurrent: this.isRecurrent,
|
||||
creneau: this.creneau.toISOString(),
|
||||
duree: this.duree,
|
||||
groupe: "", //TODO
|
||||
coachId: this.coach?.id ?? null,
|
||||
athleteIds: [],
|
||||
activiteIds: []
|
||||
};
|
||||
return dto;
|
||||
}
|
||||
}
|
||||
|
||||
export class Activite{
|
||||
@@ -168,6 +183,18 @@ export class Activite{
|
||||
|
||||
}
|
||||
|
||||
toDTO():ActiviteDTO{
|
||||
const dto:ActiviteDTO = {
|
||||
id: 0,
|
||||
name: this.nom,
|
||||
duree: this.duree,
|
||||
dataActivite: [],
|
||||
sessionId: this.session.id,
|
||||
theme: this.theme
|
||||
};
|
||||
return dto;
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
export function getUserTest():User{
|
||||
|
||||
Reference in New Issue
Block a user