Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-03-29 22:41:02 +03:00
parent 96ede55936
commit 05c6103a3a
10 changed files with 629 additions and 92 deletions

View File

@@ -875,7 +875,8 @@ function toggleAllDetails() {
function buildLevel3Rows(grp3) {
const byKey = new Map()
const gk = activeGrpKey.value || 'tak'
const gk = activeGrpKey.value
if (!gk) return []
for (const item of grp3.items || []) {
const model = String(item.Urun_Kodu || '').trim()
@@ -1235,6 +1236,7 @@ async function fetchStockByAttributes() {
if (!orderStore.schemaMap || !Object.keys(orderStore.schemaMap).length) {
orderStore.initSchemaMap()
}
await orderStore.ensureProductSizeMatchRules()
const res = await api.get('/product-stock-query-by-attributes', { params })
const list = Array.isArray(res?.data) ? res.data : []
@@ -1249,14 +1251,27 @@ async function fetchStockByAttributes() {
const grpKey = detectBedenGroup(
list.map((x) => x?.Beden || ''),
first?.URUN_ANA_GRUBU || '',
first?.YETISKIN_GARSON || ''
first?.KATEGORI || first?.YETISKIN_GARSON || '',
first?.YETISKIN_GARSON || '',
first?.URUN_ALT_GRUBU || ''
)
const schemaMap = Object.keys(orderStore.schemaMap || {}).length
? orderStore.schemaMap
: storeSchemaByKey
activeGrpKey.value = grpKey || 'tak'
activeSchema.value = schemaMap?.[grpKey] || storeSchemaByKey.tak
if (!grpKey || !schemaMap?.[grpKey]) {
rawRows.value = []
openState.value = {}
errorMessage.value = 'Beden grubu eşleşmesi bulunamadı.'
$q.notify({
type: 'negative',
position: 'top-right',
message: 'Beden grubu eşleşmesi bulunamadı (kategori/ana grup/alt grup).'
})
return
}
activeGrpKey.value = grpKey
activeSchema.value = schemaMap[grpKey]
rawRows.value = list
productImageCache.value = {}
@@ -1491,7 +1506,8 @@ function resetForm() {
void loadFilterOptions(true)
}
onMounted(() => {
onMounted(async () => {
await orderStore.ensureProductSizeMatchRules()
void loadFilterOptions(true)
window.addEventListener('mousemove', onFullscreenMouseMove)
window.addEventListener('mouseup', onFullscreenMouseUp)