Skip to content

Commit

Permalink
feat(price card): option to hide product code
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Jan 12, 2024
1 parent 78f7092 commit eb5d6e3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/PriceCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<p v-if="!hideProductDetails" class="mb-2">
<span v-if="hasProductBrands">
<v-chip v-for="brand in getPriceProductBrandsList" label size="small" density="comfortable" class="mr-1" @click="goToBrand(brand)">
<v-chip v-for="brand in getProductBrandsList" label size="small" density="comfortable" class="mr-1" @click="goToBrand(brand)">
{{ brand }}
</v-chip>
</span>
Expand All @@ -31,7 +31,7 @@
<v-icon v-if="pl.icon" end :icon="pl.icon"></v-icon>
</v-chip>
</span>
<span v-if="!price">
<span v-if="!price && !hideProductCode">
<br />
<v-chip label size="small" density="comfortable" class="mr-1">{{ product.code }}</v-chip>
</span>
Expand Down Expand Up @@ -80,6 +80,7 @@ export default {
'hideProductImage': false,
'hideProductTitle': false,
'hideProductDetails': false,
'hideProductCode': false,
'hidePriceLocation': false,
'readonly': false
},
Expand Down Expand Up @@ -131,7 +132,7 @@ export default {
return tag ? tag.name : this.price.category_tag
}
},
getPriceProductBrandsList() {
getProductBrandsList() {
if (this.hasProductBrands) {
return this.product.brands.split(',')
}
Expand Down

0 comments on commit eb5d6e3

Please sign in to comment.