tango-app-api-store-builder 1.0.0-beta-222 → 1.0.0-beta-224
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 +2 -2
- package/src/controllers/script.controller.js +21 -21
- package/src/controllers/storeBuilder.controller.js +879 -40
- package/src/routes/storeBuilder.routes.js +55 -53
- package/src/service/planoCompliance.service.js +4 -0
- package/Euro.xlsx +0 -0
- package/failure_cases.json +0 -2
- package/inputjson/layoutverification.json +0 -465
- /package/{Bitz_Final_Store_List_28.08.25.xlsx → data/Bitz_Final_Store_List_28.08.25.xlsx} +0 -0
- /package/{Coastline 3.0 Tango.xlsx → data/Coastline 3.0 Tango.xlsx} +0 -0
- /package/{Fixture capacity.xlsx → data/Fixture capacity.xlsx} +0 -0
- /package/{JJ_OD New Launch_Tango.xlsx → data/JJ_OD New Launch_Tango.xlsx} +0 -0
- /package/{LKST 98 - Inventory Analysis.xlsx → data/LKST 98 - Inventory Analysis.xlsx} +0 -0
- /package/{OE_Vs_NON_OE_UPDATED.xlsx → data/OE_Vs_NON_OE_UPDATED.xlsx} +0 -0
- /package/{Sale, Non sale stores.xlsx → data/Sale, Non sale stores.xlsx} +0 -0
- /package/{Updated IVM New Fixture Flow-v8.xlsx → data/Updated IVM New Fixture Flow-v8.xlsx} +0 -0
- /package/{VM_logic.xlsx → data/VM_logic.xlsx} +0 -0
- /package/{euro_center_stores_tentpole.xls → data/euro_center_stores_tentpole.xls} +0 -0
- /package/{ivmLogic.json → data/ivmLogic.json} +0 -0
- /package/{logs.json → data/logs.json} +0 -0
- /package/{missing_stores.json → data/missing_stores.json} +0 -0
- /package/{response.json → data/response.json} +0 -0
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-224",
|
|
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.4.
|
|
35
|
+
"tango-api-schema": "^2.4.18",
|
|
36
36
|
"tango-app-api-middleware": "3.1.48",
|
|
37
37
|
"url": "^0.11.4",
|
|
38
38
|
"winston": "^3.17.0",
|
|
@@ -2327,7 +2327,7 @@ async function scrapeCrest() {
|
|
|
2327
2327
|
const storeIds = [ 'LKST4080' ];
|
|
2328
2328
|
const apiUrl = 'https://api.getcrest.ai/api/ms_shelfsensei/layout/';
|
|
2329
2329
|
const bearerToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzYwMDA1MTY3LCJpYXQiOjE3NjAwMDE1NjcsImp0aSI6IjJiZmVjNzI2NDE3OTRjMDRhMjQ1OWVhMmMxOTExNzUyIiwidXNlcl9pZCI6MTA4NSwiaWQiOjEwODUsImlzX21lZXNlZWtfYWNjb3VudCI6ZmFsc2UsImN1c3RvbWVyX2dyb3VwIjozOTgsImlzX2NyZXN0X2xpdGVfdXNlciI6ZmFsc2UsImlzX3ZlbmRvcl91c2VyIjpmYWxzZSwibGljZW5jZV9zY29wZXMiOlt7InJlc291cmNlX3NldCI6InBwX3NldCIsInNjb3BlX3JvbGUiOiJjb250cmlidXRvciJ9LHsicmVzb3VyY2Vfc2V0IjoiZHBfc2V0Iiwic2NvcGVfcm9sZSI6ImNvbnRyaWJ1dG9yIn0seyJyZXNvdXJjZV9zZXQiOiJkZl9zZXQiLCJzY29wZV9yb2xlIjoiY29udHJpYnV0b3IifSx7InJlc291cmNlX3NldCI6ImRlZmF1bHRfc2V0Iiwic2NvcGVfcm9sZSI6ImNvbnRyaWJ1dG9yIn1dfQ.Yn2dkM3BYaHeoA9vpYCFKB0XK4pUpVD6NGT2rEOXJSs';
|
|
2330
|
-
const filePath = 'response.json';
|
|
2330
|
+
const filePath = './data/response.json';
|
|
2331
2331
|
let allResults = [];
|
|
2332
2332
|
|
|
2333
2333
|
if ( fs.existsSync( filePath ) ) {
|
|
@@ -9269,7 +9269,7 @@ export async function migrateCrestv1( req, res ) {
|
|
|
9269
9269
|
|
|
9270
9270
|
|
|
9271
9271
|
// try {
|
|
9272
|
-
// const raw = await readFile('response.json', 'utf-8');
|
|
9272
|
+
// const raw = await readFile('./data/response.json', 'utf-8');
|
|
9273
9273
|
// const json = JSON.parse(raw);
|
|
9274
9274
|
|
|
9275
9275
|
// const resultArray = json;
|
|
@@ -9803,11 +9803,11 @@ export async function migrateOvmToIvm( req, res ) {
|
|
|
9803
9803
|
return res.sendError( 'Unauthorized', 401 );
|
|
9804
9804
|
}
|
|
9805
9805
|
|
|
9806
|
-
const ivmLogicJson = fs.readFileSync( 'ivmLogic.json', 'utf8' );
|
|
9806
|
+
const ivmLogicJson = fs.readFileSync( './data/ivmLogic.json', 'utf8' );
|
|
9807
9807
|
const ivmLogic = JSON.parse( ivmLogicJson );
|
|
9808
9808
|
|
|
9809
9809
|
|
|
9810
|
-
const saleWorkbook = xlsx.readFile( './OE_Vs_NON_OE_UPDATED.xlsx' );
|
|
9810
|
+
const saleWorkbook = xlsx.readFile( './data/OE_Vs_NON_OE_UPDATED.xlsx' );
|
|
9811
9811
|
|
|
9812
9812
|
const saleSheetName = saleWorkbook.SheetNames[0];
|
|
9813
9813
|
const saleSheet = saleWorkbook.Sheets[saleSheetName];
|
|
@@ -9817,7 +9817,7 @@ export async function migrateOvmToIvm( req, res ) {
|
|
|
9817
9817
|
const saleData = JSON.parse( JSON.stringify( saleJsonData, null, 2 ) );
|
|
9818
9818
|
|
|
9819
9819
|
|
|
9820
|
-
const euroMappingWorkbook = xlsx.readFile( './VM_logic.xlsx' );
|
|
9820
|
+
const euroMappingWorkbook = xlsx.readFile( './data/VM_logic.xlsx' );
|
|
9821
9821
|
const euroMappingSheet = euroMappingWorkbook.Sheets['Eurocentre mapping'];
|
|
9822
9822
|
|
|
9823
9823
|
|
|
@@ -9831,7 +9831,7 @@ export async function migrateOvmToIvm( req, res ) {
|
|
|
9831
9831
|
|
|
9832
9832
|
const euroMappingData = JSON.parse( JSON.stringify( euroMappingFiltered, null, 2 ) );
|
|
9833
9833
|
|
|
9834
|
-
const mbqWorkbook = xlsx.readFile( './Fixture capacity.xlsx' );
|
|
9834
|
+
const mbqWorkbook = xlsx.readFile( './data/Fixture capacity.xlsx' );
|
|
9835
9835
|
|
|
9836
9836
|
const mbqSheetName = mbqWorkbook.SheetNames[0];
|
|
9837
9837
|
const mbqSheet = mbqWorkbook.Sheets[mbqSheetName];
|
|
@@ -9840,7 +9840,7 @@ export async function migrateOvmToIvm( req, res ) {
|
|
|
9840
9840
|
|
|
9841
9841
|
const mbqData = JSON.parse( JSON.stringify( mbqJsonData, null, 2 ) );
|
|
9842
9842
|
|
|
9843
|
-
const strategyWorkbook = xlsx.readFile( './Updated IVM New Fixture Flow-v8.xlsx' );
|
|
9843
|
+
const strategyWorkbook = xlsx.readFile( './data/Updated IVM New Fixture Flow-v8.xlsx' );
|
|
9844
9844
|
|
|
9845
9845
|
const combinationFixturesSheetName = 'Combined fixture logic';
|
|
9846
9846
|
const combinationFixtureSheet = strategyWorkbook.Sheets[combinationFixturesSheetName];
|
|
@@ -9856,7 +9856,7 @@ export async function migrateOvmToIvm( req, res ) {
|
|
|
9856
9856
|
|
|
9857
9857
|
const tentpoleEurocentreFixtureData = JSON.parse( JSON.stringify( tentpoleEurocentreJsonData, null, 2 ) );
|
|
9858
9858
|
|
|
9859
|
-
const tentpoleCollectionsWorkbook = xlsx.readFile( './euro_center_stores_tentpole.xls' );
|
|
9859
|
+
const tentpoleCollectionsWorkbook = xlsx.readFile( './data/euro_center_stores_tentpole.xls' );
|
|
9860
9860
|
|
|
9861
9861
|
const tentpoleCollectionsSheetName = tentpoleCollectionsWorkbook.SheetNames[0];
|
|
9862
9862
|
const tentpoleCollectionsSheet = tentpoleCollectionsWorkbook.Sheets[tentpoleCollectionsSheetName];
|
|
@@ -10350,7 +10350,7 @@ export async function migrateOvmToIvm( req, res ) {
|
|
|
10350
10350
|
header: fixture.header.label,
|
|
10351
10351
|
};
|
|
10352
10352
|
|
|
10353
|
-
writeLog( data, './failure_cases.json' );
|
|
10353
|
+
writeLog( data, './data/failure_cases.json' );
|
|
10354
10354
|
// console.log( unknown );
|
|
10355
10355
|
return 'skip-store';
|
|
10356
10356
|
}
|
|
@@ -11225,7 +11225,7 @@ export async function migrateOvmToIvm( req, res ) {
|
|
|
11225
11225
|
bottomCat: bottomCat,
|
|
11226
11226
|
store: floor.storeName,
|
|
11227
11227
|
};
|
|
11228
|
-
writeLog( logData, '
|
|
11228
|
+
writeLog( logData, '.data/logs.json' );
|
|
11229
11229
|
}
|
|
11230
11230
|
|
|
11231
11231
|
console.log( topCat, bottomCat, 'final top and bottom' );
|
|
@@ -11258,7 +11258,7 @@ export async function migrateOvmToIvm( req, res ) {
|
|
|
11258
11258
|
// sale: isSale,
|
|
11259
11259
|
// };
|
|
11260
11260
|
|
|
11261
|
-
// writeLog( logData, './logs.json' );
|
|
11261
|
+
// writeLog( logData, './data/logs.json' );
|
|
11262
11262
|
|
|
11263
11263
|
|
|
11264
11264
|
if ( group === "VC Eye / LK Air" && isSale ) {
|
|
@@ -11414,7 +11414,7 @@ export async function migrateOvmToIvm( req, res ) {
|
|
|
11414
11414
|
// count: groupFixtures.length,
|
|
11415
11415
|
// };
|
|
11416
11416
|
|
|
11417
|
-
// writeLog( logData, './logs.json' );
|
|
11417
|
+
// writeLog( logData, './data/logs.json' );
|
|
11418
11418
|
|
|
11419
11419
|
|
|
11420
11420
|
if ( floorFixtures.some( ( fixture ) => fixture._id === fixtureTarget._id ) ) {
|
|
@@ -11984,7 +11984,7 @@ export async function migrateOvmToIvm( req, res ) {
|
|
|
11984
11984
|
|
|
11985
11985
|
|
|
11986
11986
|
export async function updateFixtureDetails() {
|
|
11987
|
-
const mbqWorkbook = xlsx.readFile( './Fixture capacity.xlsx' );
|
|
11987
|
+
const mbqWorkbook = xlsx.readFile( './data/Fixture capacity.xlsx' );
|
|
11988
11988
|
|
|
11989
11989
|
const mbqSheetName = mbqWorkbook.SheetNames[0];
|
|
11990
11990
|
const mbqSheet = mbqWorkbook.Sheets[mbqSheetName];
|
|
@@ -12555,7 +12555,7 @@ export async function groupFixture( req, res ) {
|
|
|
12555
12555
|
}
|
|
12556
12556
|
}
|
|
12557
12557
|
async function updateBlitzCollection() {
|
|
12558
|
-
const blitzWorkbook = xlsx.readFile( './Bitz_Final_Store_List_28.08.25.xlsx' );
|
|
12558
|
+
const blitzWorkbook = xlsx.readFile( './data/Bitz_Final_Store_List_28.08.25.xlsx' );
|
|
12559
12559
|
|
|
12560
12560
|
const blitzSheetName = blitzWorkbook.SheetNames[0];
|
|
12561
12561
|
const blitzSheet = blitzWorkbook.Sheets[blitzSheetName];
|
|
@@ -13002,7 +13002,7 @@ async function updateBlitzCollection() {
|
|
|
13002
13002
|
xlsx.utils.book_append_sheet( workbook, worksheet, "Euro" );
|
|
13003
13003
|
|
|
13004
13004
|
const buffer = xlsx.write( workbook, { type: "buffer", bookType: "xlsx" } );
|
|
13005
|
-
fs.writeFileSync( "Euro.xlsx", buffer );
|
|
13005
|
+
fs.writeFileSync( "./data/Euro.xlsx", buffer );
|
|
13006
13006
|
|
|
13007
13007
|
console.log( `Excel file written with ${exportData.length} rows.` );
|
|
13008
13008
|
} else {
|
|
@@ -13014,7 +13014,7 @@ async function updateBlitzCollection() {
|
|
|
13014
13014
|
|
|
13015
13015
|
|
|
13016
13016
|
async function updateFixtureGroupNumber( ) {
|
|
13017
|
-
const ivmLogicJson = fs.readFileSync( 'ivmLogic.json', 'utf8' );
|
|
13017
|
+
const ivmLogicJson = fs.readFileSync( './data/ivmLogic.json', 'utf8' );
|
|
13018
13018
|
const ivmLogic = JSON.parse( ivmLogicJson );
|
|
13019
13019
|
const strategyWorkbook = xlsx.readFile( './Updated IVM New Fixture Flow-v4.xlsx' );
|
|
13020
13020
|
|
|
@@ -13341,7 +13341,7 @@ async function deriveMasterTemplatesFromStoreFixtures() {
|
|
|
13341
13341
|
|
|
13342
13342
|
|
|
13343
13343
|
async function updateProductCategories() {
|
|
13344
|
-
const ivmLogicJson = fs.readFileSync( 'ivmLogic.json', 'utf8' );
|
|
13344
|
+
const ivmLogicJson = fs.readFileSync( './data/ivmLogic.json', 'utf8' );
|
|
13345
13345
|
const ivmLogic = JSON.parse( ivmLogicJson );
|
|
13346
13346
|
|
|
13347
13347
|
ivmLogic.pidOneEu.forEach( ( logic ) => {
|
|
@@ -13532,7 +13532,7 @@ async function getTrendingFixtureSizes() {
|
|
|
13532
13532
|
}
|
|
13533
13533
|
|
|
13534
13534
|
async function updateJJCollection() {
|
|
13535
|
-
const workbook = xlsx.readFile( './JJ_OD New Launch_Tango.xlsx' );
|
|
13535
|
+
const workbook = xlsx.readFile( './data/JJ_OD New Launch_Tango.xlsx' );
|
|
13536
13536
|
|
|
13537
13537
|
const zodiacSheet = workbook.Sheets['Zodiac'];
|
|
13538
13538
|
|
|
@@ -13731,7 +13731,7 @@ async function updateJJCollection() {
|
|
|
13731
13731
|
// updateJJCollection();
|
|
13732
13732
|
|
|
13733
13733
|
async function updateCoastlineCollection() {
|
|
13734
|
-
const workbook = xlsx.readFile( './Coastline 3.0 Tango.xlsx' );
|
|
13734
|
+
const workbook = xlsx.readFile( './data/Coastline 3.0 Tango.xlsx' );
|
|
13735
13735
|
|
|
13736
13736
|
const sheetName = 'Sheet1';
|
|
13737
13737
|
const sheet = workbook.Sheets[sheetName];
|
|
@@ -14041,7 +14041,7 @@ async function updateCoastlineCollection() {
|
|
|
14041
14041
|
// updateCoastlineCollection();
|
|
14042
14042
|
|
|
14043
14043
|
async function updatePhonicCollection() {
|
|
14044
|
-
const workbook = xlsx.readFile( './Coastline 3.0 Tango.xlsx' );
|
|
14044
|
+
const workbook = xlsx.readFile( './data/Coastline 3.0 Tango.xlsx' );
|
|
14045
14045
|
|
|
14046
14046
|
const sheetName = 'Sheet1';
|
|
14047
14047
|
const sheet = workbook.Sheets[sheetName];
|
|
@@ -14381,7 +14381,7 @@ function findMissingStores() {
|
|
|
14381
14381
|
}
|
|
14382
14382
|
} );
|
|
14383
14383
|
|
|
14384
|
-
writeLog( newStores, './missing_stores.json' );
|
|
14384
|
+
writeLog( newStores, './data/missing_stores.json' );
|
|
14385
14385
|
}
|
|
14386
14386
|
|
|
14387
14387
|
// findMissingStores()
|