- Categorie

- ProductInfo
This commit is contained in:
Surya Paolo
2023-12-27 02:58:23 +01:00
parent c27c293fbf
commit 6be8ccc906
30 changed files with 612 additions and 198 deletions

View File

@@ -2,10 +2,14 @@
<div class="q-pa-md row items-start q-gutter-md">
<q-spinner v-if="!endload" color="primary" size="3em" :thickness="2" />
<q-card :class="getmycardcl()" v-if="!!myproduct && endload" bordered>
<q-card
:class="getmycardcl()"
v-if="!!myproduct && endload && !!myproduct.productInfo"
bordered
>
<q-img
:src="`` + myproduct.img"
:alt="myproduct.name"
:src="`` + myproduct.productInfo.img"
:alt="myproduct.productInfo.name"
:class="getclimgproduct()"
></q-img>
@@ -18,22 +22,25 @@
icon="fas fa-info"
class="absolute semi-transparent"
style="top: 0; right: 12px; transform: translateY(-50%)"
:to="`/product/` + myproduct.code"
:to="`/product/` + myproduct._id + '/' + cosa"
/>
<div class="row items-center centeritems">
<div class="text-h7 boldhigh">
{{ myproduct.name }}
{{ myproduct.productInfo.name }}
</div>
<div class="product_code">
&nbsp; {{ $t('ecomm.codice') }}: {{ myproduct.code }}
&nbsp; {{ t('ecomm.codice') }}: {{ myproduct.productInfo.code }}
</div>
</div>
</q-item>
<q-item v-if="complete">
<q-item v-if="complete && myproduct.productInfo.description">
<div class="row items-center">
<div class="text-title text-grey-9">
<span class="text-grey-7" v-html="myproduct.description"></span>
<span
class="text-grey-7"
v-html="myproduct.productInfo.description"
></span>
</div>
</div>
</q-item>
@@ -66,20 +73,25 @@
</div>
</q-item-label>
</q-item-section>
<q-item-section avatar v-if="myproduct.weight">
<q-item-section avatar v-if="myproduct.productInfo.weight">
<q-icon
name="fas fa-balance-scale"
style="padding-right: 16px !important"
/>
</q-item-section>
<q-item-section v-if="myproduct.weight">
<q-item-section v-if="myproduct.productInfo.weight">
<q-item-label>
{{ t('products.weight') }}
</q-item-label>
<q-item-label>
<span class="text-black q-ml-xs text-h8" v-if="myproduct.unit">
{{ myproduct.weight }}
{{ tools.getUnitsMeasure(myproduct.unit, true) }}</span
<span
class="text-black q-ml-xs text-h8"
v-if="myproduct.productInfo.unit"
>
{{ myproduct.productInfo.weight }}
{{
tools.getUnitsMeasure(myproduct.productInfo.unit, true)
}}</span
>
</q-item-label>
</q-item-section>
@@ -93,8 +105,14 @@
<q-item-label>
{{ t('products.gasordine') }}
</q-item-label>
<q-item-label
v-if="(tools.isArray(myproduct.gasordines) && myproduct.gasordines.length > 1) && (!myorder.idGasordine || ((myorder.quantity + myorder.quantitypreordered) === 0 ))">
<q-item-label
v-if="
tools.isArray(myproduct.gasordines) &&
myproduct.gasordines.length > 1 &&
(!myorder.idGasordine ||
myorder.quantity + myorder.quantitypreordered === 0)
"
>
<q-select
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
outlined
@@ -171,7 +189,7 @@
"
>
{{
$t('ecomm.qta_in_attesa', {
t('ecomm.qta_in_attesa', {
qty: myproduct.QuantitaOrdinateInAttesa,
})
}}
@@ -209,7 +227,7 @@
"
>
{{
$t('ecomm.qta_prenotate_in_attesa', {
t('ecomm.qta_prenotate_in_attesa', {
qty: myproduct.QuantitaPrenotateInAttesa,
})
}}
@@ -255,7 +273,7 @@
:disable="checkifCartDisable() || !enableSubQty()"
rounded
size="md"
:label="t('products.subcart', { qta: 1 })"
:label="t('products.subcart', { qta: qtaNextSub() })"
@click="addtoCart(false)"
>
</q-btn>
@@ -279,7 +297,7 @@
:disable="checkifCartDisable() || !enableAddQty()"
rounded
size="md"
:label="t('products.addcart', { qta: 1 })"
:label="t('products.addcart', { qta: qtaNextAdd() })"
@click="addtoCart(true)"
>
</q-btn>
@@ -291,7 +309,7 @@
rounded
icon="fas fa-shopping-cart"
color="primary"
:label="$t('ecomm.btn_cassa')"
:label="t('ecomm.btn_cassa')"
class="q-mb-sm"
to="/checkout"
></q-btn>
@@ -306,7 +324,7 @@
<q-card class="dialog_card">
<q-toolbar class="bg-primary text-white">
<q-toolbar-title>
{{ t('ecomm.listaord') }} - {{ myproduct.name }}
{{ t('ecomm.listaord') }} - {{ myproduct.productInfo.name }}
</q-toolbar-title>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-toolbar>