diff --git a/front/MyINPulse-front/src/ApiClasses/Project.ts b/front/MyINPulse-front/src/ApiClasses/Project.ts index b1064fe..f445276 100644 --- a/front/MyINPulse-front/src/ApiClasses/Project.ts +++ b/front/MyINPulse-front/src/ApiClasses/Project.ts @@ -22,16 +22,16 @@ class Project { this._idProject = value; } - get projectName(): string | undefined { - return this._projectName; + get projectName(): string { + return this._projectName ?? ""; } set projectName(value: string | undefined) { this._projectName = value; } - get creationDate(): string | undefined { - return this._creationDate; + get creationDate(): string { + return this._creationDate ?? ""; } set creationDate(value: string | undefined) { @@ -77,6 +77,13 @@ class Project { status: this.status, }; } + + toCreatePayload() { + return { + projectName: this.projectName, + logo: this.logo, + }; + } } export default Project; diff --git a/front/MyINPulse-front/src/components/AddProjectForm.vue b/front/MyINPulse-front/src/components/AddProjectForm.vue index 6a24514..2c6ce5a 100644 --- a/front/MyINPulse-front/src/components/AddProjectForm.vue +++ b/front/MyINPulse-front/src/components/AddProjectForm.vue @@ -12,24 +12,13 @@ /> -