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";
|
import { axiosInstance } from "@/services/api.ts";
|
||||||
|
|
||||||
const IS_MOCK_MODE = true;
|
const IS_MOCK_MODE = true;
|
||||||
const IS_ADMIN = false;
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
projectId: number;
|
projectId: number;
|
||||||
title: number;
|
title: number;
|
||||||
titleText: string;
|
titleText: string;
|
||||||
description: string;
|
description: string;
|
||||||
|
is_admin: number;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const IS_ADMIN = props.is_admin;
|
||||||
|
|
||||||
const expanded = ref(false);
|
const expanded = ref(false);
|
||||||
const currentDescriptions = ref<string[]>([]);
|
const currentDescriptions = ref<string[]>([]);
|
||||||
currentDescriptions.value[0] = props.description;
|
currentDescriptions.value[0] = props.description;
|
||||||
|
@ -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}`);
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
:description="item.description"
|
:description="item.description"
|
||||||
:project-id="item.projectId"
|
:project-id="item.projectId"
|
||||||
:class="['canvas-item', item.class, 'card', 'shadow', 'p-3']"
|
:class="['canvas-item', item.class, 'card', 'shadow', 'p-3']"
|
||||||
|
:is_admin=is_admin
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -16,6 +17,10 @@
|
|||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import CanvasItem from "@/components/canvas/CanvasItem.vue";
|
import CanvasItem from "@/components/canvas/CanvasItem.vue";
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
is_admin: number;
|
||||||
|
}>();
|
||||||
|
|
||||||
const items = ref([
|
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: 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" },
|
{ 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">
|
<p class="canvas-help-text">
|
||||||
Cliquez sur un champ du tableau pour afficher son contenu en détail ci-dessous.
|
Cliquez sur un champ du tableau pour afficher son contenu en détail ci-dessous.
|
||||||
</p>
|
</p>
|
||||||
<LeanCanvas />
|
<LeanCanvas :is_admin=is_admin />
|
||||||
|
|
||||||
<div class="info-box">
|
<div class="info-box">
|
||||||
<p>
|
<p>
|
||||||
@ -26,11 +26,23 @@
|
|||||||
|
|
||||||
import HeaderCanvas from "../components/canvas/HeaderCanvas.vue";
|
import HeaderCanvas from "../components/canvas/HeaderCanvas.vue";
|
||||||
import LeanCanvas from '../components/canvas/LeanCanvas.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";
|
import { axiosInstance } from "@/services/api.ts";
|
||||||
|
|
||||||
const IS_MOCK_MODE = true;
|
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
|
// Variables pour les informations de l'administrateur
|
||||||
const admin = ref({
|
const admin = ref({
|
||||||
idUser: 0,
|
idUser: 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user