<script src="<?php echo ADMIN_URL;?>/assets/js/jquery.dataTables.min.js"></script>
<script src="<?php echo ADMIN_URL;?>/assets/js/dataTables.bootstrap4.min.js"></script>

	<div class="row">
		<div class="col-xl-12">
			<div class="breadcrumb-holder">
				<h1 class="main-title float-left"><i class="fa fa-users"></i> Usuarios</h1>
					<ol class="breadcrumb float-right">
						<a id="btnNuevo" role="button" href="#" class="btn btn-secondary"><span class="btn-label"><i class="fa fa-plus"></i></span>Nuevo</a>
                    </ol>
                    <div class="clearfix"></div>
            </div>
		</div>
	</div>
	<div class="row">
	
		<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">						
			<div class="card mb-12">
				<div class="card-header">
					<h3><i class="fa fa-table"></i> Catalogo de usuarios</h3>					
				</div>
					
				<div class="card-body">
					<table id="tablaUsuarios" class="table table-bordered table-hover display" cellspacing="0" width="100%">
						  <thead>
							<tr>
							  <th data-field="id">Nombre</th>
							  <th data-field="name">Paterno</th>
							  <th data-field="price">Materno</th>
							  <th data-field="price"></th>
							</tr>			
						  </thead>
					</table>
				</div>														
			</div><!-- end card-->					
		</div>	
	</div>
    <!-- end row -->
	
	<input type="hidden" id="hfIdSeleccionado">
	<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modal_add_user" id="modal_add_user" aria-hidden="true" style="display: none;">
	<div class="modal-dialog">
    	<div class="modal-content">
        			
            <div class="modal-header">
          	<h5 class="modal-title" id="modal_add_user">Detalles del usuario</h5>
			<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>          	
			</div>
				
			<div class="modal-body">               
				                
				<div class="row">
					<div class="col-lg-6">
						<div class="form-group">
						<label>Nombre</label>
							<input id="txtNombre" class="form-control"  type="text" onfocus="removeHas('txtNombre');">
						</div>
					</div>
					<div class="col-lg-6">
						<div class="form-group">
						<label>Apellido paterno</label>
							<input id="txtPaterno" class="form-control"  type="text" onfocus="removeHas('txtPaterno');">
						</div>
					</div>
					<div class="col-lg-6">
						<div class="form-group">
						<label>Apellido materno</label>
							<input id="txtMaterno" class="form-control"  type="text" onfocus="removeHas('txtMaterno');">
						</div>
					</div>
					<div class="col-lg-6">
						<div class="form-group">
						<label>Correo</label>
							<input id="txtCorreo" class="form-control"  type="text" onfocus="removeHas('txtCorreo');">
						</div>
					</div>
				</div>
									
				<div class="row">
					<div class="col-lg-6">
						<div class="form-group">
							<label>Usuario</label>
							<input class="form-control" id="txtUsuario" type="email" onfocus="removeHas('txtUsuario');">
						</div>
					</div>  
					
					<div class="col-lg-6">
						<div class="form-group">
							<label>Contraseña</label>
							<input id="txtContrasenia" class="form-control" type="text" onfocus="removeHas('txtContrasenia');">
						</div>
					</div>  
				</div>
				<div class="row">
					<div class="col-lg-12">
						<div class="form-group">
							<label>Rol</label>
							<select id="ddlRol" name="role_id" class="form-control" onfocus="removeHas('ddlRol');">
								<option value="-1">-Seleccione-</option>
								<option value="0">Administrador</option>
								<option value="1">Cliente</option>
							</select>
						</div>
					</div>  
					
					<div id="divCliente" class="col-lg-12" style="display:none">
						<div class="form-group">
							<label>Cliente</label>
							<select id="ddlCliente" name="role_id" class="form-control" onfocus="removeHas('ddlCliente');">
							</select>
						</div>
					</div>  
				</div>

				<div>
					<input id="chekApertura" type="checkbox" class="icheckbox_flat-green" style="margin: 5px;">Notificar <span class="etiquetaVerde">Apertura</span><br>
					<input id="chekDesconsolidacion" type="checkbox" class="icheckbox_flat-green" style="margin: 5px;">Notificar <span class="etiquetaVerde">Desconsolidación</span><br>
					<input id="chekRevision" type="checkbox" class="icheckbox_flat-green" style="margin: 5px;">Notificar <span class="etiquetaVerde">Revisión</span><br>
					<input id="chekConsolidacion" type="checkbox" class="icheckbox_flat-green" style="margin: 5px;">Notificar <span class="etiquetaVerde">Consolidación</span><br>
					<input id="chekCierre" type="checkbox" class="icheckbox_flat-green" style="margin: 5px;">Notificar <span class="etiquetaVerde">Cierre</span><br>
				</div>
								
            </div>             
			
			<div class="modal-footer">
				<button id="btnGuardar" class="btn btn-secondary"><i class="iconoBoton fa fa-save"></i>Guardar</button>
				<button id="btnActualizar" class="btn btn-secondary"><i class="iconoBoton fa fa-save"></i>Actualizar</button>
				<button id="btnEliminar" class="btn btn-secondary"><i class="iconoBoton fa fa-trash"></i>Eliminar</button>
				<button type="button" class="btn btn-secondary" data-dismiss="modal"><i class="iconoBoton fa fa-close"></i>Cancelar</button>
			</div>
				
			
        </div>
	</div>
</div>
	
<script src="<?php echo ADMIN_URL;?>/Scripts/catUsuarios.js"></script>
