front_foundation #5
@ -5,6 +5,6 @@
|
|||||||
{ "id": 3, "name": "Charlie", "email": "charlie@example.com" }
|
{ "id": 3, "name": "Charlie", "email": "charlie@example.com" }
|
||||||
],
|
],
|
||||||
"data": [
|
"data": [
|
||||||
{ "data": "this is a fake data to test api" }
|
{ "canva_data": "this is a fake data to test api" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ import axios from "axios";
|
|||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
title: String,
|
title: String,
|
||||||
description: String
|
description: String,
|
||||||
},
|
},
|
||||||
|
|
||||||
setup(props) {
|
setup(props) {
|
||||||
@ -26,7 +26,8 @@ export default {
|
|||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await axios.get("http://localhost:5000/data"); // to edit later!
|
const response = await axios.get("http://localhost:5000/data"); // to edit later!
|
||||||
currentDescription.value = response.data.map(e => e.data);
|
currentDescription.value = response.data[0].canva_data;
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Erreur lors de la récupération des données :", error);
|
console.error("Erreur lors de la récupération des données :", error);
|
||||||
}
|
}
|
||||||
@ -36,7 +37,7 @@ export default {
|
|||||||
if (!expanded.value) {
|
if (!expanded.value) {
|
||||||
await fetchData();
|
await fetchData();
|
||||||
} else {
|
} else {
|
||||||
currentDescription.value = "3 problèmes essentiels à résoudre pour le client";
|
currentDescription.value = props.description;
|
||||||
}
|
}
|
||||||
expanded.value = !expanded.value;
|
expanded.value = !expanded.value;
|
||||||
};
|
};
|
||||||
|
@ -47,6 +47,7 @@ onMounted(fetchEntrepreneurs);
|
|||||||
|
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@import "@/components/canvas/style-project.css";
|
||||||
|
|
||||||
header {
|
header {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -114,7 +115,4 @@ header img {
|
|||||||
width: 100px;
|
width: 100px;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@import "@/components/canvas/style-project.css";
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -37,6 +37,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@import "@/components/canvas/style-project.css";
|
||||||
|
|
||||||
.canvas {
|
.canvas {
|
||||||
display: grid;
|
display: grid;
|
||||||
@ -61,5 +62,4 @@ export default {
|
|||||||
.Indicateurs { grid-column: 3 / 5; grid-row: 3 / 5; }
|
.Indicateurs { grid-column: 3 / 5; grid-row: 3 / 5; }
|
||||||
.Couts { grid-column: 1 / 6; grid-row: 5 / 7; }
|
.Couts { grid-column: 1 / 6; grid-row: 5 / 7; }
|
||||||
.Revenus { grid-column: 6 / 11; grid-row: 5 / 7; }
|
.Revenus { grid-column: 6 / 11; grid-row: 5 / 7; }
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user