This commit is contained in:
lizandrogd
2025-04-04 20:11:51 -05:00
parent ac229cdb74
commit c1e72339c1
8 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -18,9 +18,9 @@ class ShowLogs extends Component
$consulta_historial = Historiale::with('promocion', 'tarifa', 'vendedor','cuentas','cuentas_obsoletas')->whereDate('fecha_final','>', $fechaVencimiento)->orderBy('id', 'DESC')
->when(!empty($this->buscar), function ($query) {
$query->whereHas('cuentas', function ($subquery) {
$subquery->where('correo', 'LIKE', '%' . $this->buscar . '%');
$subquery->where('correo', 'ILIKE', '%' . $this->buscar . '%');
})->orWhereHas('vendedor', function ($subquery) {
$subquery->where('email', 'LIKE', '%' . $this->buscar . '%');
$subquery->where('email', 'ILIKE', '%' . $this->buscar . '%');
});
});
// Limitar resultados a un máximo de 200