Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chamilo-lms/assets/vue/pages/Faq.vue

37 lines
795 B

<template>
<!-- List of pages of category "faq" -->
<div class="container mx-auto flex gap-8">
<div v-if="pages.length" class="flex-1">
<PageCardList :pages="pages" class="grid gap-4 grid-cols-1" />
</div>
</div>
</template>
<script setup>
import {ref, watch} from "vue";
import { useStore } from "vuex";
import { useI18n } from "vue-i18n";
import PageCardList from "../components/page/PageCardList";
const store = useStore();
const { locale } = useI18n();
const pages = ref([]);
const findAllPages = () => {
pages.value = []
store
.dispatch("page/findAll", {
"category.title": "faq",
enabled: "1",
locale: locale.value,
})
.then((response) => (pages.value = response));
}
findAllPages()
watch(locale, () => findAllPages())
</script>