tango-app-api-audit 3.3.0-alpha.15 → 3.3.0-alpha.16
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
|
@@ -2458,7 +2458,7 @@ export async function pendingSummaryTable( req, res ) {
|
|
|
2458
2458
|
let filters =[
|
|
2459
2459
|
{ fileDateISO: { $gte: dateRange.start } },
|
|
2460
2460
|
{ fileDateISO: { $lte: dateRange.end } },
|
|
2461
|
-
{ auditStatus: { $
|
|
2461
|
+
{ auditStatus: { $ne: 'completed' } },
|
|
2462
2462
|
|
|
2463
2463
|
];
|
|
2464
2464
|
|
|
@@ -2473,6 +2473,10 @@ export async function pendingSummaryTable( req, res ) {
|
|
|
2473
2473
|
if ( inputData.filterByAuditType.length > 0 ) {
|
|
2474
2474
|
filters.push( { auditType: { $in: inputData.filterByAuditType } } );
|
|
2475
2475
|
}
|
|
2476
|
+
|
|
2477
|
+
if ( inputData.filterByStatus.length > 0 ) {
|
|
2478
|
+
filters.push( { auditStatus: { $in: inputData.filterByStatus } } );
|
|
2479
|
+
}
|
|
2476
2480
|
const query =[
|
|
2477
2481
|
{
|
|
2478
2482
|
$match: {
|
|
@@ -2677,8 +2681,8 @@ export async function overAllAuditSummary( req, res ) {
|
|
|
2677
2681
|
auditInprogress: { $cond: [ { $and: [ { $in: [ '$status', [ 'inprogress' ] ] }, { $eq: [ '$auditType', 'Audit' ] } ] }, 1, 0 ] },
|
|
2678
2682
|
reAuditInprogress: { $cond: [ { $and: [ { $in: [ '$status', [ 'inprogress' ] ] }, { $eq: [ '$auditType', 'ReAudit' ] } ] }, 1, 0 ] },
|
|
2679
2683
|
draft: { $cond: [ { $eq: [ '$status', 'drafted' ] }, 1, 0 ] },
|
|
2680
|
-
assigned: { $cond: [ { $eq: [ '$status', '
|
|
2681
|
-
exceptNoAssigned: { $cond:
|
|
2684
|
+
assigned: { $cond: [ { $eq: [ '$status', 'assigned' ] }, 1, 0 ] },
|
|
2685
|
+
exceptNoAssigned: { $cond: { if: { $not: { $in: [ '$status', [ 'skipped', 'not_assign' ] ] } }, then: 1, else: 0 } },
|
|
2682
2686
|
auditCompleted: { $cond: [ { $and: [ { $in: [ '$status', [ 'completed' ] ] }, { $eq: [ '$auditType', 'Audit' ] } ] }, 1, 0 ] },
|
|
2683
2687
|
reAuditCompleted: { $cond: [ { $and: [ { $in: [ '$status', [ 'completed' ] ] }, { $eq: [ '$auditType', 'ReAudit' ] } ] }, 1, 0 ] },
|
|
2684
2688
|
|
|
@@ -2706,7 +2710,6 @@ export async function overAllAuditSummary( req, res ) {
|
|
|
2706
2710
|
reAuditInprogress: 1,
|
|
2707
2711
|
draft: 1,
|
|
2708
2712
|
assigned: 1,
|
|
2709
|
-
exceptNoAssigned1: 1,
|
|
2710
2713
|
exceptNoAssigned: { $subtract: [ temp.auditStores, '$exceptNoAssigned' ] },
|
|
2711
2714
|
auditCompleted: 1,
|
|
2712
2715
|
reAuditCompleted: 1,
|
|
@@ -3316,14 +3319,14 @@ export async function totalNotAssignedCount( req, res ) {
|
|
|
3316
3319
|
$project: {
|
|
3317
3320
|
inprogressAuditCount: {
|
|
3318
3321
|
$cond: [
|
|
3319
|
-
{ $in: [ '$status', [ 'completed', 'not_assign' ] ] }, 1, 0,
|
|
3322
|
+
{ $in: [ '$status', [ 'completed', 'not_assign', 'skipped' ] ] }, 1, 0,
|
|
3320
3323
|
],
|
|
3321
3324
|
},
|
|
3322
3325
|
inprogressZoneCount: { $cond: [
|
|
3323
|
-
{ $and: [ { $eq: [ '$moduleType', 'zone' ] }, { $in: [ '$status', [ 'completed', 'not_assign' ] ] } ] }, 1, 0,
|
|
3326
|
+
{ $and: [ { $eq: [ '$moduleType', 'zone' ] }, { $in: [ '$status', [ 'completed', 'not_assign', 'skipped' ] ] } ] }, 1, 0,
|
|
3324
3327
|
] },
|
|
3325
3328
|
inprogressTrafficCount: { $cond: [
|
|
3326
|
-
{ $and: [ { $eq: [ '$moduleType', 'traffic' ] }, { $in: [ '$status', [ 'completed', 'not_assign' ] ] } ] }, 1, 0,
|
|
3329
|
+
{ $and: [ { $eq: [ '$moduleType', 'traffic' ] }, { $in: [ '$status', [ 'completed', 'not_assign', 'skipped' ] ] } ] }, 1, 0,
|
|
3327
3330
|
] },
|
|
3328
3331
|
|
|
3329
3332
|
},
|