Files
banco-con-java-ee/bank-war/web/admin_tarjeta_credito_view.xhtml
2019-07-22 13:15:37 -04:00

166 lines
8.8 KiB
HTML

<?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()}">
<h1 class="f1 tc">Tarjeta Credito</h1>
<div class="mt3 cf">
<h:commandLink class="f5 fr tc link dim br2 ph3 pv2 mb2 dib white bg-green" rendered="#{tarjetaCreditoBean.tarjetaCredito.lineaSobregiro == null}" action="#{tarjetaCreditoBean.gotoContratarLineaSobregiro()}" style="width: 250px">
<li class="fas fa-file-invoice-dollar"></li> Contratar Linea Sobregiro
</h:commandLink>
<h:commandLink class="f5 fl tc link dim br2 ph3 pv2 mb2 dib white bg-blue" immediate="true" action="admin_cliente_view" style="width: 250px">
<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>
<hr/>
<h:panelGroup layout="block" class="mv3 w-100" rendered="#{tarjetaCreditoBean.tarjetaCredito.lineaSobregiro != null}">
<h1 class="f2 tc">Linea Sobregiro</h1>
<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="#{tarjetaCreditoBean.tarjetaCredito.lineaSobregiro.id}" readonly="true"/>
</div>
<div class="mt3 tc">
<h:outputLabel class="db fw4 lh-copy f6" value="Limite:"/>
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{tarjetaCreditoBean.tarjetaCredito.lineaSobregiro.limite}" readonly="true"/>
</div>
<div class="mt3 tc">
<h:outputLabel class="db fw4 lh-copy f6" value="Sobregiro:"/>
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{tarjetaCreditoBean.tarjetaCredito.lineaSobregiro.sobregiro}" readonly="true"/>
</div>
<div class="mt3 tc">
<h:outputLabel class="db fw4 lh-copy f6" value="Fecha Creacion:"/>
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{tarjetaCreditoBean.tarjetaCredito.insertedAt}" readonly="true"/>
</div>
</h:panelGroup>
<h:panelGroup layout="block" class="mv3 w-100" rendered="#{tarjetaCreditoBean.tarjetaCredito.lineaSobregiro == null}">
<h1 class="f2 tc">Linea Sobregiro</h1>
<p class="f6 tc">Sin contratar</p>
</h:panelGroup>
<hr/>
<h1 class="f2 tc">Transacciones</h1>
<h1 class="f3 tc">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 tc">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>