git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@24309 d1611594-4594-4d17-8e1d-87c2c4800839
parent
a9a29d9d8d
commit
796edc5c94
|
@ -7,6 +7,7 @@ package com.rjconsultores.ventaboletos.web.gui.controladores.seguridad;
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
@ -114,8 +115,6 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
|
||||||
this.ubicacionList = ubicacionList;
|
this.ubicacionList = ubicacionList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<UsuarioEmpresa> getLsUsuarioEmpresa() {
|
public List<UsuarioEmpresa> getLsUsuarioEmpresa() {
|
||||||
return lsUsuarioEmpresa;
|
return lsUsuarioEmpresa;
|
||||||
}
|
}
|
||||||
|
@ -220,7 +219,6 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
|
||||||
this.cmbPerfil = cmbPerfil;
|
this.cmbPerfil = cmbPerfil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Combobox getCmbEmpresa() {
|
public Combobox getCmbEmpresa() {
|
||||||
return cmbEmpresa;
|
return cmbEmpresa;
|
||||||
}
|
}
|
||||||
|
@ -249,8 +247,6 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
|
||||||
return btnRemoverUbicacion;
|
return btnRemoverUbicacion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public UsuarioEmpresaService getUsuarioEmpresaService() {
|
public UsuarioEmpresaService getUsuarioEmpresaService() {
|
||||||
return usuarioEmpresaService;
|
return usuarioEmpresaService;
|
||||||
}
|
}
|
||||||
|
@ -362,11 +358,9 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
|
||||||
lsUsuarioEmpresa.addAll(usuarioEmpresaService.obtenerPorUsuario(usuario));
|
lsUsuarioEmpresa.addAll(usuarioEmpresaService.obtenerPorUsuario(usuario));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
empresaList.setItemRenderer(new RenderUsuarioEmpresa());
|
empresaList.setItemRenderer(new RenderUsuarioEmpresa());
|
||||||
empresaList.setData(lsUsuarioEmpresa);
|
empresaList.setData(lsUsuarioEmpresa);
|
||||||
|
|
||||||
|
|
||||||
txtCveEmpleado.focus();
|
txtCveEmpleado.focus();
|
||||||
|
|
||||||
if (usuario.getUsuarioId() == null) {
|
if (usuario.getUsuarioId() == null) {
|
||||||
|
@ -383,7 +377,6 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
|
||||||
txtNombMaterno.setDisabled(true);
|
txtNombMaterno.setDisabled(true);
|
||||||
btnPesquisa.setVisible(false);
|
btnPesquisa.setVisible(false);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
List<UsuarioPerfil> lsUsuarioPerfil = usuarioPerfilService.obtenerPorUsuario(usuario);
|
List<UsuarioPerfil> lsUsuarioPerfil = usuarioPerfilService.obtenerPorUsuario(usuario);
|
||||||
if (!lsUsuarioPerfil.isEmpty()) {
|
if (!lsUsuarioPerfil.isEmpty()) {
|
||||||
|
@ -405,7 +398,6 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
|
||||||
cmbPuntoVenta.setDisabled(Boolean.TRUE);
|
cmbPuntoVenta.setDisabled(Boolean.TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onFocus$txtSenha(Event ev) {
|
public void onFocus$txtSenha(Event ev) {
|
||||||
|
@ -483,13 +475,12 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
usuario.setEmpleado(emp.get(0));
|
usuario.setEmpleado(emp.get(0));
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
txtNombUsuario.setDisabled(false);
|
txtNombUsuario.setDisabled(false);
|
||||||
txtNombPaterno.setDisabled(false);
|
txtNombPaterno.setDisabled(false);
|
||||||
txtNombMaterno.setDisabled(false);
|
txtNombMaterno.setDisabled(false);
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("editarUsuarioController.MSG.existeEmpleado", new Object[]{txtCveEmpleado.getValue()}),
|
Labels.getLabel("editarUsuarioController.MSG.existeEmpleado", new Object[] { txtCveEmpleado.getValue() }),
|
||||||
Labels.getLabel("editarUsuarioController.window.title"),
|
Labels.getLabel("editarUsuarioController.window.title"),
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
|
@ -518,32 +509,30 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void onClick$btnAdicionarEmpresa(Event ev) throws InterruptedException {
|
public void onClick$btnAdicionarEmpresa(Event ev) throws InterruptedException {
|
||||||
if (cmbEmpresa.getSelectedItem() == null){
|
if (cmbEmpresa.getSelectedItem() == null) {
|
||||||
return ;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Empresa empresa = (Empresa) cmbEmpresa.getSelectedItem().getValue();
|
final Empresa empresa = (Empresa) cmbEmpresa.getSelectedItem().getValue();
|
||||||
if (empresa != null) {
|
if (empresa != null) {
|
||||||
|
|
||||||
boolean existeEmpresa = CollectionUtils.exists(lsUsuarioEmpresa,new Predicate() {
|
boolean existeEmpresa = CollectionUtils.exists(lsUsuarioEmpresa, new Predicate() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean evaluate(Object object) {
|
public boolean evaluate(Object object) {
|
||||||
return ((UsuarioEmpresa)object).getEmpresa().equals(empresa);
|
return ((UsuarioEmpresa) object).getEmpresa().equals(empresa);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (existeEmpresa) {
|
||||||
if(existeEmpresa){
|
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("MSG.Registro.Existe"),
|
Labels.getLabel("MSG.Registro.Existe"),
|
||||||
Labels.getLabel("editarUsuarioController.window.title"),
|
Labels.getLabel("editarUsuarioController.window.title"),
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}else{
|
} else {
|
||||||
|
|
||||||
UsuarioEmpresa ue = new UsuarioEmpresa();
|
UsuarioEmpresa ue = new UsuarioEmpresa();
|
||||||
ue.setActivo(Boolean.TRUE);
|
ue.setActivo(Boolean.TRUE);
|
||||||
|
@ -712,12 +701,18 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSelect$cmbParada(){
|
public void onChange$cmbParada() {
|
||||||
|
|
||||||
Comboitem cbiParada = cmbParada.getSelectedItem();
|
Comboitem cbiParada = cmbParada.getSelectedItem();
|
||||||
if(cbiParada!= null){
|
|
||||||
|
if (cbiParada != null) {
|
||||||
lsPuntoVenta = puntoVentaService.buscaPuntoVentaParada((Parada) cmbParada.getSelectedItem().getValue());
|
lsPuntoVenta = puntoVentaService.buscaPuntoVentaParada((Parada) cmbParada.getSelectedItem().getValue());
|
||||||
cmbPuntoVenta.setModel(new ListModelList(lsPuntoVenta));
|
cmbPuntoVenta.setModel(new ListModelList(lsPuntoVenta));
|
||||||
|
if (lsPuntoVenta.isEmpty()){
|
||||||
|
cmbPuntoVenta.setText((String)null);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
cmbPuntoVenta.setModel(new ListModelList(Collections.emptyList()));
|
||||||
|
cmbPuntoVenta.setText((String)null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ public class RenderCategoriaDescuento implements ListitemRenderer {
|
||||||
private CategoriaCtrlService categoriaCtrlService;
|
private CategoriaCtrlService categoriaCtrlService;
|
||||||
public void render(Listitem lstm, Object o) throws Exception {
|
public void render(Listitem lstm, Object o) throws Exception {
|
||||||
CategoriaCtrl cc = (CategoriaCtrl) o;
|
CategoriaCtrl cc = (CategoriaCtrl) o;
|
||||||
String descricao = "";
|
|
||||||
|
|
||||||
Listcell lc = new Listcell(cc.getCategoriactrlId().toString());
|
Listcell lc = new Listcell(cc.getCategoriactrlId().toString());
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
|
@ -47,13 +46,12 @@ public class RenderCategoriaDescuento implements ListitemRenderer {
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
if(!cc.getCategoriaDescuentoList().isEmpty()){
|
if(!cc.getCategoriaDescuentoList().isEmpty()){
|
||||||
|
|
||||||
|
sb = new StringBuilder();
|
||||||
for(CategoriaDescuento catDesc : cc.getCategoriaDescuentoList()){
|
for(CategoriaDescuento catDesc : cc.getCategoriaDescuentoList()){
|
||||||
|
sb.append(catDesc.getCategoria()).append(", ");
|
||||||
descricao = descricao + catDesc.getCategoria() != null ? catDesc.getCategoria().getDesccategoria() : "0"+ ", ";
|
|
||||||
}
|
}
|
||||||
descricao = descricao.substring(0,descricao.length()-1);
|
|
||||||
lc = new Listcell(descricao);
|
lc = new Listcell(sb.toString());
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# <controler>. <id>. <propiedade> = XXX
|
# <controler>. <id>. <propiedade> = XXX
|
||||||
|
|
||||||
#Versao do VentaBoleto:
|
#Versao do VentaBoleto:
|
||||||
versao = ADM_20130214_1RC109
|
versao = ADM_20130214_1RC110
|
||||||
|
|
||||||
# MSG Defaut:
|
# MSG Defaut:
|
||||||
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
|
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
|
||||||
|
|
|
@ -116,19 +116,14 @@
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarUsuarioController.lhParada.label')}"/>
|
<label value="${c:l('editarUsuarioController.lhParada.label')}"/>
|
||||||
<hbox>
|
<combobox id="cmbParada" mold="rounded" buttonVisible="true" width="100%"
|
||||||
<combobox id="cmbParada"
|
|
||||||
mold="rounded" buttonVisible="true" width="100%"
|
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"/>
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"/>
|
||||||
</hbox>
|
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarUsuarioController.lhPuntoVenta.label')}"/>
|
<label value="${c:l('editarUsuarioController.lhPuntoVenta.label')}"/>
|
||||||
<hbox>
|
<combobox id="cmbPuntoVenta" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
<combobox id="cmbPuntoVenta"
|
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
|
||||||
mold="rounded" buttonVisible="true" width="100%" />
|
mold="rounded" buttonVisible="true" width="100%" />
|
||||||
</hbox>
|
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
|
Loading…
Reference in New Issue