- Cataloghi: qualita di stampa e margini
This commit is contained in:
@@ -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)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user