Aggiornamento Ore
This commit is contained in:
@@ -633,7 +633,7 @@ module.exports = {
|
||||
allfieldProject: function () {
|
||||
return ['idapp', 'userId', 'respUsername', 'viceRespUsername', 'pos', 'typeproj', 'id_main_project', 'id_parent', 'descr', 'longdescr', 'groupId', 'hoursplanned', 'hoursleft', 'themecolor', 'themebgcolor', 'hoursworked', 'priority', 'statusproj', 'created_at', 'modify_at',
|
||||
'completed_at', 'expiring_at', 'enableExpiring', 'progressCalc', 'modified', 'live_url', 'test_url', 'begin_development', 'begin_test', 'totalphases', 'actualphase', 'hoursweeky_plannedtowork', 'endwork_estimate'
|
||||
, 'privacyread', 'privacywrite', 'tipovisu']
|
||||
, 'privacyread', 'privacywrite', 'tipovisu', 'view']
|
||||
},
|
||||
|
||||
allfieldBooking: function () {
|
||||
@@ -841,7 +841,28 @@ module.exports = {
|
||||
},
|
||||
*/
|
||||
|
||||
sendNotifToAdmin(title, msg, tag = '') {
|
||||
const { User } = require('../models/user');
|
||||
|
||||
// console.log('nomeapp 1: ' , tools.getNomeAppByIdApp(1));
|
||||
// console.log('nomeapp 2: ' , tools.getNomeAppByIdApp(2));
|
||||
|
||||
User.find({ username: 'paoloarcnm' }).then((arrusers) => {
|
||||
if (arrusers !== null) {
|
||||
for (const user of arrusers) {
|
||||
this.sendNotificationToUser(user._id, title, msg, '/', '', tag, [])
|
||||
.then(ris => {
|
||||
if (ris) {
|
||||
|
||||
} else {
|
||||
// already sent the error on calling sendNotificationToUser
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
checkUserOk(userpassed, userauth, res) {
|
||||
this.mylog('checkUserOk', userpassed, userauth);
|
||||
@@ -1379,6 +1400,16 @@ module.exports = {
|
||||
return dayOfWeek === 1
|
||||
},
|
||||
|
||||
isSundayDate(mydate) {
|
||||
const dayOfWeek = mydate.getDay()
|
||||
return dayOfWeek === 0
|
||||
},
|
||||
|
||||
isMondayDate(mydate) {
|
||||
const dayOfWeek = mydate.getDay()
|
||||
return dayOfWeek === 1
|
||||
},
|
||||
|
||||
getWeekDayByLang(date, lang) {
|
||||
return this.getWeekDayByLangByNumCar(date, lang, 3)
|
||||
},
|
||||
@@ -1425,6 +1456,15 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
|
||||
getstrUTCDateYYYY_MM_DD(mydate) {
|
||||
if (mydate) {
|
||||
// console.log('getstrDate', mytimestamp)
|
||||
return mydate.getUTCFullYear() + '-' + this.appendLeadingZeroes(mydate.getUTCMonth() + 1) + '-' + this.appendLeadingZeroes(mydate.getUTCDate())
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
|
||||
getstrDateLong(mydate, lang) {
|
||||
if (mydate) {
|
||||
// console.log('getstrDate', mytimestamp)
|
||||
|
||||
Reference in New Issue
Block a user