tango-app-api-infra 3.1.22 → 3.1.24
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
|
@@ -1292,21 +1292,37 @@ export async function infraTable( req, res ) {
|
|
|
1292
1292
|
let result = await aggregateTangoTicket( query );
|
|
1293
1293
|
if ( req.body.export && result.length > 0 ) {
|
|
1294
1294
|
const exportdata = [];
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1295
|
+
if ( req.user.userType ==='tango' ) {
|
|
1296
|
+
result.forEach( ( element ) => {
|
|
1297
|
+
exportdata.push( {
|
|
1298
|
+
'Ticket ID': element.ticketId,
|
|
1299
|
+
'Created Date': dayjs( element.issueDate ).format( 'DD MMM, YYYY' ),
|
|
1300
|
+
'Brand Name': element.clientName,
|
|
1301
|
+
'Brand ID': element.clientId,
|
|
1302
|
+
'Store Name': element.storeName,
|
|
1303
|
+
'Store ID': element.storeId,
|
|
1304
|
+
'Resloved By': element.userName,
|
|
1305
|
+
'Status': element.status,
|
|
1306
|
+
'Primary Issues': element.primaryIssue,
|
|
1307
|
+
'Secondary Issues': element.secondaryIssue,
|
|
1308
|
+
'Comment': element.otherscomment ? element.otherscomment : ( element.commentText?element.commentText:'-' ),
|
|
1309
|
+
} );
|
|
1308
1310
|
} );
|
|
1309
|
-
}
|
|
1311
|
+
} else {
|
|
1312
|
+
result.forEach( ( element ) => {
|
|
1313
|
+
exportdata.push( {
|
|
1314
|
+
'Ticket ID': element.ticketId,
|
|
1315
|
+
'Created Date': dayjs( element.issueDate ).format( 'DD MMM, YYYY' ),
|
|
1316
|
+
'Store Name': element.storeName,
|
|
1317
|
+
'Store ID': element.storeId,
|
|
1318
|
+
'Status': element.status,
|
|
1319
|
+
'Primary Issues': element.primaryIssue,
|
|
1320
|
+
'Secondary Issues': element.secondaryIssue,
|
|
1321
|
+
'Comment': element.otherscomment ? element.otherscomment : ( element.commentText?element.commentText:'-' ),
|
|
1322
|
+
} );
|
|
1323
|
+
} );
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1310
1326
|
await download( exportdata, res );
|
|
1311
1327
|
return;
|
|
1312
1328
|
}
|
|
@@ -1582,20 +1598,34 @@ export async function installationTable( req, res ) {
|
|
|
1582
1598
|
|
|
1583
1599
|
if ( req.body.export && result.length > 0 ) {
|
|
1584
1600
|
const exportdata = [];
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1601
|
+
if ( req.user.userType ==='tango' ) {
|
|
1602
|
+
result.forEach( ( element ) => {
|
|
1603
|
+
exportdata.push( {
|
|
1604
|
+
'Ticket ID': element.ticketId,
|
|
1605
|
+
'Created Date': dayjs( element.createdAt ).format( 'DD MMM, YYYY' ),
|
|
1606
|
+
'Brand Name': element.clientName,
|
|
1607
|
+
'Brand ID': element.clientId,
|
|
1608
|
+
'Store Name': element.storeName,
|
|
1609
|
+
'Store ID': element.storeId,
|
|
1610
|
+
'Installed By': element.userName,
|
|
1611
|
+
'Deployed Status': element.installationStatus,
|
|
1612
|
+
'Primary Issues': element.primaryIssue=='-'?'Issue not identified':element.primaryIssue,
|
|
1613
|
+
'Secondary Issues': element.secondaryIssue,
|
|
1614
|
+
} );
|
|
1597
1615
|
} );
|
|
1598
|
-
}
|
|
1616
|
+
} else {
|
|
1617
|
+
result.forEach( ( element ) => {
|
|
1618
|
+
exportdata.push( {
|
|
1619
|
+
'Ticket ID': element.ticketId,
|
|
1620
|
+
'Created Date': dayjs( element.createdAt ).format( 'DD MMM, YYYY' ),
|
|
1621
|
+
'Store Name': element.storeName,
|
|
1622
|
+
'Store ID': element.storeId,
|
|
1623
|
+
'Deployed Status': element.installationStatus,
|
|
1624
|
+
'Primary Issues': element.primaryIssue=='-'?'Issue not identified':element.primaryIssue,
|
|
1625
|
+
'Secondary Issues': element.secondaryIssue,
|
|
1626
|
+
} );
|
|
1627
|
+
} );
|
|
1628
|
+
}
|
|
1599
1629
|
await download( exportdata, res );
|
|
1600
1630
|
return;
|
|
1601
1631
|
}
|