- Add Button Whatsapp Chat

- Fixed 'Ask Info' and 'Book' if the email arrived...
- Added "Settings" table: URL_FACEBOOK, TELEGRAM_SUPPORT, URL_INSTAGRAM, WHATSAPP_CELL, INT_CODE, MAIN_EMAIL, CONTACTS_EMAIL_CELL, CALL_WORKING_DAYS, EVENTS_CAL, MSG_REPLY_AFTER_BOOKING.
-
This commit is contained in:
Paolo Arena
2019-11-05 23:53:39 +01:00
parent 9205468065
commit a54839e128
12 changed files with 107 additions and 47 deletions

View File

@@ -37,6 +37,26 @@ SettingsSchema.statics.executeQueryTable = function (idapp, params) {
return tools.executeQueryTable(this, idapp, params);
};
SettingsSchema.statics.getValDbSettings = function (idapp, key) {
return Settings.findOne({ idapp, key })
.then((myrec) => {
if (myrec) {
if (myrec.type === this.FieldType.date)
return myrec.value_date;
if (myrec.type === this.FieldType.number)
return myrec.value_num;
else
return myrec.value_str;
} else {
return ''
}
}).catch((err) => {
return null;
});
};
SettingsSchema.statics.findAllIdApp = function (idapp) {
const Settings = this;