Aggiornamento Traduzioni ...
This commit is contained in:
@@ -104,6 +104,25 @@ NavePersistenteSchema.statics.findAllIdApp = function (idapp) {
|
||||
return NavePersistente.find(myfind).sort({ riga: 1, col: 1 });
|
||||
};
|
||||
|
||||
NavePersistenteSchema.statics.getListaNavi = function (idapp) {
|
||||
const NavePersistente = this;
|
||||
|
||||
const myfind = { idapp };
|
||||
|
||||
return NavePersistente.find(myfind,
|
||||
{
|
||||
index: 1,
|
||||
riga: 1,
|
||||
col: 1,
|
||||
riga1don: 1,
|
||||
col1don: 1,
|
||||
date_start: 1,
|
||||
provvisoria: 1,
|
||||
DoniConfermati: 1,
|
||||
}
|
||||
).sort({ riga: 1, col: 1 });
|
||||
};
|
||||
|
||||
NavePersistenteSchema.statics.findByRigaColByDonatore = function (idapp, riga, col, offset) {
|
||||
const NavePersistente = this;
|
||||
|
||||
@@ -132,7 +151,7 @@ NavePersistenteSchema.statics.getLastRigaCol = async function (idapp) {
|
||||
|
||||
NavePersistenteSchema.pre('save', async function (next) {
|
||||
if (this.isNew) {
|
||||
const myrec = await NavePersistente.findOne().limit(1).sort({_id:-1});
|
||||
const myrec = await NavePersistente.findOne().limit(1).sort({ _id: -1 });
|
||||
if (!!myrec) {
|
||||
this.index = myrec._doc.index + 1;
|
||||
} else {
|
||||
@@ -162,7 +181,7 @@ NavePersistenteSchema.statics.addRecordNavePersistenteByParams = async function
|
||||
col1don: params.col1don,
|
||||
date_start: params.date_start,
|
||||
date_gift_chat_open: params.date_gift_chat_open,
|
||||
provvisoria: params.provvisoria,
|
||||
provvisoria: true,
|
||||
});
|
||||
return await myNavePersistente.save();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user