- Iscrizione Conacreis

This commit is contained in:
Paolo Arena
2021-06-04 10:07:57 +02:00
parent cf97870cc7
commit 9d5eda50ae
20 changed files with 3048 additions and 1525 deletions

View File

@@ -46,7 +46,6 @@ const ivSize = 128;
const iterations = 100;
if (!!process.env.GCM_API_KEY && process.env.GCM_API_KEY !== "") {
webpush.setGCMAPIKey(process.env.GCM_API_KEY);
@@ -55,8 +54,6 @@ if (!!process.env.GCM_API_KEY && process.env.GCM_API_KEY !== "") {
// console.log('setVapidDetails... config...');
// To Translate!
const textlang = {
it: {
@@ -1122,6 +1119,24 @@ module.exports = {
$or: [{ subaccount: { $exists: false } }, { subaccount: { $exists: true, $eq: false } }]
});
// Iscritti Conacreis
if (params.filterand.includes(shared_consts.FILTER_MISSING_PAYMENT))
filtriadded.push({
$or: [{ ha_pagato: { $exists: false } }, { ha_pagato: { $exists: true, $lt: 1 } }]
});
if (params.filterand.includes(shared_consts.FILTER_TO_MAKE_MEMBERSHIP_CARD))
filtriadded.push({
$or: [{ codiceConacreis: { $exists: false } }, { codiceConacreis: { $exists: true, $eq: '' } }]
});
if (params.filterand.includes(shared_consts.FILTER_MEMBERSHIP_CARD_OK))
filtriadded.push({
codiceConacreis: { $exists: true },
"$expr": { "$gt": [{ "$strLenCP": "$codiceConacreis" }, 0] }
});
}
@@ -1458,6 +1473,15 @@ module.exports = {
}
},
getstrDate_DD_MM_YYYY(mydate) {
if (mydate) {
// console.log('getstrDate', mytimestamp)
return this.appendLeadingZeroes(mydate.getDate()) + '/' + this.appendLeadingZeroes(mydate.getMonth() + 1) + '/' + this.appendLeadingZeroes(mydate.getFullYear());
} else {
return '';
}
},
getstrDateYYYY_MM_DD(mydate) {
if (mydate) {
// console.log('getstrDate', mytimestamp)