Refactor frontend, display tours with cards on ToursPage
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import cardView from '@/components/cardView.vue';
|
||||
import { useProductStore } from '@/data/stores/productStore';
|
||||
// import { useProductStore } from '@/data/stores/productStore';
|
||||
|
||||
const productStore = useProductStore()
|
||||
// const productStore = useProductStore()
|
||||
|
||||
const headers = [
|
||||
{ title: "Name", value: "name" },
|
||||
@@ -11,7 +11,7 @@ const headers = [
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<v-container max-width="800">
|
||||
<!-- <v-container max-width="800">
|
||||
<v-row>
|
||||
<v-col>
|
||||
<card-view
|
||||
@@ -24,9 +24,8 @@ const headers = [
|
||||
:headers="headers"
|
||||
>
|
||||
</v-data-table>
|
||||
<!-- todo: Edit/Delete -->
|
||||
</card-view>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-container> -->
|
||||
</template>
|
||||
@@ -1,8 +1,5 @@
|
||||
<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" },
|
||||
@@ -12,24 +9,5 @@ const headers = [
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<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>
|
||||
@@ -1,12 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import cardView from '@/components/cardView.vue';
|
||||
import { ProductModel } from '@/data/models/productModel';
|
||||
import { useProductStore } from '@/data/stores/productStore';
|
||||
import productEditDialog from './productEditDialog.vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const productStore = useProductStore()
|
||||
const editProduct = ref(new ProductModel())
|
||||
// const productStore = useProductStore()
|
||||
// const editProduct = ref(new ProductModel())
|
||||
const showEditProductDialog = ref(false)
|
||||
|
||||
const headers = [
|
||||
@@ -20,16 +18,16 @@ const headers = [
|
||||
{ title: "Edit", value: "edit" },
|
||||
]
|
||||
|
||||
function openEditProductDialog(product: ProductModel) {
|
||||
editProduct.value = product
|
||||
showEditProductDialog.value = true
|
||||
}
|
||||
// function openEditProductDialog(product: ProductModel) {
|
||||
// editProduct.value = product
|
||||
// showEditProductDialog.value = true
|
||||
// }
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<v-container>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<!-- <v-col>
|
||||
<card-view
|
||||
:title="$t('product.product', 2)"
|
||||
:subtitle="productStore.products.length + ' ' + $t('product.product', productStore.products.length)"
|
||||
@@ -88,11 +86,11 @@ function openEditProductDialog(product: ProductModel) {
|
||||
</template>
|
||||
</v-data-table>
|
||||
</card-view>
|
||||
</v-col>
|
||||
</v-col> -->
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
||||
<product-edit-dialog
|
||||
<!-- <product-edit-dialog
|
||||
v-model="showEditProductDialog"
|
||||
:edit-product="editProduct" />
|
||||
:edit-product="editProduct" /> -->
|
||||
</template>
|
||||
Reference in New Issue
Block a user