log historial
This commit is contained in:
@@ -29,7 +29,7 @@ use AshAllenDesign\ShortURL\Facades\ShortURL;
|
||||
|
||||
class MenuController extends Controller
|
||||
{
|
||||
|
||||
|
||||
|
||||
public function showwelcome(){
|
||||
$consulta_promociones = slider::get();
|
||||
@@ -37,7 +37,7 @@ class MenuController extends Controller
|
||||
'promociones' => $consulta_promociones,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
public function showclientes(){
|
||||
return view('menu/clientes');
|
||||
}
|
||||
@@ -58,7 +58,7 @@ class MenuController extends Controller
|
||||
}
|
||||
public function showconfiguracion(){
|
||||
return view('menu/configuracion');
|
||||
}
|
||||
}
|
||||
public function showplanes(){
|
||||
return view('menu/planes');
|
||||
}
|
||||
@@ -85,12 +85,15 @@ class MenuController extends Controller
|
||||
public function showLogGeneral(){
|
||||
return view('menu/log_general');
|
||||
}
|
||||
public function showLogHistorial(){
|
||||
return view('menu/log_historial');
|
||||
}
|
||||
|
||||
public function showroles(){
|
||||
return view('menu/roles');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function pay($estado){
|
||||
return view('menu/order',[
|
||||
@@ -98,14 +101,14 @@ class MenuController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function showcredenciales(Request $request){
|
||||
|
||||
$credencial = Crypt::decryptString($request->id);
|
||||
$consulta_historiales = Historiale::where('id',$credencial)->with('cuentas')->first();
|
||||
$msj = Configuracione::orderby('id','desc')->select('msj_compra','msj_wp','clave_1','clave_2','clave_3','clave_4','clave_5','clave_6','iptv')->first();
|
||||
|
||||
|
||||
return view('menu/credenciales',[
|
||||
'consulta' =>$consulta_historiales,
|
||||
'msj' => $msj,
|
||||
@@ -114,14 +117,14 @@ class MenuController extends Controller
|
||||
|
||||
|
||||
public function order( Request $request ){
|
||||
|
||||
|
||||
$payment_id= $request->get('payment_id');
|
||||
$response = Http::get("https://api.mercadopago.com/v1/payments/$payment_id" . "?access_token=APP_USR-7353579040069171-102716-58fdd1f52a604a1febd18a638227f603-260361439");
|
||||
$response = json_decode($response);
|
||||
|
||||
|
||||
$status = $response->status;
|
||||
if ($status == 'approved') {
|
||||
|
||||
|
||||
$metodo_pago = $response->payment_method_id;
|
||||
$referencia = $response->external_reference;
|
||||
$consulta = recarga::where('reference',$referencia)->where('status',$status)->exists();
|
||||
@@ -129,27 +132,27 @@ class MenuController extends Controller
|
||||
$update_recargas = recarga::where('reference',$referencia)->update(['status' => $status,'payment_method_id'=> $metodo_pago]);
|
||||
$recarga = recarga::where('reference',$referencia)->with('usuario')->first();
|
||||
$usuario= $recarga->usuario;
|
||||
|
||||
|
||||
$saldo = $usuario->saldo;
|
||||
$saldo_anterior = $saldo->valor;
|
||||
$rol = $usuario->rol->nombre;
|
||||
$monto = $recarga->valor_recarga;
|
||||
|
||||
|
||||
if (!empty($saldo_anterior)) {
|
||||
|
||||
|
||||
$valor= (float)$saldo_anterior + (float)$monto ;
|
||||
$nuevo_saldo = $saldo->update(['valor'=>$valor]);
|
||||
|
||||
}else{
|
||||
$nuevo_saldo = $saldo->update(['valor'=>$monto]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
$estado= 'aprobado';
|
||||
|
||||
|
||||
}elseif($status == 'pending'){
|
||||
|
||||
|
||||
|
||||
|
||||
$metodo_pago = $response->payment_method_id;
|
||||
$referencia = $response->external_reference;
|
||||
$update_recargas = recarga::where('reference',$referencia)->update(['status' => $status,'payment_method_id'=> $metodo_pago]);
|
||||
@@ -157,8 +160,8 @@ class MenuController extends Controller
|
||||
|
||||
$estado= 'pendiente';
|
||||
}else{
|
||||
|
||||
|
||||
|
||||
|
||||
$metodo_pago = $response->payment_method_id;
|
||||
$referencia = $response->external_reference;
|
||||
$update_recargas = recarga::where('reference',$referencia)->update(['status' => $status,'payment_method_id'=> $metodo_pago]);
|
||||
@@ -167,15 +170,15 @@ class MenuController extends Controller
|
||||
$estado ='rechazado';
|
||||
};
|
||||
|
||||
|
||||
|
||||
return redirect()->route('pay',$estado);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function showwebhooks(Request $request){
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function recargas(){
|
||||
@@ -207,7 +210,7 @@ class MenuController extends Controller
|
||||
return view('menu/promo');
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function showlogs(){
|
||||
return view('menu/logs');
|
||||
}
|
||||
@@ -216,15 +219,15 @@ class MenuController extends Controller
|
||||
public function showpromociones(){
|
||||
return view('menu/promociones');
|
||||
}
|
||||
|
||||
|
||||
public function showimport(){
|
||||
return view('menu/importar');
|
||||
}
|
||||
|
||||
|
||||
public function showcategoria(){
|
||||
return view('menu/categoria');
|
||||
}
|
||||
|
||||
|
||||
public function showcategorias(){
|
||||
return view('menu/ver');
|
||||
}
|
||||
@@ -237,11 +240,11 @@ class MenuController extends Controller
|
||||
$payment_id= $request->get('payment_id');
|
||||
$response = Http::get("https://api.mercadopago.com/v1/payments/$payment_id" . "?access_token=APP_USR-7353579040069171-102716-58fdd1f52a604a1febd18a638227f603-260361439");
|
||||
$response = json_decode($response);
|
||||
|
||||
|
||||
|
||||
|
||||
$status = $response->status;
|
||||
if ($status == 'approved') {
|
||||
|
||||
|
||||
foreach($response->additional_info->items as $item){
|
||||
$consulta = Historiale::where('id', $item->id)->first();
|
||||
$tarifa_id=$consulta->tarifa_id;
|
||||
@@ -251,22 +254,22 @@ class MenuController extends Controller
|
||||
|
||||
//SERVICIO//
|
||||
if (!empty($consulta->tarifa_id)) {
|
||||
|
||||
|
||||
$pantallas = Tarifas::where('id', $tarifa_id)->with('servicio')->first();
|
||||
$servicio_id= $pantallas->servicio_id;
|
||||
$pantalla_servicio = $pantallas->servicio->pantallas;
|
||||
$pantalla_servicio_completa = $pantallas->servicio->completa;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$pantallas= $pantallas ->pantallas ?? null;
|
||||
$cantidad_tarjetaPlan = $consulta->cantidad;
|
||||
|
||||
|
||||
$cantidad_solicitada = (int)$cantidad_tarjetaPlan*(int)$pantallas;
|
||||
//dd($cantidad_tarjetaPlan);
|
||||
if((int)$pantalla_servicio_completa >= (int)$cantidad_solicitada ){
|
||||
$suma = $pantalla_servicio-$cantidad_solicitada;
|
||||
|
||||
|
||||
$cuenta = Cuentas::where('servicio_id',$servicio_id)->whereDate('inicio','>=',$fecha)->Orderby('created_at', 'ASC')->withCount('historiales')->where('estado','activo')->having('historiales_count', '<=', $suma)->first();
|
||||
}elseif((int)$pantalla_servicio_completa == (int)$cantidad_solicitada){
|
||||
$this->fecha_final_1 = $today = Carbon::now()->addDays($pantallas->dias-15);
|
||||
@@ -276,13 +279,13 @@ class MenuController extends Controller
|
||||
}else{
|
||||
$cuenta=null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (!empty($cuenta) ) {
|
||||
|
||||
|
||||
$perfil = $cuenta->historiales_count;
|
||||
for ($n=1; $n <= $cantidad_solicitada ; $n++) {
|
||||
|
||||
for ($n=1; $n <= $cantidad_solicitada ; $n++) {
|
||||
|
||||
$historial_cuenta = new Historial_cuenta();
|
||||
$historial_cuenta->cuenta_id = $cuenta->id;
|
||||
$historial_cuenta->historial_id = $item->id;
|
||||
@@ -290,74 +293,74 @@ class MenuController extends Controller
|
||||
$historial_cuenta->save();
|
||||
//dd($historial_cuenta->id);
|
||||
}
|
||||
|
||||
|
||||
if (($n-1) == $cantidad_solicitada) {
|
||||
|
||||
|
||||
$consulta->update(['estado'=>'activo']);
|
||||
$this->cred($consulta);
|
||||
$encryptado = Crypt::encryptString($consulta->id);
|
||||
//dd('llegue');
|
||||
return redirect('/credenciales?id='.$encryptado);
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
return 'Error en la asignacion de cuentas, comuniquese con soporte!';
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
//dd($cuenta);
|
||||
$suma2= $pantalla_servicio - $pantallas;
|
||||
|
||||
|
||||
for ($h=0; $h < (int)$cantidad_tarjetaPlan ; $h++) {
|
||||
|
||||
|
||||
for ($h=0; $h < (int)$cantidad_tarjetaPlan ; $h++) {
|
||||
//dd($n);
|
||||
$cuenta = Cuentas::where('servicio_id',$servicio_id)->whereDate('inicio','>=',$fecha)->Orderby('created_at', 'ASC')->with('historiales')->withCount('historiales')->where('estado','activo')->having('historiales_count', '<=', (int)$suma2)->first();
|
||||
//dd($cuenta);
|
||||
if (!empty($cuenta)) {
|
||||
$perfil = $cuenta->historiales_count;
|
||||
for ($y=0; $y < (int)$pantallas ; $y++) {
|
||||
for ($y=0; $y < (int)$pantallas ; $y++) {
|
||||
//dd($pantallas);
|
||||
$historial_cuenta = new Historial_cuenta;
|
||||
$historial_cuenta->cuenta_id = $cuenta->id;
|
||||
$historial_cuenta->historial_id = $item->id;
|
||||
$historial_cuenta->perfil = (int)$perfil + (int)$y+1;
|
||||
$historial_cuenta->save();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
return 'No hay cuentas disponibles, comuniquese con soporte!';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$consulta->update(['estado'=>'activo']);
|
||||
$this->cred($consulta);
|
||||
$encryptado = Crypt::encryptString($consulta->id);
|
||||
return redirect('/credenciales?id='.$encryptado);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//PROMOCION
|
||||
//PROMOCION
|
||||
if (!empty($consulta->promocion_id)){
|
||||
|
||||
for ($p = 0; $p < (int)$consulta->cantidad; $p++) {
|
||||
//dd($this->cantidad_comprarPromo);
|
||||
foreach ($consulta->promocion->tarifas as $tarifa) {
|
||||
|
||||
|
||||
$pantallas_tarifa = $tarifa->pantallas;
|
||||
$servicio_id = $tarifa->servicio_id;
|
||||
$pantalla_servicio = $tarifa->servicio->pantallas;
|
||||
$pantalla_servicio_completa = $tarifa->servicio->completa;
|
||||
|
||||
|
||||
$faltante = $pantalla_servicio - $pantallas_tarifa;
|
||||
if ($pantalla_servicio_completa == $pantallas_tarifa) {
|
||||
$this->fecha_final_1 = $today = Carbon::now()->addDays($tarifa->dias-15);
|
||||
@@ -367,44 +370,44 @@ class MenuController extends Controller
|
||||
$cuenta = Cuentas::where('servicio_id', $servicio_id)->whereDate('inicio','>=',$fecha)->Orderby('created_at', 'ASC')->with('historiales')->withCount('historiales')->where('estado', 'activo')->having('historiales_count', '<=', (int)$faltante)->first();
|
||||
}
|
||||
//dd($tarifa);
|
||||
|
||||
|
||||
|
||||
|
||||
if (!empty($cuenta)) {
|
||||
$perfil = $cuenta->historiales_count;
|
||||
for ($y = 0; $y < (int)$pantallas_tarifa; $y++) {
|
||||
|
||||
|
||||
$historial_cuenta = new Historial_cuenta();
|
||||
$historial_cuenta->cuenta_id = $cuenta->id;
|
||||
$historial_cuenta->historial_id = $item->id;
|
||||
$historial_cuenta->perfil = (int)$perfil + (int)$y+1;
|
||||
$historial_cuenta->save();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
return 'No hay cuentas disponibles, comuniquese con soporte!';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!empty($y)) {
|
||||
|
||||
|
||||
$consulta->update(['estado'=>'activo']);
|
||||
$this->cred($consulta);
|
||||
$encryptado = Crypt::encryptString($consulta->id);
|
||||
//dd('llegue');
|
||||
return redirect('/credenciales?id='.$encryptado);
|
||||
|
||||
|
||||
}else{
|
||||
return 'No hay cuentas disponibles, comuniquese con soporte!';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -416,15 +419,15 @@ public function wompi_pagos(Request $request){
|
||||
$response = Http::get("https://sandbox.wompi.co/v1/transactions/136099-1677473887-65588");
|
||||
$response = json_decode($response);
|
||||
//dd($response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function wompi_hook(Request $request){
|
||||
//return json_encode('hola');
|
||||
//return json_encode('hola');
|
||||
|
||||
if (!empty($request)) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
foreach($request->data as $item ){
|
||||
//return $item;
|
||||
@@ -432,8 +435,8 @@ public function wompi_hook(Request $request){
|
||||
$user_id = $item['reference'];
|
||||
$monto = substr($item['amount_in_cents'], 0, -2);
|
||||
$metodo_pago = $item['payment_method_type'];
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
$update_recargas = recarga::where('reference',$referencia)->update(['status' => $status,'payment_method_id'=> $metodo_pago]);
|
||||
@@ -448,30 +451,30 @@ public function wompi_hook(Request $request){
|
||||
if ($rol == "super" || $rol == "administrador" || $rol == "distribuidor") {
|
||||
$monto_adicional = 500;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!empty($saldo_anterior)) {
|
||||
|
||||
|
||||
$valor= (float)$saldo_anterior + (float)$monto - (float)$monto_adicional;
|
||||
$nuevo_saldo = $saldo->update(['valor'=>$valor]);
|
||||
|
||||
|
||||
// return $nuevo_saldo;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function cred($consulta){
|
||||
|
||||
|
||||
|
||||
$encryptado = Crypt::encryptString($consulta->id);
|
||||
|
||||
$enlace = '/credenciales?id='.$encryptado;
|
||||
|
||||
|
||||
$user=User::find($consulta->cliente);
|
||||
if (!empty($consulta->promocion_id)){ {
|
||||
|
||||
@@ -489,7 +492,7 @@ public function cred($consulta){
|
||||
'servicio' => $consulta->promocion->nombre,
|
||||
'tipo' => 'compra',
|
||||
'vendedor' => Role::where('nombre','super')->first()->usuarios->first()->name,
|
||||
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
@@ -510,21 +513,21 @@ public function cred($consulta){
|
||||
'servicio' => $consulta->tarifa->servicio->nombre.'-'.$consulta->tarifa->pantallas. 'pantallas',
|
||||
'tipo' => 'compra',
|
||||
'vendedor' => Role::where('nombre','super')->first()->usuarios->first()->name,
|
||||
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Notification::send($user, new compra($notificacion));
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function sendMessage($message, $recipients)
|
||||
{
|
||||
|
||||
|
||||
|
||||
$auth_basic = base64_encode(getenv("USER_LABSMOBILE").':'.getenv("PASS_LABSMOBILE"));
|
||||
|
||||
@@ -553,10 +556,10 @@ public function sendMessage($message, $recipients)
|
||||
|
||||
if ($err) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
public function showmp(Request $request){
|
||||
@@ -571,7 +574,7 @@ public function showmp(Request $request){
|
||||
//return $response;
|
||||
$response = json_decode($response);
|
||||
$status = $response->status;
|
||||
|
||||
|
||||
if ($status == 'approved') {
|
||||
$metodo_pago = $response->payment_method_id;
|
||||
$referencia = $response->external_reference;
|
||||
@@ -580,15 +583,15 @@ public function showmp(Request $request){
|
||||
$update_recargas = recarga::where('reference',$referencia)->update(['status' => $status,'payment_method_id'=> $metodo_pago]);
|
||||
$recarga = recarga::where('reference',$referencia)->with('usuario')->first();
|
||||
$usuario= $recarga->usuario;
|
||||
|
||||
|
||||
$saldo = $usuario->saldo;
|
||||
$saldo_anterior = $saldo->valor;
|
||||
$monto = $recarga->valor_recarga;
|
||||
|
||||
|
||||
$valor= (float)$saldo_anterior + (float)$monto ;
|
||||
$nuevo_saldo = $saldo->update(['valor'=>$valor]);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -605,9 +608,9 @@ public function pruebas (){
|
||||
$consulta_historial = Historiale::whereDate('fecha_final', $fechaHoy)->with('cliente')->get();
|
||||
|
||||
foreach ($consulta_historial as $item) {
|
||||
|
||||
|
||||
$user = User::find($item->cliente->id);
|
||||
|
||||
|
||||
if (!empty($item->promocion_id)) {
|
||||
|
||||
$nombre= $item->promocion->nombre;
|
||||
@@ -629,7 +632,7 @@ $consulta_historial = Historiale::whereDate('fecha_final', $fechaHoy)->with('cli
|
||||
Notification::sendNow($user, new Vencimiento($notificacion));
|
||||
|
||||
// $fecha=Carbon::parse($item->fecha_final)->format('d/m/Y');
|
||||
|
||||
|
||||
//$message = 'Su '.$nombre.', Vence Hoy, '.$fecha.'. Renueva ahora!!' ;
|
||||
//$recipients= '+57'.$item->cliente->celular;
|
||||
|
||||
@@ -659,12 +662,12 @@ $consulta_historial = Historiale::whereDate('fecha_final', $fechaHoy)->with('cli
|
||||
//curl_close($curl);
|
||||
//return $response;
|
||||
//if ($err) {
|
||||
|
||||
|
||||
|
||||
|
||||
//} else {
|
||||
|
||||
|
||||
//}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -673,7 +676,7 @@ $consulta_historial = Historiale::whereDate('fecha_final', $fechaHoy)->with('cli
|
||||
|
||||
$consulta_historial1= Historiale::whereDate('fecha_final','<',$fechaHoy1)->with('cliente','cuentas')->get();
|
||||
foreach ($consulta_historial1 as $item1) {
|
||||
|
||||
|
||||
foreach($item1->cuentas->unique() as $item2){
|
||||
//dd($item2);
|
||||
$logs = new log;
|
||||
@@ -683,7 +686,7 @@ $consulta_historial = Historiale::whereDate('fecha_final', $fechaHoy)->with('cli
|
||||
}
|
||||
//$eliminar_cuentas = Historial_cuenta::where('historial_id',$item1->id)->truncate();
|
||||
//dd('termine');
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Log_historial;
|
||||
use Livewire\Component;
|
||||
|
||||
class ShowLogGeneral extends Component
|
||||
{
|
||||
public $entradas;
|
||||
|
||||
public $buscar;
|
||||
public $filtro_fecha;
|
||||
|
||||
public function render()
|
||||
{
|
||||
$query = Log_historial::query();
|
||||
|
||||
if ($this->buscar) {
|
||||
$query->where('detalle', 'like', '%' . $this->buscar . '%');
|
||||
}
|
||||
|
||||
if ($this->filtro_fecha) {
|
||||
$query->whereDate('created_at', $this->filtro_fecha);
|
||||
}
|
||||
|
||||
$logs = $query->orderBy('id', 'desc')->paginate($this->entradas);
|
||||
|
||||
return view('livewire.show-log-historial', [
|
||||
'logs' => $logs
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Log_historial extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'log_historial';
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'detalle'
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
@@ -80,6 +80,7 @@
|
||||
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('logGeneral') }}">Log general</a>
|
||||
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('logs') }}">Log cuentas</a>
|
||||
@if (auth()->user()->rol->nombre == 'super')
|
||||
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('logHistorial') }}">Log historial</a>
|
||||
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('logsRecargas') }}">Log recargas</a>
|
||||
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('promociones') }}">Gestión Promociones</a>
|
||||
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('usuarios') }}">Gestión Usuarios</a>
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
<div class="h-full w-full md:my-2">
|
||||
<div class="bg-[#f5f5f5] m-auto p-2 md:p-5 w-auto x-auto grid grid-cols-1 lg:grid-cols-1text-center rounded-xl py-4 px-2 ms:px-8 xl:mx-10 mb-8 ">
|
||||
<div class="md:flex justify-center my-2 items-center text-center ">
|
||||
<div class="flex text-sm">
|
||||
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve">
|
||||
<path d="M15.4,9.88,10.81,5.29a1,1,0,0,0-1.41,0,1,1,0,0,0,0,1.42L14,11.29a1,1,0,0,1,0,1.42L9.4,17.29a1,1,0,0,0,1.41,1.42l4.59-4.59A3,3,0,0,0,15.4,9.88Z" fill="#b221fd" data-original="#000000" />
|
||||
</svg>
|
||||
Log historial
|
||||
</div>
|
||||
<div class="flex relative text-sm mx-auto w-64 md:w-auto my-2">
|
||||
<input id="buscar" type="search" wire:model.lazy="buscar" placeholder="Buscar" class="shadow-md border-2 active:border-neutral-200 focus:ring-0 border-neutral-200 w-64 md:w-auto rounded-[0.8rem] pr-7 py-1 m-auto focus:border-neutral-300 focus:outline-none focus:shadow-outline">
|
||||
<svg class="w-5 absolute top-2 right-3" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" class="w-4 absolute" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512;rotate: 90deg;" xml:space="preserve" class="">
|
||||
<g id="Layer_31" data-name="Layer 31">
|
||||
<path d="m21.71 20.29-5.4-5.39a7.92 7.92 0 0 0 1.69-4.9 8 8 0 1 0 -8 8 7.92 7.92 0 0 0 4.9-1.69l5.39 5.4a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42zm-17.71-10.29a6 6 0 1 1 6 6 6 6 0 0 1 -6-6z" fill="#b221fd" data-original="#000000" class=""></path>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="text-sm mr-auto">
|
||||
<input type="date" wire:model="filtro_fecha" class="shadow-md border-2 active:border-neutral-200 focus:ring-0 border-neutral-200 w-64 md:w-auto rounded-[0.8rem] pr-7 py-1 m-auto focus:border-neutral-300 focus:outline-none focus:shadow-outline">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<x-ver-entrada />
|
||||
|
||||
{{-- <x-primary-table>
|
||||
<x-slot name="thead">
|
||||
<tr class="text-left">
|
||||
<th class="rounded-l-lg font-normal w-1/8 pl-2 sm:w-1/8">Usuario</th>
|
||||
<th class="font-normal w-1/8 sm:w-1/8 pl-2">Detalle</th>
|
||||
<th class="rounded-r-lg w-1/8 font-normal sm:w-1/8">Fecha</th>
|
||||
</tr>
|
||||
</x-slot>
|
||||
<x-slot name="tbody">
|
||||
@foreach ($logs as $log)
|
||||
<tr class="border-gray-200 text-left w-full pl-4 hover:bg-gray-200 hover:ring-gray-500">
|
||||
<td class="pl-2">{{ $log->user->name ?? '' }}</td>
|
||||
<td class="pl-2">{{ $log->detalle ?? '' }}</td>
|
||||
<td class="pl-2">{{ $log->created_at->format('d M Y h:m a') ?? '' }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</x-slot>
|
||||
<x-slot name="tlink">
|
||||
{{ $logs->links() }}
|
||||
</x-slot>
|
||||
</x-primary-table> --}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,7 @@
|
||||
<x-app-layout>
|
||||
<div class="pb-4">
|
||||
<livewire:show-log-historial />
|
||||
</div>
|
||||
|
||||
@include('layouts.footer')
|
||||
</x-app-layout>
|
||||
@@ -60,6 +60,7 @@ Route::middleware(["auth", "solo_usuario_administrador"])->group(function () {
|
||||
Route::get('/import',[MenuController::class,'showimport' ])->name('import');
|
||||
Route::any('/logs-recargas',[MenuController::class,'showLogRecargas' ])->name('logsRecargas');
|
||||
Route::any('/log-general',[MenuController::class,'showLogGeneral' ])->name('logGeneral');
|
||||
Route::any('/log-historial',[MenuController::class,'showLogHistorial' ])->name('logHistorial');
|
||||
Route::any('/roles',[MenuController::class,'showroles' ])->name('roles');
|
||||
Route::get('/utilidades',[MenuController::class,'showutilidad' ])->name('utilidades');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user