feat(workspace): topbar muestra areaName en lugar de clientName inline-editable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -249,38 +249,9 @@ export function WorkspacePage() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Cliente — editable inline solo para roles internos */}
|
{/* Área — display de solo lectura (editable desde el panel de configuración) */}
|
||||||
{user?.platformRole === 'client_editor' ? (
|
{currentProcess.areaName && (
|
||||||
currentProcess.clientName && (
|
<p className="text-xs text-slate-400 truncate">{currentProcess.areaName}</p>
|
||||||
<p className="text-xs text-slate-400 truncate">{currentProcess.clientName}</p>
|
|
||||||
)
|
|
||||||
) : editingField === 'client' ? (
|
|
||||||
<input
|
|
||||||
autoFocus
|
|
||||||
className="text-xs text-slate-400 bg-transparent border-b border-[#F59845] outline-none w-full"
|
|
||||||
value={editValue}
|
|
||||||
onChange={(e) => setEditValue(e.target.value)}
|
|
||||||
onBlur={() => saveField('client')}
|
|
||||||
onKeyDown={(e) => {
|
|
||||||
if (e.key === 'Enter') { e.preventDefault(); saveField('client') }
|
|
||||||
if (e.key === 'Escape') setEditingField(null)
|
|
||||||
}}
|
|
||||||
placeholder="Agregar cliente…"
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<div
|
|
||||||
className="flex items-center gap-1 group cursor-text"
|
|
||||||
onClick={() => { setEditValue(currentProcess.clientName ?? ''); setEditingField('client') }}
|
|
||||||
>
|
|
||||||
{currentProcess.clientName
|
|
||||||
? <p className="text-xs text-slate-400 truncate">{currentProcess.clientName}</p>
|
|
||||||
: <p className="text-xs text-slate-300 truncate italic">Agregar cliente…</p>
|
|
||||||
}
|
|
||||||
{savedField === 'client'
|
|
||||||
? <Check className="h-3 w-3 text-[#F59845] shrink-0" />
|
|
||||||
: <Pencil className="h-2.5 w-2.5 text-slate-300 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity" />
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Tags — chips removibles + input inline */}
|
{/* Tags — chips removibles + input inline */}
|
||||||
|
|||||||
Reference in New Issue
Block a user