Compare commits

...

4 Commits

Author SHA1 Message Date
ba99b3c2b0 Merge branch 'front_foundation' of https://gitea.piair.dev/piair/MyINPulse into front_foundation
Some checks failed
Format / formatting (push) Successful in 6s
Build / build (push) Successful in 37s
CI / build (push) Failing after 8s
Format / formatting (pull_request) Successful in 5s
2025-04-16 10:36:59 +02:00
31d82f6271 fix:... 2025-04-16 10:36:54 +02:00
37e631a096 fix: fixing conflits 2025-04-16 10:36:06 +02:00
6306a00eca feat: contact button opens the partage page 2025-04-16 10:33:33 +02:00
4 changed files with 44 additions and 7 deletions

View File

@ -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;

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}`);

View File

@ -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" },

View File

@ -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,