diff --git a/front/MyINPulse-front/src/ApiClasses/Project.ts b/front/MyINPulse-front/src/ApiClasses/Project.ts index 07c49a7..b1064fe 100644 --- a/front/MyINPulse-front/src/ApiClasses/Project.ts +++ b/front/MyINPulse-front/src/ApiClasses/Project.ts @@ -67,6 +67,16 @@ class Project { ) { this._status = value; } + + toObject() { + return { + idProject: this.idProject, + projectName: this.projectName, + creationDate: this.creationDate, + logo: this.logo, + status: this.status, + }; + } } export default Project; diff --git a/front/MyINPulse-front/src/ApiClasses/SectionCell.ts b/front/MyINPulse-front/src/ApiClasses/SectionCell.ts index e5fa52e..acf6912 100644 --- a/front/MyINPulse-front/src/ApiClasses/SectionCell.ts +++ b/front/MyINPulse-front/src/ApiClasses/SectionCell.ts @@ -44,7 +44,7 @@ class SectionCell { this._modificationDate = value; } - toPlainObject() { + toObject() { return { idSectionCell: this._idSectionCell, sectionId: this._sectionId, diff --git a/front/MyINPulse-front/src/components/ProjectComponent.vue b/front/MyINPulse-front/src/components/ProjectComponent.vue index 59eb024..cc92160 100644 --- a/front/MyINPulse-front/src/components/ProjectComponent.vue +++ b/front/MyINPulse-front/src/components/ProjectComponent.vue @@ -3,18 +3,20 @@

{{ projectName }}

- diff --git a/front/MyINPulse-front/src/services/Apis/Entrepreneurs.ts b/front/MyINPulse-front/src/services/Apis/Entrepreneurs.ts index ce0dd1b..32e5ed8 100644 --- a/front/MyINPulse-front/src/services/Apis/Entrepreneurs.ts +++ b/front/MyINPulse-front/src/services/Apis/Entrepreneurs.ts @@ -9,12 +9,12 @@ import { // Entrepreneurs API function requestProjectCreation( - projectDetails: Project, // Replace 'any' with a proper type for project details if available + projectDetails: Project, onSuccessHandler?: (response: AxiosResponse) => void, onErrorHandler?: (error: AxiosError) => void ): void { axiosInstance - .post("/entrepreneur/projects/request", projectDetails) + .post("/entrepreneur/projects/request", projectDetails.toObject()) .then((response) => { if (onSuccessHandler) { onSuccessHandler(response); @@ -32,12 +32,12 @@ function requestProjectCreation( } function addSectionCell( - sectionCellDetails: SectionCell, // Replace 'any' with a proper type for section cell details if available + sectionCellDetails: SectionCell, onSuccessHandler?: (response: AxiosResponse) => void, onErrorHandler?: (error: AxiosError) => void ): void { axiosInstance - .post("/entrepreneur/sectionCells", sectionCellDetails.toPlainObject()) + .post("/entrepreneur/sectionCells", sectionCellDetails.toObject()) .then((response) => { if (onSuccessHandler) { onSuccessHandler(response); diff --git a/front/MyINPulse-front/src/views/AdminMain.vue b/front/MyINPulse-front/src/views/AdminMain.vue index 67b4c43..5c83f28 100644 --- a/front/MyINPulse-front/src/views/AdminMain.vue +++ b/front/MyINPulse-front/src/views/AdminMain.vue @@ -36,6 +36,7 @@ import { ref /*, onMounted*/ } from "vue"; //import { callApi } from "@/services/api"; import Header from "../components/HeaderComponent.vue"; +//import Agenda from "../components/AdminAppointments.vue"; import Agenda from "../components/AgendaComponent.vue"; import ProjectComp from "../components/ProjectComponent.vue"; import PendingProjectComponent from "@/components/PendingProjectComponent.vue"; diff --git a/front/MyINPulse-front/src/views/CanvasView.vue b/front/MyINPulse-front/src/views/CanvasView.vue index 1a5c782..ce8eeea 100644 --- a/front/MyINPulse-front/src/views/CanvasView.vue +++ b/front/MyINPulse-front/src/views/CanvasView.vue @@ -1,7 +1,7 @@