<?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.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
< body >
< ui:composition template = "./template/principal.xhtml" >
< ui:define name = "top" >
< center > < h2 > A L M A C E N< / h2 > < / center >
< / ui:define >
< ui:define name = "left" >
< h:form >
< p:menu style = "border-color: gray; width: 163px; height: 630px;" >
< p:menuitem action = "ProductoLista.xhtml" value = "Productos" ajax = "false" icon = "pi pi-shopping-bag" iconPos = "left" style = "background-color: lightgray; height: 90px;" styleClass = "botonMenu" / >
< p:menuitem action = "proveedorLista.xhtml" value = "Proveedores" ajax = "false" icon = "pi pi-id-card" iconPos = "left" style = "background-color: white ;height: 90px;" styleClass = "botonMenu" / >
< p:menuitem action = "marcaLista.xhtml" value = "Marcas" ajax = "false" icon = "pi pi-tag" iconPos = "left" style = "background-color: lightgray ;height: 90px;" styleClass = "botonMenu" / >
< p:menuitem action = "categoriaLista.xhtml" value = "Categorias" ajax = "false" icon = "pi pi-star" iconPos = "left" style = "background-color: white ;height: 90px;" styleClass = "botonMenu" / >
< p:menuitem action = "UbicacionAlmacenLista.xhtml" value = "Almacen" ajax = "false" icon = "pi pi-map-marker" iconPos = "left" style = "background-color: lightgray ;height: 90px;" styleClass = "botonMenu" / >
< p:menuitem action = "usuariosLista.xhtml" value = "Usuarios" ajax = "false" icon = "pi pi-users" iconPos = "left" style = "background-color: white ;height: 90px;" styleClass = "botonMenu" / >
< p:menuitem action = "rolLista.xhtml" value = "Rol" ajax = "false" icon = "pi pi-sitemap" iconPos = "left" style = "background-color: lightgray ;height: 80px;" styleClass = "botonMenu" / >
< / p:menu >
< / h:form >
< / ui:define >
< ui:define name = "content" >
< f:view >
< h:form id = "formtabla" style = "width: 100%" >
< p:growl id = "growl" showDetail = "true" / >
< p:dataTable id = "tabla" value = "#{demoBeanUbicacionalmacen.all}" var = "item"
widgetVar="almacen" emptyMessage="No se han encontrado almacen"
filteredValue="#{demoBeanUbicacionalmacen.filteredCustomers3}"
globalFilterFunction="#{demoBeanUbicacionalmacen.globalFilterFunction}"
scrollable="true" scrollHeight="480" >
< f:facet name = "header" >
< div class = "flex justify-content-end" style = "height: 30px;" >
< div >
< p:commandButton ajax = "true" oncomplete = "PF('dlg').show();" actionListener = "#{demoBeanUbicacionalmacen.prepararNuevo()}"
update=":dialog" value="Nuevo" icon="pi pi-plus" />
< i class = "pi pi-search" style = "margin-left: 690px; margin-top: 10px;" > < / i >
< p:inputText id = "globalFilter" onkeyup = "PF('almacen').filter()" placeholder = "Buscar ubicación"
style="width:250px; margin-right: 120px; float: right; margin-top: -1px;" />
< p:commandButton value = "Logout" ajax = "false" icon = "pi pi-sign-out" action = "#{login.logout()}" style = "background-color: #036FAB; width: 100px; float: right; margin-top: -40px " / >
< / div >
< / div >
< / f:facet >
< p:column styleClass = "columnaOpc" >
< f:facet name = "header" >
< h:outputText value = "Id" / >
< / f:facet >
< h:outputText value = "#{item.id}" / >
< / p:column >
< p:column >
< f:facet name = "header" >
< h:outputText value = "Bodega" style = "font-weight:bolder; float: left;" / >
< / f:facet >
< h:outputText value = "#{item.bodega}" / >
< / p:column >
< p:column >
< f:facet name = "header" >
< h:outputText value = "Pasillo" style = "font-weight:bolder; float: left;" / >
< / f:facet >
< h:outputText value = "#{item.pasillo}" / >
< / p:column >
< p:column >
< f:facet name = "header" >
< h:outputText value = "Estante" style = "font-weight:bolder; float: left;" / >
< / f:facet >
< h:outputText value = "#{item.estante}" / >
< / p:column >
< p:column >
< f:facet name = "header" >
< h:outputText value = "Seccion" style = "font-weight:bolder; float: left;" / >
< / f:facet >
< h:outputText value = "#{item.seccion}" / >
< / p:column >
< p:column styleClass = "columnaOpc" >
< f:facet name = "header" >
< h:outputText value = "Opciones" style = "font-weight: bolder" / >
< / f:facet >
< p:commandButton ajax = "true" oncomplete = "PF('dlg').show();" actionListener = "#{demoBeanUbicacionalmacen.PrepararEditar(item)}" icon = "pi pi-file-edit" update = ":dialog" style = "margin-right: 10px" / >
< p:commandButton ajax = "true" oncomplete = "PF('dlg2').show();" actionListener = "#{demoBeanUbicacionalmacen.prepararEliminar(item)}" icon = "pi pi-trash" update = ":dialog" style = "background-color: red; color:white; border-color: white; " / >
< / p:column >
< / p:dataTable >
< / h:form >
<!-- CREAR/EDITAR -->
< p:dialog id = "dialog" widgetVar = "dlg" width = "540" height = "250" modal = "true" appendTo = "@(body)" >
< h:form >
< p:growl id = "growl" for = "productoMsj" showDetail = "true" / >
< h3 style = "text-align: center; background-color: #036FAB; padding: 20px; color: #FFFFFF; margin-bottom: 10px;" >
< h:outputText value = "#{demoBeanUbicacionalmacen.titulo}" / > < / h3 >
< h:panelGrid id = "grid" columns = "3" >
< p:outputLabel style = "font-weight:bolder" value = "Bodega:" for = "bodega" / >
< p:inputText id = "bodega" value = "#{demoBeanUbicacionalmacen.ubicacionalmacen.bodega}" title = "Bodega" required = "true" requiredMessage = "Campo requerido." / >
< p:message for = "bodega" / >
< p:outputLabel style = "font-weight:bolder" value = "Pasillo:" for = "pasillo" / >
< p:inputText id = "pasillo" value = "#{demoBeanUbicacionalmacen.ubicacionalmacen.pasillo}" title = "Pasillo" required = "true" requiredMessage = "Campo requerido." / >
< p:message for = "pasillo" / >
< p:outputLabel style = "font-weight:bolder" value = "Estante:" for = "estante" / >
< p:inputText id = "estante" value = "#{demoBeanUbicacionalmacen.ubicacionalmacen.estante}" title = "Estante" required = "true" requiredMessage = "Campo requerido." / >
< p:message for = "estante" / >
< p:outputLabel style = "font-weight:bolder" value = "Seccion:" for = "seccion" / >
< p:inputText id = "seccion" value = "#{demoBeanUbicacionalmacen.ubicacionalmacen.seccion}" title = "Seccion" required = "true" requiredMessage = "Campo requerido." / >
< p:message for = "seccion" / >
< / h:panelGrid >
< p:commandButton action = "UbicacionAlmacenLista.xhtml" ajax = "false" icon = "pi pi-times" immediate = "true" update = "grid, formtabla:tabla, growl"
style="background-color: red; border-color:red; float: right;"/>
< p:commandButton action = "#{demoBeanUbicacionalmacen.agregarUbicacion()}" update = "grid, formtabla:tabla, growl" ajax = "true"
rendered="#{demoBeanUbicacionalmacen.nuevo}" icon="pi pi-check"
style="margin-right: 10px; background-color:green; border-color:green; float: right; " />
< p:commandButton action = "#{demoBeanUbicacionalmacen.editarUbicacion()}"
update="grid, formtabla:tabla, growl" ajax="true" rendered="#{!demoBeanUbicacionalmacen.nuevo}" icon="pi pi-check"
style="margin-right: 10px; background-color:green; border-color:green; float: right;" />
< / h:form >
< / p:dialog >
<!-- ELIMINAR -->
< p:dialog id = "dialog2" widgetVar = "dlg2" width = "700" height = "290" modal = "true" >
< h:form >
< h1 style = "text-align: center; background-color: #036FAB; padding: 30px; color: #FFFFFF; font-size: 2em; margin-bottom: 20px;" >
< h:outputText value = "Eliminar" / > < / h1 >
< div >
< h:panelGrid columns = "2" style = "width: 80%" >
< h:outputLabel style = "font-weight:bolder" value = "Id:" for = "id" / >
< h:outputText id = "id" value = "#{demoBeanUbicacionalmacen.ubicacionalmacen.id}" title = "Id" / >
< h:outputLabel style = "font-weight:bolder" value = "Bodega:" for = "bodega" / >
< h:outputText id = "bodega" value = "#{demoBeanUbicacionalmacen.ubicacionalmacen.bodega}" title = "Bodega" / >
< h:outputLabel style = "font-weight:bolder" value = "Pasillo:" for = "pasillo" / >
< h:outputText id = "pasillo" value = "#{demoBeanUbicacionalmacen.ubicacionalmacen.pasillo}" title = "Pasillo" / >
< h:outputLabel style = "font-weight:bolder" value = "Estante:" for = "estante" / >
< h:outputText id = "estante" value = "#{demoBeanUbicacionalmacen.ubicacionalmacen.estante}" title = "Estante" / >
< h:outputLabel style = "font-weight:bolder" value = "Seccion:" for = "seccion" / >
< h:outputText id = "seccion" value = "#{demoBeanUbicacionalmacen.ubicacionalmacen.seccion}" title = "Seccion" / >
< / h:panelGrid >
< / div >
< div style = "margin-top: 20px;" >
< p:commandButton action = "UbicacionAlmacenLista.xhtml" icon = "pi pi-times" ajax = "false" immediate = "true"
style="margin-left: 10px; background-color:red; border-color:red; float: right;" />
< p:commandButton action = "UbicacionAlmacenLista.xhtml" actionListener = "#{demoBeanUbicacionalmacen.eliminarUbicacion()}"
ajax="false" icon="pi pi-check"
style=" background-color:green; border-color:green; float: right;"/>
< / div >
< / h:form >
< / p:dialog >
<!-- DETALLES -->
< p:dialog id = "dialog3" widgetVar = "dlg3" width = "900" height = "400" modal = "true" >
< h:form >
< h1 style = "text-align: center; background-color: #036FAB; padding: 30px; color: #FFFFFF; font-size: 2em; margin-bottom: 20px;" >
< h:outputText value = "Detalles" / > < / h1 >
< div >
< p:panelGrid columns = "2" style = "width: 100%" >
< h:outputLabel style = "font-weight:bolder" value = "Id:" for = "id" / >
< h:outputText id = "id" value = "#{demoBeanUbicacionalmacen.ubicacionalmacen.id}" title = "Id" / >
< h:outputLabel style = "font-weight:bolder" value = "Bodega:" for = "bodega" / >
< h:outputText id = "bodega" value = "#{demoBeanUbicacionalmacen.ubicacionalmacen.bodega}" title = "Bodega" / >
< h:outputLabel style = "font-weight:bolder" value = "Pasillo:" for = "pasillo" / >
< h:outputText id = "pasillo" value = "#{demoBeanUbicacionalmacen.ubicacionalmacen.pasillo}" title = "Pasillo" / >
< h:outputLabel style = "font-weight:bolder" value = "Estante:" for = "estante" / >
< h:outputText id = "estante" value = "#{demoBeanUbicacionalmacen.ubicacionalmacen.estante}" title = "Estante" / >
< h:outputLabel style = "font-weight:bolder" value = "Seccion:" for = "seccion" / >
< h:outputText id = "seccion" value = "#{demoBeanUbicacionalmacen.ubicacionalmacen.seccion}" title = "Seccion" / >
< / p:panelGrid >
< / div >
< / h:form >
< / p:dialog >
< / f:view >
< / ui:define >
< / ui:composition >
< / body >
< / html >