From 4f46f0ee82fb831798594babd358aaba394d50f4 Mon Sep 17 00:00:00 2001 From: roberto Date: Fri, 10 Jun 2011 15:03:20 +0000 Subject: [PATCH] Ofertas adaptadas. git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk/src@95 e2b1556b-49f8-d141-9351-52d6861a72d9 --- Objects/Oferta.php | 17 +-- idiomas/sp/lenguaje.php | 2 + ver_oferta.php | 237 ++++++++++++++++++++++++++++++++++------ ver_pedido.php | 8 +- 4 files changed, 218 insertions(+), 46 deletions(-) diff --git a/Objects/Oferta.php b/Objects/Oferta.php index a3bfce0..3b17d40 100644 --- a/Objects/Oferta.php +++ b/Objects/Oferta.php @@ -297,30 +297,31 @@ class Oferta { } function asignarCandidato($idCandidato) { +/* $idCand = $this->getValor("candidato"); if (!empty($idCand)) { if (!$this->quitarCandidato()) { return false; } } - +*/ $candidato = new Candidato($this->usuario, $idCandidato); $estadoCand = $candidato->getValor("estado"); $numOfertasCandidato = $this->getOfertasCandidato($idCand); - + switch ($estadoCand) { //Disponible asignado, el estado del candidato no cambia, solo se asigna a la oferta y ya está. - case "560": + case 560: $this->setCampo("candidato", $idCandidato); return true; break; //Pendiente de clasificar, Rechazados tipo1, tipo2, tipo3, Disponible. Todos los candidatos con alguno de estos estados cambiarán a Disponible asignado (560) - case "510": - case "521": - case "522": - case "523": - case "540": + case 510:; + case 521:; + case 522:; + case 523:; + case 540: $this->setCampo("candidato", $idCandidato); if ($candidato->transita("560", "")){ $nombre_candidato = $candidato->getValor("nombre") . " " . $candidato->getValor("apellidos"); diff --git a/idiomas/sp/lenguaje.php b/idiomas/sp/lenguaje.php index 143005a..38d4ff3 100644 --- a/idiomas/sp/lenguaje.php +++ b/idiomas/sp/lenguaje.php @@ -184,6 +184,8 @@ $locale['Ofertas003'] = "Nombre y apellidos:"; $locale['Ofertas004'] = "ESTADO OFERTA"; $locale['Ofertas005'] = "GRADO DE CONCORDANCIA"; $locale['Ofertas006'] = "Ver ficha candidato"; +$locale['Ofertas007'] = "SOLICITUD"; +$locale['Ofertas008'] = "CANDIDATO"; //Historial: diff --git a/ver_oferta.php b/ver_oferta.php index e7a3fb6..17aa8e5 100644 --- a/ver_oferta.php +++ b/ver_oferta.php @@ -48,6 +48,7 @@ if (!empty($action)) { if (!empty($_GET['idCand'])) { try { $idCand = $_GET['idCand']; + $estado = $oferta->asignarCandidato($idCand); if ($estado) { @@ -195,24 +196,200 @@ echo $mensaje;
+ +
+
+
+ + + + + + + + + + + + + + +
-REQUISITOS SOLICITUD + + getProvincias(); + if (count($tecnologias) > 0) { + foreach ($tecnologias as $nombre => $codigo) { + echo $nombre . ", "; + } + } else { + } + echo nl2br($pedido->getValor("observaciones_direccion")); + ?> +    getValor("direccion_solicitud"); ?>
-DETALLES CANDIDATO + + getProvinciasDeseadas(); + $keylocalidades = array_values($localidadesDeseadas); + // Mostramos la lista + foreach ($localidadesDeseadas as $nombre => $valor) { + echo $nombre . ", "; + } + + echo nl2br($candidato->getValor("observaciones_prov_deseada")); + } + ?> + + + getProvinciasNoDeseadas(); + $keylocalidades = array_values($localidadesNoDeseadas); + // Mostramos la lista + foreach ($localidadesNoDeseadas as $nombre => $valor) { + echo $nombre . ", "; + } + echo nl2br($candidato->getValor("observaciones_prov_nodeseada")); + } + ?> +
+    getValor("nombre_salario_max"); ?>
+    getValor("nombre_salario_min"); ?>
+    getValor("tasa_economica"); ?>
+
+ getValor("nombre_salario_min"); ?>
+ getValor("nombre_salario_max"); ?>
+ getValor("tarifa"); ?> +
+ + getValor("viajar") != "") { + echo "SI  (".$pedido->getValor("viajar").")"; + } else { + echo "NO"; + } + ?>
+ + getValor("internacional") != "") { + echo "SI  (".$pedido->getValor("internacional").")"; + } else { + echo "NO"; + } + ?>
+ + getValor("guardias") != "") { + echo "SI  (".$pedido->getValor("guardias").")"; + } else { + echo "NO"; + } + ?>
+ + getValor("turnos") != "") { + echo "SI  (".$pedido->getValor("turnos").")"; + } else { + echo "NO"; + } + ?> +
+ + getValor("viajar") != "") { + echo "SI  (".$candidato->getValor("viajar").")"; + } else { + echo "NO"; + } + } + ?>
+ + getValor("internacional") != "") { + echo "SI  (".$candidato->getValor("internacional").")"; + } else { + echo "NO"; + } + } + ?>
+ + getValor("guardias") != "") { + echo "SI  (".$candidato->getValor("guardias").")"; + } else { + echo "NO"; + } + } + ?>
+ + getValor("entrevistas") != "") { + echo "SI  (".$candidato->getValor("entrevistas").")"; + } else { + echo "NO"; + } + } + ?>
+ + getValor("carnet") != "") { + echo "SI  (".$candidato->getValor("carnet").")"; + } else { + echo "NO"; + } + } + ?>
-
+ + + + + + + + +
+'.$locale['Capacidades001'].''; +//echo ''; +$CapacidadesProfesionales = $pedido->getCapacidadesProfesionales(); +VerListaCapacidadesProfesionales($CapacidadesProfesionales, "ver_oferta"); +?> + +'.$locale['Capacidades001'].''; +//echo ''; +if (!empty($candidato)){ + $CapacidadesProfesionales = $candidato->getCapacidadesProfesionales(); + VerListaCapacidadesProfesionales($CapacidadesProfesionales, "ver_oferta"); +} +?> +
+ +
-getValor("estado") == 110)) { -?> getCandidatosDisponibles()->getCandidatos(); @@ -226,9 +403,8 @@ if (($oferta->getValor("estado") == 110)) { - - + @@ -236,17 +412,17 @@ if (($oferta->getValor("estado") == 110)) { echo ""; $final = count($listaCandidatos); for ($i = 0; $i < $final; $i++) { - $candidato = $listaCandidatos[$i]; + $candidato_aux = $listaCandidatos[$i]; ?> + - - diff --git a/ver_pedido.php b/ver_pedido.php index 2e068e2..2d63046 100644 --- a/ver_pedido.php +++ b/ver_pedido.php @@ -261,7 +261,7 @@ echo $mensaje; getValor("turnos") != "") { - echo "SI  (".$persona->getValor("turnos").")"; + echo "SI  (".$pedido->getValor("turnos").")"; } else { echo "NO"; } @@ -271,7 +271,7 @@ echo $mensaje; getValor("guardias") != "") { - echo "SI  (".$persona->getValor("guardias").")"; + echo "SI  (".$pedido->getValor("guardias").")"; } else { echo "NO"; } @@ -281,7 +281,7 @@ echo $mensaje; getValor("viajar") != "") { - echo "SI  (".$persona->getValor("viajar").")"; + echo "SI  (".$pedido->getValor("viajar").")"; } else { echo "NO"; } @@ -293,7 +293,7 @@ echo $mensaje; getValor("internacional") != "") { - echo "SI  (".$persona->getValor("internacional").")"; + echo "SI  (".$pedido->getValor("internacional").")"; } else { echo "NO"; }
getValor("candidato"); if (!empty($candActual)) { - echo "getValor("oid")."&action=aceptar&idCand=".$candidato->getValor("oid")."')\">"; + echo "getValor("oid")."&action=aceptar&idCand=".$candidato_aux->getValor("oid")."')\">"; } else { - echo ""; + echo ""; } ?> @@ -255,29 +431,26 @@ if (($oferta->getValor("estado") == 110)) { - " target=popup onclick=window.open('', 'popup', ',',',',',',',','width = 600, height = 800')>getValor("nombre") . " " . $candidato->getValor("apellidos"); ?> + " target=popup onclick=window.open('', 'popup', ',',',',',',',','width = 600, height = 800')>getValor("nombre") . " " . $candidato_aux->getValor("apellidos"); ?> getValor("nombre_estado"); ?> - getPerfiles(); - $keylocalidades = array_values($perfiles); - // Mostramos la lista para borrar - foreach ($perfiles as $nombre => $valor) { - echo "- " . $nombre . "
"; - } - ?> + +'.$locale['Capacidades001'].''; +//echo ''; +if (!empty($candidato_aux)){ + $CapacidadesProfesionales = $candidato_aux->getCapacidadesProfesionales(); + VerListaCapacidadesProfesionales($CapacidadesProfesionales, "ver_oferta"); +} +?> +
getValor("nombre_estado"); ?>getValor("oid")); - if (gettype($tecnologias) != "NULL") { - foreach ($tecnologias as $tecno) { - echo $tecno . ","; - } - } - ?>  getValor("oid")); + $idiomas = rellena_lista_oid("idioma_usuario", "idiomas", "idioma", $candidato_aux->getValor("oid")); if (gettype($idiomas) != "NULL") { foreach ($idiomas as $tecno) { echo $tecno . ","; @@ -299,10 +472,6 @@ if (($oferta->getValor("estado") == 110)) { } // if ?> - -