tango-app-api-infra 3.1.34-beta.30 → 3.1.34-beta.32
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 +2 -2
- package/src/controllers/clientInfra.controller.js +16 -16
- package/src/controllers/infra.controllers.js +6 -6
- package/src/routes/dataMismatch.routes.js +7 -28
- package/src/routes/employeetrainig.routes.js +4 -14
- package/src/routes/infra.routes.js +17 -67
- package/src/routes/storeInfra.routes.js +8 -30
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-infra",
|
|
3
|
-
"version": "3.1.34-beta.
|
|
3
|
+
"version": "3.1.34-beta.32",
|
|
4
4
|
"description": "infra",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"nodemon": "^3.1.0",
|
|
28
28
|
"swagger-ui-express": "^5.0.0",
|
|
29
29
|
"tango-api-schema": "^2.1.30",
|
|
30
|
-
"tango-app-api-middleware": "^3.1.43-alpha.
|
|
30
|
+
"tango-app-api-middleware": "^3.1.43-alpha.7",
|
|
31
31
|
"winston": "^3.12.0",
|
|
32
32
|
"winston-daily-rotate-file": "^5.0.0"
|
|
33
33
|
},
|
|
@@ -13,7 +13,7 @@ export async function infraCard( req, res ) {
|
|
|
13
13
|
try {
|
|
14
14
|
let date = await getUTC( new Date( req.body.fromDate ), new Date( req.body.toDate ) );
|
|
15
15
|
let storecountQuery ={ 'clientId': { $in: req.body.clientId }, 'createdAt': { $lte: date.end }, 'status': 'active' };
|
|
16
|
-
if ( req.
|
|
16
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
17
17
|
storecountQuery = { ...storecountQuery, ...{ storeId: { $in: req.body.assignedStores } } };
|
|
18
18
|
}
|
|
19
19
|
let storeCount = await countDocumentsStore( storecountQuery );
|
|
@@ -30,7 +30,7 @@ export async function infraCard( req, res ) {
|
|
|
30
30
|
},
|
|
31
31
|
];
|
|
32
32
|
|
|
33
|
-
if ( req.
|
|
33
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
34
34
|
yetToInstallQuery.push(
|
|
35
35
|
{
|
|
36
36
|
$match: {
|
|
@@ -50,7 +50,7 @@ export async function infraCard( req, res ) {
|
|
|
50
50
|
],
|
|
51
51
|
},
|
|
52
52
|
} ];
|
|
53
|
-
if ( req.
|
|
53
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
54
54
|
totalStoreQuery.push(
|
|
55
55
|
{
|
|
56
56
|
$match: {
|
|
@@ -232,7 +232,7 @@ export async function installationCard( req, res ) {
|
|
|
232
232
|
console.log( '-->', req.body.assignedStores );
|
|
233
233
|
|
|
234
234
|
|
|
235
|
-
if ( req.
|
|
235
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
236
236
|
console.log( req.body.assignedStores );
|
|
237
237
|
baseQuery = { ...baseQuery, ...{ storeId: { $in: req.body.assignedStores } } };
|
|
238
238
|
}
|
|
@@ -257,7 +257,7 @@ export async function installationCard( req, res ) {
|
|
|
257
257
|
},
|
|
258
258
|
},
|
|
259
259
|
];
|
|
260
|
-
if ( req.
|
|
260
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
261
261
|
ticketbaseQuery.push(
|
|
262
262
|
{
|
|
263
263
|
$match: {
|
|
@@ -374,7 +374,7 @@ export async function infraIssuesTable( req, res ) {
|
|
|
374
374
|
],
|
|
375
375
|
},
|
|
376
376
|
} ];
|
|
377
|
-
if ( req.
|
|
377
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
378
378
|
totalStoreQuery.push(
|
|
379
379
|
{
|
|
380
380
|
$match: {
|
|
@@ -399,7 +399,7 @@ export async function infraIssuesTable( req, res ) {
|
|
|
399
399
|
],
|
|
400
400
|
},
|
|
401
401
|
} );
|
|
402
|
-
if ( req.
|
|
402
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
403
403
|
pendingquery.push(
|
|
404
404
|
{
|
|
405
405
|
$match: {
|
|
@@ -545,7 +545,7 @@ export async function infraIssuesTable( req, res ) {
|
|
|
545
545
|
} ];
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
if ( req.
|
|
548
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
549
549
|
storesQuery.push(
|
|
550
550
|
{
|
|
551
551
|
$match: {
|
|
@@ -713,7 +713,7 @@ export async function InstallationIssuesTable( req, res ) {
|
|
|
713
713
|
],
|
|
714
714
|
},
|
|
715
715
|
} );
|
|
716
|
-
if ( req.
|
|
716
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
717
717
|
query.push(
|
|
718
718
|
{
|
|
719
719
|
$match: {
|
|
@@ -781,7 +781,7 @@ export async function InstallationIssuesTable( req, res ) {
|
|
|
781
781
|
},
|
|
782
782
|
);
|
|
783
783
|
let storesQuery = [];
|
|
784
|
-
if ( req.
|
|
784
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
785
785
|
storesQuery.push(
|
|
786
786
|
{
|
|
787
787
|
$match: {
|
|
@@ -1143,7 +1143,7 @@ export async function hourWiseDownstores( req, res ) {
|
|
|
1143
1143
|
],
|
|
1144
1144
|
},
|
|
1145
1145
|
} ];
|
|
1146
|
-
if ( req.
|
|
1146
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
1147
1147
|
totalStoreQuery.push(
|
|
1148
1148
|
{
|
|
1149
1149
|
$match: {
|
|
@@ -1168,7 +1168,7 @@ export async function hourWiseDownstores( req, res ) {
|
|
|
1168
1168
|
],
|
|
1169
1169
|
},
|
|
1170
1170
|
} );
|
|
1171
|
-
if ( req.
|
|
1171
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
1172
1172
|
pendingquery.push(
|
|
1173
1173
|
{
|
|
1174
1174
|
$match: {
|
|
@@ -1313,7 +1313,7 @@ export async function hourWiseDownstores( req, res ) {
|
|
|
1313
1313
|
} ];
|
|
1314
1314
|
}
|
|
1315
1315
|
}
|
|
1316
|
-
if ( req.
|
|
1316
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
1317
1317
|
storesQuery.push(
|
|
1318
1318
|
{
|
|
1319
1319
|
$match: {
|
|
@@ -1522,7 +1522,7 @@ export async function ticketCountSplit( req, res ) {
|
|
|
1522
1522
|
{ issueType: { $in: [ 'highcount', 'lowcount' ] } },
|
|
1523
1523
|
|
|
1524
1524
|
];
|
|
1525
|
-
if ( req.
|
|
1525
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
1526
1526
|
filter.push( { 'basicDetails.storeId': { $in: req.body.assignedStores } } );
|
|
1527
1527
|
}
|
|
1528
1528
|
if ( req.user.userType === 'client' ) {
|
|
@@ -1603,7 +1603,7 @@ export async function overViewTable( req, res ) {
|
|
|
1603
1603
|
'basicDetails.clientId': { $in: inputData.clientId },
|
|
1604
1604
|
},
|
|
1605
1605
|
];
|
|
1606
|
-
if ( req.
|
|
1606
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
1607
1607
|
filter.push( { 'basicDetails.storeId': { $in: req.body.assignedStores } } );
|
|
1608
1608
|
}
|
|
1609
1609
|
if ( req.user.userType === 'client' ) {
|
|
@@ -1701,7 +1701,7 @@ export async function ticketCount( req, res ) {
|
|
|
1701
1701
|
},
|
|
1702
1702
|
|
|
1703
1703
|
];
|
|
1704
|
-
if ( req.
|
|
1704
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
1705
1705
|
filter.push( { 'basicDetails.storeId': { $in: req.body.assignedStores } } );
|
|
1706
1706
|
}
|
|
1707
1707
|
if ( req.user.userType === 'client' ) {
|
|
@@ -1109,7 +1109,7 @@ export async function allCounts( req, res ) {
|
|
|
1109
1109
|
let date = await getUTC( new Date( req.body.fromDate ), new Date( req.body.toDate ) );
|
|
1110
1110
|
let countQuery = [];
|
|
1111
1111
|
|
|
1112
|
-
if ( req.
|
|
1112
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
1113
1113
|
countQuery.push(
|
|
1114
1114
|
{
|
|
1115
1115
|
$match: {
|
|
@@ -1203,7 +1203,7 @@ export async function infraTable( req, res ) {
|
|
|
1203
1203
|
},
|
|
1204
1204
|
} );
|
|
1205
1205
|
}
|
|
1206
|
-
if ( req.
|
|
1206
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
1207
1207
|
query.push(
|
|
1208
1208
|
{
|
|
1209
1209
|
$match: {
|
|
@@ -1538,7 +1538,7 @@ export async function installationTable( req, res ) {
|
|
|
1538
1538
|
},
|
|
1539
1539
|
} );
|
|
1540
1540
|
}
|
|
1541
|
-
if ( req.
|
|
1541
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
1542
1542
|
query.push(
|
|
1543
1543
|
{
|
|
1544
1544
|
$match: {
|
|
@@ -2014,7 +2014,7 @@ export async function storeFilter( req, res ) {
|
|
|
2014
2014
|
'issueType': { '$in': [ 'highcount', 'lowcount' ] }, 'basicDetails.clientId': inputData.clientId, 'basicDetails.storeId': { $exists: true },
|
|
2015
2015
|
};
|
|
2016
2016
|
}
|
|
2017
|
-
if ( req.
|
|
2017
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
2018
2018
|
console.log( '---->', req.body.assignedStores );
|
|
2019
2019
|
|
|
2020
2020
|
query = { ...query, 'basicDetails.storeId': { $in: req.body.assignedStores } };
|
|
@@ -2054,7 +2054,7 @@ export async function dataMismatchTable( req, res ) {
|
|
|
2054
2054
|
},
|
|
2055
2055
|
|
|
2056
2056
|
];
|
|
2057
|
-
if ( req.
|
|
2057
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
2058
2058
|
countFilter.push(
|
|
2059
2059
|
{ 'basicDetails.storeId': { $in: req.body.assignedStores } },
|
|
2060
2060
|
);
|
|
@@ -2124,7 +2124,7 @@ export async function dataMismatchTable( req, res ) {
|
|
|
2124
2124
|
{ 'basicDetails.clientId': { $in: inputData.clientId } },
|
|
2125
2125
|
{ issueType: { $in: [ 'highcount', 'lowcount' ] } },
|
|
2126
2126
|
];
|
|
2127
|
-
if ( req.
|
|
2127
|
+
if ( req.user&&req.user.userType ==='client' ) {
|
|
2128
2128
|
filter.push(
|
|
2129
2129
|
{ 'basicDetails.storeId': { $in: req.body.assignedStores } },
|
|
2130
2130
|
);
|
|
@@ -1,34 +1,13 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
|
-
import { isAllowedSessionHandler
|
|
2
|
+
import { isAllowedSessionHandler } from 'tango-app-api-middleware';
|
|
3
3
|
import { createTicket, updateMat, activityList, showActivity, secondaryReason } from '../controllers/dataMismatch.controller.js';
|
|
4
4
|
import { infraReasonExists, ticketExists, validateDetails, validateTicketstatus } from '../validations/infra.validation.js';
|
|
5
5
|
import { updateTicketIssue } from '../controllers/dataMismatch.controller.js';
|
|
6
6
|
export const dataMismatchTicketRouter = express.Router();
|
|
7
7
|
|
|
8
|
-
dataMismatchTicketRouter.post( '/createTicket', isAllowedSessionHandler,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
dataMismatchTicketRouter.post( '/
|
|
13
|
-
|
|
14
|
-
{ featureName: 'manage', name: 'tickets', permissions: [ 'isView' ] } ],
|
|
15
|
-
} ), ticketExists, updateMat );
|
|
16
|
-
dataMismatchTicketRouter.post( '/activityList', isAllowedSessionHandler, authorize( {
|
|
17
|
-
userType: [ 'client', 'tango' ], access: [
|
|
18
|
-
{ featureName: 'manage', name: 'tickets', permissions: [ 'isView' ] } ],
|
|
19
|
-
} ), activityList );
|
|
20
|
-
dataMismatchTicketRouter.post( '/showActivity', isAllowedSessionHandler, authorize( {
|
|
21
|
-
userType: [ 'client', 'tango' ], access: [
|
|
22
|
-
{ featureName: 'manage', name: 'tickets', permissions: [ 'isView' ] } ],
|
|
23
|
-
} ), ticketExists, showActivity );
|
|
24
|
-
dataMismatchTicketRouter.post( '/secondaryReason', isAllowedSessionHandler, authorize( {
|
|
25
|
-
userType: [ 'client', 'tango' ], access: [
|
|
26
|
-
{ featureName: 'manage', name: 'tickets', permissions: [ 'isEdit' ] },
|
|
27
|
-
{ featureName: 'manage', name: 'stores', permissions: [ 'isEdit' ] },
|
|
28
|
-
],
|
|
29
|
-
} ), secondaryReason );
|
|
30
|
-
|
|
31
|
-
dataMismatchTicketRouter.post( '/updateTicketIssue', isAllowedSessionHandler, authorize( {
|
|
32
|
-
userType: [ 'client', 'tango' ], access: [
|
|
33
|
-
{ featureName: 'manage', name: 'tickets', permissions: [ 'isEdit' ] } ],
|
|
34
|
-
} ), ticketExists, validateTicketstatus, infraReasonExists, updateTicketIssue );
|
|
8
|
+
dataMismatchTicketRouter.post( '/createTicket', isAllowedSessionHandler, validateDetails, createTicket );
|
|
9
|
+
dataMismatchTicketRouter.post( '/updateMat', isAllowedSessionHandler, ticketExists, updateMat );
|
|
10
|
+
dataMismatchTicketRouter.post( '/activityList', isAllowedSessionHandler, activityList );
|
|
11
|
+
dataMismatchTicketRouter.post( '/showActivity', isAllowedSessionHandler, ticketExists, showActivity );
|
|
12
|
+
dataMismatchTicketRouter.post( '/secondaryReason', isAllowedSessionHandler, secondaryReason );
|
|
13
|
+
dataMismatchTicketRouter.post( '/updateTicketIssue', isAllowedSessionHandler, ticketExists, validateTicketstatus, infraReasonExists, updateTicketIssue );
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
import { createTicket, updatecomment, activityLog, updateMatStatus } from '../controllers/employeeTraning.controller.js';
|
|
2
2
|
import { ticketExists, validateDetails } from '../validations/infra.validation.js';
|
|
3
3
|
import express from 'express';
|
|
4
|
-
import { isAllowedSessionHandler
|
|
4
|
+
import { isAllowedSessionHandler } from 'tango-app-api-middleware';
|
|
5
5
|
export const employeeTrainigRouter = express.Router();
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
employeeTrainigRouter.post( '/createTicket', validateDetails, createTicket );
|
|
9
|
-
employeeTrainigRouter.post( '/updatecomment', isAllowedSessionHandler,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} ), ticketExists, updatecomment );
|
|
13
|
-
|
|
14
|
-
employeeTrainigRouter.post( '/activityLog', isAllowedSessionHandler, authorize( {
|
|
15
|
-
userType: [ 'tango' ], access: [
|
|
16
|
-
{ featureName: 'manage', name: 'tickets', permissions: [ 'isView' ] } ],
|
|
17
|
-
} ), ticketExists, activityLog );
|
|
18
|
-
employeeTrainigRouter.post( '/updateMatStatus', isAllowedSessionHandler, authorize( {
|
|
19
|
-
userType: [ 'tango' ], access: [
|
|
20
|
-
{ featureName: 'manage', name: 'tickets', permissions: [ 'isView' ] } ],
|
|
21
|
-
} ), ticketExists, updateMatStatus );
|
|
9
|
+
employeeTrainigRouter.post( '/updatecomment', isAllowedSessionHandler, ticketExists, updatecomment );
|
|
10
|
+
employeeTrainigRouter.post( '/activityLog', isAllowedSessionHandler, ticketExists, activityLog );
|
|
11
|
+
employeeTrainigRouter.post( '/updateMatStatus', isAllowedSessionHandler, ticketExists, updateMatStatus );
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import express from 'express';
|
|
3
|
-
import { isAllowedSessionHandler,
|
|
3
|
+
import { isAllowedSessionHandler, validate, getAssinedStore } from 'tango-app-api-middleware';
|
|
4
4
|
import { validateDetails, bulkvalidateDetails, validateTicket, bulkvalidateTicket, validateTicketstatus, ticketExists, infraReasonExists, InfrastepstoResolve, InfraAlert } from '../validations/infra.validation.js';
|
|
5
5
|
import { createTicket, bulkcreateTicket, updateStatus, createReason, PrimaryReasons, matTable, removeAttachment,
|
|
6
6
|
secondaryReason, updateTicketIssue, viewTicket, AlertTicketReply, uploadAttachments, getInfraIssues, AddemailUser, OutsideUserList,
|
|
@@ -13,77 +13,27 @@ export const infraRouter = express.Router();
|
|
|
13
13
|
infraRouter.post( '/createTicket', validateDetails, validateTicket, createTicket );
|
|
14
14
|
infraRouter.post( '/bulkcreateTicket', bulkvalidateDetails, bulkvalidateTicket, bulkcreateTicket );
|
|
15
15
|
infraRouter.post( '/createReason', createReason );
|
|
16
|
-
infraRouter.post( '/updateStatus', isAllowedSessionHandler,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
infraRouter.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
infraRouter.post( '/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{ featureName: 'manage', name: 'stores', permissions: [ 'isEdit' ] },
|
|
28
|
-
],
|
|
29
|
-
} ), secondaryReason );
|
|
30
|
-
infraRouter.post( '/updateTicketIssue', isAllowedSessionHandler, authorize( {
|
|
31
|
-
userType: [ 'client', 'tango' ], access: [
|
|
32
|
-
{ featureName: 'manage', name: 'tickets', permissions: [ 'isEdit' ] } ],
|
|
33
|
-
} ), ticketExists, validateTicketstatus, infraReasonExists, InfrastepstoResolve, InfraAlert, updateTicketIssue );
|
|
34
|
-
infraRouter.post( '/viewTicket', isAllowedSessionHandler, authorize( {
|
|
35
|
-
userType: [ 'client', 'tango' ], access: [
|
|
36
|
-
{ featureName: 'manage', name: 'tickets', permissions: [ 'isView' ] } ],
|
|
37
|
-
} ), ticketExists, viewTicket );
|
|
38
|
-
infraRouter.post( '/AlertTicketReply', isAllowedSessionHandler, authorize( {
|
|
39
|
-
userType: [ 'client', 'tango' ], access: [
|
|
40
|
-
{ featureName: 'manage', name: 'tickets', permissions: [ 'isEdit', 'isView' ] } ],
|
|
41
|
-
} ), ticketExists, AlertTicketReply );
|
|
42
|
-
infraRouter.put( '/uploadAttachments/:ticketId', isAllowedSessionHandler, authorize( {
|
|
43
|
-
userType: [ 'client', 'tango' ], access: [
|
|
44
|
-
{ featureName: 'manage', name: 'tickets', permissions: [ 'isEdit', 'isView' ] } ],
|
|
45
|
-
} ), ticketExists, uploadAttachments );
|
|
46
|
-
infraRouter.put( '/removeAttachment/:ticketId', isAllowedSessionHandler, authorize( {
|
|
47
|
-
userType: [ 'client', 'tango' ], access: [
|
|
48
|
-
{ featureName: 'manage', name: 'tickets', permissions: [ 'isEdit', 'isView' ] } ],
|
|
49
|
-
} ), ticketExists, removeAttachment );
|
|
50
|
-
infraRouter.post( '/updateInstallationTicket', isAllowedSessionHandler, authorize( {
|
|
51
|
-
userType: [ 'client', 'tango' ], access: [
|
|
52
|
-
{ featureName: 'manage', name: 'tickets', permissions: [ 'isEdit', 'isView' ] } ],
|
|
53
|
-
} ), ticketExists, updateInstallationTicket );
|
|
54
|
-
infraRouter.post( '/emailUserList', isAllowedSessionHandler, authorize( {
|
|
55
|
-
userType: [ 'client', 'tango' ], access: [
|
|
56
|
-
{ featureName: 'settings', name: 'configuration', permissions: [ 'isView' ] } ],
|
|
57
|
-
} ), emailUserList );
|
|
58
|
-
infraRouter.post( '/OutsideUserList', isAllowedSessionHandler, authorize( {
|
|
59
|
-
userType: [ 'client', 'tango' ], access: [
|
|
60
|
-
{ featureName: 'settings', name: 'configuration', permissions: [ 'isView' ] } ],
|
|
61
|
-
} ), OutsideUserList );
|
|
16
|
+
infraRouter.post( '/updateStatus', isAllowedSessionHandler, ticketExists, updateStatus );
|
|
17
|
+
infraRouter.get( '/PrimaryReasons', isAllowedSessionHandler, PrimaryReasons );
|
|
18
|
+
infraRouter.post( '/secondaryReason', isAllowedSessionHandler, secondaryReason );
|
|
19
|
+
infraRouter.post( '/updateTicketIssue', isAllowedSessionHandler, ticketExists, validateTicketstatus, infraReasonExists, InfrastepstoResolve, InfraAlert, updateTicketIssue );
|
|
20
|
+
infraRouter.post( '/viewTicket', isAllowedSessionHandler, ticketExists, viewTicket );
|
|
21
|
+
infraRouter.post( '/AlertTicketReply', isAllowedSessionHandler, ticketExists, AlertTicketReply );
|
|
22
|
+
infraRouter.put( '/uploadAttachments/:ticketId', isAllowedSessionHandler, ticketExists, uploadAttachments );
|
|
23
|
+
infraRouter.put( '/removeAttachment/:ticketId', isAllowedSessionHandler, ticketExists, removeAttachment );
|
|
24
|
+
infraRouter.post( '/updateInstallationTicket', isAllowedSessionHandler, ticketExists, updateInstallationTicket );
|
|
25
|
+
infraRouter.post( '/emailUserList', isAllowedSessionHandler, emailUserList );
|
|
26
|
+
infraRouter.post( '/OutsideUserList', isAllowedSessionHandler, OutsideUserList );
|
|
62
27
|
|
|
63
|
-
infraRouter.post( '/AddemailUser', isAllowedSessionHandler,
|
|
64
|
-
|
|
65
|
-
{ featureName: 'settings', name: 'configuration', permissions: [ 'isView' ] } ],
|
|
66
|
-
} ), AddemailUser );
|
|
67
|
-
infraRouter.post( '/saveInfraEmailConfig', isAllowedSessionHandler, authorize( {
|
|
68
|
-
userType: [ 'client', 'tango' ], access: [
|
|
69
|
-
{ featureName: 'settings', name: 'configuration', permissions: [ 'isEdit', 'isView' ] } ],
|
|
70
|
-
} ), saveInfraEmailConfig );
|
|
28
|
+
infraRouter.post( '/AddemailUser', isAllowedSessionHandler, AddemailUser );
|
|
29
|
+
infraRouter.post( '/saveInfraEmailConfig', isAllowedSessionHandler, saveInfraEmailConfig );
|
|
71
30
|
infraRouter.post( '/invoice', invoice );
|
|
72
31
|
infraRouter.post( '/allCounts', isAllowedSessionHandler, getAssinedStore, allCounts );
|
|
73
32
|
infraRouter.post( '/infraTable', isAllowedSessionHandler, getAssinedStore, infraTable );
|
|
74
33
|
infraRouter.post( '/installationTable', isAllowedSessionHandler, getAssinedStore, installationTable );
|
|
75
34
|
infraRouter.post( '/matTable', isAllowedSessionHandler, matTable );
|
|
76
35
|
infraRouter.post( '/dataMismatchTable', isAllowedSessionHandler, getAssinedStore, dataMismatchTable );
|
|
77
|
-
infraRouter.post( '/assignTicket', isAllowedSessionHandler,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
} ), assignTicket );
|
|
81
|
-
infraRouter.post( '/storeFilter', isAllowedSessionHandler, authorize( {
|
|
82
|
-
userType: [ 'client', 'tango' ], access: [
|
|
83
|
-
{ featureName: 'manage', name: 'tickets', permissions: [ 'isView' ] } ],
|
|
84
|
-
} ), getAssinedStore, storeFilter );
|
|
85
|
-
infraRouter.post( '/get-infra-issues', isAllowedSessionHandler, authorize( {
|
|
86
|
-
userType: [ 'client', 'tango' ], access: [
|
|
87
|
-
{ featureName: 'manage', name: 'tickets', permissions: [ 'isView' ] } ],
|
|
88
|
-
} ), validate( getInfraIssueValid ), getInfraIssues );
|
|
36
|
+
infraRouter.post( '/assignTicket', isAllowedSessionHandler, assignTicket );
|
|
37
|
+
infraRouter.post( '/storeFilter', isAllowedSessionHandler, getAssinedStore, storeFilter );
|
|
38
|
+
infraRouter.post( '/get-infra-issues', isAllowedSessionHandler, validate( getInfraIssueValid ), getInfraIssues );
|
|
89
39
|
|
|
@@ -1,35 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
import express from 'express';
|
|
3
|
-
import { isAllowedSessionHandler
|
|
3
|
+
import { isAllowedSessionHandler } from 'tango-app-api-middleware';
|
|
4
4
|
import { storeTicketList, storeTicketcard, edgeAppLogTable, viewedgeAppLog, cameraAngleChange, datewiseDowntime, streamwiseDowntime } from '../controllers/storeInfra.controlller.js';
|
|
5
5
|
export const storeInfraRouter = express.Router();
|
|
6
6
|
|
|
7
|
-
storeInfraRouter.post( '/storeTicketList', isAllowedSessionHandler,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
storeInfraRouter.post( '/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} ), storeTicketcard );
|
|
15
|
-
storeInfraRouter.post( '/edgeAppLogTable', isAllowedSessionHandler, authorize( {
|
|
16
|
-
userType: [ 'client', 'tango' ], access: [
|
|
17
|
-
{ featureName: 'manage', name: 'stores', permissions: [ 'isView' ] } ],
|
|
18
|
-
} ), edgeAppLogTable );
|
|
19
|
-
storeInfraRouter.post( '/viewedgeAppLog', isAllowedSessionHandler, authorize( {
|
|
20
|
-
userType: [ 'client', 'tango' ], access: [
|
|
21
|
-
{ featureName: 'manage', name: 'stores', permissions: [ 'isView' ] } ],
|
|
22
|
-
} ), viewedgeAppLog );
|
|
23
|
-
storeInfraRouter.post( '/cameraAngleChange', isAllowedSessionHandler, authorize( {
|
|
24
|
-
userType: [ 'client', 'tango' ], access: [
|
|
25
|
-
{ featureName: 'manage', name: 'stores', permissions: [ 'isView' ] } ],
|
|
26
|
-
} ), cameraAngleChange );
|
|
27
|
-
|
|
28
|
-
storeInfraRouter.post( '/datewiseDowntime', isAllowedSessionHandler, authorize( {
|
|
29
|
-
userType: [ 'client', 'tango' ], access: [
|
|
30
|
-
{ featureName: 'manage', name: 'stores', permissions: [ 'isView' ] } ],
|
|
31
|
-
} ), datewiseDowntime );
|
|
32
|
-
storeInfraRouter.post( '/streamwiseDowntime', isAllowedSessionHandler, authorize( {
|
|
33
|
-
userType: [ 'client', 'tango' ], access: [
|
|
34
|
-
{ featureName: 'manage', name: 'stores', permissions: [ 'isView' ] } ],
|
|
35
|
-
} ), streamwiseDowntime );
|
|
7
|
+
storeInfraRouter.post( '/storeTicketList', isAllowedSessionHandler, storeTicketList );
|
|
8
|
+
storeInfraRouter.post( '/storeTicketcard', isAllowedSessionHandler, storeTicketcard );
|
|
9
|
+
storeInfraRouter.post( '/edgeAppLogTable', isAllowedSessionHandler, edgeAppLogTable );
|
|
10
|
+
storeInfraRouter.post( '/viewedgeAppLog', isAllowedSessionHandler, viewedgeAppLog );
|
|
11
|
+
storeInfraRouter.post( '/cameraAngleChange', isAllowedSessionHandler, cameraAngleChange );
|
|
12
|
+
storeInfraRouter.post( '/datewiseDowntime', isAllowedSessionHandler, datewiseDowntime );
|
|
13
|
+
storeInfraRouter.post( '/streamwiseDowntime', isAllowedSessionHandler, streamwiseDowntime );
|