Tareas #598. En el menú "Tablero", mostrar las últimas acciones realizadas almacenadas en el historial de cambios

git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk/src@58 e2b1556b-49f8-d141-9351-52d6861a72d9
This commit is contained in:
roberto 2011-05-11 16:44:19 +00:00
parent 7486fe0cc0
commit c5ea2c5d3c
4 changed files with 89 additions and 3 deletions

View File

@ -9,6 +9,8 @@ include_once("html/cabecera.php");
echo "<h2>".$locale['002']."</h2>";
include("tablero.php");
if($_SESSION["oid"]){
include_once("alarmas.php");
}

View File

@ -454,7 +454,7 @@ if(in_array("personales",$mostrarDetalle)){ ?>
<?php }
if(in_array("historial",$mostrarDetalle)){ ?>
<!-- HISTORIAL -->
<div class="encabezado"><?php echo $locale['1552']; ?></div>
<div class="encabezado"><a name="historial"></a><?php echo $locale['1552']; ?></div>
<table align="center" width="100%"><td>
<tr>
<td align="center" colspan="3" width="100%">

83
tablero.php Normal file
View File

@ -0,0 +1,83 @@
<div class="encabezado">LISTA DE &Uacute;LTIMOS CAMBIOS DE CANDIDATOS</div>
<br/>
<table cellpadding="0" cellspacing="1" width="600" class="agenda">
<tr class="encabezado">
<th width="120">Fecha cambio</th>
<th>Candidato</th>
<th>Acciones</th>
</tr>
<?php
$resultado_usuarios;
//Se sacaran los usuarios que han sido modificados o añadidos en los últimos 30 días
$sql_usuarios = 'SELECT DISTINCT h.oid_h, h_max.fecha_h_max, usuarios.tipo, usuarios.nombre, usuarios.apellidos
FROM historial_usuario as h
left join (
select h1.oid_h, max(h1.fecha_h) as fecha_h_max
from historial_usuario as h1
group by 1
) as h_max on (h_max.oid_h = h.oid_h)
left join usuarios on (usuarios.oid = h.oid_h)
where h.fecha_h between date_sub(now(),interval 30 day) and now()';
$bd=new BD();
$resultado_usuarios = $bd->execQuery($sql_usuarios);
while($row = mysql_fetch_array($resultado_usuarios)) {
?>
<tr>
<td class="agendaTitDia"> <?php echo $row["fecha_h_max"] ?> </td>
<td class="agendaTitDia"> <?php echo $row["nombre"] . ' ' . $row["apellidos"]?> </td>
<td class="agendaTitDia"> <a href="detalle_candidato.php?oid=<?php echo $row["oid_h"]; ?>#historial"><img src="css/brick_go.png" title="Ver cambios"/></a>
</td>
</tr>
<?php
}
?>
</table>
<br/><br/>
<div class="encabezado">LISTA DE &Uacute;LTIMOS CAMBIOS DE SOLICITUDES DE OFERTA</div>
<br/>
<table cellpadding="0" cellspacing="1" width="600" class="agenda">
<tr class="encabezado">
<th width="120">Fecha cambio</th>
<th>Solicitud de oferta</th>
<th>Acciones</th>
</tr>
<?php
$resultado_ofertas;
//Se sacaran los usuarios que han sido modificados o añadidos en los últimos 30 días
$sql_ofertas = 'SELECT DISTINCT h.oid_h, h_max.fecha_h_max, clientes.id, pedidos.nombre, pedidos.empleados, pedidos.duracion
FROM historial_pedido as h
left join (
select h1.oid_h, max(h1.fecha_h) as fecha_h_max
from historial_pedido as h1
group by 1
) as h_max on (h_max.oid_h = h.oid_h)
left join pedidos on (pedidos.oid = h.oid_h)
left join clientes on (clientes.oid = pedidos.cliente)
where h.fecha_h between date_sub(now(),interval 30 day) and now()';
$bd=new BD();
$resultado_ofertas = $bd->execQuery($sql_ofertas);
while($row = mysql_fetch_array($resultado_ofertas)) {
?>
<tr>
<td class="agendaTitDia"> <?php echo $row["fecha_h_max"] ?> </td>
<td class="agendaTitDia"> <?php echo $row["id"] . ' ' . $row["nombre"] . ' - n&uacute;mero de empleados: ' . $row["empleados"]?> </td>
<td class="agendaTitDia"> <a href="pedido.php?idPedido=<?php echo $row["oid_h"]; ?>#historial"><img src="css/brick_go.png" title="Ver cambios"/></a>
</td>
</tr>
<?php
}
?>
</table>

View File

@ -721,9 +721,10 @@ if($mensaje!=""){
</td>
</tr>
<tr align="center">
<td ><?php echo $locale['127']; ?><br />
<textarea name="historial" readonly rows="8" cols="90" maxlength="300" style="overflow: auto;width:100%"><?php echo $pedido->getHistorial(); ?></textarea>
<td ><a name="historial"><?php echo $locale['127']; ?></a><br />
<textarea name="historial" readonly rows="8" cols="90" maxlength="300" style="overflow: auto;width:100%"><?php echo $pedido->getHistorial(); ?></textarea>
</td>
</tr>
</table>