m
This commit is contained in:
@@ -206,7 +206,8 @@ import { applyBannerEnabledFromRows, applyTrackingSystemsEnabledFromRows, applyC
|
||||
import {
|
||||
EDITABLE_SETTING_GROUPS,
|
||||
SYSTEM_SETTING_GROUPS,
|
||||
getSettingGroupId,
|
||||
resolveSettingMenu,
|
||||
OTHER_PAGE_SETTING_MENUS,
|
||||
type SettingGroupDef
|
||||
} from './settingGroups'
|
||||
import {
|
||||
@@ -311,7 +312,11 @@ const filteredRows = computed(() =>
|
||||
(baseData.value || []).filter((row) => {
|
||||
if (row.id == null || !matchesFilter(row)) return false
|
||||
if (!isSettingVisible(row.key)) return false
|
||||
if (!isSystemMode.value && TRADING_HOURS_SETTING_KEY_SET.has(row.key || '')) return false
|
||||
const menu = String(row.menu ?? '').trim()
|
||||
if (OTHER_PAGE_SETTING_MENUS.has(menu)) return false
|
||||
if (!menu && !isSystemMode.value && TRADING_HOURS_SETTING_KEY_SET.has(row.key || '')) {
|
||||
return false
|
||||
}
|
||||
if (isSystemMode.value) return true
|
||||
return isEditable(row)
|
||||
})
|
||||
@@ -330,15 +335,16 @@ const otherRows = computed(() =>
|
||||
// گروهبندی تنظیمات — اولین match برنده است؛ misc فقط برای باقیمانده
|
||||
// =============================================================================
|
||||
|
||||
function getGroupId(key: string): string {
|
||||
return getSettingGroupId(key, settingGroups.value)
|
||||
function getGroupId(row: Const): string {
|
||||
return resolveSettingMenu(row, settingGroups.value)
|
||||
}
|
||||
|
||||
const groupedFiltered = computed(() => {
|
||||
const map: Record<string, Const[]> = {}
|
||||
for (const g of settingGroups.value) map[g.id] = []
|
||||
for (const row of filteredRows.value) {
|
||||
const gid = getGroupId(row.key || '')
|
||||
const gid = getGroupId(row)
|
||||
if (!map[gid]) map[gid] = []
|
||||
map[gid].push(row)
|
||||
}
|
||||
Object.keys(map).forEach((k) => {
|
||||
|
||||
Reference in New Issue
Block a user