fix bugs
This commit is contained in:
@@ -310,9 +310,19 @@ export function resolveSettingMenu(
|
|||||||
row: { key?: string; menu?: string | null },
|
row: { key?: string; menu?: string | null },
|
||||||
groups: SettingGroupDef[]
|
groups: SettingGroupDef[]
|
||||||
): string {
|
): string {
|
||||||
|
const key = row.key || ''
|
||||||
|
const fromKey = getSettingGroupId(key, groups)
|
||||||
const menu = String(row.menu ?? '').trim()
|
const menu = String(row.menu ?? '').trim()
|
||||||
if (menu && groups.some((g) => g.id === menu)) return menu
|
if (menu && groups.some((g) => g.id === menu)) {
|
||||||
return getSettingGroupId(row.key || '', groups)
|
// menu= misc اشتباه در DB نباید shayegan_/zarin_/… را از گروه اختصاصی پنهان کند
|
||||||
|
if (menu === 'misc' && fromKey !== 'misc') {
|
||||||
|
return fromKey
|
||||||
|
}
|
||||||
|
|
||||||
|
return menu
|
||||||
|
}
|
||||||
|
|
||||||
|
return fromKey
|
||||||
}
|
}
|
||||||
|
|
||||||
/** این کلیدها صفحهٔ جدا دارند و در لیست تنظیمات عادی/پیشرفته نمیآیند */
|
/** این کلیدها صفحهٔ جدا دارند و در لیست تنظیمات عادی/پیشرفته نمیآیند */
|
||||||
|
|||||||
Reference in New Issue
Block a user