redesign tabs

This commit is contained in:
isUnknown 2024-09-10 09:12:52 +02:00
parent 893d173c59
commit 0075a37ab2
4 changed files with 52 additions and 38 deletions

View file

@ -19,27 +19,30 @@
</template>
<script setup>
import { ref } from "vue";
import { computed } from "vue";
import slugify from "slugify";
const { projects } = defineProps({
projects: Array,
const { currentProjects, archivedProjects } = defineProps({
currentProjects: Array,
archivedProjects: Array,
});
const tabs = ref([
{
label: "Projets en cours",
id: "current",
count: projects.filter((project) => project.status === "listed").length,
isActive: true,
},
{
label: "Projets archivés",
id: "archived",
count: projects.filter((project) => project.status === "unlisted").length,
isActive: false,
},
]);
const tabs = computed(() => {
return [
{
label: "Projets en cours",
id: "currentProjects",
count: currentProjects.length,
isActive: true,
},
{
label: "Projets archivés",
id: "archivedProjects",
count: archivedProjects.length,
isActive: false,
},
];
});
const emit = defineEmits(["update:currentTab"]);