AGGIORNAMENTO SITO

👉🏻 E' possibile ora visualizzare la Posizione Reale d'imbarco di quando si verrà aggiunti alle prossime Navi Definitive.
Le posizioni verranno aggiornate ogni ora in automatico!

👉🏻 Ora gli imbarchi comprendono anche le navi provvisorie, pertanto è possibile annullarli oppure cambiare l'Invitante, dalla lista imbarchi.

 👉🏻 E' ora possibile spostare gli invitati solo se si hanno piu' di 2 invitati per ogni Nave già partita.

👨🏻‍💻 Per i Tutor:
👉🏻- Sostituzioni : Cliccando su "Cerca il Primo Disponibile" vi suggerirà in automatico il primo passeggero disponibile per la sostituzione.

This commit is contained in:
Paolo Arena
2020-05-19 00:18:13 +02:00
parent 59910ddec7
commit 140e181fcc
16 changed files with 1483 additions and 533 deletions

View File

@@ -114,6 +114,24 @@ SettingsSchema.statics.setKeyNum = async function (idapp, key, value) {
};
SettingsSchema.statics.setBool = async function (idapp, key, valbool) {
const Settings = this;
let myrec = await Settings.findOne({ idapp, key });
if (!myrec) {
myrec = new Settings({ key });
myrec._id = new ObjectID();
myrec.idapp = idapp;
myrec.type = tools.FieldType.boolean;
myrec.value_bool = valbool;
return await myrec.save();
} else {
myrec = await Settings.findOneAndUpdate({ idapp, key }, { $set: { value_bool: valbool } }, { new: false });
}
};
SettingsSchema.statics.getKeyNum = async function (idapp, key, mydefault) {
const Settings = this;