fix(conciliacion): muestra nombre del banco en select en lugar de ID

El SelectValue del proyecto solo muestra el value raw (el ID).
Reemplazado por un span dentro de SelectTrigger que busca
el banco seleccionado por su ID y muestra el nombre + terminacion.
This commit is contained in:
Horux Dev
2026-05-13 22:38:50 +00:00
parent 120ca806b0
commit b3b2838b6d

View File

@@ -297,18 +297,27 @@ export default function ConciliacionPage() {
{!isVisor && selected.size > 0 && (
<div className="sticky bottom-4 z-10 bg-card border rounded-lg shadow-lg p-4 flex items-center gap-4">
<span className="text-sm font-medium">{selected.size} seleccionados</span>
<Select value={bancoId} onValueChange={setBancoId}>
<SelectTrigger className="w-48">
<SelectValue placeholder="Seleccionar banco" />
</SelectTrigger>
<SelectContent>
{bancos?.map((b) => (
<SelectItem key={b.id} value={String(b.id)}>
{b.banco} ****{b.terminacionCuenta}
</SelectItem>
))}
</SelectContent>
</Select>
{(() => {
const selectedBank = bancos?.find((x) => String(x.id) === bancoId);
return (
<Select value={bancoId} onValueChange={setBancoId}>
<SelectTrigger className="w-48">
<span className="truncate">
{selectedBank
? `${selectedBank.banco} ****${selectedBank.terminacionCuenta}`
: 'Seleccionar banco'}
</span>
</SelectTrigger>
<SelectContent>
{bancos?.map((b) => (
<SelectItem key={b.id} value={String(b.id)}>
{b.banco} ****{b.terminacionCuenta}
</SelectItem>
))}
</SelectContent>
</Select>
);
})()}
<Input
type="date"
value={fechaPago}