tango-app-api-infra 3.1.34-beta.25 → 3.1.34-beta.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -462,7 +462,7 @@ export async function emailUserList( req, res ) {
|
|
|
462
462
|
clientList = [ ...clientList, ...spocList ];
|
|
463
463
|
}
|
|
464
464
|
|
|
465
|
-
let findOutsideUserlist = await findmailonlyuser( { clientId: req.query.clientId } );
|
|
465
|
+
let findOutsideUserlist = await findmailonlyuser( { 'clientId': req.query.clientId, 'emailAlert.infra': true } );
|
|
466
466
|
let MailOnlyUsers = [];
|
|
467
467
|
if ( findOutsideUserlist.length > 0 ) {
|
|
468
468
|
for ( let user of findOutsideUserlist ) {
|
|
@@ -526,7 +526,6 @@ export async function emailUserList( req, res ) {
|
|
|
526
526
|
}
|
|
527
527
|
} else if ( user.ticketConfigs.infraReport.type && user.ticketConfigs.infraReport.type === 'defined' ) {
|
|
528
528
|
let times =await generateTimeIntervals( user.ticketConfigs.infraReport.startTime, user.ticketConfigs.infraReport.endTime, user.ticketConfigs.infraReport.interval );
|
|
529
|
-
// console.log( times );
|
|
530
529
|
for ( let store of user.storeList ) {
|
|
531
530
|
const result = await checkStoreTimezoneMatchesInterval( times, store.storeProfile.timeZone );
|
|
532
531
|
if ( result ) {
|
|
@@ -563,7 +562,7 @@ export async function checkStoreTimezoneMatchesInterval( times, storeTimezone )
|
|
|
563
562
|
const intervalTime = dayjs.tz( `${currentStoreTime.format( 'YYYY-MM-DD' )} ${interval}`, 'YYYY-MM-DD HH:mm', storeTimezone );
|
|
564
563
|
const diffInMinutes = intervalTime.diff( currentStoreTime, 'minute' );
|
|
565
564
|
// console.log( diffInMinutes );
|
|
566
|
-
return diffInMinutes >= 0 && diffInMinutes <=
|
|
565
|
+
return diffInMinutes >= 0 && diffInMinutes <= 15;
|
|
567
566
|
} );
|
|
568
567
|
};
|
|
569
568
|
export async function generateTimeIntervals( startTime, endTime, interval ) {
|