front_foundation #13
.gitea/workflows
.gitignoreDocumentation/openapi
MakefileMyINPulse-back
build.gradle
src
main
java
enseirb
myinpulse
MyinpulseApplication.java
api
config
controller
exception
model
Administrator.javaAnnotation.javaAppointment.javaEntrepreneur.javaMakeAppointment.javaProject.javaProjectDecision.javaProjectDecisionValue.javaReport.javaRoleRepresentation.javaSectionCell.javaUser.javaUserRepresentation.java
repository
AdministratorRepository.javaAnnotationRepository.javaAppointmentRepository.javaEntrepreneurRepository.javaMakeAppointmentRepository.javaProjectRepository.javaReportRepository.javaSectionCellRepository.javaUserRepository.java
security
service
resources
test
config
.env.devbackdev.docker-compose.yamlbackdev.envbackdev.front.envbackdev.main.envdev.docker-compose.yamldev.envfrontdev.docker-compose.yamlfrontdev.envfrontdev.front.envfrontdev.main.envprod.docker-compose.yamlprod.envprod.front.envprod.main.env
documentation
Doc.txt
openapi
front
Dockerfile
MyINPulse-front
.gitignore
fake_data
package-lock.jsonpackage.jsonsrc
App.vue
components
main.tsplugins
router
services
stores
trash.vueviews
hooks
keycloak
postgres
@ -1,120 +0,0 @@
|
|||||||
<template>
|
|
||||||
<header>
|
|
||||||
<img src="../icons/logo inpulse.png" alt="INPulse Logo">
|
|
||||||
<div class="header-buttons">
|
|
||||||
<div class="menu">
|
|
||||||
<button class="contact-button" @click="toggleDropdown">Contact</button>
|
|
||||||
<div class="contact-dropdown" v-bind:class="{ 'dropdown-visible': isDropdownOpen }">
|
|
||||||
<button @click="contactAll">Contact All</button>
|
|
||||||
<button v-for="(email, index) in entrepreneurEmails" :key="index">
|
|
||||||
{{ email }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<button class="return-button">
|
|
||||||
<RouterLink to="/">Return to list project</RouterLink>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { ref, onMounted } from "vue";
|
|
||||||
import axios from "axios";
|
|
||||||
|
|
||||||
const isDropdownOpen = ref(false);
|
|
||||||
const entrepreneurEmails = ref([]);
|
|
||||||
|
|
||||||
const toggleDropdown = () => {
|
|
||||||
isDropdownOpen.value = !isDropdownOpen.value;
|
|
||||||
console.log("Dropdown toggled:", isDropdownOpen.value); // for debug purposes
|
|
||||||
};
|
|
||||||
|
|
||||||
const fetchEntrepreneurs = async () => {
|
|
||||||
try {
|
|
||||||
const response = await axios.get("http://localhost:5000/entrepreneurs");
|
|
||||||
entrepreneurEmails.value = response.data.map(e => e.email);
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Erreur lors de la récupération des entrepreneurs:", error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const contactAll = () => {
|
|
||||||
alert("Contacter tous les entrepreneurs : " + entrepreneurEmails.value.join(", "));
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(fetchEntrepreneurs);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
@import "@/components/canvas/style-project.css";
|
|
||||||
|
|
||||||
header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: flex-start;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-buttons {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-button, .return-button {
|
|
||||||
background-color: #000;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
padding: 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 14px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.return-button a {
|
|
||||||
color: white;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-dropdown {
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
background-color: white;
|
|
||||||
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 10px;
|
|
||||||
margin-top: 5px;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-dropdown button {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
padding: 5px;
|
|
||||||
text-align: left;
|
|
||||||
border: none;
|
|
||||||
background: none;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-dropdown button:hover {
|
|
||||||
background-color: #f0f0f0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-visible {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
header img {
|
|
||||||
width: 100px;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
</style>
|
|
Reference in New Issue
Block a user