Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-04-03 15:47:22 +03:00
parent 2b04688905
commit bf97e20e79
2 changed files with 38 additions and 3 deletions

View File

@@ -965,7 +965,9 @@ async function openAttributeDialog (itemCode) {
const baseRows = fromLookup.map(row => {
const currentCode = dbMap.get(Number(row.AttributeTypeCodeNumber || 0)) || ''
const currentOptions = Array.isArray(row.options) ? [...row.options] : []
const currentOptions = Array.isArray(row.AllOptions)
? [...row.AllOptions]
: (Array.isArray(row.Options) ? [...row.Options] : [])
if (currentCode && !currentOptions.some(opt => String(opt?.value || '').trim() === currentCode)) {
currentOptions.unshift({ value: currentCode, label: `${currentCode} - (Mevcut)` })
}
@@ -1040,7 +1042,9 @@ async function collectProductAttributesFromSelectedRows (selectedRows) {
const baseRows = buildAttributeRowsFromLookup(lookup)
rows = baseRows.map(row => {
const currentCode = dbMap.get(Number(row.AttributeTypeCodeNumber || 0)) || ''
const currentOptions = Array.isArray(row.options) ? [...row.options] : []
const currentOptions = Array.isArray(row.AllOptions)
? [...row.AllOptions]
: (Array.isArray(row.Options) ? [...row.Options] : [])
if (currentCode && !currentOptions.some(opt => String(opt?.value || '').trim() === currentCode)) {
currentOptions.unshift({ value: currentCode, label: `${currentCode} - (Mevcut)` })
}