Merge branch 'front_foundation' of https://gitea.piair.dev/piair/MyINPulse into front_foundation
This commit is contained in:
commit
6226c9f632
@ -9,7 +9,7 @@
|
|||||||
Contact
|
Contact
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="dropdown-menu" v-if="isDropdownOpen">
|
<div v-if="isDropdownOpen" class="dropdown-menu">
|
||||||
<button @click.stop="contactAll">Contacter tous</button>
|
<button @click.stop="contactAll">Contacter tous</button>
|
||||||
<button
|
<button
|
||||||
v-for="(email, index) in entrepreneurEmails"
|
v-for="(email, index) in entrepreneurEmails"
|
||||||
@ -34,7 +34,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineProps, ref, onMounted, onBeforeUnmount } from "vue";
|
import { defineProps, ref, onMounted, onBeforeUnmount } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
@ -87,7 +86,7 @@ const fetchEntrepreneurs = async (
|
|||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
const responseData: Entrepreneur[] = useMock
|
const responseData: Entrepreneur[] = useMock
|
||||||
? await mockFetchEntrepreneurs(projectId)
|
? await mockFetchEntrepreneurs(/*projectId*/)
|
||||||
: (
|
: (
|
||||||
await axios.get(
|
await axios.get(
|
||||||
`http://localhost:5000/shared/projects/entrepreneurs/${projectId}`
|
`http://localhost:5000/shared/projects/entrepreneurs/${projectId}`
|
||||||
@ -98,7 +97,10 @@ const fetchEntrepreneurs = async (
|
|||||||
(item: Entrepreneur) => item.primaryMail
|
(item: Entrepreneur) => item.primaryMail
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} 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;
|
sneeStatus: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const mockFetchEntrepreneurs = async (projectId: number) => {
|
const mockFetchEntrepreneurs = async (/*projectId: number*/) => {
|
||||||
return new Promise<Entrepreneur[]>((resolve) => {
|
return new Promise<Entrepreneur[]>((resolve) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
resolve([
|
resolve([
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<img src="../icons/logo inpulse.png" alt="INPulse Logo" class="logo" />
|
<img src="../icons/logo inpulse.png" alt="INPulse Logo" class="logo" />
|
||||||
|
|
||||||
<div class="header-actions">
|
<div class="header-actions">
|
||||||
<div class="dropdown-wrapper" ref="dropdownRef">
|
<div ref="dropdownRef" class="dropdown-wrapper">
|
||||||
<button class="contact-button" @click.stop="toggleDropdown">
|
<button class="contact-button" @click.stop="toggleDropdown">
|
||||||
Contact
|
Contact
|
||||||
</button>
|
</button>
|
||||||
@ -26,7 +26,6 @@
|
|||||||
</header>
|
</header>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, onBeforeUnmount } from "vue";
|
import { ref, onMounted, onBeforeUnmount } from "vue";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
@ -171,11 +170,9 @@ onMounted(() => {
|
|||||||
document.addEventListener("click", handleClickOutside);
|
document.addEventListener("click", handleClickOutside);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
document.removeEventListener("click", handleClickOutside);
|
document.removeEventListener("click", handleClickOutside);
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user