tango-app-api-trax 3.7.4-airtelv2-2 → 3.7.4-airtelv2-3
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
|
@@ -595,7 +595,7 @@ export const flagCardsV1 = async ( req, res ) => {
|
|
|
595
595
|
{
|
|
596
596
|
client_id: clientId,
|
|
597
597
|
publish: true,
|
|
598
|
-
checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum' ] },
|
|
598
|
+
checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking' ] },
|
|
599
599
|
},
|
|
600
600
|
{ checkListType: 1 },
|
|
601
601
|
);
|
|
@@ -2401,6 +2401,7 @@ export const flagChecklistComparisonCardsV1 = async ( req, res ) => {
|
|
|
2401
2401
|
export const flagChecklistTableV1 = async ( req, res ) => {
|
|
2402
2402
|
try {
|
|
2403
2403
|
let reqestData = req.body;
|
|
2404
|
+
let url = JSON.parse( process.env.LAMBDAURL );
|
|
2404
2405
|
// Get User Based Checklist //
|
|
2405
2406
|
// let loginUser = { clientId: reqestData.clientId, role: req.user.role, userType: req.user.userType, userEmail: req.user.email };
|
|
2406
2407
|
// let getUserEmails = await getChecklistUsers( loginUser );
|
|
@@ -2472,7 +2473,6 @@ export const flagChecklistTableV1 = async ( req, res ) => {
|
|
|
2472
2473
|
}
|
|
2473
2474
|
|
|
2474
2475
|
const total = await processedchecklistService.aggregate( pipeline );
|
|
2475
|
-
|
|
2476
2476
|
if ( !total.length ) {
|
|
2477
2477
|
return res.sendError( { error: 'No Data Found' }, 204 );
|
|
2478
2478
|
}
|
|
@@ -2511,13 +2511,13 @@ export const flagChecklistTableV1 = async ( req, res ) => {
|
|
|
2511
2511
|
data[index].date = dayjs( data[index].dateString ).format( 'DD MMM, YYYY' );
|
|
2512
2512
|
}
|
|
2513
2513
|
|
|
2514
|
-
|
|
2515
2514
|
return res.sendSuccess( { customData: data, totalCount: total?.length } );
|
|
2516
2515
|
} else {
|
|
2517
2516
|
if ( reqestData.export ) {
|
|
2518
2517
|
reqestData.limit = 10000;
|
|
2519
2518
|
reqestData.offset = 0;
|
|
2520
|
-
let LamdaURL = 'https://vpcejaftccr3jzqf5wrdkks7yy0krqix.lambda-url.ap-south-1.on.aws/';
|
|
2519
|
+
// let LamdaURL = 'https://vpcejaftccr3jzqf5wrdkks7yy0krqix.lambda-url.ap-south-1.on.aws/'; // prod
|
|
2520
|
+
let LamdaURL = url.flagChecklistTableV1; // test
|
|
2521
2521
|
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
2522
2522
|
if ( resultData ) {
|
|
2523
2523
|
if ( resultData.status_code == '200' ) {
|
|
@@ -2544,6 +2544,7 @@ export const flagChecklistTableV1 = async ( req, res ) => {
|
|
|
2544
2544
|
// 'Store Spoc Email': element?.SpocEmail,
|
|
2545
2545
|
'Detections': element?.detections,
|
|
2546
2546
|
'Detection Status': element?.detectionStatus,
|
|
2547
|
+
...( element?.downtime !== undefined && { 'Downtime': element.downtime } ),
|
|
2547
2548
|
} );
|
|
2548
2549
|
} );
|
|
2549
2550
|
}
|
|
@@ -2557,7 +2558,8 @@ export const flagChecklistTableV1 = async ( req, res ) => {
|
|
|
2557
2558
|
}
|
|
2558
2559
|
// console.log( reqestData );
|
|
2559
2560
|
|
|
2560
|
-
let LamdaURL = 'https://vpcejaftccr3jzqf5wrdkks7yy0krqix.lambda-url.ap-south-1.on.aws/';
|
|
2561
|
+
// let LamdaURL = 'https://vpcejaftccr3jzqf5wrdkks7yy0krqix.lambda-url.ap-south-1.on.aws/'; // Prod
|
|
2562
|
+
let LamdaURL = url.flagChecklistTableV1; // test
|
|
2561
2563
|
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
2562
2564
|
// console.log( 'resultData =>', resultData );
|
|
2563
2565
|
if ( resultData ) {
|
|
@@ -2714,7 +2716,7 @@ export const checklistDropdownV1 = async ( req, res ) => {
|
|
|
2714
2716
|
$or: [
|
|
2715
2717
|
{ questionFlag: { $gte: 1 } },
|
|
2716
2718
|
{ timeFlag: { $gte: 1 } },
|
|
2717
|
-
{ checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum' ] } },
|
|
2719
|
+
{ checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking' ] } },
|
|
2718
2720
|
{
|
|
2719
2721
|
runAIQuestionCount: { $gte: 1 },
|
|
2720
2722
|
},
|
|
@@ -2905,7 +2907,7 @@ export const flagComparisonCardsV2 = async ( req, res ) => {
|
|
|
2905
2907
|
{
|
|
2906
2908
|
client_id: requestData.clientId,
|
|
2907
2909
|
publish: true,
|
|
2908
|
-
checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum' ] },
|
|
2910
|
+
checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking' ] },
|
|
2909
2911
|
},
|
|
2910
2912
|
{ checkListType: 1 },
|
|
2911
2913
|
);
|
|
@@ -2996,7 +2998,7 @@ export const flagTablesV2 = async ( req, res ) => {
|
|
|
2996
2998
|
);
|
|
2997
2999
|
|
|
2998
3000
|
if ( requestData?.filter === 'all' ) {
|
|
2999
|
-
findAndQuery.push( { $or: [ { checkListType: { $in: [ 'custom', 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum' ] } } ] } );
|
|
3001
|
+
findAndQuery.push( { $or: [ { checkListType: { $in: [ 'custom', 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking' ] } } ] } );
|
|
3000
3002
|
} else if ( requestData?.filter === 'question' ) {
|
|
3001
3003
|
findAndQuery.push( { checkListType: 'custom' } );
|
|
3002
3004
|
findAndQuery.push( { questionFlag: { $gte: 1 } } );
|
|
@@ -3004,7 +3006,7 @@ export const flagTablesV2 = async ( req, res ) => {
|
|
|
3004
3006
|
findAndQuery.push( { checkListType: 'custom' } );
|
|
3005
3007
|
findAndQuery.push( { timeFlag: { $gte: 1 } } );
|
|
3006
3008
|
} else if ( requestData?.filter === 'detection' ) {
|
|
3007
|
-
findAndQuery.push( { checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum' ] } } );
|
|
3009
|
+
findAndQuery.push( { checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking' ] } } );
|
|
3008
3010
|
} else if ( requestData?.filter === 'runAI' ) {
|
|
3009
3011
|
if ( req.body.runAIChecklistName ) {
|
|
3010
3012
|
findAndQuery.push( { checkListName: { $in: req.body.runAIChecklistName } } );
|