Index: components/ProductSplitValidator/ProductSplitValidator.container.ts =================================================================== diff -u -rb2b82ce8e1efd6964dc5d6172a4b962b45511a49 -rd234b7bd66de2770f7555153491e4db0484352e0 --- components/ProductSplitValidator/ProductSplitValidator.container.ts (.../ProductSplitValidator.container.ts) (revision b2b82ce8e1efd6964dc5d6172a4b962b45511a49) +++ components/ProductSplitValidator/ProductSplitValidator.container.ts (.../ProductSplitValidator.container.ts) (revision d234b7bd66de2770f7555153491e4db0484352e0) @@ -77,40 +77,43 @@ // Process the API response with our new reformatValidationData function let data: ISplitValidationRow[]; - if (apiResponse && Array.isArray(apiResponse) && apiResponse.length > 0) { - console.log('API Response:', apiResponse); - data = reformatValidationData(apiResponse); - } else { - console.log('Using test data as API returned empty or invalid response'); - // Use the exact test data format provided by the user - const testData = [ - { - attribute: Array(12).fill({}).map((_, i) => ({ - attributeNameId: 100 + i, - value: `Value ${i}`, - attributeName: `Attribute ${i}` - })), - fitment: [], - partNumber: ['303024091', '303024092', '303024093', '303024094', '303024095'], - reason: "MISSING_FITMENTS" - }, - { - attribute: Array(12).fill({}).map((_, i) => ({ - attributeNameId: 200 + i, - value: `Common Value ${i}`, - attributeName: `Common Attribute ${i}` - })), - fitment: [], - partNumber: ['303024091', '303024092', '303024093', '303024094', '303024095'], - reason: "COMMON_ATTRIBUTES" - } - ]; + // if (apiResponse && Array.isArray(apiResponse) && apiResponse.length > 0) { + // console.log('API Response:', apiResponse); + // data = reformatValidationData(apiResponse); + // } else { + // console.log('Using test data as API returned empty or invalid response'); + // // Use the exact test data format provided by the user + // const testData = [ + // { + // attribute: Array(12).fill({}).map((_, i) => ({ + // attributeNameId: 100 + i, + // value: `Value ${i}`, + // attributeName: `Attribute ${i}` + // })), + // fitment: [], + // partNumber: ['303024091', '303024092', '303024093', '303024094', '303024095'], + // reason: "MISSING_FITMENTS" + // }, + // { + // attribute: Array(12).fill({}).map((_, i) => ({ + // attributeNameId: 200 + i, + // value: `Common Value ${i}`, + // attributeName: `Common Attribute ${i}` + // })), + // fitment: [], + // partNumber: ['303024091', '303024092', '303024093', '303024094', '303024095'], + // reason: "COMMON_ATTRIBUTES" + // } + // ]; - console.log('Test data before reformatting:', testData); - data = reformatValidationData(testData); - console.log('Reformatted test data:', data); - } + // console.log('Test data before reformatting:', testData); + // data = reformatValidationData(testData); + // console.log('Reformatted test data:', data); + // } + console.log('API Response:', apiResponse); + data = reformatValidationData(apiResponse); + const localeData = getLocaleRelevantValidation(data); console.log('Locale data:', localeData, data, partNumbers);