diff --git a/src/components/CProductCard/CProductCard.ts b/src/components/CProductCard/CProductCard.ts index bb8aba1e..173c9c51 100755 --- a/src/components/CProductCard/CProductCard.ts +++ b/src/components/CProductCard/CProductCard.ts @@ -142,7 +142,7 @@ export default defineComponent({ + ' ' + t('gas.data_arrivo_merce') + ': ' + tools.getstrDateShort(mygas.data_arrivo_merce) + ' ' + t('gas.dataora_ritiro') + ': ' + tools.getstrDateShort(mygas.dataora_ritiro)*/ - return mygas.name + return mygas.name else return '' } catch (e) { @@ -352,6 +352,17 @@ export default defineComponent({ }, 0)) } + function isOrdGas(): boolean { + return myproduct.value && myproduct.value.idGasordines ? myproduct.value.idGasordines.length > 0 : false + } + + function getpercqtaraggiunta(): number { + if (myproduct.value) + return tools.calcperc(myproduct.value.bookedGASQtyOrdered, myproduct.value.qtyToReachForGas) / 100 + else + return 0 + } + onMounted(mounted) onBeforeUnmount(beforeDestroy) @@ -389,6 +400,8 @@ export default defineComponent({ timerLabelScadenza, labelDataRitiro, labelDataArrivoMerce, + getpercqtaraggiunta, + isOrdGas, } } }) diff --git a/src/components/CProductCard/CProductCard.vue b/src/components/CProductCard/CProductCard.vue index 21f0c68a..13496661 100755 --- a/src/components/CProductCard/CProductCard.vue +++ b/src/components/CProductCard/CProductCard.vue @@ -136,13 +136,127 @@ + + + + + + + + + + + + + + + + {{ t('ecomm.bloccati') }}: + + + {{ products.getQtyBloccataAvailable(myproduct) }} + + + + + + + + + + + + + {{ + t('ecomm.offerta_gas_raggiunta', { + qta: myproduct.qtyToReachForGas, + unit: tools.getUnitsMeasure(myproduct.productInfo.unit, true), + }) + }} + {{ + t('ecomm.offerta_gas', { + qta: myproduct.qtyToReachForGas, + unit: tools.getUnitsMeasure(myproduct.productInfo.unit, true), + }) + }} + + + + {{ + t('ecomm.bookedGASQtyOrdered_str', { + qta: myproduct.bookedGASQtyOrdered, + qtatot: myproduct.qtyToReachForGas, + }) + }} + + +
+
+ {{ + t('ecomm.qta_in_attesa', { + qty: myproduct.QuantitaOrdinateInAttesa, + }) + }} +
+
+
+
+ + + + + + {{ t('ecomm.bloccati') }}: + + + {{ products.getQtyBloccataAvailable(myproduct) }} + + + +
- + {{ t('gas.dataora_chiusura_ordini') }} @@ -207,79 +321,10 @@
- - - - - - - - {{ t('ecomm.available') }} - - - - {{ products.getQtyAvailable(myproduct) }} - -
-
- {{ - t('ecomm.qta_in_attesa', { - qty: myproduct.QuantitaOrdinateInAttesa, - }) - }} -
-
-
-
- - - - - - {{ t('ecomm.bloccati') }}: - - - {{ products.getQtyBloccataAvailable(myproduct) }} - - - -
{{ t('ecomm.bloccati') }}: + + {{ t('ecomm.bloccati') }}: + - {{ products.getQtyBloccataBookableAvailable(myproduct) }} diff --git a/src/model/Products.ts b/src/model/Products.ts index ced3e1f4..26556089 100755 --- a/src/model/Products.ts +++ b/src/model/Products.ts @@ -12,7 +12,7 @@ export interface IProductInfo { color?: string, size?: string, weight?: number, - unit?: number, + unit: number, stars?: number, date?: Date, icon?: string, @@ -40,15 +40,22 @@ export interface IProduct { bookableAvailableQty?: number, QuantitaOrdinateInAttesa?: number, QuantitaPrenotateInAttesa?: number, - stockQty: number, - stockBloccatiQty: number, - minBuyQty: number, - minStepQty: number, - maxBookableQty: number, - bookableQty: number, - bookableBloccatiQty: number, - canBeShipped?: boolean, - canBeBuyOnline?: boolean, + note?: string + + stockQty: number, // UPDATING + stockBloccatiQty: number, // UPDATING + bookedQtyConfirmed: number // UPDATING + + qtyToReachForGas: number + maxbookableGASQty: number + bookedGASQtyOrdered: number // UPDATING + bookableGASBloccatiQty: number // UPDATING + + minBuyQty: number + minStepQty: number + maxBookableSinglePersQty: number + canBeShipped?: boolean + canBeBuyOnline?: boolean } export interface IBaseOrder { @@ -136,8 +143,11 @@ export interface IStorehouse { email_html_header?: string, email_html_footer?: string, email_html_makeorder?: string, + email_html_GAS_makeorder?: string, email_html_order_confirmed?: string, + email_html_GAS_order_confirmed?: string, email_html_order_consegnato?: string, + email_html_GAS_order_consegnato?: string, } export interface IProvider { @@ -204,8 +214,8 @@ export interface IOrderCart { nameSurname?: string status: number modify_at?: Date - evaso: boolean - date_evaso?: Date + confermato: boolean + date_confermato?: Date consegnato: boolean date_consegnato?: Date pagato: boolean diff --git a/src/rootgen/admin/importdata/importdata.ts b/src/rootgen/admin/importdata/importdata.ts index 221aa9f4..f0509c11 100755 --- a/src/rootgen/admin/importdata/importdata.ts +++ b/src/rootgen/admin/importdata/importdata.ts @@ -337,21 +337,28 @@ export default defineComponent({ return importNoSpazi(cmd, testo); } - function addfield(col: number, field: string, rec: any, conv_euro: boolean, isnumero?: boolean, strinput?: string, primo?: boolean) { + function addfield(col: number, field: string, rec: any, opt: any) { let risultato = '' - let valstr = strinput ? strinput : rec[col] - if (isnumero) { - valstr = valstr.replace(',', '.'); - } - if (conv_euro) { - valstr = tools.convertPriceEurToValue(valstr) - } - valstr = tools.removeescape(tools.addslashes(valstr)) - if (!primo) - risultato += ', ' + try { + let valstr = opt.strinput ? opt.strinput : rec[col] - risultato += '"' + field + '":"' + valstr + '"' - return risultato; + if (opt.isnumero) { + if (valstr === '') + valstr = '0'; + valstr = valstr.replace(',', '.'); + } + if (opt.iseuro) { + valstr = tools.convertPriceEurToValue(valstr) + } + valstr = tools.removeescape(tools.addslashes(valstr)) + if (!opt.primo) + risultato += ', ' + + risultato += '"' + field + '":"' + valstr + '"' + return risultato; + } catch (e) { + console.error('err', e); + } } const myarr = tools.CSVToArray(testo, delim) @@ -395,29 +402,32 @@ export default defineComponent({ if (!primo) { strris += ', ' } + strris += '{ ' let col = 0; - strris += addfield(col, 'idapp', rec, false, false, tools.appid(), true); - strris += addfield(col, 'code', rec, false); col++; - strris += addfield(col, 'name', rec, false); col++; - strris += addfield(col, 'price', rec, true); col++; - strris += addfield(col, 'stockQty', rec, true); col++; + strris += addfield(col, 'idapp', rec, { strinput: tools.appid(), primo: true }); + strris += addfield(col, 'code', rec, {}); col++; + strris += addfield(col, 'name', rec, {}); col++; + strris += addfield(col, 'price', rec, { iseuro: true }); col++; + strris += addfield(col, 'stockQty', rec, { isnumero: true }); col++; col++; - strris += addfield(col, 'weight', rec, false, true); col++; - strris += addfield(col, 'unit', rec, false); col++; - strris += addfield(col, 'link', rec, false); col++; - strris += addfield(col, 'perc_iva', rec, false); col++; - strris += addfield(col, 'price_acquistato', rec, true); col++; - strris += addfield(col, 'minBuyQty', rec, false, true); col++; - strris += addfield(col, 'minStepQty', rec, false, true); col++; - strris += addfield(col, 'cat_name', rec, false); col++; - strris += addfield(col, 'producer_name', rec, false); col++; - strris += addfield(col, 'provider_name', rec, false); col++; - strris += addfield(col, 'magazzino_name', rec, false); col++; - strris += addfield(col, 'bookableQty', rec, false, true); col++; - strris += addfield(col, 'sconto1', rec, false, true); col++; - strris += addfield(col, 'sconto2', rec, false, true); col++; - strris += addfield(col, 'gas_name', rec, false, true); col++; + strris += addfield(col, 'weight', rec, { isnumero: true }); col++; + strris += addfield(col, 'unit', rec, {}); col++; + strris += addfield(col, 'link', rec, {}); col++; + strris += addfield(col, 'perc_iva', rec, {}); col++; + strris += addfield(col, 'price_acquistato', rec, { isnumero: true }); col++; + strris += addfield(col, 'minBuyQty', rec, { isnumero: true }); col++; + strris += addfield(col, 'minStepQty', rec, { isnumero: true }); col++; + strris += addfield(col, 'cat_name', rec,{}); col++; + strris += addfield(col, 'producer_name', rec, {}); col++; + strris += addfield(col, 'provider_name', rec, {}); col++; + strris += addfield(col, 'magazzino_name', rec, {}); col++; + strris += addfield(col, 'qtyToReachForGas', rec, { isnumero: true }); col++; + strris += addfield(col, 'maxbookableGASQty', rec, { isnumero: true }); col++; + strris += addfield(col, 'sconto1', rec, {}); col++; + strris += addfield(col, 'sconto2', rec, {}); col++; + strris += addfield(col, 'gas_name', rec, {}); col++; + strris += addfield(col, 'note', rec, {}); col++; strris += '} ' } else if (cmd === shared_consts.Cmd.CITIES_SERVER) { @@ -450,7 +460,7 @@ export default defineComponent({ return risultato } - + function loadTextFromFile(ev: any) { console.log('ev', ev) const file = ev.target.files[0] diff --git a/src/statics/lang/it.js b/src/statics/lang/it.js index a0b645bd..b04de79b 100755 --- a/src/statics/lang/it.js +++ b/src/statics/lang/it.js @@ -65,8 +65,9 @@ const msg_it = { stockBloccatiQty: 'Bloccati In Magazzino', minBuyQty: 'Qta minima acquistabile', minStepQty: 'Step Minimo', - maxBookableQty: 'Qtà massima prenotabile singolarm.', - bookableQty: 'Prenotabili', + maxBookableSinglePersQty: 'Qtà massima prenotabile singolarm.', + maxbookableGASQty: 'Prenotabili', + bookedQtyConfirmed: 'Quantità Confermate', bookableAvailableQty: 'Disponib. Prenotabili', weight: 'Peso', unit: 'Unità di Misura', @@ -367,7 +368,7 @@ const msg_it = { incorrect_input: 'Inserimento incorretto.', link_sent: 'Apri la tua casella di posta, trova la email "Confermare la Registrazione: {sitename}" e clicca su "Verifica Registrazione"', reg_ok: 'Registrazione Avvenuta. Esegui il Login inserendo le tue credenziali', - se_non_ricevo: 'Se non ricevi la email, prova a controllare nella spam, oppure contattaci', + se_non_ricevo: 'Se non ricevi la email, prova a controllare nella spam, oppure contattaci', title_unsubscribe: 'Disiscrizione alla newsletter', title_unsubscribe_done: 'Disiscrizione completata correttamente', }, @@ -1123,8 +1124,11 @@ const msg_it = { email_html_header: 'Instestazione', email_html_footer: 'Footer', email_html_makeorder: '1) Ordine Ricevuto', + email_html_GAS_makeorder: '1) Ordine GAS Ricevuto', email_html_order_confirmed: '2) Ordine Confermato da noi', - email_html_order_consegnato: '3) Ordine Completato Correttamente', + email_html_GAS_order_confirmed: '2) Ordine GAS Confermato da noi', + email_html_order_consegnato: '3) Ordine Consegnato', + email_html_GAS_order_consegnato: '3) Ordine GAS Consegnato', }, sectors: { name: 'Settore', @@ -1664,13 +1668,13 @@ const msg_it = { order: 'Ordine', ord_confirmed: 'Ordine Confermato', ord_not_confirmed: 'E\' avvenuto un errore. Ordine non Confermato. Ricaricare la pagina e riprovare.', - btn_cassa: 'Vai alla Cassa', - btn_ordini: 'Vai agli Ordini', + btn_cassa: 'Procedi all\'Ordine', + btn_ordini: 'I tuoi Ordini', available: 'Disponibili', - preorders: 'Quantità Pre-Ordinabili', + preorders: 'Quantità Massima Pre-Ordinabili', preord: 'Pre-Ordinate', di_cui_x_in_carrello: '(nel tuo carrello: {qty})', - evaso: 'Ordine Evaso', + confermato: 'Ordine Confermato', consegnato: 'Ordine Consegnato', pagato: 'Ordine Pagato', spedito: 'Ordine Spedito', @@ -1689,6 +1693,13 @@ const msg_it = { qta_prenotate_in_attesa: '(Preordinate In attesa {qty})', prodotti_trovati: '{qta} Prodotti trovati su {qtatot}', bloccati: 'Bloccati', + bookedGASQtyOrdered: 'Prenotate', + bookedGASQtyOrdered_str: 'Prenotati {qta} su {qtatot} {unit}', + booked_su_str: '{qta} su {qtatot}', + qtyToReachForGas: 'Qta da raggiungere', + offerta_gas: 'Offerta valida al raggiungimento di {qta} {unit}', + offerta_gas_raggiunta: 'Complimenti! Gli ordini hanno superato il minimo quantitativo di {qta} {unit}', + note: 'Note', }, gas: { name: 'Ordine Gas', diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts index 2129f311..4c239230 100755 --- a/src/store/Modules/fieldsTable.ts +++ b/src/store/Modules/fieldsTable.ts @@ -352,8 +352,8 @@ export const getcolorderscart = [ AddCol({ name: 'items', label_trans: 'order.items' }), AddCol({ name: 'userId', label_trans: 'order.users', fieldtype: costanti.FieldType.select, jointable: 'users' }), AddCol({ name: 'note', label_trans: 'order.note' }), - AddCol({ name: 'evaso', label_trans: 'order.evaso', fieldtype: costanti.FieldType.boolean }), - AddCol({ name: 'date_evaso', label_trans: 'order.date_evaso', fieldtype: costanti.FieldType.date }), + AddCol({ name: 'confermato', label_trans: 'order.confermato', fieldtype: costanti.FieldType.boolean }), + AddCol({ name: 'date_confermato', label_trans: 'order.date_confermato', fieldtype: costanti.FieldType.date }), AddCol({ name: 'consegnato', label_trans: 'order.consegnato', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'date_consegnato', label_trans: 'order.date_consegnato', fieldtype: costanti.FieldType.date }), AddCol({ name: 'pagato', label_trans: 'order.pagato', fieldtype: costanti.FieldType.boolean }), @@ -438,8 +438,11 @@ export const colTableStorehouse = [ AddCol({ name: 'email_html_header', label_trans: 'store.email_html_header', 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_GAS_makeorder', label_trans: 'store.email_html_GAS_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_GAS_order_confirmed', label_trans: 'store.email_html_GAS_order_confirmed', fieldtype: costanti.FieldType.html }), AddCol({ name: 'email_html_order_consegnato', label_trans: 'store.email_html_order_consegnato', fieldtype: costanti.FieldType.html }), + AddCol({ name: 'email_html_GAS_order_consegnato', label_trans: 'store.email_GAS_html_order_consegnato', fieldtype: costanti.FieldType.html }), AddCol(DeleteRec), AddCol(DuplicateRec), ] @@ -2057,8 +2060,8 @@ export const colTableProducts = [ fieldtype: costanti.FieldType.number }), AddCol({ - name: 'maxBookableQty', - label_trans: 'products.maxBookableQty', + name: 'maxBookableSinglePersQty', + label_trans: 'products.maxBookableSinglePersQty', fieldtype: costanti.FieldType.number }), AddCol({ @@ -2066,21 +2069,43 @@ export const colTableProducts = [ label_trans: 'products.stockQty', fieldtype: costanti.FieldType.number }), - AddCol({ - name: 'bookableQty', - label_trans: 'products.bookableQty', - fieldtype: costanti.FieldType.number - }), AddCol({ name: 'stockBloccatiQty', label_trans: 'products.stockBloccatiQty', fieldtype: costanti.FieldType.number }), AddCol({ - name: 'bookableBloccatiQty', - label_trans: 'products.bookableBloccatiQty', + name: 'bookedQtyConfirmed', + label_trans: 'products.bookedQtyConfirmed', fieldtype: costanti.FieldType.number }), + + AddCol({ + name: 'qtyToReachForGas', + label_trans: 'ecomm.qtyToReachForGas', + fieldtype: costanti.FieldType.number + }), + AddCol({ + name: 'note', + label_trans: 'ecomm.note', + fieldtype: costanti.FieldType.html + }), + AddCol({ + name: 'maxbookableGASQty', + label_trans: 'ecomm.maxbookableGASQty', + fieldtype: costanti.FieldType.number + }), + AddCol({ + name: 'bookedGASQtyOrdered', + label_trans: 'ecomm.bookedGASQtyOrdered', + fieldtype: costanti.FieldType.number + }), + AddCol({ + name: 'bookableGASBloccatiQty', + label_trans: 'ecomm.bookableGASBloccatiQty', + fieldtype: costanti.FieldType.number + }), + AddCol({ name: 'canBeShipped', label_trans: 'products.canBeShipped', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'canBeBuyOnline', label_trans: 'products.canBeBuyOnline', fieldtype: costanti.FieldType.boolean }), AddCol(DeleteRec), diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts index abaf057a..e122393b 100644 --- a/src/store/Modules/tools.ts +++ b/src/store/Modules/tools.ts @@ -8274,7 +8274,8 @@ export const tools = { }, convertPriceEurToValue(inputString: string): string { - + if (inputString === '') + return '0'; // Rimuovi il simbolo della valuta (€) e sostituisci la virgola con un punto return inputString.replace(/[^\d.,]/g, '').replace(',', '.'); }, @@ -8316,6 +8317,13 @@ export const tools = { return (`${strgg} ${this.pad(hours)}:${this.pad(minutes)}:${this.pad(seconds)}`); + }, + + calcperc(val1: number, valmax: number): number { + if (valmax > 0) + return (val1 / valmax * 100) + else + return 0 } // FINE ! diff --git a/src/store/Products.ts b/src/store/Products.ts index 774f307b..17c445e7 100755 --- a/src/store/Products.ts +++ b/src/store/Products.ts @@ -32,18 +32,45 @@ function getRecordProductInfoEmpty(): IProductInfo { } } -function getRecordProductEmpty() { - return { - active: false, - productInfo: { - img: '', code: '', name: '', +function getRecordProductEmpty(): IProduct { - }, - storehouses: [], scontisticas: [], - price: 0, stockQty: 0, bookableQty: 0, gasordines: [], - stockBloccatiQty: 0, bookableBloccatiQty: 0, - idGasordines: [], minBuyQty: 1, maxBookableQty: 0, + const tomorrow = tools.getDateNow() + tomorrow.setDate(tomorrow.getDate() + 1) + + return { + productInfo: getRecordProductInfoEmpty(), + // _id: tools.getDateNow().toISOString(), // Create NEW + active: false, + idProducer: '', + idStorehouses: [], + idGasordines: [], + idScontisticas: [], + scontisticas: [], + gasordines: [], + idProvider: '', + producer: {}, + storehouses: [], + provider: {}, + price: 0.0, + quantityAvailable: 0, + bookableAvailableQty: 0, + minBuyQty: 1, minStepQty: 1, + maxBookableSinglePersQty: 0, + + stockQty: 0, + stockBloccatiQty: 0, + bookedQtyConfirmed: 0, + + qtyToReachForGas: 0, + maxbookableGASQty: 0, + bookedGASQtyOrdered: 0, + bookableGASBloccatiQty: 0, + + canBeShipped: false, + QuantitaOrdinateInAttesa: 0, + QuantitaPrenotateInAttesa: 0, + canBeBuyOnline: false, } } @@ -283,39 +310,7 @@ export const useProducts = defineStore('Products', { getRecordEmpty: (state: IProductsState) => (): IProduct => { - - const tomorrow = tools.getDateNow() - tomorrow.setDate(tomorrow.getDate() + 1) - - return { - productInfo: getRecordProductInfoEmpty(), - // _id: tools.getDateNow().toISOString(), // Create NEW - active: false, - idProducer: '', - idStorehouses: [], - idGasordines: [], - idScontisticas: [], - scontisticas: [], - gasordines: [], - idProvider: '', - producer: {}, - storehouses: [], - provider: {}, - price: 0.0, - quantityAvailable: 0, - bookableAvailableQty: 0, - stockQty: 0, - stockBloccatiQty: 0, - minBuyQty: 1, - minStepQty: 1, - maxBookableQty: 0, - bookableQty: 0, - bookableBloccatiQty: 0, - canBeShipped: false, - QuantitaOrdinateInAttesa: 0, - QuantitaPrenotateInAttesa: 0, - canBeBuyOnline: false, - } + return getRecordProductEmpty() }, }, @@ -380,12 +375,15 @@ export const useProducts = defineStore('Products', { ris = await Api.SendReq('/products', 'POST', { userId: userStore.my._id }) .then((res) => { if (res.data.products) { + console.log('aggiorna prodotti') + this.products = [] this.products = res.data.products } else { this.products = [] } if (res.data.orders) { + this.orders = [] this.orders = res.data.orders } else { this.orders = [] @@ -831,7 +829,7 @@ export const useProducts = defineStore('Products', { }, getQtyBloccataBookableAvailable(myproduct: IProduct): number { - let qty = myproduct.bookableBloccatiQty + let qty = myproduct.bookableGASBloccatiQty return qty }, @@ -844,17 +842,17 @@ export const useProducts = defineStore('Products', { const globalStore = useGlobalStore() if (globalStore.site.ecomm && globalStore.site.ecomm.enablePreOrders) { return (this.getQtyBookableAvailable(myproduct) > 0 - && (myproduct.maxBookableQty === 0 - || (myorder.quantitypreordered + 1 < myproduct.maxBookableQty)) + && (myproduct.maxBookableSinglePersQty === 0 + || (myorder.quantitypreordered + 1 < myproduct.maxBookableSinglePersQty)) ) || (this.getQtyAvailable(myproduct) > 0) - && (myproduct.maxBookableQty === 0 - || (myorder.quantity + 1 < myproduct.maxBookableQty)) + && (myproduct.maxBookableSinglePersQty === 0 + || (myorder.quantity + 1 < myproduct.maxBookableSinglePersQty)) } else { return (this.getQtyAvailable(myproduct) > 0) - && (myproduct.maxBookableQty === 0 - || (myorder.quantity + 1 < myproduct.maxBookableQty)) + && (myproduct.maxBookableSinglePersQty === 0 + || (myorder.quantity + 1 < myproduct.maxBookableSinglePersQty)) } }, diff --git a/src/views/admin/dbop/dbop.vue b/src/views/admin/dbop/dbop.vue index 22d34b5f..c569f2a5 100755 --- a/src/views/admin/dbop/dbop.vue +++ b/src/views/admin/dbop/dbop.vue @@ -261,6 +261,14 @@ >
+
+ +
+
total + rec.totalPrice, 0), }; - // Combine orders and totals - const rowsWithTotals = [...orderscart, totals]; + let rowsWithTotals: any = [...orderscart]; + + if (tools.isManager()) { + // Combine orders and totals + rowsWithTotals.push(totals); + } return rowsWithTotals; } else { diff --git a/src/views/ecommerce/orderInfo/orderInfo.vue b/src/views/ecommerce/orderInfo/orderInfo.vue index c1de1d31..c68b6f07 100755 --- a/src/views/ecommerce/orderInfo/orderInfo.vue +++ b/src/views/ecommerce/orderInfo/orderInfo.vue @@ -210,9 +210,9 @@ shared_consts.getStatusStr(props.row.status) }}
-
- {{ tools.getstrDateTime(props.row.date_evaso) }}: - {{ $t('ecomm.evaso') }} +
+ {{ tools.getstrDateTime(props.row.date_confermato) }}: + {{ $t('ecomm.confermato') }}
{{ tools.getstrDateTime(props.row.date_pagato) }}: diff --git a/src/views/ecommerce/productsList/productsList.ts b/src/views/ecommerce/productsList/productsList.ts index 4965b7cd..1207d7c7 100755 --- a/src/views/ecommerce/productsList/productsList.ts +++ b/src/views/ecommerce/productsList/productsList.ts @@ -30,6 +30,7 @@ export default defineComponent({ const cosa = ref(0) const cat = ref('') + const loadpage = ref(false) watch(() => cosa.value, (newval, oldval) => { tools.setCookie(tools.COOK_COSA_PRODOTTI, cosa.value.toString()) @@ -67,10 +68,12 @@ export default defineComponent({ }); }*/ - function mounted() { + async function mounted() { + loadpage.value = false + await productStore.loadProducts() cosa.value = tools.getCookie(tools.COOK_COSA_PRODOTTI, shared_consts.PROD.BOTTEGA, true) // Inizializza - productStore.loadProducts() + loadpage.value = true } function getCatProds() { @@ -99,6 +102,7 @@ export default defineComponent({ cat, productStore, t, + loadpage, } } }) diff --git a/src/views/ecommerce/productsList/productsList.vue b/src/views/ecommerce/productsList/productsList.vue index e817ff7d..cd5a8f61 100755 --- a/src/views/ecommerce/productsList/productsList.vue +++ b/src/views/ecommerce/productsList/productsList.vue @@ -1,6 +1,7 @@