aggiornamenti vari...

This commit is contained in:
Surya Paolo
2025-03-21 19:51:55 +01:00
parent a09a49ac37
commit 4c82015f27
121 changed files with 1343 additions and 5032 deletions

View File

@@ -252,7 +252,7 @@ export const Api = {
},
// Funzione che gestisce la chiamata con retry
async SendReq(url, method, mydata, setAuthToken = false, evitaloop = false, retryCount = 3, retryDelay = 5000, myformdata = null, responsedata = null, options = null) {
async SendReq(url, method, mydata, setAuthToken = false, evitaloop = false, retryCount = 1, retryDelay = 5000, myformdata = null, responsedata = null, options = null) {
try {
return await this.SendReqBase(url, method, mydata, setAuthToken, evitaloop, myformdata, responsedata, options);
} catch (error) {

View File

@@ -25,7 +25,8 @@ import type {
IText,
IAreaDiStampa,
IOptCatalogo,
IPagina
IPagina,
IMyScheda
} from '@model';
import {
Privacy,
@@ -100,6 +101,7 @@ export const tools = {
COOK_MAP_ZOOM: 'MAP_Z',
COOK_CATEGORIA: 'CATEG',
COOK_MAPBOUNDS: 'MAP-B',
COOK_LAST_PROD_SEARCH: 'LPR',
FRIENDS_SEARCH: 'FR_SE',
GROUP_SEARCH: 'GR_SE',
@@ -9492,6 +9494,20 @@ export const tools = {
return rec
},
resetRecIMyScheda(rec?: IMyScheda): IMyScheda {
rec.testo_right_attaccato = tools.resetIText(rec?.testo_right_attaccato)
rec.testo_right = tools.resetIText(rec?.testo_right)
rec.testo_bottom = tools.resetIText(rec?.testo_bottom)
rec.dimensioni = {pagina: null, riga: null, scheda_prodotto: {}, immagine_prodotto: {}}
rec.dimensioni.pagina = tools.resetRecIPagina({})
rec.testo_right_attaccato = tools.resetIText({})
rec.testo_right = tools.resetIText({})
rec.testo_bottom = tools.resetIText({})
return rec
},
resetIBorder(rec: IBorder | null) {
if (!rec) {
rec = {}
@@ -9761,7 +9777,7 @@ export const tools = {
keycookie: '',
addall: true,
arrvalue: [],
filter: null,
filter: () => {},
useinput: false,
icon: 'fas fa-user'
}]

View File

@@ -1526,7 +1526,7 @@ export const useProducts = defineStore('Products', {
let pagename = ''
if (recscheda.scheda) {
if (recscheda.idPageOrig) {
const page = this.mypage.find((page) => (`${page._id}`) === recscheda.idPageOrig)
const page = this.mypage?.find((page) => (`${page._id}`) === recscheda.idPageOrig)
pagename = page ? page.title! : ''
}
if (pagename)

View File

@@ -2293,7 +2293,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
}
// console.log('getServerHost', myserv)
console.log('getServerHost', myserv)
return myserv
} catch (e) {
@@ -2409,6 +2409,18 @@ export const useGlobalStore = defineStore('GlobalStore', {
newrec.height = 600
} else if (newrec.type === shared_consts.ELEMTYPE.CARD) {
newrec.class2 = 'row justify-center'
} else if (newrec.type === shared_consts.ELEMTYPE.SEARCHPRODUCT) {
newrec.catalogo = {
productTypes: [0],
excludeproductTypes: [],
formato: [],
Categoria: [],
editore: [],
pdf: false,
dimensioni_def: {
pagina: tools.resetRecIDimensioni(null)
},
}
} else if (newrec.type === shared_consts.ELEMTYPE.CATALOGO) {
newrec.catalogo = {
//++AddCATALOGO_FIELDS