Compare commits
10 Commits
2e8eab5911
...
f096620b3c
| Author | SHA1 | Date | |
|---|---|---|---|
| f096620b3c | |||
| 62f10c084f | |||
| efb54e33ab | |||
| d17828d74d | |||
| cc0ca17a14 | |||
| 40ddf5a541 | |||
| 7a8dbc2420 | |||
| 98f4822082 | |||
| fb1bd35a4e | |||
| cd1e1edf5c |
@ -66,7 +66,8 @@
|
||||
if($usuario->tieneRol("3") ||$usuario->tieneRol("1")){
|
||||
echo '<a href="addPedido.php" class="menuOption" style="color:#000000">'.$this->locale['1008'].'</a>';
|
||||
}
|
||||
echo '<a href="buscar_pedido.php" class="menuOption" style="color:#000000">'.$this->locale['1009'].'</a>';
|
||||
|
||||
//echo '<a href="buscar_pedido.php" class="menuOption" style="color:#000000">'.$this->locale['1009'].'</a>';
|
||||
// Buscar candidatos
|
||||
/*if(substr_count($_SERVER['REQUEST_URI'],"/pedido.php?idPedido")==1){
|
||||
echo '<a href="buscar.php" class="menuOption" target="_blank" style="color:#000000">'.$this->locale['820'].'</a>';
|
||||
|
||||
@ -41,7 +41,14 @@ class ListaOfertas {
|
||||
function getOfertas() {
|
||||
// sacado de http://patrickallaert.blogspot.com/2007/09/building-dynamic-sql-queries-elegant.html
|
||||
|
||||
$consulta = "SELECT * FROM candidato_pedido";
|
||||
// $consulta = "SELECT * FROM candidato_pedido";
|
||||
$consulta = "SELECT
|
||||
candidato_pedido.`oid`, candidato_pedido.`referencia`, candidato_pedido.`candidato`, CONCAT(usuarios.nombre, ' ', usuarios.apellidos) as nombre_candidato, candidato_pedido.`pedido`, pedidos.nombre as nombre_solicitud,
|
||||
candidato_pedido.`afinidad`, candidato_pedido.`estado`, candidato_pedido.`RRHH`, candidato_pedido.`fecha`,
|
||||
candidato_pedido.`obsGerente`, candidato_pedido.`obsRRHH`, candidato_pedido.`gerente`, candidato_pedido.`salario_ofertado`
|
||||
FROM candidato_pedido
|
||||
LEFT JOIN usuarios on usuarios.oid = candidato_pedido.candidato
|
||||
LEFT JOIN pedidos on pedidos.oid = candidato_pedido.pedido";
|
||||
|
||||
if (count($this->condiciones)) {
|
||||
$consulta .= ' WHERE ' . implode(' AND ', $this->condiciones);
|
||||
@ -53,6 +60,7 @@ class ListaOfertas {
|
||||
|
||||
$bd = new BD();
|
||||
$resultado = $bd->execQuery($consulta);
|
||||
//echo $consulta;
|
||||
// Procesamos las ofertas.
|
||||
if (mysql_num_rows($resultado) == 0) {
|
||||
$this->ofertas = array();
|
||||
|
||||
@ -72,7 +72,7 @@ include_once("Objects/Pedido.php");
|
||||
$estado = $this->tipo;
|
||||
if($this->pedidos == null){
|
||||
//Modificamos la consulta en función del rol.
|
||||
if($this->gestor->tieneRol(4) || $this->gestor->tieneRol(1)){
|
||||
if($this->gestor->tieneRol(4) || $this->gestor->tieneRol(1) || $this->gestor->tieneRol(7)){
|
||||
if($this->sql != ""){
|
||||
// metemos el tipo si es >0
|
||||
if($estado > 0){
|
||||
@ -94,9 +94,23 @@ include_once("Objects/Pedido.php");
|
||||
$consulta = $sqlNueva." ".$this->order_by;
|
||||
}else{
|
||||
if($estado > 0){
|
||||
$consulta = "SELECT * from pedidos WHERE estado='".$estado."'".$this->orden ;
|
||||
$consulta = "SELECT * from pedidos WHERE estado='".$estado."'";
|
||||
|
||||
//En el caso de ser un usuario de cliente para ver sus pedidos filtramos por cliente
|
||||
if (($this->gestor->tieneRol(7)) && ($this->gestor->getValor("cliente_actual")>0)){
|
||||
$consulta .= " and cliente = ". $this->gestor->getValor("cliente_actual") . " ";
|
||||
}
|
||||
|
||||
$consulta .= $this->orden;
|
||||
}else{
|
||||
$consulta = "SELECT * from pedidos ".$this->orden."";
|
||||
$consulta = "SELECT * from pedidos ";
|
||||
|
||||
//En el caso de ser un usuario de cliente para ver sus pedidos filtramos por cliente
|
||||
if (($this->gestor->tieneRol(7)) && ($this->gestor->getValor("cliente_actual")>0)){
|
||||
$consulta .= " where cliente = ". $this->gestor->getValor("cliente_actual") . " ";
|
||||
}
|
||||
|
||||
$consulta .= $this->orden;
|
||||
}
|
||||
}
|
||||
}else if($this->gestor->tieneRol(3)){
|
||||
@ -132,6 +146,7 @@ include_once("Objects/Pedido.php");
|
||||
}
|
||||
|
||||
$bd=new BD();
|
||||
|
||||
$resultado = $bd->execQuery($consulta);
|
||||
//Procesamos los pedidos.
|
||||
if(mysql_num_rows($resultado) == 0){
|
||||
|
||||
@ -296,7 +296,7 @@ if ($nombre == "estado") {
|
||||
}
|
||||
|
||||
function getNumOfertasCandidato($oid) {
|
||||
$consulta = "SELECT * FROM candidato_pedido WHERE candidato='$oid' ORDER BY fecha DESC";
|
||||
$consulta = "SELECT * FROM candidato_pedido WHERE candidato='$oid' and estado not in (160,170) ORDER BY fecha DESC";
|
||||
$bd = new BD();
|
||||
$resultado = $bd->execQuery($consulta);
|
||||
return mysql_num_rows($resultado);
|
||||
@ -310,8 +310,8 @@ if ($nombre == "estado") {
|
||||
$estadoCand = $candidato->getValor("estado");
|
||||
$numOfertasCandidato = $this->getNumOfertasCandidato($idCand);
|
||||
switch ($estadoCand) {
|
||||
//TODO CANDIDATO ASOCIADO A UNA OFERTA (este como este su situación) pasará a En proceso:disponible si no tiene alguna otra oferta,
|
||||
//el estado del candidato no cambia si está asociado a alguna otra oferta. se cambia a los nuevos estados #723 Peticion
|
||||
//TODO CANDIDATO ASOCIADO A UNA OFERTA (este como este su situación) pasará a En proceso:disponible si no tiene alguna otra oferta distinta de Rechazada 160 o Retirada 170,
|
||||
//el estado del candidato no cambia si está asociado a alguna otra oferta que no sea Rechazada 160 o Retirada 170. se cambia a los nuevos estados #723 Peticion
|
||||
case 600:;
|
||||
case 560:;
|
||||
case 510:;
|
||||
@ -327,7 +327,7 @@ if ($nombre == "estado") {
|
||||
$mensaje = "El candidato ".$nombre_candidato." se quita de la oferta";
|
||||
$this->actualizarHistorial($mensaje);
|
||||
//Cambiamos de estado al candidato
|
||||
if ($numOfertasCandidato <= 1) {
|
||||
if ($numOfertasCandidato < 1) {
|
||||
$candidato->transita("540", "");
|
||||
}
|
||||
return true;
|
||||
|
||||
@ -13,7 +13,7 @@ if(!$usuario->tieneRol("7")) {
|
||||
include("tablero.php");
|
||||
}
|
||||
else {
|
||||
header("Location: lista_ofertas.php");
|
||||
header("Location: lista_pedidos.php");
|
||||
}
|
||||
|
||||
if($_SESSION["oid"]){
|
||||
|
||||
@ -13,7 +13,6 @@ include_once("html/cabecera.php");
|
||||
include_once("Objects/HTML.php");
|
||||
$html=new HTML($locale);
|
||||
echo $html->menuCandidatos();
|
||||
$errores = "";
|
||||
|
||||
include_once("Objects/ListaCandidatos.php");
|
||||
$listaCandidatos=new ListaCandidatos($usuario,"","","10");
|
||||
@ -24,6 +23,8 @@ $camposPermitidos = array("nombre", "apellidos", "observaciones");
|
||||
////////////////////////////
|
||||
// Proceso del Formulario
|
||||
///////////////////////////
|
||||
$errores=array();
|
||||
$error = "";
|
||||
$order_by="";
|
||||
if(!empty($_GET["order"])){
|
||||
$order_by = " ORDER by ".$_GET["order"]." ".$_GET["modo"];
|
||||
@ -39,7 +40,16 @@ if (isset($_GET['byEstado'])) {
|
||||
|
||||
if ((isset($_SESSION['campos'])) && ($_SESSION['campos'] != ""))
|
||||
$_POST['campo'] = $_SESSION['campos'];
|
||||
|
||||
if ((isset($_SESSION['salario_busqueda_min'])) && ($_SESSION['salario_busqueda_min'] != ""))
|
||||
$_POST['salario_busqueda_min'] = $_SESSION['salario_busqueda_min'];
|
||||
|
||||
if ((isset($_SESSION['salario_busqueda_max'])) && ($_SESSION['salario_busqueda_max'] != ""))
|
||||
$_POST['salario_busqueda_max'] = $_SESSION['salario_busqueda_max'];
|
||||
|
||||
if ((isset($_SESSION['idiomas'])) && ($_SESSION['idiomas'] != ""))
|
||||
$_POST['idiomas'] = $_SESSION['idiomas'];
|
||||
|
||||
if ((isset($_SESSION['perfiles_tecnicos'])) && ($_SESSION['perfiles_tecnicos'] != ""))
|
||||
$_POST['id_perfil_tecnico'] = $_SESSION['perfiles_tecnicos'];
|
||||
|
||||
@ -71,7 +81,54 @@ if ((isset($_POST['buscar'])) || (isset($_GET['byEstado']))) {
|
||||
}
|
||||
}
|
||||
if (($palabra != "") && (count($campos) == 0)) {
|
||||
$errores = $locale['01903'];
|
||||
$errores[]="1";
|
||||
$error .= $locale['01903']."<br />";
|
||||
}
|
||||
|
||||
$whereSalario="";
|
||||
$salario_busqueda_min=$_POST['salario_busqueda_min'];
|
||||
$salario_busqueda_max=$_POST['salario_busqueda_max'];
|
||||
//VALIDAMOS QUE LOS VALORES SELECCIONADOS SE CORRESPONDAN A NUMÉRICOS Y QUE EL MIN SEA MENOR QUE EL MAX
|
||||
$resul;
|
||||
$valor_minimo="";
|
||||
$valor_maximo="";
|
||||
$bdconsulta=new BD();
|
||||
|
||||
$sql = "SELECT nombre from salario where (id = ". $salario_busqueda_min .")";
|
||||
$resul = $bdconsulta->execQuery($sql);
|
||||
while($fila = mysql_fetch_array($resul)) {
|
||||
$valor_minimo = str_replace(".", "", $fila["nombre"]);
|
||||
}
|
||||
|
||||
$sql = "SELECT nombre from salario where (id = ". $salario_busqueda_max .")";
|
||||
$resul = $bdconsulta->execQuery($sql);
|
||||
while($fila = mysql_fetch_array($resul)) {
|
||||
$valor_maximo = str_replace(".", "", $fila["nombre"]);
|
||||
}
|
||||
|
||||
if (($valor_minimo!="")) {
|
||||
if (is_numeric($valor_minimo)) {
|
||||
$tablas .= ", salario salario1";
|
||||
$whereSalario = "((replace(replace(salario1.nombre, ',', '' ) , '.', '' ) >= ". $valor_minimo . ") and (salario1.id = usuarios.salario_min))";
|
||||
}
|
||||
else {
|
||||
$errores[]="2";
|
||||
$error .= $locale['01904']."<br />";
|
||||
}
|
||||
}
|
||||
|
||||
if (($valor_maximo!="")) {
|
||||
if (is_numeric($valor_maximo) && ($valor_minimo <= $valor_maximo)) {
|
||||
$tablas .= ", salario salario2";
|
||||
if ($whereSalario != "") {
|
||||
$whereSalario = $whereSalario . " and ";
|
||||
}
|
||||
$whereSalario .= "((replace(replace(salario1.nombre, ',', '' ) , '.', '' ) <= ". $valor_maximo . ") and (salario2.id = usuarios.salario_max))";
|
||||
}
|
||||
else {
|
||||
$errores[]="2";
|
||||
$error .= $locale['01904']."<br />";
|
||||
}
|
||||
}
|
||||
|
||||
$SemaforoPerfilTec = false;
|
||||
@ -119,19 +176,41 @@ if ((isset($_POST['buscar'])) || (isset($_GET['byEstado']))) {
|
||||
$whereTecnologias = $whereTecnologias . "(capacidades_perfil_tecnologias.id_tecnologia = ". $tecnologia ." and capacidades_perfil_tecnologias.id_capacidad = capacidades3.id and capacidades3.id_usuario = usuarios.oid)";
|
||||
}
|
||||
|
||||
$SemaforoIdiomas = false;
|
||||
$idiomas = $_POST["idiomas"];
|
||||
$whereIdiomas="";
|
||||
foreach($idiomas as $idioma)
|
||||
if ($idioma != "") {
|
||||
if(!$SemaforoIdiomas)
|
||||
$tablas .= ", idioma_usuario";
|
||||
$SemaforoIdiomas = true;
|
||||
|
||||
if ($whereIdiomas != "") {
|
||||
$whereIdiomas = $whereIdiomas . " or ";
|
||||
}
|
||||
$whereIdiomas = $whereIdiomas . "(idioma_usuario.idioma = ". $idioma ." and idioma_usuario.oid_i = usuarios.oid)";
|
||||
}
|
||||
|
||||
//Vamos a meter los parametros de busqueda en session para que en la paginación no se pierdan
|
||||
$_SESSION['palabra']=$palabra;
|
||||
$_SESSION['campos']=$campos;
|
||||
$_SESSION['idiomas']=$idiomas;
|
||||
$_SESSION['perfiles_tecnicos']=$perfiles_tec;
|
||||
$_SESSION['perfiles_funcionales']=$perfiles_fun;
|
||||
$_SESSION['tecnologias']=$tecnologias;
|
||||
$_SESSION['salario_busqueda_min']=$salario_busqueda_min;
|
||||
$_SESSION['salario_busqueda_max']=$salario_busqueda_max;
|
||||
|
||||
if ($errores == "") {
|
||||
if ($error == "") {
|
||||
$query = "SELECT distinct usuarios.* from ". $tablas ." where (usuarios.tipo = 'candidato')";
|
||||
if (($tipoPedidos != "") && ($tipoPedidos != 0))
|
||||
$query = $query . " and (estado = ". $tipoPedidos .")";
|
||||
if ($whereCampos != "")
|
||||
$query = $query . " and (". $whereCampos .")";
|
||||
if ($whereSalario != "")
|
||||
$query = $query . " and (". $whereSalario .")";
|
||||
if ($whereIdiomas != "")
|
||||
$query = $query . " and (". $whereIdiomas .")";
|
||||
if ($wherePerfilesTec != "")
|
||||
$query = $query . " and (". $wherePerfilesTec .")";
|
||||
if ($wherePerfilesFun != "")
|
||||
@ -151,21 +230,23 @@ $_SESSION['tecnologias']=$tecnologias;
|
||||
<h2><?php echo $locale['820']; ?></h2>
|
||||
|
||||
<?php
|
||||
if($errores!=""){
|
||||
if($error!=""){
|
||||
// Mostramos el mensaje
|
||||
echo "<div class=\"aviso error\">".$errores."</div>";
|
||||
echo "<div class=\"aviso error\">".$error."</div>";
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="encabezado"><?php echo $locale['Candidato007']; ?></div>
|
||||
<table align="center" width="100%" border="0">
|
||||
<tr>
|
||||
<td width="10%">
|
||||
<td width="12%">
|
||||
|
||||
<?php echo $locale['01901'] .'<br><input type="text" name="palabra" value="'. $_POST['palabra'] .'"></td>';
|
||||
<?php echo $locale['01901'] .'<br><input type="text" name="palabra" value="'. $_POST['palabra'] .'"><br/>
|
||||
<p>* Para la búsqueda en los ficheros de currículums, se devolverán como máximo los 100 primeros resultados.</p>
|
||||
</td>';
|
||||
|
||||
echo '<td width="90%"';
|
||||
if ($errores != "") echo " class=\"errorcampo\"";
|
||||
echo '<td width="6%"';
|
||||
if (in_array("1",$errores)) echo " class=\"errorcampo\"";
|
||||
echo '>'. $locale['01902'];
|
||||
?>
|
||||
<br><select multiple name="campo[]" id="campo" size="10">
|
||||
@ -184,8 +265,26 @@ while($row = mysql_fetch_row($resultado)) {
|
||||
?>
|
||||
<option <?php echo (in_array('cv', $_POST['campo'])) ? "selected" : ""; ?> value="cv"><?php echo $locale['5108']; ?></option>
|
||||
</select>
|
||||
<p>* Para la búsqueda en los ficheros de currículums, se devolverán como máximo los 100 primeros resultados.</p>
|
||||
|
||||
|
||||
</td>
|
||||
<td width="11%">
|
||||
<?php
|
||||
echo $locale['123'].'<br>';
|
||||
echo $html->listaSelect("idiomas","oid","id","idiomas",array("",$locale['ns']),$_POST['idiomas'],true,true,"15");
|
||||
?>
|
||||
<td width="71%"
|
||||
<?php
|
||||
if (in_array("2",$errores)) echo " class=\"errorcampo\"";
|
||||
echo '>';
|
||||
|
||||
echo $locale['130busqueda01'];
|
||||
$opcionvacia = '<option value="">'.$locale['ns'].'</option>';
|
||||
echo rellena_desplegable_select_oidCol("salario","id","nombre","salario_busqueda_min",$opcionvacia,$_POST['salario_busqueda_min']);
|
||||
echo $locale['130busqueda02'];
|
||||
echo rellena_desplegable_select_oidCol("salario","id","nombre","salario_busqueda_max",$opcionvacia,$_POST['salario_busqueda_max']);
|
||||
?>
|
||||
<br/><p>* No se tendrá en cuenta candidatos cuyo salario mínimo no sea numérico</p>
|
||||
</td>
|
||||
</tr></table>
|
||||
<input type="submit" value="Buscar" name="buscar">
|
||||
@ -193,19 +292,19 @@ while($row = mysql_fetch_row($resultado)) {
|
||||
<div class="encabezado"><?php echo $locale['Capacidades004']; ?></div>
|
||||
<table align="center" width="100%" border="0">
|
||||
<tr>
|
||||
<td width="20%">
|
||||
<td width="18%">
|
||||
<?php
|
||||
echo $locale['202']. "<br>";
|
||||
echo $html->listaSelect("perfil","oid","id","id_perfil_tecnico",array("",$locale['ns']),$_POST['id_perfil_tecnico'],true,true,"15");
|
||||
?>
|
||||
</td>
|
||||
<td width="20%">
|
||||
<td width="12%">
|
||||
<?php
|
||||
echo $locale['203'].'<br>';
|
||||
echo $html->listaSelect("tecnologia","oid","id","tecnologias",array("",$locale['ns']),$_POST['tecnologias'],true,true,"15");
|
||||
?>
|
||||
</td>
|
||||
<td width="60%">
|
||||
<td width="70%">
|
||||
<?php
|
||||
echo $locale['202_2'].'<br>';
|
||||
echo $html->listaSelect("perfil_funcional","oid","id","id_perfil_funcional",array("",$locale['ns']),$_POST['id_perfil_funcional'],true,true,"15");
|
||||
|
||||
@ -302,7 +302,7 @@ VerListaCapacidadesProfesionales($CapacidadesProfesionales, "detalle_candidato")
|
||||
|
||||
<?php }
|
||||
if (in_array("curriculum", $mostrarDetalle)) { ?>
|
||||
<!-- CURR<EFBFBD>CULUM -->
|
||||
<!-- CURRICULUM -->
|
||||
<div class="encabezado"><?php echo $locale['1549']; ?></div>
|
||||
<table align="center" width="100%">
|
||||
<tr align="center">
|
||||
@ -315,7 +315,7 @@ if (in_array("curriculum", $mostrarDetalle)) { ?>
|
||||
<?php echo ver_curriculums($persona->getValor("oid"), $tipo); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- A<EFBFBD>ADIR NUEVO CURR<EFBFBD>CULUM -->
|
||||
<!-- ANADIR NUEVO CURRICULUM -->
|
||||
<?php if (in_array("addCurriculum", $mostrarDetalle)) { ?>
|
||||
<tr>
|
||||
<form action="<?php echo $destinoURL; ?>?oid=<?php echo $persona->getValor("oid") ?>" method="POST" enctype="multipart/form-data">
|
||||
@ -332,7 +332,8 @@ if (in_array("curriculum", $mostrarDetalle)) { ?>
|
||||
|
||||
<?php }
|
||||
if ((in_array("candidaturas", $mostrarDetalle)) &&
|
||||
(($persona->getValor("estado") == "540") ||
|
||||
(($persona->getValor("estado") == "530") ||
|
||||
($persona->getValor("estado") == "540") ||
|
||||
($persona->getValor("estado") == "560"))) { ?>
|
||||
<!-- CANDIDATURAS -->
|
||||
<div class="encabezado"><?php echo $locale['1551']; ?></div>
|
||||
|
||||
@ -120,6 +120,8 @@ $locale['127'] = "Historial:";
|
||||
$locale['128'] = "Vía:";
|
||||
$locale['129'] = "Salario mínimo: ";
|
||||
$locale['130'] = "Salario máximo: ";
|
||||
$locale['130busqueda01'] = "Salario mínimo mayor o igual que ";
|
||||
$locale['130busqueda02'] = " y menor o igual que ";
|
||||
$locale['131usuario'] = "Situación: ";
|
||||
$locale['131candidato'] = "Situación*: ";
|
||||
$locale['132'] = "Estado: ";
|
||||
@ -884,6 +886,7 @@ $locale['1905'] = "Extenxión";
|
||||
$locale['01901'] = "Palabra";
|
||||
$locale['01902'] = "Buscar en";
|
||||
$locale['01903'] = "Debe elegir, al menos, un campo en el que buscar la palabra";
|
||||
$locale['01904'] = "El intervalo salarial elegido, no es correcto, asegurese que el valor inicial es menor que el final, y los valores elegidos sean numéricos";
|
||||
|
||||
//Informes:
|
||||
$locale['2000'] = "Lista de informes";
|
||||
|
||||
@ -25,7 +25,7 @@ $modo = (!empty($_GET['modo'])) ? $_GET["modo"] : "";
|
||||
// sacado de http://patrickallaert.blogspot.com/2007/09/building-dynamic-sql-queries-elegant.html
|
||||
$cond = array();
|
||||
if ($tipoOfertas != "") {
|
||||
$cond[] = "estado = '$tipoOfertas'";
|
||||
$cond[] = "candidato_pedido.estado = '$tipoOfertas'";
|
||||
}
|
||||
|
||||
$orden = array();
|
||||
|
||||
@ -4,7 +4,8 @@ include("seguridad.php");
|
||||
include("functions.php");
|
||||
if(!$usuario->tieneRol("4")
|
||||
&& !$usuario->tieneRol("1")
|
||||
&& !$usuario->tieneRol("3")){
|
||||
&& !$usuario->tieneRol("3")
|
||||
&& !$usuario->tieneRol("7")){
|
||||
header("Location: aplicacion.php?e=permiso&rol=".$usuario->getValor("rol"));
|
||||
exit;
|
||||
}
|
||||
@ -34,7 +35,6 @@ $tipoPedidos = (isset($_GET["byEstado"]) && ($_GET['byEstado'] != "")) ? $_GET['
|
||||
|
||||
$listaPedidos=new ListaPedido($usuario,$order_by,"",$tipoPedidos);
|
||||
|
||||
|
||||
include_once("ver_lista_pedidos.php");
|
||||
|
||||
|
||||
|
||||
@ -18,6 +18,7 @@ $pedidos=$_POST['propPed'];
|
||||
$back=$_POST['back'];
|
||||
$observacion=$_POST['obsProponer'];
|
||||
$salario_ofertado=$_POST['salario_ofertado'];
|
||||
$gerente=$usuario->getValor("oid");
|
||||
|
||||
$listaOfertas = new ListaOfertas($usuario, "", "", "0");
|
||||
$arrayInsert = array();
|
||||
@ -28,8 +29,8 @@ foreach($pedidos as $codigo) {
|
||||
$arrayInsert["obsGerente"] = $observacion;
|
||||
$arrayInsert["estado"] = "100";
|
||||
$arrayInsert["candidato"] = $idCandidato;
|
||||
$arrayInsert["salario_ofertado"] = $salario_ofertado;
|
||||
|
||||
$arrayInsert["salario_ofertado"] = $salario_ofertado;
|
||||
$arrayInsert["gerente"]=$gerente;
|
||||
|
||||
$idOferta = $listaOfertas->addOferta($arrayInsert);
|
||||
unset ($arrayInsert);
|
||||
|
||||
@ -77,7 +77,7 @@ echo "<table width=\"100%\"> ";
|
||||
echo "<tr class=\"encabezado\">";
|
||||
echo " <td align=\"center\" colspan=\"3\">" . $locale['2014'] . "</td>";
|
||||
// denominacion
|
||||
$orderView = "denominacion";
|
||||
$orderView = "referencia";
|
||||
echo " <td align=\"center\">" . $locale['1042'].":" . "<br />" .
|
||||
" <a href=\"" . $destinoURL . "?byEstado=" . $tipoOfertas . "&order=" . $orderView . "&modo=asc" . $variablesExtra . "\" ><img src=\"css/asc.png\" /></a>" .
|
||||
" <a href=\"" . $destinoURL . "?byEstado=" . $tipoOfertas . "&order=" . $orderView . "&modo=desc" . $variablesExtra . "\" ><img src=\"css/desc.png\" /></a></td>";
|
||||
@ -92,12 +92,12 @@ echo " <td align=\"center\">" . $locale['1102'] . "<br />" .
|
||||
" <a href=\"" . $destinoURL . "?byEstado=" . $tipoOfertas . "&order=" . $orderView . "&modo=asc" . $variablesExtra . "\" ><img src=\"css/asc.png\" /></a>" .
|
||||
" <a href=\"" . $destinoURL . "?byEstado=" . $tipoOfertas . "&order=" . $orderView . "&modo=desc" . $variablesExtra . "\" ><img src=\"css/desc.png\" /></a></td>";
|
||||
// solicitud
|
||||
$orderView = "solicitud";
|
||||
$orderView = "nombre_solicitud";
|
||||
echo " <td align=\"center\">" . $locale['278'].":" . "<br />" .
|
||||
" <a href=\"" . $destinoURL . "?byEstado=" . $tipoOfertas . "&order=" . $orderView . "&modo=asc" . $variablesExtra . "\" ><img src=\"css/asc.png\" /></a>" .
|
||||
" <a href=\"" . $destinoURL . "?byEstado=" . $tipoOfertas . "&order=" . $orderView . "&modo=desc" . $variablesExtra . "\" ><img src=\"css/desc.png\" /></a></td>";
|
||||
// Cliente
|
||||
$orderView = "candidato";
|
||||
// Candidato
|
||||
$orderView = "nombre_candidato";
|
||||
echo " <td align=\"center\">" . $locale['704'].":" . "<br />" .
|
||||
" <a href=\"" . $destinoURL . "?byEstado=" . $tipoOfertas . "&order=" . $orderView . "&modo=asc" . $variablesExtra . "\" ><img src=\"css/asc.png\" /></a>" .
|
||||
" <a href=\"" . $destinoURL . "?byEstado=" . $tipoOfertas . "&order=" . $orderView . "&modo=desc" . $variablesExtra . "\" ><img src=\"css/desc.png\" /></a></td>";
|
||||
@ -178,7 +178,7 @@ if (count($listadeOfertas) == 0) {
|
||||
if ($variablesExtra != "") {
|
||||
$variablesExtra = "&" . $variablesExtra;
|
||||
}
|
||||
$variables = "byEstado=" . $tipoOfertas . "order=" . $_GET["order"] . "&modo=" . $_GET["modo"] . $variablesExtra;
|
||||
$variables = "byEstado=" . $tipoOfertas . "&order=" . $_GET["order"] . "&modo=" . $_GET["modo"] . $variablesExtra;
|
||||
echo $html->paginacion($numPaginas, $pagLista, $destinoURL, $variables, "pagLista");
|
||||
} else {
|
||||
$variables = "byEstado=" . $tipoOfertas . $variablesExtra;
|
||||
|
||||
@ -32,7 +32,7 @@ if (!isset($variablesExtra)) $variablesExtra = "";
|
||||
?>
|
||||
<div style="float:left; padding-top:10px; border-top:1px solid #CCC; border-left:1px solid #CCC; border-right:1px solid #CCC;background-color:#F0F0F0">
|
||||
<ul id="tabnav">
|
||||
<li class="<?php if ($tipoPedidos=="0") echo "activo"; else echo "inactivo";?>"><a href="<?php echo $destinoURL."?byEstado=0".$variablesExtra; ?>"><?php echo $locale['1067']; ?></a></li>
|
||||
<li class="<?php if ($tipoPedidos=="0") echo "activo"; else echo "inactivo";?>"><a href="<?php echo $destinoURL."?byEstado=0".$variablesExtra; ?>"><?php echo $locale['1067']; ?></a></li>
|
||||
<li class="<?php if ($tipoPedidos=="110") echo "activo"; else echo "inactivo";?>"><a href="<?php echo $destinoURL."?byEstado=110".$variablesExtra; ?>"><?php echo nombre_estado_pedido("110"); ?></a></li>
|
||||
<li class="<?php if ($tipoPedidos=="120") echo "activo"; else echo "inactivo";?>"><a href="<?php echo $destinoURL."?byEstado=120".$variablesExtra; ?>"><?php echo nombre_estado_pedido("120"); ?></a></li>
|
||||
<li class="<?php if ($tipoPedidos=="130") echo "activo"; else echo "inactivo";?>"><a href="<?php echo $destinoURL."?byEstado=130".$variablesExtra; ?>"><?php echo nombre_estado_pedido("130"); ?></a></li>
|
||||
@ -73,7 +73,11 @@ echo "<table width=\"100%\"> ";
|
||||
|
||||
// Acciones
|
||||
echo "<tr class=\"encabezado\">";
|
||||
echo " <td align=\"center\" colspan=\"3\">".$locale['2014']."</td>";
|
||||
|
||||
//Si es usuario cliente para consulta quitamos las acciones para ganr espacio
|
||||
if (!$usuario->tieneRol("7")) {
|
||||
echo " <td align=\"center\" colspan=\"3\">".$locale['2014']."</td>";
|
||||
}
|
||||
|
||||
// Código
|
||||
//$orderView="oid";
|
||||
@ -109,11 +113,14 @@ echo " <td align=\"center\">".$locale['1023']."<br />" .
|
||||
" <a href=\"".$destinoURL."?byEstado=".$tipoPedidos."&order=".$orderView."&modo=asc".$variablesExtra."\" ><img src=\"css/asc.png\" /></a>" .
|
||||
" <a href=\"".$destinoURL."?byEstado=".$tipoPedidos."&order=".$orderView."&modo=desc".$variablesExtra."\" ><img src=\"css/desc.png\" /></a></td>";
|
||||
|
||||
//Si es usuario cliente para consulta quitamos las acciones para ganr espacio
|
||||
if (!$usuario->tieneRol("7")) {
|
||||
// Gerente
|
||||
$orderView="gerente";
|
||||
echo " <td align=\"center\">".$locale['1027']."<br />" .
|
||||
" <a href=\"".$destinoURL."?byEstado=".$tipoPedidos."&order=".$orderView."&modo=asc".$variablesExtra."\" ><img src=\"css/asc.png\" /></a>" .
|
||||
" <a href=\"".$destinoURL."?byEstado=".$tipoPedidos."&order=".$orderView."&modo=desc".$variablesExtra."\" ><img src=\"css/desc.png\" /></a></td>";
|
||||
}
|
||||
|
||||
echo " <td align=\"center\">".$locale['Ofertas009']."</td>";
|
||||
// Capacidad profesional
|
||||
@ -151,22 +158,32 @@ if(count($listadePedidos)==0){
|
||||
$pedidoAct=$listadePedidos[$i];
|
||||
$color = color_procedencia($pedidoAct->getValor("procedencia"));
|
||||
echo "<tr style='background-color: $color;'>";
|
||||
if(($pedidoAct->getValor("gerente")==$usuario->getValor("oid")) || $usuario->tieneRol("1")){
|
||||
// Es el gerente de ese pedido, puede editarlo y eliminarlo
|
||||
echo '<td align="center"><a href="gestion_pedido.php?idPedido='.$pedidoAct->getValor("oid").'"><img src="css/edit.png" title="'.$locale['2017'].'"/></a></td>';
|
||||
echo "<td align=\"center\"><a href=\"#\" onclick=eliminarPedido('".$pedidoAct->getValor("oid")."') ><img src=\"css/eliminar.png\" title=\"".$locale['2016']."\"/></a></td>";
|
||||
} else {
|
||||
// No es el gerente no puede ni editarlo ni eliminarlo
|
||||
echo '<td></td><td></td>';
|
||||
//INICIO ACCIONES
|
||||
//Si es usuario cliente para consulta quitamos las acciones para ganr espacio
|
||||
if (!$usuario->tieneRol("7")) {
|
||||
|
||||
if(($pedidoAct->getValor("gerente")==$usuario->getValor("oid")) || $usuario->tieneRol("1")){
|
||||
// Es el gerente de ese pedido, puede editarlo y eliminarlo
|
||||
echo '<td align="center"><a href="gestion_pedido.php?idPedido='.$pedidoAct->getValor("oid").'"><img src="css/edit.png" title="'.$locale['2017'].'"/></a></td>';
|
||||
echo "<td align=\"center\"><a href=\"#\" onclick=eliminarPedido('".$pedidoAct->getValor("oid")."') ><img src=\"css/eliminar.png\" title=\"".$locale['2016']."\"/></a></td>";
|
||||
} else {
|
||||
// No es el gerente no puede ni editarlo ni eliminarlo
|
||||
echo '<td></td><td></td>';
|
||||
}
|
||||
echo '<td align="center"><a href="pedido.php?idPedido='.$pedidoAct->getValor("oid").'"><img src="css/brick_go.png" title="'.$locale['2015'].'" /></a></td>';
|
||||
}
|
||||
echo '<td align="center"><a href="pedido.php?idPedido='.$pedidoAct->getValor("oid").'"><img src="css/brick_go.png" title="'.$locale['2015'].'" /></a></td>';
|
||||
//FIN ACCIONES
|
||||
// echo '<td align="center">'.$pedidoAct->getValor("oid").'</td>';
|
||||
echo '<td align="center">'.$pedidoAct->getValor("fecha").'</td>';
|
||||
/*echo '<td align="center">'.discretiza_prioridad($pedidoAct->getValor("prioridad")).'</td>';*/
|
||||
echo '<td align="center">'.$pedidoAct->getValor("nombre").'</td>';
|
||||
echo '<td align="center">'.$pedidoAct->getValor("nombre_estado").'</td>';
|
||||
echo '<td align="center">'.nombre_cliente($pedidoAct->getValor("cliente")).'</td>';
|
||||
|
||||
//Si es usuario cliente para consulta quitamos las acciones para ganr espacio
|
||||
if (!$usuario->tieneRol("7")) {
|
||||
echo '<td align="center">'.$pedidoAct->getValor("nombre_gerente").'</td>';
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
//OFERTAS/////////////////////////////
|
||||
@ -179,13 +196,25 @@ $listaOfertas = $pedidoAct->getListaOfertas();
|
||||
for ($j = 0; $j < count($listaOfertas); $j++) {
|
||||
$ofertaAct = $listaOfertas[$j];
|
||||
echo '<a href="oferta.php?idOferta=' . $ofertaAct->getValor("oid") . '">'.$ofertaAct->getValor("referencia").'</a> : '.$ofertaAct->getValor("nombre_estado").' ';
|
||||
|
||||
if ($ofertaAct->getValor("nombre_candidato")=="") {
|
||||
echo "No asignado";
|
||||
echo " - No asignado";
|
||||
}
|
||||
else {
|
||||
echo '<a href="/detalle_candidato.php?oid=' . $ofertaAct->getValor("candidato") . '">' . $ofertaAct->getValor("nombre_candidato"). '</a>';
|
||||
//Si es usuario cliente para consulta quitamos las acciones para ganr espacio
|
||||
if (!$usuario->tieneRol("7")) {
|
||||
echo '<a href="/detalle_candidato.php?oid=' . $ofertaAct->getValor("candidato") . '">' . $ofertaAct->getValor("nombre_candidato"). '</a>';
|
||||
} else {
|
||||
echo ' - '. $ofertaAct->getValor("nombre_candidato");
|
||||
}
|
||||
}
|
||||
echo ' "'. $ofertaAct->getValor("nombre_gerente").'"<br/>';
|
||||
|
||||
//Si es usuario cliente para consulta quitamos las acciones para ganr espacio
|
||||
if (!$usuario->tieneRol("7")) {
|
||||
echo ' "'. $ofertaAct->getValor("nombre_gerente").'"<br/>';
|
||||
}
|
||||
else
|
||||
echo '<br/>';
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
|
||||
@ -98,11 +98,14 @@ if (!empty($action)) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (($oferta->getValor("estado") == 120)) {
|
||||
echo $html->menuOfertas($usuario, array(""));
|
||||
} else
|
||||
echo $html->menuOfertas($usuario, "gestionar");
|
||||
//Si es usuario cliente para consulta quitamos las acciones para ganr espacio
|
||||
if (!$usuario->tieneRol("7")) {
|
||||
if (($oferta->getValor("estado") == 120)) {
|
||||
echo $html->menuOfertas($usuario, array(""));
|
||||
} else
|
||||
echo $html->menuOfertas($usuario, "gestionar");
|
||||
}
|
||||
else echo $html->menuPedidos($usuario, array(""));
|
||||
?>
|
||||
|
||||
<h2><?php echo $oferta->getValor("referencia") ." - ". $oferta->getValor("nombre_solicitud")?></h2>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user