tango-app-api-audit 3.4.9 → 3.4.10
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
|
@@ -2345,12 +2345,21 @@ export async function userMetrics( req, res ) {
|
|
|
2345
2345
|
beforeCount: 1,
|
|
2346
2346
|
afterCount: 1,
|
|
2347
2347
|
mappingPerc: {
|
|
2348
|
-
$
|
|
2348
|
+
$cond: [
|
|
2349
|
+
{ $and: [
|
|
2350
|
+
{ $gt: [ '$beforeCount', 0 ] },
|
|
2351
|
+
{ $gt: [ '$afterCount', 0 ] },
|
|
2352
|
+
] },
|
|
2349
2353
|
{
|
|
2350
|
-
$
|
|
2351
|
-
{
|
|
2354
|
+
$round: [
|
|
2355
|
+
{
|
|
2356
|
+
$multiply: [
|
|
2357
|
+
{ $divide: [ '$afterCount', '$beforeCount' ] }, 100,
|
|
2358
|
+
],
|
|
2359
|
+
}, 2,
|
|
2352
2360
|
],
|
|
2353
|
-
},
|
|
2361
|
+
},
|
|
2362
|
+
0,
|
|
2354
2363
|
],
|
|
2355
2364
|
},
|
|
2356
2365
|
checkIntime: 1,
|
|
@@ -2535,7 +2544,7 @@ export async function userMetrics( req, res ) {
|
|
|
2535
2544
|
'Check Intime': '$checkIntime',
|
|
2536
2545
|
'Check OutTime': '$checkOutTime',
|
|
2537
2546
|
'Working Hours': '$workingHours',
|
|
2538
|
-
'Audited Date': { $dateToString: { format: '%Y
|
|
2547
|
+
'Audited Date': { $dateToString: { format: '%Y-%m-%d', date: '$createdAt' } },
|
|
2539
2548
|
},
|
|
2540
2549
|
},
|
|
2541
2550
|
);
|
|
@@ -3077,7 +3077,7 @@ export async function userMetrics( req, res ) {
|
|
|
3077
3077
|
'Check Intime': '$checkIntime',
|
|
3078
3078
|
'Check OutTime': '$checkOutTime',
|
|
3079
3079
|
'Working Hours': '$workingHours',
|
|
3080
|
-
'Audited Date': { $dateToString: { format: '%Y
|
|
3080
|
+
'Audited Date': { $dateToString: { format: '%Y-%m-%d', date: '$createdAt' } },
|
|
3081
3081
|
// 'Mapping Percentage': '$mappingPerc',
|
|
3082
3082
|
};
|
|
3083
3083
|
const YesNo = {
|
|
@@ -3089,7 +3089,7 @@ export async function userMetrics( req, res ) {
|
|
|
3089
3089
|
'Check Intime': '$checkIntime',
|
|
3090
3090
|
'Check OutTime': '$checkOutTime',
|
|
3091
3091
|
'Working Hours': '$workingHours',
|
|
3092
|
-
'Audited Date': { $dateToString: { format: '%Y
|
|
3092
|
+
'Audited Date': { $dateToString: { format: '%Y-%m-%d', date: '$createdAt' } },
|
|
3093
3093
|
// 'Mapping Percentage': '$mappingPerc',
|
|
3094
3094
|
};
|
|
3095
3095
|
[ 'uniform-detection', 'mobile-detection' ].includes( inputData.moduleType )?
|