tango-app-api-store-builder 1.0.0-beta-39 → 1.0.0-beta-41

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-39",
3
+ "version": "1.0.0-beta-41",
4
4
  "description": "storeBuilder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -23,7 +23,7 @@
23
23
  "joi": "^17.13.3",
24
24
  "mongodb": "^6.12.0",
25
25
  "nodemon": "^3.1.9",
26
- "tango-api-schema": "^2.2.65",
26
+ "tango-api-schema": "^2.2.66",
27
27
  "tango-app-api-middleware": "^3.1.48",
28
28
  "winston": "^3.17.0",
29
29
  "winston-daily-rotate-file": "^5.0.0"
@@ -621,7 +621,12 @@ export async function storeFixturesv1( req, res ) {
621
621
  if ( cvProcessStatus ) {
622
622
  fixtureStatus = 'inprogress';
623
623
  } else {
624
- fixtureStatus = complianceCount === 0 ? '' : complianceCount === productCount ? 'complete' : 'incomplete';
624
+ const missingCount = await planoComplianceService.count( {
625
+ fixtureId: fixture._id,
626
+ compliance: 'missing',
627
+ date: currentDate,
628
+ } );
629
+ fixtureStatus = complianceCount === 0 && !missingCount ? '' : complianceCount === productCount ? 'complete' : 'incomplete';
625
630
  }
626
631
 
627
632
  return {
@@ -699,7 +704,12 @@ export async function storeFixturesv1( req, res ) {
699
704
  if ( cvProcessStatus ) {
700
705
  fixtureStatus = 'inprogress';
701
706
  } else {
702
- fixtureStatus = complianceCount === 0 ? '' : complianceCount === productCount ? 'complete' : 'incomplete';
707
+ const missingCount = await planoComplianceService.count( {
708
+ fixtureId: fixture._id,
709
+ compliance: 'missing',
710
+ date: currentDate,
711
+ } );
712
+ fixtureStatus = complianceCount === 0 && !missingCount ? '' : complianceCount === productCount ? 'complete' : 'incomplete';
703
713
  }
704
714
 
705
715
  return {
@@ -2339,7 +2349,7 @@ export const fixtureQrUpdate = async ( req, res ) => {
2339
2349
  } ),
2340
2350
  );
2341
2351
 
2342
- await planoQrConversionRequestService.updateOne( { fixtureId: new mongoose.Types.ObjectId( fixtureId ), date: currentDate }, { status: 'data-received' } );
2352
+ await planoQrConversionRequestService.updateOne( { fixtureId: new mongoose.Types.ObjectId( fixtureId ), date: currentDate }, { status: 'data-received', receivedQr: productQr } );
2343
2353
 
2344
2354
  return res.sendSuccess( updateStatus );
2345
2355
  } catch ( error ) {