tango-app-api-store-builder 1.0.0-beta-136 → 1.0.0-beta-138
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-
|
|
3
|
+
"version": "1.0.0-beta-138",
|
|
4
4
|
"description": "storeBuilder",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"path": "^0.12.7",
|
|
33
33
|
"selenium-webdriver": "^4.31.0",
|
|
34
34
|
"sharp": "^0.34.1",
|
|
35
|
-
"tango-api-schema": "^2.2.
|
|
35
|
+
"tango-api-schema": "^2.2.185",
|
|
36
36
|
"tango-app-api-middleware": "3.1.48",
|
|
37
37
|
"url": "^0.11.4",
|
|
38
38
|
"winston": "^3.17.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as floorService from '../service/storeBuilder.service.js';
|
|
2
2
|
import { logger } from 'tango-app-api-middleware';
|
|
3
3
|
// import * as storeService from '../service/store.service.js';
|
|
4
|
-
|
|
4
|
+
import * as planoService from '../service/planogram.service.js';
|
|
5
5
|
import * as storeFixtureService from '../service/storeFixture.service.js';
|
|
6
6
|
import * as fixtureShelfService from '../service/fixtureShelf.service.js';
|
|
7
7
|
// import * as planoProductService from '../service/planoProduct.service.js';
|
|
@@ -634,8 +634,23 @@ export async function updateFixtureStatus( req, res ) {
|
|
|
634
634
|
{ 'iss._id': new mongoose.Types.ObjectId( req.body.issueId ) },
|
|
635
635
|
] );
|
|
636
636
|
}
|
|
637
|
+
let vmTask = await planoTaskService.find(
|
|
638
|
+
{
|
|
639
|
+
planoId: new mongoose.Types.ObjectId( req.body.planoId ),
|
|
640
|
+
floorId: new mongoose.Types.ObjectId( req.body.floorId ),
|
|
641
|
+
type: 'vm',
|
|
642
|
+
},
|
|
637
643
|
|
|
638
|
-
|
|
644
|
+
);
|
|
645
|
+
let allTaskDone = vmTask.filter( ( data ) => data.status === 'incomplete' );
|
|
646
|
+
if ( allTaskDone.length === 0 ) {
|
|
647
|
+
await planoService.updateOne(
|
|
648
|
+
{
|
|
649
|
+
_id: new mongoose.Types.ObjectId( req.body.planoId ),
|
|
650
|
+
},
|
|
651
|
+
{ planoProgress: 100 },
|
|
652
|
+
);
|
|
653
|
+
}
|
|
639
654
|
res.sendSuccess( 'updated successfully' );
|
|
640
655
|
} catch ( e ) {
|
|
641
656
|
logger.error( { functionName: 'updateFixtureStatus', error: e } );
|