tango-app-api-store-builder 1.0.0-beta-10 → 1.0.0-beta-11
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
|
@@ -731,14 +731,29 @@ export async function scan( req, res ) {
|
|
|
731
731
|
query = { ...query, rfId: req.body.rfId };
|
|
732
732
|
|
|
733
733
|
let planoProductDetails = await planoMappingService.findOne( query );
|
|
734
|
+
console.log( query, 'query' );
|
|
735
|
+
// let data = {
|
|
736
|
+
// ...( planoProductDetails ) ? { ...planoProductDetails._doc } : { planoId: req.body?.planoId, floorId: req.body?.floorId, fixtureId: req.body?.fixtureId, shelfId: shelfId, clientId: planoDetails.clientId, storeName: planoDetails.storeName, storeId: planoDetails.storeId, shelfPosition: req.body?.shelfPosition },
|
|
737
|
+
// rfId: req.body.rfId,
|
|
738
|
+
// compliance: !planoProductDetails ? 'misplaced' : 'proper',
|
|
739
|
+
// date: new Date( dayjs().format( 'YYYY-MM-DD' ) ),
|
|
740
|
+
// };
|
|
734
741
|
let data = {
|
|
735
|
-
|
|
742
|
+
planoId: req.body?.planoId,
|
|
743
|
+
floorId: req.body?.floorId,
|
|
744
|
+
fixtureId: req.body?.fixtureId,
|
|
745
|
+
shelfId: shelfId,
|
|
746
|
+
clientId: planoDetails.clientId,
|
|
747
|
+
storeName: planoDetails.storeName,
|
|
748
|
+
storeId: planoDetails.storeId,
|
|
749
|
+
shelfPosition: req.body?.shelfPosition,
|
|
736
750
|
rfId: req.body.rfId,
|
|
737
751
|
compliance: !planoProductDetails ? 'misplaced' : 'proper',
|
|
738
752
|
date: new Date( dayjs().format( 'YYYY-MM-DD' ) ),
|
|
739
753
|
};
|
|
740
754
|
delete data._id;
|
|
741
|
-
|
|
755
|
+
delete query.rfId;
|
|
756
|
+
query = { ...query, date: new Date( dayjs().format( 'YYYY-MM-DD' ) ), shelfPosition: req.body.shelfPosition };
|
|
742
757
|
await planoComplianceService.updateOne( query, data );
|
|
743
758
|
if ( !planoProductDetails ) {
|
|
744
759
|
return res.sendSuccess( false );
|