- Generazione della Raccolta dei Cataloghi (web e Stampa), e creazione del PDF Online.
- Lista Raccolta Cataloghi, aggiungi/togli catalogo.
This commit is contained in:
@@ -432,6 +432,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
else if (table === 'mypages_id') ris = state.mypage;
|
||||
else if (table === toolsext.TABMYELEMS) ris = state.myelems;
|
||||
else if (table === toolsext.TABCATALOGS) ris = catalogStore.catalogs!;
|
||||
else if (table === toolsext.TABRACCOLTA_CATALOGHI) ris = catalogStore.raccoltacataloghis!;
|
||||
else if (table === toolsext.TABCALZOOM) ris = state.calzoom;
|
||||
else if (table === 'producers') ris = state.producers;
|
||||
else if (table === 'storehouses') ris = state.storehouses;
|
||||
@@ -1852,6 +1853,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
circuitStore.listaccounts = res.data.listaccounts ? res.data.listaccounts : [];
|
||||
|
||||
catalogStore.catalogs = res.data.catalogs;
|
||||
catalogStore.raccoltacataloghis = res.data.raccoltacataloghis;
|
||||
|
||||
this.settings = res.data.settings ? [...res.data.settings] : [];
|
||||
this.disciplines = res.data.disciplines ? [...res.data.disciplines] : [];
|
||||
@@ -2466,6 +2468,21 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
areadistampa: tools.resetRecIAreaDiStampa(null),
|
||||
};
|
||||
},
|
||||
createRaccoltaCataloghiVuoto(): IOptCatalogo {
|
||||
return {
|
||||
productTypes: [0],
|
||||
excludeproductTypes: [],
|
||||
idTipologie: [],
|
||||
formato: [],
|
||||
Categoria: [],
|
||||
editore: [],
|
||||
pdf: false,
|
||||
dimensioni_def: {
|
||||
pagina: tools.resetRecIDimensioni(null),
|
||||
},
|
||||
areadistampa: tools.resetRecIAreaDiStampa(null),
|
||||
};
|
||||
},
|
||||
|
||||
async prepareAddNewElem(order: any, $q: any, t: any, myelem: any, newtype: any) {
|
||||
const newrec: IMyElem = {
|
||||
@@ -2487,6 +2504,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
newrec.catalogo = this.createCatalogoVuoto();
|
||||
} else if (newrec.type === shared_consts.ELEMTYPE.CATALOGO) {
|
||||
newrec.catalogo = this.createCatalogoVuoto();
|
||||
} else if (newrec.type === shared_consts.ELEMTYPE.RACCOLTA) {
|
||||
newrec.catalogo = this.createRaccoltaCataloghiVuoto();
|
||||
}
|
||||
|
||||
const mynewrec = await this.addNewElem($q, t, newrec);
|
||||
@@ -2528,6 +2547,15 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
return false;
|
||||
});
|
||||
},
|
||||
async execJoinPDF(paramquery: any) {
|
||||
return Api.SendReq('/admin/join-pdf', 'POST', paramquery)
|
||||
.then((res) => {
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
return false;
|
||||
});
|
||||
},
|
||||
async execOnlinePDF(paramquery: any) {
|
||||
return Api.SendReq('/admin/online-pdf', 'POST', paramquery)
|
||||
.then((res) => {
|
||||
@@ -2824,6 +2852,11 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
const prec_lista_prodotti = mytablerec![index].lista_prodotti;
|
||||
mytablerec![index] = { ...mytablerec[index], ...resdata.rec };
|
||||
mytablerec![index].lista_prodotti = prec_lista_prodotti;
|
||||
} else if (datain.table === 'raccoltacataloghis') {
|
||||
// salva lista_cataloghi
|
||||
const prec_lista_cataloghi = mytablerec![index].lista_cataloghi;
|
||||
mytablerec![index] = { ...mytablerec[index], ...resdata.rec };
|
||||
mytablerec![index].lista_cataloghi = prec_lista_cataloghi;
|
||||
} else {
|
||||
mytablerec![index] = { ...mytablerec[index], ...resdata.rec };
|
||||
console.log('Aggiorna il record mantenendo reattività');
|
||||
|
||||
Reference in New Issue
Block a user