Listo los deletes de las tarjetas de credito
This commit is contained in:
@@ -181,6 +181,14 @@ public class ClienteBean implements Serializable {
|
|||||||
return "admin_tarjeta_debito_view";
|
return "admin_tarjeta_debito_view";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String gotoAdminViewTarjetaCredito() {
|
||||||
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
TarjetaCreditoBean tcb = context.getApplication().evaluateExpressionGet(context, "#{tarjetaCreditoBean}", TarjetaCreditoBean.class);
|
||||||
|
tcb.setCliente(cliente);
|
||||||
|
tcb.setTarjetaCredito(cliente.getTarjetaCredito());
|
||||||
|
return "admin_tarjeta_credito_view";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void resetInput() {
|
private void resetInput() {
|
||||||
this.cliente = new Cliente();
|
this.cliente = new Cliente();
|
||||||
|
|||||||
@@ -119,12 +119,30 @@ public class CompraBean implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String deleteCompraTarjetaCredito() {
|
public String deleteCompraTarjetaCredito() {
|
||||||
|
if (compraTarjetaCredito.getTipo().equals("Nacional")) {
|
||||||
|
if (tarjetaCredito.getDeudaNacional() - compraTarjetaCredito.getMonto() < 0) {
|
||||||
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
context.addMessage(null, new FacesMessage("Eliminar el pago dejaria la deuda nacional en negativo"));
|
||||||
|
context.validationFailed();
|
||||||
|
return "admin_tarjeta_credito_delete_compra";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (compraTarjetaCredito.getTipo().equals("Internacional")) {
|
||||||
|
if (tarjetaCredito.getDeudaInternacional() - compraTarjetaCredito.getMonto() < 0) {
|
||||||
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
context.addMessage(null, new FacesMessage("Eliminar el pago dejaria la deuda internacional en negativo"));
|
||||||
|
context.validationFailed();
|
||||||
|
return "admin_tarjeta_credito_delete_compra";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
switch (compraTarjetaCredito.getTipo()) {
|
switch (compraTarjetaCredito.getTipo()) {
|
||||||
case "Nacional":
|
case "Nacional":
|
||||||
tarjetaCredito.setDeudaNacional(tarjetaCredito.getDeudaNacional() + compraTarjetaCredito.getMonto());
|
tarjetaCredito.setDeudaNacional(tarjetaCredito.getDeudaNacional() - compraTarjetaCredito.getMonto());
|
||||||
break;
|
break;
|
||||||
case "Internacional":
|
case "Internacional":
|
||||||
tarjetaCredito.setDeudaInternacional(tarjetaCredito.getDeudaInternacional() + compraTarjetaCredito.getMonto());
|
tarjetaCredito.setDeudaInternacional(tarjetaCredito.getDeudaInternacional() - compraTarjetaCredito.getMonto());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ public class PagoBean implements Serializable {
|
|||||||
private TarjetaCreditoFacadeLocal tarjetaCreditoFacade;
|
private TarjetaCreditoFacadeLocal tarjetaCreditoFacade;
|
||||||
|
|
||||||
private TarjetaCredito tarjetaCredito;
|
private TarjetaCredito tarjetaCredito;
|
||||||
|
private PagoTarjetaCredito pagoTarjetaCredito;
|
||||||
|
|
||||||
private int monto;
|
private int monto;
|
||||||
private String comentario;
|
private String comentario;
|
||||||
@@ -79,6 +80,23 @@ public class PagoBean implements Serializable {
|
|||||||
return "cliente_tarjeta_credito_view";
|
return "cliente_tarjeta_credito_view";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String deletePago() {
|
||||||
|
switch (pagoTarjetaCredito.getTipo()) {
|
||||||
|
case "Nacional":
|
||||||
|
tarjetaCredito.setDeudaNacional(tarjetaCredito.getDeudaNacional() + pagoTarjetaCredito.getMonto());
|
||||||
|
break;
|
||||||
|
case "Internacional":
|
||||||
|
tarjetaCredito.setDeudaInternacional(tarjetaCredito.getDeudaInternacional() + pagoTarjetaCredito.getMonto());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
tarjetaCredito.getPagoList().remove(pagoTarjetaCredito);
|
||||||
|
pagoTarjetaCreditoFacade.remove(pagoTarjetaCredito);
|
||||||
|
tarjetaCreditoFacade.edit(tarjetaCredito);
|
||||||
|
|
||||||
|
return "admin_tarjeta_credito_view";
|
||||||
|
}
|
||||||
|
|
||||||
public void resetInput() {
|
public void resetInput() {
|
||||||
this.monto = 0;
|
this.monto = 0;
|
||||||
this.comentario = null;
|
this.comentario = null;
|
||||||
@@ -117,4 +135,11 @@ public class PagoBean implements Serializable {
|
|||||||
this.tipo = tipo;
|
this.tipo = tipo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PagoTarjetaCredito getPagoTarjetaCredito() {
|
||||||
|
return pagoTarjetaCredito;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPagoTarjetaCredito(PagoTarjetaCredito pagoTarjetaCredito) {
|
||||||
|
this.pagoTarjetaCredito = pagoTarjetaCredito;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package bean;
|
|||||||
import beans.ClienteFacadeLocal;
|
import beans.ClienteFacadeLocal;
|
||||||
import beans.TarjetaCreditoFacadeLocal;
|
import beans.TarjetaCreditoFacadeLocal;
|
||||||
import entities.Cliente;
|
import entities.Cliente;
|
||||||
|
import entities.CompraTarjetaCredito;
|
||||||
|
import entities.PagoTarjetaCredito;
|
||||||
import entities.TarjetaCredito;
|
import entities.TarjetaCredito;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -46,6 +48,13 @@ public class TarjetaCreditoBean implements Serializable {
|
|||||||
cb.setTarjetaCredito(tarjetaCredito);
|
cb.setTarjetaCredito(tarjetaCredito);
|
||||||
return "cliente_tarjeta_credito_comprar";
|
return "cliente_tarjeta_credito_comprar";
|
||||||
}
|
}
|
||||||
|
public String gotoDeleteCompra(CompraTarjetaCredito compra) {
|
||||||
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
CompraBean cb = context.getApplication().evaluateExpressionGet(context, "#{compraBean}", CompraBean.class);
|
||||||
|
cb.setTarjetaCredito(tarjetaCredito);
|
||||||
|
cb.setCompraTarjetaCredito(compra);
|
||||||
|
return "admin_tarjeta_credito_delete_compra";
|
||||||
|
}
|
||||||
|
|
||||||
public String gotoPagar() {
|
public String gotoPagar() {
|
||||||
FacesContext context = FacesContext.getCurrentInstance();
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
@@ -54,6 +63,15 @@ public class TarjetaCreditoBean implements Serializable {
|
|||||||
return "cliente_tarjeta_credito_pagar";
|
return "cliente_tarjeta_credito_pagar";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String gotoDeletePago(PagoTarjetaCredito pago) {
|
||||||
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
PagoBean pb = context.getApplication().evaluateExpressionGet(context, "#{pagoBean}", PagoBean.class);
|
||||||
|
pb.setTarjetaCredito(tarjetaCredito);
|
||||||
|
pb.setPagoTarjetaCredito(pago);
|
||||||
|
return "admin_tarjeta_credito_delete_pago";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public String edit() {
|
public String edit() {
|
||||||
tarjetaCreditoFacade.edit(tarjetaCredito);
|
tarjetaCreditoFacade.edit(tarjetaCredito);
|
||||||
|
|
||||||
|
|||||||
@@ -167,7 +167,7 @@
|
|||||||
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{clienteBean.cliente.tarjetaCredito.insertedAt}" readonly="true"/>
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{clienteBean.cliente.tarjetaCredito.insertedAt}" readonly="true"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt3 tc">
|
<div class="mt3 tc">
|
||||||
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-green" action="#{clienteBean.gotoAdminViewCuentaCorriente()}" style="width: 200px">
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-green" action="#{clienteBean.gotoAdminViewTarjetaCredito()}" style="width: 200px">
|
||||||
<li class="fas fa-eye"></li> Ver
|
<li class="fas fa-eye"></li> Ver
|
||||||
</h:commandLink>
|
</h:commandLink>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
66
bank-war/web/admin_tarjeta_credito_delete_compra.xhtml
Normal file
66
bank-war/web/admin_tarjeta_credito_delete_compra.xhtml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8' ?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3c.org/1999/xhtml"
|
||||||
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||||
|
xmlns:f="http://java.sun.com/jsf/core">
|
||||||
|
<h:head>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/tachyons@4.10.0/css/tachyons.min.css"/>
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/normalize.css@8.0.1/normalize.css"/>
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"/>
|
||||||
|
<h:outputStylesheet library="css" name="all.css"/>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</h:head>
|
||||||
|
<body class="black-70 pa4">
|
||||||
|
<h:form rendered="#{userBean.isLogged() and userBean.isAdmin()}">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<h1 class="f1">Eliminar Compra</h1>
|
||||||
|
|
||||||
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-blue" immediate="true" action="admin_tarjeta_credito_view" style="margin-top: auto; margin-bottom: auto">
|
||||||
|
<li class="fas fa-arrow-left"></li> Volver
|
||||||
|
</h:commandLink>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h:messages class="f4 w-40 list tc center white bg-red pa4 "/>
|
||||||
|
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="ID:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{compraBean.compraTarjetaCredito.id}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Monto:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{compraBean.compraTarjetaCredito.monto}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Comentario:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{compraBean.compraTarjetaCredito.comentario}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Tipo de Compra:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{compraBean.compraTarjetaCredito.tipo}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Fecha:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{compraBean.compraTarjetaCredito.insertedAt}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-red" action="#{compraBean.deleteCompraTarjetaCredito()}" style="margin-top: auto; margin-bottom: auto">
|
||||||
|
<li class="fas fa-trash"></li> Eliminar
|
||||||
|
</h:commandLink>
|
||||||
|
</div>
|
||||||
|
</h:form>
|
||||||
|
|
||||||
|
<h:form rendered="#{!userBean.isLogged()}">
|
||||||
|
<div class="tc">
|
||||||
|
<h1 class="f1 tc">Acceso no autorizado</h1>
|
||||||
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-red" value="Ir al index" action="index"/>
|
||||||
|
</div>
|
||||||
|
</h:form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
66
bank-war/web/admin_tarjeta_credito_delete_pago.xhtml
Normal file
66
bank-war/web/admin_tarjeta_credito_delete_pago.xhtml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8' ?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3c.org/1999/xhtml"
|
||||||
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||||
|
xmlns:f="http://java.sun.com/jsf/core">
|
||||||
|
<h:head>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/tachyons@4.10.0/css/tachyons.min.css"/>
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/normalize.css@8.0.1/normalize.css"/>
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"/>
|
||||||
|
<h:outputStylesheet library="css" name="all.css"/>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</h:head>
|
||||||
|
<body class="black-70 pa4">
|
||||||
|
<h:form rendered="#{userBean.isLogged() and userBean.isAdmin()}">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<h1 class="f1">Eliminar Pago</h1>
|
||||||
|
|
||||||
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-blue" immediate="true" action="admin_tarjeta_credito_view" style="margin-top: auto; margin-bottom: auto">
|
||||||
|
<li class="fas fa-arrow-left"></li> Volver
|
||||||
|
</h:commandLink>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h:messages class="f4 w-40 list tc center white bg-red pa4 "/>
|
||||||
|
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="ID:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{pagoBean.pagoTarjetaCredito.id}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Monto:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{pagoBean.pagoTarjetaCredito.monto}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Comentario:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{pagoBean.pagoTarjetaCredito.comentario}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Tipo de Compra:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{pagoBean.pagoTarjetaCredito.tipo}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Fecha:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{pagoBean.pagoTarjetaCredito.insertedAt}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-red" action="#{pagoBean.deletePago()}" style="margin-top: auto; margin-bottom: auto">
|
||||||
|
<li class="fas fa-trash"></li> Eliminar
|
||||||
|
</h:commandLink>
|
||||||
|
</div>
|
||||||
|
</h:form>
|
||||||
|
|
||||||
|
<h:form rendered="#{!userBean.isLogged()}">
|
||||||
|
<div class="tc">
|
||||||
|
<h1 class="f1 tc">Acceso no autorizado</h1>
|
||||||
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-red" value="Ir al index" action="index"/>
|
||||||
|
</div>
|
||||||
|
</h:form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
129
bank-war/web/admin_tarjeta_credito_view.xhtml
Normal file
129
bank-war/web/admin_tarjeta_credito_view.xhtml
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8' ?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3c.org/1999/xhtml"
|
||||||
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||||
|
xmlns:f="http://java.sun.com/jsf/core">
|
||||||
|
<h:head>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/tachyons@4.10.0/css/tachyons.min.css"/>
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/normalize.css@8.0.1/normalize.css"/>
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"/>
|
||||||
|
<h:outputStylesheet library="css" name="all.css"/>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</h:head>
|
||||||
|
<body class="black-70 pa4">
|
||||||
|
<h:form rendered="#{userBean.isLogged() and userBean.isAdmin()}">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<h1 class="f1">Tarjeta Credito</h1>
|
||||||
|
|
||||||
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-blue" immediate="true" action="admin_cliente_view" style="margin-top: auto; margin-bottom: auto">
|
||||||
|
<li class="fas fa-arrow-left"></li> Volver
|
||||||
|
</h:commandLink>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db lh-copy f6" value="Id:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" id="id" value="#{tarjetaCreditoBean.tarjetaCredito.id}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db lh-copy f6" value="Limite Nacional: "/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" id="limite_nacional" value="#{tarjetaCreditoBean.tarjetaCredito.limiteNacional}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db lh-copy f6" value="Deuda Nacional: "/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" id="deuda_nacional" value="#{tarjetaCreditoBean.tarjetaCredito.deudaNacional}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db lh-copy f6" value="Limite Internacional: "/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" id="limite_internacional" value="#{tarjetaCreditoBean.tarjetaCredito.limiteInternacional}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db lh-copy f6" value="Deuda Internacional"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" id="deuda_internacional" value="#{tarjetaCreditoBean.tarjetaCredito.deudaInternacional}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db lh-copy f6" value="Fecha Creacion:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" id="fecha_creacion" value="#{tarjetaCreditoBean.tarjetaCredito.insertedAt}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1 class="f3">Compras</h1>
|
||||||
|
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{tarjetaCreditoBean.tarjetaCredito.compraList}" var="compra">
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Fecha"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{compra.insertedAt}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Comentario"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{compra.comentario}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Tipo de Compra"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{compra.tipo}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Monto"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{compra.monto}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column class="tr">
|
||||||
|
<h:commandLink class="f6 link dim br2 ph3 pv2 mr2 dib white bg-red tc" action="#{tarjetaCreditoBean.gotoDeleteCompra(compra)}">
|
||||||
|
<li class="fas fa-trash"></li>
|
||||||
|
</h:commandLink>
|
||||||
|
</h:column>
|
||||||
|
</h:dataTable>
|
||||||
|
|
||||||
|
<h1 class="f3">Pagos</h1>
|
||||||
|
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{tarjetaCreditoBean.tarjetaCredito.pagoList}" var="pago">
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Fecha"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{pago.insertedAt}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Comentario"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{pago.comentario}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Tipo de Pago"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{pago.tipo}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Monto"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{pago.monto}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column class="tr">
|
||||||
|
<h:commandLink class="f6 link dim br2 ph3 pv2 mr2 dib white bg-red tc" action="#{tarjetaCreditoBean.gotoDeletePago(pago)}">
|
||||||
|
<li class="fas fa-trash"></li>
|
||||||
|
</h:commandLink>
|
||||||
|
</h:column>
|
||||||
|
</h:dataTable>
|
||||||
|
</h:form>
|
||||||
|
|
||||||
|
<h:form rendered="#{!userBean.isLogged()}">
|
||||||
|
<div class="tc">
|
||||||
|
<h1 class="f1 tc">Acceso no autorizado</h1>
|
||||||
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-red" value="Ir al index" action="index"/>
|
||||||
|
</div>
|
||||||
|
</h:form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user