tango-app-api-trax 3.2.1-hotfix-6 → 3.2.1-hotfix-7
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
|
@@ -470,7 +470,8 @@ async function insertData( requestData ) {
|
|
|
470
470
|
client_id: getCLconfig.client_id,
|
|
471
471
|
aiStoreList: storeDetails ? storeDetails.map( ( store ) => store.storeId ) : [],
|
|
472
472
|
};
|
|
473
|
-
await processedchecklist.create( data );
|
|
473
|
+
// await processedchecklist.create( data );
|
|
474
|
+
await processedchecklist.updateOne( { date_string: currentdate, checkListId: updatedchecklist._id, sourceCheckList_id: getCLconfig._id, checkListType: getCLconfig.checkListType }, data );
|
|
474
475
|
}
|
|
475
476
|
}
|
|
476
477
|
}
|
|
@@ -951,6 +951,7 @@ export const flagTablesV1 = async ( req, res ) => {
|
|
|
951
951
|
// },
|
|
952
952
|
},
|
|
953
953
|
aiStoreList: { $max: '$aiStoreList' },
|
|
954
|
+
aiStoreListNew: { $sum: { $size: '$aiStoreList' } },
|
|
954
955
|
submittedQuestionCount: {
|
|
955
956
|
$sum: {
|
|
956
957
|
$cond: [
|
|
@@ -966,7 +967,7 @@ export const flagTablesV1 = async ( req, res ) => {
|
|
|
966
967
|
findQuery.push( {
|
|
967
968
|
$project: {
|
|
968
969
|
assignedStores: '$storeCount',
|
|
969
|
-
assignedStoresAi: '$
|
|
970
|
+
assignedStoresAi: '$aiStoreListNew',
|
|
970
971
|
checkListName: 1,
|
|
971
972
|
checkListChar: 1,
|
|
972
973
|
sourceCheckList_id: 1,
|