- Cataloghi: qualita di stampa e margini

This commit is contained in:
Surya Paolo
2024-11-22 20:23:37 +01:00
parent 5cd9bd40f6
commit 6a6c15b62c
24 changed files with 1031 additions and 530 deletions

View File

@@ -1200,21 +1200,33 @@ export const useGlobalStore = defineStore('GlobalStore', {
async duplicatePage(path: string, $q: any, t: any) {
const userStore = useUserStore()
return Api.SendReq('/duppage', 'POST', { path })
.then((res) => {
if (res) {
tools.showPositiveNotif($q, t('mypages.duplicateok'))
return true
} else {
tools.showNegativeNotif($q, t('mypages.duplicateerr'))
return false
}
})
.catch((error) => {
console.log('error loadTable', error)
userStore.setErrorCatch(error)
return null
})
let newpath = prompt(t('mypages.duplica_newname'))
$q.dialog({
message: t('mypages.duplica_conferma', { path, newpath }),
ok: { label: t('dialog.yes'), push: true },
cancel: { label: t('dialog.cancel') },
title: t('db.domanda')
}).onOk(() => {
return Api.SendReq('/duppage', 'POST', { path, newpath })
.then((res) => {
if (res) {
tools.showPositiveNotif($q, t('mypages.duplicateok'))
return true
} else {
tools.showNegativeNotif($q, t('mypages.duplicateerr'))
return false
}
})
.catch((error) => {
console.log('error loadTable', error)
userStore.setErrorCatch(error)
return null
})
})
},
async loadPageTest() {
@@ -2240,11 +2252,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
Editore: [],
pdf: false,
dimensioni_def: {
pagina: {
size: { width: '', height: '' },
margini: {left: '', top: '', right: '', bottom: ''},
padding: {left: '', top: '', right: '', bottom: ''},
},
pagina: tools.resetRecIDimensioni(null)
},
}
}