- Message notify when 'Ask Info' and user is not logged

- Ask Info and Book show message if not logged
- TableField fixed and added some features
This commit is contained in:
Paolo Arena
2019-11-04 20:30:09 +01:00
parent f787fd3cea
commit 9205468065
9 changed files with 90 additions and 16 deletions

52
server/models/settings.js Normal file
View File

@@ -0,0 +1,52 @@
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const tools = require('../tools/general');
mongoose.Promise = global.Promise;
mongoose.level = "F";
// Resolving error Unknown modifier: $pushAll
mongoose.plugin(schema => {
schema.options.usePushEach = true
});
const SettingsSchema = new Schema({
idapp: {
type: String,
},
key: {
type: String,
},
type: {
type: Number,
},
value_str: {
type: String,
},
value_date: {
type: Date,
},
value_num: {
type: Number,
}
});
SettingsSchema.statics.executeQueryTable = function (idapp, params) {
return tools.executeQueryTable(this, idapp, params);
};
SettingsSchema.statics.findAllIdApp = function (idapp) {
const Settings = this;
const myfind = { idapp };
return Settings.find(myfind, (err, arrrec) => {
return arrrec
});
};
const Settings = mongoose.model('Settings', SettingsSchema);
module.exports = { Settings };