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
+1 -1
View File
@@ -21,7 +21,7 @@ class LogsRecargas extends Component
if (!empty($this->buscar)) {
$consulta_historial->whereHas('usuario', function ($query) {
$query->where('email', 'like', '%' . $this->buscar . '%');
$query->where('email', 'ILIKE', '%' . $this->buscar . '%');
});
}
+1 -1
View File
@@ -97,7 +97,7 @@ class PortadaServicio extends Component
$consulta_promociones = Promociones::with('tarifas')->where('visible', 'true');
if (!is_null($this->categoria_id)) {
$consulta_promociones = $consulta_promociones->where('categoria_id', 'LIKE', '%' . $this->categoria_id . '%');
$consulta_promociones = $consulta_promociones->where('categoria_id', 'ILIKE', '%' . $this->categoria_id . '%');
}
//dd($consulta_promociones->get());
$consulta_promociones = $consulta_promociones->get();
+2 -2
View File
@@ -65,9 +65,9 @@ class ShowClientes extends Component
if (!empty($this->buscar)) {
$consulta_clientes = $consulta_clientes->where(function ($query) {
$query->whereHas('cuentas', function ($subQuery) {
$subQuery->where('correo', 'LIKE', '%' . $this->buscar . '%');
$subQuery->where('correo', 'ILIKE', '%' . $this->buscar . '%');
})->orWhereHas('cliente', function ($subQuery) {
$subQuery->where('email', 'LIKE', '%' . $this->buscar . '%');
$subQuery->where('email', 'ILIKE', '%' . $this->buscar . '%');
});
});
}
+1 -1
View File
@@ -19,7 +19,7 @@ class ShowLogGeneral extends Component
$query = Log_general::query();
if ($this->buscar) {
$query->where('detalle', 'like', '%' . $this->buscar . '%');
$query->where('detalle', 'ILIKE', '%' . $this->buscar . '%');
}
if ($this->filtro_fecha) {
+3 -3
View File
@@ -25,16 +25,16 @@ class ShowLogHistorial extends Component
if ($this->buscar) {
$query->where(function ($query) {
$query->where('detalle', 'like', '%' . $this->buscar . '%')
$query->where('detalle', 'ILIKE', '%' . $this->buscar . '%')
->orWhereHas('user', function ($query) {
$query->where('name', 'like', '%' . $this->buscar . '%');
$query->where('name', 'ILIKE', '%' . $this->buscar . '%');
});
});
}
if ($this->tipo) {
$query->where('detalle', 'like', '%' . $this->tipo . '%');
$query->where('detalle', 'ILIKE', '%' . $this->tipo . '%');
}
if ($this->filtro_fecha) {
+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
+2 -2
View File
@@ -139,7 +139,7 @@ class ShowPlanes extends Component
}
// Empezamos definiendo la consulta básica
$consulta_cuentas = Cuentas::where('correo', 'LIKE', '%' . $this->buscar . '%')
$consulta_cuentas = Cuentas::where('correo', 'ILIKE', '%' . $this->buscar . '%')
->withCount('historiales')
->with('historiales')
->orderBy('id', 'DESC');
@@ -178,7 +178,7 @@ class ShowPlanes extends Component
$consulta_cuentas = $consulta_cuentas->paginate($this->entradas);
if ($this->searchTerm) {
$this->usuarios = User::where('email', 'LIKE', '%' . $this->searchTerm . '%')->get();
$this->usuarios = User::where('email', 'ILIKE', '%' . $this->searchTerm . '%')->get();
if ($this->selectedOption) {
$this->searchTerm = $this->selectedOption;
}
+4 -4
View File
@@ -110,8 +110,8 @@ class ShowUsuarios extends Component
$query->where('visible', 'true');
}])
->where(function ($query) {
$query->where('name', 'LIKE', '%' . $this->buscar . '%')
->orWhere('email', 'LIKE', '%' . $this->buscar . '%');
$query->where('name', 'ILIKE', '%' . $this->buscar . '%')
->orWhere('email', 'ILIKE', '%' . $this->buscar . '%');
});
if ($this->verPreciosPersonalizados) {
@@ -136,13 +136,13 @@ class ShowUsuarios extends Component
if (!empty($this->buscar_servicio)) {
$this->consulta_tarifas = Tarifas::where('rol_id', $this->rol_usuario)->with([
'servicio' => function ($query) {
$query->Where('nombre', 'LIKE', '%' . $this->buscar_servicio . '%');
$query->Where('nombre', 'ILIKE', '%' . $this->buscar_servicio . '%');
}
])->get();
}
if (!empty($this->buscar_promo)) {
$this->consulta_promo = Promociones::where('visible', '!=', 'false')->where('nombre', 'like', '%' . $this->buscar_promo . '%')->get();
$this->consulta_promo = Promociones::where('visible', '!=', 'false')->where('nombre', 'ILIKE', '%' . $this->buscar_promo . '%')->get();
}
if ($this->gestionPromo == true) {