Skip to content
Browse files

[Correcciones] En el listado de usuarios del formulario para registrar

pedido solo muestro los de Role USER que son los unicos a los que se le
deben cargar los pedidos.
  • Loading branch information...
1 parent bb3d624 commit 2463665187aca9561691dc7ad63541a44c4496e4 @ktonga ktonga committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 grails-app/views/pedido/_form.gsp
View
3 grails-app/views/pedido/_form.gsp
@@ -1,3 +1,4 @@
+<%@page import="sieym.Role"%>
<%@ page import="sieym.Pedido" %>
<%@ page import="sieym.Paquete" %>
<%@ page import="sieym.User" %>
@@ -9,7 +10,7 @@
<g:message code="pedido.cliente.label" default="Cliente" />
<span class="required-indicator">*</span>
</label>
- <g:select name="cliente.id" from="${User.list()}" required="" value="${pedidoInstance?.cliente?.id}" optionKey="id" optionValue="name"/>
+ <g:select name="cliente.id" from="${User.findAllByRole(sieym.Role.USER)}" required="" value="${pedidoInstance?.cliente?.id}" optionKey="id" optionValue="name"/>
</div>
<div class="fieldcontain ${hasErrors(bean: pedidoInstance, field: 'direccionEntrega', 'error')} ">

0 comments on commit 2463665

Please sign in to comment.
Something went wrong with that request. Please try again.