diff --git a/ui/src/pages/ProductStockByAttributes.vue b/ui/src/pages/ProductStockByAttributes.vue index 78b7303..7351927 100644 --- a/ui/src/pages/ProductStockByAttributes.vue +++ b/ui/src/pages/ProductStockByAttributes.vue @@ -469,23 +469,15 @@ function buildImageKey(code, color, secondColor = '') { return `${String(code || '').trim().toUpperCase()}::${String(color || '').trim().toUpperCase()}::${String(secondColor || '').trim().toUpperCase()}` } -function normalizeSecondColorValue(value) { +function normalizeImageDim3(value) { const s = String(value || '').trim().toUpperCase() if (!s) return '' if (/^\d{3}(?:_\d+)?$/.test(s)) return s return '' } -function extractSecondColor(item) { - return ( - normalizeSecondColorValue(item?.Renk2) || - normalizeSecondColorValue(item?.ItemDim3Code) || - '' - ) -} - function buildDim3Candidates(secondColor) { - const secondTrim = String(secondColor || '').trim().toUpperCase() + const secondTrim = normalizeImageDim3(secondColor) if (!secondTrim) return [''] const set = new Set([secondTrim]) if (/^\d{3}$/.test(secondTrim)) set.add(`${secondTrim}_1`) @@ -709,7 +701,7 @@ function buildLevel3Rows(grp3) { for (const item of grp3.items || []) { const model = String(item.Urun_Kodu || '').trim() const renk = String(item.Renk_Kodu || '').trim() - const renk2 = extractSecondColor(item) + const renk2 = String(item.Yaka || '').trim() const urunAnaGrubu = String(item.URUN_ANA_GRUBU || '').trim() const urunAltGrubu = String(item.URUN_ALT_GRUBU || '').trim() const aciklama = String(item.Madde_Aciklamasi || '').trim() @@ -757,7 +749,7 @@ const level1Groups = computed(() => { const productDesc = String(item.Madde_Aciklamasi || '').trim() const colorCode = String(item.Renk_Kodu || '').trim() const colorDesc = String(item.Renk_Aciklamasi || '').trim() - const secondColor = extractSecondColor(item) + const secondColor = String(item.Yaka || '').trim() const depoKodu = String(item.Depo_Kodu || '').trim() const depoAdi = String(item.Depo_Adi || '').trim() const urunAnaGrubu = String(item.URUN_ANA_GRUBU || '').trim() diff --git a/ui/src/pages/ProductStockQuery.vue b/ui/src/pages/ProductStockQuery.vue index fdecdd2..bf43f3c 100644 --- a/ui/src/pages/ProductStockQuery.vue +++ b/ui/src/pages/ProductStockQuery.vue @@ -462,23 +462,15 @@ function buildImageKey(code, color, secondColor = '') { return `${String(code || '').trim().toUpperCase()}::${String(color || '').trim().toUpperCase()}::${String(secondColor || '').trim().toUpperCase()}` } -function normalizeSecondColorValue(value) { +function normalizeImageDim3(value) { const s = String(value || '').trim().toUpperCase() if (!s) return '' if (/^\d{3}(?:_\d+)?$/.test(s)) return s return '' } -function extractSecondColor(item) { - return ( - normalizeSecondColorValue(item?.Renk2) || - normalizeSecondColorValue(item?.ItemDim3Code) || - '' - ) -} - function buildDim3Candidates(secondColor) { - const secondTrim = String(secondColor || '').trim().toUpperCase() + const secondTrim = normalizeImageDim3(secondColor) if (!secondTrim) return [''] const set = new Set([secondTrim]) if (/^\d{3}$/.test(secondTrim)) set.add(`${secondTrim}_1`) @@ -690,7 +682,7 @@ function buildLevel3Rows(grp3) { for (const item of grp3.items || []) { const model = String(item.Urun_Kodu || '').trim() const renk = String(item.Renk_Kodu || '').trim() - const renk2 = extractSecondColor(item) + const renk2 = String(item.Yaka || '').trim() const urunAnaGrubu = String(item.URUN_ANA_GRUBU || '').trim() const urunAltGrubu = String(item.URUN_ALT_GRUBU || '').trim() const aciklama = String(item.Madde_Aciklamasi || '').trim() @@ -738,7 +730,7 @@ const level1Groups = computed(() => { const productDesc = String(item.Madde_Aciklamasi || '').trim() const colorCode = String(item.Renk_Kodu || '').trim() const colorDesc = String(item.Renk_Aciklamasi || '').trim() - const secondColor = extractSecondColor(item) + const secondColor = String(item.Yaka || '').trim() const depoKodu = String(item.Depo_Kodu || '').trim() const depoAdi = String(item.Depo_Adi || '').trim() const kategori = String(item.YETISKIN_GARSON || '').trim()