tango-app-api-store-builder 1.0.0-beta-17 → 1.0.0-beta-18

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-store-builder",
3
- "version": "1.0.0-beta-17",
3
+ "version": "1.0.0-beta-18",
4
4
  "description": "storeBuilder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1160,7 +1160,7 @@ export async function scanv1( req, res ) {
1160
1160
  planoComplianceService.count( { date: currentDate, shelfId: shelf.toObject()._id, compliance: 'proper' } ),
1161
1161
  ] );
1162
1162
  return res.sendSuccess( { shelfId: shelf.toObject()._id, shelfNumber: shelf.toObject().shelfNumber,
1163
- isScanned: shelfCompliance > shelfProducts/2 ? true : false } );
1163
+ isScanned: shelfCompliance >= shelfProducts/2 ? true : false } );
1164
1164
  }
1165
1165
 
1166
1166
  if ( !req.body.shelfId ) return res.sendError( 'Shelf id is required', 400 );
@@ -1193,7 +1193,7 @@ export async function scanv1( req, res ) {
1193
1193
  planoComplianceService.count( { date: currentDate, shelfId: shelf.toObject()._id, compliance: 'proper' } ),
1194
1194
  ] );
1195
1195
  return res.sendSuccess( { shelfId: shelf.toObject()._id, shelfNumber: shelf.toObject().shelfNumber,
1196
- isScanned: shelfCompliance > shelfProducts/2 ? true : false } );
1196
+ isScanned: shelfCompliance >= shelfProducts/2 ? true : false } );
1197
1197
  }
1198
1198
 
1199
1199
  const complianceData = { ...misplacedProductMapping.toObject(), planoMappingId: misplacedProductMapping.toObject()._id, compliance: 'misplaced' };
@@ -1255,7 +1255,7 @@ export async function scanv1( req, res ) {
1255
1255
 
1256
1256
  const shelfMetrics = {
1257
1257
  shelfId: productMapping.toObject().shelfId,
1258
- isScanned: shelfCompliance > shelfProducts/2 ? true : false };
1258
+ isScanned: shelfCompliance >= shelfProducts/2 ? true : false };
1259
1259
 
1260
1260
 
1261
1261
  return res.sendSuccess( { data: { ...productMapping.toObject(), ...( productDetails ? productDetails?.toObject() : {} ) }, fixtureMetrics: fixtureMetrics, shelfMetrics: shelfMetrics, status: 'proper' } );
@@ -1268,7 +1268,7 @@ export async function scanv1( req, res ) {
1268
1268
  planoComplianceService.count( { date: currentDate, shelfId: shelf.toObject()._id, compliance: 'proper' } ),
1269
1269
  ] );
1270
1270
  return res.sendSuccess( { shelfId: shelf.toObject()._id, shelfNumber: shelf.toObject().shelfNumber,
1271
- isScanned: shelfCompliance > shelfProducts/2 ? true : false } );
1271
+ isScanned: shelfCompliance >= shelfProducts/2 ? true : false } );
1272
1272
  }
1273
1273
 
1274
1274
  if ( !req.body.shelfId ) return res.sendError( 'Shelf id is required', 400 );
@@ -1306,8 +1306,9 @@ export async function scanv1( req, res ) {
1306
1306
  planoMappingService.count( { shelfId: shelf.toObject()._id } ),
1307
1307
  planoComplianceService.count( { date: currentDate, shelfId: shelf.toObject()._id, compliance: 'proper' } ),
1308
1308
  ] );
1309
+
1309
1310
  return res.sendSuccess( { shelfId: shelf.toObject()._id, shelfNumber: shelf.toObject().shelfNumber,
1310
- isScanned: shelfCompliance > shelfProducts/2 ? true : false } );
1311
+ isScanned: shelfCompliance >= shelfProducts/2 ? true : false } );
1311
1312
  }
1312
1313
 
1313
1314
 
@@ -1344,7 +1345,7 @@ export async function scanv1( req, res ) {
1344
1345
 
1345
1346
  const shelfMetrics = {
1346
1347
  shelfId: productMapping.toObject().shelfId,
1347
- isScanned: shelfCompliance > shelfProducts/2 ? true : false };
1348
+ isScanned: shelfCompliance >= shelfProducts/2 ? true : false };
1348
1349
 
1349
1350
  return res.sendSuccess( { data: { ...misplacedProductMapping.toObject(), ...( misplacedProductDetails ? misplacedProductDetails?.toObject() : {} ) },
1350
1351
  fixtureMetrics: fixtureMetrics, shelfMetrics: shelfMetrics, status: 'proper' } );
@@ -1384,7 +1385,7 @@ export async function scanv1( req, res ) {
1384
1385
 
1385
1386
  const shelfMetrics = {
1386
1387
  shelfId: productMapping.toObject().shelfId,
1387
- isScanned: shelfCompliance > shelfProducts/2 ? true : false };
1388
+ isScanned: shelfCompliance >= shelfProducts/2 ? true : false };
1388
1389
 
1389
1390
  return res.sendSuccess( { data: { ...productMapping.toObject(), ...( productDetails ? productDetails?.toObject() : {} ) }, fixtureMetrics: fixtureMetrics, shelfMetrics: shelfMetrics, status: 'proper' } );
1390
1391
  } else if ( fixture.productResolutionLevel === 'L4' ) {
@@ -1396,7 +1397,7 @@ export async function scanv1( req, res ) {
1396
1397
  planoComplianceService.count( { date: currentDate, shelfId: shelf.toObject()._id, compliance: 'proper' } ),
1397
1398
  ] );
1398
1399
  return res.sendSuccess( { shelfId: shelf.toObject()._id, shelfNumber: shelf.toObject().shelfNumber,
1399
- isScanned: shelfCompliance > shelfProducts/2 ? true : false } );
1400
+ isScanned: shelfCompliance >= shelfProducts/2 ? true : false } );
1400
1401
  }
1401
1402
 
1402
1403
  if ( !req.body.shelfId ) return res.sendError( 'Shelf id is required', 400 );
@@ -1423,7 +1424,7 @@ export async function scanv1( req, res ) {
1423
1424
  planoComplianceService.count( { date: currentDate, shelfId: shelf.toObject()._id, compliance: 'proper' } ),
1424
1425
  ] );
1425
1426
  return res.sendSuccess( { shelfId: shelf.toObject()._id, shelfNumber: shelf.toObject().shelfNumber,
1426
- isScanned: shelfCompliance > shelfProducts/2 ? true : false } );
1427
+ isScanned: shelfCompliance >= shelfProducts/2 ? true : false } );
1427
1428
  }
1428
1429
 
1429
1430
  if ( productMapping.toObject().rfId !== req.body.rfId ) {
@@ -1484,7 +1485,7 @@ export async function scanv1( req, res ) {
1484
1485
 
1485
1486
  const shelfMetrics = {
1486
1487
  shelfId: productMapping.toObject().shelfId,
1487
- isScanned: shelfCompliance > shelfProducts/2 ? true : false };
1488
+ isScanned: shelfCompliance >= shelfProducts/2 ? true : false };
1488
1489
 
1489
1490
  return res.sendSuccess( { data: { ...productMapping.toObject(), ...( productDetails ? productDetails?.toObject() : {} ) }, fixtureMetrics: fixtureMetrics, shelfMetrics: shelfMetrics, status: 'proper' } );
1490
1491
  } else {