tango-app-api-audit 3.3.0-alpha.16 → 3.3.0-alpha.18
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
|
@@ -2295,6 +2295,7 @@ export async function userMetrics( req, res ) {
|
|
|
2295
2295
|
afterCount: 1,
|
|
2296
2296
|
checkIntime: 1,
|
|
2297
2297
|
checkOutTime: 1,
|
|
2298
|
+
mappingPerc: 1,
|
|
2298
2299
|
hours: {
|
|
2299
2300
|
$cond: {
|
|
2300
2301
|
if: { $lt: [ '$hours', 10 ] },
|
|
@@ -2330,6 +2331,7 @@ export async function userMetrics( req, res ) {
|
|
|
2330
2331
|
checkIntime: 1,
|
|
2331
2332
|
zoneName: 1,
|
|
2332
2333
|
checkOutTime: 1,
|
|
2334
|
+
mappingPerc: 1,
|
|
2333
2335
|
workingHours: {
|
|
2334
2336
|
$concat: [ '$hours', ':', '$minutes', ':', '$seconds' ],
|
|
2335
2337
|
},
|
|
@@ -2370,6 +2372,7 @@ export async function userMetrics( req, res ) {
|
|
|
2370
2372
|
totalCompletedFiles: 1,
|
|
2371
2373
|
beforeCount: 1,
|
|
2372
2374
|
afterCount: 1,
|
|
2375
|
+
mappingPerc: 1,
|
|
2373
2376
|
checkIntime: {
|
|
2374
2377
|
$dateToString: {
|
|
2375
2378
|
format: '%Y-%m-%d %H:%M:%S',
|
|
@@ -2430,6 +2433,7 @@ export async function userMetrics( req, res ) {
|
|
|
2430
2433
|
'check Intime': '$checkIntime',
|
|
2431
2434
|
'check OutTime': '$checkOutTime',
|
|
2432
2435
|
'working Hours': '$workingHours',
|
|
2436
|
+
'Mapping Percentage': '$mappingPerc',
|
|
2433
2437
|
},
|
|
2434
2438
|
},
|
|
2435
2439
|
);
|
|
@@ -3014,12 +3018,12 @@ export async function summarySplit( req, res ) {
|
|
|
3014
3018
|
},
|
|
3015
3019
|
draft: {
|
|
3016
3020
|
$cond: [
|
|
3017
|
-
{ $
|
|
3021
|
+
{ $eq: [ '$status', 'drafted' ] }, 1, 0,
|
|
3018
3022
|
],
|
|
3019
3023
|
},
|
|
3020
3024
|
assigned: {
|
|
3021
3025
|
$cond: [
|
|
3022
|
-
{ $
|
|
3026
|
+
{ $eq: [ '$status', 'assigned' ] }, 1, 0,
|
|
3023
3027
|
],
|
|
3024
3028
|
},
|
|
3025
3029
|
|
|
@@ -3037,11 +3041,11 @@ export async function summarySplit( req, res ) {
|
|
|
3037
3041
|
},
|
|
3038
3042
|
{
|
|
3039
3043
|
$group: {
|
|
3040
|
-
_id:
|
|
3044
|
+
_id: null,
|
|
3041
3045
|
auditInprogress: { $sum: '$auditInprogress' },
|
|
3042
3046
|
reAuditInprogress: { $sum: '$reAuditInprogress' },
|
|
3043
3047
|
draft: { $sum: '$draft' },
|
|
3044
|
-
assigned: { $sum: 'assigned' },
|
|
3048
|
+
assigned: { $sum: '$assigned' },
|
|
3045
3049
|
reAuditCompleted: { $sum: '$reAuditCompleted' },
|
|
3046
3050
|
auditCompleted: { $sum: '$auditCompleted' },
|
|
3047
3051
|
|
|
@@ -3084,8 +3088,7 @@ export async function summarySplit( req, res ) {
|
|
|
3084
3088
|
];
|
|
3085
3089
|
const result = await aggregateStoreAudit( query );
|
|
3086
3090
|
const totalCount = await aggregateAuditStoreData( totalQuery );
|
|
3087
|
-
result[0].totalCount = totalCount[0]?.total
|
|
3088
|
-
logger.info( { result: result } );
|
|
3091
|
+
result[0].totalCount = totalCount[0]?.total;
|
|
3089
3092
|
return res.sendSuccess( { result: result.length> 0? result[0]: temp } );
|
|
3090
3093
|
} catch ( error ) {
|
|
3091
3094
|
const err = error.message || 'Internal Server Error';
|
|
@@ -3243,11 +3246,9 @@ export async function overviewTable( req, res ) {
|
|
|
3243
3246
|
'Audit Type': element.auditType,
|
|
3244
3247
|
'Before Count': element.beforeCount,
|
|
3245
3248
|
'After Count': element.afterCount,
|
|
3246
|
-
'Start Time': element.startTime,
|
|
3247
|
-
'End Time': element.endTime,
|
|
3248
3249
|
// 'User Name': element.userName,
|
|
3249
3250
|
// 'User Email': element.userEmail,
|
|
3250
|
-
'Status': element.
|
|
3251
|
+
'Status': element.status,
|
|
3251
3252
|
} );
|
|
3252
3253
|
} );
|
|
3253
3254
|
await download( exportdata, res );
|