ver 1.1.20:

- corretto campo foto che non compariva più.
 - sistemato i campi aggiuntivi e i richiesti.
- migliorato la barra in alto di selezione.
- aggiunto alcune icone.
This commit is contained in:
Surya Paolo
2025-02-03 17:18:33 +01:00
parent 997fd136ea
commit 979f90f980
84 changed files with 1257 additions and 357 deletions

View File

@@ -1,4 +1,4 @@
import { IBaseOrder, ICart, IOrder, IOrderCart, IProduct, IProductsState, IProductInfo, ICatProd, IUserShort, IGasordine, IAuthor, ISubCatProd, IText, ICatalogo } from 'model'
import { IBaseOrder, ICart, IOrder, IOrderCart, IProduct, IProductsState, IProductInfo, ICatProd, IUserShort, IGasordine, IAuthor, ISubCatProd, IText, IOptCatalogo } from 'model'
import { Api } from '@api'
import { serv_constants } from '@src/store/Modules/serv_constants'
@@ -1264,7 +1264,7 @@ export const useProducts = defineStore('Products', {
return globalStore.gasordines.filter((rec) => rec.active)
},
getAutoriByArrayAuthors(authors: IAuthor[] | null) {
getAutoriByArrayAuthors(authors?: IAuthor[]) {
// Gestione degli autori
let authorString = '';
if (authors && Array.isArray(authors)) {
@@ -1295,12 +1295,13 @@ export const useProducts = defineStore('Products', {
}
},
replaceKeyWordsByProduct(optcatalogo: ICatalogo, myproduct: IProduct, testo: IText) {
replaceKeyWordsByProduct(optcatalogo: IOptCatalogo, myproduct: IProduct, testo: IText) {
if (!myproduct || !testo.contenuto) {
return testo.contenuto;
}
const autori = this.getAutoriByArrayAuthors(myproduct.productInfo.authors)
const collana = myproduct.productInfo.collana
const maxDescriptionLength = testo.maxlength ?? 100;
@@ -1388,6 +1389,8 @@ export const useProducts = defineStore('Products', {
'{ranking}': ranking || '',
'{venduti}': venduti || '',
'{formato}': formato || '',
'{collana_title}': collana ? collana.descrizione || '' : '',
'{collana_descr}': collana ? collana.descrizione_estesa || '' : '',
'{prezzo}': prezzo || '',
'{scale}': scale || '',
'{prezzo_scontato}': prezzo_scontato || '',