tango-app-api-store-builder 1.0.0-beta-77 → 1.0.0-beta-78
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/crest_scrap.json +3254 -3254
- package/package.json +1 -1
- package/src/controllers/storeBuilder.controller.js +4 -3
package/package.json
CHANGED
|
@@ -1037,6 +1037,7 @@ export async function fixtureShelfProductv1( req, res ) {
|
|
|
1037
1037
|
};
|
|
1038
1038
|
|
|
1039
1039
|
fixture.imageUrl = await signedUrl( params );
|
|
1040
|
+
let fixtureConfigDetails = await fixtureConfigService.findOne( { _id: fixture?.fixtureConfigId } );
|
|
1040
1041
|
|
|
1041
1042
|
const currentDate = new Date( dayjs().format( 'YYYY-MM-DD' ) );
|
|
1042
1043
|
|
|
@@ -1080,7 +1081,7 @@ export async function fixtureShelfProductv1( req, res ) {
|
|
|
1080
1081
|
if ( fixture.toObject().productResolutionLevel === 'L1' ) {
|
|
1081
1082
|
const productMappings = await planoMappingService.find( { fixtureId: new mongoose.Types.ObjectId( fixtureId ), type: 'product' } );
|
|
1082
1083
|
const productDetails = await getProducts( productMappings );
|
|
1083
|
-
return res.sendSuccess( { ...fixture.toObject(), products: productDetails, vms: vmDetails, productCount: productMappings.length } );
|
|
1084
|
+
return res.sendSuccess( { ...fixture.toObject(), fixtureConfigLength: fixtureConfigDetails?.fixtureLength, products: productDetails, vms: vmDetails, productCount: productMappings.length } );
|
|
1084
1085
|
}
|
|
1085
1086
|
|
|
1086
1087
|
if ( [ 'L2', 'L4' ].includes( fixture.toObject().productResolutionLevel ) ) {
|
|
@@ -1094,7 +1095,7 @@ export async function fixtureShelfProductv1( req, res ) {
|
|
|
1094
1095
|
return { ...shelf.toObject(), products: productDetails };
|
|
1095
1096
|
} ),
|
|
1096
1097
|
);
|
|
1097
|
-
return res.sendSuccess( { ...fixture.toObject(), shelves: shelfProducts, vms: vmDetails, productCount: productCount } );
|
|
1098
|
+
return res.sendSuccess( { ...fixture.toObject(), fixtureConfigLength: fixtureConfigDetails?.fixtureLength, shelves: shelfProducts, vms: vmDetails, productCount: productCount } );
|
|
1098
1099
|
}
|
|
1099
1100
|
|
|
1100
1101
|
if ( fixture.toObject().productResolutionLevel === 'L3' ) {
|
|
@@ -1110,7 +1111,7 @@ export async function fixtureShelfProductv1( req, res ) {
|
|
|
1110
1111
|
acc[sectionName].push( { ...shelf.toObject(), products: productDetails } );
|
|
1111
1112
|
return acc;
|
|
1112
1113
|
}, Promise.resolve( {} ) );
|
|
1113
|
-
return res.sendSuccess( { ...fixture.toObject(), categories: await groupedShelves, vms: vmDetails, productCount: productCount } );
|
|
1114
|
+
return res.sendSuccess( { ...fixture.toObject(), fixtureConfigLength: fixtureConfigDetails?.fixtureLength, categories: await groupedShelves, vms: vmDetails, productCount: productCount } );
|
|
1114
1115
|
}
|
|
1115
1116
|
|
|
1116
1117
|
return res.sendError( 'Incorrect resolution level', 400 );
|