feat: contact button opens the partage page
This commit is contained in:
parent
ad1fd45bed
commit
6306a00eca
@ -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}`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user