feat(form): x-references поля → SingleSelect с опциями из target словаря
Поля spacecraft.status, satellite_type_code и другие FK с x-references теперь показывают dropdown с записями из целевого справочника вместо свободного ввода. Label формируется как '<code> — <name.ru-RU>' если target имеет localized name. Fallback на TextInput когда target dict недоступен (scope-hide → 404) или пуст — admin может ввести значение вручную, валидация серверная. Кеш 5 минут (referenced data slow-moving) через TanStack Query. UI tests +2 (75 total).
This commit is contained in:
@@ -57,6 +57,9 @@ export type JsonSchema = {
|
||||
items?: JsonSchema
|
||||
additionalProperties?: boolean | JsonSchema
|
||||
['x-localized']?: boolean
|
||||
['x-references']?: string
|
||||
['x-id-source']?: string
|
||||
['x-unique']?: boolean
|
||||
default?: unknown
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user