feat(crm): fecha de alta en cards y bitacora, click en kanban abre bitacora, tab Descartados con reasignacion para admin, tareas al calendario, estatus No asistio y edicion de unidades del inventario

This commit is contained in:
2026-09-25 18:28:14 +00:00
parent 7f663208a0
commit 2400ecf6ff
15 changed files with 527 additions and 12 deletions

View File

@@ -13,6 +13,8 @@ interface KanbanViewProps<T extends { id: string; nombre: string; estado?: strin
obtenerColumna: (item: T) => string
onCambiarEstado: (itemId: string, nuevoEstado: string, fuente?: string) => void
renderCard?: (item: T) => React.ReactNode
/** Click en la tarjeta: abre la bitácora/detalle del registro */
onVerItem?: (item: T) => void
}
export default function KanbanView<T extends { id: string; nombre: string; estado?: string; telefono?: string; email?: string; unidadCodigo?: string; fuente?: string; pendienteSync?: boolean }>({
@@ -21,6 +23,7 @@ export default function KanbanView<T extends { id: string; nombre: string; estad
obtenerColumna,
onCambiarEstado,
renderCard,
onVerItem,
}: KanbanViewProps<T>) {
const [arrastrando, setArrastrando] = useState<string | null>(null)
@@ -70,7 +73,11 @@ export default function KanbanView<T extends { id: string; nombre: string; estad
key={item.id}
draggable
onDragStart={(e) => void onDragStart(e, item.id)}
className={`rounded-lg border border-[#E5E7EB] bg-white p-2.5 shadow-sm transition-opacity dark:border-[#334155] dark:bg-[#1E293B] ${arrastrando === item.id ? 'opacity-50' : ''}`}
onClick={onVerItem ? () => onVerItem(item) : undefined}
role={onVerItem ? 'button' : undefined}
tabIndex={onVerItem ? 0 : undefined}
onKeyDown={onVerItem ? (e) => { if (e.key === 'Enter') onVerItem(item) } : undefined}
className={`rounded-lg border border-[#E5E7EB] bg-white p-2.5 shadow-sm transition-opacity dark:border-[#334155] dark:bg-[#1E293B] ${arrastrando === item.id ? 'opacity-50' : ''} ${onVerItem ? 'cursor-pointer hover:border-accent' : ''}`}
>
{renderCard ? renderCard(item) : (
<>