tango-app-api-audit 3.3.0-alpha.17 → 3.3.0-alpha.19
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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-audit",
|
|
3
|
-
"version": "3.3.0-alpha.
|
|
3
|
+
"version": "3.3.0-alpha.19",
|
|
4
4
|
"description": "audit & audit metrics apis",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "app.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"start": "nodemon --exec \"eslint --fix . && node
|
|
8
|
+
"start": "nodemon --exec \"eslint --fix . && node app.js\""
|
|
9
9
|
},
|
|
10
10
|
"engines": {
|
|
11
11
|
"node": ">=18.10.0"
|
|
@@ -3018,12 +3018,12 @@ export async function summarySplit( req, res ) {
|
|
|
3018
3018
|
},
|
|
3019
3019
|
draft: {
|
|
3020
3020
|
$cond: [
|
|
3021
|
-
{ $
|
|
3021
|
+
{ $eq: [ '$status', 'drafted' ] }, 1, 0,
|
|
3022
3022
|
],
|
|
3023
3023
|
},
|
|
3024
3024
|
assigned: {
|
|
3025
3025
|
$cond: [
|
|
3026
|
-
{ $
|
|
3026
|
+
{ $eq: [ '$status', 'assigned' ] }, 1, 0,
|
|
3027
3027
|
],
|
|
3028
3028
|
},
|
|
3029
3029
|
|
|
@@ -3041,11 +3041,11 @@ export async function summarySplit( req, res ) {
|
|
|
3041
3041
|
},
|
|
3042
3042
|
{
|
|
3043
3043
|
$group: {
|
|
3044
|
-
_id:
|
|
3044
|
+
_id: null,
|
|
3045
3045
|
auditInprogress: { $sum: '$auditInprogress' },
|
|
3046
3046
|
reAuditInprogress: { $sum: '$reAuditInprogress' },
|
|
3047
3047
|
draft: { $sum: '$draft' },
|
|
3048
|
-
assigned: { $sum: 'assigned' },
|
|
3048
|
+
assigned: { $sum: '$assigned' },
|
|
3049
3049
|
reAuditCompleted: { $sum: '$reAuditCompleted' },
|
|
3050
3050
|
auditCompleted: { $sum: '$auditCompleted' },
|
|
3051
3051
|
|
|
@@ -3088,8 +3088,7 @@ export async function summarySplit( req, res ) {
|
|
|
3088
3088
|
];
|
|
3089
3089
|
const result = await aggregateStoreAudit( query );
|
|
3090
3090
|
const totalCount = await aggregateAuditStoreData( totalQuery );
|
|
3091
|
-
result[0].totalCount = totalCount[0]?.total
|
|
3092
|
-
logger.info( { result: result } );
|
|
3091
|
+
result[0].totalCount = totalCount[0]?.total;
|
|
3093
3092
|
return res.sendSuccess( { result: result.length> 0? result[0]: temp } );
|
|
3094
3093
|
} catch ( error ) {
|
|
3095
3094
|
const err = error.message || 'Internal Server Error';
|
|
@@ -3247,11 +3246,9 @@ export async function overviewTable( req, res ) {
|
|
|
3247
3246
|
'Audit Type': element.auditType,
|
|
3248
3247
|
'Before Count': element.beforeCount,
|
|
3249
3248
|
'After Count': element.afterCount,
|
|
3250
|
-
'Start Time': element.startTime,
|
|
3251
|
-
'End Time': element.endTime,
|
|
3252
3249
|
// 'User Name': element.userName,
|
|
3253
3250
|
// 'User Email': element.userEmail,
|
|
3254
|
-
'Status': element.
|
|
3251
|
+
'Status': element.status,
|
|
3255
3252
|
} );
|
|
3256
3253
|
} );
|
|
3257
3254
|
await download( exportdata, res );
|