DANIEL IVAN ESTRADA MORANDO
7 months ago
commit
70e43ac92e
163 changed files with 14696 additions and 0 deletions
@ -0,0 +1,9 @@ |
|||
/nbproject/private/ |
|||
/InventarioJakartaJIN-war/nbproject/private/ |
|||
/InventarioJakartaJIN-ejb/nbproject/private/ |
|||
/build/ |
|||
/InventarioJakartaJIN-war/dist/ |
|||
/InventarioJakartaJIN-war/build/ |
|||
/InventarioJakartaJIN-ejb/dist/ |
|||
/InventarioJakartaJIN-ejb/build/ |
|||
/dist/ |
@ -0,0 +1,2 @@ |
|||
Manifest-Version: 1.0 |
|||
|
@ -0,0 +1,100 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/StatelessEjbClass.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import java.util.List; |
|||
import javax.ejb.Stateless; |
|||
import mx.edu.tsj.chapala.sistemas.jin.dao.CategoriaDAO; |
|||
import mx.edu.tsj.chapala.sistemas.jin.dao.MarcaDAO; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Categoria; |
|||
import mx.edu.tsj.chapala.sistemas.jin.msg.Mensajes; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
@Stateless |
|||
public class CategoriaBL implements CategoriaBLLocal { |
|||
|
|||
@Override |
|||
public Mensajes agregar(Categoria categoria) { |
|||
|
|||
CategoriaDAO categoriaDAO = new CategoriaDAO(); |
|||
//TODO: agregar la logica
|
|||
if(categoria.getNombre().isEmpty()){ |
|||
return Mensajes.CAMPOS_INCOMPLETOS; |
|||
} |
|||
else{ |
|||
categoriaDAO.agregar(categoria); |
|||
return Mensajes.SIN_ERROR; |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
// Add business logic below. (Right-click in editor and choose
|
|||
// "Insert Code > Add Business Method")
|
|||
|
|||
@Override |
|||
public Mensajes eliminar(Categoria categoria) { |
|||
CategoriaDAO categoriaDAO = new CategoriaDAO(); |
|||
Categoria existe = categoriaDAO.buscarPorId(categoria); |
|||
if(existe==null && existe.getStatus()==0){ |
|||
return Mensajes.ELEMENTO_NO_ENCONTRADO; |
|||
} |
|||
else{ |
|||
categoriaDAO.eliminar(categoria); |
|||
return Mensajes.SIN_ERROR; |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public Mensajes editar(Categoria categoria) { |
|||
CategoriaDAO categoriaDAO = new CategoriaDAO(); |
|||
Categoria existe = categoriaDAO.buscarPorId(categoria); |
|||
if(existe==null && existe.getStatus()==0){ |
|||
return Mensajes.ELEMENTO_NO_ENCONTRADO; |
|||
|
|||
}else{ |
|||
categoriaDAO.editar(categoria); |
|||
return Mensajes.SIN_ERROR; |
|||
} |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public Categoria buscarPorId(Categoria categoria) { |
|||
CategoriaDAO categoriaDAO = new CategoriaDAO(); |
|||
if(categoriaDAO==null){ |
|||
return null; |
|||
}else{ |
|||
return categoriaDAO.buscarPorId(categoria); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
@Override |
|||
public List<Categoria> getTodos() { |
|||
CategoriaDAO categoriaDAO = new CategoriaDAO(); |
|||
return categoriaDAO.getTodos(true); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/SessionLocal.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import java.util.List; |
|||
import javax.ejb.Local; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Categoria; |
|||
import mx.edu.tsj.chapala.sistemas.jin.msg.Mensajes; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
@Local |
|||
public interface CategoriaBLLocal { |
|||
|
|||
Mensajes agregar(Categoria categoria); |
|||
|
|||
Mensajes eliminar(Categoria categoria); |
|||
|
|||
Mensajes editar(Categoria categoria); |
|||
|
|||
Categoria buscarPorId(Categoria categoria); |
|||
|
|||
List<Categoria> getTodos(); |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,93 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/StatelessEjbClass.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import java.util.List; |
|||
import javax.ejb.Stateless; |
|||
import mx.edu.tsj.chapala.sistemas.jin.dao.MarcaDAO; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Marca; |
|||
import mx.edu.tsj.chapala.sistemas.jin.msg.Mensajes; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Stateless |
|||
public class MarcaBL implements MarcaBLLocal { |
|||
|
|||
@Override |
|||
public Mensajes Agregar(Marca marca) { |
|||
System.out.println("Llegaste al metodo de agregar"); |
|||
MarcaDAO marcaDAO = new MarcaDAO(); |
|||
//TODO: agregar la logica
|
|||
if(marca.getNombre().isEmpty()){ |
|||
return Mensajes.CAMPOS_INCOMPLETOS; |
|||
} |
|||
else{ |
|||
marcaDAO.agregar(marca); |
|||
return Mensajes.SIN_ERROR; |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
// Add business logic below. (Right-click in editor and choose
|
|||
// "Insert Code > Add Business Method")
|
|||
|
|||
@Override |
|||
public Mensajes Eliminar(Marca marca) { |
|||
MarcaDAO marcaDAO = new MarcaDAO(); |
|||
Marca existe = marcaDAO.buscarPorId(marca); |
|||
if(existe==null && existe.getStatus()==0){ |
|||
return Mensajes.ELEMENTO_NO_ENCONTRADO; |
|||
|
|||
|
|||
} |
|||
else{ |
|||
marcaDAO.eliminar(marca); |
|||
return Mensajes.SIN_ERROR; |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public Mensajes Editar(Marca marca) { |
|||
System.out.println("Llegaste al metodo de editar"); |
|||
MarcaDAO marcaDAO = new MarcaDAO(); |
|||
Marca existe = marcaDAO.buscarPorId(marca); |
|||
if(existe==null && existe.getStatus()==0){ |
|||
return Mensajes.ELEMENTO_NO_ENCONTRADO; |
|||
|
|||
}else{ |
|||
marcaDAO.editar(marca); |
|||
return Mensajes.SIN_ERROR; |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public Marca buscarId(Marca marca) { |
|||
MarcaDAO marcaDAO = new MarcaDAO(); |
|||
if(marcaDAO==null){ |
|||
return null; |
|||
}else{ |
|||
return marcaDAO.buscarPorId(marca); |
|||
} |
|||
} |
|||
public List<Marca> getAll (){ |
|||
MarcaDAO marcaDAO = new MarcaDAO(); |
|||
return marcaDAO.getTodos(true); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/SessionLocal.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import java.util.List; |
|||
import javax.ejb.Local; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Marca; |
|||
import mx.edu.tsj.chapala.sistemas.jin.msg.Mensajes; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Local |
|||
public interface MarcaBLLocal { |
|||
|
|||
Mensajes Agregar(Marca marca); |
|||
|
|||
Mensajes Eliminar(Marca marca); |
|||
|
|||
Mensajes Editar(Marca marca); |
|||
|
|||
Marca buscarId(Marca marca); |
|||
|
|||
List<Marca> getAll(); |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,81 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/StatelessEjbClass.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import javax.ejb.Stateless; |
|||
import mx.edu.tsj.chapala.sistemas.jin.dao.ProductosDAO; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Producto; |
|||
import mx.edu.tsj.chapala.sistemas.jin.msg.Mensajes; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
@Stateless |
|||
public class ProductoBL implements ProductoBLLocal { |
|||
|
|||
// Add business logic below. (Right-click in editor and choose
|
|||
// "Insert Code > Add Business Method
|
|||
|
|||
@Override |
|||
public Mensajes agregar(Producto producto) { |
|||
ProductosDAO pd = new ProductosDAO(); |
|||
if(pd.agregar(producto)){ |
|||
return Mensajes.SIN_ERROR; |
|||
}else{ |
|||
return Mensajes.NO_SE_AGREGO_EL_ELEMENTO; |
|||
} |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public Producto buscarPorId(Producto producto) { |
|||
ProductosDAO pd = new ProductosDAO(); |
|||
if(pd == null){ |
|||
return null; |
|||
}else{ |
|||
return pd.buscarPorId(producto); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public Mensajes eliminar(Producto producto) { |
|||
ProductosDAO pd = new ProductosDAO(); |
|||
if(pd.eliminar(producto)==true){ |
|||
return Mensajes.SIN_ERROR; |
|||
}else{ |
|||
return Mensajes.ELEMENTO_NO_ENCONTRADO; |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
@Override |
|||
public Mensajes editar(Producto producto) { |
|||
ProductosDAO pd = new ProductosDAO(); |
|||
if(pd.buscarPorId(producto)==null && producto.getStatus()==0){ |
|||
System.out.println("No editado"); |
|||
return Mensajes.ELEMENTO_NO_ENCONTRADO; |
|||
}else{ |
|||
pd.editar(producto); |
|||
System.out.println("Si cayo aqui"); |
|||
|
|||
return Mensajes.ELEMENTO_MODIFICADO; |
|||
|
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public List<Producto> getAll() { |
|||
ProductosDAO pd = new ProductosDAO(); |
|||
return pd.getAll(true); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/SessionLocal.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import java.util.List; |
|||
import javax.ejb.Local; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Producto; |
|||
import mx.edu.tsj.chapala.sistemas.jin.msg.Mensajes; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
@Local |
|||
public interface ProductoBLLocal { |
|||
|
|||
Mensajes agregar(Producto producto); |
|||
|
|||
Producto buscarPorId(Producto producto); |
|||
|
|||
Mensajes eliminar(Producto producto); |
|||
|
|||
Mensajes editar(Producto producto); |
|||
|
|||
List<Producto> getAll(); |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,94 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/StatelessEjbClass.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import java.util.List; |
|||
import javax.ejb.Stateless; |
|||
import mx.edu.tsj.chapala.sistemas.jin.dao.ProveedoresDAO; |
|||
|
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Proovedor; |
|||
import mx.edu.tsj.chapala.sistemas.jin.msg.Mensajes; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Stateless |
|||
public class ProveedorBL implements ProveedorBLLocal { |
|||
|
|||
// Add business logic below. (Right-click in editor and choose
|
|||
// "Insert Code > Add Business Method")
|
|||
|
|||
public Mensajes Agregar(Proovedor proovedor) { |
|||
System.out.println("Llegaste al metodo de agregar"); |
|||
ProveedoresDAO proovedorDAO = new ProveedoresDAO (); |
|||
//TODO: agregar la logica
|
|||
if(proovedor.getDireccion().isEmpty()|| proovedor.getProovedor().isEmpty()){ |
|||
return Mensajes.CAMPOS_INCOMPLETOS; |
|||
} |
|||
else{ |
|||
proovedorDAO.agregar(proovedor); |
|||
return Mensajes.SIN_ERROR; |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
// Add business logic below. (Right-click in editor and choose
|
|||
// "Insert Code > Add Business Method")
|
|||
|
|||
|
|||
public Mensajes Eliminar(Proovedor proovedor) { |
|||
ProveedoresDAO proovedorDAO = new ProveedoresDAO(); |
|||
Proovedor existe = proovedorDAO.buscarPorId(proovedor); |
|||
if(existe==null && existe.getStatus()==0){ |
|||
return Mensajes.ELEMENTO_NO_ENCONTRADO; |
|||
|
|||
|
|||
} |
|||
else{ |
|||
proovedorDAO.eliminar(proovedor); |
|||
return Mensajes.SIN_ERROR; |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
public Mensajes Editar(Proovedor proovedor) { |
|||
System.out.println("Llegaste al metodo de editar"); |
|||
ProveedoresDAO proovedorDAO = new ProveedoresDAO(); |
|||
Proovedor existe = proovedorDAO.buscarPorId(proovedor); |
|||
if(existe==null && existe.getStatus()==0){ |
|||
return Mensajes.ELEMENTO_NO_ENCONTRADO; |
|||
|
|||
}else{ |
|||
proovedorDAO.editar(proovedor); |
|||
return Mensajes.SIN_ERROR; |
|||
} |
|||
} |
|||
|
|||
|
|||
public Proovedor buscarId(Proovedor proovedor) { |
|||
ProveedoresDAO proovedorDAO = new ProveedoresDAO(); |
|||
if(proovedorDAO==null){ |
|||
return null; |
|||
}else{ |
|||
return proovedorDAO.buscarPorId(proovedor); |
|||
} |
|||
} |
|||
public List<Proovedor> getAll (){ |
|||
ProveedoresDAO proovedorDAO = new ProveedoresDAO(); |
|||
return proovedorDAO.getTodos(true); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,32 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/SessionLocal.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import java.util.List; |
|||
import javax.ejb.Local; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Proovedor; |
|||
import mx.edu.tsj.chapala.sistemas.jin.msg.Mensajes; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Local |
|||
public interface ProveedorBLLocal { |
|||
Mensajes Agregar(Proovedor proovedor); |
|||
|
|||
Mensajes Eliminar(Proovedor proovedor); |
|||
|
|||
Mensajes Editar(Proovedor proovedor); |
|||
|
|||
Proovedor buscarId(Proovedor proovedor); |
|||
|
|||
List <Proovedor> getAll(); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,79 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/StatelessEjbClass.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import java.util.List; |
|||
import javax.ejb.Stateless; |
|||
import mx.edu.tsj.chapala.sistemas.jin.dao.RolDAO; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Rol; |
|||
import mx.edu.tsj.chapala.sistemas.jin.msg.Mensajes; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Stateless |
|||
public class RolBL implements RolBLLocal { |
|||
public Mensajes Agregar(Rol rol) { |
|||
System.out.println("Llegaste al metodo de agregar"); |
|||
RolDAO rolDAO = new RolDAO (); |
|||
//TODO: agregar la logica
|
|||
if(rol.getNombreRol().isEmpty()||rol.getDescripcion().isEmpty()){ |
|||
return Mensajes.CAMPOS_INCOMPLETOS; |
|||
} |
|||
else{ |
|||
rolDAO.agregar(rol); |
|||
return Mensajes.SIN_ERROR; |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
// Add business logic below. (Right-click in editor and choose
|
|||
// "Insert Code > Add Business Method")
|
|||
|
|||
|
|||
|
|||
|
|||
public Mensajes Editar(Rol rol) { |
|||
System.out.println("Llegaste al metodo de editar"); |
|||
RolDAO rolDAO = new RolDAO (); |
|||
Rol existe = rolDAO.buscarPorId(rol); |
|||
if(existe==null){ |
|||
return Mensajes.ELEMENTO_NO_ENCONTRADO; |
|||
|
|||
}else{ |
|||
rolDAO.editar(rol); |
|||
return Mensajes.SIN_ERROR; |
|||
} |
|||
} |
|||
|
|||
|
|||
public Rol buscarId(Rol rol) { |
|||
RolDAO rolDAO = new RolDAO (); |
|||
if(rolDAO==null){ |
|||
return null; |
|||
}else{ |
|||
return rolDAO.buscarPorId(rol); |
|||
} |
|||
} |
|||
@Override |
|||
public List<Rol> getAll (){ |
|||
RolDAO rolDAO = new RolDAO (); |
|||
return rolDAO.getTodos(); |
|||
|
|||
} |
|||
/* |
|||
public List<Usuarios> getAll (boolean status){ |
|||
RolDAO rolDAO = new RolDAO (); |
|||
return usuarioDAO.getTodos(status); |
|||
|
|||
} |
|||
*/ |
|||
|
|||
// Add business logic below. (Right-click in editor and choose
|
|||
// "Insert Code > Add Business Method")
|
|||
} |
@ -0,0 +1,24 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/SessionLocal.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import java.util.List; |
|||
import javax.ejb.Local; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Rol; |
|||
import mx.edu.tsj.chapala.sistemas.jin.msg.Mensajes; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Local |
|||
public interface RolBLLocal { |
|||
Mensajes Agregar(Rol rol); |
|||
|
|||
Mensajes Editar(Rol rol); |
|||
|
|||
Rol buscarId(Rol rol); |
|||
List <Rol> getAll(); |
|||
} |
@ -0,0 +1,115 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/StatelessEjbClass.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import java.util.List; |
|||
import javax.ejb.Stateless; |
|||
import mx.edu.tsj.chapala.sistemas.jin.dao.UbicacionDAO; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Ubicacion; |
|||
import mx.edu.tsj.chapala.sistemas.jin.msg.Mensajes; |
|||
|
|||
/** |
|||
* |
|||
* @author noemi |
|||
*/ |
|||
@Stateless |
|||
public class UbicacionBL implements UbicacionBLLocal { |
|||
|
|||
@Override |
|||
public Mensajes elimarId(Ubicacion ubicacion) { |
|||
UbicacionDAO u = new UbicacionDAO(); |
|||
Ubicacion existe = u.buscarPorId(ubicacion); |
|||
if(existe==null){ |
|||
return Mensajes.ELEMENTO_ENCONTRADO; |
|||
} |
|||
else{ |
|||
u.eliminar(ubicacion); |
|||
return Mensajes.SIN_ERROR; |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
// Add business logic below. (Right-click in editor and choose
|
|||
// "Insert Code > Add Business Method")
|
|||
|
|||
|
|||
@Override |
|||
public Ubicacion buscarPasilloAct(Ubicacion ubicacion) { |
|||
UbicacionDAO ubicacionDao = new UbicacionDAO(); |
|||
List<Ubicacion> ubicaciones = ubicacionDao.getPasilloActiv(ubicacion.getPasillo()); |
|||
|
|||
// Verificar si hay ubicaciones activas para el pasillo dado
|
|||
for (Ubicacion u : ubicaciones) { |
|||
if (u.getStatus() == 1) { |
|||
return u; // Devolver la primera ubicación activa encontrada
|
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
@Override |
|||
public Ubicacion buscarId(Ubicacion ubicacion) { |
|||
UbicacionDAO ubicacionDAO = new UbicacionDAO(); |
|||
if(ubicacionDAO==null){ |
|||
return null; |
|||
}else{ |
|||
return ubicacionDAO.buscarPorId(ubicacion); |
|||
} |
|||
} |
|||
public List<Ubicacion> getAll (boolean status){ |
|||
UbicacionDAO ubicacionDAO = new UbicacionDAO(); |
|||
return ubicacionDAO.getUbicaciones(status); |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public List<Ubicacion> getTodos() { |
|||
UbicacionDAO ubicacionDAO = new UbicacionDAO(); |
|||
return ubicacionDAO.getUbicaciones(true); |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public Mensajes editar(Ubicacion ubicacion) { |
|||
|
|||
UbicacionDAO ubicacionDAO = new UbicacionDAO(); |
|||
Ubicacion existe = ubicacionDAO.buscarPorId(ubicacion); |
|||
if(existe==null && existe.getStatus()==0){ |
|||
return Mensajes.ELEMENTO_NO_ENCONTRADO; |
|||
|
|||
}else{ |
|||
ubicacionDAO.editar(ubicacion); |
|||
return Mensajes.SIN_ERROR; |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
@Override |
|||
public Mensajes agregarUbic(Ubicacion ubicacion) { |
|||
System.out.println("Llegaste al método de agregar"); |
|||
UbicacionDAO ubicacionDao = new UbicacionDAO(); |
|||
|
|||
if (ubicacion.getPasillo().isEmpty() || ubicacion.getAnaquel().isEmpty() || ubicacion.getNivel().isEmpty()) { |
|||
return Mensajes.CAMPOS_INCOMPLETOS; |
|||
} |
|||
|
|||
ubicacionDao.agregar(ubicacion); |
|||
return Mensajes.SIN_ERROR; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/SessionLocal.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import java.util.List; |
|||
import javax.ejb.Local; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Ubicacion; |
|||
import mx.edu.tsj.chapala.sistemas.jin.msg.Mensajes; |
|||
|
|||
/** |
|||
* |
|||
* @author noemi |
|||
*/ |
|||
@Local |
|||
public interface UbicacionBLLocal { |
|||
|
|||
public Mensajes elimarId(Ubicacion ubicacion); |
|||
|
|||
Mensajes editar(Ubicacion Ubicacion); |
|||
|
|||
public Ubicacion buscarPasilloAct(Ubicacion ubicacion); |
|||
|
|||
public Ubicacion buscarId(Ubicacion ubicacion); |
|||
|
|||
public Mensajes agregarUbic(Ubicacion ubicacion); |
|||
|
|||
List<Ubicacion> getTodos(); |
|||
|
|||
} |
@ -0,0 +1,95 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/StatelessEjbClass.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import java.util.List; |
|||
import javax.ejb.Stateless; |
|||
import mx.edu.tsj.chapala.sistemas.jin.dao.UsuarioDAO; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Usuarios; |
|||
import mx.edu.tsj.chapala.sistemas.jin.msg.Mensajes; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Stateless |
|||
public class UsuariosBL implements UsuariosBLLocal { |
|||
|
|||
public Mensajes Agregar(Usuarios usuario) { |
|||
System.out.println("Llegaste al metodo de agregar"); |
|||
UsuarioDAO usuarioDAO = new UsuarioDAO (); |
|||
//TODO: agregar la logica
|
|||
if(usuario.getAmaterno().isEmpty()|| usuario.getApaterno().isEmpty() |
|||
||usuario.getDomicilio().isEmpty()||usuario.getNombre().isEmpty() |
|||
||usuario.getPassword().isEmpty()||usuario.getTiposangre().isEmpty() |
|||
||usuario.getUsuario().isEmpty()){ |
|||
return Mensajes.CAMPOS_INCOMPLETOS; |
|||
} |
|||
else{ |
|||
usuarioDAO.agregar(usuario); |
|||
return Mensajes.SIN_ERROR; |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
// Add business logic below. (Right-click in editor and choose
|
|||
// "Insert Code > Add Business Method")
|
|||
|
|||
|
|||
public Mensajes Eliminar(Usuarios usuario) { |
|||
UsuarioDAO usuarioDAO = new UsuarioDAO (); |
|||
Usuarios existe = usuarioDAO.buscarPorId(usuario); |
|||
if(existe==null ){ |
|||
return Mensajes.ELEMENTO_NO_ENCONTRADO; |
|||
|
|||
|
|||
} |
|||
else{ |
|||
usuarioDAO.eliminar(usuario); |
|||
return Mensajes.SIN_ERROR; |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
public Mensajes Editar(Usuarios usuario) { |
|||
System.out.println("Llegaste al metodo de editar"); |
|||
UsuarioDAO usuarioDAO = new UsuarioDAO (); |
|||
Usuarios existe = usuarioDAO.buscarPorId(usuario); |
|||
if(existe==null && existe.getStatus()==0){ |
|||
return Mensajes.ELEMENTO_NO_ENCONTRADO; |
|||
|
|||
}else{ |
|||
usuarioDAO.editar(usuario); |
|||
return Mensajes.SIN_ERROR; |
|||
} |
|||
} |
|||
|
|||
|
|||
public Usuarios buscarId(Usuarios usuario) { |
|||
UsuarioDAO usuarioDAO = new UsuarioDAO (); |
|||
if(usuarioDAO==null){ |
|||
return null; |
|||
}else{ |
|||
return usuarioDAO.buscarPorId(usuario); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public List<Usuarios> getAll (){ |
|||
UsuarioDAO usuarioDAO = new UsuarioDAO (); |
|||
return usuarioDAO.getTodos(true); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,28 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/SessionLocal.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import java.util.List; |
|||
import javax.ejb.Local; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Usuarios; |
|||
import mx.edu.tsj.chapala.sistemas.jin.msg.Mensajes; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Local |
|||
public interface UsuariosBLLocal { |
|||
Mensajes Agregar(Usuarios usuario); |
|||
|
|||
Mensajes Eliminar(Usuarios usuario); |
|||
|
|||
Mensajes Editar(Usuarios usuario); |
|||
|
|||
Usuarios buscarId(Usuarios usuario); |
|||
|
|||
List <Usuarios> getAll(); |
|||
|
|||
} |
@ -0,0 +1,49 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/StatelessEjbClass.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import javax.ejb.Stateless; |
|||
import mx.edu.tsj.chapala.sistemas.jin.dao.validarDAO; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Usuarios; |
|||
import mx.edu.tsj.chapala.sistemas.jin.msg.Mensajes; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
@Stateless |
|||
public class ValidarBL implements ValidarBLLocal { |
|||
|
|||
// Add business logic below. (Right-click in editor and choose
|
|||
// "Insert Code > Add Business Method")
|
|||
|
|||
public Usuarios validar(String usuario, String contrasena){ |
|||
validarDAO vDao = new validarDAO(); |
|||
if(usuario !=null && contrasena !=null ){ |
|||
if(vDao.buscarPorUsuario(usuario)!=null){ |
|||
if(vDao.validarUsuario(usuario, contrasena)!=null){ |
|||
return vDao.validarUsuario(usuario, contrasena); |
|||
}else{ |
|||
return null; |
|||
} |
|||
|
|||
}else{ |
|||
return null; |
|||
} |
|||
}else{ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/SessionLocal.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.bl; |
|||
|
|||
import javax.ejb.Local; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Usuarios; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
@Local |
|||
public interface ValidarBLLocal { |
|||
Usuarios validar(String usuario, String contrasena); |
|||
|
|||
} |
@ -0,0 +1,85 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.dao; |
|||
|
|||
import java.util.List; |
|||
import javax.persistence.EntityManager; |
|||
import javax.persistence.EntityManagerFactory; |
|||
import javax.persistence.Persistence; |
|||
import javax.persistence.Query; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Categoria; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
public class CategoriaDAO { |
|||
private EntityManager em; |
|||
|
|||
public CategoriaDAO(){ |
|||
EntityManagerFactory emf = Persistence.createEntityManagerFactory("InventarioJakartaJIN-ejbPU"); |
|||
em = emf.createEntityManager(); |
|||
} |
|||
|
|||
public void agregar(Categoria c){ |
|||
em.getTransaction().begin(); |
|||
em.persist(c); |
|||
em.getTransaction().commit(); |
|||
} |
|||
|
|||
public boolean editar(Categoria c){ |
|||
try { |
|||
em.getTransaction().begin(); |
|||
em.merge(c); |
|||
em.getTransaction().commit(); |
|||
return true; |
|||
} catch (Exception ex) { |
|||
if (em.getTransaction().isActive()) { |
|||
em.getTransaction().rollback(); |
|||
} |
|||
return false; |
|||
|
|||
} |
|||
} |
|||
|
|||
public void eliminar(Categoria c){ |
|||
em.getTransaction().begin(); |
|||
//em.remove(em.merge(m));
|
|||
c.setStatus((short)0); |
|||
em.merge(c); |
|||
em.getTransaction().commit(); |
|||
|
|||
} |
|||
|
|||
public Categoria buscarPorId(Categoria c){ |
|||
if (c == null || c.getIdCategoria() == null) { |
|||
return null; |
|||
} |
|||
Query q = em.createNamedQuery("Categoria.findByIdCategoria"); |
|||
q.setParameter("idCategoria", c.getIdCategoria()); |
|||
if(q.getResultList().isEmpty()){ |
|||
return null; |
|||
} else { |
|||
return (Categoria) q.getResultList().get(0); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
public List<Categoria> getTodos(boolean status){ |
|||
|
|||
Query q = em.createNamedQuery("Categoria.findByStatus"); |
|||
int s = status?1:0; |
|||
q.setParameter("status", s); |
|||
return q.getResultList(); |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,85 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.dao; |
|||
|
|||
import java.util.List; |
|||
import javax.persistence.EntityManager; |
|||
import javax.persistence.EntityManagerFactory; |
|||
import javax.persistence.Persistence; |
|||
import javax.persistence.Query; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Marca; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
public class MarcaDAO { |
|||
private EntityManager em; |
|||
|
|||
public MarcaDAO(){ |
|||
EntityManagerFactory emf = Persistence.createEntityManagerFactory("InventarioJakartaJIN-ejbPU"); |
|||
em = emf.createEntityManager(); |
|||
} |
|||
|
|||
public void agregar(Marca m){ |
|||
em.getTransaction().begin(); |
|||
em.persist(m); |
|||
em.getTransaction().commit(); |
|||
} |
|||
|
|||
public boolean editar(Marca m){ |
|||
try { |
|||
em.getTransaction().begin(); |
|||
em.merge(m); |
|||
em.getTransaction().commit(); |
|||
return true; |
|||
} catch (Exception ex) { |
|||
if (em.getTransaction().isActive()) { |
|||
em.getTransaction().rollback(); |
|||
} |
|||
return false; |
|||
|
|||
} |
|||
} |
|||
|
|||
public void eliminar(Marca m){ |
|||
em.getTransaction().begin(); |
|||
//em.remove(em.merge(m));
|
|||
m.setStatus((short)0); |
|||
em.merge(m); |
|||
em.getTransaction().commit(); |
|||
|
|||
} |
|||
|
|||
public Marca buscarPorId(Marca m){ |
|||
if (m == null || m.getIdMarca() == null) { |
|||
return null; |
|||
} |
|||
Query q = em.createNamedQuery("Marca.findByIdMarca"); |
|||
q.setParameter("idMarca", m.getIdMarca()); |
|||
if(q.getResultList().isEmpty()){ |
|||
return null; |
|||
} else { |
|||
return (Marca) q.getResultList().get(0); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
public List<Marca> getTodos(boolean status){ |
|||
|
|||
Query q = em.createNamedQuery("Marca.findByStatus"); |
|||
int s = status?1:0; |
|||
q.setParameter("status", s); |
|||
return q.getResultList(); |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,124 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.dao; |
|||
|
|||
import javax.persistence.EntityManager; |
|||
import javax.persistence.EntityManagerFactory; |
|||
import javax.persistence.Persistence; |
|||
import javax.persistence.Query; |
|||
import java.util.List; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Producto; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
public class ProductosDAO { |
|||
|
|||
private EntityManager em; |
|||
|
|||
public ProductosDAO(){ |
|||
EntityManagerFactory emf = Persistence.createEntityManagerFactory("InventarioJakartaJIN-ejbPU"); |
|||
em = emf.createEntityManager(); |
|||
} |
|||
|
|||
public boolean agregar(Producto p){ |
|||
try{ |
|||
em.getTransaction().begin(); |
|||
em.persist(p); |
|||
em.getTransaction().commit(); |
|||
return true; |
|||
} catch(Exception ex){ |
|||
if (em.getTransaction().isActive()) { |
|||
em.getTransaction().rollback(); |
|||
} |
|||
ex.printStackTrace(); |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
public boolean editar(Producto p){ |
|||
try { |
|||
em.getTransaction().begin(); |
|||
em.merge(p); |
|||
em.getTransaction().commit(); |
|||
System.out.println("editado"); |
|||
return true; |
|||
} catch (Exception ex) { |
|||
if (em.getTransaction().isActive()) { |
|||
em.getTransaction().rollback(); |
|||
} |
|||
return false; |
|||
|
|||
} |
|||
} |
|||
|
|||
public boolean eliminar(Producto p){ |
|||
try { |
|||
em.getTransaction().begin(); |
|||
|
|||
|
|||
Producto productoParaEliminar = em.find(Producto.class, p.getIdProducto()); |
|||
if (productoParaEliminar != null) { |
|||
productoParaEliminar.setStatus((short) 0); |
|||
em.merge(productoParaEliminar); |
|||
} else { |
|||
throw new IllegalArgumentException("El producto no existe"); |
|||
} |
|||
|
|||
em.getTransaction().commit(); |
|||
return true; |
|||
} catch (Exception ex) { |
|||
if (em.getTransaction().isActive()) { |
|||
em.getTransaction().rollback(); |
|||
} |
|||
ex.printStackTrace(); |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
public Producto buscarPorId(Producto p){ |
|||
if (p == null || p.getIdProducto() == null) { |
|||
return null; |
|||
} |
|||
Query q = em.createNamedQuery("Producto.findByIdProducto"); |
|||
q.setParameter("idProducto", p.getIdProducto()); |
|||
if(q.getResultList().isEmpty()){ |
|||
return null; |
|||
} else { |
|||
return (Producto) q.getResultList().get(0); |
|||
} |
|||
} |
|||
|
|||
public List<Producto> getAll(boolean status){ |
|||
Query q = em.createNamedQuery("Producto.findByStatus"); |
|||
int s = status?1:0; |
|||
q.setParameter("status", s); |
|||
return q.getResultList(); |
|||
|
|||
} |
|||
public List<Producto> getTodos(boolean status){ |
|||
|
|||
Query q = em.createNamedQuery("Proovedor.findAll"); |
|||
return q.getResultList(); |
|||
|
|||
|
|||
|
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,91 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.dao; |
|||
|
|||
import java.util.List; |
|||
import javax.persistence.EntityManager; |
|||
import javax.persistence.EntityManagerFactory; |
|||
import javax.persistence.Persistence; |
|||
import javax.persistence.Query; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Proovedor; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
public class ProveedoresDAO { |
|||
private EntityManager em; // Es un manejador de entidades
|
|||
|
|||
|
|||
public ProveedoresDAO(){ |
|||
EntityManagerFactory emf = Persistence.createEntityManagerFactory("InventarioJakartaJIN-ejbPU"); |
|||
em = emf.createEntityManager(); |
|||
} |
|||
public void agregar(Proovedor p){ |
|||
em.getTransaction().begin(); |
|||
em.persist(p); //Agrega en la BD
|
|||
em.getTransaction().commit(); |
|||
} |
|||
|
|||
public boolean editar(Proovedor p){ |
|||
try { |
|||
em.getTransaction().begin(); |
|||
em.merge(p); |
|||
em.getTransaction().commit(); |
|||
return true; |
|||
} catch (Exception ex) { |
|||
if (em.getTransaction().isActive()) { |
|||
em.getTransaction().rollback(); |
|||
} |
|||
return false; |
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
public void eliminar(Proovedor p){ |
|||
|
|||
em.getTransaction().begin(); |
|||
//em.remove(em.merge(m));
|
|||
p.setStatus((short)0); |
|||
em.merge(p); |
|||
em.getTransaction().commit(); |
|||
|
|||
|
|||
} |
|||
|
|||
public Proovedor buscarPorId( Proovedor p){ |
|||
if (p == null || p.getIdProovedor() == null) { |
|||
return null; |
|||
} |
|||
Query q = em.createNamedQuery("Proovedor.findByIdProovedor"); |
|||
q.setParameter("idProovedor", p.getIdProovedor()); |
|||
if(q.getResultList().isEmpty()){ |
|||
return null; |
|||
} else { |
|||
return (Proovedor) q.getResultList().get(0); |
|||
} |
|||
} |
|||
public List<Proovedor> getTodos(boolean status){ |
|||
|
|||
Query q = em.createNamedQuery("Proovedor.findByStatus"); |
|||
int s = status?1:0; |
|||
q.setParameter("status", s); |
|||
return q.getResultList(); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
} |
@ -0,0 +1,73 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.dao; |
|||
|
|||
import java.util.List; |
|||
import javax.persistence.EntityManager; |
|||
import javax.persistence.EntityManagerFactory; |
|||
import javax.persistence.Persistence; |
|||
import javax.persistence.Query; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Rol; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
public class RolDAO { |
|||
private EntityManager em; |
|||
|
|||
public RolDAO(){ |
|||
EntityManagerFactory emf = Persistence.createEntityManagerFactory("InventarioJakartaJIN-ejbPU"); |
|||
em = emf.createEntityManager(); |
|||
} |
|||
|
|||
public void agregar(Rol r){ |
|||
em.getTransaction().begin(); |
|||
em.persist(r); |
|||
em.getTransaction().commit(); |
|||
} |
|||
|
|||
public boolean editar(Rol r){ |
|||
try { |
|||
em.getTransaction().begin(); |
|||
em.merge(r); |
|||
em.getTransaction().commit(); |
|||
return true; |
|||
} catch (Exception ex) { |
|||
if (em.getTransaction().isActive()) { |
|||
em.getTransaction().rollback(); |
|||
} |
|||
return false; |
|||
|
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
public Rol buscarPorId( Rol r){ |
|||
if (r == null || r.getIdRol() == null) { |
|||
return null; |
|||
} |
|||
Query q = em.createNamedQuery("Rol.findByIdRol"); |
|||
q.setParameter("idRol", r.getIdRol()); |
|||
if(q.getResultList().isEmpty()){ |
|||
return null; |
|||
} else { |
|||
return (Rol) q.getResultList().get(0); |
|||
} |
|||
} |
|||
|
|||
public List<Rol> getTodos(){ |
|||
Query q = em.createNamedQuery("Rol.findAll"); |
|||
return q.getResultList(); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,111 @@ |
|||
package mx.edu.tsj.chapala.sistemas.jin.dao; |
|||
|
|||
import java.util.List; |
|||
import javax.persistence.EntityManager; |
|||
import javax.persistence.EntityManagerFactory; |
|||
import javax.persistence.Persistence; |
|||
import javax.persistence.Query; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Ubicacion; |
|||
|
|||
public class UbicacionDAO { |
|||
|
|||
private EntityManager em; // Manejador de entidades
|
|||
|
|||
public UbicacionDAO() { |
|||
EntityManagerFactory emf = Persistence.createEntityManagerFactory("InventarioJakartaJIN-ejbPU"); |
|||
em = emf.createEntityManager(); |
|||
} |
|||
|
|||
// Otros métodos de la clase
|
|||
public void editar(Ubicacion u) { |
|||
try { |
|||
em.getTransaction().begin(); |
|||
em.merge(u); |
|||
em.getTransaction().commit(); |
|||
} catch (Exception ex) { |
|||
if (em.getTransaction().isActive()) { |
|||
em.getTransaction().rollback(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
public void eliminar(Ubicacion u) { |
|||
em.getTransaction().begin(); |
|||
em.remove(em.merge(u)); // eliminar en la base de datos
|
|||
em.getTransaction().commit(); |
|||
} |
|||
|
|||
public Ubicacion buscarPorId(Ubicacion u) { |
|||
if (u == null || u.getIdUbicacion() == null) { |
|||
return null; |
|||
} |
|||
Query q = em.createNamedQuery("Ubicacion.findByIdUbicacion"); |
|||
q.setParameter("idUbicacion", u.getIdUbicacion()); |
|||
if (q.getResultList().isEmpty()) { |
|||
return null; |
|||
} else { |
|||
return (Ubicacion) q.getResultList().get(0); |
|||
} |
|||
} |
|||
|
|||
public void agregar(Ubicacion u) { |
|||
em.getTransaction().begin(); |
|||
|
|||
// Validación para asegurarse de que no haya una ubicación activa con los mismos valores en todos los campos
|
|||
List<Ubicacion> ubicacionesExistentes = buscarUbiCampos(u); |
|||
for (Ubicacion ubicacionExistente : ubicacionesExistentes) { |
|||
if (ubicacionExistente.getStatus() == 1) { // Solo verificamos ubicaciones activas
|
|||
throw new RuntimeException("Ya existe una ubicación activa con los mismos valores en todos los campos"); |
|||
} |
|||
} |
|||
|
|||
// Validación para asegurarse de que no haya una ubicación activa con el mismo nivel, anaquel y pasillo
|
|||
List<Ubicacion> ubicacionesMismoNivelAnaquelPasillo = buscarUbiAnaPas(u); |
|||
for (Ubicacion ubicacionExistente : ubicacionesMismoNivelAnaquelPasillo) { |
|||
if (ubicacionExistente.getStatus() == 1) { // Solo verificamos ubicaciones activas
|
|||
throw new RuntimeException("Ya existe una ubicación activa con el mismo nivel, anaquel y pasillo"); |
|||
} |
|||
} |
|||
|
|||
em.persist(u); |
|||
em.getTransaction().commit(); |
|||
// No cerramos EntityManager aquí
|
|||
} |
|||
|
|||
private List<Ubicacion> buscarUbiCampos(Ubicacion u) { |
|||
Query q = em.createQuery("SELECT u FROM Ubicacion u WHERE u.pasillo = :pasillo AND u.anaquel = :anaquel AND u.nivel <> :nivel"); |
|||
q.setParameter("pasillo", u.getPasillo()); |
|||
q.setParameter("anaquel", u.getAnaquel()); |
|||
q.setParameter("nivel", u.getNivel()); |
|||
return q.getResultList(); |
|||
} |
|||
|
|||
private List<Ubicacion> buscarUbiAnaPas(Ubicacion u) { |
|||
Query q = em.createQuery("SELECT u FROM Ubicacion u WHERE u.pasillo = :pasillo AND u.anaquel = :anaquel"); |
|||
q.setParameter("pasillo", u.getPasillo()); |
|||
q.setParameter("anaquel", u.getAnaquel()); |
|||
return q.getResultList(); |
|||
} |
|||
|
|||
public List<Ubicacion> getPasilloActiv(String pasilloA) { |
|||
Query q = em.createNamedQuery("Ubicacion.findByPasilloAndStatus"); |
|||
q.setParameter("pasillo", pasilloA); |
|||
q.setParameter("status", 1); |
|||
return q.getResultList(); |
|||
} |
|||
|
|||
public List<Ubicacion> getPasilloNoActivo(String pasilloN) { |
|||
Query q = em.createNamedQuery("Ubicacion.findByPasilloAndStatus"); |
|||
q.setParameter("pasillo", pasilloN); |
|||
q.setParameter("status", 0); |
|||
return q.getResultList(); |
|||
} |
|||
|
|||
public List<Ubicacion> getUbicaciones(boolean status) { |
|||
|
|||
Query q = em.createNamedQuery("Ubicacion.findByStatus"); |
|||
int s = status ? 1 : 0; |
|||
q.setParameter("status", s); |
|||
return q.getResultList(); |
|||
} |
|||
} |
@ -0,0 +1,91 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.dao; |
|||
|
|||
import java.util.List; |
|||
import javax.persistence.EntityManager; |
|||
import javax.persistence.EntityManagerFactory; |
|||
import javax.persistence.Persistence; |
|||
import javax.persistence.Query; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Usuarios; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
public class UsuarioDAO { |
|||
private EntityManager em; // Es un manejador de entidades
|
|||
|
|||
|
|||
public UsuarioDAO(){ |
|||
EntityManagerFactory emf = Persistence.createEntityManagerFactory("InventarioJakartaJIN-ejbPU"); |
|||
em = emf.createEntityManager(); |
|||
} |
|||
public void agregar(Usuarios u){ |
|||
em.getTransaction().begin(); |
|||
em.persist(u); //Agrega en la BD
|
|||
em.getTransaction().commit(); |
|||
} |
|||
|
|||
public boolean editar(Usuarios u){ |
|||
try { |
|||
em.getTransaction().begin(); |
|||
em.merge(u); |
|||
em.getTransaction().commit(); |
|||
return true; |
|||
} catch (Exception ex) { |
|||
if (em.getTransaction().isActive()) { |
|||
em.getTransaction().rollback(); |
|||
} |
|||
return false; |
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
public void eliminar(Usuarios u){ |
|||
|
|||
em.getTransaction().begin(); |
|||
//em.remove(em.merge(m));
|
|||
u.setStatus((short)0); |
|||
em.merge(u); |
|||
em.getTransaction().commit(); |
|||
|
|||
} |
|||
|
|||
public Usuarios buscarPorId( Usuarios u){ |
|||
if (u == null || u.getIdUsuarios() == null) { |
|||
return null; |
|||
} |
|||
Query q = em.createNamedQuery("Usuarios.findByIdUsuarios"); |
|||
q.setParameter("idUsuarios", u.getIdUsuarios()); |
|||
if(q.getResultList().isEmpty()){ |
|||
return null; |
|||
} else { |
|||
return (Usuarios) q.getResultList().get(0); |
|||
} |
|||
} |
|||
public List<Usuarios> getTodos(boolean status){ |
|||
|
|||
Query q = em.createNamedQuery("Usuarios.findByStatus"); |
|||
int s = status?1:0; |
|||
q.setParameter("status", s); |
|||
return q.getResultList(); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
|||
|
|||
|
@ -0,0 +1,58 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.dao; |
|||
|
|||
import javax.persistence.EntityManager; |
|||
import javax.persistence.EntityManagerFactory; |
|||
import javax.persistence.Persistence; |
|||
import javax.persistence.Query; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Usuarios; |
|||
|
|||
/* |
|||
* |
|||
* @author estra |
|||
*/ |
|||
public class validarDAO { |
|||
private EntityManager em; |
|||
|
|||
public validarDAO(){ |
|||
EntityManagerFactory emf = Persistence.createEntityManagerFactory("InventarioJakartaJIN-ejbPU"); |
|||
em = emf.createEntityManager(); |
|||
} |
|||
|
|||
|
|||
public Usuarios buscarPorUsuario(String u){ |
|||
if(u == null){ |
|||
return null; |
|||
} |
|||
Query q = em.createNamedQuery("Usuarios.findByUsuario"); |
|||
q.setParameter("usuario", u); |
|||
if(q.getResultList().isEmpty()){ |
|||
return null; |
|||
}else{ |
|||
return (Usuarios) q.getResultList().get(0); |
|||
} |
|||
} |
|||
|
|||
public Usuarios validarUsuario(String usuario, String password){ |
|||
if(usuario !=null && password !=null){ |
|||
Query q = em.createNamedQuery("Usuarios.findByUsuarioAndPassword"); |
|||
short s = 1; |
|||
q.setParameter("usuario", usuario); |
|||
q.setParameter("password",password); |
|||
q.setParameter("status", s); |
|||
if(!q.getResultList().isEmpty()){ |
|||
return (Usuarios) q.getResultList().get(0); |
|||
}else{ |
|||
return null; |
|||
} |
|||
} else{ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,128 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.modelo; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import javax.persistence.Basic; |
|||
import javax.persistence.CascadeType; |
|||
import javax.persistence.Column; |
|||
import javax.persistence.Entity; |
|||
import javax.persistence.GeneratedValue; |
|||
import javax.persistence.GenerationType; |
|||
import javax.persistence.Id; |
|||
import javax.persistence.NamedQueries; |
|||
import javax.persistence.NamedQuery; |
|||
import javax.persistence.OneToMany; |
|||
import javax.persistence.Table; |
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.Size; |
|||
import javax.xml.bind.annotation.XmlRootElement; |
|||
import javax.xml.bind.annotation.XmlTransient; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
@Entity |
|||
@Table(name = "categoria") |
|||
@XmlRootElement |
|||
@NamedQueries({ |
|||
@NamedQuery(name = "Categoria.findAll", query = "SELECT c FROM Categoria c"), |
|||
@NamedQuery(name = "Categoria.findByIdCategoria", query = "SELECT c FROM Categoria c WHERE c.idCategoria = :idCategoria"), |
|||
@NamedQuery(name = "Categoria.findByNombre", query = "SELECT c FROM Categoria c WHERE c.nombre = :nombre"), |
|||
@NamedQuery(name = "Categoria.findByStatus", query = "SELECT c FROM Categoria c WHERE c.status = :status")}) |
|||
public class Categoria implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
@Id |
|||
@GeneratedValue(strategy = GenerationType.IDENTITY) |
|||
@Basic(optional = false) |
|||
@Column(name = "idCategoria") |
|||
private Integer idCategoria; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 45) |
|||
@Column(name = "nombre") |
|||
private String nombre; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Column(name = "status") |
|||
private short status; |
|||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "categoriaidCategoria") |
|||
private List<Producto> productoList; |
|||
|
|||
public Categoria() { |
|||
} |
|||
|
|||
public Categoria(Integer idCategoria) { |
|||
this.idCategoria = idCategoria; |
|||
} |
|||
|
|||
public Categoria(Integer idCategoria, String nombre, short status) { |
|||
this.idCategoria = idCategoria; |
|||
this.nombre = nombre; |
|||
this.status = status; |
|||
} |
|||
|
|||
public Integer getIdCategoria() { |
|||
return idCategoria; |
|||
} |
|||
|
|||
public void setIdCategoria(Integer idCategoria) { |
|||
this.idCategoria = idCategoria; |
|||
} |
|||
|
|||
public String getNombre() { |
|||
return nombre; |
|||
} |
|||
|
|||
public void setNombre(String nombre) { |
|||
this.nombre = nombre; |
|||
} |
|||
|
|||
public short getStatus() { |
|||
return status; |
|||
} |
|||
|
|||
public void setStatus(short status) { |
|||
this.status = status; |
|||
} |
|||
|
|||
@XmlTransient |
|||
public List<Producto> getProductoList() { |
|||
return productoList; |
|||
} |
|||
|
|||
public void setProductoList(List<Producto> productoList) { |
|||
this.productoList = productoList; |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
int hash = 0; |
|||
hash += (idCategoria != null ? idCategoria.hashCode() : 0); |
|||
return hash; |
|||
} |
|||
|
|||
@Override |
|||
public boolean equals(Object object) { |
|||
// TODO: Warning - this method won't work in the case the id fields are not set
|
|||
if (!(object instanceof Categoria)) { |
|||
return false; |
|||
} |
|||
Categoria other = (Categoria) object; |
|||
if ((this.idCategoria == null && other.idCategoria != null) || (this.idCategoria != null && !this.idCategoria.equals(other.idCategoria))) { |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return "mx.edu.tsj.chapala.sistemas.jin.modelo.Categoria[ idCategoria=" + idCategoria + " ]"; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,128 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.modelo; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import javax.persistence.Basic; |
|||
import javax.persistence.Column; |
|||
import javax.persistence.Entity; |
|||
import javax.persistence.GeneratedValue; |
|||
import javax.persistence.GenerationType; |
|||
import javax.persistence.Id; |
|||
import javax.persistence.JoinColumn; |
|||
import javax.persistence.ManyToOne; |
|||
import javax.persistence.NamedQueries; |
|||
import javax.persistence.NamedQuery; |
|||
import javax.persistence.Table; |
|||
import javax.persistence.Temporal; |
|||
import javax.persistence.TemporalType; |
|||
import javax.validation.constraints.NotNull; |
|||
import javax.xml.bind.annotation.XmlRootElement; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Entity |
|||
@Table(name = "Entrada") |
|||
@XmlRootElement |
|||
@NamedQueries({ |
|||
@NamedQuery(name = "Entrada.findAll", query = "SELECT e FROM Entrada e"), |
|||
@NamedQuery(name = "Entrada.findByIdstock", query = "SELECT e FROM Entrada e WHERE e.idstock = :idstock"), |
|||
@NamedQuery(name = "Entrada.findByCantidadEntrada", query = "SELECT e FROM Entrada e WHERE e.cantidadEntrada = :cantidadEntrada"), |
|||
@NamedQuery(name = "Entrada.findByFecha", query = "SELECT e FROM Entrada e WHERE e.fecha = :fecha")}) |
|||
public class Entrada implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
@Id |
|||
@GeneratedValue(strategy = GenerationType.IDENTITY) |
|||
@Basic(optional = false) |
|||
@Column(name = "idstock") |
|||
private Integer idstock; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Column(name = "cantidadEntrada") |
|||
private int cantidadEntrada; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Column(name = "fecha") |
|||
@Temporal(TemporalType.TIMESTAMP) |
|||
private Date fecha; |
|||
@JoinColumn(name = "Producto_idProducto", referencedColumnName = "idProducto") |
|||
@ManyToOne(optional = false) |
|||
private Producto productoidProducto; |
|||
|
|||
public Entrada() { |
|||
} |
|||
|
|||
public Entrada(Integer idstock) { |
|||
this.idstock = idstock; |
|||
} |
|||
|
|||
public Entrada(Integer idstock, int cantidadEntrada, Date fecha) { |
|||
this.idstock = idstock; |
|||
this.cantidadEntrada = cantidadEntrada; |
|||
this.fecha = fecha; |
|||
} |
|||
|
|||
public Integer getIdstock() { |
|||
return idstock; |
|||
} |
|||
|
|||
public void setIdstock(Integer idstock) { |
|||
this.idstock = idstock; |
|||
} |
|||
|
|||
public int getCantidadEntrada() { |
|||
return cantidadEntrada; |
|||
} |
|||
|
|||
public void setCantidadEntrada(int cantidadEntrada) { |
|||
this.cantidadEntrada = cantidadEntrada; |
|||
} |
|||
|
|||
public Date getFecha() { |
|||
return fecha; |
|||
} |
|||
|
|||
public void setFecha(Date fecha) { |
|||
this.fecha = fecha; |
|||
} |
|||
|
|||
public Producto getProductoidProducto() { |
|||
return productoidProducto; |
|||
} |
|||
|
|||
public void setProductoidProducto(Producto productoidProducto) { |
|||
this.productoidProducto = productoidProducto; |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
int hash = 0; |
|||
hash += (idstock != null ? idstock.hashCode() : 0); |
|||
return hash; |
|||
} |
|||
|
|||
@Override |
|||
public boolean equals(Object object) { |
|||
// TODO: Warning - this method won't work in the case the id fields are not set
|
|||
if (!(object instanceof Entrada)) { |
|||
return false; |
|||
} |
|||
Entrada other = (Entrada) object; |
|||
if ((this.idstock == null && other.idstock != null) || (this.idstock != null && !this.idstock.equals(other.idstock))) { |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return "mx.edu.tsj.chapala.sistemas.jin.modelo.Entrada[ idstock=" + idstock + " ]"; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,128 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.modelo; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import javax.persistence.Basic; |
|||
import javax.persistence.CascadeType; |
|||
import javax.persistence.Column; |
|||
import javax.persistence.Entity; |
|||
import javax.persistence.GeneratedValue; |
|||
import javax.persistence.GenerationType; |
|||
import javax.persistence.Id; |
|||
import javax.persistence.NamedQueries; |
|||
import javax.persistence.NamedQuery; |
|||
import javax.persistence.OneToMany; |
|||
import javax.persistence.Table; |
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.Size; |
|||
import javax.xml.bind.annotation.XmlRootElement; |
|||
import javax.xml.bind.annotation.XmlTransient; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
@Entity |
|||
@Table(name = "marca") |
|||
@XmlRootElement |
|||
@NamedQueries({ |
|||
@NamedQuery(name = "Marca.findAll", query = "SELECT m FROM Marca m"), |
|||
@NamedQuery(name = "Marca.findByIdMarca", query = "SELECT m FROM Marca m WHERE m.idMarca = :idMarca"), |
|||
@NamedQuery(name = "Marca.findByNombre", query = "SELECT m FROM Marca m WHERE m.nombre = :nombre"), |
|||
@NamedQuery(name = "Marca.findByStatus", query = "SELECT m FROM Marca m WHERE m.status = :status")}) |
|||
public class Marca implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
@Id |
|||
@GeneratedValue(strategy = GenerationType.IDENTITY) |
|||
@Basic(optional = false) |
|||
@Column(name = "idMarca") |
|||
private Integer idMarca; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 45) |
|||
@Column(name = "nombre") |
|||
private String nombre; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Column(name = "status") |
|||
private short status; |
|||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "marcaidMarca") |
|||
private List<Producto> productoList; |
|||
|
|||
public Marca() { |
|||
} |
|||
|
|||
public Marca(Integer idMarca) { |
|||
this.idMarca = idMarca; |
|||
} |
|||
|
|||
public Marca(Integer idMarca, String nombre, short status) { |
|||
this.idMarca = idMarca; |
|||
this.nombre = nombre; |
|||
this.status = status; |
|||
} |
|||
|
|||
public Integer getIdMarca() { |
|||
return idMarca; |
|||
} |
|||
|
|||
public void setIdMarca(Integer idMarca) { |
|||
this.idMarca = idMarca; |
|||
} |
|||
|
|||
public String getNombre() { |
|||
return nombre; |
|||
} |
|||
|
|||
public void setNombre(String nombre) { |
|||
this.nombre = nombre; |
|||
} |
|||
|
|||
public short getStatus() { |
|||
return status; |
|||
} |
|||
|
|||
public void setStatus(short status) { |
|||
this.status = status; |
|||
} |
|||
|
|||
@XmlTransient |
|||
public List<Producto> getProductoList() { |
|||
return productoList; |
|||
} |
|||
|
|||
public void setProductoList(List<Producto> productoList) { |
|||
this.productoList = productoList; |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
int hash = 0; |
|||
hash += (idMarca != null ? idMarca.hashCode() : 0); |
|||
return hash; |
|||
} |
|||
|
|||
@Override |
|||
public boolean equals(Object object) { |
|||
// TODO: Warning - this method won't work in the case the id fields are not set
|
|||
if (!(object instanceof Marca)) { |
|||
return false; |
|||
} |
|||
Marca other = (Marca) object; |
|||
if ((this.idMarca == null && other.idMarca != null) || (this.idMarca != null && !this.idMarca.equals(other.idMarca))) { |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return "mx.edu.tsj.chapala.sistemas.jin.modelo.Marca[ idMarca=" + idMarca + " ]"; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,217 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.modelo; |
|||
|
|||
import java.io.Serializable; |
|||
import javax.persistence.Basic; |
|||
import javax.persistence.Column; |
|||
import javax.persistence.Entity; |
|||
import javax.persistence.GeneratedValue; |
|||
import javax.persistence.GenerationType; |
|||
import javax.persistence.Id; |
|||
import javax.persistence.JoinColumn; |
|||
import javax.persistence.ManyToOne; |
|||
import javax.persistence.NamedQueries; |
|||
import javax.persistence.NamedQuery; |
|||
import javax.persistence.Table; |
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.Size; |
|||
import javax.xml.bind.annotation.XmlRootElement; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
@Entity |
|||
@Table(name = "producto") |
|||
@XmlRootElement |
|||
@NamedQueries({ |
|||
@NamedQuery(name = "Producto.findAll", query = "SELECT p FROM Producto p"), |
|||
@NamedQuery(name = "Producto.findByIdProducto", query = "SELECT p FROM Producto p WHERE p.idProducto = :idProducto"), |
|||
@NamedQuery(name = "Producto.findByCodigo", query = "SELECT p FROM Producto p WHERE p.codigo = :codigo"), |
|||
@NamedQuery(name = "Producto.findByDescripcion", query = "SELECT p FROM Producto p WHERE p.descripcion = :descripcion"), |
|||
@NamedQuery(name = "Producto.findByPrecio", query = "SELECT p FROM Producto p WHERE p.precio = :precio"), |
|||
@NamedQuery(name = "Producto.findByCantidadTotal", query = "SELECT p FROM Producto p WHERE p.cantidadTotal = :cantidadTotal"), |
|||
@NamedQuery(name = "Producto.findByStatus", query = "SELECT p FROM Producto p WHERE p.status = :status"), |
|||
@NamedQuery(name = "Producto.findByNombre", query = "SELECT p FROM Producto p WHERE p.nombre = :nombre")}) |
|||
public class Producto implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
@Id |
|||
@GeneratedValue(strategy = GenerationType.IDENTITY) |
|||
@Basic(optional = false) |
|||
@Column(name = "idProducto") |
|||
private Integer idProducto; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 20) |
|||
@Column(name = "codigo") |
|||
private String codigo; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 45) |
|||
@Column(name = "descripcion") |
|||
private String descripcion; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Column(name = "precio") |
|||
private double precio; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Column(name = "cantidadTotal") |
|||
private int cantidadTotal; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Column(name = "status") |
|||
private short status; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 50) |
|||
@Column(name = "nombre") |
|||
private String nombre; |
|||
@JoinColumn(name = "Categoria_idCategoria", referencedColumnName = "idCategoria") |
|||
@ManyToOne(optional = false) |
|||
private Categoria categoriaidCategoria; |
|||
@JoinColumn(name = "Marca_idMarca", referencedColumnName = "idMarca") |
|||
@ManyToOne(optional = false) |
|||
private Marca marcaidMarca; |
|||
@JoinColumn(name = "Proovedor_idProovedor", referencedColumnName = "idProovedor") |
|||
@ManyToOne(optional = false) |
|||
private Proovedor proovedoridProovedor; |
|||
@JoinColumn(name = "Ubicacion_idUbicacion", referencedColumnName = "idUbicacion") |
|||
@ManyToOne(optional = false) |
|||
private Ubicacion ubicacionidUbicacion; |
|||
|
|||
public Producto() { |
|||
} |
|||
|
|||
public Producto(Integer idProducto) { |
|||
this.idProducto = idProducto; |
|||
} |
|||
|
|||
public Producto(Integer idProducto, String codigo, String descripcion, double precio, int cantidadTotal, short status, String nombre) { |
|||
this.idProducto = idProducto; |
|||
this.codigo = codigo; |
|||
this.descripcion = descripcion; |
|||
this.precio = precio; |
|||
this.cantidadTotal = cantidadTotal; |
|||
this.status = status; |
|||
this.nombre = nombre; |
|||
} |
|||
|
|||
public Integer getIdProducto() { |
|||
return idProducto; |
|||
} |
|||
|
|||
public void setIdProducto(Integer idProducto) { |
|||
this.idProducto = idProducto; |
|||
} |
|||
|
|||
public String getCodigo() { |
|||
return codigo; |
|||
} |
|||
|
|||
public void setCodigo(String codigo) { |
|||
this.codigo = codigo; |
|||
} |
|||
|
|||
public String getDescripcion() { |
|||
return descripcion; |
|||
} |
|||
|
|||
public void setDescripcion(String descripcion) { |
|||
this.descripcion = descripcion; |
|||
} |
|||
|
|||
public double getPrecio() { |
|||
return precio; |
|||
} |
|||
|
|||
public void setPrecio(double precio) { |
|||
this.precio = precio; |
|||
} |
|||
|
|||
public int getCantidadTotal() { |
|||
return cantidadTotal; |
|||
} |
|||
|
|||
public void setCantidadTotal(int cantidadTotal) { |
|||
this.cantidadTotal = cantidadTotal; |
|||
} |
|||
|
|||
public short getStatus() { |
|||
return status; |
|||
} |
|||
|
|||
public void setStatus(short status) { |
|||
this.status = status; |
|||
} |
|||
|
|||
public String getNombre() { |
|||
return nombre; |
|||
} |
|||
|
|||
public void setNombre(String nombre) { |
|||
this.nombre = nombre; |
|||
} |
|||
|
|||
public Categoria getCategoriaidCategoria() { |
|||
return categoriaidCategoria; |
|||
} |
|||
|
|||
public void setCategoriaidCategoria(Categoria categoriaidCategoria) { |
|||
this.categoriaidCategoria = categoriaidCategoria; |
|||
} |
|||
|
|||
public Marca getMarcaidMarca() { |
|||
return marcaidMarca; |
|||
} |
|||
|
|||
public void setMarcaidMarca(Marca marcaidMarca) { |
|||
this.marcaidMarca = marcaidMarca; |
|||
} |
|||
|
|||
public Proovedor getProovedoridProovedor() { |
|||
return proovedoridProovedor; |
|||
} |
|||
|
|||
public void setProovedoridProovedor(Proovedor proovedoridProovedor) { |
|||
this.proovedoridProovedor = proovedoridProovedor; |
|||
} |
|||
|
|||
public Ubicacion getUbicacionidUbicacion() { |
|||
return ubicacionidUbicacion; |
|||
} |
|||
|
|||
public void setUbicacionidUbicacion(Ubicacion ubicacionidUbicacion) { |
|||
this.ubicacionidUbicacion = ubicacionidUbicacion; |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
int hash = 0; |
|||
hash += (idProducto != null ? idProducto.hashCode() : 0); |
|||
return hash; |
|||
} |
|||
|
|||
@Override |
|||
public boolean equals(Object object) { |
|||
// TODO: Warning - this method won't work in the case the id fields are not set
|
|||
if (!(object instanceof Producto)) { |
|||
return false; |
|||
} |
|||
Producto other = (Producto) object; |
|||
if ((this.idProducto == null && other.idProducto != null) || (this.idProducto != null && !this.idProducto.equals(other.idProducto))) { |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return "mx.edu.tsj.chapala.sistemas.jin.modelo.Producto[ idProducto=" + idProducto + " ]"; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,187 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.modelo; |
|||
|
|||
import java.io.Serializable; |
|||
import javax.persistence.Basic; |
|||
import javax.persistence.Column; |
|||
import javax.persistence.Entity; |
|||
import javax.persistence.GeneratedValue; |
|||
import javax.persistence.GenerationType; |
|||
import javax.persistence.Id; |
|||
import javax.persistence.NamedQueries; |
|||
import javax.persistence.NamedQuery; |
|||
import javax.persistence.Table; |
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.Size; |
|||
import javax.xml.bind.annotation.XmlRootElement; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Entity |
|||
@Table(name = "proovedor") |
|||
@XmlRootElement |
|||
@NamedQueries({ |
|||
@NamedQuery(name = "Proovedor.findAll", query = "SELECT p FROM Proovedor p"), |
|||
@NamedQuery(name = "Proovedor.findByIdProovedor", query = "SELECT p FROM Proovedor p WHERE p.idProovedor = :idProovedor"), |
|||
@NamedQuery(name = "Proovedor.findByProovedor", query = "SELECT p FROM Proovedor p WHERE p.proovedor = :proovedor"), |
|||
@NamedQuery(name = "Proovedor.findByTelefono", query = "SELECT p FROM Proovedor p WHERE p.telefono = :telefono"), |
|||
@NamedQuery(name = "Proovedor.findByDireccion", query = "SELECT p FROM Proovedor p WHERE p.direccion = :direccion"), |
|||
@NamedQuery(name = "Proovedor.findByStatus", query = "SELECT p FROM Proovedor p WHERE p.status = :status"), |
|||
@NamedQuery(name = "Proovedor.findByPais", query = "SELECT p FROM Proovedor p WHERE p.pais = :pais"), |
|||
@NamedQuery(name = "Proovedor.findByCiudad", query = "SELECT p FROM Proovedor p WHERE p.ciudad = :ciudad"), |
|||
@NamedQuery(name = "Proovedor.findByCodigoPostal", query = "SELECT p FROM Proovedor p WHERE p.codigoPostal = :codigoPostal")}) |
|||
public class Proovedor implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
@Id |
|||
@GeneratedValue(strategy = GenerationType.IDENTITY) |
|||
@Basic(optional = false) |
|||
@Column(name = "idProovedor") |
|||
private Integer idProovedor; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 45) |
|||
@Column(name = "proovedor") |
|||
private String proovedor; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 30) |
|||
@Column(name = "telefono") |
|||
private String telefono; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 45) |
|||
@Column(name = "direccion") |
|||
private String direccion; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Column(name = "status") |
|||
private short status; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 45) |
|||
@Column(name = "pais") |
|||
private String pais; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 45) |
|||
@Column(name = "ciudad") |
|||
private String ciudad; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Column(name = "codigo_postal") |
|||
private int codigoPostal; |
|||
|
|||
public Proovedor() { |
|||
} |
|||
|
|||
public Proovedor(Integer idProovedor) { |
|||
this.idProovedor = idProovedor; |
|||
} |
|||
|
|||
public Proovedor(Integer idProovedor, String proovedor, String telefono, String direccion, short status, String pais, String ciudad, int codigoPostal) { |
|||
this.idProovedor = idProovedor; |
|||
this.proovedor = proovedor; |
|||
this.telefono = telefono; |
|||
this.direccion = direccion; |
|||
this.status = status; |
|||
this.pais = pais; |
|||
this.ciudad = ciudad; |
|||
this.codigoPostal = codigoPostal; |
|||
} |
|||
|
|||
public Integer getIdProovedor() { |
|||
return idProovedor; |
|||
} |
|||
|
|||
public void setIdProovedor(Integer idProovedor) { |
|||
this.idProovedor = idProovedor; |
|||
} |
|||
|
|||
public String getProovedor() { |
|||
return proovedor; |
|||
} |
|||
|
|||
public void setProovedor(String proovedor) { |
|||
this.proovedor = proovedor; |
|||
} |
|||
|
|||
public String getTelefono() { |
|||
return telefono; |
|||
} |
|||
|
|||
public void setTelefono(String telefono) { |
|||
this.telefono = telefono; |
|||
} |
|||
|
|||
public String getDireccion() { |
|||
return direccion; |
|||
} |
|||
|
|||
public void setDireccion(String direccion) { |
|||
this.direccion = direccion; |
|||
} |
|||
|
|||
public short getStatus() { |
|||
return status; |
|||
} |
|||
|
|||
public void setStatus(short status) { |
|||
this.status = status; |
|||
} |
|||
|
|||
public String getPais() { |
|||
return pais; |
|||
} |
|||
|
|||
public void setPais(String pais) { |
|||
this.pais = pais; |
|||
} |
|||
|
|||
public String getCiudad() { |
|||
return ciudad; |
|||
} |
|||
|
|||
public void setCiudad(String ciudad) { |
|||
this.ciudad = ciudad; |
|||
} |
|||
|
|||
public int getCodigoPostal() { |
|||
return codigoPostal; |
|||
} |
|||
|
|||
public void setCodigoPostal(int codigoPostal) { |
|||
this.codigoPostal = codigoPostal; |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
int hash = 0; |
|||
hash += (idProovedor != null ? idProovedor.hashCode() : 0); |
|||
return hash; |
|||
} |
|||
|
|||
@Override |
|||
public boolean equals(Object object) { |
|||
// TODO: Warning - this method won't work in the case the id fields are not set
|
|||
if (!(object instanceof Proovedor)) { |
|||
return false; |
|||
} |
|||
Proovedor other = (Proovedor) object; |
|||
if ((this.idProovedor == null && other.idProovedor != null) || (this.idProovedor != null && !this.idProovedor.equals(other.idProovedor))) { |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return "mx.edu.tsj.chapala.sistemas.jin.modelo.Proovedor[ idProovedor=" + idProovedor + " ]"; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,102 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.modelo; |
|||
|
|||
import java.io.Serializable; |
|||
import javax.persistence.Basic; |
|||
import javax.persistence.Column; |
|||
import javax.persistence.Entity; |
|||
import javax.persistence.GeneratedValue; |
|||
import javax.persistence.GenerationType; |
|||
import javax.persistence.Id; |
|||
import javax.persistence.JoinColumn; |
|||
import javax.persistence.ManyToOne; |
|||
import javax.persistence.NamedQueries; |
|||
import javax.persistence.NamedQuery; |
|||
import javax.persistence.Table; |
|||
import javax.xml.bind.annotation.XmlRootElement; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Entity |
|||
@Table(name = "Resguardo") |
|||
@XmlRootElement |
|||
@NamedQueries({ |
|||
@NamedQuery(name = "Resguardo.findAll", query = "SELECT r FROM Resguardo r"), |
|||
@NamedQuery(name = "Resguardo.findByIdResguardo", query = "SELECT r FROM Resguardo r WHERE r.idResguardo = :idResguardo")}) |
|||
public class Resguardo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
@Id |
|||
@GeneratedValue(strategy = GenerationType.IDENTITY) |
|||
@Basic(optional = false) |
|||
@Column(name = "idResguardo") |
|||
private Integer idResguardo; |
|||
@JoinColumn(name = "Producto_idProducto", referencedColumnName = "idProducto") |
|||
@ManyToOne(optional = false) |
|||
private Producto productoidProducto; |
|||
@JoinColumn(name = "Usuarios_idUsuarios", referencedColumnName = "idUsuarios") |
|||
@ManyToOne(optional = false) |
|||
private Usuarios usuariosidUsuarios; |
|||
|
|||
public Resguardo() { |
|||
} |
|||
|
|||
public Resguardo(Integer idResguardo) { |
|||
this.idResguardo = idResguardo; |
|||
} |
|||
|
|||
public Integer getIdResguardo() { |
|||
return idResguardo; |
|||
} |
|||
|
|||
public void setIdResguardo(Integer idResguardo) { |
|||
this.idResguardo = idResguardo; |
|||
} |
|||
|
|||
public Producto getProductoidProducto() { |
|||
return productoidProducto; |
|||
} |
|||
|
|||
public void setProductoidProducto(Producto productoidProducto) { |
|||
this.productoidProducto = productoidProducto; |
|||
} |
|||
|
|||
public Usuarios getUsuariosidUsuarios() { |
|||
return usuariosidUsuarios; |
|||
} |
|||
|
|||
public void setUsuariosidUsuarios(Usuarios usuariosidUsuarios) { |
|||
this.usuariosidUsuarios = usuariosidUsuarios; |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
int hash = 0; |
|||
hash += (idResguardo != null ? idResguardo.hashCode() : 0); |
|||
return hash; |
|||
} |
|||
|
|||
@Override |
|||
public boolean equals(Object object) { |
|||
// TODO: Warning - this method won't work in the case the id fields are not set
|
|||
if (!(object instanceof Resguardo)) { |
|||
return false; |
|||
} |
|||
Resguardo other = (Resguardo) object; |
|||
if ((this.idResguardo == null && other.idResguardo != null) || (this.idResguardo != null && !this.idResguardo.equals(other.idResguardo))) { |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return "mx.edu.tsj.chapala.sistemas.jin.modelo.Resguardo[ idResguardo=" + idResguardo + " ]"; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,129 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.modelo; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import javax.persistence.Basic; |
|||
import javax.persistence.CascadeType; |
|||
import javax.persistence.Column; |
|||
import javax.persistence.Entity; |
|||
import javax.persistence.GeneratedValue; |
|||
import javax.persistence.GenerationType; |
|||
import javax.persistence.Id; |
|||
import javax.persistence.NamedQueries; |
|||
import javax.persistence.NamedQuery; |
|||
import javax.persistence.OneToMany; |
|||
import javax.persistence.Table; |
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.Size; |
|||
import javax.xml.bind.annotation.XmlRootElement; |
|||
import javax.xml.bind.annotation.XmlTransient; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Entity |
|||
@Table(name = "Rol") |
|||
@XmlRootElement |
|||
@NamedQueries({ |
|||
@NamedQuery(name = "Rol.findAll", query = "SELECT r FROM Rol r"), |
|||
@NamedQuery(name = "Rol.findByIdRol", query = "SELECT r FROM Rol r WHERE r.idRol = :idRol"), |
|||
@NamedQuery(name = "Rol.findByNombreRol", query = "SELECT r FROM Rol r WHERE r.nombreRol = :nombreRol"), |
|||
@NamedQuery(name = "Rol.findByDescripcion", query = "SELECT r FROM Rol r WHERE r.descripcion = :descripcion")}) |
|||
public class Rol implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
@Id |
|||
@GeneratedValue(strategy = GenerationType.IDENTITY) |
|||
@Basic(optional = false) |
|||
@Column(name = "idRol") |
|||
private Integer idRol; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 45) |
|||
@Column(name = "nombreRol") |
|||
private String nombreRol; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 45) |
|||
@Column(name = "descripcion") |
|||
private String descripcion; |
|||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "rolidRol") |
|||
private List<Usuarios> usuariosList; |
|||
|
|||
public Rol() { |
|||
} |
|||
|
|||
public Rol(Integer idRol) { |
|||
this.idRol = idRol; |
|||
} |
|||
|
|||
public Rol(Integer idRol, String nombreRol, String descripcion) { |
|||
this.idRol = idRol; |
|||
this.nombreRol = nombreRol; |
|||
this.descripcion = descripcion; |
|||
} |
|||
|
|||
public Integer getIdRol() { |
|||
return idRol; |
|||
} |
|||
|
|||
public void setIdRol(Integer idRol) { |
|||
this.idRol = idRol; |
|||
} |
|||
|
|||
public String getNombreRol() { |
|||
return nombreRol; |
|||
} |
|||
|
|||
public void setNombreRol(String nombreRol) { |
|||
this.nombreRol = nombreRol; |
|||
} |
|||
|
|||
public String getDescripcion() { |
|||
return descripcion; |
|||
} |
|||
|
|||
public void setDescripcion(String descripcion) { |
|||
this.descripcion = descripcion; |
|||
} |
|||
|
|||
@XmlTransient |
|||
public List<Usuarios> getUsuariosList() { |
|||
return usuariosList; |
|||
} |
|||
|
|||
public void setUsuariosList(List<Usuarios> usuariosList) { |
|||
this.usuariosList = usuariosList; |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
int hash = 0; |
|||
hash += (idRol != null ? idRol.hashCode() : 0); |
|||
return hash; |
|||
} |
|||
|
|||
@Override |
|||
public boolean equals(Object object) { |
|||
// TODO: Warning - this method won't work in the case the id fields are not set
|
|||
if (!(object instanceof Rol)) { |
|||
return false; |
|||
} |
|||
Rol other = (Rol) object; |
|||
if ((this.idRol == null && other.idRol != null) || (this.idRol != null && !this.idRol.equals(other.idRol))) { |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return "mx.edu.tsj.chapala.sistemas.jin.modelo.Rol[ idRol=" + idRol + " ]"; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,128 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.modelo; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import javax.persistence.Basic; |
|||
import javax.persistence.Column; |
|||
import javax.persistence.Entity; |
|||
import javax.persistence.GeneratedValue; |
|||
import javax.persistence.GenerationType; |
|||
import javax.persistence.Id; |
|||
import javax.persistence.JoinColumn; |
|||
import javax.persistence.ManyToOne; |
|||
import javax.persistence.NamedQueries; |
|||
import javax.persistence.NamedQuery; |
|||
import javax.persistence.Table; |
|||
import javax.persistence.Temporal; |
|||
import javax.persistence.TemporalType; |
|||
import javax.validation.constraints.NotNull; |
|||
import javax.xml.bind.annotation.XmlRootElement; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Entity |
|||
@Table(name = "Salidas") |
|||
@XmlRootElement |
|||
@NamedQueries({ |
|||
@NamedQuery(name = "Salidas.findAll", query = "SELECT s FROM Salidas s"), |
|||
@NamedQuery(name = "Salidas.findByIdsalida", query = "SELECT s FROM Salidas s WHERE s.idsalida = :idsalida"), |
|||
@NamedQuery(name = "Salidas.findByCantidadSalida", query = "SELECT s FROM Salidas s WHERE s.cantidadSalida = :cantidadSalida"), |
|||
@NamedQuery(name = "Salidas.findByFecha", query = "SELECT s FROM Salidas s WHERE s.fecha = :fecha")}) |
|||
public class Salidas implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
@Id |
|||
@GeneratedValue(strategy = GenerationType.IDENTITY) |
|||
@Basic(optional = false) |
|||
@Column(name = "idsalida") |
|||
private Integer idsalida; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Column(name = "cantidadSalida") |
|||
private int cantidadSalida; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Column(name = "fecha") |
|||
@Temporal(TemporalType.TIMESTAMP) |
|||
private Date fecha; |
|||
@JoinColumn(name = "Producto_idProducto", referencedColumnName = "idProducto") |
|||
@ManyToOne(optional = false) |
|||
private Producto productoidProducto; |
|||
|
|||
public Salidas() { |
|||
} |
|||
|
|||
public Salidas(Integer idsalida) { |
|||
this.idsalida = idsalida; |
|||
} |
|||
|
|||
public Salidas(Integer idsalida, int cantidadSalida, Date fecha) { |
|||
this.idsalida = idsalida; |
|||
this.cantidadSalida = cantidadSalida; |
|||
this.fecha = fecha; |
|||
} |
|||
|
|||
public Integer getIdsalida() { |
|||
return idsalida; |
|||
} |
|||
|
|||
public void setIdsalida(Integer idsalida) { |
|||
this.idsalida = idsalida; |
|||
} |
|||
|
|||
public int getCantidadSalida() { |
|||
return cantidadSalida; |
|||
} |
|||
|
|||
public void setCantidadSalida(int cantidadSalida) { |
|||
this.cantidadSalida = cantidadSalida; |
|||
} |
|||
|
|||
public Date getFecha() { |
|||
return fecha; |
|||
} |
|||
|
|||
public void setFecha(Date fecha) { |
|||
this.fecha = fecha; |
|||
} |
|||
|
|||
public Producto getProductoidProducto() { |
|||
return productoidProducto; |
|||
} |
|||
|
|||
public void setProductoidProducto(Producto productoidProducto) { |
|||
this.productoidProducto = productoidProducto; |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
int hash = 0; |
|||
hash += (idsalida != null ? idsalida.hashCode() : 0); |
|||
return hash; |
|||
} |
|||
|
|||
@Override |
|||
public boolean equals(Object object) { |
|||
// TODO: Warning - this method won't work in the case the id fields are not set
|
|||
if (!(object instanceof Salidas)) { |
|||
return false; |
|||
} |
|||
Salidas other = (Salidas) object; |
|||
if ((this.idsalida == null && other.idsalida != null) || (this.idsalida != null && !this.idsalida.equals(other.idsalida))) { |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return "mx.edu.tsj.chapala.sistemas.jin.modelo.Salidas[ idsalida=" + idsalida + " ]"; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,158 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.modelo; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import javax.persistence.Basic; |
|||
import javax.persistence.CascadeType; |
|||
import javax.persistence.Column; |
|||
import javax.persistence.Entity; |
|||
import javax.persistence.GeneratedValue; |
|||
import javax.persistence.GenerationType; |
|||
import javax.persistence.Id; |
|||
import javax.persistence.NamedQueries; |
|||
import javax.persistence.NamedQuery; |
|||
import javax.persistence.OneToMany; |
|||
import javax.persistence.Table; |
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.Size; |
|||
import javax.xml.bind.annotation.XmlRootElement; |
|||
import javax.xml.bind.annotation.XmlTransient; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
@Entity |
|||
@Table(name = "ubicacion") |
|||
@XmlRootElement |
|||
@NamedQueries({ |
|||
@NamedQuery(name = "Ubicacion.findAll", query = "SELECT u FROM Ubicacion u"), |
|||
@NamedQuery(name = "Ubicacion.findByIdUbicacion", query = "SELECT u FROM Ubicacion u WHERE u.idUbicacion = :idUbicacion"), |
|||
@NamedQuery(name = "Ubicacion.findByPasillo", query = "SELECT u FROM Ubicacion u WHERE u.pasillo = :pasillo"), |
|||
@NamedQuery(name = "Ubicacion.findByAnaquel", query = "SELECT u FROM Ubicacion u WHERE u.anaquel = :anaquel"), |
|||
@NamedQuery(name = "Ubicacion.findByNivel", query = "SELECT u FROM Ubicacion u WHERE u.nivel = :nivel"), |
|||
@NamedQuery(name = "Ubicacion.findByStatus", query = "SELECT u FROM Ubicacion u WHERE u.status = :status")}) |
|||
public class Ubicacion implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
@Id |
|||
@GeneratedValue(strategy = GenerationType.IDENTITY) |
|||
@Basic(optional = false) |
|||
@Column(name = "idUbicacion") |
|||
private Integer idUbicacion; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 45) |
|||
@Column(name = "pasillo") |
|||
private String pasillo; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 45) |
|||
@Column(name = "anaquel") |
|||
private String anaquel; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 45) |
|||
@Column(name = "nivel") |
|||
private String nivel; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Column(name = "status") |
|||
private short status; |
|||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "ubicacionidUbicacion") |
|||
private List<Producto> productoList; |
|||
|
|||
public Ubicacion() { |
|||
} |
|||
|
|||
public Ubicacion(Integer idUbicacion) { |
|||
this.idUbicacion = idUbicacion; |
|||
} |
|||
|
|||
public Ubicacion(Integer idUbicacion, String pasillo, String anaquel, String nivel, short status) { |
|||
this.idUbicacion = idUbicacion; |
|||
this.pasillo = pasillo; |
|||
this.anaquel = anaquel; |
|||
this.nivel = nivel; |
|||
this.status = status; |
|||
} |
|||
|
|||
public Integer getIdUbicacion() { |
|||
return idUbicacion; |
|||
} |
|||
|
|||
public void setIdUbicacion(Integer idUbicacion) { |
|||
this.idUbicacion = idUbicacion; |
|||
} |
|||
|
|||
public String getPasillo() { |
|||
return pasillo; |
|||
} |
|||
|
|||
public void setPasillo(String pasillo) { |
|||
this.pasillo = pasillo; |
|||
} |
|||
|
|||
public String getAnaquel() { |
|||
return anaquel; |
|||
} |
|||
|
|||
public void setAnaquel(String anaquel) { |
|||
this.anaquel = anaquel; |
|||
} |
|||
|
|||
public String getNivel() { |
|||
return nivel; |
|||
} |
|||
|
|||
public void setNivel(String nivel) { |
|||
this.nivel = nivel; |
|||
} |
|||
|
|||
public short getStatus() { |
|||
return status; |
|||
} |
|||
|
|||
public void setStatus(short status) { |
|||
this.status = status; |
|||
} |
|||
|
|||
@XmlTransient |
|||
public List<Producto> getProductoList() { |
|||
return productoList; |
|||
} |
|||
|
|||
public void setProductoList(List<Producto> productoList) { |
|||
this.productoList = productoList; |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
int hash = 0; |
|||
hash += (idUbicacion != null ? idUbicacion.hashCode() : 0); |
|||
return hash; |
|||
} |
|||
|
|||
@Override |
|||
public boolean equals(Object object) { |
|||
// TODO: Warning - this method won't work in the case the id fields are not set
|
|||
if (!(object instanceof Ubicacion)) { |
|||
return false; |
|||
} |
|||
Ubicacion other = (Ubicacion) object; |
|||
if ((this.idUbicacion == null && other.idUbicacion != null) || (this.idUbicacion != null && !this.idUbicacion.equals(other.idUbicacion))) { |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return "mx.edu.tsj.chapala.sistemas.jin.modelo.Ubicacion[ idUbicacion=" + idUbicacion + " ]"; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,249 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.modelo; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import javax.persistence.Basic; |
|||
import javax.persistence.Column; |
|||
import javax.persistence.Entity; |
|||
import javax.persistence.GeneratedValue; |
|||
import javax.persistence.GenerationType; |
|||
import javax.persistence.Id; |
|||
import javax.persistence.JoinColumn; |
|||
import javax.persistence.ManyToOne; |
|||
import javax.persistence.NamedQueries; |
|||
import javax.persistence.NamedQuery; |
|||
import javax.persistence.Table; |
|||
import javax.persistence.Temporal; |
|||
import javax.persistence.TemporalType; |
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.Size; |
|||
import javax.xml.bind.annotation.XmlRootElement; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Entity |
|||
@Table(name = "usuarios") |
|||
@XmlRootElement |
|||
@NamedQueries({ |
|||
@NamedQuery(name = "Usuarios.findAll", query = "SELECT u FROM Usuarios u"), |
|||
@NamedQuery(name = "Usuarios.findByIdUsuarios", query = "SELECT u FROM Usuarios u WHERE u.idUsuarios = :idUsuarios"), |
|||
@NamedQuery(name = "Usuarios.findByUsuario", query = "SELECT u FROM Usuarios u WHERE u.usuario = :usuario"), |
|||
@NamedQuery(name = "Usuarios.findByPassword", query = "SELECT u FROM Usuarios u WHERE u.password = :password"), |
|||
@NamedQuery(name = "Usuarios.findByNombre", query = "SELECT u FROM Usuarios u WHERE u.nombre = :nombre"), |
|||
@NamedQuery(name = "Usuarios.findByApaterno", query = "SELECT u FROM Usuarios u WHERE u.apaterno = :apaterno"), |
|||
@NamedQuery(name = "Usuarios.findByAmaterno", query = "SELECT u FROM Usuarios u WHERE u.amaterno = :amaterno"), |
|||
@NamedQuery(name = "Usuarios.findByDomicilio", query = "SELECT u FROM Usuarios u WHERE u.domicilio = :domicilio"), |
|||
@NamedQuery(name = "Usuarios.findByTelefono", query = "SELECT u FROM Usuarios u WHERE u.telefono = :telefono"), |
|||
@NamedQuery(name = "Usuarios.findByFechanacimiento", query = "SELECT u FROM Usuarios u WHERE u.fechanacimiento = :fechanacimiento"), |
|||
@NamedQuery(name = "Usuarios.findByTiposangre", query = "SELECT u FROM Usuarios u WHERE u.tiposangre = :tiposangre"), |
|||
@NamedQuery(name = "Usuarios.findByUsuarioAndPassword", query = "SELECT u FROM Usuarios u WHERE u.usuario = :usuario AND u.password = :password AND u.status = :status"), |
|||
|
|||
|
|||
@NamedQuery(name = "Usuarios.findByStatus", query = "SELECT u FROM Usuarios u WHERE u.status = :status")}) |
|||
public class Usuarios implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
@Id |
|||
@GeneratedValue(strategy = GenerationType.IDENTITY) |
|||
@Basic(optional = false) |
|||
@Column(name = "idUsuarios") |
|||
private Integer idUsuarios; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 45) |
|||
@Column(name = "usuario") |
|||
private String usuario; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 45) |
|||
@Column(name = "password") |
|||
private String password; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 55) |
|||
@Column(name = "nombre") |
|||
private String nombre; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 40) |
|||
@Column(name = "apaterno") |
|||
private String apaterno; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 40) |
|||
@Column(name = "amaterno") |
|||
private String amaterno; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 75) |
|||
@Column(name = "domicilio") |
|||
private String domicilio; |
|||
@Size(max = 20) |
|||
@Column(name = "telefono") |
|||
private String telefono; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Column(name = "fechanacimiento") |
|||
@Temporal(TemporalType.DATE) |
|||
private Date fechanacimiento; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Size(min = 1, max = 2) |
|||
@Column(name = "tiposangre") |
|||
private String tiposangre; |
|||
@Basic(optional = false) |
|||
@NotNull |
|||
@Column(name = "status") |
|||
private short status; |
|||
@JoinColumn(name = "Rol_idRol", referencedColumnName = "idRol") |
|||
@ManyToOne(optional = false) |
|||
private Rol rolidRol; |
|||
|
|||
public Usuarios() { |
|||
} |
|||
|
|||
public Usuarios(Integer idUsuarios) { |
|||
this.idUsuarios = idUsuarios; |
|||
} |
|||
|
|||
public Usuarios(Integer idUsuarios, String usuario, String password, String nombre, String apaterno, String amaterno, String domicilio, Date fechanacimiento, String tiposangre, short status) { |
|||
this.idUsuarios = idUsuarios; |
|||
this.usuario = usuario; |
|||
this.password = password; |
|||
this.nombre = nombre; |
|||
this.apaterno = apaterno; |
|||
this.amaterno = amaterno; |
|||
this.domicilio = domicilio; |
|||
this.fechanacimiento = fechanacimiento; |
|||
this.tiposangre = tiposangre; |
|||
this.status = status; |
|||
} |
|||
|
|||
public Integer getIdUsuarios() { |
|||
return idUsuarios; |
|||
} |
|||
|
|||
public void setIdUsuarios(Integer idUsuarios) { |
|||
this.idUsuarios = idUsuarios; |
|||
} |
|||
|
|||
public String getUsuario() { |
|||
return usuario; |
|||
} |
|||
|
|||
public void setUsuario(String usuario) { |
|||
this.usuario = usuario; |
|||
} |
|||
|
|||
public String getPassword() { |
|||
return password; |
|||
} |
|||
|
|||
public void setPassword(String password) { |
|||
this.password = password; |
|||
} |
|||
|
|||
public String getNombre() { |
|||
return nombre; |
|||
} |
|||
|
|||
public void setNombre(String nombre) { |
|||
this.nombre = nombre; |
|||
} |
|||
|
|||
public String getApaterno() { |
|||
return apaterno; |
|||
} |
|||
|
|||
public void setApaterno(String apaterno) { |
|||
this.apaterno = apaterno; |
|||
} |
|||
|
|||
public String getAmaterno() { |
|||
return amaterno; |
|||
} |
|||
|
|||
public void setAmaterno(String amaterno) { |
|||
this.amaterno = amaterno; |
|||
} |
|||
|
|||
public String getDomicilio() { |
|||
return domicilio; |
|||
} |
|||
|
|||
public void setDomicilio(String domicilio) { |
|||
this.domicilio = domicilio; |
|||
} |
|||
|
|||
public String getTelefono() { |
|||
return telefono; |
|||
} |
|||
|
|||
public void setTelefono(String telefono) { |
|||
this.telefono = telefono; |
|||
} |
|||
|
|||
public Date getFechanacimiento() { |
|||
return fechanacimiento; |
|||
} |
|||
|
|||
public void setFechanacimiento(Date fechanacimiento) { |
|||
this.fechanacimiento = fechanacimiento; |
|||
} |
|||
|
|||
public String getTiposangre() { |
|||
return tiposangre; |
|||
} |
|||
|
|||
public void setTiposangre(String tiposangre) { |
|||
this.tiposangre = tiposangre; |
|||
} |
|||
|
|||
public short getStatus() { |
|||
return status; |
|||
} |
|||
|
|||
public void setStatus(short status) { |
|||
this.status = status; |
|||
} |
|||
|
|||
public Rol getRolidRol() { |
|||
return rolidRol; |
|||
} |
|||
|
|||
public void setRolidRol(Rol rolidRol) { |
|||
this.rolidRol = rolidRol; |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
int hash = 0; |
|||
hash += (idUsuarios != null ? idUsuarios.hashCode() : 0); |
|||
return hash; |
|||
} |
|||
|
|||
@Override |
|||
public boolean equals(Object object) { |
|||
// TODO: Warning - this method won't work in the case the id fields are not set
|
|||
if (!(object instanceof Usuarios)) { |
|||
return false; |
|||
} |
|||
Usuarios other = (Usuarios) object; |
|||
if ((this.idUsuarios == null && other.idUsuarios != null) || (this.idUsuarios != null && !this.idUsuarios.equals(other.idUsuarios))) { |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return "mx.edu.tsj.chapala.sistemas.jin.modelo.Usuarios[ idUsuarios=" + idUsuarios + " ]"; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.msg; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
public enum Mensajes { |
|||
SIN_ERROR, |
|||
CAMPOS_INCOMPLETOS, |
|||
ELEMENTO_MODIFICADO, |
|||
ELEMENTO_ENCONTRADO, |
|||
ELEMENTO_NO_ENCONTRADO, |
|||
NO_HAY_ELEMENTOS, |
|||
ELEMENTO_DUPLICADO, |
|||
TIPO_DE_DATO_INCORRECTOS, |
|||
NO_SE_AGREGO_EL_ELEMENTO, |
|||
USUARIO_O_CONTRASENA_INCORRECTA |
|||
|
|||
|
|||
|
|||
|
|||
} |
Binary file not shown.
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<Scene Scope="Project" version="2"> |
|||
<Scope Scope="Faces Configuration Only"/> |
|||
<Scope Scope="Project"/> |
|||
<Scope Scope="All Faces Configurations"/> |
|||
</Scene> |
@ -0,0 +1,2 @@ |
|||
Manifest-Version: 1.0 |
|||
|
@ -0,0 +1,57 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.seguridad; |
|||
import java.io.IOException; |
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import javax.faces.application.NavigationHandler; |
|||
import javax.faces.context.FacesContext; |
|||
import javax.faces.event.PhaseEvent; |
|||
import javax.faces.event.PhaseId; |
|||
import javax.faces.event.PhaseListener; |
|||
|
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Named(value = "listener") |
|||
@SessionScoped |
|||
public class Listener implements PhaseListener { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
public Listener() { |
|||
} |
|||
@Override |
|||
public void afterPhase(PhaseEvent event) { |
|||
try { |
|||
//Obtener la pagina actual para validar la sesion
|
|||
String paginaActual = event.getFacesContext().getViewRoot().getViewId(); |
|||
|
|||
//inicializar la sesion en caso de no haber sesion
|
|||
Login.getSesion(); |
|||
|
|||
//Revisar que no sea la pafina index y que no estes logueado
|
|||
//para redireccionar
|
|||
if (!paginaActual.contains("vistaLogin.xhtml") && Login.getEstatus() == false) { |
|||
FacesContext.getCurrentInstance().getExternalContext().redirect("faces/vistaLogin.xhtml?faces-redirect=true"); |
|||
|
|||
NavigationHandler nh = event.getFacesContext().getApplication().getNavigationHandler(); |
|||
nh.handleNavigation(event.getFacesContext(), null, "vistaLogin"); |
|||
} |
|||
} catch (IOException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void beforePhase(PhaseEvent event) {} |
|||
|
|||
@Override |
|||
public PhaseId getPhaseId() { |
|||
return PhaseId.RESTORE_VIEW; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,83 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.seguridad; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import javax.ejb.EJB; |
|||
import javax.faces.application.FacesMessage; |
|||
import javax.faces.context.FacesContext; |
|||
import javax.servlet.http.HttpSession; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.ValidarBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Usuarios; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Named(value = "login") |
|||
@SessionScoped |
|||
public class Login implements Serializable { |
|||
|
|||
@EJB |
|||
private ValidarBLLocal validarBL; |
|||
Usuarios user; |
|||
boolean login; |
|||
|
|||
//Variable para manejar la sesion
|
|||
private static HttpSession httpSession; |
|||
|
|||
|
|||
|
|||
|
|||
public Login() { |
|||
} |
|||
public static void getSesion(){ |
|||
httpSession=(HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false); |
|||
|
|||
} |
|||
//metodo para salir
|
|||
public String logout(){ |
|||
httpSession.removeAttribute("sesionActiva"); |
|||
httpSession.invalidate(); |
|||
user = new Usuarios(); |
|||
return "vistaLogin.xhtml"; |
|||
} |
|||
//metodo para entrar
|
|||
public String login(){ |
|||
//llamar a BL para utenticacion que regresa un boolean
|
|||
//TODO: hacer un metodo en el bl parra recibir el usuario y pass
|
|||
|
|||
String usuario = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("usuario"); |
|||
String contraseña = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("contraseña"); |
|||
|
|||
if(usuario!=null && contraseña !=null){ |
|||
user = validarBL.validar(usuario, contraseña); |
|||
|
|||
} |
|||
|
|||
if(user!=null){ |
|||
httpSession.setAttribute("sesionActiva", "true"); |
|||
|
|||
return "inicio.xhtml"; |
|||
}else if(user == null){ |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error", "Usuario o Contraseña Incorrecta")); |
|||
return "vistaLogin.xhtml"; |
|||
} |
|||
return "vistaLogin.xhtml"; |
|||
} |
|||
//metodo para obtener el estatus de la session
|
|||
public static boolean getEstatus(){ |
|||
if(httpSession!=null&& |
|||
!httpSession.getId().isEmpty()&& |
|||
httpSession.getAttribute("sesionActiva")!=null){ |
|||
return true; |
|||
}else{ |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
} |
@ -0,0 +1,41 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import javax.annotation.PostConstruct; |
|||
|
|||
/** |
|||
* |
|||
* @author noemi |
|||
*/ |
|||
@Named(value = "carouselView") |
|||
@SessionScoped |
|||
public class CarouselView implements Serializable { |
|||
|
|||
private List<Option> options; |
|||
|
|||
@PostConstruct |
|||
public void init() { |
|||
options = new ArrayList<>(); |
|||
options = new ArrayList<>(); |
|||
options.add(new Option("tablasPrueba", "Productos","resources/images/productos.jpg")); |
|||
options.add(new Option("categoriaLista", "Categorías", "resources/images/categorias.jpg")); |
|||
options.add(new Option("ubiTablaPrueba", "Nueva Ubicación","resources/images/ubicacion.jpg")); |
|||
options.add(new Option("proveedores", "Proveedores", "resources/images/proveedor.jpg")); |
|||
options.add(new Option("usuarios", "Usuarios","resources/images/usuarios.jpg")); |
|||
options.add(new Option("rol", "Rol","resources/images/roles.jpg")); |
|||
options.add(new Option("marca", "Marcas","resources/images/marca.jpg")); |
|||
} |
|||
|
|||
// Getter
|
|||
public List<Option> getOptions() { |
|||
return options; |
|||
} |
|||
} |
@ -0,0 +1,24 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.Dependent; |
|||
|
|||
/** |
|||
* |
|||
* @author noemi |
|||
*/ |
|||
@Named(value = "imageView") |
|||
@Dependent |
|||
public class ImageView { |
|||
|
|||
/** |
|||
* Creates a new instance of ImageView |
|||
*/ |
|||
public ImageView() { |
|||
} |
|||
|
|||
} |
@ -0,0 +1,61 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.Dependent; |
|||
|
|||
/** |
|||
* |
|||
* @author noemi |
|||
*/ |
|||
@Named(value = "option") |
|||
@Dependent |
|||
public class Option { |
|||
|
|||
private String action; |
|||
private String title; |
|||
private String description; |
|||
private String image; |
|||
|
|||
public Option(String action, String title, String image) { |
|||
this.action = action; |
|||
this.title = title; |
|||
this.image = image; |
|||
} |
|||
|
|||
// Getters y setters
|
|||
public String getAction() { |
|||
return action; |
|||
} |
|||
|
|||
public void setAction(String action) { |
|||
this.action = action; |
|||
} |
|||
|
|||
public String getTitle() { |
|||
return title; |
|||
} |
|||
|
|||
public void setTitle(String title) { |
|||
this.title = title; |
|||
} |
|||
|
|||
public String getDescription() { |
|||
return description; |
|||
} |
|||
|
|||
public void setDescription(String description) { |
|||
this.description = description; |
|||
} |
|||
|
|||
public String getImage() { |
|||
return image; |
|||
} |
|||
|
|||
public void setImageUrl(String image) { |
|||
this.image = image; |
|||
} |
|||
} |
@ -0,0 +1,94 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.vista; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
import java.util.List; |
|||
import javax.faces.component.UIComponent; |
|||
import javax.faces.component.UISelectItem; |
|||
import javax.faces.component.UISelectItems; |
|||
import javax.faces.context.FacesContext; |
|||
import javax.faces.convert.Converter; |
|||
import javax.faces.convert.FacesConverter; |
|||
|
|||
/** |
|||
* The Class SelectOneMenuConverter. |
|||
*/ |
|||
@FacesConverter("selectOneMenuConverter") |
|||
public class SelectOneMenuConverter implements Converter { |
|||
|
|||
@Override |
|||
public Object getAsObject(final FacesContext arg0, final UIComponent arg1, final String objectString) { |
|||
if (objectString == null) { |
|||
return null; |
|||
} |
|||
|
|||
return fromSelect(arg1, objectString); |
|||
} |
|||
|
|||
/** |
|||
* Serialize. |
|||
* |
|||
* @param object |
|||
* the object |
|||
* @return the string |
|||
*/ |
|||
private String serialize(final Object object) { |
|||
if (object == null) { |
|||
return null; |
|||
} |
|||
return object.getClass() + "@" + object.hashCode(); |
|||
} |
|||
|
|||
/** |
|||
* From select. |
|||
* |
|||
* @param currentcomponent |
|||
* the currentcomponent |
|||
* @param objectString |
|||
* the object string |
|||
* @return the object |
|||
*/ |
|||
private Object fromSelect(final UIComponent currentcomponent, final String objectString) { |
|||
|
|||
if (currentcomponent.getClass() == UISelectItem.class) { |
|||
final UISelectItem item = (UISelectItem) currentcomponent; |
|||
final Object value = item.getValue(); |
|||
if (objectString.equals(serialize(value))) { |
|||
return value; |
|||
} |
|||
} |
|||
|
|||
if (currentcomponent.getClass() == UISelectItems.class) { |
|||
final UISelectItems items = (UISelectItems) currentcomponent; |
|||
final List<Object> elements = (List<Object>) items.getValue(); |
|||
for (final Object element : elements) { |
|||
if (objectString.equals(serialize(element))) { |
|||
return element; |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
if (!currentcomponent.getChildren().isEmpty()) { |
|||
for (final UIComponent component : currentcomponent.getChildren()) { |
|||
final Object result = fromSelect(component, objectString); |
|||
if (result != null) { |
|||
return result; |
|||
} |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public String getAsString(final FacesContext arg0, final UIComponent arg1, final Object object) { |
|||
return serialize(object); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,121 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import javax.faces.application.FacesMessage; |
|||
import javax.faces.context.FacesContext; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.CategoriaBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Categoria; |
|||
import org.primefaces.PrimeFaces; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
@Named(value = "categoriasBean") |
|||
@SessionScoped |
|||
public class categoriasBean implements Serializable { |
|||
/** |
|||
* Creates a new instance of categoriasBean |
|||
*/ |
|||
|
|||
public categoriasBean() { |
|||
} |
|||
|
|||
|
|||
@EJB |
|||
private CategoriaBLLocal categoriaBL; |
|||
private Categoria categoria = new Categoria(); |
|||
|
|||
|
|||
private String titulo; |
|||
private boolean nuevo; |
|||
|
|||
|
|||
public void agregarC() { |
|||
|
|||
if(categoria.getIdCategoria()!=null){ |
|||
categoriaBL.editar(categoria); |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Categoria editada con éxito")); |
|||
PrimeFaces.current().ajax().update("form:messages", "form:dt-categoria"); |
|||
}else{ |
|||
categoria.setStatus((short) 1); |
|||
categoriaBL.agregar(categoria); |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Categoria agregado con éxito")); |
|||
PrimeFaces.current().ajax().update("form:messages", "form:dt-categoria"); |
|||
} |
|||
|
|||
categoria = new Categoria(); |
|||
PrimeFaces.current().ajax().update("form:dt-categoria"); |
|||
|
|||
|
|||
PrimeFaces.current().executeScript("PF('manageProductDialog').hide()"); |
|||
|
|||
|
|||
} |
|||
|
|||
public List<Categoria> getCategorias() { |
|||
return categoriaBL.getTodos(); |
|||
} |
|||
|
|||
public Categoria getCategoria() { |
|||
return categoria; |
|||
} |
|||
|
|||
public void setCategoria(Categoria categoria) { |
|||
this.categoria = categoria; |
|||
} |
|||
|
|||
public void prepararEditarCategorias(Categoria categoria) { |
|||
nuevo = false; |
|||
titulo = "Editando Categoria"; |
|||
this.categoria = categoria; |
|||
} |
|||
|
|||
public void prepararCategoria() { |
|||
nuevo = true; |
|||
titulo = "Agregando Categoria"; |
|||
categoria = new Categoria(); |
|||
} |
|||
|
|||
public void preparaEliminarCategoria(Categoria categoria) { |
|||
this.categoria = categoria; |
|||
|
|||
} |
|||
|
|||
public void eliminarCategoria(){ |
|||
categoriaBL.eliminar(categoria); |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Categoria eliminado")); |
|||
PrimeFaces.current().ajax().update("form:messages", "form:dt-categoria"); |
|||
} |
|||
|
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
public void editarCategoria() { |
|||
categoriaBL.editar(categoria); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,378 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import java.text.ParseException; |
|||
import java.text.SimpleDateFormat; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.CategoriaBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.MarcaBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.ProductoBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.ProveedorBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.RolBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.UbicacionBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.UsuariosBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Categoria; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Marca; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Producto; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Proovedor; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Rol; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Ubicacion; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Usuarios; |
|||
|
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
@Named(value = "demoBean") |
|||
@SessionScoped |
|||
public class demoBean implements Serializable { |
|||
|
|||
@EJB |
|||
private CategoriaBLLocal categoriaBL; |
|||
@EJB |
|||
private ProductoBLLocal productobl; |
|||
@EJB |
|||
private MarcaBLLocal marcabl; |
|||
@EJB |
|||
private ProveedorBLLocal prooverdorbl; |
|||
@EJB |
|||
private UsuariosBLLocal usuariobl; |
|||
@EJB |
|||
private RolBLLocal rolbl; |
|||
@EJB |
|||
private UbicacionBLLocal ubicacionBL; |
|||
|
|||
private Marca marca = new Marca(); |
|||
private Categoria categoria = new Categoria(); |
|||
private Producto producto = new Producto(); |
|||
private Ubicacion ubicacion = new Ubicacion(); |
|||
private Proovedor prove = new Proovedor (); |
|||
private Usuarios usuario = new Usuarios(); |
|||
private Rol rol = new Rol(); |
|||
private String titulo; |
|||
private boolean nuevo; |
|||
|
|||
|
|||
|
|||
public demoBean() { |
|||
} |
|||
|
|||
// <<<< MARCA >>>>
|
|||
|
|||
public String agregarM() { |
|||
marca.setStatus((short) 1); |
|||
marcabl.Agregar(marca); |
|||
marca = new Marca(); |
|||
//TODO:MENSAJEs
|
|||
return "marcaLista.xhtml"; |
|||
} |
|||
|
|||
public void editarMarca() { |
|||
marcabl.Editar(marca); |
|||
} |
|||
|
|||
public void eliminaMarca() { |
|||
marcabl.Eliminar(marca); |
|||
} |
|||
|
|||
|
|||
|
|||
public List<Marca> getMarcas() { |
|||
return marcabl.getAll(); |
|||
|
|||
} |
|||
|
|||
public Marca getMarca() { |
|||
return marca; |
|||
} |
|||
|
|||
public List<Producto> getProductos(){ |
|||
return productobl.getAll(); |
|||
} |
|||
|
|||
public void setMarca(Marca marca) { |
|||
this.marca = marca; |
|||
} |
|||
|
|||
public void prepararEditar(Marca marca) { |
|||
nuevo = false; |
|||
titulo = "Editando marca"; |
|||
this.marca = marca; |
|||
} |
|||
public void prepararNuevo() { |
|||
nuevo = true; |
|||
titulo = "Agregando Marca"; |
|||
marca = new Marca(); |
|||
} |
|||
public void preparaEliminar(Marca marca) { |
|||
this.marca = marca; |
|||
} |
|||
|
|||
/////////<PRODUCTOS>////////////////77
|
|||
|
|||
public String agregarP() { |
|||
producto.setStatus((short) 1); |
|||
productobl.agregar(producto); |
|||
producto = new Producto(); |
|||
//TODO:MENSAJEs
|
|||
return "marcaLista.xhtml"; |
|||
} |
|||
public Producto getProducto() { |
|||
return producto; |
|||
} |
|||
|
|||
public void setProducto(Producto producto) { |
|||
this.producto = producto; |
|||
} |
|||
|
|||
|
|||
|
|||
public void prepararEditarProducto(Producto producto) { |
|||
nuevo = false; |
|||
titulo = "Editando producto"; |
|||
this.producto = producto; |
|||
} |
|||
|
|||
public void prepararProducto() { |
|||
nuevo = true; |
|||
titulo = "Agregando Producto"; |
|||
producto = new Producto(); |
|||
} |
|||
|
|||
public void editarProducto() { |
|||
productobl.editar(producto); |
|||
System.out.println(producto); |
|||
System.out.println("Llego aquo"); |
|||
} |
|||
|
|||
public void preparaEliminarProducto(Producto producto) { |
|||
this.producto = producto; |
|||
} |
|||
|
|||
public void eliminarProducto() { |
|||
productobl.eliminar(producto); |
|||
} |
|||
|
|||
|
|||
|
|||
// <<<< CATEGORIA >>>
|
|||
public String agregarC() { |
|||
categoria.setStatus((short) 1); |
|||
categoriaBL.agregar(categoria); |
|||
categoria = new Categoria(); |
|||
//TODO:MENSAJEs
|
|||
return "categoriaCrearEditar.xhtml"; |
|||
} |
|||
|
|||
public List<Categoria> getCategorias() { |
|||
return categoriaBL.getTodos(); |
|||
} |
|||
|
|||
public Categoria getCategoria() { |
|||
return categoria; |
|||
} |
|||
|
|||
public void setCategoria(Categoria categoria) { |
|||
this.categoria = categoria; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
//////////PROVEDORES/////////
|
|||
public Proovedor getProve() { |
|||
return prove; |
|||
} |
|||
|
|||
public void setProve(Proovedor prove) { |
|||
this.prove = prove; |
|||
} |
|||
|
|||
public List<Proovedor> getProovedor() { |
|||
return prooverdorbl.getAll(); |
|||
|
|||
} |
|||
public void prepararNuevoProovedor() { |
|||
nuevo = true; |
|||
titulo = "Agregando Proovedor"; |
|||
prove = new Proovedor(); |
|||
} |
|||
public String agregarProovedor() { |
|||
prove.setStatus((short) 1); |
|||
prooverdorbl.Agregar(prove); |
|||
prove = new Proovedor(); |
|||
//TODO:MENSAJEs
|
|||
return "proveedoresLista.xhtml"; |
|||
} |
|||
|
|||
public void preparaEliminarProovedor(Proovedor prove) { |
|||
this.prove = prove; |
|||
} |
|||
public void prepararEditarProovedor(Proovedor prove) { |
|||
nuevo = false; |
|||
titulo = "Editando Proovedor"; |
|||
this.prove = prove; |
|||
} |
|||
public void editarProovedor() { |
|||
prooverdorbl.Editar(prove); |
|||
} |
|||
|
|||
public void eliminaProovedor() { |
|||
prooverdorbl.Eliminar(prove); |
|||
} |
|||
|
|||
|
|||
|
|||
//////////<Rol>/////////
|
|||
|
|||
public Rol getRol() { |
|||
return rol; |
|||
} |
|||
|
|||
public void setRol(Rol rol) { |
|||
this.rol = rol; |
|||
} |
|||
public List<Rol> getRoles() { |
|||
return rolbl.getAll(); |
|||
|
|||
} |
|||
public void prepararNuevoRol() { |
|||
nuevo = true; |
|||
titulo = "Agregando rol"; |
|||
rol = new Rol(); |
|||
} |
|||
public String agregarRol() { |
|||
|
|||
rolbl.Agregar(rol); |
|||
rol = new Rol(); |
|||
//TODO:MENSAJEs
|
|||
return "rolLista.xhtml"; |
|||
} |
|||
|
|||
public void preparaEliminarRol(Rol rol) { |
|||
this.rol = rol; |
|||
} |
|||
public void prepararEditarRol(Rol rol) { |
|||
nuevo = false; |
|||
titulo = "Editando Rol"; |
|||
this.rol = rol; |
|||
} |
|||
public void editarRol() { |
|||
rolbl.Editar(rol); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
/////////<Usuarios>//////////
|
|||
|
|||
public Usuarios getUsuario() { |
|||
return usuario; |
|||
} |
|||
|
|||
public void setUsuario(Usuarios usuario) { |
|||
this.usuario = usuario; |
|||
} |
|||
public List<Usuarios> getUsuarios() { |
|||
return usuariobl.getAll(); |
|||
|
|||
} |
|||
public void prepararNuevoUsuario() { |
|||
nuevo = true; |
|||
titulo = "Agregando Usuario"; |
|||
usuario = new Usuarios(); |
|||
} |
|||
public String agregarUsuario() { |
|||
usuario.setStatus((short) 1); |
|||
usuariobl.Agregar(usuario); |
|||
usuario = new Usuarios(); |
|||
//TODO:MENSAJEs
|
|||
return "usuariosLista.xhtml"; |
|||
} |
|||
|
|||
public void preparaEliminarUsuario(Usuarios usuario) { |
|||
this.usuario = usuario; |
|||
} |
|||
public void prepararEditarUsuario(Usuarios usuario) { |
|||
nuevo = false; |
|||
titulo = "Editando Usuario"; |
|||
this.usuario = usuario; |
|||
} |
|||
public void editarUsuario() { |
|||
usuariobl.Editar(usuario); |
|||
} |
|||
|
|||
public void eliminaUsuario() { |
|||
usuariobl.Eliminar(usuario); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
///////////<UBICACIONES>/////////
|
|||
|
|||
|
|||
|
|||
public void setUbicacion(Ubicacion ubicacion) { |
|||
this.ubicacion = ubicacion; |
|||
} |
|||
public List<Ubicacion> getUbicaciones() { |
|||
return ubicacionBL.getTodos(); |
|||
} |
|||
|
|||
public Ubicacion getUbicacion() { |
|||
return ubicacion; |
|||
} |
|||
|
|||
public void preparaEliminarUbicacion(Ubicacion ubicacion) { |
|||
this.ubicacion = ubicacion; |
|||
} |
|||
|
|||
|
|||
/////////////////////////
|
|||
|
|||
public static Date convertirStringADate(String formato) { |
|||
SimpleDateFormat sdf = new SimpleDateFormat(formato); |
|||
try { |
|||
return sdf.parse(formato); |
|||
} catch (ParseException e) { |
|||
e.printStackTrace(); |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
|
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,114 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import javax.faces.application.FacesMessage; |
|||
import javax.faces.context.FacesContext; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.MarcaBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Marca; |
|||
import org.primefaces.PrimeFaces; |
|||
|
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Named(value = "marcaBean") |
|||
@SessionScoped |
|||
public class marcaBean implements Serializable { |
|||
@EJB |
|||
private MarcaBLLocal marcabl; |
|||
private Marca marca = new Marca(); |
|||
private String titulo; |
|||
private boolean nuevo; |
|||
public marcaBean() { |
|||
} |
|||
public void agregarM(){ |
|||
System.out.println("entraste al bean de agregar"); |
|||
|
|||
if(marca.getIdMarca() != null){ |
|||
marcabl.Editar(marca); |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Marca editada con éxito ✅")); |
|||
|
|||
}else{ |
|||
marca.setStatus((short)1); |
|||
marcabl.Agregar(marca); |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Marca agregregada con éxito ✅")); |
|||
} |
|||
marca = new Marca(); |
|||
PrimeFaces.current().ajax().update("form:dt-marca"); |
|||
|
|||
PrimeFaces.current().ajax().update("PF('manageProductDialog')"); |
|||
|
|||
// ubicacion = new Ubicacion();
|
|||
// return "ubicacionLista.xhtml";
|
|||
} |
|||
public void editarMarca() { |
|||
marcabl.Editar(marca); |
|||
} |
|||
|
|||
public void eliminaMarca() { |
|||
System.out.println("entraste al metodo eliminar bean"); |
|||
marcabl.Eliminar(marca); |
|||
|
|||
|
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Marca eliminada ❌")); |
|||
|
|||
PrimeFaces.current().ajax().update("form:messages", "form:dt-marca"); |
|||
|
|||
|
|||
|
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Marca eliminada ❌")); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
public List<Marca> getMarcas() { |
|||
return marcabl.getAll(); |
|||
|
|||
} |
|||
|
|||
public Marca getMarca() { |
|||
return marca; |
|||
} |
|||
|
|||
|
|||
|
|||
public void setMarca(Marca marca) { |
|||
this.marca = marca; |
|||
} |
|||
|
|||
public void prepararEditar(Marca marca) { |
|||
nuevo = false; |
|||
titulo = "Editando marca"; |
|||
this.marca = marca; |
|||
} |
|||
public void prepararNuevo() { |
|||
nuevo = true; |
|||
titulo = "Agregando Marca"; |
|||
marca = new Marca(); |
|||
} |
|||
public void preparaEliminar(Marca marca) { |
|||
|
|||
this.marca = marca; |
|||
} |
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
|
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,147 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import javax.faces.application.FacesMessage; |
|||
import javax.faces.context.FacesContext; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.ProductoBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Producto; |
|||
import org.primefaces.PrimeFaces; |
|||
|
|||
/** |
|||
* |
|||
* @author estra |
|||
*/ |
|||
@Named(value = "productosBean") |
|||
@SessionScoped |
|||
public class productosBean implements Serializable { |
|||
|
|||
@EJB |
|||
private ProductoBLLocal productobl; |
|||
private Producto producto = new Producto(); |
|||
private String titulo; |
|||
private boolean nuevo; |
|||
private List<Producto> productosLista; |
|||
|
|||
|
|||
|
|||
//Para la tabla
|
|||
|
|||
|
|||
|
|||
/** |
|||
* Creates a new instance of productosBean |
|||
*/ |
|||
|
|||
|
|||
|
|||
public productosBean() { |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
public void agregarP() { |
|||
// Verifica si el producto ya existe (puede basarse en el campo 'id' o 'codigo')
|
|||
if (producto.getIdProducto() != null) { |
|||
// El producto existe, por lo tanto, edítalo
|
|||
productobl.editar(producto); |
|||
// Muestra un mensaje de éxito para la edición
|
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Producto editado con éxito")); |
|||
PrimeFaces.current().ajax().update("form:messages", "form:dt-products"); |
|||
} else { |
|||
// Asigna el estado al producto (si es necesario)
|
|||
producto.setStatus((short) 1); |
|||
// Agrega el producto como nuevo
|
|||
productobl.agregar(producto); |
|||
// Muestra un mensaje de éxito para la adición
|
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Producto agregado con éxito")); |
|||
PrimeFaces.current().ajax().update("form:messages", "form:dt-products"); |
|||
} |
|||
|
|||
// Crear un nuevo objeto Producto para futuras operaciones
|
|||
producto = new Producto(); |
|||
|
|||
// Actualiza la tabla de productos en la interfaz
|
|||
PrimeFaces.current().ajax().update("form:dt-products"); |
|||
|
|||
// Oculta el diálogo
|
|||
PrimeFaces.current().executeScript("PF('manageProductDialog').hide()"); |
|||
} |
|||
|
|||
|
|||
|
|||
public Producto getProducto() { |
|||
return producto; |
|||
} |
|||
|
|||
public void setProducto(Producto producto) { |
|||
this.producto = producto; |
|||
} |
|||
|
|||
public void prepararEditarProducto(Producto producto) { |
|||
nuevo = false; |
|||
titulo = "Editando producto"; |
|||
this.producto = producto; |
|||
} |
|||
|
|||
public void prepararProducto() { |
|||
nuevo = true; |
|||
titulo = "Agregando Producto"; |
|||
System.out.println(titulo); |
|||
producto = new Producto(); |
|||
|
|||
} |
|||
|
|||
public void editarProducto() { |
|||
productobl.editar(producto); |
|||
} |
|||
|
|||
public void preparaEliminarProducto(Producto producto) { |
|||
this.producto = producto; |
|||
System.out.println(producto); |
|||
} |
|||
|
|||
public void eliminarProducto() { |
|||
// Elimina el producto de la base de datos o la capa lógica de negocios
|
|||
|
|||
productobl.eliminar(producto); |
|||
System.out.println("Paso por aqui"); |
|||
|
|||
|
|||
// Muestra un mensaje de éxito
|
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Producto eliminado")); |
|||
|
|||
// Actualiza los componentes de la vista para reflejar los cambios
|
|||
PrimeFaces.current().ajax().update("form:messages", "form:dt-products"); |
|||
} |
|||
|
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
public List<Producto> getProductos(){ |
|||
return productobl.getAll(); |
|||
} |
|||
|
|||
public List<Producto> getProducts() { |
|||
productosLista = productobl.getAll(); |
|||
|
|||
return productosLista; |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,82 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.ProveedorBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Proovedor; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Named(value = "proovedoresBean") |
|||
@SessionScoped |
|||
public class proovedoresBean implements Serializable { |
|||
|
|||
@EJB |
|||
private ProveedorBLLocal prooverdorbl; |
|||
private Proovedor prove = new Proovedor (); |
|||
private String titulo; |
|||
private boolean nuevo; |
|||
public proovedoresBean() { |
|||
} |
|||
public Proovedor getProve() { |
|||
return prove; |
|||
} |
|||
|
|||
public void setProve(Proovedor prove) { |
|||
this.prove = prove; |
|||
} |
|||
|
|||
public List<Proovedor> getProovedor() { |
|||
return prooverdorbl.getAll(); |
|||
|
|||
} |
|||
public void prepararNuevoProovedor() { |
|||
nuevo = true; |
|||
titulo = "Agregando Proovedor"; |
|||
prove = new Proovedor(); |
|||
} |
|||
public String agregarProovedor() { |
|||
prove.setStatus((short) 1); |
|||
prooverdorbl.Agregar(prove); |
|||
prove = new Proovedor(); |
|||
//TODO:MENSAJEs
|
|||
return "proveedoresLista.xhtml"; |
|||
} |
|||
|
|||
public void preparaEliminarProovedor(Proovedor prove) { |
|||
this.prove = prove; |
|||
} |
|||
public void prepararEditarProovedor(Proovedor prove) { |
|||
nuevo = false; |
|||
titulo = "Editando Proovedor"; |
|||
this.prove = prove; |
|||
} |
|||
public void editarProovedor() { |
|||
prooverdorbl.Editar(prove); |
|||
} |
|||
|
|||
public void eliminaProovedor() { |
|||
prooverdorbl.Eliminar(prove); |
|||
} |
|||
|
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
|
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,111 @@ |
|||
|
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import javax.faces.application.FacesMessage; |
|||
import javax.faces.context.FacesContext; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.ProveedorBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Proovedor; |
|||
import org.primefaces.PrimeFaces; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Named(value = "proveedorBean") |
|||
@SessionScoped |
|||
public class proveedorBean implements Serializable { |
|||
|
|||
@EJB |
|||
private ProveedorBLLocal proveerdorbl; |
|||
private Proovedor proveedor = new Proovedor (); |
|||
private String titulo; |
|||
private boolean nuevo; |
|||
public proveedorBean() { |
|||
} |
|||
public void agregarProveedor() { |
|||
System.out.println("entraste al bean de agregar"); |
|||
|
|||
if(proveedor.getIdProovedor() != null){ |
|||
proveerdorbl.Editar(proveedor); |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Proveedir editadp con éxito ✅")); |
|||
|
|||
}else{ |
|||
proveedor.setStatus((short)1); |
|||
proveerdorbl.Agregar(proveedor); |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Proveedor agregregado con éxito ✅")); |
|||
} |
|||
proveedor = new Proovedor(); |
|||
PrimeFaces.current().ajax().update("form:dt-proveedor"); |
|||
|
|||
PrimeFaces.current().ajax().update("PF('manageProductDialog')"); |
|||
} |
|||
|
|||
public void editarProveedor() { |
|||
proveerdorbl.Editar(proveedor); |
|||
} |
|||
|
|||
public void eliminaProveedor() { |
|||
System.out.println("entraste al metodo eliminar bean"); |
|||
proveerdorbl.Eliminar(proveedor); |
|||
|
|||
|
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Proovedor eliminado ❌")); |
|||
|
|||
PrimeFaces.current().ajax().update("form:messages", "form:dt-proveedor"); |
|||
} |
|||
|
|||
|
|||
|
|||
public List<Proovedor> getProveedores() { |
|||
return proveerdorbl.getAll(); |
|||
|
|||
} |
|||
|
|||
public Proovedor getProveedor() { |
|||
return proveedor; |
|||
} |
|||
|
|||
public void setProveedor(Proovedor proveedor) { |
|||
this.proveedor = proveedor; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
public void prepararEditar(Proovedor proveedor) { |
|||
nuevo = false; |
|||
titulo = "Editando ubicación 📝"; |
|||
this.proveedor = proveedor; |
|||
} |
|||
public void prepararNuevo() { |
|||
nuevo = true; |
|||
titulo = "Agregando ubicación ✅"; |
|||
proveedor = new Proovedor(); |
|||
} |
|||
public void preparaEliminar(Proovedor proveedor) { |
|||
this.proveedor=proveedor; |
|||
} |
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
|
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,90 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import javax.faces.application.FacesMessage; |
|||
import javax.faces.context.FacesContext; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.RolBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Rol; |
|||
import org.primefaces.PrimeFaces; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Named(value = "rolBean") |
|||
@SessionScoped |
|||
public class rolBean implements Serializable { |
|||
|
|||
@EJB |
|||
private RolBLLocal rolbl; |
|||
private Rol rol = new Rol(); |
|||
private String titulo; |
|||
private boolean nuevo; |
|||
public rolBean() { |
|||
} |
|||
public Rol getRol() { |
|||
return rol; |
|||
} |
|||
|
|||
public void setRol(Rol rol) { |
|||
this.rol = rol; |
|||
} |
|||
public List<Rol> getRoles() { |
|||
return rolbl.getAll(); |
|||
|
|||
} |
|||
public void prepararNuevoRol() { |
|||
nuevo = true; |
|||
titulo = "Agregando rol"; |
|||
rol = new Rol(); |
|||
} |
|||
public void agregarRol() { |
|||
|
|||
System.out.println("entraste al bean de agregar"); |
|||
|
|||
if(rol.getIdRol() != null){ |
|||
rolbl.Editar(rol); |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Rol editado con éxito ✅")); |
|||
|
|||
}else{ |
|||
|
|||
rolbl.Agregar(rol); |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Rol agregregado con éxito ✅")); |
|||
} |
|||
rol = new Rol(); |
|||
PrimeFaces.current().ajax().update("form:dt-rol"); |
|||
|
|||
PrimeFaces.current().ajax().update("PF('manageProductDialog')"); |
|||
} |
|||
|
|||
public void preparaEliminarRol(Rol rol) { |
|||
this.rol = rol; |
|||
} |
|||
public void prepararEditarRol(Rol rol) { |
|||
nuevo = false; |
|||
titulo = "Editando Rol"; |
|||
this.rol = rol; |
|||
} |
|||
public void editarRol() { |
|||
rolbl.Editar(rol); |
|||
} |
|||
|
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
|
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,28 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* |
|||
* @author noemi |
|||
*/ |
|||
@Named(value = "test") |
|||
@SessionScoped |
|||
public class test implements Serializable { |
|||
|
|||
/** |
|||
* Creates a new instance of test |
|||
*/ |
|||
public test() { |
|||
} |
|||
|
|||
public String pagina(String viewName) { |
|||
return viewName + ".xhtml"; |
|||
} |
|||
} |
@ -0,0 +1,120 @@ |
|||
//ubiBean
|
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import javax.faces.application.FacesMessage; |
|||
import javax.faces.context.FacesContext; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.UbicacionBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Ubicacion; |
|||
import org.primefaces.PrimeFaces; |
|||
|
|||
/** |
|||
* |
|||
* @author noemi |
|||
*/ |
|||
@Named(value = "ubiBean") |
|||
@SessionScoped |
|||
public class ubiBean implements Serializable { |
|||
|
|||
@EJB |
|||
private UbicacionBLLocal ubicacionBL; |
|||
private Ubicacion ubicacion = new Ubicacion(); |
|||
private String titulo; |
|||
private boolean nuevo; |
|||
private List <Ubicacion> ubicacionesLista; |
|||
|
|||
|
|||
/** |
|||
* Creates a new instance of ubiBean |
|||
*/ |
|||
public ubiBean() { |
|||
} |
|||
|
|||
public List<Ubicacion> getUbicaciones(){ |
|||
return ubicacionBL.getTodos(); |
|||
} |
|||
|
|||
public void agregarU(){ |
|||
System.out.println("entraste al bean de agregar"); |
|||
|
|||
if(ubicacion.getIdUbicacion() != null){ |
|||
ubicacionBL.editar(ubicacion); |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Ubicación editada con éxito ✅")); |
|||
|
|||
}else{ |
|||
ubicacion.setStatus((short)1); |
|||
ubicacionBL.agregarUbic(ubicacion); |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Ubicación agregregada con éxito ✅")); |
|||
} |
|||
ubicacion = new Ubicacion(); |
|||
PrimeFaces.current().ajax().update("form:dt-ubi"); |
|||
|
|||
PrimeFaces.current().ajax().update("PF('manageProductDialog')"); |
|||
|
|||
// ubicacion = new Ubicacion();
|
|||
// return "ubicacionLista.xhtml";
|
|||
} |
|||
public Ubicacion getUbicacion(){ |
|||
return ubicacion; |
|||
} |
|||
public void setUbicacion(Ubicacion ubicacion){ |
|||
this.ubicacion = ubicacion; |
|||
} |
|||
public void prepararEditarUbicacion(Ubicacion ubicacion) { |
|||
nuevo = false; |
|||
titulo = "Editando ubicación 📝"; |
|||
this.ubicacion = ubicacion; |
|||
} |
|||
|
|||
public void prepararNuevaUbicacion(){ |
|||
nuevo = true; |
|||
titulo = "Agregando ubicación ✅"; |
|||
ubicacion = new Ubicacion(); |
|||
} |
|||
|
|||
public void editarUbicacion(){ |
|||
System.out.println("entraste al metodo editar"); |
|||
ubicacionBL.editar(ubicacion); |
|||
} |
|||
|
|||
public void preparaEliminarUbicacion(Ubicacion ubicacion){ |
|||
this.ubicacion = ubicacion; |
|||
} |
|||
|
|||
public void eliminarUbicacion(){ |
|||
|
|||
System.out.println("entraste al metodo eliminar bean"); |
|||
ubicacionBL.elimarId(ubicacion); |
|||
|
|||
|
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Ubicacion eliminada ❌")); |
|||
|
|||
PrimeFaces.current().ajax().update("form:messages", "form:dt-ubi"); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
|
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
} |
|||
|
|||
|
|||
|
@ -0,0 +1,108 @@ |
|||
/* |
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|||
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
|
|||
*/ |
|||
package mx.edu.tsj.chapala.sistemas.jin.vista; |
|||
|
|||
import javax.inject.Named; |
|||
import javax.enterprise.context.SessionScoped; |
|||
import java.io.Serializable; |
|||
import java.text.ParseException; |
|||
import java.text.SimpleDateFormat; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import javax.ejb.EJB; |
|||
import javax.faces.application.FacesMessage; |
|||
import javax.faces.context.FacesContext; |
|||
import mx.edu.tsj.chapala.sistemas.jin.bl.UsuariosBLLocal; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Ubicacion; |
|||
import mx.edu.tsj.chapala.sistemas.jin.modelo.Usuarios; |
|||
import org.primefaces.PrimeFaces; |
|||
|
|||
/** |
|||
* |
|||
* @author jazmin |
|||
*/ |
|||
@Named(value = "usuariosBean") |
|||
@SessionScoped |
|||
public class usuariosBean implements Serializable { |
|||
|
|||
@EJB |
|||
private UsuariosBLLocal usuariobl; |
|||
private Usuarios usuario = new Usuarios(); |
|||
private String titulo; |
|||
private boolean nuevo; |
|||
public usuariosBean() { |
|||
} |
|||
public Usuarios getUsuario() { |
|||
return usuario; |
|||
} |
|||
|
|||
public void setUsuario(Usuarios usuario) { |
|||
this.usuario = usuario; |
|||
} |
|||
public List<Usuarios> getUsuarios() { |
|||
return usuariobl.getAll(); |
|||
|
|||
} |
|||
public void prepararNuevoUsuario() { |
|||
nuevo = true; |
|||
titulo = "Agregando Usuario"; |
|||
usuario = new Usuarios(); |
|||
} |
|||
public void agregarUsuario() { |
|||
System.out.println("entraste al bean de agregar"); |
|||
|
|||
if(usuario.getIdUsuarios() != null){ |
|||
usuariobl.Editar(usuario); |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Usuario editado con éxito ✅")); |
|||
|
|||
}else{ |
|||
usuario.setStatus((short)1); |
|||
usuariobl.Agregar(usuario); |
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Usuario agregregado con éxito ✅")); |
|||
} |
|||
usuario = new Usuarios(); |
|||
PrimeFaces.current().ajax().update("form:dt-usuario"); |
|||
|
|||
PrimeFaces.current().ajax().update("PF('manageProductDialog')"); |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
public void preparaEliminarUsuario(Usuarios usuario) { |
|||
this.usuario = usuario; |
|||
} |
|||
public void prepararEditarUsuario(Usuarios usuario) { |
|||
nuevo = false; |
|||
titulo = "Editando Usuario"; |
|||
this.usuario = usuario; |
|||
} |
|||
public void editarUsuario() { |
|||
usuariobl.Editar(usuario); |
|||
} |
|||
|
|||
public void eliminaUsuario() { |
|||
System.out.println("entraste al metodo eliminar bean"); |
|||
usuariobl.Eliminar(usuario); |
|||
|
|||
|
|||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Usuario eliminado ❌")); |
|||
|
|||
PrimeFaces.current().ajax().update("form:messages", "form:dt-usuario"); |
|||
|
|||
} |
|||
|
|||
public String getTitulo() { |
|||
return titulo; |
|||
} |
|||
|
|||
|
|||
|
|||
public boolean isNuevo() { |
|||
return nuevo; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,46 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<h:form> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
|
|||
<h1><h:outputText value="Create/Edit"/></h1> |
|||
<p:panelGrid columns="2"> |
|||
|
|||
<p:outputLabel value="NombreRol:" for="nombreRol" /> |
|||
<p:inputText id="nombreRol" value="#{rolBean.rol.nombreRol}" title="NombreRol" required="true" requiredMessage="The NombreRol field is required."/> |
|||
<p:outputLabel value="Descripcion:" for="descripcion" /> |
|||
<p:inputText id="descripcion" value="#{rolBean.rol.descripcion}" title="Descripcion" required="true" requiredMessage="The Descripcion field is required."/> |
|||
</p:panelGrid> |
|||
<p:commandButton styleClass="ui-button-raised ui-button-success" action ="#{rolBean.agregarRol()}" value="Agregar" update="growl" rendered="#{rolBean.nuevo}" /> |
|||
<p:commandButton action ="rolLista.xhtml" actionListener="#{rolBean.editarRol()}" value="Editar"/> |
|||
<p:commandButton styleClass="ui-button-raised ui-button-danger" action ="marcaLista.xhtml" value="Cancelar" immediate="true" update="growl" rendered="#{!rolBean.nuevo}"/> |
|||
</h:form> |
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,68 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<h:form> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
<h1><h:outputText value="Create/Edit"/></h1> |
|||
<p:panelGrid columns="2"> |
|||
|
|||
<p:outputLabel value="Usuario:" for="usuario" /> |
|||
<p:inputText id="usuario" value="#{usuariosBean.usuario.usuario}" title="Usuario" required="true" requiredMessage="The Usuario field is required."/> |
|||
<p:outputLabel value="Password:" for="password" /> |
|||
<p:inputText id="password" value="#{usuariosBean.usuario.password}" title="Password" required="true" requiredMessage="The Password field is required."/> |
|||
<p:outputLabel value="Nombre:" for="nombre" /> |
|||
<p:inputText id="nombre" value="#{usuariosBean.usuario.nombre}" title="Nombre" required="true" requiredMessage="The Nombre field is required."/> |
|||
<p:outputLabel value="Apaterno:" for="apaterno" /> |
|||
<p:inputText id="apaterno" value="#{usuariosBean.usuario.apaterno}" title="Apaterno" required="true" requiredMessage="The Apaterno field is required."/> |
|||
<p:outputLabel value="Amaterno:" for="amaterno" /> |
|||
<p:inputText id="amaterno" value="#{usuariosBean.usuario.amaterno}" title="Amaterno" required="true" requiredMessage="The Amaterno field is required."/> |
|||
<p:outputLabel value="Domicilio:" for="domicilio" /> |
|||
<p:inputText id="domicilio" value="#{usuariosBean.usuario.domicilio}" title="Domicilio" required="true" requiredMessage="The Domicilio field is required."/> |
|||
<p:outputLabel value="Telefono:" for="telefono" /> |
|||
<p:inputText id="telefono" value="#{usuariosBean.usuario.telefono}" title="Telefono" required="true" requiredMessage="The Telefono field is required."/> |
|||
<p:outputLabel value="Fechanacimiento:" for="fechanacimiento" /> |
|||
<p:inputMask id="fechanacimiento" value="#{usuariosBean.usuario.fechanacimiento}" mask="99/99/9999" required="true" > |
|||
<f:convertDateTime pattern="dd/MM/yyyy" /> |
|||
</p:inputMask> |
|||
<p:outputLabel value="Tiposangre:" for="tiposangre" /> |
|||
<p:inputText id="tiposangre" value="#{usuariosBean.usuario.tiposangre}" title="Tiposangre" required="true" requiredMessage="The Tiposangre field is required."/> |
|||
|
|||
<p:outputLabel value="RolidRol:" for="rolidRol" /> |
|||
<p:selectOneMenu id="rolidRol" value="#{usuariosBean.usuario.rolidRol}" required="true" converter="selectOneMenuConverter" requiredMessage="The RolidRol field is required."> |
|||
<!-- TODO: update below reference to list of available items--> |
|||
<f:selectItems value="#{rolBean.roles}" var="item" itemLabel="#{item.nombreRol}" itemValue="#{item}"/> |
|||
</p:selectOneMenu> |
|||
|
|||
</p:panelGrid> |
|||
<p:commandButton styleClass="ui-button-raised ui-button-success" action ="#{usuariosBean.agregarUsuario()}" value="Agregar" update="growl" rendered="#{usuariosBean.nuevo}"/> |
|||
<p:commandButton action ="usuariosLista.xhtml" actionListener="#{usuariosBean.editarUsuario()}" value="Editar" update="growl" rendered="#{!usuariosBean.nuevo}" /> |
|||
<p:commandButton styleClass="ui-button-raised ui-button-danger" action ="productosLista.xhtml" value="Cancelar" immediate="true"/> |
|||
</h:form> |
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,58 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
content |
|||
<f:view> |
|||
|
|||
|
|||
<h:form> |
|||
<p:commandButton action="nuevaCategoria.xhtml" value="Nueva Categoria"/> |
|||
<h1><h:outputText value="List"/></h1> |
|||
<h:dataTable value="#{demoBean.categorias}" var="item"> |
|||
<h:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="IdCategoria"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.idCategoria}"/> |
|||
</h:column> |
|||
<h:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Nombre"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.nombre}"/> |
|||
</h:column> |
|||
<h:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Status"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.status}"/> |
|||
</h:column> |
|||
</h:dataTable> |
|||
</h:form> |
|||
</f:view> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,33 @@ |
|||
<?xml version='1.0' encoding='UTF-8'?> |
|||
<!-- |
|||
|
|||
Licensed to the Apache Software Foundation (ASF) under one |
|||
or more contributor license agreements. See the NOTICE file |
|||
distributed with this work for additional information |
|||
regarding copyright ownership. The ASF licenses this file |
|||
to you under the Apache License, Version 2.0 (the |
|||
"License"); you may not use this file except in compliance |
|||
with the License. You may obtain a copy of the License at |
|||
|
|||
http://www.apache.org/licenses/LICENSE-2.0 |
|||
|
|||
Unless required by applicable law or agreed to in writing, |
|||
software distributed under the License is distributed on an |
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|||
KIND, either express or implied. See the License for the |
|||
specific language governing permissions and limitations |
|||
under the License. |
|||
|
|||
--> |
|||
<faces-config version="2.2" |
|||
xmlns="http://xmlns.jcp.org/xml/ns/javaee" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"> |
|||
|
|||
<lifecycle> |
|||
<phase-listener> |
|||
mx.edu.tsj.chapala.sistemas.jin.seguridad.Listener |
|||
</phase-listener> |
|||
</lifecycle> |
|||
|
|||
</faces-config> |
@ -0,0 +1,25 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd"> |
|||
<!-- |
|||
Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. |
|||
|
|||
This program and the accompanying materials are made available under the |
|||
terms of the Eclipse Public License v. 2.0, which is available at |
|||
http://www.eclipse.org/legal/epl-2.0. |
|||
|
|||
This Source Code may also be made available under the following Secondary |
|||
Licenses when the conditions for such availability set forth in the |
|||
Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
|||
version 2 with the GNU Classpath Exception, which is available at |
|||
https://www.gnu.org/software/classpath/license.html. |
|||
|
|||
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
|||
--> |
|||
<glassfish-web-app error-url=""> |
|||
<class-loader delegate="true"/> |
|||
<jsp-config> |
|||
<property name="keepgenerated" value="true"> |
|||
<description>Keep a copy of the generated servlet class' java code.</description> |
|||
</property> |
|||
</jsp-config> |
|||
</glassfish-web-app> |
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"> |
|||
<context-param> |
|||
<param-name>javax.faces.PROJECT_STAGE</param-name> |
|||
<param-value>Development</param-value> |
|||
</context-param> |
|||
<servlet> |
|||
<servlet-name>Faces Servlet</servlet-name> |
|||
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class> |
|||
<load-on-startup>1</load-on-startup> |
|||
</servlet> |
|||
<servlet-mapping> |
|||
<servlet-name>Faces Servlet</servlet-name> |
|||
<url-pattern>/faces/*</url-pattern> |
|||
</servlet-mapping> |
|||
<session-config> |
|||
<session-timeout> |
|||
30 |
|||
</session-timeout> |
|||
</session-config> |
|||
<welcome-file-list> |
|||
<welcome-file>faces/inicio.xhtml</welcome-file> |
|||
</welcome-file-list> |
|||
<context-param> |
|||
<param-name>javax.faces.CONFIG_FILES</param-name> |
|||
<param-value>/WEB-INF/faces_config.xml</param-value> |
|||
</context-param> |
|||
</web-app> |
@ -0,0 +1,25 @@ |
|||
<?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"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/templatePlantilla.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
content |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,53 @@ |
|||
<?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:p="http://primefaces.org/ui" |
|||
xmlns:h="http://xmlns.jcp.org/jsf/html"> |
|||
<head> |
|||
<link href="resources/css/stylesButtons.css" rel="stylesheet" type="text/css"/> |
|||
<link href="resources/css/stylosNoemi.css" rel="stylesheet" type="text/css"/> |
|||
<link href="resources/css/theme.css" rel="stylesheet" type="text/css"/> |
|||
|
|||
|
|||
</head> |
|||
<body> |
|||
<ui:composition template="./template/templatePlantilla.xhtml"> |
|||
<ui:define name="top"> |
|||
INVENTARIO |
|||
</ui:define> |
|||
<ui:define name="content"> |
|||
<div class="form-card"> |
|||
<div class="form-container"> |
|||
|
|||
<h5 style="font-size: 18px; text-align: center;">MENÚ DE OPCIONES</h5> |
|||
<div class="form-content"> |
|||
<div> |
|||
<div > |
|||
<span class="ui-input-icon-left"> |
|||
<i class="pi pi-angle-right"></i><input id="pasillo" name="pasillo" type="text" value="" class="ui-inputfield ui-inputtext" placeholder="Pasillo" /> |
|||
</span> |
|||
</div> |
|||
<div > |
|||
<span class="ui-input-icon-left"> |
|||
<i class="pi pi-angle-right"></i><input id="anaquel" name="anaquel" type="text" value="" class="ui-inputfield ui-inputtext ui-widget ui-state-default ui-corner-all" placeholder="Anaquel" /> |
|||
</span> |
|||
</div> |
|||
<div > |
|||
<span class="ui-input-icon-left"> |
|||
<i class="pi pi-angle-right"></i><input id="nivel" name="nivel" type="text" value="" class="ui-inputfield ui-inputtext ui-widget ui-state-default ui-corner-all" placeholder="Nivel" /> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="button-container"> |
|||
<h:form> |
|||
<p:commandButton type="button" value="Guardar" icon="pi pi-save" styleClass="ui-button-raised ui-button-flat" /> |
|||
<p:commandButton type="button" value="Cancelar" icon="pi pi-times-circle" styleClass="ui-button-raised ui-button-danger ui-button-flat" /> |
|||
</h:form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</ui:define> |
|||
</ui:composition> |
|||
</body> |
|||
</html> |
@ -0,0 +1,58 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
content |
|||
<f:view> |
|||
|
|||
|
|||
<h:form> |
|||
<p:commandButton action="nuevaCategoria.xhtml" value="Nueva Categoria"/> |
|||
<h1><h:outputText value="List"/></h1> |
|||
<h:dataTable value="#{demoBean.categorias}" var="item"> |
|||
<h:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="IdCategoria"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.idCategoria}"/> |
|||
</h:column> |
|||
<h:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Nombre"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.nombre}"/> |
|||
</h:column> |
|||
<h:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Status"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.status}"/> |
|||
</h:column> |
|||
</h:dataTable> |
|||
</h:form> |
|||
</f:view> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,112 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:p="http://primefaces.org/ui" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core"> |
|||
<ui:composition template="./template/templatePlantilla.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
INVENTARIO |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<div class="card crud-demo"> |
|||
<h:form id="form"> |
|||
<p:growl id="messages" showDetail="true" /> |
|||
|
|||
<p:toolbar> |
|||
<p:toolbarGroup> |
|||
<p:commandButton value="Nueva Categoria 📍" icon="pi pi-plus" actionListener="#{categoriasBean.prepararCategoria()}" |
|||
update=":dialogs:manage-product-content" oncomplete="PF('manageProductDialog').show()" |
|||
styleClass="ui-button-raised ui-button-flat" style="margin-right: 0.5rem"> |
|||
<p:resetInput target=":dialogs:manage-product-content" /> |
|||
</p:commandButton> |
|||
</p:toolbarGroup> |
|||
</p:toolbar> |
|||
|
|||
|
|||
<p:dataTable id="dt-categoria" widgetVar="dtCategoria" var="categoria" value="#{categoriasBean.categorias}" |
|||
reflow="true" styleClass="products-table" |
|||
rowKey="#{categoriasBean.categoria.idCategoria}" paginator="true" rows="10" rowSelectMode="add" paginatorPosition="bottom"> |
|||
|
|||
<f:facet name="header"> |
|||
<div class="products-table-header"> |
|||
<span style="font-weight: bold">Ubicaciones</span> |
|||
<span class="filter-container ui-input-icon-left"> <i class="pi pi-search"></i> |
|||
<p:inputText id="globalFilter" onkeyup="PF('dtCategoria').filter()" placeholder="Search" /> |
|||
</span> |
|||
</div> |
|||
</f:facet> |
|||
|
|||
<p:column headerText="Id°" sortBy="#{categoria.idCategoria}" filterBy="#{categoria.idCategoria}"> |
|||
<h:outputText value="#{categoria.idCategoria}" /> |
|||
</p:column> |
|||
|
|||
<p:column headerText="Nombre" sortBy="#{categoria.nombre}" filterBy="#{categoria.nombre}"> |
|||
<h:outputText value="#{categoria.nombre}" /> |
|||
</p:column> |
|||
|
|||
<p:column headerText="Acciones"> |
|||
<p:commandButton icon="pi pi-pencil" update=":dialogs:manage-product-content" |
|||
oncomplete="PF('manageProductDialog').show()" |
|||
styleClass="rounded-button ui-button-info" process="@this" |
|||
actionListener="#{categoriasBean.prepararEditarCategorias(categoria)}"> |
|||
<p:resetInput target=":dialogs:manage-product-content" /> |
|||
</p:commandButton> |
|||
|
|||
<p:commandButton styleClass="rounded-button ui-button-danger" icon="pi pi-trash" |
|||
process="@this" |
|||
actionListener="#{categoriasBean.preparaEliminarCategoria(categoria)}" |
|||
oncomplete="PF('deleteProductDialog').show()"> |
|||
</p:commandButton> |
|||
</p:column> |
|||
|
|||
</p:dataTable> |
|||
</h:form> |
|||
|
|||
<h:form id="dialogs"> |
|||
<p:dialog header="Categoria" showEffect="fade" modal="true" widgetVar="manageProductDialog" |
|||
responsive="true"> |
|||
<p:outputPanel id="manage-product-content" styleClass="ui-fluid"> |
|||
<p:outputPanel> |
|||
<h:panelGrid columns="2"> |
|||
<h:outputLabel value="Nombre" for="Nombre" /> |
|||
<p:inputText id="Nombre" value="#{categoriasBean.categoria.nombre}" title="Nombre" |
|||
required="true" requiredMessage="El Nombre es requerido. ⚠️" validatorMessage="Solo se aceptan letras en este campo. ⚠" > |
|||
<f:validateRegex pattern="[A-Za-z]+" for="Nombre"></f:validateRegex> |
|||
</p:inputText> |
|||
|
|||
</h:panelGrid> |
|||
</p:outputPanel> |
|||
</p:outputPanel> |
|||
|
|||
<f:facet name="footer"> |
|||
<div style="text-align: center;"> |
|||
<p:commandButton value="Guardar" icon="pi pi-save" |
|||
styleClass="ui-button-raised ui-button-flat" actionListener="#{categoriasBean.agregarC()}" |
|||
update="manage-product-content" process="manage-product-content @this" /> |
|||
</div> |
|||
</f:facet> |
|||
</p:dialog> |
|||
|
|||
<p:confirmDialog widgetVar="deleteProductDialog" showEffect="fade" width="300" |
|||
message="¿Deseas eliminar este elemento?" header="Eliminar" severity="warn"> |
|||
<div style="display: flex; justify-content: space-between;"> |
|||
<p:commandButton value="Eliminar" icon="pi pi-trash" |
|||
styleClass="ui-button-raised ui-button-danger ui-button-flat" |
|||
actionListener="#{categoriasBean.eliminarCategoria()}" process="@this" |
|||
oncomplete="PF('deleteProductDialog').hide()" /> |
|||
<p:commandButton value="Cancelar" type="button" |
|||
styleClass="ui-button-raised ui-button-danger-success ui-button-flat" icon="pi pi-times" |
|||
onclick="PF('deleteProductDialog').hide()" /> |
|||
</div> |
|||
</p:confirmDialog> |
|||
</h:form> |
|||
</div> |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</html> |
@ -0,0 +1,35 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html"> |
|||
|
|||
<h:head> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|||
<h:outputStylesheet name="./css/default.css"/> |
|||
<h:outputStylesheet name="./css/cssLayout.css"/> |
|||
<title>Facelets Template</title> |
|||
</h:head> |
|||
|
|||
<h:body> |
|||
|
|||
<div id="top"> |
|||
<ui:insert name="top">Top</ui:insert> |
|||
</div> |
|||
<div> |
|||
<div id="left"> |
|||
<ui:insert name="left">Left</ui:insert> |
|||
</div> |
|||
<div id="content" class="left_content"> |
|||
<ui:insert name="content">Content</ui:insert> |
|||
</div> |
|||
</div> |
|||
<div id="bottom"> |
|||
<h5>Derechos Reservados</h5> |
|||
<ui:insert name="bottom">Bottom</ui:insert> |
|||
<span>2024</span> |
|||
</div> |
|||
|
|||
</h:body> |
|||
|
|||
</html> |
@ -0,0 +1,39 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
content |
|||
<h:form> |
|||
<h1><h:outputText value="View"/></h1> |
|||
<p:panelGrid columns="2"> |
|||
<h:outputText value="Nombre"/> |
|||
<h:outputText value="#{categoriasBean.categoria.nombre}" title="Nombre"/> |
|||
</p:panelGrid> |
|||
|
|||
<p:commandButton action ="categoriaLista.xhtml" actionListener="#{categoriasBean.eliminarCategoria()}" value="Eliminar"/> |
|||
<p:commandButton action ="categoriaLista.xhtml" value="Cancelar"/> |
|||
|
|||
</h:form> |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,49 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
content<f:view> |
|||
|
|||
|
|||
|
|||
<h:form> |
|||
<h1><h:outputText value="View"/></h1> |
|||
<p:panelGrid columns="2"> |
|||
<h:outputText value="IdMarca:"/> |
|||
<h:outputText value="#{marcaBean.marca.idMarca}" title="IdMarca"/> |
|||
<h:outputText value="Nombre:"/> |
|||
<h:outputText value="#{marcaBean.marca.nombre}" title="Nombre"/> |
|||
<h:outputText value="Status:"/> |
|||
<h:outputText value="#{marcaBean.marca.status==1?'Activo':'Inactivo'}" title="Status"/> |
|||
|
|||
</p:panelGrid> |
|||
|
|||
<p:commandButton action ="marcaLista.xhtml" actionListener="#{marcaBean.eliminaMarca()}" value="Eliminar"/> |
|||
<p:commandButton action ="marcaLista.xhtml" value="Cancelar"/> |
|||
|
|||
</h:form> |
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,53 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<h:form> |
|||
<h1><h:outputText value="View"/></h1> |
|||
<p:panelGrid columns="2"> |
|||
<h:outputText value="IdProducto"/> |
|||
<h:outputText value="#{productosBean.producto.idProducto}" title="IdProducto"/> |
|||
<h:outputText value="Marca:"/> |
|||
<h:outputText value="#{productosBean.producto.marcaidMarca.nombre}" title="Marca"/> |
|||
<h:outputText value="Categoria:"/> |
|||
<h:outputText value="#{productosBean.producto.categoriaidCategoria.nombre}" title="Categoria"/> |
|||
<h:outputText value="Ubicacion:"/> |
|||
<h:outputText value="#{productosBean.producto.ubicacionidUbicacion.nivel}" title="Ubicacion"/> |
|||
<h:outputText value="Proveedor:"/> |
|||
<h:outputText value="#{productosBean.producto.proovedoridProovedor.proovedor}" title="Proveedor"/> |
|||
<h:outputText value="Codigo:"/> |
|||
<h:outputText value="#{productosBean.producto.codigo}" title="Codigo"/> |
|||
<h:outputText value="Descripcion:"/> |
|||
<h:outputText value="#{productosBean.producto.descripcion}" title="Descripcion"/> |
|||
<h:outputText value="Precio:"/> |
|||
<h:outputText value="#{productosBean.producto.precio}" title="Precio"/> |
|||
<h:outputText value="Cantidad:"/> |
|||
<h:outputText value="#{productosBean.producto.cantidadTotal}" title="Cantidad"/> |
|||
</p:panelGrid> |
|||
<p:commandButton action ="marcaLista.xhtml" actionListener="#{productosBean.eliminarProducto()}" value="Eliminar"/> |
|||
<p:commandButton action ="marcaLista.xhtml" value="Cancelar"/> |
|||
|
|||
</h:form> |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,49 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
|
|||
<h:form> |
|||
<h1><h:outputText value="View"/></h1> |
|||
<p:panelGrid columns="2"> |
|||
<h:outputText value="IdProovedor:"/> |
|||
<h:outputText value="#{proovedoresBean.prove.idProovedor}" title="IdProovedor"/> |
|||
<h:outputText value="Proovedor:"/> |
|||
<h:outputText value="#{proovedoresBean.prove.proovedor}" title="Proovedor"/> |
|||
<h:outputText value="Telefono:"/> |
|||
<h:outputText value="#{proovedoresBean.prove.telefono}" title="Telefono"/> |
|||
<h:outputText value="Direccion:"/> |
|||
<h:outputText value="#{proovedoresBean.prove.direccion}" title="Direccion"/> |
|||
<h:outputText value="Status:"/> |
|||
<h:outputText value="#{proovedoresBean.prove.status==1?'Activo':'Inactivo'}" title="Status"/> |
|||
</p:panelGrid> |
|||
<p:commandButton action ="proveedoresLista.xhtml" actionListener="#{proovedoresBean.eliminaProovedor()}" value="Eliminar"/> |
|||
<p:commandButton action ="marcaLista.xhtml" value="Cancelar"/> |
|||
</h:form> |
|||
</f:view> |
|||
|
|||
content |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,64 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
<h:form> |
|||
<h1><h:outputText value="View"/></h1> |
|||
<p:panelGrid columns="2"> |
|||
<h:outputText value="IdUsuarios:"/> |
|||
<h:outputText value="#{usuariosBean.usuario.idUsuarios}" title="IdUsuarios"/> |
|||
<h:outputText value="Usuario:"/> |
|||
<h:outputText value="#{usuariosBean.usuario.usuario}" title="Usuario"/> |
|||
<h:outputText value="Password:"/> |
|||
<h:outputText value="#{usuariosBean.usuario.password}" title="Password"/> |
|||
<h:outputText value="Nombre:"/> |
|||
<h:outputText value="#{usuariosBean.usuario.nombre}" title="Nombre"/> |
|||
<h:outputText value="Apaterno:"/> |
|||
<h:outputText value="#{usuariosBean.usuario.apaterno}" title="Apaterno"/> |
|||
<h:outputText value="Amaterno:"/> |
|||
<h:outputText value="#{usuariosBean.usuario.amaterno}" title="Amaterno"/> |
|||
<h:outputText value="Domicilio:"/> |
|||
<h:outputText value="#{usuariosBean.usuario.domicilio}" title="Domicilio"/> |
|||
<h:outputText value="Telefono:"/> |
|||
<h:outputText value="#{usuariosBean.usuario.telefono}" title="Telefono"/> |
|||
<h:outputText value="Fechanacimiento:"/> |
|||
<h:outputText value="#{usuariosBean.usuario.fechanacimiento}" title="Fechanacimiento"> |
|||
<f:convertDateTime pattern="MM/dd/yyyy" /> |
|||
</h:outputText> |
|||
<h:outputText value="Tiposangre:"/> |
|||
<h:outputText value="#{usuariosBean.usuario.tiposangre}" title="Tiposangre"/> |
|||
<h:outputText value="Status:"/> |
|||
<h:outputText value="#{usuariosBean.usuario.status}" title="Status"/> |
|||
<h:outputText value="RolidRol:"/> |
|||
<h:outputText value="#{usuariosBean.usuario.rolidRol.nombreRol}" title="RolidRol"/> |
|||
</p:panelGrid> |
|||
<p:commandButton action ="usuariosLista.xhtml" actionListener="#{usuariosBean.eliminaUsuario()}" value="Eliminar"/> |
|||
<p:commandButton action ="usuariosLista.xhtml" value="Cancelar"/> |
|||
</h:form> |
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,15 @@ |
|||
<!DOCTYPE html> |
|||
<!-- |
|||
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license |
|||
Click nbfs://nbhost/SystemFileSystem/Templates/JSP_Servlet/Html.html to edit this template |
|||
--> |
|||
<html> |
|||
<head> |
|||
<title>TODO supply a title</title> |
|||
<meta charset="UTF-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
</head> |
|||
<body> |
|||
<div>TODO write content</div> |
|||
</body> |
|||
</html> |
@ -0,0 +1,48 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html"> |
|||
<h:head> |
|||
<title>Facelet Title</title> |
|||
</h:head> |
|||
<h:body> |
|||
<h:form> |
|||
<h1>MARCA</h1> |
|||
<h:commandButton action="#{demoBean.agregarMarca()}" value="Agregar "/> |
|||
<h:commandButton action="#{demoBean.eliminarMarca()}" value="Eliminar"/> |
|||
|
|||
<h1>PROOVEDORES</h1> |
|||
<h:commandButton action="#{demoBean.agregarProoverdor()}" value="Agregar"/> |
|||
<h:commandButton action="#{demoBean.eliminarProovedor()}" value="Eliminar"/> |
|||
<h1>ROL</h1> |
|||
<h:commandButton action="#{demoBean.agregarROL}" value="Agregar"/> |
|||
<h1>Usuarios</h1> |
|||
<h:commandButton action="#{demoBean.agregarUsuario()}" value="Agregar"/> |
|||
<h:commandButton action="#{demoBean.eliminarUsuario()}" value="Eliminar"/> |
|||
<h1>Categoria</h1> |
|||
<h:commandButton action="#{demoBean.agregarCategoria()}" value="Agregar"/> |
|||
<h:commandButton action="#{demoBean.eliminarCategoria()}" value="Eliminar"/> |
|||
<h:commandButton action="#{demoBean.editarCategoria()}" value="Editar"/> |
|||
|
|||
|
|||
<h1>Ubicación</h1> |
|||
<h:commandButton action="#{demoBean.agregarUbicacion()}" value="Agregar"/> |
|||
<h:commandButton action="#{demoBean.eliminarUbicacion()}" value="Eliminar"/> |
|||
<h:commandButton action="#{demoBean.editarUbicacion()}" value="Editar"/> |
|||
|
|||
<h1>Producto</h1> |
|||
<h:commandButton action="#{demoBean.agregarProducto}" value="Agregar"/> |
|||
<h:commandButton action="#{demoBean.eliminarProducto}" value="Eliminar"/> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</h:form> |
|||
|
|||
</h:body> |
|||
</html> |
@ -0,0 +1,54 @@ |
|||
<?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:p="http://primefaces.org/ui" |
|||
xmlns:h="http://xmlns.jcp.org/jsf/html"> |
|||
<link href="resources/css/carrusel.css" rel="stylesheet" type="text/css"/> |
|||
<body> |
|||
|
|||
<ui:composition template="./template/templatePlantilla.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
INVENTARIO |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
|
|||
<img src="resources/images/inventario.jpg" alt="Imagen de prueba" /> |
|||
|
|||
|
|||
<h5 style="font-size: 18px; text-align: center;">MENÚ DE OPCIONES</h5> |
|||
|
|||
<h:form id="form"> |
|||
<p:carousel id="carousel" value="#{carouselView.options}" var="option1" numVisible="3" numScroll="1" circular="true" styleClass="custom-carousel"> |
|||
<div class="p-col"> |
|||
<div class="custom-card"> |
|||
<div class="card-content"> |
|||
<div style="text-align: center;"> <!-- Center the image --> |
|||
<p:graphicImage value="#{option1.image}" /> |
|||
</div> |
|||
<div class="card-text"> |
|||
<h4 class="card-title">#{option1.title}</h4> |
|||
<p class="card-description">#{option1.description}</p> |
|||
</div> |
|||
<div class="card-action"> |
|||
<p:commandButton icon="pi pi-arrow-right" styleClass="rounded-button ui-button-outlined" ajax="false" action="#{test.pagina(option1.action)}" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</p:carousel> |
|||
|
|||
|
|||
</h:form> |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,21 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/templatePlantilla.xhtml"> |
|||
|
|||
<ui:define name="content"> |
|||
<h:form> |
|||
<h:commandButton value="Login" action="#{login.login()}"/> |
|||
</h:form> |
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,118 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:p="http://primefaces.org/ui" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/templatePlantilla.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
INVENTARIO |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<div class="card crud-demo"> |
|||
<h:form id="form"> |
|||
<p:growl id="messages" showDetail="true" /> |
|||
|
|||
<p:toolbar> |
|||
<p:toolbarGroup> |
|||
<p:commandButton value="Nueva Marca 🧾" icon="pi pi-plus" actionListener="#{marcaBean.prepararNuevo()}" |
|||
update=":dialogs:manage-product-content" oncomplete="PF('manageProductDialog').show()" |
|||
styleClass="ui-button-raised ui-button-flat" style="margin-right: 0.5rem"> |
|||
<p:resetInput target=":dialogs:manage-product-content" /> |
|||
</p:commandButton> |
|||
</p:toolbarGroup> |
|||
</p:toolbar> |
|||
|
|||
|
|||
<p:dataTable id="dt-marca" widgetVar="dtmarca" var="marca" value="#{marcaBean.marcas}" |
|||
reflow="true" styleClass="products-table" |
|||
rowKey="#{marcaBean.marca.idMarca}" paginator="true" rows="10" rowSelectMode="add" paginatorPosition="bottom"> |
|||
|
|||
<f:facet name="header"> |
|||
<div class="products-table-header"> |
|||
<span style="font-weight: bold">Marcas</span> |
|||
<span class="filter-container ui-input-icon-left"> <i class="pi pi-search"></i> |
|||
<p:inputText id="globalFilter" onkeyup="PF('dtmarca').filter()" placeholder="Search" /> |
|||
</span> |
|||
</div> |
|||
</f:facet> |
|||
|
|||
<p:column headerText="No.°" sortBy="#{marca.idMarca}" filterBy="#{marca.idMarca}"> |
|||
<h:outputText value="#{marca.idMarca}" /> |
|||
</p:column> |
|||
|
|||
<p:column headerText="Nombre" sortBy="#{marca.nombre}" filterBy="#{marca.nombre}"> |
|||
<h:outputText value="#{marca.nombre}" /> |
|||
</p:column> |
|||
|
|||
|
|||
|
|||
<p:column headerText="Acciones"> |
|||
<p:commandButton icon="pi pi-pencil" update=":dialogs:manage-product-content" |
|||
oncomplete="PF('manageProductDialog').show()" |
|||
styleClass="rounded-button ui-button-info" process="@this" |
|||
actionListener="#{marcaBean.prepararEditar(marca)}"> |
|||
<p:resetInput target=":dialogs:manage-product-content" /> |
|||
</p:commandButton> |
|||
|
|||
<p:commandButton styleClass="rounded-button ui-button-danger" icon="pi pi-trash" |
|||
process="@this" |
|||
actionListener="#{marcaBean.preparaEliminar(marca)}" |
|||
oncomplete="PF('deleteProductDialog').show()"> |
|||
</p:commandButton> |
|||
</p:column> |
|||
|
|||
</p:dataTable> |
|||
</h:form> |
|||
|
|||
<h:form id="dialogs"> |
|||
<p:dialog header="Detalles de Marca" showEffect="fade" modal="true" widgetVar="manageProductDialog" |
|||
responsive="true"> |
|||
<p:outputPanel id="manage-product-content" styleClass="ui-fluid"> |
|||
<p:outputPanel> |
|||
<h:panelGrid columns="2"> |
|||
<h:outputLabel value="Nombre" for="Nombre" /> |
|||
<p:inputText id="Nombre" value="#{marcaBean.marca.nombre}" title="Nombre" |
|||
required="true" requiredMessage="El nombre es requerido. ⚠️" validatorMessage="Solo se pueden introducir letras"> |
|||
<f:validateRegex pattern="[A-Za-z\s]+" for="nombre"></f:validateRegex> |
|||
</p:inputText> |
|||
|
|||
</h:panelGrid> |
|||
</p:outputPanel> |
|||
</p:outputPanel> |
|||
|
|||
<f:facet name="footer"> |
|||
<div style="text-align: center;"> |
|||
<p:commandButton value="Guardar" icon="pi pi-save" |
|||
styleClass="ui-button-raised ui-button-flat" actionListener="#{marcaBean.agregarM()}" |
|||
update="manage-product-content" process="manage-product-content @this" /> |
|||
</div> |
|||
</f:facet> |
|||
</p:dialog> |
|||
|
|||
<p:confirmDialog widgetVar="deleteProductDialog" showEffect="fade" width="300" |
|||
message="¿Deseas eliminar este elemento?" header="Eliminar" severity="warn"> |
|||
<div style="display: flex; justify-content: space-between;"> |
|||
<p:commandButton value="Eliminar" icon="pi pi-trash" |
|||
styleClass="ui-button-raised ui-button-danger ui-button-flat" |
|||
actionListener="#{marcaBean.eliminaMarca()}" process="@this" |
|||
oncomplete="PF('deleteProductDialog').hide()" /> |
|||
<p:commandButton value="Cancelar" type="button" |
|||
styleClass="ui-button-raised ui-button-danger-success ui-button-flat" icon="pi pi-times" |
|||
onclick="PF('deleteProductDialog').hide()" /> |
|||
</div> |
|||
</p:confirmDialog> |
|||
</h:form> |
|||
</div> |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,54 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
<ui:define name="right"> |
|||
right |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
content<f:view> |
|||
|
|||
|
|||
<h:form> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
|
|||
|
|||
<h1><h:outputText value="#{marcaBean.titulo}"/></h1> |
|||
<p:panelGrid columns="2"> |
|||
|
|||
<p:outputLabel value="Nombre:" for="nombre" /> |
|||
<p:inputText id="nombre" value="#{marcaBean.marca.nombre}" title="Nombre" required="true" requiredMessage="The Nombre field is required."/> |
|||
|
|||
|
|||
</p:panelGrid> |
|||
<p:commandButton styleClass="ui-button-raised ui-button-success" action ="#{marcaBean.agregarM()}" value="Agregar" update="growl" rendered="#{marcaBean.nuevo}"/> |
|||
<p:commandButton action ="marcaLista.xhtml" actionListener="#{marcaBean.editarMarca()}" value="Editar" update="growl" rendered="#{!marcaBean.nuevo}" /> |
|||
<p:commandButton styleClass="ui-button-raised ui-button-danger" action ="marcaLista.xhtml" value="Cancelar" immediate="true"/> |
|||
</h:form> |
|||
</f:view> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,86 @@ |
|||
|
|||
<!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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
|
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
|
|||
<h:form> |
|||
<p:commandButton action="marcaCrearEditar.xhtml" actionListener="#{marcaBean.prepararNuevo()}" value="Nueva Marca" ajax="false"/> |
|||
<p:commandButton action="categoriaCrearEditar.xhtml" value="Nueva Categoria" ajax="false"/> |
|||
|
|||
<p:commandButton action="ubicacionLista.xhtml" value="Nueva ubicación" ajax="false"/> |
|||
<p:commandButton action="borrarTemplate.xhtml" value="PrubasS" ajax="false"/> |
|||
<p:commandButton action="proveedoresLista.xhtml" value="Proovedores" ajax="false"/> |
|||
<p:commandButton action="productosLista.xhtml" value="Productos" ajax="false"/> |
|||
<p:commandButton action="categoriaLista.xhtml" value="Categorias" ajax="false"/> |
|||
<p:commandButton action="usuariosLista.xhtml" value="Usuarios" ajax="false"/> |
|||
<p:commandButton action="rolLista.xhtml" value="Rol" ajax="false"/> |
|||
</h:form> |
|||
|
|||
|
|||
|
|||
<h:form> |
|||
<h1><h:outputText value="List"/></h1> |
|||
<p:dataTable value="#{marcaBean.marcas}" var="item"> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="IdMarca"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.idMarca}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Nombre"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.nombre}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Status"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.status == 1 ? 'Activo' : 'Inactivo'}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Opciones"/> |
|||
</f:facet> |
|||
<p:commandButton action="marcaCrearEditar.xhtml" actionListener="#{marcaBean.prepararEditar(item)}" value="Editar" ajax="false"/> |
|||
<p:commandButton action="eliminarMarca.xhtml" actionListener="#{marcaBean.preparaEliminar(item)}" value="Eliminar" ajax="false"/> |
|||
</p:column> |
|||
</p:dataTable> |
|||
</h:form> |
|||
|
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
<ui:define name="bottom"> |
|||
bottom |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
<script> |
|||
$.fn.dataTable.ext.errMode = 'none'; |
|||
new DataTable('table'); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,38 @@ |
|||
|
|||
<!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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<h:form> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
<h1><h:outputText value="#{categoriasBean.titulo}"/></h1> |
|||
<h:panelGrid columns="2"> |
|||
<h:outputLabel value="Nombre:" for="nombre" /> |
|||
<h:inputText id="nombre" value="#{categoriasBean.categoria.nombre}" title="Nombre" required="true" requiredMessage="The Nombre field is required."/> |
|||
</h:panelGrid> |
|||
<p:commandButton styleClass="ui-button-raised ui-button-success" action ="#{categoriasBean.agregarC()}" value="Agregar" update="growl" rendered="#{categoriasBean.nuevo}"/> |
|||
<p:commandButton action ="categoriaLista.xhtml" actionListener="#{categoriasBean.editarCategoria()}" value="Editar" update="growl" rendered="#{!categoriasBean.nuevo}" /> |
|||
<p:commandButton styleClass="ui-button-raised ui-button-danger" action ="categoriaLista.xhtml" value="Cancelar" immediate="true"/> |
|||
</h:form> |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,43 @@ |
|||
<!DOCTYPE html> |
|||
<html xmlns="http://www.w3.org/1999/xhtml" |
|||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets" |
|||
xmlns:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<h:form> |
|||
<h1><h:outputText value="Create/Edit"/></h1> |
|||
<h:panelGrid columns="2"> |
|||
|
|||
<h:outputLabel value="Pasillo:" for="pasillo" /> |
|||
<h:inputText id="pasillo" value="#{demoBean.ubicacion.pasillo}" title="Pasillo" required="true" requiredMessage="The Pasillo field is required."/> |
|||
|
|||
<h:outputLabel value="Anaquel:" for="anaquel" /> |
|||
<h:inputText id="anaquel" value="#{demoBean.ubicacion.anaquel}" title="Anaquel" required="true" requiredMessage="The Anaquel field is required."/> |
|||
|
|||
<h:outputLabel value="Nivel:" for="nivel" /> |
|||
<h:inputText id="nivel" value="#{demoBean.ubicacion.nivel}" title="Nivel" required="true" requiredMessage="The Nivel field is required."/> |
|||
|
|||
</h:panelGrid> |
|||
<h:commandButton action ="#{demoBean.agregarU()}" value="Agregar"/> |
|||
<h:commandButton action ="marcaLista.xhtml" value="Cancelar" immediate="true"/> |
|||
</h:form> |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,75 @@ |
|||
<!DOCTYPE html> |
|||
<html xmlns="http://www.w3.org/1999/xhtml" |
|||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets" |
|||
xmlns:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:p="http://primefaces.org/ui" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core"> |
|||
<head> |
|||
<link href="resources/css/stylesButtons.css" rel="stylesheet" type="text/css"/> |
|||
<link href="resources/css/stylosNoemi.css" rel="stylesheet" type="text/css"/> |
|||
<link href="resources/css/theme.css" rel="stylesheet" type="text/css"/> |
|||
</head> |
|||
<body> |
|||
<ui:composition template="./template/templatePlantilla.xhtml"> |
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
<ui:define name="content"> |
|||
<h:form> |
|||
<div class="form-card"> |
|||
<div class="form-container"> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
<h5 style="font-size: 16px; text-align: center;"> |
|||
<h:outputText value="#{productosBean.titulo}" /> |
|||
</h5> |
|||
<div style="margin-bottom: 20px;"></div> |
|||
|
|||
<h:panelGrid columns="2"> |
|||
<h:outputLabel value="Marca:" for="Marca" /> |
|||
<p:selectOneMenu id="Marca" value="#{productosBean.producto.marcaidMarca}" converter="selectOneMenuConverter" required="true"> |
|||
<f:selectItems value="#{demoBean.marcas}" var="item" itemLabel="#{item.nombre}" itemValue="#{item}" /> |
|||
</p:selectOneMenu> |
|||
|
|||
<h:outputLabel value="Categoría:" for="Categoria" /> |
|||
<p:selectOneMenu id="Categoria" value="#{productosBean.producto.categoriaidCategoria}" converter="selectOneMenuConverter" required="true"> |
|||
<f:selectItems value="#{demoBean.categorias}" var="item" itemLabel="#{item.nombre}" itemValue="#{item}" /> |
|||
</p:selectOneMenu> |
|||
|
|||
<h:outputLabel value="Ubicación:" for="Ubicacion" /> |
|||
<p:selectOneMenu id="Ubicacion" value="#{productosBean.producto.ubicacionidUbicacion}" converter="selectOneMenuConverter" required="true"> |
|||
<f:selectItems value="#{demoBean.ubicaciones}" var="item" itemLabel="#{item.pasillo}" itemValue="#{item}" /> |
|||
</p:selectOneMenu> |
|||
|
|||
<h:outputLabel value="Proveedor:" for="Proovedor" /> |
|||
<p:selectOneMenu id="Proovedor" value="#{productosBean.producto.proovedoridProovedor}" converter="selectOneMenuConverter" required="true"> |
|||
<f:selectItems value="#{demoBean.proovedor}" var="item" itemLabel="#{item.proovedor}" itemValue="#{item}" /> |
|||
</p:selectOneMenu> |
|||
|
|||
<h:outputLabel value="Código:" for="Codigo" /> |
|||
<p:inputText id="Codigo" value="#{productosBean.producto.codigo}" title="Código" required="true" requiredMessage="El campo Código es obligatorio."/> |
|||
|
|||
<h:outputLabel value="Descripción:" for="Descripcion" /> |
|||
<p:inputText id="Descripcion" value="#{productosBean.producto.descripcion}" title="Descripción" required="true" requiredMessage="El campo Descripción es obligatorio."/> |
|||
|
|||
<h:outputLabel value="Precio:" for="Precio" /> |
|||
<p:inputText id="Precio" value="#{productosBean.producto.precio}" title="Precio" required="true" requiredMessage="El campo Precio es obligatorio."/> |
|||
|
|||
<h:outputLabel value="Cantidad:" for="Cantidad" /> |
|||
<p:inputText id="Cantidad" value="#{productosBean.producto.cantidadTotal}" title="Cantidad" required="true" requiredMessage="El campo Cantidad es obligatorio."/> |
|||
</h:panelGrid> |
|||
|
|||
<div class="button-container"> |
|||
<p:commandButton action="#{productosBean.agregarP()}" value="Guardar" update="growl" icon="pi pi-save" styleClass="ui-button-raised ui-button-flat"/> |
|||
<p:commandButton action="productosLista.xhtml" actionListener="#{productosBean.editarProducto()}" value="Editar" update="growl" rendered="#{!productosBean.nuevo}" icon="pi pi-file-edit" styleClass="ui-button-raised ui-button-danger ui-button-flat" /> |
|||
<p:commandButton action="productosLista.xhtml" value="Cancelar" immediate="true" icon="pi pi-times-circle" styleClass="ui-button-raised ui-button-danger ui-button-flat" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</h:form> |
|||
</ui:define> |
|||
</ui:composition> |
|||
</body> |
|||
</html> |
@ -0,0 +1,54 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<body> |
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
|
|||
|
|||
<h:form> |
|||
<h1><h:outputText value="Create/Edit"/></h1> |
|||
<p:growl id="growl" showDetail="true" /> |
|||
<p:panelGrid columns="2"> |
|||
|
|||
<p:outputLabel value="Proovedor:" for="proovedor" /> |
|||
<p:inputText id="proovedor" value="#{proovedoresBean.prove.proovedor}" title="Proovedor" required="true" requiredMessage="The Proovedor field is required."/> |
|||
<p:outputLabel value="Telefono:" for="telefono" /> |
|||
<p:inputText id="telefono" value="#{proovedoresBean.prove.telefono}" title="Telefono" required="true" requiredMessage="The Telefono field is required."/> |
|||
<p:outputLabel value="Direccion:" for="direccion" /> |
|||
<p:inputText id="direccion" value="#{proovedoresBean.prove.direccion}" title="Direccion" required="true" requiredMessage="The Direccion field is required."/> |
|||
|
|||
</p:panelGrid> |
|||
<p:commandButton styleClass="ui-button-raised ui-button-success" action ="#{proovedoresBean.agregarProovedor()}" value="Agregar" update="growl" rendered="#{proovedoresBean.nuevo}" /> |
|||
<p:commandButton action ="proveedoresLista.xhtml" actionListener="#{proovedoresBean.editarProovedor()}" value="Editar" update="growl" rendered="#{!proovedoresBean.nuevo}" /> |
|||
<p:commandButton styleClass="ui-button-raised ui-button-danger" action ="proveedoresLista.xhtml" value="Cancelar" immediate="true"/> |
|||
</h:form> |
|||
</f:view> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,123 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:p="http://primefaces.org/ui" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core"> |
|||
<ui:composition template="./template/templatePlantilla.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
INVENTARIO |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<div class="card crud-demo"> |
|||
<h:form id="form"> |
|||
<p:growl id="messages" showDetail="true" /> |
|||
|
|||
<p:toolbar> |
|||
<p:toolbarGroup> |
|||
<p:commandButton value="Nueva Ubicacion 📍" icon="pi pi-plus" actionListener="#{ubiBean.prepararNuevaUbicacion()}" |
|||
update=":dialogs:manage-product-content" oncomplete="PF('manageProductDialog').show()" |
|||
styleClass="ui-button-raised ui-button-flat" style="margin-right: 0.5rem"> |
|||
<p:resetInput target=":dialogs:manage-product-content" /> |
|||
</p:commandButton> |
|||
</p:toolbarGroup> |
|||
</p:toolbar> |
|||
|
|||
|
|||
<p:dataTable id="dt-ubi" widgetVar="dtUbi" var="ubicacion" value="#{ubiBean.ubicaciones}" |
|||
reflow="true" styleClass="products-table" |
|||
rowKey="#{ubiBean.ubicacion.idUbicacion}" paginator="true" rows="10" rowSelectMode="add" paginatorPosition="bottom"> |
|||
|
|||
<f:facet name="header"> |
|||
<div class="products-table-header"> |
|||
<span style="font-weight: bold">Ubicaciones</span> |
|||
<span class="filter-container ui-input-icon-left"> <i class="pi pi-search"></i> |
|||
<p:inputText id="globalFilter" onkeyup="PF('dtUbi').filter()" placeholder="Search" /> |
|||
</span> |
|||
</div> |
|||
</f:facet> |
|||
|
|||
<p:column headerText="No.°" sortBy="#{ubicacion.idUbicacion}" filterBy="#{ubicacion.idUbicacion}"> |
|||
<h:outputText value="#{ubicacion.idUbicacion}" /> |
|||
</p:column> |
|||
|
|||
<p:column headerText="Pasillo" sortBy="#{ubicacion.pasillo}" filterBy="#{ubicacion.pasillo}"> |
|||
<h:outputText value="#{ubicacion.pasillo}" /> |
|||
</p:column> |
|||
|
|||
<p:column headerText="Anaquel" sortBy="#{ubicacion.anaquel}" filterBy="#{ubicacion.anaquel}"> |
|||
<h:outputText value="#{ubicacion.anaquel}" /> |
|||
</p:column> |
|||
|
|||
<p:column headerText="Nivel" sortBy="#{ubicacion.nivel}" filterBy="#{ubicacion.nivel}"> |
|||
<h:outputText value="#{ubicacion.nivel}" /> |
|||
</p:column> |
|||
|
|||
<p:column headerText="Acciones"> |
|||
<p:commandButton icon="pi pi-pencil" update=":dialogs:manage-product-content" |
|||
oncomplete="PF('manageProductDialog').show()" |
|||
styleClass="rounded-button ui-button-info" process="@this" |
|||
actionListener="#{ubiBean.preparaEliminarUbicacion(ubicacion)}"> |
|||
<p:resetInput target=":dialogs:manage-product-content" /> |
|||
</p:commandButton> |
|||
|
|||
<p:commandButton styleClass="rounded-button ui-button-danger" icon="pi pi-trash" |
|||
process="@this" |
|||
actionListener="#{ubiBean.preparaEliminarUbicacion(ubicacion)}" |
|||
oncomplete="PF('deleteProductDialog').show()"> |
|||
</p:commandButton> |
|||
</p:column> |
|||
|
|||
</p:dataTable> |
|||
</h:form> |
|||
|
|||
<h:form id="dialogs"> |
|||
<p:dialog header="Detalles de ubicación" showEffect="fade" modal="true" widgetVar="manageProductDialog" |
|||
responsive="true"> |
|||
<p:outputPanel id="manage-product-content" styleClass="ui-fluid"> |
|||
<p:outputPanel> |
|||
<h:panelGrid columns="2"> |
|||
<h:outputLabel value="Pasillo" for="Pasillo" /> |
|||
<p:inputText id="Pasillo" value="#{ubiBean.ubicacion.pasillo}" title="Pasillo" |
|||
required="true" requiredMessage="El pasillo es requerido. ⚠️" /> |
|||
<h:outputLabel value="Anaquel" for="Anaquel" /> |
|||
<p:inputText id="Anaquel" value="#{ubiBean.ubicacion.anaquel}" title="Anaquel" |
|||
required="true" requiredMessage="El anaquel es requerido. ⚠️" /> |
|||
<h:outputLabel value="Nivel" for="Nivel" /> |
|||
<p:inputText id="Nivel" value="#{ubiBean.ubicacion.nivel}" title="Nivel" |
|||
required="true" requiredMessage="El nivel es requerido. ⚠️" /> |
|||
</h:panelGrid> |
|||
</p:outputPanel> |
|||
</p:outputPanel> |
|||
|
|||
<f:facet name="footer"> |
|||
<div style="text-align: center;"> |
|||
<p:commandButton value="Guardar" icon="pi pi-save" |
|||
styleClass="ui-button-raised ui-button-flat" actionListener="#{ubiBean.agregarU()}" |
|||
update="manage-product-content" process="manage-product-content @this" /> |
|||
</div> |
|||
</f:facet> |
|||
</p:dialog> |
|||
|
|||
<p:confirmDialog widgetVar="deleteProductDialog" showEffect="fade" width="300" |
|||
message="¿Deseas eliminar este elemento?" header="Eliminar" severity="warn"> |
|||
<div style="display: flex; justify-content: space-between;"> |
|||
<p:commandButton value="Eliminar" icon="pi pi-trash" |
|||
styleClass="ui-button-raised ui-button-danger ui-button-flat" |
|||
actionListener="#{ubiBean.eliminarUbicacion()}" process="@this" |
|||
oncomplete="PF('deleteProductDialog').hide()" /> |
|||
<p:commandButton value="Cancelar" type="button" |
|||
styleClass="ui-button-raised ui-button-danger-success ui-button-flat" icon="pi pi-times" |
|||
onclick="PF('deleteProductDialog').hide()" /> |
|||
</div> |
|||
</p:confirmDialog> |
|||
</h:form> |
|||
</div> |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</html> |
@ -0,0 +1,101 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
|
|||
|
|||
<h:form> |
|||
<p:commandButton action="nuevoProducto.xhtml" actionListener="#{productosBean.prepararProducto()}" value="Nueva Producto" ajax="false"/> |
|||
<p:commandButton action="productoTablaNueva.xhtml" value="Pruebas Tabla"/> |
|||
<h1><h:outputText value="List"/></h1> |
|||
<p:dataTable value="#{productosBean.productos}" var="item"> |
|||
|
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Codigo"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.codigo}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Descripcion"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.descripcion}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Precio"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.precio}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Cantidad"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.cantidadTotal}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Status"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.status == 1 ? 'Activo' : 'Inactivo'}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Categoria"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.categoriaidCategoria.nombre}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Marca"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.marcaidMarca.nombre}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Proovedor"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.proovedoridProovedor.proovedor}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Ubicacion"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.ubicacionidUbicacion.pasillo}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Opciones"/> |
|||
</f:facet> |
|||
<p:commandButton action="nuevoProducto.xhtml" actionListener="#{productosBean.prepararEditarProducto(item)}" value="Editar" ajax="true"/> |
|||
<p:commandButton action="eliminarProducto.xhtml" actionListener="#{productosBean.preparaEliminarProducto(item)}" value="Eliminar" ajax="false"/> |
|||
</p:column> |
|||
</p:dataTable> |
|||
</h:form> |
|||
</f:view> |
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,153 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:p="http://primefaces.org/ui" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/templatePlantilla.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
INVENTARIO |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<div class="card crud-demo"> |
|||
<h:form id="form"> |
|||
<p:growl id="messages" showDetail="true" /> |
|||
|
|||
<p:toolbar> |
|||
<p:toolbarGroup> |
|||
<p:commandButton value="Nuevo Proveedor 🚚" icon="pi pi-plus" actionListener="#{proveedorBean.prepararNuevo()}" |
|||
update=":dialogs:manage-product-content" oncomplete="PF('manageProductDialog').show()" |
|||
styleClass="ui-button-raised ui-button-flat" style="margin-right: 0.5rem"> |
|||
<p:resetInput target=":dialogs:manage-product-content" /> |
|||
</p:commandButton> |
|||
</p:toolbarGroup> |
|||
</p:toolbar> |
|||
|
|||
|
|||
<p:dataTable id="dt-proveedor" widgetVar="dtproveedor" var="proveedor" value="#{proveedorBean.proveedores}" |
|||
reflow="true" styleClass="products-table" |
|||
rowKey="#{proveedorBean.proveedor.idProovedor}" paginator="true" rows="10" rowSelectMode="add" paginatorPosition="bottom"> |
|||
|
|||
<f:facet name="header"> |
|||
<div class="products-table-header"> |
|||
<span style="font-weight: bold">Proovedores</span> |
|||
<span class="filter-container ui-input-icon-left"> <i class="pi pi-search"></i> |
|||
<p:inputText id="globalFilter" onkeyup="PF('dtproveedor').filter()" placeholder="Search" /> |
|||
</span> |
|||
</div> |
|||
</f:facet> |
|||
|
|||
<p:column headerText="Nombre" sortBy="#{proveedor.proovedor}" filterBy="#{proveedor.proovedor}"> |
|||
<h:outputText value="#{proveedor.proovedor}" /> |
|||
</p:column> |
|||
|
|||
|
|||
<p:column headerText="Telefono" sortBy="#{proveedor.telefono }" filterBy="#{proveedor.telefono}"> |
|||
<h:outputText value="#{proveedor.telefono} " /> |
|||
</p:column> |
|||
<p:column headerText="Direccion" sortBy="#{proveedor.direccion}" filterBy="#{proveedor.direccion}"> |
|||
<h:outputText value="#{proveedor.direccion}" /> |
|||
</p:column> |
|||
|
|||
<p:column headerText="Pais" sortBy="#{proveedor.pais}" filterBy="#{proveedor.pais}"> |
|||
<h:outputText value="#{proveedor.pais}" /> |
|||
</p:column> |
|||
<p:column headerText="Ciudad" sortBy="#{proveedor.ciudad}" filterBy="#{proveedor.ciudad}"> |
|||
<h:outputText value="#{proveedor.ciudad}" /> |
|||
</p:column> |
|||
<p:column headerText="C.P" sortBy="#{proveedor.codigoPostal}" filterBy="#{proveedor.codigoPostal}"> |
|||
<h:outputText value="#{proveedor.codigoPostal}" /> |
|||
</p:column> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<p:column headerText="Acciones"> |
|||
<p:commandButton icon="pi pi-pencil" update=":dialogs:manage-product-content" |
|||
oncomplete="PF('manageProductDialog').show()" |
|||
styleClass="rounded-button ui-button-info" process="@this" |
|||
actionListener="#{proveedorBean.prepararEditar(proveedor)}"> |
|||
<p:resetInput target=":dialogs:manage-product-content" /> |
|||
</p:commandButton> |
|||
|
|||
<p:commandButton styleClass="rounded-button ui-button-danger" icon="pi pi-trash" |
|||
process="@this" |
|||
actionListener="#{proveedorBean.preparaEliminar(proveedor)}" |
|||
oncomplete="PF('deleteProductDialog').show()"> |
|||
</p:commandButton> |
|||
</p:column> |
|||
|
|||
</p:dataTable> |
|||
</h:form> |
|||
|
|||
<h:form id="dialogs"> |
|||
<p:dialog header="Detalles de proovedor" showEffect="fade" modal="true" widgetVar="manageProductDialog" |
|||
responsive="true"> |
|||
<p:outputPanel id="manage-product-content" styleClass="ui-fluid"> |
|||
<p:outputPanel> |
|||
<h:panelGrid columns="2"> |
|||
|
|||
<p:outputLabel value="Nombre:" for="proveedor" /> |
|||
<p:inputText id="proveedor" value="#{proveedorBean.proveedor.proovedor}" title="Proveedor" required="true" requiredMessage="El nombre es requerido." validatorMessage="Solo se pueden introducir letras"> |
|||
<f:validateRegex pattern="[A-Za-z\s]+" for="nombre"></f:validateRegex> |
|||
</p:inputText> |
|||
<p:outputLabel value="Telefono:" for="telefono" /> |
|||
<p:inputMask id="telefono" value="#{proveedorBean.proveedor.telefono}" mask="(999) 999-9999" validateMask="true" required="true" requiredMessage="El telefono es requerido." > |
|||
</p:inputMask> |
|||
<p:outputLabel value="Direccion:" for="direccion" /> |
|||
<p:inputText id="direccion" value="#{proveedorBean.proveedor.direccion}" title="Direccion" required="true" requiredMessage="La dirección es requerida." validatorMessage="Solo se pueden introducir letras"> |
|||
<f:validateRegex pattern="^[A-Za-z0-9\s#\-]+$" for="direccion"></f:validateRegex> |
|||
</p:inputText> |
|||
<p:outputLabel value="Pias" for="pais" /> |
|||
<p:inputText id="pais" value="#{proveedorBean.proveedor.pais}" title="Pais" required="true" requiredMessage="El país es requerido." validatorMessage="Solo se pueden introducir letras"> |
|||
<f:validateRegex pattern="[\p{L}\s]+" for="pais"></f:validateRegex> |
|||
</p:inputText> |
|||
<p:outputLabel value="Ciudad" for="ciudad" /> |
|||
<p:inputText id="ciudad" value="#{proveedorBean.proveedor.ciudad}" title="Ciudad" required="true" requiredMessage="La ciudad es requerida." validatorMessage="Solo se pueden introducir letras"> |
|||
<f:validateRegex pattern="[A-Za-z\s]+" for="ciudad"></f:validateRegex> |
|||
</p:inputText> |
|||
<p:outputLabel value="C.P" for="codigoPostal" /> |
|||
<p:inputText id="codigoPostal" value="#{proveedorBean.proveedor.codigoPostal}" title="Codigo Postal" required="true" requiredMessage="El codigo postal es requerdido." validatorMessage="El codigo postal no es valido"> |
|||
|
|||
|
|||
</p:inputText> |
|||
</h:panelGrid> |
|||
</p:outputPanel> |
|||
</p:outputPanel> |
|||
|
|||
<f:facet name="footer"> |
|||
<div style="text-align: center;"> |
|||
<p:commandButton value="Guardar" icon="pi pi-save" |
|||
styleClass="ui-button-raised ui-button-flat" actionListener="#{proveedorBean.agregarProveedor()}" |
|||
update="manage-product-content" process="manage-product-content @this" /> |
|||
</div> |
|||
</f:facet> |
|||
</p:dialog> |
|||
|
|||
<p:confirmDialog widgetVar="deleteProductDialog" showEffect="fade" width="300" |
|||
message="¿Deseas eliminar este elemento?" header="Eliminar" severity="warn"> |
|||
<div style="display: flex; justify-content: space-between;"> |
|||
<p:commandButton value="Eliminar" icon="pi pi-trash" |
|||
styleClass="ui-button-raised ui-button-danger ui-button-flat" |
|||
actionListener="#{proveedorBean.eliminaProveedor()}" process="@this" |
|||
oncomplete="PF('deleteProductDialog').hide()" /> |
|||
<p:commandButton value="Cancelar" type="button" |
|||
styleClass="ui-button-raised ui-button-danger-success ui-button-flat" icon="pi pi-times" |
|||
onclick="PF('deleteProductDialog').hide()" /> |
|||
</div> |
|||
</p:confirmDialog> |
|||
</h:form> |
|||
</div> |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,79 @@ |
|||
<?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:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:f="http://xmlns.jcp.org/jsf/core" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/ejemploJazmin.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
<f:view> |
|||
<h:form> |
|||
<p:commandButton action="nuevoProveedor.xhtml" actionListener="#{proovedoresBean.prepararNuevoProovedor()}" value="Nuevo Proovedor"/> |
|||
|
|||
|
|||
</h:form> |
|||
|
|||
<h:form> |
|||
<h1><h:outputText value="List"/></h1> |
|||
<p:dataTable value="#{proovedoresBean.proovedor}" var="item"> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="IdProovedor"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.idProovedor}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Proovedor"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.proovedor}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Telefono"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.telefono}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Direccion"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.direccion}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Status"/> |
|||
</f:facet> |
|||
<h:outputText value="#{item.status == 1 ? 'Activo' : 'Inactivo'}"/> |
|||
</p:column> |
|||
<p:column> |
|||
<f:facet name="header"> |
|||
<h:outputText value="Opciones"/> |
|||
</f:facet> |
|||
<p:commandButton action="nuevoProveedor.xhtml" actionListener="#{proovedoresBean.prepararEditarProovedor(item)}" value="Editar"/> |
|||
<p:commandButton action="eliminarProovedor.xhtml" actionListener="#{proovedoresBean.preparaEliminarProovedor(item)}" value="Eliminar"/> |
|||
</p:column> |
|||
</p:dataTable> |
|||
</h:form> |
|||
</f:view> |
|||
|
|||
|
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,95 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!-- |
|||
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license |
|||
Click nbfs://nbhost/SystemFileSystem/Templates/JSP_Servlet/XHtml.xhtml to edit this template |
|||
--> |
|||
<!DOCTYPE html> |
|||
<html xmlns="http://www.w3.org/1999/xhtml" |
|||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets" |
|||
xmlns:h="http://xmlns.jcp.org/jsf/html" |
|||
xmlns:p="http://primefaces.org/ui"> |
|||
<head> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> |
|||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"/> |
|||
<h:outputStylesheet name="./css/default.css"/> |
|||
<h:outputStylesheet name="./css/cssLayout.css"/> |
|||
<title>TODO supply a title</title> |
|||
<style> |
|||
#top { |
|||
height: 65px; |
|||
background-color: #353535; /* Color de fondo para el top */ |
|||
|
|||
text-align: center; |
|||
color: #B0B0B0; /* Texto blanco */ |
|||
} |
|||
|
|||
body { |
|||
margin: 0; |
|||
padding: 0; |
|||
font-family: Arial, sans-serif; |
|||
background-color: #ffffff; /* Fondo blanco */ |
|||
color: #000000; /* Texto negro */ |
|||
font-size: 16px; /* Tamaño de fuente deseado */ |
|||
} |
|||
|
|||
|
|||
#top-container { |
|||
align-content:center; |
|||
justify-content: center; |
|||
align-items: center; /* Esta propiedad centra el contenido verticalmente */ |
|||
} |
|||
#main-container { |
|||
display: flex; |
|||
font-size: 60px; /* Tamaño de fuente deseado */ |
|||
flex: 1; /* Ocupa todo el espacio restante después del top */ |
|||
/* Utiliza todo el ancho disponible */ |
|||
} |
|||
|
|||
#left { |
|||
background-color: #F4F4F4; |
|||
width: 270px; /* Ancho fijo para el menú lateral */ |
|||
flex-shrink: 0; /* No permitir que el menú lateral se encoja */ |
|||
} |
|||
|
|||
#content { |
|||
width: 100%; |
|||
flex-grow: 1; /* Permite que el contenido crezca para ocupar el espacio disponible */ |
|||
overflow-y: auto; /* Permite desplazamiento si el contenido es más grande que el contenedor */ |
|||
padding: 20px; /* Espacio interno */ |
|||
font-size: 60px; /* Tamaño de fuente deseado */ |
|||
} |
|||
.card { |
|||
width: 100%; |
|||
background-color: #F9F9F9; /* Color de fondo para el contenido */ |
|||
padding: 20px; /* Espaciado interno */ |
|||
border-radius: 10px; |
|||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); /* Sombra */ |
|||
} |
|||
.left_content { |
|||
padding: 20px; /* Espaciado interno */ |
|||
color: #000000; /* Texto negro */ |
|||
} |
|||
|
|||
</style> |
|||
|
|||
</head> |
|||
<body> |
|||
<div id="top" class="top"> |
|||
<div class="top-container"> |
|||
<nav class="navbar navbar-inverse"> |
|||
|
|||
<div class="navbar-header"> |
|||
<a class="navbar-brand" href="#">INVENTARIO</a> |
|||
</div> |
|||
<ul class="nav navbar-nav navbar-right"> |
|||
<li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Iniciar sesión</a></li> |
|||
<li><a href="#"> </a></li> |
|||
</ul> |
|||
|
|||
</nav> |
|||
</div> |
|||
<form><p:commandButton value="AAAAAAAAAAAAAAS"></p:commandButton></form> |
|||
|
|||
</div> |
|||
</body> |
|||
</html> |
@ -0,0 +1,29 @@ |
|||
<?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"> |
|||
|
|||
<body> |
|||
|
|||
<ui:composition template="./template/plantilla.xhtml"> |
|||
|
|||
<ui:define name="top"> |
|||
top |
|||
</ui:define> |
|||
|
|||
<ui:define name="left"> |
|||
left |
|||
</ui:define> |
|||
|
|||
<ui:define name="content"> |
|||
content |
|||
</ui:define> |
|||
|
|||
<ui:define name="bottom"> |
|||
bottom |
|||
</ui:define> |
|||
|
|||
</ui:composition> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,52 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE html> |
|||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|||
<head> |
|||
<title>Your Page Title</title> |
|||
<link href="resources/css/navbar.css" rel="stylesheet" type="text/css"/> |
|||
<link href="resources/css/menu.css" rel="stylesheet" type="text/css"/> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> |
|||
</head> |
|||
<body> |
|||
<div class="container-fluid pb-3 flex-grow-1 d-flex flex-column flex-sm-row overflow-auto"> |
|||
<div class="row flex-grow-sm-1 flex-grow-0"> |
|||
<aside class="col-sm-3 flex-grow-sm-1 flex-shrink-1 flex-grow-0 sticky-top pb-sm-0 pb-3"> |
|||
<div class="bg-light border rounded-3 p-1 h-100 sticky-top"> |
|||
<ul class="nav nav-pills flex-sm-column flex-row mb-auto justify-content-between text-truncate"> |
|||
<li class="nav-item"> |
|||
<a href="#" class="nav-link px-2 text-truncate"> |
|||
<i class="bi bi-house fs-5"></i> |
|||
<span class="d-none d-sm-inline">Home</span> |
|||
</a> |
|||
</li> |
|||
<li> |
|||
<a href="#" class="nav-link px-2 text-truncate"> |
|||
<i class="bi bi-speedometer fs-5"></i> |
|||
<span class="d-none d-sm-inline">Dashboard</span> |
|||
</a> |
|||
</li> |
|||
<li> |
|||
<a href="#" class="nav-link px-2 text-truncate"> |
|||
<i class="bi bi-card-text fs-5"></i> |
|||
<span class="d-none d-sm-inline">Orders</span> |
|||
</a> |
|||
</li> |
|||
<li> |
|||
<a href="#" class="nav-link px-2 text-truncate"> |
|||
<i class="bi bi-bricks fs-5"></i> |
|||
<span class="d-none d-sm-inline">Products</span> |
|||
</a> |
|||
</li> |
|||
<li> |
|||
<a href="#" class="nav-link px-2 text-truncate"> |
|||
<i class="bi bi-people fs-5"></i> |
|||
<span class="d-none d-sm-inline">Customers</span> |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</aside> |
|||
</div> |
|||
</div> |
|||
</body> |
|||
</html> |
@ -0,0 +1,31 @@ |
|||
.custom-carousel .p-carousel-content { |
|||
display: flex; |
|||
flex-wrap: nowrap; /* Evita que las tarjetas se envuelvan cuando el espacio es insuficiente */ |
|||
} |
|||
|
|||
.custom-carousel .p-carousel-content .p-col { |
|||
flex: 0 0 33%; /* Define el ancho de cada tarjeta como un tercio del contenedor */ |
|||
} |
|||
|
|||
.custom-card { |
|||
background-color: #ffffff; /* Color de fondo de las tarjetas */ |
|||
border-radius: 10px; /* Borde redondeado de las tarjetas */ |
|||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Sombra de las tarjetas */ |
|||
margin: 10px; /* Margen entre las tarjetas */ |
|||
} |
|||
|
|||
.card-content { |
|||
padding: 20px; /* Espaciado interno de las tarjetas */ |
|||
} |
|||
|
|||
.card-image { |
|||
max-width: 100%; /* Ajustar el tamaño máximo de la imagen al ancho de la tarjeta */ |
|||
} |
|||
|
|||
.card-text { |
|||
margin-top: 10px; /* Margen superior para el texto dentro de las tarjetas */ |
|||
} |
|||
|
|||
.card-action { |
|||
text-align: center; /* Centrar los botones de acción */ |
|||
} |
@ -0,0 +1,61 @@ |
|||
|
|||
#top { |
|||
position: relative; |
|||
background-color: #036fab; |
|||
color: white; |
|||
padding: 5px; |
|||
margin: 0px 0px 10px 0px; |
|||
} |
|||
|
|||
#bottom { |
|||
position: relative; |
|||
background-color: #c2dfef; |
|||
padding: 5px; |
|||
margin: 10px 0px 0px 0px; |
|||
} |
|||
|
|||
#left { |
|||
float: left; |
|||
background-color: #ece3a5; |
|||
padding: 5px; |
|||
width: 300px; |
|||
} |
|||
|
|||
#right { |
|||
float: right; |
|||
background-color: #ece3a5; |
|||
padding: 5px; |
|||
width: 150px; |
|||
} |
|||
|
|||
.center_content { |
|||
position: relative; |
|||
background-color: #dddddd; |
|||
padding: 5px; |
|||
} |
|||
|
|||
.left_content { |
|||
background-color: #dddddd; |
|||
padding: 5px; |
|||
margin-left: 170px; |
|||
} |
|||
|
|||
.right_content { |
|||
background-color: #dddddd; |
|||
padding: 5px; |
|||
margin: 0px 170px 0px 170px; |
|||
} |
|||
|
|||
#top a:link, #top a:visited { |
|||
color: white; |
|||
font-weight : bold; |
|||
text-decoration: none; |
|||
} |
|||
|
|||
#top a:link:hover, #top a:visited:hover { |
|||
color: black; |
|||
font-weight : bold; |
|||
text-decoration : underline; |
|||
} |
|||
|
|||
|
@ -0,0 +1,29 @@ |
|||
body { |
|||
background-color: #ffffff; |
|||
font-size: 12px; |
|||
font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; |
|||
color: #000000; |
|||
margin: 10px; |
|||
} |
|||
|
|||
h1 { |
|||
font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; |
|||
border-bottom: 1px solid #AFAFAF; |
|||
font-size: 16px; |
|||
font-weight: bold; |
|||
margin: 0px; |
|||
padding: 0px; |
|||
color: #D20005; |
|||
} |
|||
|
|||
a:link, a:visited { |
|||
color: #045491; |
|||
font-weight : bold; |
|||
text-decoration: none; |
|||
} |
|||
|
|||
a:link:hover, a:visited:hover { |
|||
color: #045491; |
|||
font-weight : bold; |
|||
text-decoration : underline; |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,852 @@ |
|||
/* |
|||
* Copyright 2018 Carlos Eduardo Alfaro Orellana |
|||
https://www.youtube.com/c/CarlosAlfaro007 |
|||
*/ |
|||
|
|||
/*===================================================== |
|||
Tipografia |
|||
======================================================*/ |
|||
@font-face{ |
|||
font-family: "RobotoCondensedLight"; |
|||
src: url("../fonts/robotocondensed-light.ttf"), |
|||
url("../fonts/robotocondensed-light.eot"), |
|||
url("../fonts/robotocondensed-light.woff"), |
|||
url("../fonts/robotocondensed-light.woff2"), |
|||
url("../fonts/robotocondensed-light.svg"); |
|||
} |
|||
@font-face{ |
|||
font-family: "RobotoRegular"; |
|||
src: url("../fonts/roboto-regular.ttf"), |
|||
url("../fonts/roboto-regular.eot"), |
|||
url("../fonts/roboto-regular.woff"), |
|||
url("../fonts/roboto-regular.woff2"), |
|||
url("../fonts/roboto-regular.svg"); |
|||
} |
|||
@font-face{ |
|||
font-family: "OswaldLight"; |
|||
src: url("../fonts/oswald-light.ttf"), |
|||
url("../fonts/oswald-light.eot"), |
|||
url("../fonts/oswald-light.woff"), |
|||
url("../fonts/oswald-light.woff2"), |
|||
url("../fonts/oswald-light.svg"); |
|||
} |
|||
/*===================================================== |
|||
Estilos generales |
|||
======================================================*/ |
|||
:root{ |
|||
--color-text: #3F51B5; |
|||
--primary-color: #2B2B2C; |
|||
--acent-color: #DB763B; |
|||
} |
|||
html, body{ |
|||
width: 100%; |
|||
height: 100%; |
|||
margin: 0; |
|||
padding: 0; |
|||
font-size: 16px; |
|||
font-family: "RobotoRegular"; |
|||
position: relative; |
|||
background-color: #fff; |
|||
} |
|||
.text-condensedLight{ font-family: "RobotoCondensedLight"; } |
|||
.text-center{ text-align: center; } |
|||
.tittles{ font-family: "OswaldLight"; } |
|||
.mdl-textfield{ width: 100%; } |
|||
.full-width{ |
|||
margin: 0; |
|||
padding: 0; |
|||
width: 100%; |
|||
box-sizing: border-box; |
|||
} |
|||
.list-unstyle{ |
|||
margin: 0; |
|||
padding: 0; |
|||
list-style: none; |
|||
box-sizing: border-box; |
|||
} |
|||
.img-responsive{ |
|||
width: 100%; |
|||
height: auto; |
|||
} |
|||
.table-responsive{ |
|||
overflow: auto; |
|||
} |
|||
.divider-menu-h{ |
|||
height: 0; |
|||
border-top: 1px solid rgba(255, 255, 255, .09); |
|||
width: 85%; |
|||
margin: 0 auto; |
|||
} |
|||
.cover{ |
|||
background-size: cover; |
|||
background-attachment: fixed; |
|||
background-repeat: no-repeat; |
|||
background-position: center center; |
|||
} |
|||
.mdl-list__item-avatar{ |
|||
line-height: 40px; |
|||
text-align: center; |
|||
font-size: 30px; |
|||
} |
|||
.table-responsive{ |
|||
width: 100%; |
|||
overflow-x: scroll; |
|||
position: relative; |
|||
} |
|||
/*====== paneles*/ |
|||
.panel{ height: auto; } |
|||
.panel-tittle{ |
|||
height: 45px; |
|||
display: block; |
|||
line-height: 45px; |
|||
color: #fff; |
|||
font-size: 20px; |
|||
} |
|||
.panel-content{ |
|||
display: block; |
|||
padding: 10px; |
|||
} |
|||
/*====== encabezados de paginas*/ |
|||
.header-well, |
|||
.header-well-icon, |
|||
.header-well-text{ |
|||
min-height: 150px; |
|||
height: auto; |
|||
} |
|||
.header-well{ |
|||
position: relative; |
|||
} |
|||
.header-well-icon, |
|||
.header-well-text{ |
|||
position: absolute; |
|||
top: 0; |
|||
color: #333; |
|||
} |
|||
.header-well-icon{ |
|||
left: 0; |
|||
width: 25%; |
|||
} |
|||
.header-well-icon i, |
|||
.header-well-text p{ |
|||
position: absolute; |
|||
top: 50%; |
|||
display: block; |
|||
width: 100%; |
|||
transform: translateY(-50%); |
|||
} |
|||
.header-well-icon i{ |
|||
text-align: center; |
|||
font-size: 60px; |
|||
} |
|||
.header-well-text{ |
|||
right: 0; |
|||
width: 75%; |
|||
} |
|||
.header-well-text p{ |
|||
font-size: 20px; |
|||
margin: 0; |
|||
padding: 0; |
|||
} |
|||
/*====== Area de notificacion*/ |
|||
.container-notifications{ |
|||
position: fixed; |
|||
height: 100%; |
|||
top: 0; |
|||
left: 0; |
|||
pointer-events: none; |
|||
opacity: 0; |
|||
z-index: 997; |
|||
} |
|||
.container-notifications-bg{ |
|||
height: 100%; |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
background-color: rgba(0,0,0,.5); |
|||
} |
|||
.container-notifications-show{ |
|||
pointer-events: auto; |
|||
opacity: 1; |
|||
} |
|||
.NotificationArea{ |
|||
box-sizing: border-box; |
|||
background-color: #fff; |
|||
height: 100%; |
|||
width: 300px; |
|||
top: 0; |
|||
z-index: 999; |
|||
right: -300px; |
|||
transition: all .3s ease-in-out; |
|||
position: absolute; |
|||
} |
|||
.NotificationArea-title{ |
|||
font-size: 21px; |
|||
height: 45px; |
|||
line-height: 45px; |
|||
color: #fff; |
|||
background-color: var(--primary-color); |
|||
box-sizing: border-box; |
|||
} |
|||
.NotificationArea-title i{ |
|||
position: absolute; |
|||
top: 0; |
|||
right: 0; |
|||
height: 45px; |
|||
width: 45px; |
|||
line-height: 45px; |
|||
font-size: 25px; |
|||
cursor: pointer; |
|||
} |
|||
.Notification, |
|||
.Notification-icon, |
|||
.Notification-text{ |
|||
margin: 0; |
|||
padding: 0; |
|||
height: 80px; |
|||
box-sizing: border-box; |
|||
} |
|||
.Notification{ |
|||
position: relative; |
|||
display: block; |
|||
width: 300px; |
|||
border-top: 1px solid #f3f3f3; |
|||
color: #2b2b2c; |
|||
font-size: 14px; |
|||
transition: all .3s ease-in-out; |
|||
} |
|||
.Notification:hover{ |
|||
background-color: rgba(0,0,0,.07); |
|||
} |
|||
.Notification small{ |
|||
color: #BDBDBD; |
|||
} |
|||
.Notification-icon, |
|||
.Notification-text{ |
|||
position: absolute; |
|||
top: 0; |
|||
} |
|||
.Notification-icon{ |
|||
width: 80px; |
|||
left: 0; |
|||
box-sizing: border-box; |
|||
} |
|||
.Notification-icon i{ |
|||
height: 50px; |
|||
width: 50px; |
|||
line-height: 50px; |
|||
margin-left: 15px; |
|||
margin-top: 15px; |
|||
text-align: center; |
|||
font-size: 20px; |
|||
color: #fff; |
|||
background-color: #D9534F; |
|||
border-radius: 50%; |
|||
} |
|||
.Notification-text{ |
|||
width: 220px; |
|||
right: 0; |
|||
} |
|||
.Notification-text p{ |
|||
position: absolute; |
|||
width: 100%; |
|||
top: 50%; |
|||
left: 0; |
|||
transform: translateY(-50%); |
|||
} |
|||
.NotificationArea-show{ |
|||
right: 0; |
|||
} |
|||
/*====== Backgrouns color*/ |
|||
.bg-primary { |
|||
background-color: #2e6da4 !important; |
|||
} |
|||
.bg-success { |
|||
background-color: #3f903f !important; |
|||
} |
|||
.bg-danger { |
|||
background-color: #d9534f !important; |
|||
} |
|||
.bg-info { |
|||
background-color: #5bc0de !important; |
|||
} |
|||
/*=============Estilos login*/ |
|||
.login-wrap{ |
|||
height: 100%; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
color: var(--color-text); |
|||
background-image: url(../assets/img/fontLogin.jpg); |
|||
} |
|||
.container-login{ |
|||
width: 100%; |
|||
max-width: 300px; |
|||
box-sizing: border-box; |
|||
height: auto; |
|||
margin: 0; |
|||
padding: 20px; |
|||
background-color: rgba(255,255,255,.7); |
|||
border-radius: 5px; |
|||
} |
|||
/*=============Estilos barra superior*/ |
|||
.navBar{ |
|||
background-color: var(--primary-color); |
|||
height: 45px; |
|||
color: #fff; |
|||
} |
|||
.navBar-options{ |
|||
line-height: 45px; |
|||
height: 45px; |
|||
position: absolute; |
|||
width: 100%; |
|||
top: 0; |
|||
right: 0; |
|||
padding: 0; |
|||
transition: all .3s ease-in-out; |
|||
} |
|||
.navBar-options-change{ |
|||
width: 100%; |
|||
} |
|||
.navBar-options .btn-menu, |
|||
.navBar-options-list{ |
|||
line-height: 45px; |
|||
position: absolute; |
|||
top: 0; |
|||
height: 45px; |
|||
margin: 0; |
|||
padding: 0; |
|||
} |
|||
.navBar-options .btn-menu{ |
|||
width: 40px; |
|||
left: 0; |
|||
font-size: 23px; |
|||
cursor: pointer; |
|||
user-select: none; |
|||
text-align: center; |
|||
outline: none; |
|||
margin-left: 9px; |
|||
} |
|||
.navBar-options-list{ |
|||
right: 9px; |
|||
} |
|||
.navBar-options-list .noLink{ |
|||
cursor: inherit !important; |
|||
} |
|||
.navBar-options-list ul{ |
|||
height: 45px; |
|||
} |
|||
.navBar-options-list ul li{ |
|||
height: 45px; |
|||
line-height: 45px; |
|||
cursor: pointer; |
|||
display: inline-block; |
|||
padding: 0 7px; |
|||
font-size: 21px; |
|||
-moz-user-select: none; |
|||
-webkit-user-select: none; |
|||
-ms-user-select: none; |
|||
} |
|||
.navBar-options-list ul li{ outline: none; } |
|||
.navBar-options-list ul li figure, |
|||
.navBar-options-list ul li figure img{ |
|||
margin: 0; |
|||
padding: 0; |
|||
padding-top: 0; |
|||
margin-top: 0; |
|||
box-sizing: border-box; |
|||
} |
|||
.navBar-options-list ul li figure{ |
|||
height: 45px; |
|||
} |
|||
.navBar-options-list ul li figure img{ |
|||
border: 1px solid #E1E1E1; |
|||
border-radius: 50%; |
|||
width: 39px; |
|||
height: 39px; |
|||
margin-bottom: 3px; |
|||
} |
|||
.navBar-options-list ul li i.zmdi-notifications-active{ |
|||
color: #FF4081; |
|||
} |
|||
/*=============Estilos en comun navegacion lateral y contenido pagina*/ |
|||
.navLateral, |
|||
.navLateral-body, |
|||
.navLateral-bg{ |
|||
position: absolute; |
|||
top: 0; |
|||
height: 100%; |
|||
} |
|||
/*=============Estilos navegacion lateral*/ |
|||
.navLateral{ |
|||
left: 0; |
|||
width: 300px; |
|||
z-index: 100; |
|||
transition: all .3s ease-in-out; |
|||
background-image: url("../assets/img/FontNavLateral.jpg"); |
|||
background-size: cover; |
|||
color: #fff; |
|||
overflow: hidden; |
|||
} |
|||
.navLateral-change{ |
|||
pointer-events: none; |
|||
opacity: 0; |
|||
width: 0; |
|||
} |
|||
.navLateral-body{ |
|||
z-index: 82; |
|||
left: 0; |
|||
padding-bottom: 30px; |
|||
background-color: rgba(43, 43, 44, .9); |
|||
} |
|||
.navLateral-body-logo{ |
|||
height: 45px; |
|||
line-height: 45px; |
|||
color: #fff; |
|||
width: 100%; |
|||
font-size: 25px; |
|||
background-color: var(--acent-color); |
|||
} |
|||
.navLateral-body-logo .zmdi-close{ |
|||
width: 0; |
|||
height: 0; |
|||
pointer-events: none; |
|||
opacity: 0; |
|||
} |
|||
.navLateral-body-cl, |
|||
.navLateral-body-cr{ |
|||
box-sizing: border-box; |
|||
height: 77px; |
|||
float: left; |
|||
margin: 0; |
|||
padding: 0; |
|||
position: relative; |
|||
} |
|||
.navLateral-body-cl{ |
|||
width: 30%; |
|||
} |
|||
.navLateral-body-cl img{ |
|||
width: 57px; |
|||
height: 57px; |
|||
margin: 0 auto; |
|||
display: block; |
|||
margin-top: 10px; |
|||
} |
|||
.navLateral-body-cr{ |
|||
width: 70%; |
|||
font-family: "RobotoCondensedLight"; |
|||
} |
|||
.navLateral-body-cr span{ |
|||
position: absolute; |
|||
top: 50%; |
|||
left: 50%; |
|||
transform: translate(-50%, -50%); |
|||
display: block; |
|||
width: 100%; |
|||
} |
|||
.navLateral-body-tittle-menu{ |
|||
text-align: center; |
|||
padding: 30px 0; |
|||
} |
|||
.navLateral-body-tittle-menu img{ |
|||
max-width: 70px; |
|||
} |
|||
.menu-principal li, |
|||
.menu-principal li a{ |
|||
display: block; |
|||
} |
|||
.menu-principal li a{ |
|||
height: 45px; |
|||
color: #fff; |
|||
position: relative; |
|||
transition: all .3s ease-in-out; |
|||
} |
|||
.menu-principal > li > a:hover{ |
|||
background-color: var(--acent-color); |
|||
} |
|||
.menu-principal li a div.navLateral-body-cl, |
|||
.menu-principal li a div.navLateral-body-cr{ |
|||
height: 45px; |
|||
line-height: 45px; |
|||
} |
|||
.menu-principal li a div.navLateral-body-cl{ |
|||
text-align: center; |
|||
font-size: 20px; |
|||
} |
|||
.btn-subMenu span{ |
|||
position: absolute; |
|||
top: 0; |
|||
right: 7px; |
|||
line-height: 45px; |
|||
height: 45px; |
|||
font-size: 19px; |
|||
} |
|||
.sub-menu-options{ |
|||
height: 0; |
|||
overflow-y: hidden; |
|||
overflow-x: hidden; |
|||
background-color: rgba(255, 255, 255, .1); |
|||
transition: all .3s ease-in-out; |
|||
} |
|||
.sub-menu-options-show{ |
|||
height: auto; |
|||
overflow-y: auto; |
|||
overflow-x: hidden; |
|||
} |
|||
/*=============Estilos contenido pagina*/ |
|||
.pageContent{ |
|||
padding-left: 300px; |
|||
width: 100%; |
|||
height: 100%; |
|||
overflow: hidden; |
|||
z-index: 77; |
|||
background-color: #fff; |
|||
transition: all .3s ease-in-out; |
|||
} |
|||
.pageContent-change{ |
|||
padding-left: 0; |
|||
} |
|||
/*===================================================== |
|||
Estilos home |
|||
======================================================*/ |
|||
/*=============Azulejos o accesos directos(Tiles)*/ |
|||
.tile{ |
|||
border: 1px solid #E1E1E1; |
|||
height: 140px; |
|||
width: 30%; |
|||
margin: 0 1%; |
|||
position: relative; |
|||
transition: all .3s ease-in-out; |
|||
overflow: hidden; |
|||
cursor: pointer; |
|||
margin-bottom: 20px; |
|||
display: inline-block; |
|||
} |
|||
.tile:hover .tile-text span{ color: #3F51B5; } |
|||
.tile:hover .tile-icon{ |
|||
color: rgba(0,191,238,.3); |
|||
transform: scale(1.5) translate(-10px, -10px); |
|||
} |
|||
.tile-text{ |
|||
display: block; |
|||
height: 140px; |
|||
width: 100%; |
|||
box-sizing: border-box; |
|||
} |
|||
.tile-text span, |
|||
.tile-icon{ |
|||
position: absolute; |
|||
color: rgba(0,0,0,.3); |
|||
transition: all .3s ease-in-out; |
|||
-moz-user-select: none; |
|||
-webkit-user-select: none; |
|||
-ms-user-select: none; |
|||
} |
|||
.tile-text span{ |
|||
top: 50%; |
|||
left: 10px; |
|||
transform: translateY(-50%); |
|||
display: block; |
|||
font-size: 27px; |
|||
z-index: 2; |
|||
} |
|||
.tile-icon{ |
|||
bottom: 9px; |
|||
right: 4px; |
|||
font-size: 90px; |
|||
line-height: 67px; |
|||
z-index: 1; |
|||
} |
|||
/*=============Linea de tiempo (TimeLine)*/ |
|||
.timeline-c{ |
|||
width: 90%; |
|||
max-width: 1170px; |
|||
margin: 0 auto; |
|||
box-sizing: border-box; |
|||
} |
|||
.timeline-c::after { |
|||
content: ''; |
|||
display: table; |
|||
clear: both; |
|||
} |
|||
#timeline-c{ |
|||
position: relative; |
|||
padding: 2em 0; |
|||
margin-top: 2em; |
|||
margin-bottom: 2em; |
|||
} |
|||
#timeline-c::before{ |
|||
content: ''; |
|||
position: absolute; |
|||
top: 0; |
|||
left: 18px; |
|||
height: 100%; |
|||
width: 4px; |
|||
background-color: #3F51B5; |
|||
} |
|||
.timeline-c-box{ |
|||
position: relative; |
|||
margin: 2em 0; |
|||
} |
|||
.timeline-c-box::after{ |
|||
content: ""; |
|||
display: table; |
|||
clear: both; |
|||
} |
|||
.timeline-c-box:first-child { |
|||
margin-top: 0; |
|||
} |
|||
.timeline-c-box:last-child { |
|||
margin-bottom: 0; |
|||
} |
|||
.timeline-c-box-icon{ |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
width: 40px; |
|||
height: 40px; |
|||
border-radius: 50%; |
|||
border: 3px solid #fff; |
|||
background-color: #3F51B5; |
|||
} |
|||
.timeline-c-box-icon i{ |
|||
display: block; |
|||
width: 40px; |
|||
height: 40px; |
|||
line-height: 40px; |
|||
color: #fff; |
|||
font-size: 25px; |
|||
text-align: center; |
|||
position: relative; |
|||
} |
|||
.timeline-c-box-content{ |
|||
position: relative; |
|||
margin-left: 60px; |
|||
border-radius: 0.25em; |
|||
padding: 1em; |
|||
background-color: #fff; |
|||
color: #333; |
|||
border: 1px solid #E1E1E1; |
|||
box-sizing: border-box; |
|||
border-radius: 5px; |
|||
} |
|||
.timeline-c-box-content::after{ |
|||
content: ""; |
|||
display: table; |
|||
clear: both; |
|||
} |
|||
.timeline-c-box-content::before{ |
|||
content: ''; |
|||
position: absolute; |
|||
top: 16px; |
|||
right: 100%; |
|||
height: 0; |
|||
width: 0; |
|||
border: 7px solid transparent; |
|||
border-right: 9px solid #E1E1E1; |
|||
} |
|||
.timeline-c-box-content .timeline-date{ |
|||
display: inline-block; |
|||
color: rgb(119,119,119); |
|||
} |
|||
.timeline-c-box-content p{ |
|||
margin: 1em 0; |
|||
line-height: 1.6; |
|||
} |
|||
.timeline-c-box-content .timeline-date{ |
|||
float: left; |
|||
padding: .8em 0; |
|||
} |
|||
/*===================================================== |
|||
Estilos products |
|||
======================================================*/ |
|||
.menu-categories ul li{ |
|||
display: inline-block; |
|||
margin: 5px 7px; |
|||
} |
|||
.menu-categories ul li a{ |
|||
text-decoration: none; |
|||
font-size: 19px; |
|||
font-family: "RobotoCondensedLight"; |
|||
} |
|||
.product-card{ |
|||
display: inline-block; |
|||
margin: 5px; |
|||
width: 300px; |
|||
text-align: left; |
|||
} |
|||
.product-card .mdl-card__actions button, |
|||
.product-card .mdl-card__actions a{ |
|||
float: right; |
|||
} |
|||
/*===================================================== |
|||
Media Queries |
|||
======================================================*/ |
|||
/*Phone*/ |
|||
@media (max-width: 479px){ |
|||
.hide-on-phone{ |
|||
width: 0; |
|||
height: 0; |
|||
pointer-events: none; |
|||
opacity: 0; |
|||
} |
|||
.visible-on-phone{ |
|||
pointer-events: auto; |
|||
opacity: 1; |
|||
} |
|||
.visible-on-tablet, |
|||
.visible-on-desktop{ |
|||
pointer-events: none; |
|||
opacity: 0; |
|||
width: 0; |
|||
height: 0; |
|||
} |
|||
.header-well-icon, |
|||
.header-well-text{ |
|||
position: relative; |
|||
display: block; |
|||
width: 100%; |
|||
text-align: center; |
|||
} |
|||
.tile{ |
|||
width: 97%; |
|||
} |
|||
.product-card{ |
|||
width: 100%; |
|||
margin: 0; |
|||
} |
|||
} |
|||
@media (max-width: 800px){ |
|||
.navLateral{ |
|||
width: 100%; |
|||
position: fixed; |
|||
pointer-events: none; |
|||
opacity: 0; |
|||
background-image: none; |
|||
} |
|||
.navLateral-bg{ |
|||
left: 0; |
|||
background-color: rgba(0,0,0,.5); |
|||
z-index: 81; |
|||
} |
|||
.navLateral-body{ |
|||
width: 300px; |
|||
background-color: #333; |
|||
} |
|||
.navLateral-body-logo .zmdi-close{ |
|||
position: absolute; |
|||
top: 0; |
|||
left: 11px; |
|||
padding: 0 9px; |
|||
cursor: pointer; |
|||
height: 45px; |
|||
line-height: 45px; |
|||
pointer-events: auto; |
|||
opacity: 1; |
|||
} |
|||
.navLateral-change{ |
|||
pointer-events: auto; |
|||
opacity: 1; |
|||
} |
|||
.pageContent{ |
|||
width: 100%; |
|||
padding-left: 0; |
|||
} |
|||
} |
|||
/*Tablet*/ |
|||
@media (min-width: 480px) and (max-width: 839px) { |
|||
.hide-on-tablet{ |
|||
width: 0; |
|||
height: 0; |
|||
pointer-events: none; |
|||
opacity: 0; |
|||
} |
|||
.visible-on-tablet{ |
|||
pointer-events: auto; |
|||
opacity: 1; |
|||
} |
|||
.visible-on-desktop, |
|||
.visible-on-phone{ |
|||
pointer-events: none; |
|||
opacity: 0; |
|||
width: 0; |
|||
height: 0; |
|||
} |
|||
.tile{ |
|||
width: 47%; |
|||
} |
|||
} |
|||
/*Desktop*/ |
|||
@media (min-width: 840px){ |
|||
.hide-on-desktop{ |
|||
width: 0; |
|||
height: 0; |
|||
pointer-events: none; |
|||
opacity: 0; |
|||
} |
|||
.visible-on-desktop{ |
|||
pointer-events: auto; |
|||
opacity: 1; |
|||
} |
|||
.visible-on-tablet, |
|||
.visible-on-phone{ |
|||
pointer-events: none; |
|||
opacity: 0; |
|||
width: 0; |
|||
height: 0; |
|||
} |
|||
/*======= Estilos linea de tiempo (TimeLine) en desktop*/ |
|||
#timeline-c{ |
|||
margin-top: 3em; |
|||
margin-bottom: 3em; |
|||
} |
|||
#timeline-c::before{ |
|||
left: 50%; |
|||
margin-left: -2px; |
|||
} |
|||
.timeline-c-box{ |
|||
margin: 4em 0; |
|||
} |
|||
.timeline-c-box:first-child{ |
|||
margin-top: 0; |
|||
} |
|||
.timeline-c-box:last-child{ |
|||
margin-bottom: 0; |
|||
} |
|||
.timeline-c-box-icon{ |
|||
left: 50%; |
|||
margin-left: -23px; |
|||
-webkit-transform: translateZ(0); |
|||
-webkit-backface-visibility: hidden; |
|||
} |
|||
.timeline-c-box-content{ |
|||
margin-left: 0; |
|||
width: 45%; |
|||
} |
|||
.timeline-c-box-content::before{ |
|||
top: 24px; |
|||
left: 100%; |
|||
border-color: transparent; |
|||
border-left-color: #E1E1E1; |
|||
} |
|||
.timeline-c-box-content .timeline-date{ |
|||
position: absolute; |
|||
width: 100%; |
|||
left: 122%; |
|||
top: 6px; |
|||
} |
|||
.timeline-c-box:nth-child(even) .timeline-c-box-content{ |
|||
float: right; |
|||
} |
|||
.timeline-c-box:nth-child(even) .timeline-c-box-content::before { |
|||
top: 24px; |
|||
left: auto; |
|||
right: 100%; |
|||
border-color: transparent; |
|||
border-right-color: #E1E1E1; |
|||
} |
|||
.timeline-c-box:nth-child(even) .timeline-c-box-content .timeline-date { |
|||
left: auto; |
|||
right: 122%; |
|||
text-align: right; |
|||
} |
|||
} |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,36 @@ |
|||
/* |
|||
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license |
|||
Click nbfs://nbhost/SystemFileSystem/Templates/Other/CascadeStyleSheet.css to edit this template |
|||
*/ |
|||
/* |
|||
Created on : Apr 24, 2024, 10:03:53 AM |
|||
Author : noemi |
|||
*/ |
|||
|
|||
* { |
|||
border-radius: 5px; |
|||
} |
|||
|
|||
body.thumb { |
|||
transform: scale(0.4); |
|||
box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important; |
|||
} |
|||
|
|||
main { |
|||
min-height: 80vh; |
|||
} |
|||
|
|||
[class*='container'] { |
|||
border: 1px dashed #eee; |
|||
background-clip: content-box; |
|||
} |
|||
|
|||
.row [class*='col'] { |
|||
background-color: #efefef; |
|||
background-clip: content-box; |
|||
} |
|||
|
|||
.nav-item { |
|||
background-color: #eeeeff; |
|||
background-clip: content-box; |
|||
} |
@ -0,0 +1,38 @@ |
|||
#introCarousel, |
|||
.carousel-inner, |
|||
.carousel-item, |
|||
.carousel-item.active { |
|||
height: 100vh; |
|||
} |
|||
|
|||
.carousel-item:nth-child(1) { |
|||
background-image: url('https://mdbootstrap.com/img/Photos/Others/images/76.jpg'); |
|||
background-repeat: no-repeat; |
|||
background-size: cover; |
|||
background-position: center center; |
|||
} |
|||
|
|||
.carousel-item:nth-child(2) { |
|||
background-image: url('https://mdbootstrap.com/img/Photos/Others/images/77.jpg'); |
|||
background-repeat: no-repeat; |
|||
background-size: cover; |
|||
background-position: center center; |
|||
} |
|||
|
|||
.carousel-item:nth-child(3) { |
|||
background-image: url('https://mdbootstrap.com/img/Photos/Others/images/78.jpg'); |
|||
background-repeat: no-repeat; |
|||
background-size: cover; |
|||
background-position: center center; |
|||
} |
|||
|
|||
/* Height for devices larger than 576px */ |
|||
@media (min-width: 992px) { |
|||
#introCarousel { |
|||
margin-top: -58.59px; |
|||
} |
|||
} |
|||
|
|||
.navbar .nav-link { |
|||
color: #fff !important; |
|||
} |
@ -0,0 +1,424 @@ |
|||
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ |
|||
|
|||
/** |
|||
* 1. Set default font family to sans-serif. |
|||
* 2. Prevent iOS and IE text size adjust after device orientation change, |
|||
* without disabling user zoom. |
|||
*/ |
|||
|
|||
html { |
|||
font-family: sans-serif; /* 1 */ |
|||
-ms-text-size-adjust: 100%; /* 2 */ |
|||
-webkit-text-size-adjust: 100%; /* 2 */ |
|||
} |
|||
|
|||
/** |
|||
* Remove default margin. |
|||
*/ |
|||
|
|||
body { |
|||
margin: 0; |
|||
} |
|||
|
|||
/* HTML5 display definitions |
|||
========================================================================== */ |
|||
|
|||
/** |
|||
* Correct `block` display not defined for any HTML5 element in IE 8/9. |
|||
* Correct `block` display not defined for `details` or `summary` in IE 10/11 |
|||
* and Firefox. |
|||
* Correct `block` display not defined for `main` in IE 11. |
|||
*/ |
|||
|
|||
article, |
|||
aside, |
|||
details, |
|||
figcaption, |
|||
figure, |
|||
footer, |
|||
header, |
|||
hgroup, |
|||
main, |
|||
menu, |
|||
nav, |
|||
section, |
|||
summary { |
|||
display: block; |
|||
} |
|||
|
|||
/** |
|||
* 1. Correct `inline-block` display not defined in IE 8/9. |
|||
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. |
|||
*/ |
|||
|
|||
audio, |
|||
canvas, |
|||
progress, |
|||
video { |
|||
display: inline-block; /* 1 */ |
|||
vertical-align: baseline; /* 2 */ |
|||
} |
|||
|
|||
/** |
|||
* Prevent modern browsers from displaying `audio` without controls. |
|||
* Remove excess height in iOS 5 devices. |
|||
*/ |
|||
|
|||
audio:not([controls]) { |
|||
display: none; |
|||
height: 0; |
|||
} |
|||
|
|||
/** |
|||
* Address `[hidden]` styling not present in IE 8/9/10. |
|||
* Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. |
|||
*/ |
|||
|
|||
[hidden], |
|||
template { |
|||
display: none; |
|||
} |
|||
|
|||
/* Links |
|||
========================================================================== */ |
|||
|
|||
/** |
|||
* Remove the gray background color from active links in IE 10. |
|||
*/ |
|||
|
|||
a { |
|||
background-color: transparent; |
|||
} |
|||
|
|||
/** |
|||
* Improve readability of focused elements when they are also in an |
|||
* active/hover state. |
|||
*/ |
|||
|
|||
a:active, |
|||
a:hover { |
|||
outline: 0; |
|||
} |
|||
|
|||
/* Text-level semantics |
|||
========================================================================== */ |
|||
|
|||
/** |
|||
* Address styling not present in IE 8/9/10/11, Safari, and Chrome. |
|||
*/ |
|||
|
|||
abbr[title] { |
|||
border-bottom: 1px dotted; |
|||
} |
|||
|
|||
/** |
|||
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome. |
|||
*/ |
|||
|
|||
b, |
|||
strong { |
|||
font-weight: bold; |
|||
} |
|||
|
|||
/** |
|||
* Address styling not present in Safari and Chrome. |
|||
*/ |
|||
|
|||
dfn { |
|||
font-style: italic; |
|||
} |
|||
|
|||
/** |
|||
* Address variable `h1` font-size and margin within `section` and `article` |
|||
* contexts in Firefox 4+, Safari, and Chrome. |
|||
*/ |
|||
|
|||
h1 { |
|||
font-size: 2em; |
|||
margin: 0.67em 0; |
|||
} |
|||
|
|||
/** |
|||
* Address styling not present in IE 8/9. |
|||
*/ |
|||
|
|||
mark { |
|||
background: #ff0; |
|||
color: #000; |
|||
} |
|||
|
|||
/** |
|||
* Address inconsistent and variable font size in all browsers. |
|||
*/ |
|||
|
|||
small { |
|||
font-size: 80%; |
|||
} |
|||
|
|||
/** |
|||
* Prevent `sub` and `sup` affecting `line-height` in all browsers. |
|||
*/ |
|||
|
|||
sub, |
|||
sup { |
|||
font-size: 75%; |
|||
line-height: 0; |
|||
position: relative; |
|||
vertical-align: baseline; |
|||
} |
|||
|
|||
sup { |
|||
top: -0.5em; |
|||
} |
|||
|
|||
sub { |
|||
bottom: -0.25em; |
|||
} |
|||
|
|||
/* Embedded content |
|||
========================================================================== */ |
|||
|
|||
/** |
|||
* Remove border when inside `a` element in IE 8/9/10. |
|||
*/ |
|||
|
|||
img { |
|||
border: 0; |
|||
} |
|||
|
|||
/** |
|||
* Correct overflow not hidden in IE 9/10/11. |
|||
*/ |
|||
|
|||
svg:not(:root) { |
|||
overflow: hidden; |
|||
} |
|||
|
|||
/* Grouping content |
|||
========================================================================== */ |
|||
|
|||
/** |
|||
* Address margin not present in IE 8/9 and Safari. |
|||
*/ |
|||
|
|||
figure { |
|||
margin: 1em 40px; |
|||
} |
|||
|
|||
/** |
|||
* Address differences between Firefox and other browsers. |
|||
*/ |
|||
|
|||
hr { |
|||
box-sizing: content-box; |
|||
height: 0; |
|||
} |
|||
|
|||
/** |
|||
* Contain overflow in all browsers. |
|||
*/ |
|||
|
|||
pre { |
|||
overflow: auto; |
|||
} |
|||
|
|||
/** |
|||
* Address odd `em`-unit font size rendering in all browsers. |
|||
*/ |
|||
|
|||
code, |
|||
kbd, |
|||
pre, |
|||
samp { |
|||
font-family: monospace, monospace; |
|||
font-size: 1em; |
|||
} |
|||
|
|||
/* Forms |
|||
========================================================================== */ |
|||
|
|||
/** |
|||
* Known limitation: by default, Chrome and Safari on OS X allow very limited |
|||
* styling of `select`, unless a `border` property is set. |
|||
*/ |
|||
|
|||
/** |
|||
* 1. Correct color not being inherited. |
|||
* Known issue: affects color of disabled elements. |
|||
* 2. Correct font properties not being inherited. |
|||
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome. |
|||
*/ |
|||
|
|||
button, |
|||
input, |
|||
optgroup, |
|||
select, |
|||
textarea { |
|||
color: inherit; /* 1 */ |
|||
font: inherit; /* 2 */ |
|||
margin: 0; /* 3 */ |
|||
} |
|||
|
|||
/** |
|||
* Address `overflow` set to `hidden` in IE 8/9/10/11. |
|||
*/ |
|||
|
|||
button { |
|||
overflow: visible; |
|||
} |
|||
|
|||
/** |
|||
* Address inconsistent `text-transform` inheritance for `button` and `select`. |
|||
* All other form control elements do not inherit `text-transform` values. |
|||
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. |
|||
* Correct `select` style inheritance in Firefox. |
|||
*/ |
|||
|
|||
button, |
|||
select { |
|||
text-transform: none; |
|||
} |
|||
|
|||
/** |
|||
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` |
|||
* and `video` controls. |
|||
* 2. Correct inability to style clickable `input` types in iOS. |
|||
* 3. Improve usability and consistency of cursor style between image-type |
|||
* `input` and others. |
|||
*/ |
|||
|
|||
button, |
|||
html input[type="button"], /* 1 */ |
|||
input[type="reset"], |
|||
input[type="submit"] { |
|||
-webkit-appearance: button; /* 2 */ |
|||
cursor: pointer; /* 3 */ |
|||
} |
|||
|
|||
/** |
|||
* Re-set default cursor for disabled elements. |
|||
*/ |
|||
|
|||
button[disabled], |
|||
html input[disabled] { |
|||
cursor: default; |
|||
} |
|||
|
|||
/** |
|||
* Remove inner padding and border in Firefox 4+. |
|||
*/ |
|||
|
|||
button::-moz-focus-inner, |
|||
input::-moz-focus-inner { |
|||
border: 0; |
|||
padding: 0; |
|||
} |
|||
|
|||
/** |
|||
* Address Firefox 4+ setting `line-height` on `input` using `!important` in |
|||
* the UA stylesheet. |
|||
*/ |
|||
|
|||
input { |
|||
line-height: normal; |
|||
} |
|||
|
|||
/** |
|||
* It's recommended that you don't attempt to style these elements. |
|||
* Firefox's implementation doesn't respect box-sizing, padding, or width. |
|||
* |
|||
* 1. Address box sizing set to `content-box` in IE 8/9/10. |
|||
* 2. Remove excess padding in IE 8/9/10. |
|||
*/ |
|||
|
|||
input[type="checkbox"], |
|||
input[type="radio"] { |
|||
box-sizing: border-box; /* 1 */ |
|||
padding: 0; /* 2 */ |
|||
} |
|||
|
|||
/** |
|||
* Fix the cursor style for Chrome's increment/decrement buttons. For certain |
|||
* `font-size` values of the `input`, it causes the cursor style of the |
|||
* decrement button to change from `default` to `text`. |
|||
*/ |
|||
|
|||
input[type="number"]::-webkit-inner-spin-button, |
|||
input[type="number"]::-webkit-outer-spin-button { |
|||
height: auto; |
|||
} |
|||
|
|||
/** |
|||
* 1. Address `appearance` set to `searchfield` in Safari and Chrome. |
|||
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome. |
|||
*/ |
|||
|
|||
input[type="search"] { |
|||
-webkit-appearance: textfield; /* 1 */ |
|||
box-sizing: content-box; /* 2 */ |
|||
} |
|||
|
|||
/** |
|||
* Remove inner padding and search cancel button in Safari and Chrome on OS X. |
|||
* Safari (but not Chrome) clips the cancel button when the search input has |
|||
* padding (and `textfield` appearance). |
|||
*/ |
|||
|
|||
input[type="search"]::-webkit-search-cancel-button, |
|||
input[type="search"]::-webkit-search-decoration { |
|||
-webkit-appearance: none; |
|||
} |
|||
|
|||
/** |
|||
* Define consistent border, margin, and padding. |
|||
*/ |
|||
|
|||
fieldset { |
|||
border: 1px solid #c0c0c0; |
|||
margin: 0 2px; |
|||
padding: 0.35em 0.625em 0.75em; |
|||
} |
|||
|
|||
/** |
|||
* 1. Correct `color` not being inherited in IE 8/9/10/11. |
|||
* 2. Remove padding so people aren't caught out if they zero out fieldsets. |
|||
*/ |
|||
|
|||
legend { |
|||
border: 0; /* 1 */ |
|||
padding: 0; /* 2 */ |
|||
} |
|||
|
|||
/** |
|||
* Remove default vertical scrollbar in IE 8/9/10/11. |
|||
*/ |
|||
|
|||
textarea { |
|||
overflow: auto; |
|||
} |
|||
|
|||
/** |
|||
* Don't inherit the `font-weight` (applied by a rule above). |
|||
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X. |
|||
*/ |
|||
|
|||
optgroup { |
|||
font-weight: bold; |
|||
} |
|||
|
|||
/* Tables |
|||
========================================================================== */ |
|||
|
|||
/** |
|||
* Remove most spacing between table cells. |
|||
*/ |
|||
|
|||
table { |
|||
border-collapse: collapse; |
|||
border-spacing: 0; |
|||
} |
|||
|
|||
td, |
|||
th { |
|||
padding: 0; |
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue