fix: eslint
This commit is contained in:
parent
19fef63b0e
commit
95eb154556
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { jwtDecode } from "jwt-decode"; // i hope this doesn't break the code later
|
import { jwtDecode } from "jwt-decode"; // i hope this doesn't break the code later
|
||||||
import { store } from "../main.ts";
|
import { store } from "../main.ts";
|
||||||
@ -13,7 +13,7 @@ type TokenPayload = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const customRequest = ref("");
|
//const customRequest = ref("");
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (store.authenticated && store.user.token) {
|
if (store.authenticated && store.user.token) {
|
||||||
@ -25,7 +25,7 @@ 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;
|
||||||
@ -34,7 +34,10 @@ onMounted(() => {
|
|||||||
checkPending(
|
checkPending(
|
||||||
(response) => {
|
(response) => {
|
||||||
const isValidated = response.data === true;
|
const isValidated = response.data === true;
|
||||||
if (isValidated && roles.includes("MyINPulse-entrepreneur")) {
|
if (
|
||||||
|
isValidated &&
|
||||||
|
roles.includes("MyINPulse-entrepreneur")
|
||||||
|
) {
|
||||||
router.push("/canvas");
|
router.push("/canvas");
|
||||||
//router.push("/JorCproject");
|
//router.push("/JorCproject");
|
||||||
} else {
|
} else {
|
||||||
@ -65,7 +68,7 @@ onMounted(() => {
|
|||||||
<error-wrapper></error-wrapper>
|
<error-wrapper></error-wrapper>
|
||||||
<div class="auth-container">
|
<div class="auth-container">
|
||||||
<div class="auth-card">
|
<div class="auth-card">
|
||||||
<h1>Bienvenue</h1>
|
<h1>Bienvenue à MyINPulse</h1>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="status"
|
class="status"
|
||||||
@ -83,11 +86,12 @@ onMounted(() => {
|
|||||||
<div class="actions">
|
<div class="actions">
|
||||||
<button @click="store.login">Login</button>
|
<button @click="store.login">Login</button>
|
||||||
<button @click="store.logout">Logout</button>
|
<button @click="store.logout">Logout</button>
|
||||||
<button @click="store.signup">Signup-admin</button>
|
<!--<button @click="store.signup">Signup-admin</button>
|
||||||
<button @click="store.signup">Signup-Entrepreneur</button>
|
<button @click="store.signup">Signup-Entrepreneur</button>
|
||||||
<button @click="store.refreshUserToken">Refresh Token</button>
|
<button @click="store.refreshUserToken">Refresh Token</button>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!--
|
||||||
<div v-if="store.authenticated" class="token-section">
|
<div v-if="store.authenticated" class="token-section">
|
||||||
<p><strong>Access Token:</strong></p>
|
<p><strong>Access Token:</strong></p>
|
||||||
<pre>{{ store.user.token }}</pre>
|
<pre>{{ store.user.token }}</pre>
|
||||||
@ -111,7 +115,7 @@ onMounted(() => {
|
|||||||
/>
|
/>
|
||||||
<button @click="callApi(customRequest)">Call</button>
|
<button @click="callApi(customRequest)">Call</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
<button class="return-button" @click="store.logout">Logout</button>
|
<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">
|
<button v-if="hasError" class="retry-button" @click="retry">
|
||||||
Réessayer
|
Réessayer
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -15,11 +15,11 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted } from "vue";
|
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";
|
import { store } from "@/main.ts";
|
||||||
const router = useRouter();
|
//const router = useRouter();
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
finalizeAccount(
|
finalizeAccount(
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Header/>
|
<Header />
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<img
|
<img
|
||||||
src="@/components/icons/logo inpulse.png"
|
src="@/components/icons/logo inpulse.png"
|
||||||
@ -40,7 +40,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">import { ref, onMounted } from "vue";
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import Project from "@/ApiClasses/Project";
|
import Project from "@/ApiClasses/Project";
|
||||||
import Header from "../components/HeaderComponent.vue";
|
import Header from "../components/HeaderComponent.vue";
|
||||||
@ -112,7 +113,6 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user