Ofertas adaptadas.

git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk/src@95 e2b1556b-49f8-d141-9351-52d6861a72d9
This commit is contained in:
roberto 2011-06-10 15:03:20 +00:00
parent 6432bd0f44
commit 4f46f0ee82
4 changed files with 218 additions and 46 deletions

View File

@ -297,30 +297,31 @@ class Oferta {
} }
function asignarCandidato($idCandidato) { function asignarCandidato($idCandidato) {
/*
$idCand = $this->getValor("candidato"); $idCand = $this->getValor("candidato");
if (!empty($idCand)) { if (!empty($idCand)) {
if (!$this->quitarCandidato()) { if (!$this->quitarCandidato()) {
return false; return false;
} }
} }
*/
$candidato = new Candidato($this->usuario, $idCandidato); $candidato = new Candidato($this->usuario, $idCandidato);
$estadoCand = $candidato->getValor("estado"); $estadoCand = $candidato->getValor("estado");
$numOfertasCandidato = $this->getOfertasCandidato($idCand); $numOfertasCandidato = $this->getOfertasCandidato($idCand);
switch ($estadoCand) { switch ($estadoCand) {
//Disponible asignado, el estado del candidato no cambia, solo se asigna a la oferta y ya está. //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); $this->setCampo("candidato", $idCandidato);
return true; return true;
break; break;
//Pendiente de clasificar, Rechazados tipo1, tipo2, tipo3, Disponible. Todos los candidatos con alguno de estos estados cambiarán a Disponible asignado (560) //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 510:;
case "521": case 521:;
case "522": case 522:;
case "523": case 523:;
case "540": case 540:
$this->setCampo("candidato", $idCandidato); $this->setCampo("candidato", $idCandidato);
if ($candidato->transita("560", "")){ if ($candidato->transita("560", "")){
$nombre_candidato = $candidato->getValor("nombre") . " " . $candidato->getValor("apellidos"); $nombre_candidato = $candidato->getValor("nombre") . " " . $candidato->getValor("apellidos");

View File

@ -184,6 +184,8 @@ $locale['Ofertas003'] = "Nombre y apellidos:";
$locale['Ofertas004'] = "ESTADO OFERTA"; $locale['Ofertas004'] = "ESTADO OFERTA";
$locale['Ofertas005'] = "GRADO DE CONCORDANCIA"; $locale['Ofertas005'] = "GRADO DE CONCORDANCIA";
$locale['Ofertas006'] = "Ver ficha candidato"; $locale['Ofertas006'] = "Ver ficha candidato";
$locale['Ofertas007'] = "SOLICITUD";
$locale['Ofertas008'] = "CANDIDATO";
//Historial: //Historial:

View File

@ -48,6 +48,7 @@ if (!empty($action)) {
if (!empty($_GET['idCand'])) { if (!empty($_GET['idCand'])) {
try { try {
$idCand = $_GET['idCand']; $idCand = $_GET['idCand'];
$estado = $oferta->asignarCandidato($idCand); $estado = $oferta->asignarCandidato($idCand);
if ($estado) { if ($estado) {
@ -195,24 +196,200 @@ echo $mensaje;
<div class="encabezado"><?php echo $locale['Ofertas005']?></div> <div class="encabezado"><?php echo $locale['Ofertas005']?></div>
<table width="100%"> <table width="100%">
<tr><td> <tr><td>
<div class="encabezado"><?php echo $locale['1550']?></div>
<table width="100%"> <table width="100%">
<tr class='encabezado'>
<td><?php echo $locale['Ofertas007']; ?></td>
<td><?php echo $locale['Ofertas008']; ?></td>
</tr>
<tr> <tr>
<td> <td>
REQUISITOS SOLICITUD <span class="resaltado"><?php echo $locale['209']; ?></span>
<?php
$tecnologias = $pedido->getProvincias();
if (count($tecnologias) > 0) {
foreach ($tecnologias as $nombre => $codigo) {
echo $nombre . ", ";
}
} else {
}
echo nl2br($pedido->getValor("observaciones_direccion"));
?>
<span class="resaltado"><?php echo $locale['Solicitudes008']; ?></span>&nbsp;&nbsp;&nbsp;<?php echo $pedido->getValor("direccion_solicitud"); ?><br/>
</td> </td>
<td> <td>
DETALLES CANDIDATO <span class="resaltado"><?php echo $locale['1561']; ?></span>
<?php
if (!empty($candidato)) {
$localidadesDeseadas = $candidato->getProvinciasDeseadas();
$keylocalidades = array_values($localidadesDeseadas);
// Mostramos la lista
foreach ($localidadesDeseadas as $nombre => $valor) {
echo $nombre . ", ";
}
echo nl2br($candidato->getValor("observaciones_prov_deseada"));
}
?>
<span class="resaltado"><?php echo $locale['5001']; ?></span>
<?php
if (!empty($candidato)) {
$localidadesNoDeseadas = $candidato->getProvinciasNoDeseadas();
$keylocalidades = array_values($localidadesNoDeseadas);
// Mostramos la lista
foreach ($localidadesNoDeseadas as $nombre => $valor) {
echo $nombre . ", ";
}
echo nl2br($candidato->getValor("observaciones_prov_nodeseada"));
}
?>
</td>
</tr>
<tr>
<td>
<span class="resaltado"><?php echo $locale['129']; ?></span>&nbsp;&nbsp;&nbsp;<?php echo $pedido->getValor("nombre_salario_max"); ?><br/>
<span class="resaltado"><?php echo $locale['130']; ?></span>&nbsp;&nbsp;&nbsp;<?php echo $pedido->getValor("nombre_salario_min"); ?><br/>
<span class="resaltado"><?php echo $locale['Solicitudes007']; ?></span>&nbsp;&nbsp;&nbsp;<?php echo $pedido->getValor("tasa_economica"); ?><br/>
</td>
<td>
<span class="resaltado"><?php echo $locale['129']; ?></span><?php if (!empty($candidato)) echo $candidato->getValor("nombre_salario_min"); ?><br>
<span class="resaltado"><?php echo $locale['130']; ?></span><?php if (!empty($candidato)) echo $candidato->getValor("nombre_salario_max"); ?><br>
<span class="resaltado"><?php echo $locale['100118']; ?></span><?php if (!empty($candidato)) echo $candidato->getValor("tarifa"); ?>
</td>
</tr>
<tr>
<td>
<span class="resaltado"><?php echo $locale['Candidato003']; ?></span>
<?php
if ($pedido->getValor("viajar") != "") {
echo "SI&nbsp;&nbsp;(".$pedido->getValor("viajar").")";
} else {
echo "NO";
}
?><br/>
<span class="resaltado"><?php echo $locale['Candidato004']; ?></span>
<?php
if ($pedido->getValor("internacional") != "") {
echo "SI&nbsp;&nbsp;(".$pedido->getValor("internacional").")";
} else {
echo "NO";
}
?><br/>
<span class="resaltado"><?php echo $locale['Candidato002']; ?></span>
<?php
if ($pedido->getValor("guardias") != "") {
echo "SI&nbsp;&nbsp;(".$pedido->getValor("guardias").")";
} else {
echo "NO";
}
?><br/>
<span class="resaltado"><?php echo $locale['Solicitudes009']; ?></span>
<?php
if ($pedido->getValor("turnos") != "") {
echo "SI&nbsp;&nbsp;(".$pedido->getValor("turnos").")";
} else {
echo "NO";
}
?>
</td>
<td>
<span class="resaltado"><?php echo $locale['Candidato003']; ?></span>
<?php
if (!empty($candidato)) {
if ($candidato->getValor("viajar") != "") {
echo "SI&nbsp;&nbsp;(".$candidato->getValor("viajar").")";
} else {
echo "NO";
}
}
?><br/>
<span class="resaltado"><?php echo $locale['Candidato004']; ?></span>
<?php
if (!empty($candidato)) {
if ($candidato->getValor("internacional") != "") {
echo "SI&nbsp;&nbsp;(".$candidato->getValor("internacional").")";
} else {
echo "NO";
}
}
?><br/>
<span class="resaltado"><?php echo $locale['Candidato002']; ?></span>
<?php
if (!empty($candidato)) {
if ($candidato->getValor("guardias") != "") {
echo "SI&nbsp;&nbsp;(".$candidato->getValor("guardias").")";
} else {
echo "NO";
}
}
?><br/>
<span class="resaltado"><?php echo $locale['Candidato001']; ?></span>
<?php
if (!empty($candidato)){
if ($candidato->getValor("entrevistas") != "") {
echo "SI&nbsp;&nbsp;(".$candidato->getValor("entrevistas").")";
} else {
echo "NO";
}
}
?><br/>
<span class="resaltado"><?php echo $locale['Candidato005']; ?></span>
<?php
if (!empty($candidato)){
if ($candidato->getValor("carnet") != "") {
echo "SI&nbsp;&nbsp;(".$candidato->getValor("carnet").")";
} else {
echo "NO";
}
}
?>
</td> </td>
</tr> </tr>
</table> </table>
</td></tr>
<div class="encabezado"><?php echo $locale['Capacidades001']?></div>
<table width="100%">
<tr class='encabezado'>
<td><?php echo $locale['Ofertas007']; ?></td>
<td><?php echo $locale['Ofertas008']; ?></td>
</tr>
<tr>
<td>
<?php
///////////////////////////////
//CAPACIDADES PROFESIONALES SO
//////////////////////////////
echo '<div id="capacidades" name="capacidades" class="encabezado">'.$locale['Capacidades001'].'</div>';
//echo '<input language="javascript" type="button" value="'.$locale['Capacidades003'].'" class="button" onclick="if(popup(\'addCapacidadProfesional.php?id_solicitud='.$pedido->getValor("oid").'&entidad=solicitud\', \'notes\')) window.location.reload()">';
$CapacidadesProfesionales = $pedido->getCapacidadesProfesionales();
VerListaCapacidadesProfesionales($CapacidadesProfesionales, "ver_oferta");
?>
</td>
<td>
<?php
//////////////////////////////////////
//CAPACIDADES PROFESIONALES CANDIDATO
/////////////////////////////////////
echo '<div id="capacidades" name="capacidades" class="encabezado">'.$locale['Capacidades001'].'</div>';
//echo '<input language="javascript" type="button" value="'.$locale['Capacidades003'].'" class="button" onclick="if(popup(\'addCapacidadProfesional.php?id_solicitud='.$pedido->getValor("oid").'&entidad=solicitud\', \'notes\')) window.location.reload()">';
if (!empty($candidato)){
$CapacidadesProfesionales = $candidato->getCapacidadesProfesionales();
VerListaCapacidadesProfesionales($CapacidadesProfesionales, "ver_oferta");
}
?>
</td>
</tr>
</table>
</td></tr>
</table> </table>
<br/> <br/>
<?php
if (($oferta->getValor("estado") == 110)) {
?>
<table width="100%"> <table width="100%">
<?php <?php
$listaCandidatos = $oferta->getCandidatosDisponibles()->getCandidatos(); $listaCandidatos = $oferta->getCandidatosDisponibles()->getCandidatos();
@ -226,9 +403,8 @@ if (($oferta->getValor("estado") == 110)) {
<tr class="nombre"> <tr class="nombre">
<th><?php echo $locale['2014']; ?></th> <th><?php echo $locale['2014']; ?></th>
<th><?php echo $locale['704']; ?></th> <th><?php echo $locale['704']; ?></th>
<th><?php echo $locale['202']; ?></th>
<th><?php echo $locale['1052']; ?></th> <th><?php echo $locale['1052']; ?></th>
<th><?php echo $locale['203']; ?></th> <th><?php echo $locale['Capacidades001']; ?></th>
<th><?php echo $locale['206']; ?></th> <th><?php echo $locale['206']; ?></th>
</tr> </tr>
</thead> </thead>
@ -236,17 +412,17 @@ if (($oferta->getValor("estado") == 110)) {
echo "<tbody>"; echo "<tbody>";
$final = count($listaCandidatos); $final = count($listaCandidatos);
for ($i = 0; $i < $final; $i++) { for ($i = 0; $i < $final; $i++) {
$candidato = $listaCandidatos[$i]; $candidato_aux = $listaCandidatos[$i];
?> ?>
<tr> <tr>
<td class="centrado"> <td class="centrado">
<?php <?php
$candActual = $oferta->getValor("candidato"); $candActual = $oferta->getValor("candidato");
if (!empty($candActual)) { if (!empty($candActual)) {
echo "<a href=\"#\" onclick=\"cambiarCandidato('oferta.php?idOferta=".$oferta->getValor("oid")."&action=aceptar&idCand=".$candidato->getValor("oid")."')\">"; echo "<a href=\"#\" onclick=\"cambiarCandidato('oferta.php?idOferta=".$oferta->getValor("oid")."&action=aceptar&idCand=".$candidato_aux->getValor("oid")."')\">";
} }
else { else {
echo "<a href='oferta.php?idOferta=".$oferta->getValor("oid")."&action=aceptar&idCand=".$candidato->getValor("oid")."'>"; echo "<a href='oferta.php?idOferta=".$oferta->getValor("oid")."&action=aceptar&idCand=".$candidato_aux->getValor("oid")."'>";
} }
?> ?>
<img src='css/accept.png' title="<?php echo $locale['1047']; ?>" /> <img src='css/accept.png' title="<?php echo $locale['1047']; ?>" />
@ -255,29 +431,26 @@ if (($oferta->getValor("estado") == 110)) {
</td> </td>
<td> <td>
<a href="detalle_persona.php?oid=<?php echo $candidato->getValor("oid"); ?>" target=popup onclick=window.open('', 'popup', ',',',',',',',','width = 600, height = 800')><?php echo $candidato->getValor("nombre") . " " . $candidato->getValor("apellidos"); ?></a> <a href="detalle_persona.php?oid=<?php echo $candidato_aux->getValor("oid"); ?>" target=popup onclick=window.open('', 'popup', ',',',',',',',','width = 600, height = 800')><?php echo $candidato_aux->getValor("nombre") . " " . $candidato_aux->getValor("apellidos"); ?></a>
</td> </td>
<td><?php echo $candidato_aux->getValor("nombre_estado"); ?></td>
<td> <td>
<?php
$perfiles = $candidato->getPerfiles(); <?php
$keylocalidades = array_values($perfiles); //////////////////////////////////////
// Mostramos la lista para borrar //CAPACIDADES PROFESIONALES CANDIDATO
foreach ($perfiles as $nombre => $valor) { /////////////////////////////////////
echo "- " . $nombre . "<br />"; echo '<div id="capacidades" name="capacidades" class="encabezado">'.$locale['Capacidades001'].'</div>';
} //echo '<input language="javascript" type="button" value="'.$locale['Capacidades003'].'" class="button" onclick="if(popup(\'addCapacidadProfesional.php?id_solicitud='.$pedido->getValor("oid").'&entidad=solicitud\', \'notes\')) window.location.reload()">';
?> if (!empty($candidato_aux)){
$CapacidadesProfesionales = $candidato_aux->getCapacidadesProfesionales();
VerListaCapacidadesProfesionales($CapacidadesProfesionales, "ver_oferta");
}
?>
</td> </td>
<td><?php echo $candidato->getValor("nombre_estado"); ?></td>
<td><?php
$tecnologias = rellena_lista_oid("tecnologia_usuario", "tecnologia", "tecnologia", $candidato->getValor("oid"));
if (gettype($tecnologias) != "NULL") {
foreach ($tecnologias as $tecno) {
echo $tecno . ",";
}
}
?></td>
<td>&nbsp;<?php <td>&nbsp;<?php
$idiomas = rellena_lista_oid("idioma_usuario", "idiomas", "idioma", $candidato->getValor("oid")); $idiomas = rellena_lista_oid("idioma_usuario", "idiomas", "idioma", $candidato_aux->getValor("oid"));
if (gettype($idiomas) != "NULL") { if (gettype($idiomas) != "NULL") {
foreach ($idiomas as $tecno) { foreach ($idiomas as $tecno) {
echo $tecno . ","; echo $tecno . ",";
@ -299,10 +472,6 @@ if (($oferta->getValor("estado") == 110)) {
} // if } // if
?> ?>
<?php
}
?>
<tr align="center"> <!-- HISTORIAL --> <tr align="center"> <!-- HISTORIAL -->

View File

@ -261,7 +261,7 @@ echo $mensaje;
<span class="resaltado"><?php echo $locale['Solicitudes009']; ?></span> <span class="resaltado"><?php echo $locale['Solicitudes009']; ?></span>
<?php <?php
if ($pedido->getValor("turnos") != "") { if ($pedido->getValor("turnos") != "") {
echo "SI&nbsp;&nbsp;(".$persona->getValor("turnos").")"; echo "SI&nbsp;&nbsp;(".$pedido->getValor("turnos").")";
} else { } else {
echo "NO"; echo "NO";
} }
@ -271,7 +271,7 @@ echo $mensaje;
<span class="resaltado"><?php echo $locale['Candidato002']; ?></span> <span class="resaltado"><?php echo $locale['Candidato002']; ?></span>
<?php <?php
if ($pedido->getValor("guardias") != "") { if ($pedido->getValor("guardias") != "") {
echo "SI&nbsp;&nbsp;(".$persona->getValor("guardias").")"; echo "SI&nbsp;&nbsp;(".$pedido->getValor("guardias").")";
} else { } else {
echo "NO"; echo "NO";
} }
@ -281,7 +281,7 @@ echo $mensaje;
<span class="resaltado"><?php echo $locale['Candidato003']; ?></span> <span class="resaltado"><?php echo $locale['Candidato003']; ?></span>
<?php <?php
if ($pedido->getValor("viajar") != "") { if ($pedido->getValor("viajar") != "") {
echo "SI&nbsp;&nbsp;(".$persona->getValor("viajar").")"; echo "SI&nbsp;&nbsp;(".$pedido->getValor("viajar").")";
} else { } else {
echo "NO"; echo "NO";
} }
@ -293,7 +293,7 @@ echo $mensaje;
<span class="resaltado"><?php echo $locale['Candidato004']; ?></span> <span class="resaltado"><?php echo $locale['Candidato004']; ?></span>
<?php <?php
if ($pedido->getValor("internacional") != "") { if ($pedido->getValor("internacional") != "") {
echo "SI&nbsp;&nbsp;(".$persona->getValor("internacional").")"; echo "SI&nbsp;&nbsp;(".$pedido->getValor("internacional").")";
} else { } else {
echo "NO"; echo "NO";
} }