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