@@ -215,12 +215,14 @@ import {
|
||||
helpText,
|
||||
isSettingVisible,
|
||||
isCodeManagedSettingKey,
|
||||
isSuperAdminOwnedSettingKey,
|
||||
isSettingLocked,
|
||||
isSettingActive,
|
||||
isSwitchOn,
|
||||
normalizeSettingRow,
|
||||
resolveSettingFieldType
|
||||
} from './settingTypes'
|
||||
import { TRADING_HOURS_SETTING_KEY_SET } from './tradingHoursKeys'
|
||||
|
||||
const props = withDefaults(defineProps<{ mode?: 'editable' | 'system' }>(), {
|
||||
mode: 'editable'
|
||||
@@ -309,6 +311,7 @@ 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
|
||||
if (isSystemMode.value) return true
|
||||
return isEditable(row)
|
||||
})
|
||||
@@ -429,6 +432,7 @@ function rowColSpan(row: Const): number {
|
||||
|
||||
function isReadonly(row: Const): boolean {
|
||||
if (isCodeManagedSettingKey(row.key)) return true
|
||||
if (isSuperAdminOwnedSettingKey(row.key)) return true
|
||||
if (isSystemMode.value) return false
|
||||
return isSettingLocked(row.can_edit)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user