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/Http/Controllers/Administrador/ClientesController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/ClientesController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/EstatusServiciosController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/EstatusServiciosController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/FormasPagosController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/FormasPagosController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/OrigenesController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/OrigenesController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/RolesController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/RolesController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/ServiciosController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/ServiciosController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/SucursalesController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/SucursalesController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/TiposServiciosController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/TiposServiciosController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/TiposVehiculosController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/TiposVehiculosController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/UsersController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/UsersController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/VehiculosController.php
Normal file → Executable file
0
app/Http/Controllers/Administrador/VehiculosController.php
Normal file → Executable file
0
app/Http/Controllers/AtencionClientes/EncuestasController.php
Normal file → Executable file
0
app/Http/Controllers/AtencionClientes/EncuestasController.php
Normal file → Executable file
31
app/Http/Controllers/AtencionClientes/ServiciosController.php
Normal file → Executable file
31
app/Http/Controllers/AtencionClientes/ServiciosController.php
Normal file → Executable file
@@ -395,6 +395,10 @@ class ServiciosController extends Controller
|
||||
$contain_aux_1 = array_key_exists('auxiliar_1', $data);
|
||||
$contain_aux_2 = array_key_exists('auxiliar_2', $data);
|
||||
|
||||
$auxiliar_1_name = null;
|
||||
$auxiliar_2_name = null;
|
||||
$auxiliar_3_name = null;
|
||||
|
||||
if ($auxiliar_1) {
|
||||
$auxiliar_1_name = ($contain_aux_1 && $s->auxiliar_1 == $data['auxiliar_1']) ? "El auxiliar: '" . $auxiliar_1->nombre . " " . $auxiliar_1->apellido_paterno . " " . $auxiliar_1->apellido_materno . "' no está disponible." : null;
|
||||
}
|
||||
@@ -403,8 +407,6 @@ class ServiciosController extends Controller
|
||||
$auxiliar_2_name = ($contain_aux_2 && $s->auxiliar_2 == $data['auxiliar_2']) ? "El auxiliar: '" . $auxiliar_2->nombre . " " . $auxiliar_2->apellido_paterno . " " . $auxiliar_2->apellido_materno . "' no está disponible." : null;
|
||||
}
|
||||
|
||||
$auxiliar_3_name = null;
|
||||
|
||||
$salida_array = compact('operador_name', 'vehiculo_name', 'auxiliar_1_name', 'auxiliar_2_name', 'auxiliar_3_name');
|
||||
|
||||
$salida = collect($salida_array)->filter()->values();
|
||||
@@ -1407,6 +1409,31 @@ class ServiciosController extends Controller
|
||||
return response()->unauthorized('No es posible actualizar, pongase en contacto con un administrador');
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtener historial de cambios de un servicio
|
||||
*/
|
||||
public function historial($servicio_det_id)
|
||||
{
|
||||
$historial = \App\Models\ServicioHistorial::where('servicio_det_id', $servicio_det_id)
|
||||
->join('users', 'users.id', '=', 'servicios_historial.usuario_id')
|
||||
->select(
|
||||
'servicios_historial.*',
|
||||
'users.nombre as usuario_nombre',
|
||||
'users.apellido_paterno as usuario_apellido'
|
||||
)
|
||||
->orderBy('servicios_historial.created_at', 'DESC')
|
||||
->get()
|
||||
->map(function ($item) {
|
||||
$camposLegibles = \App\Models\ServicioHistorial::$camposLegibles;
|
||||
$item->campo_legible = $camposLegibles[$item->campo] ?? $item->campo;
|
||||
$item->usuario_completo = $item->usuario_nombre . ' ' . $item->usuario_apellido;
|
||||
$item->tiempo_transcurrido = \Carbon\Carbon::parse($item->created_at)->diffForHumans();
|
||||
return $item;
|
||||
});
|
||||
|
||||
return response()->success($historial);
|
||||
}
|
||||
|
||||
function filtrosServicios(Request $request){
|
||||
$user = Auth::user();
|
||||
|
||||
|
||||
0
app/Http/Controllers/Auth/AuthenticateController.php
Normal file → Executable file
0
app/Http/Controllers/Auth/AuthenticateController.php
Normal file → Executable file
0
app/Http/Controllers/Auth/ForgotPasswordController.php
Normal file → Executable file
0
app/Http/Controllers/Auth/ForgotPasswordController.php
Normal file → Executable file
0
app/Http/Controllers/Auth/LoginController.php
Normal file → Executable file
0
app/Http/Controllers/Auth/LoginController.php
Normal file → Executable file
0
app/Http/Controllers/Auth/RegisterController.php
Normal file → Executable file
0
app/Http/Controllers/Auth/RegisterController.php
Normal file → Executable file
0
app/Http/Controllers/Auth/ResetPasswordController.php
Normal file → Executable file
0
app/Http/Controllers/Auth/ResetPasswordController.php
Normal file → Executable file
0
app/Http/Controllers/Controller.php
Normal file → Executable file
0
app/Http/Controllers/Controller.php
Normal file → Executable file
0
app/Http/Controllers/Operador/CheckListController.php
Normal file → Executable file
0
app/Http/Controllers/Operador/CheckListController.php
Normal file → Executable file
0
app/Http/Controllers/Operador/DesplazamientosController.php
Normal file → Executable file
0
app/Http/Controllers/Operador/DesplazamientosController.php
Normal file → Executable file
0
app/Http/Controllers/Operador/EncuestasController.php
Normal file → Executable file
0
app/Http/Controllers/Operador/EncuestasController.php
Normal file → Executable file
0
app/Http/Controllers/Operador/JornadaController.php
Normal file → Executable file
0
app/Http/Controllers/Operador/JornadaController.php
Normal file → Executable file
0
app/Http/Controllers/Operador/ServiciosController.php
Normal file → Executable file
0
app/Http/Controllers/Operador/ServiciosController.php
Normal file → Executable file
0
app/Http/Controllers/Operador/ServiciosProgresoController.php
Normal file → Executable file
0
app/Http/Controllers/Operador/ServiciosProgresoController.php
Normal file → Executable file
0
app/Http/Controllers/Operador/ServiciosProgresoNewController.php
Normal file → Executable file
0
app/Http/Controllers/Operador/ServiciosProgresoNewController.php
Normal file → Executable file
0
app/Http/Controllers/Operador/VehiculosIncidenciasController.php
Normal file → Executable file
0
app/Http/Controllers/Operador/VehiculosIncidenciasController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/CapacidadAprovechadaController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/CapacidadAprovechadaController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/EncuestasGeneralController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/EncuestasGeneralController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/FiltrosController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/FiltrosController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/MensualController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/MensualController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/ProductividadAtencionClientesController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/ProductividadAtencionClientesController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/SemanalController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/SemanalController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/ServiciosAsesoresController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/ServiciosAsesoresController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/ServiciosClientesController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/ServiciosClientesController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/ServiciosController.php
Normal file → Executable file
0
app/Http/Controllers/Reportes/ServiciosController.php
Normal file → Executable file
0
app/Http/Controllers/SupervisorOperaciones/AsesoresController.php
Normal file → Executable file
0
app/Http/Controllers/SupervisorOperaciones/AsesoresController.php
Normal file → Executable file
0
app/Http/Controllers/SupervisorOperaciones/JornadaController.php
Normal file → Executable file
0
app/Http/Controllers/SupervisorOperaciones/JornadaController.php
Normal file → Executable file
0
app/Http/Kernel.php
Normal file → Executable file
0
app/Http/Kernel.php
Normal file → Executable file
0
app/Http/Middleware/EncryptCookies.php
Normal file → Executable file
0
app/Http/Middleware/EncryptCookies.php
Normal file → Executable file
0
app/Http/Middleware/RedirectIfAuthenticated.php
Normal file → Executable file
0
app/Http/Middleware/RedirectIfAuthenticated.php
Normal file → Executable file
0
app/Http/Middleware/RequestLogs.php
Normal file → Executable file
0
app/Http/Middleware/RequestLogs.php
Normal file → Executable file
0
app/Http/Middleware/SentinelACL.php
Normal file → Executable file
0
app/Http/Middleware/SentinelACL.php
Normal file → Executable file
0
app/Http/Middleware/TrimStrings.php
Normal file → Executable file
0
app/Http/Middleware/TrimStrings.php
Normal file → Executable file
0
app/Http/Middleware/VerifyCsrfToken.php
Normal file → Executable file
0
app/Http/Middleware/VerifyCsrfToken.php
Normal file → Executable file
0
app/Http/Requests/Administrador/ClientesDomiciliosRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/ClientesDomiciliosRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/ClientesRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/ClientesRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/EstatusServiciosRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/EstatusServiciosRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/FormasPagosRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/FormasPagosRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/RolesRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/RolesRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/ServiciosRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/ServiciosRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/SucursalesRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/SucursalesRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/TiposServiciosRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/TiposServiciosRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/TiposVehiculosRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/TiposVehiculosRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/UserRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/UserRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/VehiculosRequest.php
Normal file → Executable file
0
app/Http/Requests/Administrador/VehiculosRequest.php
Normal file → Executable file
0
app/Http/Requests/AtencionCliente/LitrajeRequest.php
Normal file → Executable file
0
app/Http/Requests/AtencionCliente/LitrajeRequest.php
Normal file → Executable file
0
app/Http/Requests/AtencionCliente/ServiciosRequest.php
Normal file → Executable file
0
app/Http/Requests/AtencionCliente/ServiciosRequest.php
Normal file → Executable file
0
app/Http/Requests/LoginRequest.php
Normal file → Executable file
0
app/Http/Requests/LoginRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/DesplazamientoRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/DesplazamientoRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/FinalizarJornadaRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/FinalizarJornadaRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/FinalizarServicioRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/FinalizarServicioRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/GuardarEvidenciaRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/GuardarEvidenciaRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/GuardarFirmaRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/GuardarFirmaRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/IniciarServicioRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/IniciarServicioRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/InicioJornadaRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/InicioJornadaRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/RechazarSolicitudRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/RechazarSolicitudRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/RespuestasOperadorRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/RespuestasOperadorRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/UltimaIncidenciaRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/UltimaIncidenciaRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/VehiculosIncidenciasRequest.php
Normal file → Executable file
0
app/Http/Requests/Operador/VehiculosIncidenciasRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/CapacidadAprovechadaRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/CapacidadAprovechadaRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ConsultarAsesoresRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ConsultarAsesoresRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ConsultarAtencionClientesRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ConsultarAtencionClientesRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ConsultarClientesRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ConsultarClientesRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ConsultarVehiculosRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ConsultarVehiculosRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/EncuestasGeneralRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/EncuestasGeneralRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/FiltroAsesoresRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/FiltroAsesoresRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ProductividadAtencionClientesRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ProductividadAtencionClientesRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ServiciosAsesoresRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ServiciosAsesoresRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ServiciosClientesRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ServiciosClientesRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ServiciosRequest.php
Normal file → Executable file
0
app/Http/Requests/Reportes/ServiciosRequest.php
Normal file → Executable file
0
app/Http/Requests/TokenFirebaseRequest.php
Normal file → Executable file
0
app/Http/Requests/TokenFirebaseRequest.php
Normal file → Executable file
Reference in New Issue
Block a user