feat: Actualizacion sistema SIO Backend
- Nuevo modulo de historial de cambios (ServicioHistorial) - Observer para tracking automatico de cambios en servicios - Correccion de variables auxiliar en ServiciosController - Actualizacion de configuraciones y migraciones - Endpoint para consultar historial de cambios Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
0
app/Models/BitacoraLaboral.php
Normal file → Executable file
0
app/Models/BitacoraLaboral.php
Normal file → Executable file
0
app/Models/CatEstatuServicio.php
Normal file → Executable file
0
app/Models/CatEstatuServicio.php
Normal file → Executable file
0
app/Models/CatFormaPago.php
Normal file → Executable file
0
app/Models/CatFormaPago.php
Normal file → Executable file
0
app/Models/CatMotivoEstatus.php
Normal file → Executable file
0
app/Models/CatMotivoEstatus.php
Normal file → Executable file
0
app/Models/CatOrigen.php
Normal file → Executable file
0
app/Models/CatOrigen.php
Normal file → Executable file
0
app/Models/CatServicio.php
Normal file → Executable file
0
app/Models/CatServicio.php
Normal file → Executable file
0
app/Models/CatTipoServicio.php
Normal file → Executable file
0
app/Models/CatTipoServicio.php
Normal file → Executable file
0
app/Models/Cliente.php
Normal file → Executable file
0
app/Models/Cliente.php
Normal file → Executable file
0
app/Models/ClienteDatoFiscal.php
Normal file → Executable file
0
app/Models/ClienteDatoFiscal.php
Normal file → Executable file
0
app/Models/ClienteDomicilio.php
Normal file → Executable file
0
app/Models/ClienteDomicilio.php
Normal file → Executable file
0
app/Models/CorreoSucursal.php
Normal file → Executable file
0
app/Models/CorreoSucursal.php
Normal file → Executable file
0
app/Models/FacturaFormaPago.php
Normal file → Executable file
0
app/Models/FacturaFormaPago.php
Normal file → Executable file
0
app/Models/FacturaMetodoPago.php
Normal file → Executable file
0
app/Models/FacturaMetodoPago.php
Normal file → Executable file
0
app/Models/FacturaTipoComprobante.php
Normal file → Executable file
0
app/Models/FacturaTipoComprobante.php
Normal file → Executable file
0
app/Models/FacturaUsoCFDI.php
Normal file → Executable file
0
app/Models/FacturaUsoCFDI.php
Normal file → Executable file
0
app/Models/Parametro.php
Normal file → Executable file
0
app/Models/Parametro.php
Normal file → Executable file
0
app/Models/PreguntaDomestico.php
Normal file → Executable file
0
app/Models/PreguntaDomestico.php
Normal file → Executable file
0
app/Models/PreguntaEmpresarial.php
Normal file → Executable file
0
app/Models/PreguntaEmpresarial.php
Normal file → Executable file
0
app/Models/RespuestaDomestico.php
Normal file → Executable file
0
app/Models/RespuestaDomestico.php
Normal file → Executable file
0
app/Models/RespuestaEmpresarial.php
Normal file → Executable file
0
app/Models/RespuestaEmpresarial.php
Normal file → Executable file
0
app/Models/RespuestaOperadorDet.php
Normal file → Executable file
0
app/Models/RespuestaOperadorDet.php
Normal file → Executable file
0
app/Models/RespuestaOperadorEnc.php
Normal file → Executable file
0
app/Models/RespuestaOperadorEnc.php
Normal file → Executable file
0
app/Models/Rol.php
Normal file → Executable file
0
app/Models/Rol.php
Normal file → Executable file
0
app/Models/RolUser.php
Normal file → Executable file
0
app/Models/RolUser.php
Normal file → Executable file
0
app/Models/ServicioDet.php
Normal file → Executable file
0
app/Models/ServicioDet.php
Normal file → Executable file
0
app/Models/ServicioEnc.php
Normal file → Executable file
0
app/Models/ServicioEnc.php
Normal file → Executable file
0
app/Models/ServicioEncuestaDomestico.php
Normal file → Executable file
0
app/Models/ServicioEncuestaDomestico.php
Normal file → Executable file
0
app/Models/ServicioEncuestaEmpresarial.php
Normal file → Executable file
0
app/Models/ServicioEncuestaEmpresarial.php
Normal file → Executable file
0
app/Models/ServicioEvidencia.php
Normal file → Executable file
0
app/Models/ServicioEvidencia.php
Normal file → Executable file
55
app/Models/ServicioHistorial.php
Normal file
55
app/Models/ServicioHistorial.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ServicioHistorial extends Model
|
||||
{
|
||||
protected $table = 'servicios_historial';
|
||||
|
||||
protected $fillable = [
|
||||
'servicio_det_id',
|
||||
'usuario_id',
|
||||
'campo',
|
||||
'valor_anterior',
|
||||
'valor_nuevo',
|
||||
'accion',
|
||||
'ip_address'
|
||||
];
|
||||
|
||||
// Mapeo de nombres de campos para mostrar en español
|
||||
public static $camposLegibles = [
|
||||
'estatus_servicio_id' => 'Estatus',
|
||||
'operador_id' => 'Operador',
|
||||
'vehiculo_id' => 'Vehículo',
|
||||
'auxiliar_1' => 'Auxiliar 1',
|
||||
'auxiliar_2' => 'Auxiliar 2',
|
||||
'costo_servicio' => 'Costo del servicio',
|
||||
'tipo_servicio_id' => 'Tipo de servicio',
|
||||
'servicio_id' => 'Servicio',
|
||||
'aceptado' => 'Aceptado por operador',
|
||||
'observacion' => 'Observación del operador',
|
||||
'observacion_atencion_cliente' => 'Observación de atención al cliente',
|
||||
'requiere_encuesta' => 'Requiere encuesta',
|
||||
'facturado' => 'Facturado',
|
||||
'fecha_solicitud' => 'Fecha de solicitud',
|
||||
'duracion' => 'Duración',
|
||||
'cat_motivos_estatus_id' => 'Motivo del estatus'
|
||||
];
|
||||
|
||||
public function servicioDet()
|
||||
{
|
||||
return $this->belongsTo(ServicioDet::class, 'servicio_det_id');
|
||||
}
|
||||
|
||||
public function usuario()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'usuario_id');
|
||||
}
|
||||
|
||||
public function getCampoLegibleAttribute()
|
||||
{
|
||||
return self::$camposLegibles[$this->campo] ?? $this->campo;
|
||||
}
|
||||
}
|
||||
0
app/Models/ServicioProgreso.php
Normal file → Executable file
0
app/Models/ServicioProgreso.php
Normal file → Executable file
0
app/Models/Sucursal.php
Normal file → Executable file
0
app/Models/Sucursal.php
Normal file → Executable file
0
app/Models/TipoEmpleado.php
Normal file → Executable file
0
app/Models/TipoEmpleado.php
Normal file → Executable file
0
app/Models/TipoVehiculo.php
Normal file → Executable file
0
app/Models/TipoVehiculo.php
Normal file → Executable file
0
app/Models/User.php
Normal file → Executable file
0
app/Models/User.php
Normal file → Executable file
0
app/Models/UserLoginLog.php
Normal file → Executable file
0
app/Models/UserLoginLog.php
Normal file → Executable file
0
app/Models/UsuarioDesplazamiento.php
Normal file → Executable file
0
app/Models/UsuarioDesplazamiento.php
Normal file → Executable file
0
app/Models/Vehiculo.php
Normal file → Executable file
0
app/Models/Vehiculo.php
Normal file → Executable file
0
app/Models/VehiculoIncidencia.php
Normal file → Executable file
0
app/Models/VehiculoIncidencia.php
Normal file → Executable file
0
app/Models/VehiculoSucursal.php
Normal file → Executable file
0
app/Models/VehiculoSucursal.php
Normal file → Executable file
Reference in New Issue
Block a user