diff --git a/frontend/src/components/layout/Header.jsx b/frontend/src/components/layout/Header.jsx index 7573ce6..72b7ee3 100644 --- a/frontend/src/components/layout/Header.jsx +++ b/frontend/src/components/layout/Header.jsx @@ -9,6 +9,7 @@ import { Link, useLocation, useNavigate } from 'react-router-dom' import { useAuth } from '@/hooks/useAuth' import api from '@/lib/api' import HeaderSearch from '@/components/ui/HeaderSearch' +import { getLocalizedValue } from '@/lib/melodyUtils' // ─── Breadcrumb config ──────────────────────────────────────────────────────── @@ -52,10 +53,10 @@ const ENTITY_RESOLVERS = { customers: { path: (id) => `/crm/customers/${id}`, label: (d) => [d.name, d.surname].filter(Boolean).join(' ') || d.organization || null }, products: { path: (id) => `/crm/products/${id}`, label: (d) => d.name || null }, quotations: { path: (id) => `/crm/quotations/${id}`, label: (d) => d.quotation_number || null }, - devices: { path: (id) => `/devices/${id}`, label: (d) => d.name || d.device_id || null }, + devices: { path: (id) => `/devices/${id}`, label: (d) => d.console_name || d.device_name || d.device_id || null }, orders: { path: (id) => `/crm/orders/${id}`, label: (d) => d.order_number || null }, - melodies: { path: (id) => `/melodies/${id}`, label: (d) => d.name || null }, - archetypes: { path: (id) => `/builder/melodies/${id}`, label: (d) => d.name || null }, + melodies: { path: (id) => `/melodies/${id}`, label: (d) => getLocalizedValue(d.information?.name, 'en', '') || null }, + archetypes: { path: (id) => `/builder/melodies/${id}`, label: (d) => getLocalizedValue(d.information?.name, 'en', '') || null }, users: { path: (id) => `/users/${id}`, label: (d) => d.name || d.display_name || null }, notes: { path: (id) => `/equipment/notes/${id}`, label: (d) => d.title || d.subject || null }, staff: { path: (id) => `/staff/${id}`, label: (d) => d.name || null },