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:
@@ -297,9 +297,16 @@ 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>
|
||||
{(() => {
|
||||
const selectedBank = bancos?.find((x) => String(x.id) === bancoId);
|
||||
return (
|
||||
<Select value={bancoId} onValueChange={setBancoId}>
|
||||
<SelectTrigger className="w-48">
|
||||
<SelectValue placeholder="Seleccionar banco" />
|
||||
<span className="truncate">
|
||||
{selectedBank
|
||||
? `${selectedBank.banco} ****${selectedBank.terminacionCuenta}`
|
||||
: 'Seleccionar banco'}
|
||||
</span>
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{bancos?.map((b) => (
|
||||
@@ -309,6 +316,8 @@ export default function ConciliacionPage() {
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
);
|
||||
})()}
|
||||
<Input
|
||||
type="date"
|
||||
value={fechaPago}
|
||||
|
||||
Reference in New Issue
Block a user