@@ -58,7 +58,7 @@ import {
5858import { updateMenuItem } from '@/modules/kitchen/services/menuItemService'
5959import { useVisibleLocations } from '@/modules/multitenancy/hooks/useVisibleLocations'
6060import { listSalesChannels } from '@/modules/kitchen/services/channelRateService'
61- import { fmtNum } from '@/lib/format'
61+ import { fmtNumEs } from '@/lib/format'
6262
6363interface EditPricesModalProps {
6464 menuItemId : string
@@ -150,7 +150,7 @@ export default function EditPricesModal({
150150 // saber a qué cae la cascada si se borra el override del local (regla de
151151 // Julio: el botón "Volver a..." tiene que nombrar el destino real).
152152 const [ brandChannels , setBrandChannels ] = useState < ChannelEconomics [ ] > ( [ ] )
153- const [ defaultPrice , setDefaultPrice ] = useState < string > ( String ( basePrice ?? 0 ) )
153+ const [ defaultPrice , setDefaultPrice ] = useState < string > ( fmtNumEs ( basePrice ?? 0 ) )
154154 const [ prices , setPrices ] = useState < Record < string , string > > ( { } )
155155 const [ avail , setAvail ] = useState < Record < string , boolean > > ( { } )
156156 const [ live , setLive ] = useState < ChannelEconomics [ ] > ( [ ] )
@@ -196,7 +196,7 @@ export default function EditPricesModal({
196196 const a : Record < string , boolean > = { }
197197 for ( const r of rows ) {
198198 const seedFromThisScope = selectedLocationId ? r . isLocationOverride : r . priceSource === 'override'
199- p [ r . channelId ] = seedFromThisScope ? String ( r . price ) : ''
199+ p [ r . channelId ] = seedFromThisScope ? fmtNumEs ( r . price ) : ''
200200 a [ r . channelId ] = r . isAvailable
201201 }
202202 setPrices ( p )
@@ -217,7 +217,7 @@ export default function EditPricesModal({
217217 const m : Record < string , string > = { }
218218 for ( const r of channels ) {
219219 const own = selectedLocationId ? r . isLocationOverride : r . priceSource === 'override'
220- m [ r . channelId ] = own ? String ( r . price ) : ''
220+ m [ r . channelId ] = own ? fmtNumEs ( r . price ) : ''
221221 }
222222 return m
223223 } , [ channels , selectedLocationId ] )
@@ -532,7 +532,7 @@ export default function EditPricesModal({
532532 < input
533533 value = { own }
534534 onChange = { ( e ) => setPrices ( ( p ) => ( { ...p , [ ch . channelId ] : e . target . value } ) ) }
535- placeholder = { inheritedAmount !== null ? fmtNum ( inheritedAmount ) : '' }
535+ placeholder = { inheritedAmount !== null ? fmtNumEs ( inheritedAmount ) : '' }
536536 inputMode = "decimal"
537537 aria-label = { `Precio de ${ ch . channelName } ` }
538538 className = { `w-[122px] px-2.5 py-1.5 text-right font-mono tabular-nums text-[13px] rounded-lg
@@ -596,8 +596,12 @@ export default function EditPricesModal({
596596 Modo dominante arriba (más pedidos en 30d), el resto
597597 en sub-líneas; un modo con 0 pedidos se atenúa y lo dice. */ }
598598 < div className = "text-right" >
599+ { /* Sin truncate: "Reparto de plataforma" en mayúsculas no cabe
600+ en 106px y salía "REPARTO DE PLATA…". Un rótulo cortado no
601+ identifica el modo, que es justo para lo que está. Envuelve
602+ en dos líneas; el ancho de la columna manda sobre el alto. */ }
599603 { modeLabel && (
600- < div className = "text-[9px] uppercase tracking-[.06em] text-tinta-45 truncate " > { modeLabel } </ div >
604+ < div className = "text-[9px] uppercase tracking-[.06em] text-tinta-45 leading-[1.15] " > { modeLabel } </ div >
601605 ) }
602606 < div className = { `font-mono tabular-nums text-[16px] font-semibold leading-tight ${ marginTone ( lv , margin ) } ` } >
603607 { fmtEur ( margin ) }
@@ -610,7 +614,10 @@ export default function EditPricesModal({
610614 { otherLive . map ( ( o ) => (
611615 < div key = { `${ o . channelId } -${ o . serviceType ?? 'none' } ` }
612616 className = { `flex items-baseline justify-between gap-2 text-[10.5px] ${ o . ordersLast30d === 0 ? 'opacity-[.42]' : '' } ` } >
613- < span className = "text-tinta-45 truncate" >
617+ { /* Igual que el rótulo dominante: envuelve en vez de
618+ cortar. Se conserva el space-between de la maqueta —
619+ la cifra sigue a la derecha, en la primera línea. */ }
620+ < span className = "text-tinta-45 leading-[1.15] min-w-0" >
614621 { o . serviceType ? ( SERVICE_TYPE_LABEL [ o . serviceType ] ?? o . serviceType ) : '—' }
615622 { o . ordersLast30d === 0 ? ' · 0 ped.' : '' }
616623 </ span >
0 commit comments