front_foundation #5

Open
mohamed_maoulainine wants to merge 73 commits from front_foundation into main
Showing only changes of commit 6306a00eca - Show all commits

View File

@ -10,14 +10,12 @@
<button
v-for="(email, index) in entrepreneurEmails"
:key="index"
@click="copyToClipboard(email)"
@click="contactSingle(email)"
>
{{ email }}
</button>
</div>
</div>
<RouterLink to="/" class="return-button">Retour</RouterLink>
</div>
</header>
@ -105,9 +103,29 @@ const mockFetchEntrepreneurs = async (projectId :number) => {
};
const contactAll = () => {
alert("Contacter tous les entrepreneurs : " + entrepreneurEmails.value.join(", "));
const allEmails = entrepreneurEmails.value.join(", ");
navigator.clipboard.writeText(allEmails)
.then(() => {
alert("Tous les emails copiés dans le presse-papiers !");
window.open("https://partage.bordeaux-inp.fr/", "_blank");
})
.catch(err => {
console.error("Erreur lors de la copie :", err);
});
};
const contactSingle = (email: string) => {
navigator.clipboard.writeText(email)
.then(() => {
alert(`Adresse copiée : ${email}`);
window.open("https://partage.bordeaux-inp.fr/", "_blank");
})
.catch(err => {
console.error("Erreur lors de la copie :", err);
});
};
const copyToClipboard = (email: string) => {
navigator.clipboard.writeText(email).then(() => {
alert(`Adresse copiée : ${email}`);