- Generazione della Raccolta dei Cataloghi (web e Stampa), e creazione del PDF Online.
- Lista Raccolta Cataloghi, aggiungi/togli catalogo.
This commit is contained in:
@@ -251,6 +251,28 @@ CatalogSchema.statics.findAllIdApp = async function (idapp) {
|
||||
}
|
||||
};
|
||||
|
||||
CatalogSchema.statics.executeQueryPickup = async function (idapp, params) {
|
||||
const strfind = params.search;
|
||||
|
||||
if (strfind === '') {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Cerca title
|
||||
const reg = new RegExp(strfind, 'i');
|
||||
const arrrec = await this.find({
|
||||
idapp,
|
||||
title: reg,
|
||||
})
|
||||
.sort({ title: 1 })
|
||||
.limit(10)
|
||||
.select('title _id')
|
||||
.lean();
|
||||
|
||||
return arrrec;
|
||||
};
|
||||
|
||||
|
||||
const Catalog = mongoose.model('Catalog', CatalogSchema);
|
||||
|
||||
Catalog.createIndexes()
|
||||
|
||||
Reference in New Issue
Block a user