- cataloghi...

- fix: condividi su Telegram non funzionava errore sull'immagine
This commit is contained in:
Surya Paolo
2024-11-02 18:06:12 +01:00
parent 3bdab927b6
commit b7ffd751dc
12 changed files with 145 additions and 48 deletions

View File

@@ -4,7 +4,7 @@ const Schema = mongoose.Schema;
const tools = require('../tools/general');
const { ObjectID, ObjectId } = require('mongodb');
const { MySchedaSchema, scheletroScheda } = require('../models/myscheda');
const { MySchedaSchema, IDimensioni } = require('../models/myscheda');
mongoose.Promise = global.Promise;
mongoose.level = "F";
@@ -48,6 +48,13 @@ const elemText = new Schema(
}
);
const IElementiPagina = new Schema(
{
pagina: IDimensioni,
riga: IDimensioni,
}
);
const catalogo = new Schema(
{
@@ -57,10 +64,6 @@ const catalogo = new Schema(
Editore: [{ type: String }],
pdf: { type: Boolean },
printable: { type: Boolean },
backgroundimage: { type: String },
backgroundimage_printable: { type: String },
widthpag: { type: Number },
widthpagPrintable: { type: Number },
width: { type: String },
height: { type: String },
@@ -73,15 +76,27 @@ const catalogo = new Schema(
last_page_height: { type: Number },
last_page_width: { type: Number },
margine_pagina: { type: String },
margine_riga: { type: String },
margine_paginaPrintable: { type: String },
margine_rigaPrintable: { type: String },
backgroundimage: { type: String },
backgroundimage_printable: { type: String },
backgroundSize: { type: String },
backgroundSize_printable: { type: String },
widthpagPrintable: { type: Number },
// -------------------
arrSchede: [
{
scheda: scheletroScheda,
scheda: MySchedaSchema,
order: { type: Number },
numSchede: { type: Number },
/*arrProdToShow: {
type: [[mongoose.Schema.Types.Mixed]], // Definizione tipo
select: false // Imposta il campo come non selezionabile
},*/
}
],
}