Data tables for brand and category added to admin pages

This commit is contained in:
2024-09-25 15:54:45 +02:00
parent 0856540441
commit d36dbced8e
4 changed files with 68 additions and 1 deletions

View File

@@ -1,6 +1,35 @@
<script setup lang="ts">
import cardView from '@/components/cardView.vue';
import { useProductStore } from '@/data/stores/productStore';
const productStore = useProductStore()
const headers = [
{ title: "Name", value: "name" },
{ title: "Icon", value: "icon" },
{ title: "Edit", value: "edit" },
]
</script>
<template>
Categories Page
<v-container max-width="800">
<v-row>
<v-col>
<card-view
:title="$t('category', 2)"
icon="mdi-label"
:subtitle="productStore.categories.length + ' ' + $t('category', productStore.categories.length)"
>
<v-data-table
:items="productStore.categories"
:headers="headers"
>
<template v-slot:item.icon="{ item }">
<v-icon :icon="item.icon" />
</template>
</v-data-table>
</card-view>
</v-col>
</v-row>
</v-container>
</template>