export function fieldNameToLabel(fieldName: string): string { const withoutId = fieldName.replace(/Id$/, ''); const spaced = withoutId.replace(/([a-z])([A-Z])/g, '$1 $2'); return spaced.charAt(0).toUpperCase() + spaced.slice(1); } export function resolveFieldValue(record: Record, path: string): unknown { const parts = path.split('.'); let current: unknown = record; for (const part of parts) { if (current == null || typeof current !== 'object') return undefined; current = (current as Record)[part]; } return current; }