- Añadir campo "Salario ofertado para ésta oferta" a la oferta en el alta y modifica-ción.
- Además en la ficha del candidato, en la lista de ofertas a las que está asociado, sacar también el salario ofertado. - El campo observaciones de las ofertas que se pueda modificar. git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk@134 e2b1556b-49f8-d141-9351-52d6861a72d9
This commit is contained in:
parent
6776212102
commit
5c48d45424
@ -94,9 +94,18 @@
|
||||
$opcionesThis = $opciones;
|
||||
}
|
||||
echo '<a href="lista_ofertas.php" class="menuOption" style="color:#000000">'.$this->locale['5100'].'</a>';
|
||||
if($usuario->tieneRol("3") ||$usuario->tieneRol("1")){
|
||||
|
||||
if(substr_count($_SERVER['REQUEST_URI'],"/oferta.php?idOferta")==1){
|
||||
echo '<a href="gestion_oferta.php?idOferta='.$_GET['idOferta'].'" class="menuOption" style="color:#000000">'.$this->locale['ed'].'</a>';
|
||||
}
|
||||
|
||||
if(substr_count($_SERVER['REQUEST_URI'],"/gestion_oferta.php?idOferta")==1){
|
||||
echo '<a href="oferta.php?idOferta='.$_GET['idOferta'].'" class="menuOption" style="color:#000000">'.$this->locale['im'].'</a>';
|
||||
}
|
||||
|
||||
// if($usuario->tieneRol("3") ||$usuario->tieneRol("1")){
|
||||
// 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>';*/
|
||||
/*
|
||||
if(!in_array("gestionar", $opcionesThis)){
|
||||
|
||||
@ -34,6 +34,7 @@ if (!empty($_POST)) {
|
||||
$idiomas=$_POST['idiomas'];
|
||||
$provincias=$_POST['provincias']; */
|
||||
$observaciones = $_POST['observaciones'];
|
||||
$salario_ofertado = $_POST['salario_ofertado'];
|
||||
$gerente=$usuario->getValor("oid");
|
||||
/* $pesoTec=$_POST['pesoTec'];
|
||||
$pesoIdi=$_POST['pesoIdi'];
|
||||
@ -61,6 +62,7 @@ if (!empty($_POST)) {
|
||||
$arrayInsert["obsGerente"] = $observaciones;
|
||||
$arrayInsert["estado"] = "100";
|
||||
$arrayInsert["gerente"]=$gerente;
|
||||
$arrayInsert["salario_ofertado"] = $salario_ofertado;
|
||||
|
||||
/* $arrayInsert["prioridad"]= $prioridad;
|
||||
$arrayInsert["empleados"]=$empleados;
|
||||
@ -122,7 +124,6 @@ if (in_array("1", $errores))
|
||||
echo " class=\"errorcampo\"";
|
||||
|
||||
echo ">" . $locale['1025'] . ":<br/>";
|
||||
echo "holaaa";
|
||||
rellena_desplegable_pedidos_estado("solicitud", "130, 140", array($solicitud));
|
||||
|
||||
echo " </td>";
|
||||
@ -135,6 +136,10 @@ echo '<tr>' .
|
||||
'<td colspan="3" align="center">' . $locale['135'] .
|
||||
'<br><textarea name="observaciones" rows="10" cols="120" style="overflow: auto; width:100%;">' . nl2br($observaciones) . '</textarea></td>' .
|
||||
'</tr>';
|
||||
|
||||
echo '<tr><td>'.$locale['Ofertas010'].'<br><input type="text" name="salario_ofertado" value="'.$salario_ofertado.'" size="15" maxlength="20"></td>';
|
||||
|
||||
|
||||
// Botones de guardar y restablecer
|
||||
echo "<tr><td colspan=\"3\" align=\"center\">";
|
||||
echo '<input type="submit" value="' . $locale['gu'] . '" onclick="return comprobar_registro(this)" class="button">';
|
||||
|
||||
@ -9,7 +9,7 @@ if(!$_SESSION["oid"]){
|
||||
|
||||
$consulta = "SELECT U.oid as idCandidato,CP.oid as idOferta, CP.referencia,
|
||||
P.oid as idPedido, U.nombre,U.apellidos,P.nombre AS pedido, CE.nombre AS estado,
|
||||
CP.obsRRHH,CP.obsGerente
|
||||
CP.obsRRHH,CP.obsGerente, CP.salario_ofertado
|
||||
FROM usuarios U,pedidos P,candidato_pedido CP,candidaturas_estados CE
|
||||
WHERE U.oid='".$persona->getValor("oid")."'
|
||||
AND CP.candidato=U.oid
|
||||
@ -35,11 +35,13 @@ if ($resultado = consultar($consulta)){
|
||||
$oidOferta = $row["idOferta"];
|
||||
$obsRRHH = $row["obsRRHH"];
|
||||
$obsGerente = $row["obsGerente"];
|
||||
$salario_ofertado = $row["salario_ofertado"];
|
||||
$idCandidato = $row["idCandidato"];
|
||||
echo "<li>";
|
||||
echo "Oferta <a href=\"oferta.php?idOferta=".$oidOferta."\" target=\"_blank\" />$referenciaOferta</a> ";
|
||||
echo "($estado) ";
|
||||
echo "- Solicitud \"<a href=\"pedido.php?idPedido=".$oid."\" target=\"_blank\" />$pedido</a>\"</li>";
|
||||
echo "- Solicitud \"<a href=\"pedido.php?idPedido=".$oid."\" target=\"_blank\" />$pedido</a>";
|
||||
echo " - Salario ofertado: ". $salario_ofertado. "</li>";
|
||||
|
||||
// desactivar el comentario por ahora
|
||||
if (false) { //if($usuario->tieneRol("4")){
|
||||
|
||||
@ -175,6 +175,7 @@ CREATE TABLE IF NOT EXISTS `candidato_pedido` (
|
||||
`fecha` datetime NOT NULL,
|
||||
`obsGerente` text COLLATE latin1_spanish_ci NOT NULL,
|
||||
`obsRRHH` text COLLATE latin1_spanish_ci NOT NULL,
|
||||
`salario_ofertado` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`oid`),
|
||||
UNIQUE KEY `candidato pedido` (`candidato`,`pedido`),
|
||||
KEY `proyecto` (`pedido`),
|
||||
|
||||
100
src/gestion_oferta.php
Normal file
100
src/gestion_oferta.php
Normal file
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
include("seguridad.php");
|
||||
include("functions.php");
|
||||
include_once("Objects/ListaOfertas.php");
|
||||
include_once("Objects/Oferta.php");
|
||||
include_once("Objects/Pedido.php");
|
||||
include_once("Objects/HTML.php");
|
||||
include("html/cabecera.php");
|
||||
|
||||
$html = new HTML($locale);
|
||||
$errores = array();
|
||||
$usuario = $_SESSION["usuario"];
|
||||
$idOferta=$_GET['idOferta'];
|
||||
$Oferta=new Oferta($idOferta,$usuario);
|
||||
echo $html->menuOfertas($usuario, "");
|
||||
|
||||
// Comprobamos si estamos haciendo algo
|
||||
$action="";
|
||||
if (isset($_POST['action']) || isset($_GET['action'])) {
|
||||
if (isset($_POST['action']) && ($_POST['action']!="")) {
|
||||
$action = $_POST['action'];
|
||||
} else {
|
||||
if (isset($_GET['action']) && ($_GET['action']!="")) {
|
||||
$action = $_GET['action'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$errores = array();
|
||||
$mensaje="";
|
||||
|
||||
switch ($action) {
|
||||
case "edit":
|
||||
try{
|
||||
if(count($errores)==0){
|
||||
$Oferta->setCampo("pedido",$_POST['solicitud'][0]);
|
||||
$Oferta->setCampo("obsGerente",$_POST['observaciones']);
|
||||
$Oferta->setCampo("gerente",$usuario->getValor("oid"));
|
||||
$Oferta->setCampo("salario_ofertado",$_POST['salario_ofertado']);
|
||||
|
||||
$mensaje=$locale['Ofertas011'];
|
||||
$Oferta=new Oferta($idOferta,$usuario);
|
||||
}
|
||||
} catch (Exception $e){
|
||||
$mensaje=$locale[$e->getMessage()];
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo "<h2>".$Oferta->getValor("referencia") ." - ". $Oferta->getValor("nombre_candidato")."</h2>";
|
||||
if($mensaje!=""){
|
||||
// Mostramos el mensaje
|
||||
if(in_array("9",$errores)){
|
||||
echo "<div class=\"aviso error\">".$mensaje."</div>";
|
||||
}else{
|
||||
echo "<div class=\"aviso ok\">".$mensaje."</div>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo '<form method="POST" action="gestion_oferta.php?idOferta='.$Oferta->getValor("oid").'" name="form_registro" enctype="multipart/form-data">';
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"edit\" />";
|
||||
echo "<table id=\"editOferta\">" .
|
||||
"<tr>" .
|
||||
" <td";
|
||||
if (in_array("1", $errores))
|
||||
echo " class=\"errorcampo\"";
|
||||
|
||||
echo ">" . $locale['1025'] . ":<br/>";
|
||||
rellena_desplegable_pedidos_estado("solicitud", "130, 140", array($Oferta->getValor('pedido')));
|
||||
|
||||
echo " </td>";
|
||||
|
||||
echo "</td></tr>";
|
||||
echo "<tr>";
|
||||
|
||||
echo "</tr>";
|
||||
echo '<tr>' .
|
||||
'<td colspan="3" align="center">' . $locale['135'] .
|
||||
'<br><textarea name="observaciones" rows="10" cols="120" style="overflow: auto; width:100%;">';
|
||||
|
||||
echo $Oferta->getValor("obsGerente");
|
||||
|
||||
echo '</textarea></td></tr>';
|
||||
|
||||
echo '<tr><td>'.$locale['Ofertas010'].'<br><input type="text" name="salario_ofertado" value="'.$Oferta->getValor("salario_ofertado").'" size="15" maxlength="20"></td>';
|
||||
|
||||
|
||||
// Botones de guardar y restablecer
|
||||
echo "<tr><td colspan=\"3\" align=\"center\">";
|
||||
echo '<input type="submit" value="' . $locale['gu'] . '" onclick="return comprobar_registro(this)" class="button">';
|
||||
echo '<input type="reset" value="' . $locale['res'] . '" class="button"></td>';
|
||||
echo "</tr></table>";
|
||||
echo "</form>";
|
||||
include_once("html/pie.php");
|
||||
?>
|
||||
@ -19,6 +19,7 @@ $locale['de'] = " de ";
|
||||
$locale['add'] = "Añadir";
|
||||
$locale['cancel'] = "Cancelar";
|
||||
$locale['cerrar'] = "Cerrar";
|
||||
$locale['im'] = "Imprimir";
|
||||
|
||||
//Cabecera:
|
||||
$locale['001'] = " .:: Gestión de solicitudes y ofertas ::.";
|
||||
@ -189,6 +190,8 @@ $locale['Ofertas006'] = "Ver ficha candidato";
|
||||
$locale['Ofertas007'] = "SOLICITUD";
|
||||
$locale['Ofertas008'] = "CANDIDATO";
|
||||
$locale['Ofertas009'] = "Todas las ofertas";
|
||||
$locale['Ofertas010'] = "Salario ofertado para la oferta";
|
||||
$locale['Ofertas011'] = "Se ha editado la oferta correctamente";
|
||||
|
||||
|
||||
//Historial:
|
||||
|
||||
@ -63,7 +63,7 @@ echo '<div id="ContTabul">';
|
||||
echo "<table width=\"100%\"> ";
|
||||
// Acciones
|
||||
echo "<tr class=\"encabezado\">";
|
||||
echo " <td align=\"center\" colspan=\"2\">" . $locale['2014'] . "</td>";
|
||||
echo " <td align=\"center\" colspan=\"3\">" . $locale['2014'] . "</td>";
|
||||
// denominacion
|
||||
$orderView = "denominacion";
|
||||
echo " <td align=\"center\">" . $locale['1042'].":" . "<br />" .
|
||||
@ -129,7 +129,7 @@ if (count($listadeOfertas) == 0) {
|
||||
echo "<tr>";
|
||||
if (($ofertaAct->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_oferta.php?idOferta=' . $ofertaAct->getValor("oid") . '"><img src="css/edit.png" title="' . $locale['2017'] . '"/></a></td>';
|
||||
echo '<td align="center"><a href="gestion_oferta.php?idOferta=' . $ofertaAct->getValor("oid") . '"><img src="css/edit.png" title="' . $locale['2017'] . '"/></a></td>';
|
||||
//echo '<td align="center"><a href="#"><img src="css/edit.png" title="' . $locale['2020'] . '"/></a></td>';
|
||||
echo "<td align=\"center\"><a href=\"#\" onclick=eliminarOferta('" . $ofertaAct->getValor("oid") . "') ><img src=\"css/eliminar.png\" title=\"" . $locale['2019'] . "\"/></a></td>";
|
||||
} else {
|
||||
|
||||
@ -161,7 +161,8 @@ echo $mensaje;
|
||||
<tr>
|
||||
<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("obsGerente")); ?><br/>
|
||||
<span class="resaltado"><?php echo $locale['Ofertas010']; ?></span> <?php echo$oferta->getValor("salario_ofertado"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user