Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user