fix: eslint + prettier
This commit is contained in:
@ -106,7 +106,6 @@ const currentDescriptions = ref<SectionCell[]>([]);
|
||||
const editedDescriptions = ref<SectionCell[]>([]);
|
||||
const isEditing = ref<boolean[]>([]);
|
||||
|
||||
// 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;
|
||||
|
@ -24,15 +24,15 @@
|
||||
v-if="entrepreneurEmails.length > 0"
|
||||
class="contact-dropdown"
|
||||
:class="{ 'dropdown-visible': isDropdownOpen }"
|
||||
>
|
||||
<button @click="contactAll">Contacter tous</button>
|
||||
<button
|
||||
v-for="(email, index) in entrepreneurEmails"
|
||||
:key="index"
|
||||
@click="contactSingle(email)"
|
||||
>
|
||||
<button @click="contactAll">Contacter tous</button>
|
||||
<button
|
||||
v-for="(email, index) in entrepreneurEmails"
|
||||
:key="index"
|
||||
@click="contactSingle(email)"
|
||||
>
|
||||
{{ email }}
|
||||
</button>
|
||||
{{ email }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -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<UserEntrepreneur>[];
|
||||
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(() => {
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped>
|
||||
@import "@/components/canvas/style-project.css";
|
||||
|
||||
|
@ -78,27 +78,6 @@ const items = ref([
|
||||
class: "Revenus",
|
||||
},
|
||||
]);
|
||||
|
||||
/*
|
||||
onMounted(() => {
|
||||
const bootstrapCss = document.createElement("link");
|
||||
bootstrapCss.rel = "stylesheet";
|
||||
bootstrapCss.href =
|
||||
"https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css";
|
||||
bootstrapCss.integrity =
|
||||
"sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+Fpc+NC";
|
||||
bootstrapCss.crossOrigin = "anonymous";
|
||||
document.head.appendChild(bootstrapCss);
|
||||
|
||||
const bootstrapJs = document.createElement("script");
|
||||
bootstrapJs.src =
|
||||
"https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js";
|
||||
bootstrapJs.integrity =
|
||||
"sha384-mQ93S0EhrF4Z1nM+fTflmYf0DyzsY5j7F5H3WlClDD6H3WUJh6kxBkF3GDW8n1j6";
|
||||
bootstrapJs.crossOrigin = "anonymous";
|
||||
document.body.appendChild(bootstrapJs);
|
||||
});
|
||||
*/
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@ -111,10 +90,10 @@ onMounted(() => {
|
||||
gap: 12px;
|
||||
padding: 30px;
|
||||
position: relative;
|
||||
height: auto; /* autorise la hauteur à s'ajuster selon le contenu */
|
||||
max-height: none; /* enlève la limite de hauteur */
|
||||
height: auto;
|
||||
max-height: none;
|
||||
box-sizing: border-box;
|
||||
overflow: visible; /* autorise le débordement visible */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
@ -161,7 +140,6 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.canvas-item {
|
||||
/*background-color: white;*/
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
Reference in New Issue
Block a user