- Export Lista
- Ordinamento - PDF Risolto Salvataggio ed invio al server direttamente.
This commit is contained in:
@@ -102,6 +102,7 @@ export const tools = {
|
||||
COOK_MAP_CENTER_LONG: 'MAP_LONG',
|
||||
COOK_MAP_ZOOM: 'MAP_Z',
|
||||
COOK_CATEGORIA: 'CATEG',
|
||||
COOK_COLLANA: 'COLL',
|
||||
COOK_MAPBOUNDS: 'MAP-B',
|
||||
COOK_LAST_PROD_SEARCH: 'LPR',
|
||||
|
||||
|
||||
@@ -129,6 +129,10 @@ export const useProducts = defineStore('Products', {
|
||||
|
||||
},
|
||||
|
||||
getCollane: (state: IProductsState) => (): ICollana[] => {
|
||||
return state.collane
|
||||
},
|
||||
|
||||
isDisponibile: (state: IProductsState) => (product: IProduct): boolean => {
|
||||
return product?.arrvariazioni?.[0]?.quantita > 1
|
||||
},
|
||||
@@ -365,7 +369,7 @@ export const useProducts = defineStore('Products', {
|
||||
},
|
||||
|
||||
getTotaliProdottiByIdCollana: (state: IProductsState) => (idCollana: string): number => {
|
||||
const myfirstcat = state.collanetotali!.find((rec: ICollaneTotali) => rec._id === idCollana)
|
||||
const myfirstcat = state.collane.find((rec: ICollaneTotali) => rec._id === idCollana)
|
||||
|
||||
if (myfirstcat) {
|
||||
return myfirstcat.quanti!
|
||||
@@ -1759,6 +1763,8 @@ export const useProducts = defineStore('Products', {
|
||||
|
||||
let arr: any = []
|
||||
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
arr.push({ label: '[Nessuna]', value: '' })
|
||||
|
||||
if (arrschede) {
|
||||
@@ -1766,7 +1772,8 @@ 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 = globalStore.getPageById(recscheda.idPageOrig)
|
||||
// const page = this.mypage?.find((page) => (`${page._id}`) === recscheda.idPageOrig)
|
||||
pagename = page ? page.title! : ''
|
||||
}
|
||||
if (pagename)
|
||||
|
||||
@@ -2525,7 +2525,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
})
|
||||
},
|
||||
|
||||
async convertPdf(pdfFile: any, width: string, height: string, compressione: string) {
|
||||
async convertPdf(pdfFile: any, width: string, height: string, compressione: string, dir_out: string, file_out: string) {
|
||||
try {
|
||||
|
||||
if (!pdfFile) {
|
||||
@@ -2542,6 +2542,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
formData.append('width', width); // Dimensione del PDF in cm
|
||||
formData.append('height', height); // Dimensione del PDF in cm
|
||||
formData.append('compressione', compressione);
|
||||
formData.append('dir_out', dir_out);
|
||||
formData.append('file_out', file_out);
|
||||
formData.append('idapp', tools.getEnv('VITE_APP_ID'));
|
||||
|
||||
const response = await this.execConvertPDF(formData)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user