This commit is contained in:
Felipe
2023-10-23 17:09:05 -05:00
parent 42604a658c
commit fd9afd2183
22 changed files with 844 additions and 515 deletions
+3
View File
@@ -53,6 +53,9 @@ class MenuController extends Controller
public function showperfil(){
return view('menu/perfil');
}
public function showpendientes(){
return view('menu/pendientes');
}
public function showconfiguracion(){
return view('menu/configuracion');
}
+185 -153
View File
@@ -11,6 +11,8 @@ use Livewire\WithFileUploads;
use App\Models\Cuentas;
use App\Models\Historial_cuenta;
use App\Models\Historiale;
use App\Models\Notificacion;
use App\Models\User;
use Intervention\Image\ImageManagerStatic as Img;
use Illuminate\Support\Str;
use Artisan;
@@ -55,13 +57,13 @@ class ShowConfiguracion extends Component
public $premio_8;
public $premio_9;
public $premio_10;
public $mensaje_top;
public $img_top;
public $mensaje_msj_compra;
public $mensaje_msj_wp;
public $clave_1;
public $clave_2;
public $clave_3;
@@ -69,18 +71,22 @@ class ShowConfiguracion extends Component
public $clave_5;
public $clave_6;
public $iptv;
public $notificacion;
public $iptv;
public $notificacion;
public $consulta_configuracion;
public $titulo_noti;
public $descripcion_noti;
public $destinatario_noti;
public function render()
{
{
//$consulta = Configuracione::with('usuario')->orderby('id','desc');
$consulta_configuracion= Configuracione::with('usuario')->orderby('id','desc')->first();
$consulta_configuracion = Configuracione::with('usuario')->orderby('id', 'desc')->first();
$this->consulta_configuracion = $consulta_configuracion;
//dd($consulta_configuraciones);
if (empty($this->nombre) && empty($this->slogan) && empty($this->color_boton) ) {
if (empty($this->nombre) && empty($this->slogan) && empty($this->color_boton)) {
$this->nombre = $consulta_configuracion->nombre;
$this->slogan = $consulta_configuracion->slogan;
@@ -117,9 +123,9 @@ class ShowConfiguracion extends Component
//msj
$this->mensaje_msj_compra= $consulta_configuracion->msj_compra;
$this->mensaje_msj_wp= $consulta_configuracion->msj_wp;
$this->mensaje_msj_compra = $consulta_configuracion->msj_compra;
$this->mensaje_msj_wp = $consulta_configuracion->msj_wp;
$this->clave_1 = $consulta_configuracion->clave_1;
$this->clave_2 = $consulta_configuracion->clave_2;
$this->clave_3 = $consulta_configuracion->clave_3;
@@ -129,19 +135,44 @@ class ShowConfiguracion extends Component
$this->iptv = $consulta_configuracion->iptv;
$this->notificacion = $consulta_configuracion->hora;
}
return view('livewire.show-configuracion',[
return view('livewire.show-configuracion', [
'sliders' => slider::get(),
'usuarios' => User::get(),
]);
}
public function guardarclaves(){
$claves=$this->consulta_configuracion->update([
public function guardarNoti()
{
$this->validate([
'titulo_noti' => 'required',
'descripcion_noti' => 'required',
]);
$consulta = new Notificacion();
$consulta->remitente_id = Auth::user()->id;
$consulta->destinatario_id = $this->destinatario_noti == 'todos' ? Auth::user()->id : $this->destinatario_noti;
$consulta->titulo = trim($this->titulo_noti);
$consulta->descripcion = trim($this->descripcion_noti);
$consulta->estado = true;
$consulta->todos = $this->destinatario_noti == 'todos' || !$this->destinatario_noti ? true : false;
$consulta->save();
$this->alert('success', 'Notificacion creada exitosamente!', [
'position' => 'top'
]);
$this->titulo_noti = null;
$this->descripcion_noti = null;
$this->destinatario_noti = null;
}
public function guardarclaves()
{
$claves = $this->consulta_configuracion->update([
'clave_1' => $this->clave_1,
'clave_2' => $this->clave_2,
'clave_3' => $this->clave_3,
@@ -151,74 +182,72 @@ class ShowConfiguracion extends Component
]);
if ($claves) {
$this->alert('success', 'claves actualizado', [
'position' => 'top'
]);
}
]);
}
}
public function guardar(){
public function guardar()
{
if (!empty($this->photo)) {
$nombre=Str::random(10);
$img = img::make($this->photo)->orientate()->resize(1000, null, function($constraint){
$nombre = Str::random(10);
$img = img::make($this->photo)->orientate()->resize(1000, null, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})->encode('webp');
$location = "photos/".$nombre.".webp";
$location = "photos/" . $nombre . ".webp";
Storage::disk('local')->put($location, $img);
$url_logo = $location;
}else{
$url_logo = $this->url_logo ;
} else {
$url_logo = $this->url_logo;
}
$configuracion=$this->consulta_configuracion->update([
$configuracion = $this->consulta_configuracion->update([
'nombre' => $this->nombre,
'slogan' => $this->slogan,
'color_boton' => $this->color_boton,
'url_logo' => $url_logo,
'color_barra' => $this->color_barra,
'color_menu'=> $this->color_menu,
'usermodifico_id'=>Auth::user()->id,
'color_menu' => $this->color_menu,
'usermodifico_id' => Auth::user()->id,
]);
if ($configuracion) {
$this->alert('success', 'Configuración actualizada', [
'position' => 'top'
]);
]);
}
}
public function guardarSlider(){
public function guardarSlider()
{
if (!empty($this->slider)) {
$nombre=Str::random(12);
$img = img::make($this->slider)->orientate()->resize(1000, null, function($constraint){
$nombre = Str::random(12);
$img = img::make($this->slider)->orientate()->resize(1000, null, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})->encode('webp');
$location = "photos/".$nombre.".webp";
$location = "photos/" . $nombre . ".webp";
Storage::disk('local')->put($location, $img);
$url_slider = $location;
}else{
$url_slider = '' ;
} else {
$url_slider = '';
}
$guardar = new slider;
$guardar->slider = $url_slider;
$guardar->save();
@@ -247,196 +276,200 @@ class ShowConfiguracion extends Component
'onDismissed' => '',
'cancelButtonText' => 'Salir',
'confirmButtonText' => 'Si',
]);
]);
}
public function getListeners()
{
return [
'confirmed'
];
return [
'confirmed'
];
}
public function confirmed(){
slider::where('id',$this->delete_slider)->delete();
public function confirmed()
{
slider::where('id', $this->delete_slider)->delete();
$this->alert('success', 'Imagen eliminada correctamente!', [
'position' => 'top'
]);
}
public function guardarTop(){
public function guardarTop()
{
if (!empty($this->photo_top)) {
$nombre=Str::random(10);
$img = img::make($this->photo_top)->orientate()->resize(1000, null, function($constraint){
$nombre = Str::random(10);
$img = img::make($this->photo_top)->orientate()->resize(1000, null, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})->encode('webp');
$location = "photos/".$nombre.".webp";
Storage::disk('local')->put($location, $img);
$photo_top = $location;
}else{
$photo_top = $this->img_top ;
$location = "photos/" . $nombre . ".webp";
Storage::disk('local')->put($location, $img);
$photo_top = $location;
} else {
$photo_top = $this->img_top;
}
if (!empty($this->imgP1)) {
$imgP1=$this->imgP1->store('photos');
}else{
$imgP1 = $this->top_1 ;
$imgP1 = $this->imgP1->store('photos');
} else {
$imgP1 = $this->top_1;
}
if (!empty($this->imgP2)) {
$imgP2=$this->imgP2->store('photos');
}else{
$imgP2 = $this->top_2 ;
$imgP2 = $this->imgP2->store('photos');
} else {
$imgP2 = $this->top_2;
}
if (!empty($this->imgP3)) {
$imgP3=$this->imgP3->store('photos');
}else{
$imgP3 = $this->top_3 ;
$imgP3 = $this->imgP3->store('photos');
} else {
$imgP3 = $this->top_3;
}
if (!empty($this->imgP4)) {
$imgP4=$this->imgP4->store('photos');
}else{
$imgP4 = $this->top_4 ;
$imgP4 = $this->imgP4->store('photos');
} else {
$imgP4 = $this->top_4;
}
if (!empty($this->imgP5)) {
$imgP5=$this->imgP5->store('photos');
}else{
$imgP5 = $this->top_5 ;
$imgP5 = $this->imgP5->store('photos');
} else {
$imgP5 = $this->top_5;
}
if (!empty($this->imgP6)) {
$imgP6=$this->imgP6->store('photos');
}else{
$imgP6 = $this->top_6 ;
$imgP6 = $this->imgP6->store('photos');
} else {
$imgP6 = $this->top_6;
}
if (!empty($this->imgP7)) {
$imgP7=$this->imgP7->store('photos');
}else{
$imgP7 = $this->top_7 ;
$imgP7 = $this->imgP7->store('photos');
} else {
$imgP7 = $this->top_7;
}
if (!empty($this->imgP8)) {
$imgP8=$this->imgP8->store('photos');
}else{
$imgP8 = $this->top_8 ;
$imgP8 = $this->imgP8->store('photos');
} else {
$imgP8 = $this->top_8;
}
if (!empty($this->imgP9)) {
$imgP9=$this->imgP9->store('photos');
}else{
$imgP9 = $this->top_9 ;
$imgP9 = $this->imgP9->store('photos');
} else {
$imgP9 = $this->top_9;
}
if (!empty($this->imgP10)) {
$imgP10=$this->imgP10->store('photos');
}else{
$imgP10 = $this->top_10 ;
$imgP10 = $this->imgP10->store('photos');
} else {
$imgP10 = $this->top_10;
}
$top = $this->consulta_configuracion->update([
'top_1' => $imgP1,
'top_2' => $imgP2,
'top_3' => $imgP3,
'top_4' => $imgP4,
'top_5' => $imgP5,
'top_6' => $imgP6,
'top_7' => $imgP7,
'top_8' => $imgP8,
'top_9' => $imgP9,
'top_10' => $imgP10,
'img_top' => $photo_top,
'mensaje_top' => $this->mensaje_top,
'premio_1' => $this->premio_1,
'premio_2' => $this->premio_2,
'premio_3' => $this->premio_3,
'premio_4' => $this->premio_4,
'premio_5' => $this->premio_5,
'premio_6' => $this->premio_6,
'premio_7' => $this->premio_7,
'premio_8' => $this->premio_8,
'premio_9' => $this->premio_9,
'premio_10' => $this->premio_10,
'top_1' => $imgP1,
'top_2' => $imgP2,
'top_3' => $imgP3,
'top_4' => $imgP4,
'top_5' => $imgP5,
'top_6' => $imgP6,
'top_7' => $imgP7,
'top_8' => $imgP8,
'top_9' => $imgP9,
'top_10' => $imgP10,
'img_top' => $photo_top,
'mensaje_top' => $this->mensaje_top,
'premio_1' => $this->premio_1,
'premio_2' => $this->premio_2,
'premio_3' => $this->premio_3,
'premio_4' => $this->premio_4,
'premio_5' => $this->premio_5,
'premio_6' => $this->premio_6,
'premio_7' => $this->premio_7,
'premio_8' => $this->premio_8,
'premio_9' => $this->premio_9,
'premio_10' => $this->premio_10,
]);
if($top){
if ($top) {
$this->alert('success', 'Top distribuidores actualizado', [
'position' => 'top'
]);
]);
}
}
public function guardarMsjCompra(){
public function guardarMsjCompra()
{
$msj = $this->consulta_configuracion->update([
'msj_compra' => $this->mensaje_msj_compra,
'msj_wp' => $this->mensaje_msj_wp,
]);
if ($msj) {
$this->alert('success', 'Mensaje actualizado', [
'position' => 'top'
]);
$this->alert('success', 'Mensaje actualizado', [
'position' => 'top'
]);
}
}
public function guardariptv(){
// dd($this->iptv);
public function guardariptv()
{
// dd($this->iptv);
$iptv = $this->consulta_configuracion->update([
'iptv' => $this->iptv,
]);
if ($iptv) {
$this->alert('success', 'iptv actualizado', [
'position' => 'top'
]);
$this->alert('success', 'iptv actualizado', [
'position' => 'top'
]);
}
}
public function eliminarC(){
public function eliminarC()
{
//$eliminar_cuentas = Cuentas::truncate();
$this->alert('warning', 'Funcion deshabilitada ', [
'position' => 'top'
]);
]);
}
public function eliminarR(){
// $eliminar_cuentas = Historial_cuenta::truncate();
public function eliminarR()
{
// $eliminar_cuentas = Historial_cuenta::truncate();
$this->alert('warning', 'Funcion deshabilitada ', [
'position' => 'top'
]);
]);
}
public function eliminarH(){
public function eliminarH()
{
//$desasociar_cuentas = Historiale::truncate();
$this->alert('warning', 'Funcion deshabilitada ', [
'position' => 'top'
]);
]);
}
public function guardarnot(){
public function guardarnot()
{
$notificacion = $this->consulta_configuracion->update([
'hora' => $this->notificacion,
]);
$this->alert('success', 'La hora de notificación ha sido actualizada.', [
'position' => 'top'
]);
]);
}
public function eliminarCache(){
public function eliminarCache()
{
Artisan::call('cache:clear');
Artisan::call('config:clear');
Artisan::call('view:clear');
@@ -445,7 +478,6 @@ class ShowConfiguracion extends Component
$this->alert('success', 'Cache removido correctamente', [
'position' => 'top'
]);
]);
}
}
+20
View File
@@ -0,0 +1,20 @@
<?php
namespace App\Http\Livewire;
use App\Models\Pendientes;
use Livewire\Component;
class ShowPendientes extends Component
{
public $entradas = 10;
public function render()
{
$consulta = Pendientes::paginate($this->entradas);
return view('livewire.show-pendientes',[
'consulta' => $consulta,
]);
}
}
+16
View File
@@ -6,12 +6,15 @@ use App\Models\Cuentas;
use App\Models\Historiale;
use App\Models\Historial_cuenta;
use App\Models\Log_general;
use App\Models\Notificacion;
use App\Models\Pendientes;
use App\Models\Role;
use App\Models\Servicio;
use App\Models\Tarifas;
use App\Models\user;
use App\Notifications\NotificacionPendiente;
use Carbon\Carbon;
use Illuminate\Support\Facades\Auth;
use Livewire\Component;
use Jantinnerezo\LivewireAlert\LivewireAlert;
use Livewire\WithFileUploads;
@@ -242,12 +245,25 @@ class ShowPlanes extends Component
$cuentasPendientes = Pendientes::where('estado', 'pendiente')->where('servicio_id', $this->servicio_newCuenta)->take($servicioPantallas)->get();
foreach ($cuentasPendientes as $i => $cuentaPendiente) {
$servicioName = $cuentaPendiente->servicio->nombre;
$historial_cuenta = new Historial_cuenta();
$historial_cuenta->historial_id = $cuentaPendiente->historial_id;
$historial_cuenta->cuenta_id = $cuenta->id;
$historial_cuenta->perfil = $i + 1;
$historial_cuenta->save();
$cuentaPendiente->update(['estado' => 'cerrado']);
$cuentaPendiente->historial->vendedor->notify(new NotificacionPendiente($servicioName));
$consulta = new Notificacion();
$consulta->remitente_id = Auth::user()->id;
$consulta->destinatario_id = $historial_cuenta->historial->vendedor_id;
$consulta->titulo = "Licencia asignada para $servicioName";
$consulta->descripcion = "La licencia de $servicioName ha sido activada y ahora puedes utilizar tu cuenta sin problemas.";
$consulta->estado = true;
$consulta->todos = false;
$consulta->save();
}
}
+16
View File
@@ -5,8 +5,11 @@ namespace App\Imports;
use Illuminate\Support\Facades\Hash;
use App\Models\Cuentas;
use App\Models\Historial_cuenta;
use App\Models\Notificacion;
use App\Models\Pendientes;
use App\Models\Servicio;
use App\Notifications\NotificacionPendiente;
use Illuminate\Support\Facades\Auth;
use Maatwebsite\Excel\Concerns\ToModel;
class UsersImport implements ToModel
@@ -39,12 +42,25 @@ class UsersImport implements ToModel
->get();
foreach ($cuentasPendientes as $i => $cuentaPendiente) {
$servicioName = $cuentaPendiente->servicio->nombre;
$historial_cuenta = new Historial_cuenta();
$historial_cuenta->historial_id = $cuentaPendiente->historial_id;
$historial_cuenta->cuenta_id = $cuenta->id;
$historial_cuenta->perfil = $i + 1;
$historial_cuenta->save();
$cuentaPendiente->update(['estado' => 'cerrado']);
$historial_cuenta->historial->vendedor->notify(new NotificacionPendiente($servicioName));
$consulta = new Notificacion();
$consulta->remitente_id = Auth::user()->id;
$consulta->destinatario_id = $historial_cuenta->historial->vendedor_id;
$consulta->titulo = "Licencia asignada para $servicioName";
$consulta->descripcion = "La licencia de $servicioName ha sido activada y ahora puedes utilizar tu cuenta sin problemas.";
$consulta->estado = true;
$consulta->todos = false;
$consulta->save();
}
}
+5 -1
View File
@@ -11,6 +11,10 @@ class Historial_cuenta extends Model
protected $fillable = [
'historial_id',
'cuenta_id',
];
public function historial()
{
return $this->belongsTo(Historiale::class, 'historial_id');
}
}
+1 -1
View File
@@ -24,7 +24,7 @@ class Historiale extends Model
public function vendedor()
{
return $this->belongsTo(User::class);
return $this->belongsTo(User::class , 'vendedor_id');
}
public function tarifa()
+2 -2
View File
@@ -18,10 +18,10 @@ class Pendientes extends Model
public function servicio()
{
return $this->hasMany(Servicio::class, 'servicio_id');
return $this->belongsTo(Servicio::class, 'servicio_id');
}
public function historial()
{
return $this->hasMany(Historiale::class, 'historial_id');
return $this->belongsTo(Historiale::class, 'historial_id');
}
}
@@ -0,0 +1,43 @@
<?php
namespace App\Notifications;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class NotificacionPendiente extends Notification
{
use Queueable;
protected $servicioName;
public function __construct($servicioName)
{
$this->servicioName = $servicioName;
}
public function via($notifiable)
{
return ['mail'];
}
public function toMail($notifiable)
{
return (new MailMessage)
->subject('Licencia asignada para ' . $this->servicioName)
->greeting('Tu cuenta de ' . $this->servicioName . ' ha sido asignada')
->line('titulo: ' . 'Licencia asignada para ' . $this->servicioName)
->line('descripcion: La licencia de ' . $this->servicioName . ' ha sido activada y ahora puedes utilizar tu cuenta sin problemas.')
->salutation('¡Gracias por tu atención!');
}
public function toArray($notifiable)
{
return [
//
];
}
}
@@ -1,129 +1,143 @@
<div>
<tr class="hover:bg-gray-200 hover:ring-gray-500 border-gray-200 text-sm text-left w-full pl-4 @if($historiales >= '1' ) bg-green-200 @endif" x-data="{ openOption: false }">
<td><input type="checkbox" wire:model="delete_1" value="{{$cuenta->id}}"> </td>
<td class="pl-[2rem]">{{ $cuenta->id ?? '' }}</td>
<td class="pl-[2rem]">{{ $cuenta->servicio->nombre ?? '' }}</td>
<tr class="hover:bg-gray-200 hover:ring-gray-500 border-gray-200 text-sm text-left w-full pl-4 @if ($historiales >= '1') bg-green-200 @endif"
x-data="{ openOption: false }">
<td><input type="checkbox" wire:model="delete_1" value="{{ $cuenta->id }}"> </td>
<td class="pl-[2rem]">{{ $cuenta->id ?? '' }}</td>
<td class="pl-[2rem]">{{ $cuenta->servicio->nombre ?? '' }}</td>
<td class="pl-[2rem] text-xs sm:text-sm ">{{ $cuenta->correo?? '' }}</td>
<td class="pl-[2rem] text-xs sm:text-sm ">{{ $cuenta->password ?? '' }}</td>
<td class="pl-[2rem] text-xs sm:text-sm ">{{ $cuenta->correo ?? '' }}</td>
<td class="pl-[2rem] text-xs sm:text-sm ">{{ $cuenta->password ?? '' }}</td>
<td class="pl-[2rem] text-xs hidden md:inline-table">{{ carbon\Carbon::parse($cuenta->inicio)->format('d M Y') ?? '' }} - {{ carbon\Carbon::parse($cuenta->vencimiento)->format('d M Y') ?? '' }}</td>
<td class="pl-[2rem] text-xs hidden md:inline-table">
{{ carbon\Carbon::parse($cuenta->inicio)->format('d M Y') ?? '' }} -
{{ carbon\Carbon::parse($cuenta->vencimiento)->format('d M Y') ?? '' }}</td>
@php
$servicioNom = $cuenta->servicio->nombre ?? '';
$date1 = new DateTime(strtr(strval($fechaActual), '/', '-'));
$date2 = new DateTime(strtr(strval($cuenta->vencimiento), '/', '-'));
@endphp
@if ($date1 < $date2)
<td class="pl-[2rem]">
@php
$diff = $date1->diff($date2);
echo $diff->days . ' dias';
@endphp
</td>
@endif
@php
$servicioNom = $cuenta->servicio->nombre ?? '';
@if ($date1 > $date2)
<td class="pl-[2rem]">
@php
echo 'Vencido';
@endphp
</td>
@endif
$date1 = new DateTime(strtr(strval($fechaActual), '/', '-'));
$date2 = new DateTime(strtr(strval($cuenta->vencimiento), '/', '-'));
@if ($date1 == $date2)
<td class="pl-[2rem]">
@php
echo 'Vence hoy!!';
@endphp
</td>
@endif
<p class="hidden" id="{{ $n }}">{{ $cuenta->servicio->nombre ?? ''}} - email:
{{ $cuenta->correo ?? '' }} - Pass: {{ $cuenta->password ?? '' }}</p>
<td class="pl-[2rem]">@if($cuenta->estado=='pendiente')
@if($cuenta->historiales_count == 0)
<p class="text-green-600 font-semibold"> Disponible </p>
@else
<p class="text-orange-600 font-semibold"> Ocupado </p>
@endif
@endphp
@else
<p class="@if(($cuenta->historiales_count ?? '') == ($cuenta->servicio->pantallas ?? '' )) text-orange-600 font-semibold @else text-green-600 font-semibold @endif"> {{ $cuenta->historiales_count ?? '0' }}/{{$cuenta->servicio->pantallas?? '0'}} @endif @if($historiales >= '1')<span class="text-green-500 px-2 py-1 rounded-full bg-green-300">{{$historiales}}</span> </p> @endif
</td>
<td class="pl-[2rem] text-sm">@if ($cuenta->estado == 'pendiente') Cuenta completa @elseif($cuenta->estado == 'activo') Pantallas @else Inactiva @endif</td>
<td class="m-auto hidden md:inline-table">
<button x-on:click="ver=true"
wire:click="ver({{ $cuenta->id }},'{{ $servicioNom }}')"
class="bg-[#B221FD] hover:bg-[#7a02b8] text-white px-4 py-1 rounded-lg">Ver</button>
</td>
<td class="pl-2">
<button x-on:click="openOption=!openOption" >
<svg xmlns="http://www.w3.org/2000/svg"
fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
class="w-6 h-6 cursor-pointer">
<path stroke-linecap="round" stroke-linejoin="round"
d="M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z" />
</svg>
</button>
<div x-cloak x-show="openOption" @click.away="openOption = false"
class="sm:absolute bg-white text-center w-[8rem] rounded-[1rem] border-b border-gray-200 shadow-lg">
<button x-on:click="openOption=false,ver=true"
wire:click="ver({{ $cuenta->id }},'{{ $servicioNom }}')"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 hover:rounded-t-[1rem]">Ver
usuarios</button>
<button x-on:click="openOption=false,observacionesm1=true"
wire:click="verObservacion1({{ $cuenta->id }})"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">+
Nota</button>
<button x-on:click="openOption=false,observacionesm1=true"
wire:click="verObservacion1({{ $cuenta->id }})"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">+
Nota</button>
<button x-on:click="openOption=false"
onclick="copiarAlPortapapeles({{ $n }})"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">Copiar
cuenta</button>
@if (auth()->user()->rol->nombre != "editor")
<button x-on:click="openOption=false"
wire:click="delete_cuenta({{ $cuenta->id }})"
class="text-white w-full py-1 bg-[#ff5050] rounded-b-[1rem] hover:bg-[#fd2828] hover:rounded-b-[1rem]">Eliminar</button>
@endif
</div>
</td>
<td class="pl-2 md:inline-table">
@if(!empty($cuenta->observaciones))
<div class="cursor-pointer" x-on:click="openOption=false,observacionesm1=true" title="{{$cuenta->observaciones}}" wire:click="verObservacion1({{ $cuenta->id }})" >
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 text-green-700">
<path stroke-linecap="round" stroke-linejoin="round" d="M8.625 9.75a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H8.25m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H12m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 01.778-.332 48.294 48.294 0 005.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" />
</svg>
</div>
@else
<div x-on:click="openOption=false,observacionesm1=true" title="Sin obversaciones"
wire:click="verObservacion1({{ $cuenta->id }})">
<svg class="w-7 cursor-pointer"
xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs"
x="0" y="0" viewBox="0 0 32 32"
style="enable-background:new 0 0 512 512" xml:space="preserve" class="">
<g>
<g id="Layer_57" data-name="Layer 57">
<path
d="m23 28a3 3 0 0 0 3-3v-13.17a3 3 0 0 0 -.88-2.12l-4.83-4.83a3 3 0 0 0 -2.12-.88h-8.17a3 3 0 0 0 -3 3v18a3 3 0 0 0 3 3zm-.41-18h-1.59a1 1 0 0 1 -1-1v-1.59zm-13.59 15v-18a1 1 0 0 1 1-1h8v3a3 3 0 0 0 3 3h3v13a1 1 0 0 1 -1 1h-13a1 1 0 0 1 -1-1z"
fill="#d3b637" data-original="#000000" class=""></path>
<path
d="m12.5 19.5h2.5v2.5a1 1 0 0 0 2 0v-2.5h2.5a1 1 0 0 0 0-2h-2.5v-2.5a1 1 0 0 0 -2 0v2.5h-2.5a1 1 0 0 0 0 2z"
fill="#d3b637" data-original="#000000" class=""></path>
</g>
@if ($date1 < $date2)
<td class="pl-[2rem]">
@php
$diff = $date1->diff($date2);
echo $diff->days . ' dias';
@endphp
</td>
@endif
@if ($date1 > $date2)
<td class="pl-[2rem]">
@php
echo 'Vencido';
@endphp
</td>
@endif
@if ($date1 == $date2)
<td class="pl-[2rem]">
@php
echo 'Vence hoy!!';
@endphp
</td>
@endif
<p class="hidden" id="{{ $n }}">{{ $cuenta->servicio->nombre ?? '' }} - email:
{{ $cuenta->correo ?? '' }} - Pass: {{ $cuenta->password ?? '' }}</p>
<td class="pl-[2rem]">
@if ($cuenta->estado == 'pendiente')
@if ($cuenta->historiales_count == 0)
<p class="text-green-600 font-semibold"> Disponible </p>
@else
<p class="text-orange-600 font-semibold"> Ocupado </p>
@endif
@else
<p
class="@if (($cuenta->historiales_count ?? '') == ($cuenta->servicio->pantallas ?? '')) text-orange-600 font-semibold @else text-green-600 font-semibold @endif">
{{ $cuenta->historiales_count ?? '0' }}/{{ $cuenta->servicio->pantallas ?? '0' }} @endif
@if ($historiales >= '1')
<span class="text-green-500 px-2 py-1 rounded-full bg-green-300">{{ $historiales }}</span>
</p>
@endif
</td>
<td class="pl-[2rem] text-sm">
@if ($cuenta->estado == 'pendiente')
Cuenta completa
@elseif($cuenta->estado == 'activo')
Pantallas
@else
Inactiva
@endif
</td>
<td class="m-auto hidden md:inline-table">
<button x-on:click="ver=true" wire:click="ver({{ $cuenta->id }},'{{ $servicioNom }}')"
class="bg-[#B221FD] hover:bg-[#7a02b8] text-white px-4 py-1 rounded-lg">Ver</button>
</td>
<td class="pl-2">
<button x-on:click="openOption=!openOption">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-6 h-6 cursor-pointer">
<path stroke-linecap="round" stroke-linejoin="round"
d="M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z" />
</svg>
</button>
<div x-cloak x-show="openOption" @click.away="openOption = false"
class="sm:absolute bg-white text-center w-[8rem] rounded-[1rem] border-b border-gray-200 shadow-lg">
<button x-on:click="openOption=false,ver=true"
wire:click="ver({{ $cuenta->id }},'{{ $servicioNom }}')"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 hover:rounded-t-[1rem]">Ver
usuarios</button>
<button x-on:click="openOption=false,observacionesm1=true"
wire:click="verObservacion1({{ $cuenta->id }})"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">+
Nota</button>
<button x-on:click="openOption=false,observacionesm1=true"
wire:click="verObservacion1({{ $cuenta->id }})"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">+
Nota</button>
<button x-on:click="openOption=false" onclick="copiarAlPortapapeles({{ $n }})"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">Copiar
cuenta</button>
@if (auth()->user()->rol->nombre != 'editor')
<button x-on:click="openOption=false" wire:click="delete_cuenta({{ $cuenta->id }})"
class="text-white w-full py-1 bg-[#ff5050] rounded-b-[1rem] hover:bg-[#fd2828] hover:rounded-b-[1rem]">Eliminar</button>
@endif
</div>
</td>
<td class="pl-2 md:inline-table">
@if (!empty($cuenta->observaciones))
<div class="cursor-pointer" x-on:click="openOption=false,observacionesm1=true"
title="{{ $cuenta->observaciones }}" wire:click="verObservacion1({{ $cuenta->id }})">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-6 h-6 text-green-700">
<path stroke-linecap="round" stroke-linejoin="round"
d="M8.625 9.75a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H8.25m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H12m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 01.778-.332 48.294 48.294 0 005.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" />
</svg>
</div>
@else
<div x-on:click="openOption=false,observacionesm1=true" title="Sin obversaciones"
wire:click="verObservacion1({{ $cuenta->id }})">
<svg class="w-7 cursor-pointer" xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" x="0" y="0"
viewBox="0 0 32 32" style="enable-background:new 0 0 512 512" xml:space="preserve"
class="">
<g>
<g id="Layer_57" data-name="Layer 57">
<path
d="m23 28a3 3 0 0 0 3-3v-13.17a3 3 0 0 0 -.88-2.12l-4.83-4.83a3 3 0 0 0 -2.12-.88h-8.17a3 3 0 0 0 -3 3v18a3 3 0 0 0 3 3zm-.41-18h-1.59a1 1 0 0 1 -1-1v-1.59zm-13.59 15v-18a1 1 0 0 1 1-1h8v3a3 3 0 0 0 3 3h3v13a1 1 0 0 1 -1 1h-13a1 1 0 0 1 -1-1z"
fill="#d3b637" data-original="#000000" class=""></path>
<path
d="m12.5 19.5h2.5v2.5a1 1 0 0 0 2 0v-2.5h2.5a1 1 0 0 0 0-2h-2.5v-2.5a1 1 0 0 0 -2 0v2.5h-2.5a1 1 0 0 0 0 2z"
fill="#d3b637" data-original="#000000" class=""></path>
</g>
</svg>
</div>
@endif
</td>
</tr>
</div>
</g>
</svg>
</div>
@endif
</td>
</tr>
</div>
+2 -1
View File
@@ -98,8 +98,9 @@ x-data="{ menuG:false}"
<li class="flex align-center flex-col">
<h4 @click="selected !== 0 ? selected = 0 : selected = null"
class="cursor-pointer px-5 py-3 bg-[#b221fd] text-white text-center inline-block hover:bg-[#7a02b8] hover:shadow rounded-lg">Admin</h4>
<p class="absolute bg-[#f2f4ff] rounded-md -top-[150%] -right-[20%] sm:-right-[55%] " x-show="selected == 0" >
<p class="absolute bg-[#f2f4ff] rounded-md -top-[180%] -right-[20%] sm:-right-[55%] " x-show="selected == 0" >
<a class="block cursor-pointer hover:rounded-t-md rounded-t-md text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('planes') }}">Gestión Planes</a>
<a class="block cursor-pointer hover:rounded-t-md rounded-t-md text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('pendientes') }}">Gestión Pendientes</a>
<a class="block cursor-pointer hover:rounded-b-md rounded-b-md text-center hover:bg-[#d1d3e1] w-full px-3 py-1" href="{{ route('import') }}">Importar cuentas</a>
@if (auth()->user()->rol->nombre == "super" || auth()->user()->rol->nombre == "administrador")
<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>
+1 -1
View File
@@ -21,7 +21,7 @@
<p class="text-sm">
{{ $item->descripcion }}
</p>
@if (!$item->todos)
@if (!$item->todos || Auth::user()->rol->nombre == 'administrador')
<span class="text-red-500 font-semibold absolute top-0 right-2 cursor-pointer select-none" wire:click="deleteNotificacion({{ $item->id }})" wire:loading.remove>
x
</span>
@@ -1,5 +1,6 @@
<div class="h-full w-full md:my-2">
<div class=" fixed backdrop-blur-sm bg-white/70 left-0 bottom-0 top-0 right-0 h-full z-40" wire:loading wire:target="guardar,guardarSlider,slider,cancelarSlider,deleteSlider,confirmed">>
<div class=" fixed backdrop-blur-sm bg-white/70 left-0 bottom-0 top-0 right-0 h-full z-40" wire:loading
wire:target="guardar,guardarSlider,slider,cancelarSlider,deleteSlider,confirmed,guardarNoti">
<div class="grid h-full place-items-center ">
<div class="max-w-xs">
<img src="./img/loading.gif" alt="" class="w-full text-center">
@@ -8,14 +9,14 @@
</div>
</div>
<div class="bg-[#f5f5f5] md:w-[100%] m-auto p-2 md:p-5 rounded-[1.2rem] relative mb-4">
<div class="flex justify-between my-2 items-center">
<div class="flex items-center gap-4">
<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">
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">
<g>
<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"
@@ -87,7 +88,7 @@
</div>
</div>
</div>
@@ -100,7 +101,7 @@
</div>
{{-- Slider --}}
<div class="bg-white grid grid-cols-1 text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 my-8">
<div class="bg-white grid grid-cols-1 text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 my-8">
<div x-data="{ open: false }" class="text-center w-full">
@@ -108,7 +109,8 @@
<div class="text-left mb-4 lg:mb-0 font-bold text-lg">Gestión de Slider</div>
<button
class="inline-flex ml-5 rounded-md border border-transparent sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5"
x-on:click="open = true"><label class="px-4 py-2 cursor-pointer" for="img_slider"> Añadir </label>
x-on:click="open = true"><label class="px-4 py-2 cursor-pointer" for="img_slider"> Añadir
</label>
</button>
<input type="file" name="img_slider" wire:model="slider" hidden id="img_slider">
</div>
@@ -117,15 +119,15 @@
<div class="md:flex items-center shadow-2xl rounded-lg py-4 px-2 mb-2 mx-auto max-w-lg ">
<div class="ml-auto ">
@if ($slider)
<img class="w-64 shadow-lg rounded-lg" src="{{ $slider->temporaryUrl() }}">
@else
<div class="w-full md:w-64 h-32 shadow rounded-lg text-center bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500">
<img class="w-64 shadow-lg rounded-lg" src="{{ $slider->temporaryUrl() }}">
@else
<div
class="w-full md:w-64 h-32 shadow rounded-lg text-center bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500">
</div>
@endif
</div>
@endif
</div>
<div class="text-left px-3 mr-auto py-2">
<button
@@ -157,39 +159,41 @@
</div>
</div >
</div>
{{-- distribuidor --}}
<div class="bg-white grid grid-cols-1 lg:grid-cols-2 text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 mb-8">
<div class="lg:col-span-2">
<p class="text-left mb-4 font-bold text-lg">Distribuidor</p>
{{-- img distribuidor --}}
<div class="text-center ">
<div class="text-center ">
<div class="md:flex items-center shadow-2xl rounded-lg py-4 px-2 mb-2 mx-auto max-w-lg ">
<div class="ml-auto ">
@if ($photo_top)
<img class="w-full md:w-64 h-32 shadow-lg rounded-lg object-cover" src="{{ $photo_top->temporaryUrl() }}">
<img class="w-full md:w-64 h-32 shadow-lg rounded-lg object-cover"
src="{{ $photo_top->temporaryUrl() }}">
@else
<div class="w-full md:w-64 h-32 shadow rounded-lg text-center bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 object-cover">
<img src="{{asset($img_top) ?? ''}}" alt="" class="object-cover w-full h-full">
</div>
<div
class="w-full md:w-64 h-32 shadow rounded-lg text-center bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 object-cover">
<img src="{{ asset($img_top) ?? '' }}" alt=""
class="object-cover w-full h-full">
</div>
@endif
</div>
<div class="text-left px-3 mr-auto py-2">
<label for="photo_top"
class=" cursor-pointer justify-center rounded-md border border-transparent px-2 py-1 mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Subir
img</label>
<input type="file" name="imagen_distribuidor" id="photo_top" wire:model="photo_top"
hidden>
class=" cursor-pointer justify-center rounded-md border border-transparent px-2 py-1 mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Subir
img</label>
<input type="file" name="imagen_distribuidor" id="photo_top" wire:model="photo_top"
hidden>
</div>
</div>
@@ -202,203 +206,215 @@
<div class="text-center">
<label class="sm:block text-gray-700 text-sm font-semibold mb-2 text-center">Puesto 1</label>
<div class="my-2 text-center">
@if ($imgP1)
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover" src="{{ $imgP1->temporaryUrl() }}">
@else
<img src="{{asset($top_1) ?? ''}}" alt="" class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
@endif
</div>
<div class="my-2 text-center">
@if ($imgP1)
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover"
src="{{ $imgP1->temporaryUrl() }}">
@else
<img src="{{ asset($top_1) ?? '' }}" alt=""
class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
@endif
</div>
<label for="imgP1" class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<label for="imgP1"
class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<input type="file" name="imgP1" id="imgP1" wire:model="imgP1" hidden>
<input type="text" placeholder="Premio" wire:model="premio_1"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div>
<label class="sm:block text-gray-700 text-sm font-semibold mb-2 text-center">Puesto 2</label>
<div class="my-2 text-center">
@if ($imgP2)
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover" src="{{ $imgP2->temporaryUrl() }}">
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover"
src="{{ $imgP2->temporaryUrl() }}">
@else
<img src="{{asset($top_2) ?? ''}}" alt="" class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
<img src="{{ asset($top_2) ?? '' }}" alt=""
class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
@endif
</div>
<label for="imgP2" class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<label for="imgP2"
class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<input type="file" name="imgP2" id="imgP2" wire:model="imgP2" hidden>
<input type="text" placeholder="Premio" wire:model="premio_2"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div>
<label class="sm:block text-gray-700 text-sm font-semibold mb-2 text-center">Puesto 3</label>
<div class="my-2 text-center">
@if ($imgP3)
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover" src="{{ $imgP3->temporaryUrl() }}">
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover"
src="{{ $imgP3->temporaryUrl() }}">
@else
<img src="{{asset($top_3) ?? ''}}" alt="" class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
<img src="{{ asset($top_3) ?? '' }}" alt=""
class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
@endif
</div>
<label for="imgP3" class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<label for="imgP3"
class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<input type="file" name="imgP3" id="imgP3" wire:model="imgP3" hidden>
<input type="text" placeholder="Premio" wire:model="premio_3"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
</div>
<div class="mb-4 flex justify-around py-2">
<div class="text-center">
<label class="sm:block text-gray-700 text-sm font-semibold mb-2 text-center">Puesto 4</label>
<div class="my-2 text-center">
@if ($imgP4)
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover" src="{{ $imgP4->temporaryUrl() }}">
@else
<img src="{{asset($top_4) ?? ''}}" alt="" class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
@endif
</div>
<div class="my-2 text-center">
@if ($imgP4)
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover"
src="{{ $imgP4->temporaryUrl() }}">
@else
<img src="{{ asset($top_4) ?? '' }}" alt=""
class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
@endif
</div>
<label for="imgP4" class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<label for="imgP4"
class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<input type="file" name="imgP4" id="imgP4" wire:model="imgP4" hidden>
<input type="text" placeholder="Premio" wire:model="premio_4"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div>
<label class="sm:block text-gray-700 text-sm font-semibold mb-2 text-center">Puesto 5</label>
<div class="my-2 text-center">
@if ($imgP5)
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover" src="{{ $imgP5->temporaryUrl() }}">
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover"
src="{{ $imgP5->temporaryUrl() }}">
@else
<img src="{{asset($top_5) ?? ''}}" alt="" class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
<img src="{{ asset($top_5) ?? '' }}" alt=""
class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
@endif
</div>
<label for="imgP5" class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<label for="imgP5"
class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<input type="file" name="imgP5" id="imgP5" wire:model="imgP5" hidden>
<input type="text" placeholder="Premio" wire:model="premio_5"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div>
<label class="sm:block text-gray-700 text-sm font-semibold mb-2 text-center">Puesto 6</label>
<div class="my-2 text-center">
@if ($imgP6)
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover" src="{{ $imgP6->temporaryUrl() }}">
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover"
src="{{ $imgP6->temporaryUrl() }}">
@else
<img src="{{asset($top_6) ?? ''}}" alt="" class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
<img src="{{ asset($top_6) ?? '' }}" alt=""
class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
@endif
</div>
<label for="imgP6" class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<label for="imgP6"
class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<input type="file" name="imgP6" id="imgP6" wire:model="imgP6" hidden>
<input type="text" placeholder="Premio" wire:model="premio_6"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
</div>
<div class="mb-4 flex justify-around py-2">
<div class="text-center">
<label class="sm:block text-gray-700 text-sm font-semibold mb-2 text-center">Puesto 7</label>
<div class="my-2 text-center">
@if ($imgP7)
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover" src="{{ $imgP7->temporaryUrl() }}">
@else
<img src="{{asset($top_7) ?? ''}}" alt="" class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
@endif
</div>
<div class="my-2 text-center">
@if ($imgP7)
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover"
src="{{ $imgP7->temporaryUrl() }}">
@else
<img src="{{ asset($top_7) ?? '' }}" alt=""
class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
@endif
</div>
<label for="imgP7" class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<label for="imgP7"
class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<input type="file" name="imgP7" id="imgP7" wire:model="imgP7" hidden>
<input type="text" placeholder="Premio" wire:model="premio_7"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div>
<label class="sm:block text-gray-700 text-sm font-semibold mb-2 text-center">Puesto 8</label>
<div class="my-2 text-center">
@if ($imgP8)
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover" src="{{ $imgP8->temporaryUrl() }}">
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover"
src="{{ $imgP8->temporaryUrl() }}">
@else
<img src="{{asset($top_8) ?? ''}}" alt="" class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
<img src="{{ asset($top_8) ?? '' }}" alt=""
class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
@endif
</div>
<label for="imgP8" class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<label for="imgP8"
class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<input type="file" name="imgP8" id="imgP8" wire:model="imgP8" hidden>
<input type="text" placeholder="Premio" wire:model="premio_8"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div>
<label class="sm:block text-gray-700 text-sm font-semibold mb-2 text-center">Puesto 9</label>
<div class="my-2 text-center">
@if ($imgP9)
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover" src="{{ $imgP9->temporaryUrl() }}">
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover"
src="{{ $imgP9->temporaryUrl() }}">
@else
<img src="{{asset($top_9) ?? ''}}" alt="" class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
<img src="{{ asset($top_9) ?? '' }}" alt=""
class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
@endif
</div>
<label for="imgP9" class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<label for="imgP9"
class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<input type="file" name="imgP9" id="imgP9" wire:model="imgP9" hidden>
<input type="text" placeholder="Premio" wire:model="premio_9"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
</div>
<div class="mb-4 flex justify-around py-2">
<div class="text-center">
<label class="sm:block text-gray-700 text-sm font-semibold mb-2 text-center">Puesto 10</label>
<div class="my-2 text-center">
@if ($imgP10)
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover" src="{{ $imgP10->temporaryUrl() }}">
@else
<img src="{{asset($top_10) ?? ''}}" alt="" class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
@endif
</div>
<div class="my-2 text-center">
@if ($imgP10)
<img class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover"
src="{{ $imgP10->temporaryUrl() }}">
@else
<img src="{{ asset($top_10) ?? '' }}" alt=""
class="w-12 h-12 shadow-lg rounded-lg mx-auto object-cover">
@endif
</div>
<label for="imgP10" class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<label for="imgP10"
class="text-white bg-[#B221FD] hover:bg-[#7a02b8] px-1 sm:px-3 py-1 rounded-md cursor-pointer">img</label>
<input type="file" name="imgP10" id="imgP10" wire:model="imgP10" hidden>
<input type="text" placeholder="Premio" wire:model="premio_10"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
</div>
{{-- mensaje --}}
{{-- mensaje --}}
<div class="mb-4">
<label for="mensaje" class="block text-gray-700 text-sm font-bold text-left mb-2">Mensaje:</label>
<textarea type="text" id="mensaje" wire:model="mensaje_top" class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"></textarea>
<label for="mensaje"
class="block text-gray-700 text-sm font-bold text-left mb-2">Mensaje:</label>
<textarea type="text" id="mensaje" wire:model="mensaje_top"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"></textarea>
</div>
</div>
@@ -407,23 +423,25 @@
class="inline-flex justify-center rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Actualizar</button>
</span>
</div>
{{-- Msj de compra--}}
<div class="bg-white grid grid-cols-1 lg:grid-cols-2 text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 mb-8">
{{-- Msj de compra --}}
<div class="bg-white grid grid-cols-1 lg:grid-cols-2 text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 mb-8">
<div class="lg:col-span-2 flex">
<div class="mx-auto ">
<p class="text-left mb-4 font-bold text-lg">Mensaje de compra html</p>
<p class="text-left mb-4 font-bold text-lg">Mensaje de compra html</p>
{{-- mensaje --}}
{{-- mensaje --}}
<div class="mb-4">
<label for="mensaje" class="block text-gray-700 text-sm font-bold text-left mb-2">Mensaje:</label>
<textarea type="text" id="mensaje" rows="10" wire:model="mensaje_msj_compra" class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"></textarea>
<label for="mensaje"
class="block text-gray-700 text-sm font-bold text-left mb-2">Mensaje:</label>
<textarea type="text" id="mensaje" rows="10" wire:model="mensaje_msj_compra"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"></textarea>
</div>
</div>
@@ -432,12 +450,14 @@
{{-- mensaje --}}
<div class="mb-4">
<label for="mensaje" class="block text-gray-700 text-sm font-bold text-left mb-2">Mensaje:</label>
<textarea type="text" id="mensaje" rows="10" wire:model="mensaje_msj_wp" class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"></textarea>
<div class="mb-4">
<label for="mensaje"
class="block text-gray-700 text-sm font-bold text-left mb-2">Mensaje:</label>
<textarea type="text" id="mensaje" rows="10" wire:model="mensaje_msj_wp"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"></textarea>
</div>
</div>
</div>
</div>
<span class="lg:col-span-2 mb-2">
@@ -445,128 +465,181 @@
class="inline-flex justify-center rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Actualizar</button>
</span>
</div>
<div class="bg-white grid grid-cols-1 lg:grid-cols-2 text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 mb-8">
<div class="lg:col-span-2 flex">
<div class="mx-auto ">
<p class="text-left mb-4 font-bold text-lg">Claves perfil netflix</p>
<p class="text-left mb-4 font-bold text-lg">Claves perfil netflix</p>
<div class="mb-4">
<label for="clave_1" class="block text-gray-700 text-sm font-bold text-left mb-2">Perfil 1</label>
<input type="text" id="clave_1" wire:model="clave_1" class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div class="mb-4">
<label for="clave_1" class="block text-gray-700 text-sm font-bold text-left mb-2">Perfil 2 </label>
<input type="text" id="clave_1" wire:model="clave_2" class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div class="mb-4">
<label for="clave_1" class="block text-gray-700 text-sm font-bold text-left mb-2">Perfil 3</label>
<input type="text" id="clave_1" wire:model="clave_3" class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div class="mb-4">
<label for="clave_1" class="block text-gray-700 text-sm font-bold text-left mb-2">Perfil 4</label>
<input type="text" id="clave_1" wire:model="clave_4" class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div class="mb-4">
<label for="clave_1" class="block text-gray-700 text-sm font-bold text-left mb-2">Perfil 5</label>
<input type="text" id="clave_1" wire:model="clave_5" class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div class="mb-4">
<label for="clave_1" class="block text-gray-700 text-sm font-bold text-left mb-2">Perfil 6</label>
<input type="text" id="clave_1" wire:model="clave_6" class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
</div>
</div>
<span class="lg:col-span-2 mb-2">
<button wire:click="guardarclaves"
class="inline-flex justify-center rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Actualizar</button>
</span>
</div>
<div class="bg-white grid grid-cols-1 lg:grid-cols-1 text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 mb-8">
<div class="lg:col-span-1 ">
<div class="mx-auto ">
<p class="text-left mb-4 font-bold text-lg">URL IPTV</p>
<div class="mb-4">
<label for="IPTV" class="block text-gray-700 text-sm font-bold text-left mb-2">URL</label>
<input type="text" id="IPTV" wire:model="iptv" class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
<label for="clave_1" class="block text-gray-700 text-sm font-bold text-left mb-2">Perfil
1</label>
<input type="text" id="clave_1" wire:model="clave_1"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div class="mb-4">
<label for="clave_1" class="block text-gray-700 text-sm font-bold text-left mb-2">Perfil 2
</label>
<input type="text" id="clave_1" wire:model="clave_2"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div class="mb-4">
<label for="clave_1" class="block text-gray-700 text-sm font-bold text-left mb-2">Perfil
3</label>
<input type="text" id="clave_1" wire:model="clave_3"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div class="mb-4">
<label for="clave_1" class="block text-gray-700 text-sm font-bold text-left mb-2">Perfil
4</label>
<input type="text" id="clave_1" wire:model="clave_4"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div class="mb-4">
<label for="clave_1" class="block text-gray-700 text-sm font-bold text-left mb-2">Perfil
5</label>
<input type="text" id="clave_1" wire:model="clave_5"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div class="mb-4">
<label for="clave_1" class="block text-gray-700 text-sm font-bold text-left mb-2">Perfil
6</label>
<input type="text" id="clave_1" wire:model="clave_6"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
</div>
</div>
<span class="lg:col-span-2 mb-2">
<button wire:click="guardarclaves"
class="inline-flex justify-center rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Actualizar</button>
</span>
</div>
<span class="lg:col-span-2 mb-2">
<button wire:click="guardariptv"
class="inline-flex justify-center rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Actualizar</button>
</span>
<div class="bg-white grid grid-cols-1 lg:grid-cols-1 text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 mb-8">
<div class="lg:col-span-1 ">
<div class="mx-auto ">
<p class="text-left mb-4 font-bold text-lg">URL IPTV</p>
<div class="mb-4">
<label for="IPTV" class="block text-gray-700 text-sm font-bold text-left mb-2">URL</label>
<input type="text" id="IPTV" wire:model="iptv"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
</div>
</div>
</div>
<span class="lg:col-span-2 mb-2">
<button wire:click="guardariptv"
class="inline-flex justify-center rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Actualizar</button>
</span>
</div>
<div class="bg-white grid grid-cols-1 lg:grid-cols-1 text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 mb-8">
<div class="bg-white grid grid-cols-1 lg:grid-cols-1 text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 mb-8">
<div class="lg:col-span-1 ">
<div class="mx-auto ">
<p class="text-left mb-4 font-bold text-lg">Notificaciones globales</p>
<div class="mb-4">
<label for="titulo_noti"
class="block text-gray-700 text-sm font-bold text-left mb-2">Titulo</label>
<input type="text" id="titulo_noti" wire:model.lazy="titulo_noti"
placeholder="Titulo de notificacion"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div class="mb-4">
<label for="IPTV"
class="block text-gray-700 text-sm font-bold text-left mb-2">Descripción</label>
<textarea placeholder="Descripción de notificacion"
class="border-2 border-neutral-200 rounded-xl shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
name="descripcion_noti" id="descripcion_noti" wire:model.lazy="descripcion_noti" rows="6"></textarea>
</div>
<div class="lg:col-span-1 ">
<div class="mx-auto ">
<div class="mb-4">
<label for="destinatario_noti"
class="block text-gray-700 text-sm font-bold text-left mb-2">Usuarios</label>
<select name="destinatario_noti" id="destinatario_noti" wire:model.lazy="destinatario_noti"
class="w-full border-2 border-neutral-200 rounded-xl shadow apperance-none ring-0 focus:ring-0 focus:border-neutral-300 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
<option value="todos" selected>Todos</option>
@foreach ($usuarios as $usuario)
<option value="{{ $usuario->id }}">{{ $usuario->name ?? '' }} - {{ $usuario->email }}</option>
@endforeach
</select>
</div>
</div>
</div>
<span class="lg:col-span-2 mb-2">
<button wire:click="guardarNoti"
class="inline-flex justify-center rounded-md border border-transparent px-4 py-2 sm:mb-0 mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Guardar</button>
</span>
</div>
<div class="bg-white grid grid-cols-1 lg:grid-cols-1 text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 mb-8">
<div class="lg:col-span-1 ">
<div class="mx-auto ">
<p class="text-left mb-4 font-bold text-lg">Área critica</p>
<button class="px-2 bg-red-500 text-white rounded py-1" wire:click="eliminarC">Eliminar cuentas</button>
<button class="px-2 bg-red-500 text-white rounded py-1" wire:click="eliminarR">Desasociar cuentas</button>
<button class="px-2 bg-red-500 text-white rounded py-1" wire:click="eliminarH">Eliminar historial</button>
<button class="px-2 bg-red-500 text-white rounded py-1" wire:click="eliminarC">Eliminar
cuentas</button>
<button class="px-2 bg-red-500 text-white rounded py-1" wire:click="eliminarR">Desasociar
cuentas</button>
<button class="px-2 bg-red-500 text-white rounded py-1" wire:click="eliminarH">Eliminar
historial</button>
</div>
</div>
</div>
<div class="bg-white grid grid-cols-1 lg:grid-cols-1 text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 mb-8">
</div>
<div class="bg-white grid grid-cols-1 lg:grid-cols-1 text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 mb-8">
<div class="lg:col-span-1 ">
<div class="lg:col-span-1 ">
<div class="mb-4">
<label for="Notificacion" class="block text-gray-700 text-sm font-bold text-left mb-2">Hora de notificación</label>
<input type="text" id="Notificacion" wire:model="notificacion" class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<label for="Notificacion" class="block text-gray-700 text-sm font-bold text-left mb-2">Hora de
notificación</label>
<input type="text" id="Notificacion" wire:model="notificacion"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<span class="lg:col-span-2 mb-2">
<button wire:click="guardarnot"
class="inline-flex justify-center rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Actualizar</button>
</span>
<span class="lg:col-span-2 mb-2">
<button wire:click="guardarnot"
class="inline-flex justify-center rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Actualizar</button>
</span>
</div>
</div>
</div>
</div>
<div class="lg:col-span-1 mb-4 text-center">
<div class="lg:col-span-1 mb-4 text-center">
<button wire:click="eliminarCache"
class=" mx-auto inline-flex justify-center rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-red-500 hover:bg-red-700 focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Eliminar cache</button>
</span>
class=" mx-auto inline-flex justify-center rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-red-500 hover:bg-red-700 focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Eliminar
cache</button>
</span>
</div>
@include('layouts.footer')
</div>
</div>
@include('layouts.footer')
</div>
@@ -0,0 +1,99 @@
<div class="bg-[#f5f5f5] md:w-[100%] m-auto p-2 md:p-5 rounded-[1.2rem] relative mb-4">
<x-ver-entrada />
<x-primary-table>
<x-slot name="thead">
<tr class="text-left">
<th class="rounded-l-lg font-normal pl-[2rem]"></th>
<th class="font-normal pl-[2rem]">id</th>
<th class="font-normal pl-[2rem]">Servicio</th>
<th class="font-normal pl-[2rem]">Cantidad</th>
<th class="font-normal pl-[2rem]">Estado</th>
<th class="font-normal pl-[2rem]">Fecha</th>
<th class="font-normal rounded-r-lg"></th>
</tr>
</x-slot>
<x-slot name="tbody">
@foreach ($consulta as $item)
<tr class="hover:bg-gray-200 hover:ring-gray-500 border-gray-200 text-sm text-left w-full pl-4" x-data="{ openOption: false }">
{{-- <td class="hidden"><input type="checkbox" wire:model="delete_1" value="{{ $item->id }}"> </td> --}}
<td class=""></td>
<td class="pl-[2rem]">{{ $item->id ?? '' }}</td>
<td class="pl-[2rem] text-xs sm:text-sm">{{ $item->servicio->nombre ?? '' }}</td>
<td class="pl-[2rem] text-xs sm:text-sm">{{ $item->cantidad ?? '' }}</td>
<td class="pl-[2rem] text-xs sm:text-sm">{{ $item->estado ?? '' }}</td>
<td class="pl-[2rem] text-xs sm:text-sm">
{{ carbon\Carbon::parse($item->created_at)->format('d M Y') ?? '' }}
</td>
{{-- <td class="pl-2">
<button x-on:click="openOption=!openOption">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" class="w-6 h-6 cursor-pointer">
<path stroke-linecap="round" stroke-linejoin="round"
d="M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z" />
</svg>
</button>
<div x-cloak x-show="openOption" @click.away="openOption = false"
class="sm:absolute bg-white text-center w-[8rem] rounded-[1rem] border-b border-gray-200 shadow-lg">
<button x-on:click="openOption=false,ver=true"
wire:click="ver({{ $item->id }},'{{ $servicioNom }}')"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 hover:rounded-t-[1rem]">Ver
usuarios</button>
<button x-on:click="openOption=false,observacionesm1=true"
wire:click="verObservacion1({{ $item->id }})"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">+
Nota</button>
<button x-on:click="openOption=false,observacionesm1=true"
wire:click="verObservacion1({{ $item->id }})"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">+
Nota</button>
<button x-on:click="openOption=false" onclick="copiarAlPortapapeles({{ $n }})"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">Copiar
item</button>
@if (auth()->user()->rol->nombre != 'editor')
<button x-on:click="openOption=false" wire:click="delete_item({{ $item->id }})"
class="text-white w-full py-1 bg-[#ff5050] rounded-b-[1rem] hover:bg-[#fd2828] hover:rounded-b-[1rem]">Eliminar</button>
@endif
</div>
</td>
<td class="pl-2 md:inline-table">
@if (!empty($item->observaciones))
<div class="cursor-pointer" x-on:click="openOption=false,observacionesm1=true"
title="{{ $item->observaciones }}" wire:click="verObservacion1({{ $item->id }})">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" class="w-6 h-6 text-green-700">
<path stroke-linecap="round" stroke-linejoin="round"
d="M8.625 9.75a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H8.25m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H12m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 01.778-.332 48.294 48.294 0 005.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" />
</svg>
</div>
@else
<div x-on:click="openOption=false,observacionesm1=true" title="Sin obversaciones"
wire:click="verObservacion1({{ $item->id }})">
<svg class="w-7 cursor-pointer" xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs"
x="0" y="0" viewBox="0 0 32 32" style="enable-background:new 0 0 512 512"
xml:space="preserve" class="">
<g>
<g id="Layer_57" data-name="Layer 57">
<path
d="m23 28a3 3 0 0 0 3-3v-13.17a3 3 0 0 0 -.88-2.12l-4.83-4.83a3 3 0 0 0 -2.12-.88h-8.17a3 3 0 0 0 -3 3v18a3 3 0 0 0 3 3zm-.41-18h-1.59a1 1 0 0 1 -1-1v-1.59zm-13.59 15v-18a1 1 0 0 1 1-1h8v3a3 3 0 0 0 3 3h3v13a1 1 0 0 1 -1 1h-13a1 1 0 0 1 -1-1z"
fill="#d3b637" data-original="#000000" class=""></path>
<path
d="m12.5 19.5h2.5v2.5a1 1 0 0 0 2 0v-2.5h2.5a1 1 0 0 0 0-2h-2.5v-2.5a1 1 0 0 0 -2 0v2.5h-2.5a1 1 0 0 0 0 2z"
fill="#d3b637" data-original="#000000" class=""></path>
</g>
</g>
</svg>
</div>
@endif
</td> --}}
</tr>
@endforeach
</x-slot>
<x-slot name="tlink">
{{ $consulta->links() }}
</x-slot>
</x-primary-table>
</div>
@@ -0,0 +1,7 @@
<x-app-layout>
<div class="pb-4">
<livewire:show-pendientes />
</div>
@include('layouts.footer')
</x-app-layout>
+1
View File
@@ -67,6 +67,7 @@ Route::middleware(["auth", "solo_usuario_administrador"])->group(function () {
Route::get('/admin',[MenuController::class,'showadmin' ])->middleware(['auth'])->name('admin');
Route::any('/usuarios',[MenuController::class,'showusuarios' ])->name('usuarios');
Route::any('/planes',[MenuController::class,'showplanes' ])->name('planes');
Route::any('/pendientes',[MenuController::class,'showpendientes' ])->name('pendientes');
Route::get('/servicio',[MenuController::class,'showservicio' ])->name('servicio');
Route::get('/configuracion',[MenuController::class,'showconfiguracion' ])->name('configuracion');
Route::get('/categoria',[MenuController::class,'showcategoria' ])->name('categoria');