fix(ui) : remove legacy edit pages and history composables, unify create/edit forms

Consolidate create and edit pages into single create pages with edit mode support.
Remove obsolete catalog pages, history composables, and fix remaining code review issues.
Include migration to relink orphaned custom fields.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-06 11:19:50 +02:00
parent cfaf234419
commit 201485552a
29 changed files with 875 additions and 2748 deletions

View File

@@ -5,6 +5,13 @@
* copy of extractCollection (parsing hydra:member / member / data / array).
*/
export function extractTotal(payload: unknown, fallbackLength: number): number {
const p = payload as Record<string, unknown> | null
if (typeof p?.totalItems === 'number') return p.totalItems
if (typeof p?.['hydra:totalItems'] === 'number') return p['hydra:totalItems']
return fallbackLength
}
export function extractCollection<T = any>(payload: unknown): T[] {
if (Array.isArray(payload)) return payload as T[]
const p = payload as Record<string, unknown> | null