Animations in the WebEditor

This commit is contained in:
Surya Paolo
2022-11-20 10:20:56 +01:00
parent 3c7350024b
commit 1ca8dcd184

View File

@@ -125,6 +125,12 @@ const MyPageSchema = new Schema({
extraclass: { extraclass: {
type: String, type: String,
}, },
loadFirst: {
type: Boolean,
},
showFooter: {
type: Boolean,
}
}); });
MyPageSchema.statics.getFieldsForSearch = function () { MyPageSchema.statics.getFieldsForSearch = function () {
@@ -149,12 +155,25 @@ MyPageSchema.statics.findAllIdApp = async function (idapp) {
}); });
}; };
MyPageSchema.statics.findOnlyStruttRec = function (idapp) { MyPageSchema.statics.findOnlyStruttRec = async function (idapp) {
const MyPage = this; const MyPage = this;
const myfind = { idapp }; const arrFirst = await MyPage.find(
{
idapp,
loadFirst: true,
},
(err, arrrec) => {
return arrrec
});
return MyPage.find(myfind, { const arrfixed = await MyPage.find(
{ idapp,
$or: [
{loadFirst: {$exists: false}},
{loadFirst: {$exists: true, $eq: false}}],
}
, {
title: 1, title: 1,
subtitle: 1, subtitle: 1,
icon: 1, icon: 1,
@@ -169,15 +188,20 @@ MyPageSchema.statics.findOnlyStruttRec = function (idapp) {
submenu: 1, submenu: 1,
iconsize: 1, iconsize: 1,
extraclass: 1, extraclass: 1,
loadFirst: 1,
}, (err, arrrec) => { }, (err, arrrec) => {
return arrrec return arrrec
}); });
return [...arrFirst, ...arrfixed];
}; };
MyPageSchema.statics.findInternalPages = async function (idapp) { MyPageSchema.statics.findInternalPages = async function (idapp) {
const MyPage = this; const MyPage = this;
const myfind = { idapp, const myfind = {
idapp,
internalpage: { $exists: true, $eq: true } internalpage: { $exists: true, $eq: true }
}; };