- preordinabili corretti + altro

This commit is contained in:
Surya Paolo
2023-12-29 21:17:25 +01:00
parent c0998753c2
commit 632d05bbfb
13 changed files with 192 additions and 67 deletions

View File

@@ -1039,6 +1039,7 @@ export const shared_consts = {
RECEIVED: 7, RECEIVED: 7,
COMPLETED: 6, COMPLETED: 6,
CANCELED: 10, CANCELED: 10,
DELETE_REALLY: 20,
}, },
OrderStat: { OrderStat: {
@@ -1102,14 +1103,14 @@ export const shared_consts = {
label: 'Ricevuto', label: 'Ricevuto',
value: 7, value: 7,
}, },
{
label: 'Completato',
value: 8,
},
{ {
label: 'Cancellato', label: 'Cancellato',
value: 10, value: 10,
}, },
{
label: 'Elimina Definitivamente !!',
value: 20,
},
], ],
@@ -1150,6 +1151,12 @@ export const shared_consts = {
icon: 'delete', icon: 'delete',
color: 'red', color: 'red',
}, },
{
label: 'Cancella Definitivamente', //DELETE_REALLY
value: 20,
icon: 'delete',
color: 'red',
},
], ],
ConfSite: { ConfSite: {

View File

@@ -58,3 +58,7 @@
font-size: 1.15rem; font-size: 1.15rem;
font-weight: bold; font-weight: bold;
} }
.subtit_prod {
font-style: italic;
}

View File

@@ -60,7 +60,7 @@ export default defineComponent({
idStorehouse: '', idStorehouse: '',
idGasordine: '', idGasordine: '',
storehouse: {}, storehouse: {},
gasordine: {active: false}, gasordine: { active: false },
}) })
const storeSelected = ref('') const storeSelected = ref('')
@@ -138,9 +138,11 @@ export default defineComponent({
try { try {
const mygas = gasordine const mygas = gasordine
if (mygas) if (mygas)
return mygas.name + ' (' + mygas.city + ') ' + t('gas.dataora_chiusura_ordini') + ': ' + tools.getstrDateShort(mygas.dataora_chiusura_ordini) /*return mygas.name + ' (' + mygas.city + ') ' + t('gas.dataora_chiusura_ordini') + ': ' + tools.getstrDateShort(mygas.dataora_chiusura_ordini)
+ ' ' + t('gas.data_arrivo_merce') + ': ' + tools.getstrDateShort(mygas.data_arrivo_merce) + ' ' + t('gas.data_arrivo_merce') + ': ' + tools.getstrDateShort(mygas.data_arrivo_merce)
+ ' ' + t('gas.dataora_ritiro') + ': ' + tools.getstrDateShort(mygas.dataora_ritiro) + ' ' + t('gas.dataora_ritiro') + ': ' + tools.getstrDateShort(mygas.dataora_ritiro)*/
return mygas.name
else else
return '' return ''
} catch (e) { } catch (e) {
@@ -327,10 +329,6 @@ export default defineComponent({
endload.value = true endload.value = true
} }
function getmycardcl() {
return (props.complete) ? 'my-card-big' : 'my-card-prod'
}
function getclimgproduct() { function getclimgproduct() {
return 'myimgproduct centermydiv' return 'myimgproduct centermydiv'
} }
@@ -362,7 +360,6 @@ export default defineComponent({
visuListBookable, visuListBookable,
addtoCart, addtoCart,
iconWhishlist, iconWhishlist,
getmycardcl,
getclimgproduct, getclimgproduct,
getnumstore, getnumstore,
getSingleStorehouse, getSingleStorehouse,

View File

@@ -3,7 +3,12 @@
<q-spinner v-if="!endload" color="primary" size="3em" :thickness="2" /> <q-spinner v-if="!endload" color="primary" size="3em" :thickness="2" />
<q-card <q-card
:class="getmycardcl()" :class="{
'my-card-big': complete,
'my-card-prod': !complete,
'my-card-selected':
myorder && myorder.quantity + myorder.quantitypreordered > 0,
}"
v-if="!!myproduct && endload && !!myproduct.productInfo" v-if="!!myproduct && endload && !!myproduct.productInfo"
bordered bordered
> >
@@ -21,7 +26,7 @@
color="primary" color="primary"
icon="fas fa-info" icon="fas fa-info"
class="absolute semi-transparent" class="absolute semi-transparent"
style="top: 0; right: 12px; transform: translateY(-50%)" style="top: 0; right: 12px; transform: translateY(-90%)"
:to="`/product/` + myproduct._id + '/' + cosa" :to="`/product/` + myproduct._id + '/' + cosa"
/> />
@@ -50,7 +55,7 @@
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label> <q-item-label class="subtit_prod">
{{ t('products.price') }} {{ t('products.price') }}
</q-item-label> </q-item-label>
<q-item-label> <q-item-label>
@@ -102,7 +107,7 @@
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label> <q-item-label class="subtit_prod">
{{ t('products.gasordine') }} {{ t('products.gasordine') }}
</q-item-label> </q-item-label>
<q-item-label <q-item-label
@@ -137,11 +142,11 @@
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label> <q-item-label class="subtit_prod">
{{ t('gas.dataora_chiusura_ordini') }} {{ t('gas.dataora_chiusura_ordini') }}
</q-item-label> </q-item-label>
<q-item-label class="countdown_scadenza"> <q-item-label class="countdown_scadenza">
{{ timerLabelScadenza }} {{ timerLabelScadenza }}
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
@@ -150,12 +155,12 @@
<q-icon color="red" name="fas fa-shipping-fast" /> <q-icon color="red" name="fas fa-shipping-fast" />
</q-item-section> </q-item-section>
<q-item-section> <q-item-section class="subtit_prod">
<q-item-label> <q-item-label>
{{ t('gas.data_arrivo_merce') }} {{ t('gas.data_arrivo_merce') }}
</q-item-label> </q-item-label>
<q-item-label class="countdown_scadenza"> <q-item-label class="countdown_scadenza">
{{ labelDataArrivoMerce }} {{ labelDataArrivoMerce }}
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
@@ -165,11 +170,11 @@
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label> <q-item-label class="subtit_prod">
{{ t('gas.dataora_ritiro') }} {{ t('gas.dataora_ritiro') }}
</q-item-label> </q-item-label>
<q-item-label class="countdown_scadenza"> <q-item-label class="countdown_scadenza">
{{ labelDataRitiro }} {{ labelDataRitiro }}
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
@@ -205,17 +210,24 @@
<q-item <q-item
v-if=" v-if="
cosa === shared_consts.PROD.BOTTEGA || cosa === shared_consts.PROD.BOTTEGA ||
(cosa === shared_consts.PROD.GAS && products.getQtyAvailable(myproduct) > 0) (cosa === shared_consts.PROD.GAS &&
products.getQtyAvailable(myproduct) > 0)
" "
:clickable="tools.isManager()" :clickable="tools.isManager()"
@click="tools.isManager() && (myproduct.QuantitaOrdinateInAttesa && myproduct.QuantitaOrdinateInAttesa > 0) ? visuListDisponibili() : null" @click="
tools.isManager() &&
myproduct.QuantitaOrdinateInAttesa &&
myproduct.QuantitaOrdinateInAttesa > 0
? visuListDisponibili()
: null
"
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon color="green" name="fas fa-store" /> <q-icon color="green" name="fas fa-store" />
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label> <q-item-label class="subtit_prod">
{{ t('ecomm.available') }} {{ t('ecomm.available') }}
</q-item-label> </q-item-label>
<q-item-label> <q-item-label>
@@ -236,20 +248,54 @@
</div> </div>
</div> </div>
</q-item-label> </q-item-label>
<q-item-label> </q-item-label> </q-item-section>
<q-item-section
v-if="
tools.isManager() &&
products.getQtyBloccataAvailable(myproduct) > 0
"
>
<q-item-section avatar>
<q-icon
name="fas fa-store"
style="padding-right: 16px !important"
/>
</q-item-section>
<q-item-section
v-if="
tools.isManager() &&
products.getQtyBloccataAvailable(myproduct) > 0
"
>
<q-item-label> {{ t('ecomm.bloccati') }}: </q-item-label>
<q-item-label>
<span class="text-black q-ml-xs text-h8">
{{ products.getQtyBloccataAvailable(myproduct) }}</span
>
</q-item-label>
</q-item-section>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item <q-item
v-if="products.getQtyBookableAvailable(myproduct) > 0 || myproduct.bookableQty > 0" v-if="
products.getQtyBookableAvailable(myproduct) > 0 ||
myproduct.bookableQty > 0
"
:clickable="tools.isManager()" :clickable="tools.isManager()"
@click="tools.isManager() && (myproduct.QuantitaPrenotateInAttesa && myproduct.QuantitaPrenotateInAttesa > 0) ? visuListBookable() : null" @click="
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>
<q-item-section> <q-item-section>
<q-item-label> <q-item-label class="subtit_prod">
{{ t('ecomm.preorders') }} {{ t('ecomm.preorders') }}
</q-item-label> </q-item-label>
<q-item-label> <q-item-label>
@@ -271,6 +317,27 @@
</div> </div>
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
<q-item-section
v-if="
tools.isManager() &&
products.getQtyBloccataBookableAvailable(myproduct) > 0
"
>
<q-item-section avatar>
<q-icon
name="fas fa-store"
style="padding-right: 16px !important"
/>
</q-item-section>
<q-item-section>
<q-item-label class="subtit_prod"> {{ t('ecomm.bloccati') }}: </q-item-label>
<q-item-label>
<span class="text-black q-ml-xs text-h8">
{{ products.getQtyBloccataBookableAvailable(myproduct) }}</span
>
</q-item-label>
</q-item-section>
</q-item-section>
</q-item> </q-item>
</q-list> </q-list>
<div v-if="complete || getnumstore() > 1"> <div v-if="complete || getnumstore() > 1">
@@ -309,16 +376,16 @@
:disable="checkifCartDisable() || !products.enableSubQty(myorder)" :disable="checkifCartDisable() || !products.enableSubQty(myorder)"
rounded rounded
size="md" size="md"
:label="t('products.subcart', { qta: products.qtaNextSub(myorder, myproduct) })" :label="
t('products.subcart', {
qta: products.qtaNextSub(myorder, myproduct),
})
"
@click="addtoCart(false)" @click="addtoCart(false)"
> >
</q-btn> </q-btn>
<q-field <q-field outlined dense class="q-mx-xs">
outlined
dense
class="q-mx-xs"
>
<template v-slot:control> <template v-slot:control>
<div class="no-outline label-qta text-center" tabindex="0"> <div class="no-outline label-qta text-center" tabindex="0">
{{ myorder.quantity + myorder.quantitypreordered }} {{ myorder.quantity + myorder.quantitypreordered }}
@@ -329,10 +396,16 @@
<q-btn <q-btn
icon-right="fas fa-cart-plus" icon-right="fas fa-cart-plus"
color="positive" color="positive"
:disable="checkifCartDisable() || !products.enableAddQty(myorder, myproduct)" :disable="
checkifCartDisable() || !products.enableAddQty(myorder, myproduct)
"
rounded rounded
size="md" size="md"
:label="t('products.addcart', { qta: products.qtaNextAdd(myorder, myproduct) })" :label="
t('products.addcart', {
qta: products.qtaNextAdd(myorder, myproduct),
})
"
@click="addtoCart(true)" @click="addtoCart(true)"
> >
</q-btn> </q-btn>

View File

@@ -375,6 +375,18 @@ h3 {
} }
} }
.my-card-selected {
transition: box-shadow 0.3s; /* Add a transition for a smooth effect */
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important;
color: blue;
background-color: lightblue;
}
.my-card-prod:hover {
transition: transform .2s;
transform: scale(1.02);
}
.my-card-prod { .my-card-prod {
width: 100%; width: 100%;
max-width: 300px; max-width: 300px;

View File

@@ -9,6 +9,7 @@ const msg_website_enUs = {
quantity: 'Quantità', quantity: 'Quantità',
quantityAvailable: 'Disponibili', quantityAvailable: 'Disponibili',
stockQty: 'In Magazzino', stockQty: 'In Magazzino',
stockBloccatiQty: 'Bloccati In Magazzino',
weight: 'Peso', weight: 'Peso',
stars: 'Voto', stars: 'Voto',
color: 'Colore', color: 'Colore',

View File

@@ -41,10 +41,12 @@ export interface IProduct {
QuantitaOrdinateInAttesa?: number, QuantitaOrdinateInAttesa?: number,
QuantitaPrenotateInAttesa?: number, QuantitaPrenotateInAttesa?: number,
stockQty: number, stockQty: number,
stockBloccatiQty: number,
minBuyQty: number, minBuyQty: number,
minStepQty?: number, minStepQty: number,
maxBookableQty: number, maxBookableQty: number,
bookableQty: number, bookableQty: number,
bookableBloccatiQty: number,
canBeShipped?: boolean, canBeShipped?: boolean,
canBeBuyOnline?: boolean, canBeBuyOnline?: boolean,
} }
@@ -135,6 +137,7 @@ export interface IStorehouse {
email_html_footer?: string, email_html_footer?: string,
email_html_makeorder?: string, email_html_makeorder?: string,
email_html_order_confirmed?: string, email_html_order_confirmed?: string,
email_html_order_consegnato?: string,
} }
export interface IProvider { export interface IProvider {
@@ -211,8 +214,6 @@ export interface IOrderCart {
date_spedito?: Date date_spedito?: Date
ricevuto: boolean ricevuto: boolean
date_ricevuto?: Date date_ricevuto?: Date
completato: boolean
date_completato?: Date
created_at: Date created_at: Date
note: string note: string
} }

View File

@@ -417,6 +417,7 @@ export default defineComponent({
strris += addfield(col, 'bookableQty', rec, false, true); col++; strris += addfield(col, 'bookableQty', rec, false, true); col++;
strris += addfield(col, 'sconto1', rec, false, true); col++; strris += addfield(col, 'sconto1', rec, false, true); col++;
strris += addfield(col, 'sconto2', rec, false, true); col++; strris += addfield(col, 'sconto2', rec, false, true); col++;
strris += addfield(col, 'gas_name', rec, false, true); col++;
strris += '} ' strris += '} '
} else if (cmd === shared_consts.Cmd.CITIES_SERVER) { } else if (cmd === shared_consts.Cmd.CITIES_SERVER) {
@@ -440,7 +441,7 @@ export default defineComponent({
if (cmd === shared_consts.Cmd.CITIES_SERVER) { if (cmd === shared_consts.Cmd.CITIES_SERVER) {
userStore.importToServerCmd($q, t, cmd, null) userStore.importToServerCmd($q, t, cmd, null)
} else if (cmd === shared_consts.Cmd.PRODUCTS) { } else if (cmd === shared_consts.Cmd.PRODUCTS) {
let options = { aggiornaStockQta: checkAggiornaQta.value } let options = { aggiornaStockQty: checkAggiornaQta.value }
if (importasulserver.value) if (importasulserver.value)
userStore.importToServerCmd($q, t, cmd, { arrdata: strris, options }) userStore.importToServerCmd($q, t, cmd, { arrdata: strris, options })
} }
@@ -471,7 +472,7 @@ export default defineComponent({
} }
function eseguiCmdProduct() { function eseguiCmdProduct() {
let options = { aggiornaStockQta: checkAggiornaQta.value } let options = { aggiornaStockQty: checkAggiornaQta.value }
userStore.importToServerCmd($q, t, cosafare.value, { arrdata: risultato.value, options }) userStore.importToServerCmd($q, t, cosafare.value, { arrdata: risultato.value, options })
} }

View File

@@ -62,7 +62,9 @@ const msg_it = {
quantity: 'Quantità', quantity: 'Quantità',
quantityAvailable: 'Disponibili', quantityAvailable: 'Disponibili',
stockQty: 'In Magazzino', stockQty: 'In Magazzino',
stockBloccatiQty: 'Bloccati In Magazzino',
minBuyQty: 'Qta minima acquistabile', minBuyQty: 'Qta minima acquistabile',
minStepQty: 'Step Minimo',
maxBookableQty: 'Qtà massima prenotabile singolarm.', maxBookableQty: 'Qtà massima prenotabile singolarm.',
bookableQty: 'Prenotabili', bookableQty: 'Prenotabili',
bookableAvailableQty: 'Disponib. Prenotabili', bookableAvailableQty: 'Disponib. Prenotabili',
@@ -1120,8 +1122,9 @@ const msg_it = {
icon: 'Icona', icon: 'Icona',
email_html_header: 'Instestazione', email_html_header: 'Instestazione',
email_html_footer: 'Footer', email_html_footer: 'Footer',
email_html_makeorder: 'Ordine Inviato', email_html_makeorder: '1) Ordine Ricevuto',
email_html_order_confirmed: 'Ordine Confermato', email_html_order_confirmed: '2) Ordine Confermato da noi',
email_html_order_consegnato: '3) Ordine Completato Correttamente',
}, },
sectors: { sectors: {
name: 'Settore', name: 'Settore',
@@ -1671,7 +1674,6 @@ const msg_it = {
consegnato: 'Ordine Consegnato', consegnato: 'Ordine Consegnato',
pagato: 'Ordine Pagato', pagato: 'Ordine Pagato',
spedito: 'Ordine Spedito', spedito: 'Ordine Spedito',
completed: 'Ordine Completato',
ricevuto: 'Prodotti Ricevuti', ricevuto: 'Prodotti Ricevuti',
listaord: 'Lista Ordini', listaord: 'Lista Ordini',
carrello_vuoto: 'Il Carrello è Vuoto', carrello_vuoto: 'Il Carrello è Vuoto',
@@ -1686,6 +1688,7 @@ const msg_it = {
code_add_to_cart: 'Aggiungi un codice al carrello', code_add_to_cart: 'Aggiungi un codice al carrello',
qta_prenotate_in_attesa: '(Preordinate In attesa {qty})', qta_prenotate_in_attesa: '(Preordinate In attesa {qty})',
prodotti_trovati: '{qta} Prodotti trovati su {qtatot}', prodotti_trovati: '{qta} Prodotti trovati su {qtatot}',
bloccati: 'Bloccati',
}, },
gas: { gas: {
name: 'Ordine Gas', name: 'Ordine Gas',

View File

@@ -439,6 +439,7 @@ export const colTableStorehouse = [
AddCol({ name: 'email_html_footer', label_trans: 'store.email_html_footer', fieldtype: costanti.FieldType.html }), AddCol({ name: 'email_html_footer', label_trans: 'store.email_html_footer', fieldtype: costanti.FieldType.html }),
AddCol({ name: 'email_html_makeorder', label_trans: 'store.email_html_makeorder', fieldtype: costanti.FieldType.html }), AddCol({ name: 'email_html_makeorder', label_trans: 'store.email_html_makeorder', fieldtype: costanti.FieldType.html }),
AddCol({ name: 'email_html_order_confirmed', label_trans: 'store.email_html_order_confirmed', fieldtype: costanti.FieldType.html }), AddCol({ name: 'email_html_order_confirmed', label_trans: 'store.email_html_order_confirmed', fieldtype: costanti.FieldType.html }),
AddCol({ name: 'email_html_order_consegnato', label_trans: 'store.email_html_order_consegnato', fieldtype: costanti.FieldType.html }),
AddCol(DeleteRec), AddCol(DeleteRec),
AddCol(DuplicateRec), AddCol(DuplicateRec),
] ]
@@ -2050,6 +2051,11 @@ export const colTableProducts = [
label_trans: 'products.minBuyQty', label_trans: 'products.minBuyQty',
fieldtype: costanti.FieldType.number fieldtype: costanti.FieldType.number
}), }),
AddCol({
name: 'minStepQty',
label_trans: 'products.minStepQty',
fieldtype: costanti.FieldType.number
}),
AddCol({ AddCol({
name: 'maxBookableQty', name: 'maxBookableQty',
label_trans: 'products.maxBookableQty', label_trans: 'products.maxBookableQty',
@@ -2065,6 +2071,16 @@ export const colTableProducts = [
label_trans: 'products.bookableQty', label_trans: 'products.bookableQty',
fieldtype: costanti.FieldType.number fieldtype: costanti.FieldType.number
}), }),
AddCol({
name: 'stockBloccatiQty',
label_trans: 'products.stockBloccatiQty',
fieldtype: costanti.FieldType.number
}),
AddCol({
name: 'bookableBloccatiQty',
label_trans: 'products.bookableBloccatiQty',
fieldtype: costanti.FieldType.number
}),
AddCol({ name: 'canBeShipped', label_trans: 'products.canBeShipped', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'canBeShipped', label_trans: 'products.canBeShipped', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'canBeBuyOnline', label_trans: 'products.canBeBuyOnline', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'canBeBuyOnline', label_trans: 'products.canBeBuyOnline', fieldtype: costanti.FieldType.boolean }),
AddCol(DeleteRec), AddCol(DeleteRec),

View File

@@ -41,7 +41,9 @@ function getRecordProductEmpty() {
}, },
storehouses: [], scontisticas: [], storehouses: [], scontisticas: [],
price: 0, stockQty: 0, bookableQty: 0, gasordines: [], price: 0, stockQty: 0, bookableQty: 0, gasordines: [],
stockBloccatiQty: 0, bookableBloccatiQty: 0,
idGasordines: [], minBuyQty: 1, maxBookableQty: 0, idGasordines: [], minBuyQty: 1, maxBookableQty: 0,
minStepQty: 1,
} }
} }
@@ -303,10 +305,12 @@ export const useProducts = defineStore('Products', {
quantityAvailable: 0, quantityAvailable: 0,
bookableAvailableQty: 0, bookableAvailableQty: 0,
stockQty: 0, stockQty: 0,
stockBloccatiQty: 0,
minBuyQty: 1, minBuyQty: 1,
minStepQty: 1, minStepQty: 1,
maxBookableQty: 0, maxBookableQty: 0,
bookableQty: 0, bookableQty: 0,
bookableBloccatiQty: 0,
canBeShipped: false, canBeShipped: false,
QuantitaOrdinateInAttesa: 0, QuantitaOrdinateInAttesa: 0,
QuantitaPrenotateInAttesa: 0, QuantitaPrenotateInAttesa: 0,
@@ -821,6 +825,16 @@ export const useProducts = defineStore('Products', {
return qty return qty
}, },
getQtyBloccataAvailable(myproduct: IProduct): number {
let qty = myproduct.stockBloccatiQty
return qty
},
getQtyBloccataBookableAvailable(myproduct: IProduct): number {
let qty = myproduct.bookableBloccatiQty
return qty
},
enableSubQty(myorder: IOrder): boolean { enableSubQty(myorder: IOrder): boolean {
let qty = myorder.quantity + myorder.quantitypreordered let qty = myorder.quantity + myorder.quantitypreordered
return qty ? qty > 0 : false return qty ? qty > 0 : false
@@ -846,21 +860,21 @@ export const useProducts = defineStore('Products', {
}, },
qtaNextAdd(myorder: IOrder, myproduct: IProduct): number { qtaNextAdd(myorder: IOrder, myproduct: IProduct): number {
let step = 1 let step = myproduct.minStepQty
if (this.getQtyAvailable(myproduct) > 0) { if (this.getQtyAvailable(myproduct) > 0) {
if (myorder.quantity === 0) if (myorder.quantity === 0)
step = myproduct.minBuyQty | 1 step = myproduct.minBuyQty
} else { } else {
if (myorder.quantitypreordered === 0) if (myorder.quantitypreordered === 0)
step = myproduct.minBuyQty | 1 step = myproduct.minBuyQty
} }
return step return step
}, },
qtaNextSub(myorder: IOrder, myproduct: IProduct) { qtaNextSub(myorder: IOrder, myproduct: IProduct) {
let step = 1 let step = myproduct.minStepQty
let minqta = myproduct.minBuyQty | 1 let minqta = myproduct.minBuyQty
if (this.getQtyAvailable(myproduct) > 0) { if (this.getQtyAvailable(myproduct) > 0) {
if (myorder.quantity === minqta) if (myorder.quantity === minqta)
step = minqta step = minqta

View File

@@ -183,8 +183,8 @@
<q-td key="created_at" :props="props"> <q-td key="created_at" :props="props">
{{ tools.getstrDateTime(props.row.created_at) }} {{ tools.getstrDateTime(props.row.created_at) }}
<span v-if="taborders === shared_consts.OrderStat.COMPLETATI"> <span v-if="taborders === shared_consts.OrderStat.COMPLETATI">
<br />Completato il:<br />{{ <br />Consegnato il:<br />{{
tools.getstrDateTime(props.row.date_completato) tools.getstrDateTime(props.row.date_consegnato)
}} }}
</span> </span>
</q-td> </q-td>
@@ -214,22 +214,18 @@
{{ tools.getstrDateTime(props.row.date_evaso) }}: {{ tools.getstrDateTime(props.row.date_evaso) }}:
<span class="ordstat evaso">{{ $t('ecomm.evaso') }}</span> <span class="ordstat evaso">{{ $t('ecomm.evaso') }}</span>
</div> </div>
<div v-if="props.row.consegnato" class="ordstat">
{{ tools.getstrDateTime(props.row.date_consegnato) }}:
<span class="ordstat">{{ $t('ecomm.consegnato') }}</span>
</div>
<div v-if="props.row.pagato" class="ordstat"> <div v-if="props.row.pagato" class="ordstat">
{{ tools.getstrDateTime(props.row.date_pagato) }}: {{ tools.getstrDateTime(props.row.date_pagato) }}:
<span class="ordstat">{{ $t('ecomm.pagato') }}</span> <span class="ordstat">{{ $t('ecomm.pagato') }}</span>
</div> </div>
<div v-if="props.row.consegnato" class="ordstat">
{{ tools.getstrDateTime(props.row.date_consegnato) }}:
<span class="ordstat">{{ $t('ecomm.consegnato') }}</span>
</div>
<div v-if="props.row.spedito"> <div v-if="props.row.spedito">
{{ tools.getstrDateTime(props.row.date_spedito) }}: {{ tools.getstrDateTime(props.row.date_spedito) }}:
<span class="ordstat">{{ $t('ecomm.spedito') }}</span> <span class="ordstat">{{ $t('ecomm.spedito') }}</span>
</div> </div>
<div v-if="props.row.completato">
{{ tools.getstrDateTime(props.row.date_completato) }}:
<span class="ordstat">{{ $t('ecomm.completed') }}</span>
</div>
<div v-if="props.row.ricevuto"> <div v-if="props.row.ricevuto">
{{ tools.getstrDateTime(props.row.date_ricevuto) }}: {{ tools.getstrDateTime(props.row.date_ricevuto) }}:
<span class="ordstat">{{ $t('ecomm.ricevuto') }}</span> <span class="ordstat">{{ $t('ecomm.ricevuto') }}</span>

View File

@@ -1,8 +1,8 @@
<template> <template>
<q-page> <q-page class="q-pa-md">
<div class="panel"> <div class="panel">
<div class="container"> <div class="container">
<div class="row"> <div class="row justify-center">
<CProductCard :id="id" :cosa="cosa" :complete="true"/> <CProductCard :id="id" :cosa="cosa" :complete="true"/>
</div> </div>
</div> </div>