tango-app-api-infra 3.1.1 → 3.1.2
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
|
@@ -149,7 +149,7 @@ export async function infraCard( req, res ) {
|
|
|
149
149
|
export async function installationCard( req, res ) {
|
|
150
150
|
try {
|
|
151
151
|
let onboardedCount = await countDocumentsStore( { clientId: { $in: req.body.clientId } } );
|
|
152
|
-
let installedCount = await countDocumentsStore( { 'clientId': { $in: req.body.clientId }, 'edge.
|
|
152
|
+
let installedCount = await countDocumentsStore( { 'clientId': { $in: req.body.clientId }, 'edge.firstFile': true } );
|
|
153
153
|
|
|
154
154
|
let yettoInstallCount = await aggregateTangoTicket( [
|
|
155
155
|
{
|
|
@@ -306,16 +306,26 @@ export async function InfrastepstoResolve( req, res, next ) {
|
|
|
306
306
|
export async function InfraAlert( req, res, next ) {
|
|
307
307
|
try {
|
|
308
308
|
if ( req.body.hibernationDays ) {
|
|
309
|
-
|
|
310
|
-
|
|
309
|
+
let actionBy = '';
|
|
310
|
+
if ( req.user.userType == 'tango' ) {
|
|
311
|
+
actionBy = 'Tango';
|
|
312
|
+
} else if ( req.user.userType == 'client' ) {
|
|
313
|
+
actionBy = 'User';
|
|
314
|
+
}
|
|
315
|
+
|
|
311
316
|
req.body.ticketActivity.push( {
|
|
312
317
|
actionType: 'statusCheckReply',
|
|
313
|
-
actionBy:
|
|
318
|
+
actionBy: actionBy,
|
|
314
319
|
timeStamp: new Date(),
|
|
320
|
+
statusCheckReply: 'No',
|
|
315
321
|
IdentifiedBy: req.user.userName,
|
|
316
322
|
hibernationDays: req.body.hibernationDays,
|
|
317
323
|
} );
|
|
324
|
+
req.body.hibernationDays = dayjs().add( req.body.hibernationDays, 'days' ).format( 'YYYY-MM-DD' );
|
|
325
|
+
await updateOneStore( { storeId: req.body.basicDetails.storeId }, { 'ticketConfigs.hibernation': new Date( req.body.hibernationDays ) } );
|
|
326
|
+
|
|
318
327
|
await updateOneTangoTicket( { ticketId: req.body.ticketId }, { 'hibernation': new Date( req.body.hibernationDays ) } );
|
|
328
|
+
console.log( req.body.ticketActivity );
|
|
319
329
|
} else {
|
|
320
330
|
if ( req.body.issueType == 'infra' ) {
|
|
321
331
|
let client = await findOneClient( { clientId: req.body.basicDetails.clientId }, { ticketConfigs: 1 } );
|