- Nuovo Sistema di Flotte per Tutor.

X - Mettere anche la email del sognatore, per chi è abituato ad inviarla in quel modo...
X - Controllare che sul sito compaiano le informazioni del Sognatore...
This commit is contained in:
Paolo Arena
2020-06-08 13:31:05 +02:00
parent 140e181fcc
commit c939be279e
21 changed files with 2037 additions and 254 deletions

View File

@@ -56,7 +56,7 @@ SettingsSchema.statics.getValDbSettings = function (idapp, key, def) {
return Settings.findOne({ idapp, key })
.then((myrec) => {
// console.log('getValDbSettings', myrec, 'idapp', idapp);
if (myrec) {
if (!!myrec) {
if (myrec.type === tools.FieldType.date)
return myrec.value_date;
else if (myrec.type === tools.FieldType.number)
@@ -112,6 +112,8 @@ SettingsSchema.statics.setKeyNum = async function (idapp, key, value) {
myrec = await Settings.findOneAndUpdate({ idapp, key }, { $set: { value_num: value } }, { new: false });
}
return myrec
};
SettingsSchema.statics.setBool = async function (idapp, key, valbool) {
@@ -130,6 +132,8 @@ SettingsSchema.statics.setBool = async function (idapp, key, valbool) {
myrec = await Settings.findOneAndUpdate({ idapp, key }, { $set: { value_bool: valbool } }, { new: false });
}
return myrec
};