front_foundation #5

Open
mohamed_maoulainine wants to merge 73 commits from front_foundation into main
4 changed files with 40 additions and 61 deletions
Showing only changes of commit f48b570494 - Show all commits

View File

@ -31,10 +31,6 @@ const router = useRouter();
const goToLink = () => {
if (props.projectLink) {
router.push(props.projectLink);
/*
window.location.href = props.projectLink;
*/
}
};

View File

@ -9,46 +9,36 @@
</div>
</template>
<script>
import { ref, onMounted } from "vue";
<script setup lang="ts">
mohamed_maoulainine marked this conversation as resolved Outdated
Outdated
Review

ce n'est pas de la composition API

ce n'est pas de la composition API
import { ref, defineProps, onMounted } from "vue";
import axios from "axios";
export default {
props: {
title: String,
description: String,
},
const props = defineProps<{
mohamed_maoulainine marked this conversation as resolved Outdated
Outdated
Review

composition API

composition API
title: string;
description: string;
}>();
setup(props) {
const expanded = ref(false);
const currentDescription = ref(props.description);
const expanded = ref(false);
const currentDescription = ref(props.description);
const fetchData = async () => {
const fetchData = async () => {
try {
const response = await axios.get("http://localhost:5000/data"); // to edit later!
const response = await axios.get("http://localhost:5000/data"); // Update the URL if needed
currentDescription.value = response.data[0].canva_data;
} catch (error) {
console.error("Erreur lors de la récupération des données :", error);
}
};
};
const toggleExpand = async () => {
const toggleExpand = async () => {
if (!expanded.value) {
await fetchData();
} else {
currentDescription.value = props.description;
}
expanded.value = !expanded.value;
};
return {
expanded,
currentDescription,
toggleExpand
};
}
};
</script>

View File

@ -10,7 +10,9 @@
{{ email }}
</button>
</div>
<button class="return-button"><a href="/">Return to list project</a></button>
<button class="return-button">
mohamed_maoulainine marked this conversation as resolved Outdated
Outdated
Review

plutôt utiliser des routerLink au lieu de href
https://stackoverflow.com/questions/52675885/when-to-use-router-link-vs-a

plutôt utiliser des routerLink au lieu de href https://stackoverflow.com/questions/52675885/when-to-use-router-link-vs-a
<RouterLink to="/">Return to list project</RouterLink>
</button>
</div>
</div>
</header>

View File

@ -10,16 +10,11 @@
</div>
</template>
<script>
<script setup lang="ts">
mohamed_maoulainine marked this conversation as resolved Outdated
Outdated
Review

Ce n'est pas de la composition API

Ce n'est pas de la composition API
import { ref } from "vue";
import CanvasItem from "@/components/canvas/CanvasItem.vue";
export default {
components: {
CanvasItem
},
setup() {
const items = ref([
const items = ref([
{ title: "1. Problème", description: "3 problèmes essentiels à résoudre pour le client", class: "Probleme" },
{ title: "2. Segments", description: "Les segments de clientèle visés", class: "Segments" },
{ title: "3. Valeur", description: "La proposition de valeur", class: "Valeur" },
@ -29,11 +24,7 @@ export default {
{ title: "7. Indicateurs", description: "Les indicateurs clés de performance", class: "Indicateurs" },
{ title: "8. Coûts", description: "Les coûts associés", class: "Couts" },
{ title: "9. Revenus", description: "Les sources de revenus", class: "Revenus" }
]);
return { items };
}
};
]);
</script>
<style scoped>