Compare commits
4 Commits
c4ba7646d5
...
ba99b3c2b0
Author | SHA1 | Date | |
---|---|---|---|
ba99b3c2b0 | |||
31d82f6271 | |||
37e631a096 | |||
6306a00eca |
@ -50,15 +50,17 @@ import axios from "axios";
|
||||
import { axiosInstance } from "@/services/api.ts";
|
||||
|
||||
const IS_MOCK_MODE = true;
|
||||
const IS_ADMIN = false;
|
||||
|
||||
const props = defineProps<{
|
||||
projectId: number;
|
||||
title: number;
|
||||
titleText: string;
|
||||
description: string;
|
||||
is_admin: number;
|
||||
}>();
|
||||
|
||||
const IS_ADMIN = props.is_admin;
|
||||
|
||||
const expanded = ref(false);
|
||||
const currentDescriptions = ref<string[]>([]);
|
||||
currentDescriptions.value[0] = props.description;
|
||||
|
@ -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}`);
|
||||
|
@ -8,6 +8,7 @@
|
||||
:description="item.description"
|
||||
:project-id="item.projectId"
|
||||
:class="['canvas-item', item.class, 'card', 'shadow', 'p-3']"
|
||||
:is_admin=is_admin
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@ -16,6 +17,10 @@
|
||||
import { ref, onMounted } from "vue";
|
||||
import CanvasItem from "@/components/canvas/CanvasItem.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
is_admin: number;
|
||||
}>();
|
||||
|
||||
const items = ref([
|
||||
{ projectId: 1, title: 1, title_text: "1. Problème", description: "3 problèmes essentiels à résoudre pour le client", class: "Probleme" },
|
||||
{ projectId: 1, title: 2, title_text: "2. Segments", description: "Les segments de clientèle visés", class: "Segments" },
|
||||
|
@ -10,7 +10,7 @@
|
||||
<p class="canvas-help-text">
|
||||
Cliquez sur un champ du tableau pour afficher son contenu en détail ci-dessous.
|
||||
</p>
|
||||
<LeanCanvas />
|
||||
<LeanCanvas :is_admin=is_admin />
|
||||
|
||||
<div class="info-box">
|
||||
<p>
|
||||
@ -26,11 +26,23 @@
|
||||
|
||||
import HeaderCanvas from "../components/canvas/HeaderCanvas.vue";
|
||||
import LeanCanvas from '../components/canvas/LeanCanvas.vue';
|
||||
import { ref, onMounted } from "vue";
|
||||
import { ref, onMounted, defineProps} from "vue";
|
||||
import { axiosInstance } from "@/services/api.ts";
|
||||
|
||||
const IS_MOCK_MODE = true;
|
||||
|
||||
/*
|
||||
const props = defineProps<{
|
||||
projectId: number;
|
||||
token: TokenPayload;
|
||||
}>();
|
||||
|
||||
|
||||
is_admin = token.includes("MyINPulse-admin")
|
||||
*/
|
||||
|
||||
const is_admin = 0
|
||||
|
||||
// Variables pour les informations de l'administrateur
|
||||
const admin = ref({
|
||||
idUser: 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user