tango-app-api-infra 3.0.61-dev → 3.0.63-dev
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/index.js
CHANGED
|
@@ -6,9 +6,9 @@ import { userInfraRouter } from './src/routes/userInfra.routes.js';
|
|
|
6
6
|
import { storeInfraRouter } from './src/routes/storeInfra.routes.js';
|
|
7
7
|
import { clientInfraRouter } from './src/routes/clientInfra.routes.js';
|
|
8
8
|
import { employeeTrainigRouter } from './src/routes/employeetrainig.routes.js';
|
|
9
|
-
import {
|
|
9
|
+
import { dataMismatchTicketRouter } from './src/routes/dataMismatch.routes.js';
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
export { infraRouter, internalInfraRouter, userInfraRouter, storeInfraRouter,
|
|
12
|
+
export { infraRouter, internalInfraRouter, userInfraRouter, storeInfraRouter, dataMismatchTicketRouter, clientInfraRouter, employeeTrainigRouter };
|
|
13
13
|
|
|
14
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-infra",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.63-dev",
|
|
4
4
|
"description": "infra",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"mongodb": "^6.4.0",
|
|
26
26
|
"nodemon": "^3.1.0",
|
|
27
27
|
"tango-api-schema": "^2.0.94",
|
|
28
|
-
"tango-app-api-middleware": "^1.0.
|
|
28
|
+
"tango-app-api-middleware": "^1.0.63-dev",
|
|
29
29
|
"winston": "^3.12.0",
|
|
30
30
|
"winston-daily-rotate-file": "^5.0.0"
|
|
31
31
|
},
|
|
@@ -156,7 +156,8 @@ export async function installationCard( req, res ) {
|
|
|
156
156
|
} );
|
|
157
157
|
let installedCount = await countDocumentsStore( { 'clientId': { $in: req.body.clientId },
|
|
158
158
|
'edge.firstFile': true, 'status': 'active' } );
|
|
159
|
-
|
|
159
|
+
let deactiveCount = await countDocumentsStore( { 'clientId': { $in: req.body.clientId },
|
|
160
|
+
'status': 'deactive' } );
|
|
160
161
|
let yettoInstallCount = await aggregateTangoTicket( [
|
|
161
162
|
{
|
|
162
163
|
$match: {
|
|
@@ -250,6 +251,7 @@ export async function installationCard( req, res ) {
|
|
|
250
251
|
}
|
|
251
252
|
res.sendSuccess( {
|
|
252
253
|
onboardedStoresCount: onboardedCount,
|
|
254
|
+
inactiveStoresCount: deactiveCount,
|
|
253
255
|
installedStoresCount: installedCount,
|
|
254
256
|
yettoInstallCount: yettoInstallCount.length,
|
|
255
257
|
installFailedCount: installFailedCount.length,
|
|
@@ -125,6 +125,7 @@ export async function bulkcreateTicket( req, res ) {
|
|
|
125
125
|
|
|
126
126
|
export async function updateStatus( req, res ) {
|
|
127
127
|
try {
|
|
128
|
+
console.log( req.user.userType );
|
|
128
129
|
if ( req.user.userType == 'tango' ) {
|
|
129
130
|
if ( req.body.status == 'inprogress' ) {
|
|
130
131
|
req.body.ticketActivity.push( {
|
|
@@ -133,8 +134,10 @@ export async function updateStatus( req, res ) {
|
|
|
133
134
|
actionBy: 'Tango',
|
|
134
135
|
IdentifiedBy: req.user.userName,
|
|
135
136
|
} );
|
|
137
|
+
req.body.status ='inprogress';
|
|
136
138
|
}
|
|
137
139
|
req.body.ticketDetails.addressingUser = req.user._id;
|
|
140
|
+
console.log( req.body );
|
|
138
141
|
let updateTicket = await updateOneTangoTicket( { ticketId: req.body.ticketId }, req.body );
|
|
139
142
|
if ( updateTicket ) {
|
|
140
143
|
res.sendSuccess( 'Ticket Updated Successfully' );
|
|
@@ -147,6 +150,7 @@ export async function updateStatus( req, res ) {
|
|
|
147
150
|
actionBy: 'User',
|
|
148
151
|
IdentifiedBy: req.user.userName,
|
|
149
152
|
} );
|
|
153
|
+
req.body.status ='inprogress';
|
|
150
154
|
}
|
|
151
155
|
req.body.ticketDetails.addressingClient = req.user._id;
|
|
152
156
|
let updateTicket = await updateOneTangoTicket( { ticketId: req.body.ticketId }, req.body );
|
|
@@ -2,9 +2,9 @@ import express from 'express';
|
|
|
2
2
|
import { isAllowedSessionHandler, authorize } from 'tango-app-api-middleware';
|
|
3
3
|
import { createTicket } from '../controllers/dataMismatch.controller.js';
|
|
4
4
|
import { validateDetails } from '../validations/infra.validation.js';
|
|
5
|
-
export const
|
|
5
|
+
export const dataMismatchTicketRouter = express.Router();
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
dataMismatchTicketRouter.post( '/createTicket', isAllowedSessionHandler, authorize( {
|
|
8
8
|
userType: [ 'client', 'tango' ], access: [
|
|
9
9
|
{ featureName: 'manage', name: 'tickets', permissions: [ 'isView', 'isEdit' ] } ],
|
|
10
10
|
} ), validateDetails, createTicket );
|