feat: conditionally display price rows in PriceDataComponent based on availability
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s

This commit is contained in:
puriphatt 2025-07-08 13:39:53 +07:00
parent 2b310c667d
commit a89de83fe9

View file

@ -167,26 +167,28 @@ withDefaults(
<div class="col-12 full-width"> <div class="col-12 full-width">
<q-table <q-table
:rows-per-page-options="[0]" :rows-per-page-options="[0]"
:rows="[ :rows="
{ [
label: $t('productService.product.salePrice'), priceDisplay.price && {
pricePerUnit: price, label: $t('productService.product.salePrice'),
calcVat, pricePerUnit: price,
vatIncluded, calcVat,
}, vatIncluded,
{ },
label: $t('productService.product.agentPrice'), priceDisplay.agentPrice && {
calcVat: agentPriceCalcVat, label: $t('productService.product.agentPrice'),
vatIncluded: agentPriceVatIncluded, calcVat: agentPriceCalcVat,
pricePerUnit: agentPrice, vatIncluded: agentPriceVatIncluded,
}, pricePerUnit: agentPrice,
{ },
label: $t('productService.product.processingPrice'), priceDisplay.serviceCharge && {
calcVat: serviceChargeCalcVat, label: $t('productService.product.processingPrice'),
vatIncluded: serviceChargeVatIncluded, calcVat: serviceChargeCalcVat,
pricePerUnit: serviceCharge, vatIncluded: serviceChargeVatIncluded,
}, pricePerUnit: serviceCharge,
]" },
].filter(Boolean)
"
:columns :columns
hide-bottom hide-bottom
bordered bordered