- Cataloghi: BestSeller, Novità
This commit is contained in:
@@ -26,6 +26,7 @@ import { CSelectFontSize } from '@src/components/CSelectFontSize'
|
||||
import { CMySize } from '@src/components/CMySize'
|
||||
import { CBorders } from '@src/components/CBorders'
|
||||
import { CMyDimensioni } from '@src/components/CMyDimensioni'
|
||||
import { CMyText } from '@src/components/CMyText'
|
||||
|
||||
import MixinMetaTags from '@/mixins/mixin-metatags'
|
||||
import MixinBase from '@/mixins/mixin-base'
|
||||
@@ -42,7 +43,7 @@ export default defineComponent({
|
||||
CImgTitle, CTitle, LandingFooter, CEventsCalendar,
|
||||
CCardCarousel, COpenStreetMap, CMyPage, CMyPageIntro, CMyEditor, CMyFieldRec,
|
||||
CSelectColor, CSelectFontSize, CSelectImage, CImgPoster, CSelectAnimation, CMySlider,
|
||||
CMySize, CBorders, CMyDimensioni,
|
||||
CMySize, CBorders, CMyDimensioni, CMyText,
|
||||
},
|
||||
emits: ['saveElem', 'selElemClick', 'toggleSize', 'deleteElem', 'dupPage'],
|
||||
props: {
|
||||
@@ -81,28 +82,6 @@ export default defineComponent({
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
|
||||
const posizTextOptions = ref([
|
||||
{ label: 'In basso', value: costanti.POSIZ_TESTO.IN_BASSO },
|
||||
{ label: 'A Destra', value: costanti.POSIZ_TESTO.A_DESTRA },
|
||||
])
|
||||
const formatOptions = ref([
|
||||
{ label: 'auto', value: 'CODE128' },
|
||||
{ label: 'EAN-13', value: 'EAN-13' },
|
||||
{ label: 'UPC', value: 'upc' },
|
||||
])
|
||||
const fontSizeOptions = ref([
|
||||
{ label: '9', value: '9' },
|
||||
{ label: '10', value: '10' },
|
||||
{ label: '11', value: '11' },
|
||||
{ label: '12', value: '12' },
|
||||
{ label: '13', value: '13' },
|
||||
{ label: '14', value: '14' },
|
||||
{ label: '15', value: '15' },
|
||||
{ label: '16', value: '16' },
|
||||
{ label: '18', value: '18' },
|
||||
{ label: '20', value: '20' },
|
||||
{ label: '22', value: '22' },
|
||||
])
|
||||
|
||||
const animare = ref(0)
|
||||
const slide = ref(0)
|
||||
@@ -243,6 +222,7 @@ export default defineComponent({
|
||||
function modifElem() {
|
||||
disableSave.value = false
|
||||
elemChanged.value = true
|
||||
|
||||
}
|
||||
function modifElemAndSchede() {
|
||||
modifElem()
|
||||
@@ -276,33 +256,57 @@ export default defineComponent({
|
||||
|
||||
if (myel.value.catalogo && myel.value.catalogo?.arrSchede) {
|
||||
for (const recscheda of myel.value.catalogo?.arrSchede) {
|
||||
if (recscheda.scheda && (!recscheda.scheda?.testo_bottom)) {
|
||||
recscheda.scheda.testo_bottom = { contenuto: '', maxlength: 100 }
|
||||
}
|
||||
if (recscheda.scheda && !recscheda.scheda.testo_bottom!.font) {
|
||||
recscheda.scheda.testo_bottom!.font = { name: '', size: ''}
|
||||
}
|
||||
if (recscheda.scheda && (!recscheda.scheda?.testo_right || !recscheda.scheda?.testo_right.font) ) {
|
||||
recscheda.scheda.testo_right = { contenuto: '', font: { name: '', size: ''} }
|
||||
}
|
||||
if (recscheda.scheda && (!recscheda.scheda?.dimensioni.pagina.imgsfondo)) {
|
||||
recscheda.scheda.dimensioni.pagina = tools.resetRecIDimensioni(recscheda.scheda?.dimensioni.pagina)
|
||||
}
|
||||
if (recscheda.scheda && (!recscheda.scheda?.barcode || !recscheda.scheda?.barcode.font)) {
|
||||
recscheda.scheda.barcode = {
|
||||
show: false,
|
||||
format: '',
|
||||
size: {
|
||||
width: '2',
|
||||
height: '33',
|
||||
},
|
||||
font: {
|
||||
name: '',
|
||||
size: '11',
|
||||
if (recscheda.scheda) {
|
||||
if ((!recscheda.scheda?.testo_bottom)) {
|
||||
recscheda.scheda.testo_bottom = { contenuto: '', maxlength: 100 }
|
||||
}
|
||||
if (!recscheda.scheda.testo_bottom!.font) {
|
||||
recscheda.scheda.testo_bottom!.font = { name: '', size: '' }
|
||||
}
|
||||
if ((!recscheda.scheda?.testo_right || !recscheda.scheda?.testo_right.font)) {
|
||||
recscheda.scheda.testo_right = { contenuto: '', font: { name: '', size: '' } }
|
||||
}
|
||||
if ((!recscheda.scheda?.dimensioni.pagina)) {
|
||||
recscheda.scheda.dimensioni.pagina = tools.resetRecIPagina(recscheda.scheda?.dimensioni.pagina)
|
||||
}
|
||||
if ((!recscheda.scheda?.dimensioni.pagina.dimensioni)) {
|
||||
recscheda.scheda.dimensioni.pagina = tools.resetRecIPagina(recscheda.scheda?.dimensioni.pagina)
|
||||
}
|
||||
if (!recscheda.scheda?.dimensioni?.pagina?.testo_up) {
|
||||
recscheda.scheda!.dimensioni.pagina.testo_up = tools.resetIText(null)
|
||||
}
|
||||
if (!recscheda.scheda?.dimensioni?.pagina?.testo_down) {
|
||||
recscheda.scheda!.dimensioni.pagina.testo_down = tools.resetIText(null)
|
||||
}
|
||||
|
||||
if (!recscheda.scheda?.etichette?.novita?.show) {
|
||||
recscheda.scheda.etichette!.novita = {
|
||||
show: false,
|
||||
months: 6,
|
||||
}
|
||||
recscheda.scheda.etichette!.bestseller = {
|
||||
show: false,
|
||||
primiNInClassifica: 0,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ((!recscheda.scheda?.barcode || !recscheda.scheda?.barcode.font)) {
|
||||
recscheda.scheda.barcode = {
|
||||
show: false,
|
||||
format: '',
|
||||
size: {
|
||||
width: '2',
|
||||
height: '33',
|
||||
},
|
||||
font: {
|
||||
name: '',
|
||||
size: '11',
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,7 +326,7 @@ export default defineComponent({
|
||||
if (myel.value.catalogo) {
|
||||
if (!myel.value.catalogo.areadistampa) {
|
||||
myel.value.catalogo.areadistampa = tools.resetRecIAreaDiStampa(null)
|
||||
myel.value.catalogo.areadistampa.margini = { left: '0.59', top: '0.59', right: '0.59', bottom: '0.28'}
|
||||
myel.value.catalogo.areadistampa.margini = { left: '0.59', top: '0.59', right: '0.59', bottom: '0.28' }
|
||||
}
|
||||
|
||||
myel.value.catalogo.areadistampa = tools.resetRecIAreaDiStampa(myel.value.catalogo.areadistampa)
|
||||
@@ -449,15 +453,19 @@ export default defineComponent({
|
||||
show_separatore: true,
|
||||
name: 'Scheda Nuova',
|
||||
dimensioni,
|
||||
line_height: 100,
|
||||
numschede_perRiga: 2,
|
||||
numschede_perCol: 2,
|
||||
posiz_text: costanti.POSIZ_TESTO.A_DESTRA,
|
||||
testo_right: {
|
||||
contenuto: '',
|
||||
font: {
|
||||
posiz_text: costanti.POSIZ_TESTO.A_DESTRA,
|
||||
},
|
||||
},
|
||||
testo_bottom: {
|
||||
contenuto: '',
|
||||
font: {
|
||||
posiz_text: costanti.POSIZ_TESTO.IN_BASSO,
|
||||
}
|
||||
},
|
||||
barcode: {
|
||||
show: false,
|
||||
@@ -487,7 +495,7 @@ export default defineComponent({
|
||||
_id: objectId(),
|
||||
scheda: newscheda,
|
||||
order: maxorder + 10,
|
||||
numSchede: 1,
|
||||
numPagineMax: 0,
|
||||
}
|
||||
)
|
||||
// console.log('arrschede', myel.value.catalogo!.arrSchede)
|
||||
@@ -533,13 +541,14 @@ export default defineComponent({
|
||||
myschedadest.scheda = tools.jsonCopy(myschedatocopy.scheda!)
|
||||
myschedadest.scheda!._id = objectId()
|
||||
myschedadest.order = 20
|
||||
|
||||
|
||||
myschedadest.scheda!.name = myschedadest.scheda!.name + '_copia'
|
||||
myschedadest.scheda!.isTemplate = false
|
||||
myschedadest.scheda!.isTemplate = false
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function dupNewScheda(id: string) {
|
||||
if (!myel.value.catalogo!.arrSchede)
|
||||
return
|
||||
@@ -550,9 +559,9 @@ export default defineComponent({
|
||||
let myscheda = tools.jsonCopy(myfindscheda)
|
||||
delete myscheda._id
|
||||
delete myscheda.scheda!._id
|
||||
myscheda.numSchede = 1
|
||||
myscheda.numPagineMax = 0
|
||||
myscheda.order = myscheda.order + 10,
|
||||
myscheda._id = objectId()
|
||||
myscheda._id = objectId()
|
||||
myscheda.scheda!._id = objectId()
|
||||
myscheda.scheda!.name = myscheda.scheda!.name + '_copia'
|
||||
myscheda.scheda!.isTemplate = false
|
||||
@@ -759,6 +768,8 @@ export default defineComponent({
|
||||
|
||||
let arr: any = []
|
||||
|
||||
arr.push({ label: '[Nessuna]', value: '' })
|
||||
|
||||
if (arrschede) {
|
||||
arrschede.forEach((recscheda: ISchedaSingola) => {
|
||||
arr.push({ label: recscheda.scheda!.name, value: recscheda.scheda!._id })
|
||||
@@ -933,15 +944,12 @@ export default defineComponent({
|
||||
saveFieldElem,
|
||||
updateCatalogoSizeWidth,
|
||||
dupPage,
|
||||
posizTextOptions,
|
||||
tabScheda,
|
||||
addNewScheda,
|
||||
dupNewScheda,
|
||||
delRecScheda,
|
||||
SchedeOpt,
|
||||
addProdSpeciale,
|
||||
formatOptions,
|
||||
fontSizeOptions,
|
||||
idSchedaDaCopiare,
|
||||
copyfromTemplate,
|
||||
modifElemAndSchede,
|
||||
|
||||
Reference in New Issue
Block a user