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 <button
v-for="(email, index) in entrepreneurEmails" v-for="(email, index) in entrepreneurEmails"
:key="index" :key="index"
@click="copyToClipboard(email)" @click="contactSingle(email)"
> >
{{ email }} {{ email }}
</button> </button>
</div> </div>
</div> </div>
<RouterLink to="/" class="return-button">Retour</RouterLink> <RouterLink to="/" class="return-button">Retour</RouterLink>
</div> </div>
</header> </header>
@ -105,9 +103,29 @@ const mockFetchEntrepreneurs = async (projectId :number) => {
}; };
const contactAll = () => { 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) => { const copyToClipboard = (email: string) => {
navigator.clipboard.writeText(email).then(() => { navigator.clipboard.writeText(email).then(() => {
alert(`Adresse copiée : ${email}`); alert(`Adresse copiée : ${email}`);