Show supplier/origin in offer cards
Some checks failed
Build Docker Image / build (push) Failing after 7m43s
Some checks failed
Build Docker Image / build (push) Failing after 7m43s
This commit is contained in:
@@ -3,7 +3,10 @@
|
||||
<!-- Header: Location + Price -->
|
||||
<div class="flex items-start justify-between mb-3">
|
||||
<div>
|
||||
<Text weight="semibold">{{ locationName || 'Локация' }}</Text>
|
||||
<Text weight="semibold">{{ supplierDisplay }}</Text>
|
||||
<Text tone="muted" size="sm">
|
||||
{{ t('catalogOfferCard.labels.origin_label') }}: {{ originDisplay }}
|
||||
</Text>
|
||||
<Text v-if="productName" tone="muted" size="sm">{{ productName }}</Text>
|
||||
</div>
|
||||
<Text v-if="priceDisplay" weight="semibold" class="text-primary text-lg">
|
||||
@@ -29,6 +32,7 @@ import type { RouteStage } from './RouteStepper.vue'
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
locationName?: string
|
||||
supplierName?: string
|
||||
productName?: string
|
||||
pricePerUnit?: number | null
|
||||
currency?: string | null
|
||||
@@ -45,6 +49,16 @@ defineEmits<{
|
||||
select: []
|
||||
}>()
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const supplierDisplay = computed(() => {
|
||||
return props.supplierName || t('catalogOfferCard.labels.supplier_unknown')
|
||||
})
|
||||
|
||||
const originDisplay = computed(() => {
|
||||
return props.locationName || t('catalogOfferCard.labels.origin_unknown')
|
||||
})
|
||||
|
||||
const priceDisplay = computed(() => {
|
||||
if (!props.pricePerUnit) return null
|
||||
const currSymbol = getCurrencySymbol(props.currency)
|
||||
|
||||
Reference in New Issue
Block a user