From 1fd95265ea1ad5b79e911713a1a26b97a3b97508 Mon Sep 17 00:00:00 2001 From: ALAMI Adnane Date: Sun, 11 May 2025 21:17:09 +0200 Subject: [PATCH] fix: this is not gonna work in time, switching to mock mod for canvas so we can show what we supposed to have atleast (local canvas) and we can explain what is the problem (you can disable the mock by putting the var USE_MOCK to false in CanvasItem.vue but dont do it) --- .../src/components/LoginComponent.vue | 6 +++--- .../src/components/canvas/CanvasItem.vue | 2 +- .../src/views/FinalizeAccount.vue | 21 ++++++++++++++++++- .../src/views/JoinOrCreatProjectForEntrep.vue | 16 +++++++++++++- 4 files changed, 39 insertions(+), 6 deletions(-) diff --git a/front/MyINPulse-front/src/components/LoginComponent.vue b/front/MyINPulse-front/src/components/LoginComponent.vue index 48d74bf..df9df8a 100644 --- a/front/MyINPulse-front/src/components/LoginComponent.vue +++ b/front/MyINPulse-front/src/components/LoginComponent.vue @@ -25,11 +25,11 @@ onMounted(() => { router.push("/admin"); return; } - /* + if (roles.includes("MyINPulse-entrepreneur")) { router.push("/canvas"); return; - }*/ + } checkPending( (response) => { @@ -43,7 +43,7 @@ onMounted(() => { } }, (error) => { - if (error.response?.status === 404) { + if (error.response?.status === 403) { router.push("/finalize"); } else { console.error( diff --git a/front/MyINPulse-front/src/components/canvas/CanvasItem.vue b/front/MyINPulse-front/src/components/canvas/CanvasItem.vue index 8caa3ce..b41b6dd 100755 --- a/front/MyINPulse-front/src/components/canvas/CanvasItem.vue +++ b/front/MyINPulse-front/src/components/canvas/CanvasItem.vue @@ -110,7 +110,7 @@ const props = defineProps<{ isAdmin: boolean; }>(); -const IS_MOCK_MODE = false; +const IS_MOCK_MODE = true; const IS_ADMIN = props.isAdmin; const expanded = ref(false); diff --git a/front/MyINPulse-front/src/views/FinalizeAccount.vue b/front/MyINPulse-front/src/views/FinalizeAccount.vue index 421e850..996ae10 100644 --- a/front/MyINPulse-front/src/views/FinalizeAccount.vue +++ b/front/MyINPulse-front/src/views/FinalizeAccount.vue @@ -2,8 +2,13 @@
+

Finalisation du compte en cours...

+ +
@@ -13,12 +18,13 @@ import { onMounted } from "vue"; import { useRouter } from "vue-router"; import { finalizeAccount } from "@/services/Apis/Unauth"; import Header from "@/components/HeaderComponent.vue"; +import { store } from "@/main.ts"; const router = useRouter(); onMounted(() => { finalizeAccount( () => { - router.push("/JorCproject"); + console.log("finalize sended"); }, (error) => { console.error("Erreur lors de la finalisation :", error); @@ -55,6 +61,19 @@ onMounted(() => { animation: spin 0.8s linear infinite; } +.return-button { + background-color: #009cde; + color: white; + border: none; + padding: 10px 15px; + cursor: pointer; + font-size: 14px; + border-radius: 5px; + text-decoration: none; + transition: background-color 0.2s ease; + font-family: Arial, sans-serif; +} + @keyframes spin { 0% { transform: rotate(0deg); diff --git a/front/MyINPulse-front/src/views/JoinOrCreatProjectForEntrep.vue b/front/MyINPulse-front/src/views/JoinOrCreatProjectForEntrep.vue index 2c0e62e..58f47dc 100644 --- a/front/MyINPulse-front/src/views/JoinOrCreatProjectForEntrep.vue +++ b/front/MyINPulse-front/src/views/JoinOrCreatProjectForEntrep.vue @@ -5,6 +5,7 @@ alt="INPulse Logo" class="logo" /> +
@@ -42,7 +43,7 @@ import { ref } from "vue"; import Project from "@/ApiClasses/Project"; import { requestProjectCreation } from "@/services/Apis/Entrepreneurs.ts"; - +import { store } from "@/main.ts"; const choix = ref(null); const nomProjet = ref(""); @@ -140,4 +141,17 @@ input { .logo { height: 50px; } + +.return-button { + background-color: #009cde; + color: white; + border: none; + padding: 10px 15px; + cursor: pointer; + font-size: 14px; + border-radius: 5px; + text-decoration: none; + transition: background-color 0.2s ease; + font-family: Arial, sans-serif; +}