From 864bbbb9fd7ec305ea528c7a1fc3578101f1d4de Mon Sep 17 00:00:00 2001 From: ALAMI Adnane Date: Tue, 29 Apr 2025 11:32:30 +0200 Subject: [PATCH] fix: eslint + prettier --- .../src/components/canvas/CanvasItem.vue | 6 +- .../src/components/canvas/HeaderCanvas.vue | 50 +++++++++-------- .../src/components/canvas/LeanCanvas.vue | 28 +--------- .../MyINPulse-front/src/views/CanvasView.vue | 56 +++++++++++-------- 4 files changed, 65 insertions(+), 75 deletions(-) diff --git a/front/MyINPulse-front/src/components/canvas/CanvasItem.vue b/front/MyINPulse-front/src/components/canvas/CanvasItem.vue index 1409680..6d13e04 100755 --- a/front/MyINPulse-front/src/components/canvas/CanvasItem.vue +++ b/front/MyINPulse-front/src/components/canvas/CanvasItem.vue @@ -106,7 +106,6 @@ const currentDescriptions = ref([]); const editedDescriptions = ref([]); const isEditing = ref([]); -// Fonctions const startEditing = (index: number) => { isEditing.value[index] = true; }; @@ -178,7 +177,6 @@ const handleFetchError = (error: unknown) => { isEditing.value = [false]; }; - const fetchData = async ( projectId: number, title: number, @@ -287,10 +285,8 @@ const mockFetch = async ( ], }; - // On extrait les descriptions pour la section demandée const section = leanCanvasData[title] || ["Aucune donnée disponible."]; - // On crée des instances de SectionCell const result = section.map( (txt, index) => new SectionCell({ @@ -347,7 +343,7 @@ onMounted(() => { .tooltip-explain { position: absolute; - bottom: 101%; /* au-dessus de la carte */ + bottom: 101%; left: 50%; transform: translateX(-50%); background-color: #333; diff --git a/front/MyINPulse-front/src/components/canvas/HeaderCanvas.vue b/front/MyINPulse-front/src/components/canvas/HeaderCanvas.vue index e8b2893..2368b67 100644 --- a/front/MyINPulse-front/src/components/canvas/HeaderCanvas.vue +++ b/front/MyINPulse-front/src/components/canvas/HeaderCanvas.vue @@ -24,15 +24,15 @@ v-if="entrepreneurEmails.length > 0" class="contact-dropdown" :class="{ 'dropdown-visible': isDropdownOpen }" + > + + - + {{ email }} + @@ -68,18 +68,18 @@ const fetchMockEntrepreneurs = () => { { userName: "Doe", userSurname: "John", - primaryMail: "john.doe@example.com" + primaryMail: "john.doe@example.com", }, { userName: "Smith", userSurname: "Anna", - primaryMail: "anna.smith@example.com" + primaryMail: "anna.smith@example.com", }, { userName: "Mock", userSurname: "User", - primaryMail: null - } + primaryMail: null, + }, ]; entrepreneurs.value = mockData.map((item) => new UserEntrepreneur(item)); @@ -97,26 +97,28 @@ const fetchEntrepreneurs = (projectId: number, useMock = false) => { getProjectEntrepreneurs( projectId, (response) => { - const rawData = response.data; + const rawData = response.data as Partial[]; entrepreneurs.value = rawData.map( - (item: any) => new UserEntrepreneur(item) + (item) => new UserEntrepreneur(item) ); entrepreneurEmails.value = entrepreneurs.value .map((e) => e.primaryMail) - .filter((mail): mail is string => !!mail); // filtrer undefined + .filter((mail): mail is string => !!mail); }, (error) => { - console.error("Erreur lors de la récupération des entrepreneurs :", error); + console.error( + "Erreur lors de la récupération des entrepreneurs :", + error + ); } ); } }; - - const contactAll = () => { const allEmails = entrepreneurEmails.value.join(", "); - navigator.clipboard.writeText(allEmails) + navigator.clipboard + .writeText(allEmails) .then(() => { alert("Tous les emails copiés dans le presse-papiers !"); window.open("https://partage.bordeaux-inp.fr/", "_blank"); @@ -125,7 +127,8 @@ const contactAll = () => { }; const contactSingle = (email: string) => { - navigator.clipboard.writeText(email) + navigator.clipboard + .writeText(email) .then(() => { alert(`Adresse copiée : ${email}`); window.open("https://partage.bordeaux-inp.fr/", "_blank"); @@ -134,7 +137,11 @@ const contactSingle = (email: string) => { }; const handleClickOutside = (event: MouseEvent) => { - if (isDropdownOpen.value && dropdownRef.value && !dropdownRef.value.contains(event.target as Node)) { + if ( + isDropdownOpen.value && + dropdownRef.value && + !dropdownRef.value.contains(event.target as Node) + ) { isDropdownOpen.value = false; } }; @@ -151,7 +158,6 @@ onBeforeUnmount(() => { }); -