front_foundation #13

Merged
piair merged 188 commits from front_foundation into main 2025-05-14 09:08:33 +02:00
4 changed files with 39 additions and 6 deletions
Showing only changes of commit 1fd95265ea - Show all commits

View File

@ -25,11 +25,11 @@ onMounted(() => {
router.push("/admin"); router.push("/admin");
return; return;
} }
/*
if (roles.includes("MyINPulse-entrepreneur")) { if (roles.includes("MyINPulse-entrepreneur")) {
router.push("/canvas"); router.push("/canvas");
return; return;
}*/ }
checkPending( checkPending(
(response) => { (response) => {
@ -43,7 +43,7 @@ onMounted(() => {
} }
}, },
(error) => { (error) => {
if (error.response?.status === 404) { if (error.response?.status === 403) {
router.push("/finalize"); router.push("/finalize");
} else { } else {
console.error( console.error(

View File

@ -110,7 +110,7 @@ const props = defineProps<{
isAdmin: boolean; isAdmin: boolean;
}>(); }>();
const IS_MOCK_MODE = false; const IS_MOCK_MODE = true;
const IS_ADMIN = props.isAdmin; const IS_ADMIN = props.isAdmin;
const expanded = ref(false); const expanded = ref(false);

View File

@ -2,8 +2,13 @@
<Header /> <Header />
<div class="finalize-page"> <div class="finalize-page">
<div class="loader-container"> <div class="loader-container">
<button class="return-button" @click="store.logout">Logout</button>
<div class="spinner"></div> <div class="spinner"></div>
<p>Finalisation du compte en cours...</p> <p>Finalisation du compte en cours...</p>
<button v-if="hasError" @click="retry" class="retry-button">
Réessayer
</button>
</div> </div>
</div> </div>
</template> </template>
@ -13,12 +18,13 @@ import { onMounted } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { finalizeAccount } from "@/services/Apis/Unauth"; import { finalizeAccount } from "@/services/Apis/Unauth";
import Header from "@/components/HeaderComponent.vue"; import Header from "@/components/HeaderComponent.vue";
import { store } from "@/main.ts";
const router = useRouter(); const router = useRouter();
onMounted(() => { onMounted(() => {
finalizeAccount( finalizeAccount(
() => { () => {
router.push("/JorCproject"); console.log("finalize sended");
}, },
(error) => { (error) => {
console.error("Erreur lors de la finalisation :", error); console.error("Erreur lors de la finalisation :", error);
@ -55,6 +61,19 @@ onMounted(() => {
animation: spin 0.8s linear infinite; 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 { @keyframes spin {
0% { 0% {
transform: rotate(0deg); transform: rotate(0deg);

View File

@ -5,6 +5,7 @@
alt="INPulse Logo" alt="INPulse Logo"
class="logo" class="logo"
/> />
<button class="return-button" @click="store.logout">Logout</button>
</header> </header>
<div class="choix-projet"> <div class="choix-projet">
@ -42,7 +43,7 @@
import { ref } from "vue"; import { ref } from "vue";
import Project from "@/ApiClasses/Project"; import Project from "@/ApiClasses/Project";
import { requestProjectCreation } from "@/services/Apis/Entrepreneurs.ts"; import { requestProjectCreation } from "@/services/Apis/Entrepreneurs.ts";
import { store } from "@/main.ts";
const choix = ref<string | null>(null); const choix = ref<string | null>(null);
const nomProjet = ref(""); const nomProjet = ref("");
@ -140,4 +141,17 @@ input {
.logo { .logo {
height: 50px; 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;
}
</style> </style>