Add quote calculations support
Some checks failed
Build Docker Image / build (push) Failing after 23s
Some checks failed
Build Docker Image / build (push) Failing after 23s
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div class="flex-shrink-0 p-4 border-b border-white/10">
|
||||
<div class="flex items-center justify-between">
|
||||
<h3 class="font-semibold text-base text-white">{{ $t('catalog.headers.offers') }}</h3>
|
||||
<span class="badge badge-neutral">{{ offers.length }}</span>
|
||||
<span class="badge badge-neutral">{{ totalOffers }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -119,6 +119,13 @@ const offersWithPrice = computed(() =>
|
||||
(props.offers || []).filter(o => o?.pricePerUnit != null)
|
||||
)
|
||||
|
||||
const totalOffers = computed(() => {
|
||||
if (props.calculations?.length) {
|
||||
return props.calculations.reduce((sum, calc) => sum + (calc.offers?.length || 0), 0)
|
||||
}
|
||||
return props.offers.length
|
||||
})
|
||||
|
||||
const offerGroups = computed<OfferGroup[]>(() => {
|
||||
if (props.calculations?.length) return props.calculations
|
||||
return offersWithPrice.value.map(offer => ({
|
||||
|
||||
Reference in New Issue
Block a user