fix:lint
This commit is contained in:
parent
ca8c5d9209
commit
9762ca27fb
@ -1,40 +1,39 @@
|
||||
<template>
|
||||
<div class="project">
|
||||
<div class="project-header">
|
||||
<h2 @click="goToLink">{{ projectName }}</h2>
|
||||
<div class="header-actions">
|
||||
<div class="dropdown-wrapper">
|
||||
<!-- Empêche la propagation du clic vers le parent -->
|
||||
<button class="contact-button" @click.stop="toggleDropdown">
|
||||
Contact
|
||||
</button>
|
||||
<div class="project">
|
||||
<div class="project-header">
|
||||
<h2 @click="goToLink">{{ projectName }}</h2>
|
||||
<div class="header-actions">
|
||||
<div class="dropdown-wrapper">
|
||||
<!-- Empêche la propagation du clic vers le parent -->
|
||||
<button class="contact-button" @click.stop="toggleDropdown">
|
||||
Contact
|
||||
</button>
|
||||
|
||||
<div class="dropdown-menu" v-if="isDropdownOpen">
|
||||
<button @click.stop="contactAll">Contacter tous</button>
|
||||
<button
|
||||
v-for="(email, index) in entrepreneurEmails"
|
||||
:key="index"
|
||||
@click.stop="contactSingle(email)"
|
||||
>
|
||||
{{ email }}
|
||||
</button>
|
||||
</div>
|
||||
<div v-if="isDropdownOpen" class="dropdown-menu">
|
||||
<button @click.stop="contactAll">Contacter tous</button>
|
||||
<button
|
||||
v-for="(email, index) in entrepreneurEmails"
|
||||
:key="index"
|
||||
@click.stop="contactSingle(email)"
|
||||
>
|
||||
{{ email }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Toute cette partie est cliquable -->
|
||||
<div class="project-body" @click="goToLink">
|
||||
<ul>
|
||||
<li v-for="(name, index) in listName" :key="index">
|
||||
{{ name }}
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Toute cette partie est cliquable -->
|
||||
<div class="project-body" @click="goToLink">
|
||||
<ul>
|
||||
<li v-for="(name, index) in listName" :key="index">
|
||||
{{ name }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineProps, ref, onMounted, onBeforeUnmount } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
@ -98,7 +97,10 @@ const fetchEntrepreneurs = async (
|
||||
(item: Entrepreneur) => item.primaryMail
|
||||
);
|
||||
} catch (error) {
|
||||
console.error("Erreur lors de la récupération des entrepreneurs :", error);
|
||||
console.error(
|
||||
"Erreur lors de la récupération des entrepreneurs :",
|
||||
error
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@ -114,7 +116,7 @@ type Entrepreneur = {
|
||||
sneeStatus: boolean;
|
||||
};
|
||||
|
||||
const mockFetchEntrepreneurs = async (projectId: number) => {
|
||||
const mockFetchEntrepreneurs = async (/*projectId: number*/) => {
|
||||
return new Promise<Entrepreneur[]>((resolve) => {
|
||||
setTimeout(() => {
|
||||
resolve([
|
||||
@ -244,35 +246,35 @@ button:hover {
|
||||
}
|
||||
|
||||
.dropdown-wrapper {
|
||||
position: relative;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
position: absolute;
|
||||
top: 100%; /* juste en dessous du bouton */
|
||||
right: 0;
|
||||
background-color: white;
|
||||
border: 1px solid #ccc;
|
||||
padding: 0.5rem;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 0.25rem;
|
||||
min-width: 150px;
|
||||
position: absolute;
|
||||
top: 100%; /* juste en dessous du bouton */
|
||||
right: 0;
|
||||
background-color: white;
|
||||
border: 1px solid #ccc;
|
||||
padding: 0.5rem;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 0.25rem;
|
||||
min-width: 150px;
|
||||
}
|
||||
|
||||
.dropdown-menu button {
|
||||
text-align: left;
|
||||
padding: 0.3rem 0.5rem;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
text-align: left;
|
||||
padding: 0.3rem 0.5rem;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
.dropdown-menu button:hover {
|
||||
background-color: #f0f0f0;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,32 +1,31 @@
|
||||
<template>
|
||||
<header class="header">
|
||||
<img src="../icons/logo inpulse.png" alt="INPulse Logo" class="logo" />
|
||||
<header class="header">
|
||||
<img src="../icons/logo inpulse.png" alt="INPulse Logo" class="logo" />
|
||||
|
||||
<div class="header-actions">
|
||||
<div class="dropdown-wrapper" ref="dropdownRef">
|
||||
<button class="contact-button" @click.stop="toggleDropdown">
|
||||
Contact
|
||||
</button>
|
||||
<div
|
||||
class="contact-dropdown"
|
||||
:class="{ 'dropdown-visible': isDropdownOpen }"
|
||||
>
|
||||
<button @click="contactAll">Contacter tous</button>
|
||||
<button
|
||||
v-for="(email, index) in entrepreneurEmails"
|
||||
:key="index"
|
||||
@click="contactSingle(email)"
|
||||
>
|
||||
{{ email }}
|
||||
</button>
|
||||
<div class="header-actions">
|
||||
<div ref="dropdownRef" class="dropdown-wrapper">
|
||||
<button class="contact-button" @click.stop="toggleDropdown">
|
||||
Contact
|
||||
</button>
|
||||
<div
|
||||
class="contact-dropdown"
|
||||
:class="{ 'dropdown-visible': isDropdownOpen }"
|
||||
>
|
||||
<button @click="contactAll">Contacter tous</button>
|
||||
<button
|
||||
v-for="(email, index) in entrepreneurEmails"
|
||||
:key="index"
|
||||
@click="contactSingle(email)"
|
||||
>
|
||||
{{ email }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<RouterLink to="/" class="return-button">Retour</RouterLink>
|
||||
</div>
|
||||
</div>
|
||||
<RouterLink to="/" class="return-button">Retour</RouterLink>
|
||||
</div>
|
||||
</header>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount } from "vue";
|
||||
import axios from "axios";
|
||||
@ -171,11 +170,9 @@ onMounted(() => {
|
||||
document.addEventListener("click", handleClickOutside);
|
||||
});
|
||||
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
document.removeEventListener("click", handleClickOutside);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
Loading…
x
Reference in New Issue
Block a user