Skip to content

Commit

Permalink
Add to BrandCard & CategoryCard
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Aug 17, 2024
1 parent db1f0d4 commit f1af03d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 3 additions & 5 deletions src/components/BrandCard.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<template>
<v-card :title="brand" prepend-icon="mdi-factory" data-name="brand-card">
<v-card-text>
<v-chip label size="small" density="comfortable" class="mr-1">
<v-icon start icon="mdi-food-outline" />
<span id="product-count">{{ $t('BrandDetail.BrandProductTotal', { count: productCount }) }}</span>
</v-chip>
<ProductCountChip :count="productCount" :withLabel="true" />
<BrandActionMenuButton :brand="brand" />
</v-card-text>
</v-card>
Expand All @@ -15,7 +12,8 @@ import { defineAsyncComponent } from 'vue'
export default {
components: {
BrandActionMenuButton: defineAsyncComponent(() => import('../components/BrandActionMenuButton.vue')),
ProductCountChip: defineAsyncComponent(() => import('../components/ProductCountChip.vue')),
BrandActionMenuButton: defineAsyncComponent(() => import('../components/BrandActionMenuButton.vue'))
},
props: {
brand: {
Expand Down
6 changes: 2 additions & 4 deletions src/components/CategoryCard.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<template>
<v-card v-if="category" :title="category.name" prepend-icon="mdi-fruit-watermelon" data-name="category-card">
<v-card-text>
<v-chip v-if="sourceCategory" label size="small" density="comfortable" class="mr-1">
<v-icon start icon="mdi-food-outline" />
{{ $t('CategoryDetail.CategoryProductTotal', { count: productCount }) }}
</v-chip>
<ProductCountChip v-if="sourceCategory" :count="productCount" :withLabel="true" />
<PriceCountChip v-else-if="sourceProduct" :count="priceCount" />
<CategoryTagChip v-if="showProductCategoryTag" :category="category" />
<CategoryActionMenuButton :category="category" :source="source" />
Expand All @@ -19,6 +16,7 @@ import { useAppStore } from '../store'
export default {
components: {
ProductCountChip: defineAsyncComponent(() => import('../components/ProductCountChip.vue')),
PriceCountChip: defineAsyncComponent(() => import('../components/PriceCountChip.vue')),
CategoryTagChip: defineAsyncComponent(() => import('../components/CategoryTagChip.vue')),
CategoryActionMenuButton: defineAsyncComponent(() => import('../components/CategoryActionMenuButton.vue')),
Expand Down

0 comments on commit f1af03d

Please sign in to comment.