addOrderToMovement
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
.prod_price {
|
.prod_price {
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
@media (max-width: 718px) {
|
@media (max-width: 718px) {
|
||||||
font-size: 1rem;
|
font-size: 1.15rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
.icone_prod{
|
.icone_prod{
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
@media (max-width: 718px) {
|
@media (max-width: 718px) {
|
||||||
font-size: 1rem;
|
font-size: 1.15rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +1,56 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="row items-start q-gutter-md">
|
<div class="row items-start q-gutter-sm">
|
||||||
|
|
||||||
<q-spinner v-if="!endload" color="primary" size="3em" :thickness="2" />
|
<q-spinner v-if="!endload" color="primary" size="3em" :thickness="2" />
|
||||||
|
|
||||||
<q-card :class="{
|
<q-card
|
||||||
'my-card-big': complete,
|
:class="{
|
||||||
'my-card-prod': !complete,
|
'my-card-big': complete,
|
||||||
'my-card-selected':
|
'my-card-prod': !complete,
|
||||||
myorder && myorder.quantity + myorder.quantitypreordered > 0,
|
'my-card-selected':
|
||||||
}" v-if="!!myproduct && endload && !!myproduct.productInfo" bordered>
|
myorder && myorder.quantity + myorder.quantitypreordered > 0,
|
||||||
|
}"
|
||||||
|
v-if="!!myproduct && endload && !!myproduct.productInfo"
|
||||||
|
bordered
|
||||||
|
>
|
||||||
<q-card-section horizontal class="image-section">
|
<q-card-section horizontal class="image-section">
|
||||||
<div class="image-container">
|
<div class="image-container">
|
||||||
<q-img :src="`` + myproduct.productInfo.img" :alt="myproduct.productInfo.name" class="cursor-pointer img-pic"
|
<q-img
|
||||||
@click="complete ? toggleFullScreen : naviga(`/product/` + myproduct._id + '/' + cosa)"></q-img>
|
:src="`` + myproduct.productInfo.img"
|
||||||
<q-btn color="primary" round icon="fas fa-eye" class="absolute semi-transparent" size="md"
|
:alt="myproduct.productInfo.name"
|
||||||
@click="toggleFullScreen"
|
class="cursor-pointer img-pic"
|
||||||
style="bottom: -10px; right: 0px; transform: translateY(-50%);" />
|
@click="
|
||||||
|
complete
|
||||||
|
? toggleFullScreen
|
||||||
|
: naviga(`/product/` + myproduct._id + '/' + cosa)
|
||||||
|
"
|
||||||
|
></q-img>
|
||||||
|
<q-btn
|
||||||
|
color="primary"
|
||||||
|
round
|
||||||
|
icon="fas fa-eye"
|
||||||
|
class="absolute semi-transparent"
|
||||||
|
size="md"
|
||||||
|
@click="toggleFullScreen"
|
||||||
|
style="bottom: -10px; right: 0px; transform: translateY(-50%)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<q-btn v-if="!complete" fab color="primary" icon="fas fa-info" class="absolute semi-transparent"
|
<q-btn
|
||||||
style="top: 0; right: 12px; transform: translateY(-90%)" :to="`/product/` + myproduct._id + '/' + cosa" />
|
v-if="!complete"
|
||||||
|
fab
|
||||||
|
color="primary"
|
||||||
|
icon="fas fa-info"
|
||||||
|
class="absolute semi-transparent"
|
||||||
|
style="top: 0; right: -15px; transform: translateY(-66%)"
|
||||||
|
:to="`/product/` + myproduct._id + '/' + cosa"
|
||||||
|
/>
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
<q-icon color="moneygreen" name="fas fa-euro-sign" class="icone_prod" />
|
<q-icon
|
||||||
|
color="moneygreen"
|
||||||
|
name="fas fa-euro-sign"
|
||||||
|
class="icone_prod"
|
||||||
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
@@ -34,9 +62,16 @@
|
|||||||
myproduct.after_price
|
myproduct.after_price
|
||||||
}}</span>
|
}}</span>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label v-if="myproduct.scontisticas && myproduct.scontisticas.length > 0
|
<q-item-label
|
||||||
">
|
v-if="
|
||||||
<div class="prod_sconti" v-for="(sconti, index) of myproduct.scontisticas" :key="index">
|
myproduct.scontisticas && myproduct.scontisticas.length > 0
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="prod_sconti"
|
||||||
|
v-for="(sconti, index) of myproduct.scontisticas"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
{{ sconti.description }}
|
{{ sconti.description }}
|
||||||
</div>
|
</div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
@@ -48,24 +83,33 @@
|
|||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section v-if="myproduct.productInfo.weight">
|
<q-item-section v-if="myproduct.productInfo.weight">
|
||||||
<q-item-label>
|
<q-item-label>
|
||||||
<span class="text-black q-ml-xs text-h8" v-if="myproduct.productInfo.unit">
|
<span
|
||||||
|
class="text-black q-ml-xs text-h8"
|
||||||
|
v-if="myproduct.productInfo.unit"
|
||||||
|
>
|
||||||
{{ myproduct.productInfo.weight }}
|
{{ myproduct.productInfo.weight }}
|
||||||
{{
|
{{
|
||||||
tools.getUnitsMeasure(myproduct.productInfo.unit, true)
|
tools.getUnitsMeasure(myproduct.productInfo.unit, true)
|
||||||
}}</span>
|
}}</span
|
||||||
|
>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item v-if="cosa === shared_consts.PROD.BOTTEGA ||
|
<q-item
|
||||||
|
v-if="
|
||||||
|
cosa === shared_consts.PROD.BOTTEGA ||
|
||||||
(cosa === shared_consts.PROD.GAS &&
|
(cosa === shared_consts.PROD.GAS &&
|
||||||
products.getQtyAvailable(myproduct) > 0)
|
products.getQtyAvailable(myproduct) > 0)
|
||||||
" :clickable="tools.isManager()" @click="
|
"
|
||||||
tools.isManager() &&
|
:clickable="tools.isManager()"
|
||||||
myproduct.QuantitaOrdinateInAttesa &&
|
@click="
|
||||||
myproduct.QuantitaOrdinateInAttesa > 0
|
tools.isManager() &&
|
||||||
? visuListDisponibili()
|
myproduct.QuantitaOrdinateInAttesa &&
|
||||||
: null
|
myproduct.QuantitaOrdinateInAttesa > 0
|
||||||
">
|
? visuListDisponibili()
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
<q-icon color="green" name="fas fa-store" class="icone_prod" />
|
<q-icon color="green" name="fas fa-store" class="icone_prod" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
@@ -79,9 +123,11 @@
|
|||||||
{{ products.getQtyAvailable(myproduct) }}
|
{{ products.getQtyAvailable(myproduct) }}
|
||||||
</span>
|
</span>
|
||||||
<div class="prod_qtywarn">
|
<div class="prod_qtywarn">
|
||||||
<div v-if="tools.isManager() &&
|
<div
|
||||||
!!myproduct.QuantitaOrdinateInAttesa
|
v-if="
|
||||||
">
|
tools.isManager() && !!myproduct.QuantitaOrdinateInAttesa
|
||||||
|
"
|
||||||
|
>
|
||||||
{{
|
{{
|
||||||
t('ecomm.qta_in_attesa', {
|
t('ecomm.qta_in_attesa', {
|
||||||
qty: myproduct.QuantitaOrdinateInAttesa,
|
qty: myproduct.QuantitaOrdinateInAttesa,
|
||||||
@@ -91,25 +137,34 @@
|
|||||||
</div>
|
</div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section v-if="tools.isManager() &&
|
<q-item-section
|
||||||
|
v-if="
|
||||||
|
tools.isManager() &&
|
||||||
products.getQtyBloccataAvailable(myproduct) > 0
|
products.getQtyBloccataAvailable(myproduct) > 0
|
||||||
">
|
"
|
||||||
|
>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
<q-icon name="fas fa-store" style="padding-right: 16px !important" />
|
<q-icon
|
||||||
|
name="fas fa-store"
|
||||||
|
style="padding-right: 16px !important"
|
||||||
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section v-if="tools.isManager() &&
|
<q-item-section
|
||||||
products.getQtyBloccataAvailable(myproduct) > 0
|
v-if="
|
||||||
">
|
tools.isManager() &&
|
||||||
|
products.getQtyBloccataAvailable(myproduct) > 0
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-item-label> {{ t('ecomm.bloccati') }}: </q-item-label>
|
<q-item-label> {{ t('ecomm.bloccati') }}: </q-item-label>
|
||||||
<q-item-label>
|
<q-item-label>
|
||||||
<span class="text-black q-ml-xs text-h8">
|
<span class="text-black q-ml-xs text-h8">
|
||||||
{{ products.getQtyBloccataAvailable(myproduct) }}</span>
|
{{ products.getQtyBloccataAvailable(myproduct) }}</span
|
||||||
|
>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
@@ -125,7 +180,10 @@
|
|||||||
<q-card-section v-if="complete && myproduct.productInfo.description">
|
<q-card-section v-if="complete && myproduct.productInfo.description">
|
||||||
<div class="row items-center">
|
<div class="row items-center">
|
||||||
<div class="text-title text-grey-9">
|
<div class="text-title text-grey-9">
|
||||||
<span class="text-grey-7" v-html="myproduct.productInfo.description"></span>
|
<span
|
||||||
|
class="text-grey-7"
|
||||||
|
v-html="myproduct.productInfo.description"
|
||||||
|
></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
@@ -136,18 +194,26 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row items-center">
|
<div class="row items-center">
|
||||||
<div class="text-title text-grey-9">
|
<div class="text-title text-grey-9">
|
||||||
<span class="text-grey-7" v-html="myproduct.productInfo.ingredienti"></span>
|
<span
|
||||||
|
class="text-grey-7"
|
||||||
|
v-html="myproduct.productInfo.ingredienti"
|
||||||
|
></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section v-if="complete && myproduct.productInfo.valori_nutrizionali">
|
<q-card-section
|
||||||
|
v-if="complete && myproduct.productInfo.valori_nutrizionali"
|
||||||
|
>
|
||||||
<div class="text-blue text-title row">
|
<div class="text-blue text-title row">
|
||||||
<q-icon size="sm" name="fas fa-info" class="q-mr-sm" />
|
<q-icon size="sm" name="fas fa-info" class="q-mr-sm" />
|
||||||
{{ t('products.valori_nutrizionali') }}
|
{{ t('products.valori_nutrizionali') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="row items-center">
|
<div class="row items-center">
|
||||||
<div class="text-title text-grey-9">
|
<div class="text-title text-grey-9">
|
||||||
<span class="text-grey-7" v-html="myproduct.productInfo.valori_nutrizionali"></span>
|
<span
|
||||||
|
class="text-grey-7"
|
||||||
|
v-html="myproduct.productInfo.valori_nutrizionali"
|
||||||
|
></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
@@ -156,10 +222,19 @@
|
|||||||
<q-icon size="sm" name="fas fa-people-carry" class="q-mr-sm" />
|
<q-icon size="sm" name="fas fa-people-carry" class="q-mr-sm" />
|
||||||
{{ t('products.ritiro_presso') }}:
|
{{ t('products.ritiro_presso') }}:
|
||||||
</div>
|
</div>
|
||||||
<div class="text-green-6 text-title row items-center q-my-sm centeritems">
|
<div
|
||||||
|
class="text-green-6 text-title row items-center q-my-sm centeritems"
|
||||||
|
>
|
||||||
<div v-if="getnumstore() > 1">
|
<div v-if="getnumstore() > 1">
|
||||||
<q-select :behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'" outlined v-model="storeSelected"
|
<q-select
|
||||||
:options="getStorehouses()" :label="t('products.magazzino') + `:`" emit-value map-options>
|
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||||
|
outlined
|
||||||
|
v-model="storeSelected"
|
||||||
|
:options="getStorehouses()"
|
||||||
|
:label="t('products.magazzino') + `:`"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
@@ -169,7 +244,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section v-if="complete && myproduct.producer && myproduct.producer.city">
|
<q-card-section
|
||||||
|
v-if="complete && myproduct.producer && myproduct.producer.city"
|
||||||
|
>
|
||||||
<div>
|
<div>
|
||||||
<div class="text-grey text-title row items-center q-mt-sm">
|
<div class="text-grey text-title row items-center q-mt-sm">
|
||||||
<q-icon name="map" class="q-mr-xs" />
|
<q-icon name="map" class="q-mr-xs" />
|
||||||
@@ -177,15 +254,19 @@
|
|||||||
<span class="text-blue q-ml-xs text-h8">
|
<span class="text-blue q-ml-xs text-h8">
|
||||||
{{ myproduct.producer.city }} ({{
|
{{ myproduct.producer.city }} ({{
|
||||||
myproduct.producer.region
|
myproduct.producer.region
|
||||||
}})</span>
|
}})</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="complete && myproduct.producer && myproduct.producer.name"
|
<div
|
||||||
class="text-grey text-title row items-center">
|
v-if="complete && myproduct.producer && myproduct.producer.name"
|
||||||
|
class="text-grey text-title row items-center"
|
||||||
|
>
|
||||||
<q-icon name="place" class="q-mr-xs" />
|
<q-icon name="place" class="q-mr-xs" />
|
||||||
{{ t('products.producer') }}:
|
{{ t('products.producer') }}:
|
||||||
<span class="text-black q-ml-xs text-h8">
|
<span class="text-black q-ml-xs text-h8">
|
||||||
{{ myproduct.producer.name }}</span>
|
{{ myproduct.producer.name }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
@@ -203,15 +284,20 @@
|
|||||||
</q-item>
|
</q-item>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section v-if="isOrdGas()">
|
<q-card-section v-if="isOrdGas()">
|
||||||
<q-item v-if="products.getQtyBookableAvailable(myproduct) > 0 ||
|
<q-item
|
||||||
myproduct.maxbookableGASQty > 0
|
v-if="
|
||||||
" :clickable="tools.isManager()" @click="
|
products.getQtyBookableAvailable(myproduct) > 0 ||
|
||||||
tools.isManager() &&
|
myproduct.maxbookableGASQty > 0
|
||||||
myproduct.QuantitaPrenotateInAttesa &&
|
"
|
||||||
myproduct.QuantitaPrenotateInAttesa > 0
|
:clickable="tools.isManager()"
|
||||||
? visuListBookable()
|
@click="
|
||||||
: null
|
tools.isManager() &&
|
||||||
">
|
myproduct.QuantitaPrenotateInAttesa &&
|
||||||
|
myproduct.QuantitaPrenotateInAttesa > 0
|
||||||
|
? visuListBookable()
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
<q-icon color="blue" name="fas fa-edit" />
|
<q-icon color="blue" name="fas fa-edit" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
@@ -225,8 +311,11 @@
|
|||||||
{{ products.getQtyBookableAvailable(myproduct) }}
|
{{ products.getQtyBookableAvailable(myproduct) }}
|
||||||
</span>
|
</span>
|
||||||
<div class="prod_qtywarn">
|
<div class="prod_qtywarn">
|
||||||
<div v-if="tools.isManager() && !!myproduct.QuantitaPrenotateInAttesa
|
<div
|
||||||
">
|
v-if="
|
||||||
|
tools.isManager() && !!myproduct.QuantitaPrenotateInAttesa
|
||||||
|
"
|
||||||
|
>
|
||||||
{{
|
{{
|
||||||
t('ecomm.qta_prenotate_in_attesa', {
|
t('ecomm.qta_prenotate_in_attesa', {
|
||||||
qty: myproduct.QuantitaPrenotateInAttesa,
|
qty: myproduct.QuantitaPrenotateInAttesa,
|
||||||
@@ -236,11 +325,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section v-if="tools.isManager() &&
|
<q-item-section
|
||||||
|
v-if="
|
||||||
|
tools.isManager() &&
|
||||||
products.getQtyBloccataBookableAvailable(myproduct) > 0
|
products.getQtyBloccataBookableAvailable(myproduct) > 0
|
||||||
">
|
"
|
||||||
|
>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
<q-icon name="fas fa-store" style="padding-right: 16px !important" />
|
<q-icon
|
||||||
|
name="fas fa-store"
|
||||||
|
style="padding-right: 16px !important"
|
||||||
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label class="subtit_prod">
|
<q-item-label class="subtit_prod">
|
||||||
@@ -250,7 +345,8 @@
|
|||||||
<span class="text-black q-ml-xs text-h8">
|
<span class="text-black q-ml-xs text-h8">
|
||||||
{{
|
{{
|
||||||
products.getQtyBloccataBookableAvailable(myproduct)
|
products.getQtyBloccataBookableAvailable(myproduct)
|
||||||
}}</span>
|
}}</span
|
||||||
|
>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
@@ -264,13 +360,23 @@
|
|||||||
<q-item-label class="subtit_prod">
|
<q-item-label class="subtit_prod">
|
||||||
{{ t('products.gasordine') }}
|
{{ t('products.gasordine') }}
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label v-if="tools.isArray(myproduct.gasordines) &&
|
<q-item-label
|
||||||
myproduct.gasordines.length > 1 &&
|
v-if="
|
||||||
(!myorder.idGasordine ||
|
tools.isArray(myproduct.gasordines) &&
|
||||||
myorder.quantity + myorder.quantitypreordered === 0)
|
myproduct.gasordines.length > 1 &&
|
||||||
">
|
(!myorder.idGasordine ||
|
||||||
<q-select :behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'" outlined v-model="gasordineSelected"
|
myorder.quantity + myorder.quantitypreordered === 0)
|
||||||
:options="getGasordines()" :label="t('products.select_gasordine') + `:`" emit-value map-options>
|
"
|
||||||
|
>
|
||||||
|
<q-select
|
||||||
|
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||||
|
outlined
|
||||||
|
v-model="gasordineSelected"
|
||||||
|
:options="getGasordines()"
|
||||||
|
:label="t('products.select_gasordine') + `:`"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
>
|
||||||
</q-select>
|
</q-select>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label v-else>
|
<q-item-label v-else>
|
||||||
@@ -281,26 +387,40 @@
|
|||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
<q-item v-if="tools.isManager() && products.getQtyBloccataAvailable(myproduct) > 0
|
<q-item
|
||||||
">
|
v-if="
|
||||||
|
tools.isManager() && products.getQtyBloccataAvailable(myproduct) > 0
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
<q-icon name="fas fa-store" style="padding-right: 16px !important" />
|
<q-icon
|
||||||
|
name="fas fa-store"
|
||||||
|
style="padding-right: 16px !important"
|
||||||
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section v-if="tools.isManager() &&
|
<q-item-section
|
||||||
products.getQtyBloccataAvailable(myproduct) > 0
|
v-if="
|
||||||
">
|
tools.isManager() &&
|
||||||
|
products.getQtyBloccataAvailable(myproduct) > 0
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-item-label> {{ t('ecomm.bloccati') }}: </q-item-label>
|
<q-item-label> {{ t('ecomm.bloccati') }}: </q-item-label>
|
||||||
<q-item-label>
|
<q-item-label>
|
||||||
<span class="text-black q-ml-xs text-h8">
|
<span class="text-black q-ml-xs text-h8">
|
||||||
{{ products.getQtyBloccataAvailable(myproduct) }}</span>
|
{{ products.getQtyBloccataAvailable(myproduct) }}</span
|
||||||
|
>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item v-if="isOrdGas() && myproduct.qtyToReachForGas > 0">
|
<q-item v-if="isOrdGas() && myproduct.qtyToReachForGas > 0">
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
<q-icon v-if="getpercqtaraggiunta() < 1" color="orange" name="fas fa-lightbulb" />
|
<q-icon
|
||||||
|
v-if="getpercqtaraggiunta() < 1"
|
||||||
|
color="orange"
|
||||||
|
name="fas fa-lightbulb"
|
||||||
|
/>
|
||||||
<q-icon v-else color="green" name="fas fa-check" />
|
<q-icon v-else color="green" name="fas fa-check" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
@@ -330,8 +450,11 @@
|
|||||||
<q-linear-progress size="10px" :value="getpercqtaraggiunta()" />
|
<q-linear-progress size="10px" :value="getpercqtaraggiunta()" />
|
||||||
</span>
|
</span>
|
||||||
<div class="prod_qtywarn">
|
<div class="prod_qtywarn">
|
||||||
<div v-if="tools.isManager() && !!myproduct.QuantitaOrdinateInAttesa
|
<div
|
||||||
">
|
v-if="
|
||||||
|
tools.isManager() && !!myproduct.QuantitaOrdinateInAttesa
|
||||||
|
"
|
||||||
|
>
|
||||||
{{
|
{{
|
||||||
t('ecomm.qta_in_attesa', {
|
t('ecomm.qta_in_attesa', {
|
||||||
qty: myproduct.QuantitaOrdinateInAttesa,
|
qty: myproduct.QuantitaOrdinateInAttesa,
|
||||||
@@ -341,19 +464,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section v-if="tools.isManager() &&
|
<q-item-section
|
||||||
|
v-if="
|
||||||
|
tools.isManager() &&
|
||||||
products.getQtyBloccataAvailable(myproduct) > 0
|
products.getQtyBloccataAvailable(myproduct) > 0
|
||||||
">
|
"
|
||||||
|
>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
<q-icon name="fas fa-store" style="padding-right: 16px !important" />
|
<q-icon
|
||||||
|
name="fas fa-store"
|
||||||
|
style="padding-right: 16px !important"
|
||||||
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section v-if="tools.isManager() &&
|
<q-item-section
|
||||||
products.getQtyBloccataAvailable(myproduct) > 0
|
v-if="
|
||||||
">
|
tools.isManager() &&
|
||||||
|
products.getQtyBloccataAvailable(myproduct) > 0
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-item-label> {{ t('ecomm.bloccati') }}: </q-item-label>
|
<q-item-label> {{ t('ecomm.bloccati') }}: </q-item-label>
|
||||||
<q-item-label>
|
<q-item-label>
|
||||||
<span class="text-black q-ml-xs text-h8">
|
<span class="text-black q-ml-xs text-h8">
|
||||||
{{ products.getQtyBloccataAvailable(myproduct) }}</span>
|
{{ products.getQtyBloccataAvailable(myproduct) }}</span
|
||||||
|
>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
@@ -406,11 +539,23 @@
|
|||||||
|
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="row justify-evenly">
|
<div class="row justify-evenly">
|
||||||
<q-btn icon="fas fa-cart-arrow-down" :color="products.enableSubQty(myorder) ? 'negative' : 'grey'"
|
<q-btn
|
||||||
:disable="checkifCartDisable() || !products.enableSubQty(myorder)" rounded size="md" :label="t('products.subcart', {
|
icon="fas fa-cart-arrow-down"
|
||||||
qta: products.qtaNextSub(myorder, myproduct),
|
:color="
|
||||||
})
|
checkifCartDisable() || !products.enableSubQty(myorder)
|
||||||
" @click="addtoCart(false)">
|
? 'grey'
|
||||||
|
: 'negative'
|
||||||
|
"
|
||||||
|
:disable="checkifCartDisable() || !products.enableSubQty(myorder)"
|
||||||
|
rounded
|
||||||
|
size="md"
|
||||||
|
:label="
|
||||||
|
t('products.subcart', {
|
||||||
|
qta: products.qtaNextSub(myorder, myproduct),
|
||||||
|
})
|
||||||
|
"
|
||||||
|
@click="addtoCart(false)"
|
||||||
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-field outlined dense class="q-mx-xs">
|
<q-field outlined dense class="q-mx-xs">
|
||||||
@@ -421,14 +566,35 @@
|
|||||||
</template>
|
</template>
|
||||||
</q-field>
|
</q-field>
|
||||||
|
|
||||||
<q-btn icon-right="fas fa-cart-plus" color="positive" :disable="checkifCartDisable() || !products.enableAddQty(myorder, myproduct)
|
<q-btn
|
||||||
" rounded size="md" :label="t('products.addcart', {
|
icon-right="fas fa-cart-plus"
|
||||||
qta: products.qtaNextAdd(myorder, myproduct),
|
:color="
|
||||||
})
|
checkifCartDisable() || !products.enableAddQty(myorder, myproduct)
|
||||||
" @click="addtoCart(true)">
|
? 'grey'
|
||||||
|
: 'positive'
|
||||||
|
"
|
||||||
|
:disable="
|
||||||
|
checkifCartDisable() || !products.enableAddQty(myorder, myproduct)
|
||||||
|
"
|
||||||
|
rounded
|
||||||
|
size="md"
|
||||||
|
:label="
|
||||||
|
t('products.addcart', {
|
||||||
|
qta: products.qtaNextAdd(myorder, myproduct),
|
||||||
|
})
|
||||||
|
"
|
||||||
|
@click="addtoCart(true)"
|
||||||
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn v-if="myorder.quantity + myorder.quantitypreordered > 0" rounded icon="fas fa-shopping-cart"
|
<q-btn
|
||||||
color="primary" :label="t('ecomm.btn_cassa')" class="q-mb-xs q-mt-md" to="/checkout"></q-btn>
|
v-if="myorder.quantity + myorder.quantitypreordered > 0"
|
||||||
|
rounded
|
||||||
|
icon="fas fa-shopping-cart"
|
||||||
|
color="primary"
|
||||||
|
:label="t('ecomm.btn_cassa')"
|
||||||
|
class="q-mb-xs q-mt-md"
|
||||||
|
to="/checkout"
|
||||||
|
></q-btn>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
@@ -442,7 +608,12 @@
|
|||||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<q-card-section class="q-pa-xs inset-shadow">
|
<q-card-section class="q-pa-xs inset-shadow">
|
||||||
<q-markup-table wrap-cells bordered separator="horizontal" class="listaev__table">
|
<q-markup-table
|
||||||
|
wrap-cells
|
||||||
|
bordered
|
||||||
|
separator="horizontal"
|
||||||
|
class="listaev__table"
|
||||||
|
>
|
||||||
<thead>
|
<thead>
|
||||||
<th>Data</th>
|
<th>Data</th>
|
||||||
<th>Persona</th>
|
<th>Persona</th>
|
||||||
@@ -452,7 +623,11 @@
|
|||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(ordcart, index) of listord" :key="index" class="listaev listaev__table">
|
<tr
|
||||||
|
v-for="(ordcart, index) of listord"
|
||||||
|
:key="index"
|
||||||
|
class="listaev listaev__table"
|
||||||
|
>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<div>
|
<div>
|
||||||
{{ func_tools.getDateTimeShortStr(ordcart.created_at) }}
|
{{ func_tools.getDateTimeShortStr(ordcart.created_at) }}
|
||||||
@@ -470,14 +645,22 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<div v-for="(singleord, index) in ordcart.items" :key="index">
|
<div v-for="(singleord, index) in ordcart.items" :key="index">
|
||||||
<span v-if="singleord.order.idProduct === myproduct._id &&
|
<span
|
||||||
singleord.order.quantity > 0
|
v-if="
|
||||||
">
|
singleord.order.idProduct === myproduct._id &&
|
||||||
{{ singleord.order.quantity }}</span>
|
singleord.order.quantity > 0
|
||||||
<span v-if="singleord.order.idProduct === myproduct._id &&
|
"
|
||||||
singleord.order.quantitypreordered > 0
|
>
|
||||||
">
|
{{ singleord.order.quantity }}</span
|
||||||
{{ singleord.order.quantitypreordered }}</span>
|
>
|
||||||
|
<span
|
||||||
|
v-if="
|
||||||
|
singleord.order.idProduct === myproduct._id &&
|
||||||
|
singleord.order.quantitypreordered > 0
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ singleord.order.quantitypreordered }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
@@ -499,14 +682,38 @@
|
|||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
<q-dialog v-model="isFullScreen" position="top" :maximized="true" class="q-pt-none">
|
<q-dialog
|
||||||
<div v-if="isFullScreen" class="fullscreen-container" @touchmove.prevent @click="toggleFullScreen">
|
v-model="isFullScreen"
|
||||||
<q-img :src="`` + myproduct.productInfo.img" :alt="myproduct.productInfo.name" :fit="tools.isMobile() ? 'fill' : 'none'"
|
position="top"
|
||||||
@touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd" ref="fullscreenImage" />
|
:maximized="true"
|
||||||
|
class="q-pt-none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-if="isFullScreen"
|
||||||
|
class="fullscreen-container"
|
||||||
|
@touchmove.prevent
|
||||||
|
@click="toggleFullScreen"
|
||||||
|
>
|
||||||
|
<q-img
|
||||||
|
:src="`` + myproduct.productInfo.img"
|
||||||
|
:alt="myproduct.productInfo.name"
|
||||||
|
:fit="tools.isMobile() ? 'fill' : 'none'"
|
||||||
|
@touchstart="onTouchStart"
|
||||||
|
@touchmove="onTouchMove"
|
||||||
|
@touchend="onTouchEnd"
|
||||||
|
ref="fullscreenImage"
|
||||||
|
/>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<q-btn class="q-ma-md" @click="isFullScreen = false" label="Chiudi" rounded color="primary" icon="close"></q-btn>
|
<q-btn
|
||||||
|
class="q-ma-md"
|
||||||
|
@click="isFullScreen = false"
|
||||||
|
label="Chiudi"
|
||||||
|
rounded
|
||||||
|
color="primary"
|
||||||
|
icon="close"
|
||||||
|
></q-btn>
|
||||||
</div>
|
</div>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -388,9 +388,11 @@ h3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.my-card-prod {
|
.my-card-prod {
|
||||||
|
transition: box-shadow 0.3s; /* Add a transition for a smooth effect */
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
padding: 1rem 1rem;
|
padding: 0.5rem 0.5rem;
|
||||||
|
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
|
||||||
|
|||||||
@@ -300,11 +300,7 @@ export default defineComponent({
|
|||||||
title: 'Ordine'
|
title: 'Ordine'
|
||||||
}).onOk(async () => {
|
}).onOk(async () => {
|
||||||
|
|
||||||
let options = {
|
statusnow.value = await productStore.UpdateOrderCartStatus({ order_id: order._id, status })
|
||||||
// userIdStore: order.items ? order.items[0].order.storehouse.username : '',
|
|
||||||
}
|
|
||||||
|
|
||||||
statusnow.value = await productStore.UpdateOrderCartStatus({ order_id: order._id, status, options })
|
|
||||||
|
|
||||||
if (statusnow.value === status) {
|
if (statusnow.value === status) {
|
||||||
order.status = statusnow.value
|
order.status = statusnow.value
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div
|
<div
|
||||||
class="q-gutter-y-md column text-center q-mx-auto q-py-sm q-mb-sm"
|
class="column text-center q-mx-auto q-py-sm q-mb-sm"
|
||||||
style="width: 350px; max-width: 100%"
|
style="width: 350px; max-width: 100%"
|
||||||
>
|
>
|
||||||
<q-input
|
<q-input
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row justify-around">
|
<div class="row justify-around">
|
||||||
<div
|
<div
|
||||||
class="q-pa-md row items-start"
|
class="q-pa-xs row items-start"
|
||||||
v-for="(product, index) in getArrProducts"
|
v-for="(product, index) in getArrProducts"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user