tango-app-api-trax 3.7.42 → 3.7.44
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-trax",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.44",
|
|
4
4
|
"description": "Trax",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"mongodb": "^6.8.0",
|
|
28
28
|
"nodemon": "^3.1.4",
|
|
29
29
|
"path": "^0.12.7",
|
|
30
|
-
"tango-api-schema": "^2.5.
|
|
30
|
+
"tango-api-schema": "^2.5.52",
|
|
31
31
|
"tango-app-api-middleware": "^3.5.2",
|
|
32
32
|
"url": "^0.11.4",
|
|
33
33
|
"winston": "^3.13.1",
|
|
@@ -2751,7 +2751,7 @@ export async function checklistCreation( req, res ) {
|
|
|
2751
2751
|
inputBody.checklistDescription = '';
|
|
2752
2752
|
let userId;
|
|
2753
2753
|
let storeDetails;
|
|
2754
|
-
if ( inputBody?.
|
|
2754
|
+
if ( inputBody?.storeName ) {
|
|
2755
2755
|
storeDetails = await storeService.findOne( { storeName: inputBody.storeName, clientId: inputBody.clientId, status: 'active' }, { storeId: 1, storeName: 1, storeProfile: 1 } );
|
|
2756
2756
|
if ( !storeDetails ) {
|
|
2757
2757
|
return res.sendError( 'Store Not Found', 500 );
|
|
@@ -2802,7 +2802,7 @@ export async function checklistCreation( req, res ) {
|
|
|
2802
2802
|
return res.sendError( 'Maximum 3 referenceImage only allowed', 500 );
|
|
2803
2803
|
}
|
|
2804
2804
|
let checklistName;
|
|
2805
|
-
if ( inputBody
|
|
2805
|
+
if ( inputBody?.storeName ) {
|
|
2806
2806
|
checklistName = `${inputBody.checklistName}(${storeDetails.storeName}-${dayjs().format( 'YYYY-MM-DD' )})`;
|
|
2807
2807
|
} else {
|
|
2808
2808
|
checklistName = `${inputBody.checklistName}(-${dayjs().format( 'YYYY-MM-DD' )})`;
|
|
@@ -2829,7 +2829,7 @@ export async function checklistCreation( req, res ) {
|
|
|
2829
2829
|
checkListType: 'custom',
|
|
2830
2830
|
publishDate: new Date(),
|
|
2831
2831
|
locationCount: 1,
|
|
2832
|
-
coverage: inputBody
|
|
2832
|
+
coverage: inputBody?.storeName ? 'store' : 'user',
|
|
2833
2833
|
allowedMultiSubmit: inputBody.allowedMultiSubmit,
|
|
2834
2834
|
scheduleStartTime: dayjs().format( 'hh:mm A' ),
|
|
2835
2835
|
scheduleStartTimeISO: dayjs().format(),
|
|
@@ -2926,7 +2926,6 @@ export async function checklistCreation( req, res ) {
|
|
|
2926
2926
|
'uniqueqid': uniqueqid,
|
|
2927
2927
|
} );
|
|
2928
2928
|
}
|
|
2929
|
-
console.log( sectionDetails );
|
|
2930
2929
|
sectionList.push( sectionDetails );
|
|
2931
2930
|
}
|
|
2932
2931
|
await CLquestions.create( sectionList );
|
|
@@ -2944,7 +2943,7 @@ export async function checklistCreation( req, res ) {
|
|
|
2944
2943
|
assignId: storeDetails?._id,
|
|
2945
2944
|
country: storeDetails?.storeProfile?.country,
|
|
2946
2945
|
state: storeDetails?.storeProfile?.state,
|
|
2947
|
-
coverage: inputBody
|
|
2946
|
+
coverage: inputBody?.storeName ? 'store' : 'user',
|
|
2948
2947
|
};
|
|
2949
2948
|
await CLassign.create( userDetails );
|
|
2950
2949
|
await insertSingleProcessData( response?._id );
|
|
@@ -2987,7 +2987,7 @@ export async function checklistv1( req, res ) {
|
|
|
2987
2987
|
|
|
2988
2988
|
const [ checklistResult, taskResult ] = await Promise.allSettled( [
|
|
2989
2989
|
processedchecklist.aggregate( buildPipeline( [ { checkListType: 'custom' } ], { isPlano: 1, planoId: 1, planoType: 1, floorId: 1 } ) ),
|
|
2990
|
-
processedTask.aggregate( taskBuildPipeline( [], { isPlano: 1, planoId: 1, planoType: 1, floorId: 1, refTaskId: 1, store_id: 1 } ) ),
|
|
2990
|
+
processedTask.aggregate( taskBuildPipeline( [], { isPlano: 1, planoId: 1, planoType: 1, floorId: 1, refTaskId: 1, store_id: 1, fixtureNewUI: 1 } ) ),
|
|
2991
2991
|
] );
|
|
2992
2992
|
|
|
2993
2993
|
const checklistData = checklistResult.status === 'fulfilled' ? checklistResult.value : [];
|
|
@@ -553,6 +553,7 @@ export const flagCardsV1 = async ( req, res ) => {
|
|
|
553
553
|
[
|
|
554
554
|
{ store_id: { $in: storeId } },
|
|
555
555
|
{ store_id: { $eq: '' }, userEmail: { $in: requestData.userEmailes } },
|
|
556
|
+
{ aiStoreList: { $in: storeId } },
|
|
556
557
|
] :
|
|
557
558
|
[
|
|
558
559
|
{ store_id: { $in: storeId } },
|
|
@@ -578,6 +579,7 @@ export const flagCardsV1 = async ( req, res ) => {
|
|
|
578
579
|
];
|
|
579
580
|
|
|
580
581
|
const getOverallChecklistData = await processedchecklistService.aggregate( findQuery );
|
|
582
|
+
console.log( '🚀 ~ flagCardsV1 ~ getOverallChecklistData:', getOverallChecklistData );
|
|
581
583
|
|
|
582
584
|
if ( !getOverallChecklistData.length ) {
|
|
583
585
|
const resVal = {
|