tango-app-api-trax 3.2.1-beta-10 → 3.2.1-hotfix-1

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.2.1-beta-10",
3
+ "version": "3.2.1-hotfix-1",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  "mongodb": "^6.8.0",
27
27
  "nodemon": "^3.1.4",
28
28
  "path": "^0.12.7",
29
- "tango-api-schema": "^2.2.24",
29
+ "tango-api-schema": "^2.2.67",
30
30
  "tango-app-api-middleware": "^3.1.50",
31
31
  "url": "^0.11.4",
32
32
  "winston": "^3.13.1",
@@ -149,7 +149,7 @@ export async function startChecklist( req, res ) {
149
149
  }
150
150
 
151
151
  let updateData = {};
152
- let storeTimeZone = await storeService.findOne( { storeId: getBeforeChecklist[0].store_id, clientId: getBeforeChecklist[0].client_id }, { 'storeProfile.timeZone': 1 } );
152
+ let storeTimeZone = await storeService.findOne( { storeName: { $regex: getBeforeChecklist[0].storeName, $options: 'i' }, clientId: getBeforeChecklist[0].client_id }, { 'storeProfile.timeZone': 1 } );
153
153
  let currentDateTime;
154
154
  if ( storeTimeZone?.storeProfile?.timeZone ) {
155
155
  currentDateTime = dayjs().tz( storeTimeZone?.storeProfile?.timeZone );
@@ -1700,7 +1700,7 @@ export async function submitChecklist( req, res ) {
1700
1700
  updateQuery._id = new ObjectId( requestData.processedcheckListId );
1701
1701
  updateQuery.userId = req.user._id;
1702
1702
  updateQuery.date_string = requestData.date;
1703
- let storeTimeZone = await storeService.findOne( { storeId: getchecklist[0].store_id, clientId: getchecklist[0].client_id }, { 'storeProfile.timeZone': 1 } );
1703
+ let storeTimeZone = await storeService.findOne( { storeName: { $regex: getchecklist[0].storeName, $options: 'i' }, clientId: getchecklist[0].client_id }, { 'storeProfile.timeZone': 1 } );
1704
1704
  let currentDateTime;
1705
1705
  if ( storeTimeZone?.storeProfile?.timeZone ) {
1706
1706
  currentDateTime = dayjs().tz( storeTimeZone?.storeProfile?.timeZone );
@@ -2461,6 +2461,7 @@ export async function questionList( req, res ) {
2461
2461
  userEmail: { $ifNull: [ '$userEmail', '' ] },
2462
2462
  storeName: { $ifNull: [ '$storeName', '' ] },
2463
2463
  redoStatus: { $ifNull: [ '$redoStatus', false ] },
2464
+ rawImage: { $ifNull: [ '$rawImage', false ] },
2464
2465
  },
2465
2466
  } );
2466
2467
 
@@ -637,7 +637,7 @@ export const flagCardsV1 = async ( req, res ) => {
637
637
  flagCards.detectionFlag.count += resultData[item];
638
638
  }
639
639
  } );
640
- flagCards.totalFlag = flagCards.detectionFlag.count;
640
+ flagCards.totalFlag += flagCards.detectionFlag.count;
641
641
  }
642
642
 
643
643
  return res.sendSuccess( { flagCards } );