Cambios varios del parte de trabajo num. 29
git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk@132 e2b1556b-49f8-d141-9351-52d6861a72d9
This commit is contained in:
parent
cdd3d01b46
commit
c713dd4dca
@ -95,7 +95,7 @@
|
|||||||
}
|
}
|
||||||
echo '<a href="lista_ofertas.php" class="menuOption" style="color:#000000">'.$this->locale['5100'].'</a>';
|
echo '<a href="lista_ofertas.php" class="menuOption" style="color:#000000">'.$this->locale['5100'].'</a>';
|
||||||
if($usuario->tieneRol("3") ||$usuario->tieneRol("1")){
|
if($usuario->tieneRol("3") ||$usuario->tieneRol("1")){
|
||||||
echo '<a href="addOferta.php" class="menuOption" style="color:#000000">'.$this->locale['5101'].'</a>';
|
// echo '<a href="addOferta.php" class="menuOption" style="color:#000000">'.$this->locale['5101'].'</a>';
|
||||||
}
|
}
|
||||||
/*echo '<a href="buscar_oferta.php" class="menuOption" style="color:#000000">'.$this->locale['5102'].'</a>';*/
|
/*echo '<a href="buscar_oferta.php" class="menuOption" style="color:#000000">'.$this->locale['5102'].'</a>';*/
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -30,26 +30,32 @@ class Oferta {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function esEliminable() {
|
||||||
|
return ($oferta->getValor("estado") == 100);
|
||||||
|
}
|
||||||
|
|
||||||
function eliminar() {
|
function eliminar() {
|
||||||
//Antes de nada quitamos el candidato asociado a la oferta para que se haga la lógica que corresponda
|
return false;
|
||||||
$idCand = $this->getValor("candidato");
|
if ($this->esEliminable()) {
|
||||||
if (!empty($idCand)) {
|
//Antes de nada quitamos el candidato asociado a la oferta para que se haga la lógica que corresponda
|
||||||
if (!$this->quitarCandidato()) {
|
$idCand = $this->getValor("candidato");
|
||||||
return false;
|
if (!empty($idCand)) {
|
||||||
}
|
if (!$this->quitarCandidato()) {
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// eliminamos en la oferta de la BD
|
// eliminamos en la oferta de la BD
|
||||||
$consulta = "DELETE FROM candidato_pedido WHERE oid = ".$this->campos['oid'];
|
$consulta = "DELETE FROM candidato_pedido WHERE oid = ".$this->campos['oid'];
|
||||||
|
$bd = new BD();
|
||||||
$bd = new BD();
|
if (!$bd->execQuery($consulta)) {
|
||||||
if (!$bd->execQuery($consulta)) {
|
return false;
|
||||||
return false;
|
} else {
|
||||||
} else {
|
$mensaje = "Oferta eliminada";
|
||||||
$mensaje = "Oferta eliminada";
|
$this->actualizarHistorial($mensaje);
|
||||||
$this->actualizarHistorial($mensaje);
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function actualizarHistorial($mensaje) {
|
function actualizarHistorial($mensaje) {
|
||||||
@ -72,6 +78,10 @@ class Oferta {
|
|||||||
return $this->campos[$nombre];
|
return $this->campos[$nombre];
|
||||||
} else {
|
} else {
|
||||||
switch ($nombre) {
|
switch ($nombre) {
|
||||||
|
case "nombre_gerente":$idGerente = $this->getValor("gerente");
|
||||||
|
$consulta = "SELECT CONCAT(nombre,\" \",apellidos) FROM usuarios WHERE oid=\"" . $idGerente . "\"";
|
||||||
|
break;
|
||||||
|
|
||||||
case "nombre_estado":
|
case "nombre_estado":
|
||||||
$idEstado = $this->getValor("estado");
|
$idEstado = $this->getValor("estado");
|
||||||
$idioma = $this->usuario->getValor("idioma");
|
$idioma = $this->usuario->getValor("idioma");
|
||||||
@ -154,9 +164,9 @@ class Oferta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* En configuración -> Configurada
|
* En proceso -> presentada
|
||||||
*/
|
*/
|
||||||
private function ejecutar110120() {
|
private function ejecutar100120() {
|
||||||
// Comprobamos que haya un candidato asignado.
|
// Comprobamos que haya un candidato asignado.
|
||||||
$candidato = $this->getValor("candidato");
|
$candidato = $this->getValor("candidato");
|
||||||
if (!empty($candidato)) {
|
if (!empty($candidato)) {
|
||||||
@ -169,6 +179,7 @@ class Oferta {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function setCampo($nombre, $valor) {
|
function setCampo($nombre, $valor) {
|
||||||
// PERMISOS:
|
// PERMISOS:
|
||||||
/*
|
/*
|
||||||
@ -176,6 +187,7 @@ class Oferta {
|
|||||||
* Gestor (3) - Los suyos
|
* Gestor (3) - Los suyos
|
||||||
* Otro - Excepción
|
* Otro - Excepción
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$gerente = $this->getValor("gerente");
|
$gerente = $this->getValor("gerente");
|
||||||
$sesion = $this->usuario->getValor("oid");
|
$sesion = $this->usuario->getValor("oid");
|
||||||
if ($this->usuario->tieneRol(1) || ($this->usuario->tieneRol(3) && $sesion == $gerente) || $this->setAutomatico) {
|
if ($this->usuario->tieneRol(1) || ($this->usuario->tieneRol(3) && $sesion == $gerente) || $this->setAutomatico) {
|
||||||
@ -199,6 +211,16 @@ if ($nombre == "estado") {
|
|||||||
$estado_nuevo = $this->darNombreEstado($valor, "sp");
|
$estado_nuevo = $this->darNombreEstado($valor, "sp");
|
||||||
$historial = "Cambio de estado (". $estado_viejo ." a ". $estado_nuevo .")";
|
$historial = "Cambio de estado (". $estado_viejo ." a ". $estado_nuevo .")";
|
||||||
$this->actualizarHistorial($historial);
|
$this->actualizarHistorial($historial);
|
||||||
|
|
||||||
|
//Una vez cambiado de estado la oferta, si el nuevo estado es Rechazado o Retirada, liberamos al candidato
|
||||||
|
if (($valor=='160')||($valor=='170')) {
|
||||||
|
$idCand = $this->getValor("candidato");
|
||||||
|
if (!empty($idCand)) {
|
||||||
|
if (!$this->quitarCandidato()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -282,11 +304,11 @@ if ($nombre == "estado") {
|
|||||||
|
|
||||||
function quitarCandidato() {
|
function quitarCandidato() {
|
||||||
$idCand = $this->getValor("candidato");
|
$idCand = $this->getValor("candidato");
|
||||||
|
$this->setCampo("candidato", "");
|
||||||
if (!empty($idCand)) {
|
if (!empty($idCand)) {
|
||||||
$candidato = new Candidato($this->usuario, $idCand);
|
$candidato = new Candidato($this->usuario, $idCand);
|
||||||
$estadoCand = $candidato->getValor("estado");
|
$estadoCand = $candidato->getValor("estado");
|
||||||
$numOfertasCandidato = $this->getNumOfertasCandidato($idCand);
|
$numOfertasCandidato = $this->getNumOfertasCandidato($idCand);
|
||||||
echo "Ofertas del coandidato:".$this->getNumOfertasCandidato($idCand);
|
|
||||||
switch ($estadoCand) {
|
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,
|
//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
|
//el estado del candidato no cambia si está asociado a alguna otra oferta. se cambia a los nuevos estados #723 Peticion
|
||||||
|
|||||||
@ -12,6 +12,7 @@ include_once("Objects/Afinidad.php");
|
|||||||
include_once("Objects/Automata.php");
|
include_once("Objects/Automata.php");
|
||||||
include_once("Objects/Oferta.php");
|
include_once("Objects/Oferta.php");
|
||||||
include_once("ListaCapacidadesProfesionales.php");
|
include_once("ListaCapacidadesProfesionales.php");
|
||||||
|
include_once("Objects/ListaOfertas.php");
|
||||||
|
|
||||||
class Pedido {
|
class Pedido {
|
||||||
|
|
||||||
@ -22,6 +23,7 @@ class Pedido {
|
|||||||
/* Contiene una lista con todos los atributos y su valor */
|
/* Contiene una lista con todos los atributos y su valor */
|
||||||
private $campos = array();
|
private $campos = array();
|
||||||
private $listaOfertas = null;
|
private $listaOfertas = null;
|
||||||
|
private $totalOfertas = 0;
|
||||||
|
|
||||||
|
|
||||||
/* Lista de perfiles */
|
/* Lista de perfiles */
|
||||||
@ -273,15 +275,29 @@ if ($nombre == "estado") {
|
|||||||
* Gestor (3) - Los suyos
|
* Gestor (3) - Los suyos
|
||||||
* Otro - Excepción
|
* Otro - Excepción
|
||||||
*/
|
*/
|
||||||
$gerente = $this->getValor("gerente");
|
|
||||||
$sesion = $this->usuario->getValor("oid");
|
//Recogemos todas las ofertas del pedido para proceder a eliminarlas y dejar su candidato libre
|
||||||
if ($this->usuario->tieneRol(1) || ($this->usuario->tieneRol(3) && $sesion == $gerente)) {
|
$cond = array();
|
||||||
$oid = $this->getValor("oid");
|
$cond[] = "pedido = '".$this->getValor("oid")."'";
|
||||||
$consulta = "DELETE FROM pedidos WHERE oid='$oid'";
|
$orden = array();
|
||||||
$bd = new BD();
|
$orden[] = "referencia";
|
||||||
return $bd->execQuery($consulta);
|
$listaOfertas = new ListaOfertas($this->usuario, $cond, $orden);
|
||||||
} else {
|
$ofertas = $listaOfertas->getOfertas();
|
||||||
return false;
|
$totalOfertas = count($ofertas);
|
||||||
|
for ($i = 0; $i < $totalOfertas; $i++)
|
||||||
|
$ofertas[$i]->eliminar();
|
||||||
|
|
||||||
|
if (count($listaOfertas->getOfertas()) == 0) {
|
||||||
|
$gerente = $this->getValor("gerente");
|
||||||
|
$sesion = $this->usuario->getValor("oid");
|
||||||
|
if ($this->usuario->tieneRol(1) || ($this->usuario->tieneRol(3) && $sesion == $gerente)) {
|
||||||
|
$oid = $this->getValor("oid");
|
||||||
|
$consulta = "DELETE FROM pedidos WHERE oid='$oid'";
|
||||||
|
$bd = new BD();
|
||||||
|
return $bd->execQuery($consulta);
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -899,7 +915,7 @@ if ($nombre == "estado") {
|
|||||||
$pesoPerfil = $this->getValor("pesoPerfil");
|
$pesoPerfil = $this->getValor("pesoPerfil");
|
||||||
// Eliminamos a los usuario de la tabla de candidatos en pedido que se encuentren
|
// Eliminamos a los usuario de la tabla de candidatos en pedido que se encuentren
|
||||||
// en proceso para este pedido.
|
// en proceso para este pedido.
|
||||||
$consulta = "DELETE FROM candidato_pedido WHERE pedido='$id' AND estado='110'";
|
$consulta = "DELETE FROM candidato_pedido WHERE pedido='$id' AND estado='100'";
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$bd->execQuery($consulta);
|
$bd->execQuery($consulta);
|
||||||
// Si el pedido no está cerrado calculamos su afinidad para los usuarios:
|
// Si el pedido no está cerrado calculamos su afinidad para los usuarios:
|
||||||
@ -929,7 +945,7 @@ if ($nombre == "estado") {
|
|||||||
$afi = $afinidad->calculaAfinidad($pesoIdioma, $pesoPerfil, $pesoTecno);
|
$afi = $afinidad->calculaAfinidad($pesoIdioma, $pesoPerfil, $pesoTecno);
|
||||||
echo $afi . "<br/>";
|
echo $afi . "<br/>";
|
||||||
if ($afi > 0) {
|
if ($afi > 0) {
|
||||||
$consulta = "INSERT INTO candidato_pedido (candidato, pedido, afinidad, estado, fecha) VALUES('$idUsuario', '$id', '$afi', '110', curdate())";
|
$consulta = "INSERT INTO candidato_pedido (candidato, pedido, afinidad, estado, fecha) VALUES('$idUsuario', '$id', '$afi', '100', curdate())";
|
||||||
|
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$bd->execQuery($consulta);
|
$bd->execQuery($consulta);
|
||||||
@ -1124,6 +1140,18 @@ if ($nombre == "estado") {
|
|||||||
|
|
||||||
return $resultado;
|
return $resultado;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getListaOfertas() {
|
||||||
|
//Recogemos todas las ofertas del pedido para proceder a eliminarlas y dejar su candidato libre
|
||||||
|
$cond = array();
|
||||||
|
$cond[] = "pedido = '".$this->getValor("oid")."'";
|
||||||
|
$orden = array();
|
||||||
|
$orden[] = "referencia";
|
||||||
|
$Ofertas = new ListaOfertas($this->usuario, $cond, $orden);
|
||||||
|
$listaOfertas = $Ofertas->getOfertas();
|
||||||
|
$totalOfertas = count($ofertas);
|
||||||
|
return $listaOfertas;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,14 +8,14 @@ include_once("Objects/Pedido.php");
|
|||||||
include_once("Objects/HTML.php");
|
include_once("Objects/HTML.php");
|
||||||
|
|
||||||
$html = new HTML($locale);
|
$html = new HTML($locale);
|
||||||
|
|
||||||
$errores = array();
|
$errores = array();
|
||||||
|
$usuario = $_SESSION["usuario"];
|
||||||
|
$solicitud=$_GET['solicitud'];
|
||||||
|
|
||||||
// Todas las variables
|
// Todas las variables
|
||||||
if (!empty($_POST)) {
|
if (!empty($_POST)) {
|
||||||
print_r($_POST);
|
print_r($_POST);
|
||||||
|
|
||||||
$solicitud = "";
|
|
||||||
if (!empty($_POST['solicitud'])) {
|
if (!empty($_POST['solicitud'])) {
|
||||||
$solicitud = $_POST['solicitud'][0];
|
$solicitud = $_POST['solicitud'][0];
|
||||||
}
|
}
|
||||||
@ -34,6 +34,7 @@ if (!empty($_POST)) {
|
|||||||
$idiomas=$_POST['idiomas'];
|
$idiomas=$_POST['idiomas'];
|
||||||
$provincias=$_POST['provincias']; */
|
$provincias=$_POST['provincias']; */
|
||||||
$observaciones = $_POST['observaciones'];
|
$observaciones = $_POST['observaciones'];
|
||||||
|
$gerente=$usuario->getValor("oid");
|
||||||
/* $pesoTec=$_POST['pesoTec'];
|
/* $pesoTec=$_POST['pesoTec'];
|
||||||
$pesoIdi=$_POST['pesoIdi'];
|
$pesoIdi=$_POST['pesoIdi'];
|
||||||
$pesoPer=$_POST['pesoPer'];
|
$pesoPer=$_POST['pesoPer'];
|
||||||
@ -42,7 +43,7 @@ if (!empty($_POST)) {
|
|||||||
if($usuario->tieneRol("1")){
|
if($usuario->tieneRol("1")){
|
||||||
$gerente=$_POST['gerente'];
|
$gerente=$_POST['gerente'];
|
||||||
} else {
|
} else {
|
||||||
$gerente=$usuario->getValor("oid");
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if ($_POST['action'] == "add") {
|
if ($_POST['action'] == "add") {
|
||||||
@ -58,18 +59,18 @@ if (!empty($_POST)) {
|
|||||||
$arrayInsert = array();
|
$arrayInsert = array();
|
||||||
$arrayInsert["pedido"] = $solicitud;
|
$arrayInsert["pedido"] = $solicitud;
|
||||||
$arrayInsert["obsGerente"] = $observaciones;
|
$arrayInsert["obsGerente"] = $observaciones;
|
||||||
$arrayInsert["estado"] = "110";
|
$arrayInsert["estado"] = "100";
|
||||||
|
$arrayInsert["gerente"]=$gerente;
|
||||||
|
|
||||||
/* $arrayInsert["prioridad"]= $prioridad;
|
/* $arrayInsert["prioridad"]= $prioridad;
|
||||||
$arrayInsert["empleados"]=$empleados;
|
$arrayInsert["empleados"]=$empleados;
|
||||||
$arrayInsert["duracion"]=$duracion;
|
$arrayInsert["duracion"]=$duracion;
|
||||||
$arrayInsert["gerente"]=$gerente;
|
|
||||||
$arrayInsert["cliente"]=$clientes;
|
$arrayInsert["cliente"]=$clientes;
|
||||||
$arrayInsert["salario_min"]=$salario_min;
|
$arrayInsert["salario_min"]=$salario_min;
|
||||||
$arrayInsert["salario_max"]=$salario_max;
|
$arrayInsert["salario_max"]=$salario_max;
|
||||||
$arrayInsert["procedencia"]=$procedencia;
|
$arrayInsert["procedencia"]=$procedencia;
|
||||||
|
|
||||||
$arrayInsert["estado"]="110";
|
$arrayInsert["estado"]="100";
|
||||||
$arrayInsert["pesoIdioma"]=$pesoIdi;
|
$arrayInsert["pesoIdioma"]=$pesoIdi;
|
||||||
$arrayInsert["pesoPerfil"]=$pesoPer;
|
$arrayInsert["pesoPerfil"]=$pesoPer;
|
||||||
$arrayInsert["pesoTecno"]=$pesoTec; */
|
$arrayInsert["pesoTecno"]=$pesoTec; */
|
||||||
@ -98,7 +99,7 @@ if (!empty($_POST)) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$referencia = "";
|
$referencia = "";
|
||||||
$solicitud = "";
|
$gerente = $usuario->getValor("oid");
|
||||||
$observaciones = "";
|
$observaciones = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +122,7 @@ if (in_array("1", $errores))
|
|||||||
echo " class=\"errorcampo\"";
|
echo " class=\"errorcampo\"";
|
||||||
|
|
||||||
echo ">" . $locale['1025'] . ":<br/>";
|
echo ">" . $locale['1025'] . ":<br/>";
|
||||||
|
echo "holaaa";
|
||||||
rellena_desplegable_pedidos_estado("solicitud", "130, 140", array($solicitud));
|
rellena_desplegable_pedidos_estado("solicitud", "130, 140", array($solicitud));
|
||||||
|
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
|
|||||||
@ -218,14 +218,13 @@ INSERT INTO `candidaturas_estados` (`cod`, `idioma`, `nombre`) VALUES
|
|||||||
(20, 'sp', 'Aceptado'),
|
(20, 'sp', 'Aceptado'),
|
||||||
(30, 'sp', 'En proceso'),
|
(30, 'sp', 'En proceso'),
|
||||||
(40, 'sp', 'RRHH'),
|
(40, 'sp', 'RRHH'),
|
||||||
(100, 'sp', 'En configuración'),
|
(100, 'sp', 'En proceso (EP)'),
|
||||||
(110, 'sp', 'Preparada oferta'),
|
(120, 'sp', 'Presentada (PR)'),
|
||||||
(120, 'sp', 'Presentada'),
|
(130, 'sp', 'Solicitada Entrevista (SE)'),
|
||||||
(130, 'sp', 'Solicitada entrevista'),
|
|
||||||
(140, 'sp', 'Realizada entrevista'),
|
(140, 'sp', 'Realizada entrevista'),
|
||||||
(150, 'sp', 'Aprobada'),
|
(150, 'sp', 'Aprobada'),
|
||||||
(160, 'sp', 'Rechazada'),
|
(160, 'sp', 'Rechazada'),
|
||||||
(170, 'sp', 'Retirada');
|
(170, 'sp', 'Retirada (RT)');
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
@ -247,57 +246,43 @@ CREATE TABLE IF NOT EXISTS `candidaturas_transiciones` (
|
|||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO `candidaturas_transiciones` (`inicial`, `final`, `transicion`, `rol`) VALUES
|
INSERT INTO `candidaturas_transiciones` (`inicial`, `final`, `transicion`, `rol`) VALUES
|
||||||
(100, 110, 0, '1.4'),
|
(100, 120, 100120, '1.3'),
|
||||||
(100, 120, 0, '1.4'),
|
|
||||||
(100, 130, 0, '1.4'),
|
(100, 130, 0, '1.4'),
|
||||||
(100, 140, 0, '1.4'),
|
(100, 140, 0, '1.4'),
|
||||||
(100, 150, 0, '1.4'),
|
(100, 150, 0, '1.4'),
|
||||||
(100, 160, 0, '1.4'),
|
(100, 160, 0, '1.4'),
|
||||||
(100, 170, 0, '1.4'),
|
(100, 170, 0, '1.4'),
|
||||||
(110, 100, 0, '1.4'),
|
|
||||||
(110, 120, 110120, '1.3'),
|
|
||||||
(110, 130, 0, '1.4'),
|
|
||||||
(110, 140, 0, '1.4'),
|
|
||||||
(110, 150, 0, '1.4'),
|
|
||||||
(110, 160, 0, '1.4'),
|
|
||||||
(110, 170, 0, '1.4'),
|
|
||||||
(120, 100, 0, '1.4'),
|
(120, 100, 0, '1.4'),
|
||||||
(120, 110, 0, '1.3'),
|
|
||||||
(120, 130, 0, '1.3'),
|
(120, 130, 0, '1.3'),
|
||||||
(120, 140, 0, '1.4'),
|
(120, 140, 0, '1.4'),
|
||||||
(120, 150, 0, '1.4'),
|
(120, 150, 0, '1.4'),
|
||||||
(120, 160, 0, '1.4'),
|
(120, 160, 0, '1.4'),
|
||||||
(120, 170, 0, '1.4'),
|
(120, 170, 0, '1.4'),
|
||||||
(130, 100, 0, '1.4'),
|
(130, 100, 0, '1.4'),
|
||||||
(130, 110, 0, '1.4'),
|
|
||||||
(130, 120, 0, '1.4'),
|
(130, 120, 0, '1.4'),
|
||||||
(130, 140, 130140, ''),
|
(130, 140, 130140, ''),
|
||||||
(130, 150, 0, '1.4'),
|
(130, 150, 0, '1.4'),
|
||||||
(130, 160, 0, '1.4'),
|
(130, 160, 0, '1.4'),
|
||||||
(130, 170, 0, '1.4'),
|
(130, 170, 0, '1.4'),
|
||||||
(140, 100, 0, '1.4'),
|
(140, 100, 0, '1.4'),
|
||||||
(140, 110, 0, '1.4'),
|
|
||||||
(140, 120, 0, '1.4'),
|
(140, 120, 0, '1.4'),
|
||||||
(140, 130, 140130, ''),
|
(140, 130, 140130, ''),
|
||||||
(140, 150, 0, '1.4'),
|
(140, 150, 0, '1.4'),
|
||||||
(140, 160, 0, '1.4'),
|
(140, 160, 0, '1.4'),
|
||||||
(140, 170, 0, '1.4'),
|
(140, 170, 0, '1.4'),
|
||||||
(150, 100, 0, '1.4'),
|
(150, 100, 0, '1.4'),
|
||||||
(150, 110, 0, '1.4'),
|
|
||||||
(150, 120, 0, '1.4'),
|
(150, 120, 0, '1.4'),
|
||||||
(150, 130, 0, '1.4'),
|
(150, 130, 0, '1.4'),
|
||||||
(150, 140, 0, '1.4'),
|
(150, 140, 0, '1.4'),
|
||||||
(150, 160, 0, '1.4'),
|
(150, 160, 0, '1.4'),
|
||||||
(150, 170, 0, '1.4'),
|
(150, 170, 0, '1.4'),
|
||||||
(160, 100, 0, '1.4'),
|
(160, 100, 0, '1.4'),
|
||||||
(160, 110, 0, '1.4'),
|
|
||||||
(160, 120, 0, '1.4'),
|
(160, 120, 0, '1.4'),
|
||||||
(160, 130, 0, '1.4'),
|
(160, 130, 0, '1.4'),
|
||||||
(160, 140, 0, '1.4'),
|
(160, 140, 0, '1.4'),
|
||||||
(160, 150, 0, '1.4'),
|
(160, 150, 0, '1.4'),
|
||||||
(160, 170, 0, '1.4'),
|
(160, 170, 0, '1.4'),
|
||||||
(170, 100, 0, '1.4'),
|
(170, 100, 0, '1.4'),
|
||||||
(170, 110, 0, '1.4'),
|
|
||||||
(170, 120, 0, '1.4'),
|
(170, 120, 0, '1.4'),
|
||||||
(170, 130, 0, '1.4'),
|
(170, 130, 0, '1.4'),
|
||||||
(170, 140, 0, '1.4'),
|
(170, 140, 0, '1.4'),
|
||||||
|
|||||||
@ -25,7 +25,7 @@ $arrayInsert = array();
|
|||||||
foreach($pedidos as $codigo) {
|
foreach($pedidos as $codigo) {
|
||||||
$arrayInsert["pedido"] = $codigo;
|
$arrayInsert["pedido"] = $codigo;
|
||||||
$arrayInsert["obsGerente"] = $observacion;
|
$arrayInsert["obsGerente"] = $observacion;
|
||||||
$arrayInsert["estado"] = "110";
|
$arrayInsert["estado"] = "100";
|
||||||
$arrayInsert["candidato"] = $idCandidato;
|
$arrayInsert["candidato"] = $idCandidato;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,9 +14,9 @@ if (stripos($destinoURL, "?") > 0) {
|
|||||||
// Comprobamos mensajes que pueden llegar hasta aqui
|
// Comprobamos mensajes que pueden llegar hasta aqui
|
||||||
if (isset($_GET['msg'])) {
|
if (isset($_GET['msg'])) {
|
||||||
switch ($_GET['msg']) {
|
switch ($_GET['msg']) {
|
||||||
case "1":$mensaje = "<div class=\"aviso ok\">" . $locale['1059'] . "</div>";
|
case "1":$mensaje = "<div class=\"aviso ok\"> Se ha eliminado correctamente la oferta </div>";
|
||||||
break;
|
break;
|
||||||
case "2":$mensaje = "<div class=\"aviso error\">" . $locale['1060'] . "</div>";
|
case "2":$mensaje = "<div class=\"aviso error\"> No se ha podido eliminar la solicitud de oferta <br/> La oferta está presentada </div>";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -36,9 +36,6 @@ else echo "inactivo";
|
|||||||
?>"><a href="<?php echo $destinoURL . "?byEstado=100" . $variablesExtra; ?>"><?php echo nombre_estado_oferta("100"); ?></a></li>
|
?>"><a href="<?php echo $destinoURL . "?byEstado=100" . $variablesExtra; ?>"><?php echo nombre_estado_oferta("100"); ?></a></li>
|
||||||
<li class="<?php if ($tipoOfertas == "110") echo "activo";
|
<li class="<?php if ($tipoOfertas == "110") echo "activo";
|
||||||
else echo "inactivo";
|
else echo "inactivo";
|
||||||
?>"><a href="<?php echo $destinoURL . "?byEstado=110" . $variablesExtra; ?>"><?php echo nombre_estado_oferta("110"); ?></a></li>
|
|
||||||
<li class="<?php if ($tipoOfertas == "120") echo "activo";
|
|
||||||
else echo "inactivo";
|
|
||||||
?>"><a href="<?php echo $destinoURL . "?byEstado=120" . $variablesExtra; ?>"><?php echo nombre_estado_oferta("120"); ?></a></li>
|
?>"><a href="<?php echo $destinoURL . "?byEstado=120" . $variablesExtra; ?>"><?php echo nombre_estado_oferta("120"); ?></a></li>
|
||||||
<li class="<?php if ($tipoOfertas == "130") echo "activo";
|
<li class="<?php if ($tipoOfertas == "130") echo "activo";
|
||||||
else echo "inactivo";
|
else echo "inactivo";
|
||||||
@ -92,6 +89,12 @@ $orderView = "candidato";
|
|||||||
echo " <td align=\"center\">" . $locale['704'].":" . "<br />" .
|
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=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>";
|
" <a href=\"" . $destinoURL . "?byEstado=" . $tipoOfertas . "&order=" . $orderView . "&modo=desc" . $variablesExtra . "\" ><img src=\"css/desc.png\" /></a></td>";
|
||||||
|
// Gerente
|
||||||
|
$orderView = "gerente";
|
||||||
|
echo " <td align=\"center\">" . $locale['1027'].":" . "<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>";
|
||||||
|
|
||||||
// Afinidad
|
// Afinidad
|
||||||
/*$orderView = "afinidad";
|
/*$orderView = "afinidad";
|
||||||
echo " <td align=\"center\">" . $locale['5104'] . "<br />" .
|
echo " <td align=\"center\">" . $locale['5104'] . "<br />" .
|
||||||
@ -139,6 +142,7 @@ if (count($listadeOfertas) == 0) {
|
|||||||
echo '<td align="center">' . $ofertaAct->getValor("nombre_estado") . '</td>';
|
echo '<td align="center">' . $ofertaAct->getValor("nombre_estado") . '</td>';
|
||||||
echo '<td align="center"><a href="/pedido.php?idPedido=' . $ofertaAct->getValor("pedido") . '">' . $ofertaAct->getValor("nombre_solicitud") . '</a></td>';
|
echo '<td align="center"><a href="/pedido.php?idPedido=' . $ofertaAct->getValor("pedido") . '">' . $ofertaAct->getValor("nombre_solicitud") . '</a></td>';
|
||||||
echo '<td align="center"><a href="/detalle_candidato.php?oid=' . $ofertaAct->getValor("candidato") . '">' . $ofertaAct->getValor("nombre_candidato") . '</td>';
|
echo '<td align="center"><a href="/detalle_candidato.php?oid=' . $ofertaAct->getValor("candidato") . '">' . $ofertaAct->getValor("nombre_candidato") . '</td>';
|
||||||
|
echo '<td align="center">' . $ofertaAct->getValor("nombre_gerente") . '</td>';
|
||||||
//echo '<td align="center">' . $ofertaAct->getValor("afinidad") . '</td>';
|
//echo '<td align="center">' . $ofertaAct->getValor("afinidad") . '</td>';
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,7 @@ if (isset($_GET['msg'])) {
|
|||||||
switch ($_GET['msg']) {
|
switch ($_GET['msg']) {
|
||||||
case "1":$mensaje="<div class=\"aviso ok\">".$locale['1059']."</div>";
|
case "1":$mensaje="<div class=\"aviso ok\">".$locale['1059']."</div>";
|
||||||
break;
|
break;
|
||||||
case "2":$mensaje="<div class=\"aviso error\">".$locale['1060']."</div>";
|
case "2":$mensaje="<div class=\"aviso error\">".$locale['1060']."<br/> Tiene ofertas presentadas.</div>";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -76,10 +76,10 @@ echo "<tr class=\"encabezado\">";
|
|||||||
echo " <td align=\"center\" colspan=\"3\">".$locale['2014']."</td>";
|
echo " <td align=\"center\" colspan=\"3\">".$locale['2014']."</td>";
|
||||||
|
|
||||||
// Código
|
// Código
|
||||||
$orderView="oid";
|
//$orderView="oid";
|
||||||
echo " <td align=\"center\">".$locale['1029']."<br />" .
|
//echo " <td align=\"center\">".$locale['1029']."<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=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>";
|
// " <a href=\"".$destinoURL."?byEstado=".$tipoPedidos."&order=".$orderView."&modo=desc".$variablesExtra."\" ><img src=\"css/desc.png\" /></a></td>";
|
||||||
// Fecha
|
// Fecha
|
||||||
$orderView="fecha";
|
$orderView="fecha";
|
||||||
echo " <td align=\"center\">".$locale['1021']."<br />" .
|
echo " <td align=\"center\">".$locale['1021']."<br />" .
|
||||||
@ -109,16 +109,23 @@ 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=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>";
|
" <a href=\"".$destinoURL."?byEstado=".$tipoPedidos."&order=".$orderView."&modo=desc".$variablesExtra."\" ><img src=\"css/desc.png\" /></a></td>";
|
||||||
|
|
||||||
// Capacidad profesional
|
// Gerente
|
||||||
$orderView="perfil";
|
$orderView="gerente";
|
||||||
echo " <td align=\"center\">".$locale['Capacidades016']."</td>";
|
echo " <td align=\"center\">".$locale['1027']."<br />" .
|
||||||
|
|
||||||
// Número de ofertas
|
|
||||||
$orderView="empleados";
|
|
||||||
echo " <td align=\"center\">".$locale['287']."<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=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>";
|
" <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
|
||||||
|
//$orderView="perfil";
|
||||||
|
//echo " <td align=\"center\">".$locale['Capacidades016']."</td>";
|
||||||
|
|
||||||
|
// Número de ofertas
|
||||||
|
//$orderView="empleados";
|
||||||
|
//echo " <td align=\"center\">".$locale['287']."<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 "</tr>";
|
echo "</tr>";
|
||||||
|
|
||||||
// Vamos mostrando petición por petición
|
// Vamos mostrando petición por petición
|
||||||
@ -153,25 +160,45 @@ if(count($listadePedidos)==0){
|
|||||||
echo '<td></td><td></td>';
|
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>';
|
||||||
echo '<td align="center">'.$pedidoAct->getValor("oid").'</td>';
|
// echo '<td align="center">'.$pedidoAct->getValor("oid").'</td>';
|
||||||
echo '<td align="center">'.$pedidoAct->getValor("fecha").'</td>';
|
echo '<td align="center">'.$pedidoAct->getValor("fecha").'</td>';
|
||||||
/*echo '<td align="center">'.discretiza_prioridad($pedidoAct->getValor("prioridad")).'</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").'</td>';
|
||||||
echo '<td align="center">'.$pedidoAct->getValor("nombre_estado").'</td>';
|
echo '<td align="center">'.$pedidoAct->getValor("nombre_estado").'</td>';
|
||||||
echo '<td align="center">'.nombre_cliente($pedidoAct->getValor("cliente")).'</td>';
|
echo '<td align="center">'.nombre_cliente($pedidoAct->getValor("cliente")).'</td>';
|
||||||
|
echo '<td align="center">'.$pedidoAct->getValor("nombre_gerente").'</td>';
|
||||||
|
|
||||||
echo '<td >';
|
//////////////////////////////////////
|
||||||
|
//OFERTAS/////////////////////////////
|
||||||
|
//////////////////////////////////////
|
||||||
|
echo '<td align="left">';
|
||||||
|
$listaOfertas = $pedidoAct->getListaOfertas();
|
||||||
|
if (($pedidoAct->getValor("estado")=='130')||($pedidoAct->getValor("estado")=='140'))
|
||||||
|
echo '<input language="javascript" type="button" value="'.$locale['5101'].'" class="button" onclick="javascript:document.location=\'addOferta.php?solicitud='.$pedidoAct->getValor("oid").'\'"><br/>';
|
||||||
|
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo '<a href="/detalle_candidato.php?oid=' . $ofertaAct->getValor("candidato") . '">' . $ofertaAct->getValor("nombre_candidato"). '</a>';
|
||||||
|
}
|
||||||
|
echo ' "'. $ofertaAct->getValor("nombre_gerente").'"<br/>';
|
||||||
|
}
|
||||||
|
echo '</td>';
|
||||||
|
|
||||||
|
// echo '<td >';
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
//CAPACIDADES PROFESIONALES
|
//CAPACIDADES PROFESIONALES
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
echo '<input language="javascript" type="button" value="'.$locale['Capacidades003'].'" class="button" onclick="if(popup(\'addCapacidadProfesional.php?id_solicitud='.$pedidoAct->getValor("oid").'&entidad=solicitud\', \'notes\')) window.location.reload()">';
|
//echo '<input language="javascript" type="button" value="'.$locale['Capacidades003'].'" class="button" onclick="if(popup(\'addCapacidadProfesional.php?id_solicitud='.$pedidoAct->getValor("oid").'&entidad=solicitud\', \'notes\')) window.location.reload()">';
|
||||||
$CapacidadesProfesionales = $pedidoAct->getCapacidadesProfesionales();
|
//$CapacidadesProfesionales = $pedidoAct->getCapacidadesProfesionales();
|
||||||
VerListaCapacidadesProfesionales($CapacidadesProfesionales, "lista_Solicitudes");
|
//VerListaCapacidadesProfesionales($CapacidadesProfesionales, "lista_Solicitudes");
|
||||||
|
//echo '</td>';
|
||||||
|
|
||||||
echo '</td>';
|
// echo '<td align="center">'.$pedidoAct->getValor("empleados").'</td>';
|
||||||
|
|
||||||
echo '<td align="center">'.$pedidoAct->getValor("empleados").'</td>';
|
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
// Comprobamos si tenemos que mostar una paginación
|
// Comprobamos si tenemos que mostar una paginación
|
||||||
|
|||||||
@ -99,7 +99,7 @@ if (!empty($action)) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (($oferta->getValor("estado") == 110) || ($oferta->getValor("estado") == 120)) {
|
if (($oferta->getValor("estado") == 120)) {
|
||||||
echo $html->menuOfertas($usuario, array(""));
|
echo $html->menuOfertas($usuario, array(""));
|
||||||
} else
|
} else
|
||||||
echo $html->menuOfertas($usuario, "gestionar");
|
echo $html->menuOfertas($usuario, "gestionar");
|
||||||
@ -160,6 +160,7 @@ echo $mensaje;
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="sinborde">
|
<td colspan="3" class="sinborde">
|
||||||
|
<span class="resaltado"><?php echo $locale['1027']; ?></span> <?php echo $oferta->getValor("nombre_gerente"); ?><br/>
|
||||||
<span class="resaltado"><?php echo $locale['135']; ?></span> <?php echo nl2br($oferta->getValor("observaciones")); ?>
|
<span class="resaltado"><?php echo $locale['135']; ?></span> <?php echo nl2br($oferta->getValor("observaciones")); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user