menu visible

This commit is contained in:
Felipe
2024-03-04 11:32:45 -05:00
parent 15baeb4caf
commit 14a7b9a782
21 changed files with 313 additions and 362 deletions
+1 -4
View File
@@ -10,11 +10,8 @@ use Carbon\Carbon;
use Illuminate\Support\Facades\Notification; use Illuminate\Support\Facades\Notification;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Livewire\Component; use Livewire\Component;
use Exception;
use Illuminate\Support\Facades\Crypt;
use App\Models\Configuracione; use App\Models\Configuracione;
use Livewire\WithPagination; use Livewire\WithPagination;
use Twilio\Rest\Client;
use Jantinnerezo\LivewireAlert\LivewireAlert; use Jantinnerezo\LivewireAlert\LivewireAlert;
@@ -205,7 +202,7 @@ class ShowClientes extends Component
// $client = new Client($account_sid, $auth_token); // $client = new Client($account_sid, $auth_token);
// $client->messages->create($recipients, // $client->messages->create($recipients,
// ['from' => $twilio_number, 'body' => $message] ); // ['from' => $twilio_number, 'body' => $message] );
// $this->alert('success', 'Notificación enviada por SMS! ', [ // $this->alert('success', 'Notificación enviada por SMS! ', [
@@ -0,0 +1,4 @@
<svg {{ $attributes->merge(['class' => 'w-5']) }} 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>

After

Width:  |  Height:  |  Size: 482 B

+14 -14
View File
@@ -11,7 +11,7 @@
<div x-data="{servicio:@entangle('servicio')}" class="bg-white md:w-[95%] m-auto p-2 md:p-5 rounded-[1.2rem] border-b border-gray-200 shadow-md relative h-[95%]"> <div x-data="{servicio:@entangle('servicio')}" class="bg-white md:w-[95%] m-auto p-2 md:p-5 rounded-[1.2rem] border-b border-gray-200 shadow-md relative h-[95%]">
<div class="flex justify-start my-2 items-center"> <div class="flex justify-start my-2 items-center">
<div class="flex text-sm"> <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"><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" fill="#b221fd" data-original="#000000"/></g></svg> <x-icon-arrow-right/>
Servicios Servicios
</div> </div>
</div> </div>
@@ -38,10 +38,10 @@
<p class="text-xs text-left"> <p class="text-xs text-left">
{{$tarifa->dias}} Dias {{$tarifa->dias}} Dias
</p> </p>
<p class="text-left"> <p class="text-left">
${{number_format($tarifa->valor)}} ${{number_format($tarifa->valor)}}
</p> </p>
</div> </div>
<div> <div>
<span> <span>
@@ -50,7 +50,7 @@
</div> </div>
</div> </div>
</button> </button>
@endif @endif
@endforeach @endforeach
</div> </div>
</div> </div>
@@ -73,7 +73,7 @@
</div> </div>
{{-- Modal agregar servicios --}} {{-- Modal agregar servicios --}}
<div x-cloak x-show="tarjetaPlan" <div x-cloak x-show="tarjetaPlan"
x-transition:enter="transition duration-350" x-transition:enter="transition duration-350"
x-transition:enter-start="opacity-0 scale-100" x-transition:enter-start="opacity-0 scale-100"
x-transition:enter-end="opacity-100 scale-100" x-transition:enter-end="opacity-100 scale-100"
@@ -100,13 +100,13 @@
<div class="px-4 py-4"> <div class="px-4 py-4">
<div class="mb-4"> <div class="mb-4">
<p> <p>
Información del cliente: Información del cliente:
</p> </p>
<p class="text-xs text-gray-400"> <p class="text-xs text-gray-400">
Ingrese los datos del cliente final. Ingrese los datos del cliente final.
</p> </p>
</div> </div>
<div class="flex justify-between text-left gap-2"> <div class="flex justify-between text-left gap-2">
<div class="mb-4"> <div class="mb-4">
<label for="nombre_tarjetaPlan" class="block text-gray-700 text-sm font-bold mb-2">Nombre:</label> <label for="nombre_tarjetaPlan" class="block text-gray-700 text-sm font-bold mb-2">Nombre:</label>
@@ -137,18 +137,18 @@
<div class="border-2 flex text-gray-400 text-xs text-center justify-center gap-2 py-3 rounded-lg md:mx-3 2xl:mx-6"> <div class="border-2 flex text-gray-400 text-xs text-center justify-center gap-2 py-3 rounded-lg md:mx-3 2xl:mx-6">
Pagara ${{number_format($total=((int)$valor_tarjetaPlan*(int)$cantidad_tarjetaPlan))}} . <svg 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" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve"><g><path d="M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z" fill="#9f9f9f" data-original="#000000"></path><path d="M12,5a1,1,0,0,0-1,1v8a1,1,0,0,0,2,0V6A1,1,0,0,0,12,5Z" fill="#9f9f9f" data-original="#000000"></path><rect x="11" y="17" width="2" height="2" rx="1" fill="#9f9f9f" data-original="#000000"></rect></g></svg> Pagara ${{number_format($total=((int)$valor_tarjetaPlan*(int)$cantidad_tarjetaPlan))}} . <svg 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" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve"><g><path d="M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z" fill="#9f9f9f" data-original="#000000"></path><path d="M12,5a1,1,0,0,0-1,1v8a1,1,0,0,0,2,0V6A1,1,0,0,0,12,5Z" fill="#9f9f9f" data-original="#000000"></path><rect x="11" y="17" width="2" height="2" rx="1" fill="#9f9f9f" data-original="#000000"></rect></g></svg>
</div> </div>
</div> </div>
<div class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly gap-5 mt-4"> <div class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly gap-5 mt-4">
<span> <span>
<button wire:click="comprar" type="button" @if ($cantidad_tarjetaPlan <= $disponibles) class="inline-flex justify-center w-full 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 sm-text-sm sm-leading-5" @else disabled class="cursor-no-drop inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-gray-200 hover:bg-gray-200 focus:shadow-outline-green sm-text-sm sm-leading-5" @endif >Comprar</button> <button wire:click="comprar" type="button" @if ($cantidad_tarjetaPlan <= $disponibles) class="inline-flex justify-center w-full 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 sm-text-sm sm-leading-5" @else disabled class="cursor-no-drop inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-gray-200 hover:bg-gray-200 focus:shadow-outline-green sm-text-sm sm-leading-5" @endif >Comprar</button>
</span> </span>
<span> <span>
<button x-on:click="tarjetaPlan=false" type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 text-white bg-[#585858] hover:bg-[#3a3a3a] focus:shadow-outline-green sm-text-sm sm-leading-5">Cerrar</button> <button x-on:click="tarjetaPlan=false" type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 text-white bg-[#585858] hover:bg-[#3a3a3a] focus:shadow-outline-green sm-text-sm sm-leading-5">Cerrar</button>
</span> </span>
@@ -22,18 +22,10 @@
<div class="flex justify-between my-2 items-center mb-8 scroll"> <div class="flex justify-between my-2 items-center mb-8 scroll">
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<div class="flex text-sm"> <div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <x-icon-arrow-right/>
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"
fill="#b221fd" data-original="#000000" />
</g>
</svg>
Promociones Promociones
</div> </div>
</div> </div>
<div class=" gap-2 hidden sm:flex"> <div class=" gap-2 hidden sm:flex">
<select name="categoria_id" id="categoria_id" wire:model.debounce.500ms="categoria_id" <select name="categoria_id" id="categoria_id" wire:model.debounce.500ms="categoria_id"
@@ -74,14 +66,14 @@
<div wire:click="verPromocion({{$promocion->id}})" class=""> <div wire:click="verPromocion({{$promocion->id}})" class="">
<img src="{{ asset($promocion->img_publicidad) }}" alt="" class="w-full m-auto rounded-lg object-cover h-24 sm:h-44 object-center shadow"> <img src="{{ asset($promocion->img_publicidad) }}" alt="" class="w-full m-auto rounded-lg object-cover h-24 sm:h-44 object-center shadow">
</div> </div>
<div x-cloak x-show="openOption" <div x-cloak x-show="openOption"
class="absolute bg-white text-center w-[7rem] top-5 right-[-1rem] rounded-[1rem] border-b border-gray-200 shadow-lg"> class="absolute bg-white text-center w-[7rem] top-5 right-[-1rem] rounded-[1rem] border-b border-gray-200 shadow-lg">
<button x-on:click="openOption=!openOption,ver=true" wire:click="comprarPromo({{ $promocion->id }})" <button x-on:click="openOption=!openOption,ver=true" wire:click="comprarPromo({{ $promocion->id }})"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 hover:rounded-t-[1rem]">Comprar</button> class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 hover:rounded-t-[1rem]">Comprar</button>
</div> </div>
</div> </div>
@endforeach @endforeach
@@ -102,7 +94,7 @@
<div class="bg-white rounded-lg shadow-md sm:1/2 md:1/3 lg:1/3 xl:w-1/4"> <div class="bg-white rounded-lg shadow-md sm:1/2 md:1/3 lg:1/3 xl:w-1/4">
{{-- PHOTO --}} {{-- PHOTO --}}
<div class="w-full text-left text-white px-4 bg-cover py-2 rounded-lg h-64 bg-[url({{asset($this->imagen)}})] "> <div class="w-full text-left text-white px-4 bg-cover py-2 rounded-lg h-64 bg-[url({{asset($this->imagen)}})] ">
</div> </div>
<div class="text-left"> <div class="text-left">
@@ -118,7 +110,7 @@
</div> </div>
<div class="text-sm text-gray-500"> <div class="text-sm text-gray-500">
<p>{{$descripcionPromo}}</p> <p>{{$descripcionPromo}}</p>
</div> </div>
</div> </div>
<div class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly gap-5 mt-2 mb-3"> <div class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly gap-5 mt-2 mb-3">
@@ -160,7 +152,7 @@
<div class="px-4 py-4"> <div class="px-4 py-4">
<div class="mb-4"> <div class="mb-4">
<p> <p>
Información del cliente: Información del cliente:
</p> </p>
<p class="text-xs text-gray-400"> <p class="text-xs text-gray-400">
Ingrese los datos del cliente final. Ingrese los datos del cliente final.
@@ -200,9 +192,9 @@
<div class="border-2 flex text-gray-400 text-xs text-center justify-center gap-2 py-3 rounded-lg md:mx-3 2xl:mx-6"> <div class="border-2 flex text-gray-400 text-xs text-center justify-center gap-2 py-3 rounded-lg md:mx-3 2xl:mx-6">
Pagara el valor de ${{number_format($total=((int)$precioAhora*(int)$cantidad_comprarPromo))}} <svg 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" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve"><g><path d="M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z" fill="#9f9f9f" data-original="#000000"></path><path d="M12,5a1,1,0,0,0-1,1v8a1,1,0,0,0,2,0V6A1,1,0,0,0,12,5Z" fill="#9f9f9f" data-original="#000000"></path><rect x="11" y="17" width="2" height="2" rx="1" fill="#9f9f9f" data-original="#000000"></rect></g></svg> Pagara el valor de ${{number_format($total=((int)$precioAhora*(int)$cantidad_comprarPromo))}} <svg 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" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve"><g><path d="M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z" fill="#9f9f9f" data-original="#000000"></path><path d="M12,5a1,1,0,0,0-1,1v8a1,1,0,0,0,2,0V6A1,1,0,0,0,12,5Z" fill="#9f9f9f" data-original="#000000"></path><rect x="11" y="17" width="2" height="2" rx="1" fill="#9f9f9f" data-original="#000000"></rect></g></svg>
</div> </div>
</div> </div>
<div class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly gap-5 mt-4"> <div class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly gap-5 mt-4">
<span> <span>
<button wire:click="pagar" type="button" class="inline-flex justify-center w-full 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 sm-text-sm sm-leading-5" >Comprar</button> <button wire:click="pagar" type="button" class="inline-flex justify-center w-full 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 sm-text-sm sm-leading-5" >Comprar</button>
@@ -211,14 +203,14 @@
<button x-on:click="modalComprarPromo=false" type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 text-white bg-[#585858] hover:bg-[#3a3a3a] focus:shadow-outline-green sm-text-sm sm-leading-5">Cerrar</button> <button x-on:click="modalComprarPromo=false" type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 text-white bg-[#585858] hover:bg-[#3a3a3a] focus:shadow-outline-green sm-text-sm sm-leading-5">Cerrar</button>
</span> </span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{{-- Modal credenciales --}} {{-- Modal credenciales --}}
<div x-cloak x-show="credenciales" <div x-cloak x-show="credenciales"
x-transition:enter="transition duration-350" x-transition:enter="transition duration-350"
x-transition:enter-start="opacity-0 scale-100" x-transition:enter-start="opacity-0 scale-100"
x-transition:enter-end="opacity-100 scale-100" x-transition:enter-end="opacity-100 scale-100"
@@ -227,7 +219,7 @@
x-transition:leave-end="opacity-0 scale-100" class="absolute backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full"> x-transition:leave-end="opacity-0 scale-100" class="absolute backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full">
<div class="grid h-full place-items-center"> <div class="grid h-full place-items-center">
<div class="bg-white rounded-lg shadow-md sm:1/2 md:1/2 lg:1/3 xl:w-1/4"> <div class="bg-white rounded-lg shadow-md sm:1/2 md:1/2 lg:1/3 xl:w-1/4">
<div class="w-full Text-left text-white px-4 py-2 rounded-lg" <div class="w-full Text-left text-white px-4 py-2 rounded-lg"
style="background: rgb(0,0,0); style="background: rgb(0,0,0);
background: linear-gradient(0deg, rgba(0,0,0,1) 0%, , rgba(20,20,20,1) 100%);"> background: linear-gradient(0deg, rgba(0,0,0,1) 0%, , rgba(20,20,20,1) 100%);">
<p class="font-bold text-lg mb-2"> <p class="font-bold text-lg mb-2">
@@ -278,12 +270,12 @@
</svg> </svg>
</button> </button>
</div> </div>
<p class="hidden" id="{{$n}}">{{ $cuenta->servicio->nombre }} - email: {{ $cuenta->correo }} - Pass: {{ $cuenta->password }}</p> <p class="hidden" id="{{$n}}">{{ $cuenta->servicio->nombre }} - email: {{ $cuenta->correo }} - Pass: {{ $cuenta->password }}</p>
</div> </div>
@endforeach @endforeach
<h1 class="flex mt-4 gap-1"> <h1 class="flex mt-4 gap-1">
Este servicio vencerá el <p class="font-semibold text-gray-600"> Este servicio vencerá el <p class="font-semibold text-gray-600">
{{ $cuentas->fecha_final ?? '' }}.</p> {{ $cuentas->fecha_final ?? '' }}.</p>
@@ -291,17 +283,17 @@
@endif @endif
</div> </div>
<div> <div>
</div> </div>
</div> </div>
<div class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly gap-5 mt-4"> <div class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly gap-5 mt-4">
<span> <span>
<button x-on:click="credenciales=false" type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 text-white bg-[#585858] hover:bg-[#3a3a3a] focus:shadow-outline-green sm-text-sm sm-leading-5">Cerrar</button> <button x-on:click="credenciales=false" type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 text-white bg-[#585858] hover:bg-[#3a3a3a] focus:shadow-outline-green sm-text-sm sm-leading-5">Cerrar</button>
</span> </span>
@@ -323,5 +315,5 @@ function copiarAlPortapapeles(id_elemento) {
document.body.removeChild(aux); document.body.removeChild(aux);
} }
</script> </script>
</div> </div>
@@ -15,7 +15,7 @@
<div class="flex justify-between my-2 items-center"> <div class="flex justify-between my-2 items-center">
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<div class="flex text-sm"> <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"><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" fill="#b221fd" data-original="#000000"/></g></svg> <x-icon-arrow-right/>
Categorias Categorias
</div> </div>
<a x-on:click="nuevaCategoria=true" class="flex px-4 py-2 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]"><p class="text-sm md:text-base">Nueva categoria</p> <a x-on:click="nuevaCategoria=true" class="flex px-4 py-2 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]"><p class="text-sm md:text-base">Nueva categoria</p>
@@ -24,7 +24,7 @@
</svg> </svg>
</a> </a>
</div> </div>
</div> </div>
<div class="mt-2"> <div class="mt-2">
@@ -50,7 +50,7 @@
{{$categoria->nombre}} {{$categoria->nombre}}
</td> </td>
<td class="sm:pl-[2rem] text-ellipsis"> <td class="sm:pl-[2rem] text-ellipsis">
{{$categoria->descripcion}} {{$categoria->descripcion}}
</td> </td>
<td class="md:pl-[2rem] md:pr-[2rem]"> <td class="md:pl-[2rem] md:pr-[2rem]">
<button x-on:click="openOption=!openOption"> <button x-on:click="openOption=!openOption">
@@ -58,7 +58,7 @@
<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" /> <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> </svg>
</button> </button>
<div x-cloak x-show="openOption" @click.away="openOption = false" class="right-0 sm:right-auto absolute bg-white text-center w-[8rem] rounded-[1rem] border-b border-gray-200 shadow-lg"> <div x-cloak x-show="openOption" @click.away="openOption = false" class="right-0 sm:right-auto absolute bg-white text-center w-[8rem] rounded-[1rem] border-b border-gray-200 shadow-lg">
<button x-on:click="openOption=false,editarCategoria = true" wire:click="editar({{$categoria->id}})" class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 hover:rounded-t-[1rem]">Editar</button> <button x-on:click="openOption=false,editarCategoria = true" wire:click="editar({{$categoria->id}})" class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 hover:rounded-t-[1rem]">Editar</button>
<button x-on:click="openOption=false" wire:click="delete({{$categoria->id}})" class="text-white w-full py-1 bg-[#ff5050] rounded-b-[1rem] hover:bg-[#fd2828] hover:rounded-b-[1rem]">Eliminar</button> <button x-on:click="openOption=false" wire:click="delete({{$categoria->id}})" class="text-white w-full py-1 bg-[#ff5050] rounded-b-[1rem] hover:bg-[#fd2828] hover:rounded-b-[1rem]">Eliminar</button>
@@ -73,7 +73,7 @@
</div> </div>
{{-- Modal agregar categoria --}} {{-- Modal agregar categoria --}}
<div x-cloak x-show="nuevaCategoria" <div x-cloak x-show="nuevaCategoria"
x-transition:enter="transition duration-350" x-transition:enter="transition duration-350"
x-transition:enter-start="opacity-0 scale-100" x-transition:enter-start="opacity-0 scale-100"
x-transition:enter-end="opacity-100 scale-100" x-transition:enter-end="opacity-100 scale-100"
@@ -97,13 +97,13 @@
@endif @endif
</div> </div>
</div> </div>
<div class="mb-4"> <div class="mb-4">
<label for="nombre" class="block text-gray-700 text-sm font-bold mb-2">Nombre:</label> <label for="nombre" class="block text-gray-700 text-sm font-bold mb-2">Nombre:</label>
<input type="text" id="nombre" wire:model="nombre" 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"> <input type="text" id="nombre" wire:model="nombre" 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">
@error('nombre') <span class="text-red-400 text-sm ">Requerido*</span> @enderror @error('nombre') <span class="text-red-400 text-sm ">Requerido*</span> @enderror
</div> </div>
<div class="mb-4"> <div class="mb-4">
<label for="descripcion" class="block text-gray-700 text-sm font-bold mb-2">Descripción:</label> <label for="descripcion" class="block text-gray-700 text-sm font-bold mb-2">Descripción:</label>
<textarea type="text" id="descripcion" wire:model="descripcion" 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> <textarea type="text" id="descripcion" wire:model="descripcion" 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>
@@ -123,7 +123,7 @@
</div> </div>
{{-- Modal editar categoria --}} {{-- Modal editar categoria --}}
<div x-cloak x-show="editarCategoria" <div x-cloak x-show="editarCategoria"
x-transition:enter="transition duration-350" x-transition:enter="transition duration-350"
x-transition:enter-start="opacity-0 scale-100" x-transition:enter-start="opacity-0 scale-100"
x-transition:enter-end="opacity-100 scale-100" x-transition:enter-end="opacity-100 scale-100"
@@ -147,13 +147,13 @@
@endif @endif
</div> </div>
</div> </div>
<div class="mb-4"> <div class="mb-4">
<label for="nombre" class="block text-gray-700 text-sm font-bold mb-2">Nombre:</label> <label for="nombre" class="block text-gray-700 text-sm font-bold mb-2">Nombre:</label>
<input type="text" id="nombre" wire:model="nombre" 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"> <input type="text" id="nombre" wire:model="nombre" 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">
@error('nombre') <span class="text-red-400 text-sm ">Requerido*</span> @enderror @error('nombre') <span class="text-red-400 text-sm ">Requerido*</span> @enderror
</div> </div>
<div class="mb-4"> <div class="mb-4">
<label for="descripcion" class="block text-gray-700 text-sm font-bold mb-2">Descripción:</label> <label for="descripcion" class="block text-gray-700 text-sm font-bold mb-2">Descripción:</label>
<textarea type="text" id="descripcion" wire:model="descripcion" 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> <textarea type="text" id="descripcion" wire:model="descripcion" 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>
@@ -1,5 +1,4 @@
<div x-data="{ verCliente: @entangle('verCliente'), vencidosHoy: @entangle('vencidosHoy') }" class="h-full w-full md:my-2"> <div x-data="{ verCliente: @entangle('verCliente'), vencidosHoy: @entangle('vencidosHoy') }" 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 <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="verCliente,enviarNotificacion,renovar"> wire:target="verCliente,enviarNotificacion,renovar">
<div class="grid h-full place-items-center"> <div class="grid h-full place-items-center">
@@ -11,19 +10,10 @@
</div> </div>
{{-- Buscador --}} {{-- Buscador --}}
<div <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 ">
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="md:flex justify-center my-2 items-center text-center ">
<div class="flex text-sm"> <div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <x-icon-arrow-right/>
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"
fill="#b221fd" data-original="#000000" />
</g>
</svg>
Clientes Clientes
</div> </div>
<div class="flex relative text-sm mx-auto w-64 md:w-auto my-2"> <div class="flex relative text-sm mx-auto w-64 md:w-auto my-2">
@@ -14,15 +14,7 @@
<div class="flex justify-between my-2 items-center"> <div class="flex justify-between my-2 items-center">
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<div class="flex text-sm"> <div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <x-icon-arrow-right/>
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"
fill="#b221fd" data-original="#000000" />
</g>
</svg>
Configuracion Configuracion
</div> </div>
</div> </div>
@@ -3,9 +3,7 @@
<div class="md:flex justify-center my-2 items-center text-center "> <div class="md:flex justify-center my-2 items-center text-center ">
<div class="flex text-sm"> <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"> <x-icon-arrow-right/>
<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 general Log general
</div> </div>
<div class="flex relative text-sm mx-auto w-64 md:w-auto my-2"> <div class="flex relative text-sm mx-auto w-64 md:w-auto my-2">
@@ -3,13 +3,7 @@
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 "> 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="md:flex justify-center my-2 items-center text-center">
<div class="flex text-sm"> <div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <x-icon-arrow-right/>
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 Log historial
</div> </div>
<div class="flex relative text-sm mx-auto w-64 md:w-auto my-2"> <div class="flex relative text-sm mx-auto w-64 md:w-auto my-2">
@@ -26,15 +26,7 @@
<div class="grid grid-cols-1 text-center sm:flex justify-between my-2 items-center text-sm "> <div class="grid grid-cols-1 text-center sm:flex justify-between my-2 items-center text-sm ">
<div class="grid grid-cols-1 sm:flex items-center gap-4"> <div class="grid grid-cols-1 sm:flex items-center gap-4">
<div class="flex text-sm"> <div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <x-icon-arrow-right/>
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"
fill="#b221fd" data-original="#000000" />
</g>
</svg>
Planes Planes
</div> </div>
@@ -24,15 +24,7 @@
<div class="flex justify-between my-2 items-center mb-8 scroll"> <div class="flex justify-between my-2 items-center mb-8 scroll">
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<div class="flex text-sm"> <div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <x-icon-arrow-right/>
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"
fill="#b221fd" data-original="#000000" />
</g>
</svg>
Promociones Promociones
</div> </div>
@if (auth()->user()->rol->nombre == 'super' || auth()->user()->rol->nombre == 'administrador') @if (auth()->user()->rol->nombre == 'super' || auth()->user()->rol->nombre == 'administrador')
+87 -92
View File
@@ -1,82 +1,78 @@
<div x-data="{nequi:@entangle('nequi') , valor_recarga: @entangle('valor_recarga') }"> <div x-data="{ nequi: @entangle('nequi'), valor_recarga: @entangle('valor_recarga') }">
<div class=" absolute backdrop-blur-sm bg-white/70 left-0 bottom-0 top-0 right-0 h-full z-40" wire:loading wire:target="verPromocion,comprarPromo,editarPromo,editarPromoUpdate,comprar,pagar,create_newCategoria,add_tarifa,del_item,guardar,eliminar"> <div class=" absolute backdrop-blur-sm bg-white/70 left-0 bottom-0 top-0 right-0 h-full z-40" wire:loading
wire:target="verPromocion,comprarPromo,editarPromo,editarPromoUpdate,comprar,pagar,create_newCategoria,add_tarifa,del_item,guardar,eliminar">
<div class="grid h-full place-items-center "> <div class="grid h-full place-items-center ">
<div class="max-w-xs"> <div class="max-w-xs">
<img src="./img/loading.gif" alt="" class="w-full text-center" > <img src="./img/loading.gif" alt="" class="w-full text-center">
<p class="text-gray-500 text-center">Cargando</p> <p class="text-gray-500 text-center">Cargando</p>
</div> </div>
</div> </div>
</div> </div>
<div class="bg-[#f5f5f5] mt-5 w-[90%] m-auto p-5 rounded-[1.2rem] border-b border-gray-200 shadow-md mb-4 relative"> <div class="bg-[#f5f5f5] mt-5 w-[90%] m-auto p-5 rounded-[1.2rem] border-b border-gray-200 shadow-md mb-4 relative">
<div class="flex justify-start my-2 items-center mb-4"> <div class="flex justify-start my-2 items-center mb-4">
<div class="flex text-sm"> <div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <x-icon-arrow-right />
xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" x="0" y="0" viewBox="0 0 24 24" Saldo
style="enable-background:new 0 0 512 512" xml:space="preserve"> </div>
<path </div>
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>
Saldo
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2"> <div class="grid grid-cols-1 lg:grid-cols-2">
<div class="bg-white w-full sm:w-[26rem] m-auto justify-center rounded-xl shadow-md"> <div class="bg-white w-full sm:w-[26rem] m-auto justify-center rounded-xl shadow-md">
<div class="text-center bg-[#000029] text-white text-lg font-semibold rounded-lg py-2 mb-4"> <div class="text-center bg-[#000029] text-white text-lg font-semibold rounded-lg py-2 mb-4">
Recargar saldo Recargar saldo
</div> </div>
<form action="/recargas" method="post" class="text-center"> <form action="/recargas" method="post" class="text-center">
@csrf @csrf
<div class="flex justify-center mb-4"> <div class="flex justify-center mb-4">
Saldo actual: <p class="font-semibold"> ${{ number_format($user->saldo->valor) }}</p> Saldo actual: <p class="font-semibold"> ${{ number_format($user->saldo->valor) }}</p>
</div> </div>
<div class="mt-2"> <div class="mt-2">
Monto a recargar Monto a recargar
</div> </div>
<div> <div>
<input type="tel" name="recharge" wire:model="valor_recarga" placeholder="$20.000" required <input type="tel" name="recharge" wire:model="valor_recarga" placeholder="$20.000" required
class="border-2 w-1/2 md:w-auto mb-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"> class="border-2 w-1/2 md:w-auto mb-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
@if($valor_recarga) @if ($valor_recarga)
<div class="flex text-sm justify-center">Tu valor a pagar seria: $<p> <div class="flex text-sm justify-center">Tu valor a pagar seria: $<p>
{{$nuevo_valor = (((($valor_recarga)*0.03) + '700' )* 0.19)+ ((($valor_recarga)*0.03) + '700' ) + $valor_recarga}} {{ $nuevo_valor = ($valor_recarga * 0.03 + '700') * 0.19 + ($valor_recarga * 0.03 + '700') + $valor_recarga }}
</p> </p>
</div> </div>
@endif @endif
<p class="text-sm text-green-600 py-2 ">Se sumara $700 COP+ IVA + 3% adicional al pago en Mercado Pago por costos de sistema.</p> <p class="text-sm text-green-600 py-2 ">Se sumara $700 COP+ IVA + 3% adicional al pago en
</div> Mercado Pago por costos de sistema.</p>
</div>
<div class="bg-white px-4 py-3 md:flex justify-center mt-4 mb-4">
<div class="bg-white px-4 py-3 md:flex justify-center mt-4 mb-4">
<span> <span>
<button type="submit" <button type="submit"
class="inline-flex justify-center w-full rounded-md border border-transparent px-8 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">Continuar</button> class="inline-flex justify-center w-full rounded-md border border-transparent px-8 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">Continuar</button>
</span> </span>
</div> </div>
</form> </form>
<!--div class="w-full text-center my-4"> <!--div class="w-full text-center my-4">
<p class="font-semibold">ó</p> <p class="font-semibold">ó</p>
<p class="mx-auto">Pagar con : </p> <p class="mx-auto">Pagar con : </p>
<a href="{{url('wompi/'.((float)$valor_recarga+(float)$monto))}}" target="_blank" > <a href="{{ url('wompi/' . ((float) $valor_recarga + (float) $monto)) }}" target="_blank" >
<img class="w-80 p mx-auto " src="./img/wompi_1.png" alt="wompi"> <img class="w-80 p mx-auto " src="./img/wompi_1.png" alt="wompi">
</a> </a>
@if($cobrar) @if ($cobrar)
<p class="text-sm text-green-600 ">Se sumara $500 COP adicional al pago en Wompi por costos de sistema.</p> <p class="text-sm text-green-600 ">Se sumara $500 COP adicional al pago en Wompi por costos de sistema.</p>
@endif @endif
</div--> </div-->
<!--div class="w-full text-center my-4"> <!--div class="w-full text-center my-4">
<p class="font-semibold">ó</p> <p class="font-semibold">ó</p>
<p class="mx-auto">Pagar con : </p> <p class="mx-auto">Pagar con : </p>
<img x-on:click="nequi=!nequi" class="w-28 rounded-full shadow-lg mx-auto " src="./img/nequi.jpg" alt="nequi"> <img x-on:click="nequi=!nequi" class="w-28 rounded-full shadow-lg mx-auto " src="./img/nequi.jpg" alt="nequi">
</div--> </div-->
@@ -84,51 +80,50 @@
</div> </div>
<div class="overflow-y-auto"> <div class="overflow-y-auto">
<p class="text-center text-sm">Historial</p> <p class="text-center text-sm">Historial</p>
<table class="text-center bg-white rounded-lg shadow-md m-auto mt-4 mb-4 border-separate border-spacing-y-2"> <table
<thead class="font-normal bg-[#000029] text-white h-9"> class="text-center bg-white rounded-lg shadow-md m-auto mt-4 mb-4 border-separate border-spacing-y-2">
<thead class="font-normal bg-[#000029] text-white h-9">
<tr class="text-left"> <tr class="text-left">
<th class="rounded-l-lg font-normal pl-[2rem]">Fecha</th> <th class="rounded-l-lg font-normal pl-[2rem]">Fecha</th>
<th class="font-normal pl-[2rem]">Valor</th> <th class="font-normal pl-[2rem]">Valor</th>
<th class="rounded-r-lg font-normal pl-[2rem] pr-[2rem]">Estado</th> <th class="rounded-r-lg font-normal pl-[2rem] pr-[2rem]">Estado</th>
</tr> </tr>
</thead> </thead>
@php @php
$i = 0; $i = 0;
@endphp @endphp
<tbody class="text-gray-500 select-none"> <tbody class="text-gray-500 select-none">
@foreach ($historial_recargas as $historial_recarga) @foreach ($historial_recargas as $historial_recarga)
<tr class="border-gray-200 text-left w-full pl-4"> <tr class="border-gray-200 text-left w-full pl-4">
{{-- <td class="pl-[2rem]">{{date("d/m/Y", strtotime($historial_recarga->created_at))}}</td> --}} {{-- <td class="pl-[2rem]">{{date("d/m/Y", strtotime($historial_recarga->created_at))}}</td> --}}
<td class="pl-[2rem]">{{date("d/m/Y",strtotime($historial_recarga->created_at))}}</td> <td class="pl-[2rem]">{{ date('d/m/Y', strtotime($historial_recarga->created_at)) }}</td>
<td class="pl-[2rem]">${{ number_format($historial_recarga->monto) }}</td> <td class="pl-[2rem]">${{ number_format($historial_recarga->monto) }}</td>
<td class="pl-[2rem] pr-[2rem]">{{$historial_recarga->status}}</td> <td class="pl-[2rem] pr-[2rem]">{{ $historial_recarga->status }}</td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
</div> </div>
{{--Modal nequi ---}} {{-- Modal nequi - --}}
<div x-cloak x-show="nequi" <div x-cloak x-show="nequi" x-transition:enter="transition duration-350"
x-transition:enter="transition duration-350" x-transition:enter-start="opacity-0 scale-100" x-transition:enter-end="opacity-100 scale-100"
x-transition:enter-start="opacity-0 scale-100" x-transition:leave="transition duration-350" x-transition:leave-start="opacity-100 scale-100"
x-transition:enter-end="opacity-100 scale-100" x-transition:leave-end="opacity-0 scale-100"
x-transition:leave="transition duration-350" class=" backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full fixed z-20">
x-transition:leave-start="opacity-100 scale-100" <div class="grid h-full place-items-center overflow-y-auto">
x-transition:leave-end="opacity-0 scale-100" class=" backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full fixed z-20"> <div class="bg-white rounded-lg shadow-md sm:1/2 md:1/2 lg:1/3 xl:w-1/4">
<div class="grid h-full place-items-center overflow-y-auto">
<div class="bg-white rounded-lg shadow-md sm:1/2 md:1/2 lg:1/3 xl:w-1/4">
</div>
</div>
</div>
</div>
</div>
</div>
</div> </div>
@@ -1,15 +1,9 @@
<div> <div>
<div class="bg-[#f5f5f5] mt-5 w-[90%] m-auto p-5 rounded-[1.2rem] border-b border-gray-200 shadow-md mb-4 relative"> <div class="bg-[#f5f5f5] mt-5 w-[90%] m-auto p-5 rounded-[1.2rem] border-b border-gray-200 shadow-md mb-4 relative">
<div class="flex justify-start my-2 items-center mb-4"> <div class="flex justify-start my-2 items-center mb-4">
<div class="flex text-sm"> <div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <x-icon-arrow-right/>
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>
Saldo Saldo
</div> </div>
</div> </div>
@@ -18,11 +12,11 @@
require base_path('vendor/autoload.php'); require base_path('vendor/autoload.php');
// Agrega credenciales // Agrega credenciales
MercadoPago\SDK::setAccessToken(config('services.mercadopago.token')); MercadoPago\SDK::setAccessToken(config('services.mercadopago.token'));
// Crea un objeto de preferencia // Crea un objeto de preferencia
$preference = new MercadoPago\Preference(); $preference = new MercadoPago\Preference();
//$payment_methods = MercadoPago::get("/v1/payment_methods"); //$payment_methods = MercadoPago::get("/v1/payment_methods");
// Crea un ítem en la preferencia // Crea un ítem en la preferencia
$item = new MercadoPago\Item(); $item = new MercadoPago\Item();
@@ -31,7 +25,7 @@
$item->unit_price = $monto; $item->unit_price = $monto;
$preference->external_reference = $referencia; $preference->external_reference = $referencia;
$preference->back_urls = array( $preference->back_urls = array(
"success" => url('/orders/'), "success" => url('/orders/'),
"failure" => url('/orders/'), "failure" => url('/orders/'),
"pending" => url('/orders/') "pending" => url('/orders/')
@@ -39,10 +33,10 @@
$preference->auto_return = "approved"; $preference->auto_return = "approved";
$preference->items = array($item); $preference->items = array($item);
$preference->save(); $preference->save();
@endphp @endphp
<div class="grid grid-cols-1 mb-8"> <div class="grid grid-cols-1 mb-8">
<div class="bg-white w-full sm:w-[26rem] m-auto justify-center rounded-xl shadow-md"> <div class="bg-white w-full sm:w-[26rem] m-auto justify-center rounded-xl shadow-md">
<div class="text-center bg-[#000029] text-white text-lg font-semibold rounded-lg py-2 mb-4"> <div class="text-center bg-[#000029] text-white text-lg font-semibold rounded-lg py-2 mb-4">
@@ -55,14 +49,14 @@
${{number_format($monto)}} ${{number_format($monto)}}
</p> </p>
</div> </div>
<div class="flex justify-center"> <div class="flex justify-center">
<a href="javascript:location.reload()"> <a href="javascript:location.reload()">
<img class="w-28 rounded-full shadow-lg" src="./img/mercadopago.jpg" alt=""> <img class="w-28 rounded-full shadow-lg" src="./img/mercadopago.jpg" alt="">
</a> </a>
</div> </div>
<div class="bg-white px-4 py-3 md:flex justify-center mt-2 mb-4"> <div class="bg-white px-4 py-3 md:flex justify-center mt-2 mb-4">
<a href="javascript:location.reload()"> <a href="javascript:location.reload()">
<button class="inline-flex justify-center w-full rounded-md border border-transparent px-12 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">Continuar</button> <button class="inline-flex justify-center w-full rounded-md border border-transparent px-12 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">Continuar</button>
@@ -70,27 +64,27 @@
</div> </div>
</div> </div>
</div> </div>
<div class="cho-container"> <div class="cho-container">
</div> </div>
<script src="https://sdk.mercadopago.com/js/v2"></script> <script src="https://sdk.mercadopago.com/js/v2"></script>
<script> <script>
const mp = new MercadoPago("{{config('services.mercadopago.key')}}", { const mp = new MercadoPago("{{config('services.mercadopago.key')}}", {
locale: 'es-CO' locale: 'es-CO'
}); });
mp.checkout({ mp.checkout({
preference: { preference: {
id: '{{$preference->id}}' id: '{{$preference->id}}'
}, },
autoOpen: true, // Habilita la apertura automática del Checkout Pro autoOpen: true, // Habilita la apertura automática del Checkout Pro
}); });
</script> </script>
@@ -2,15 +2,7 @@
<div class="flex justify-between my-2 items-center mb-4"> <div class="flex justify-between my-2 items-center mb-4">
<div class="flex items-center md:gap-4"> <div class="flex items-center md:gap-4">
<div class="flex text-sm"> <div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <x-icon-arrow-right/>
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"
fill="#b221fd" data-original="#000000" />
</g>
</svg>
Reportes Reportes
</div> </div>
</div> </div>
@@ -21,7 +13,7 @@
@foreach($roles->usuarios as $usuario) @foreach($roles->usuarios as $usuario)
<option value="{{$usuario->id}}">{{$usuario->name}}</option> <option value="{{$usuario->id}}">{{$usuario->name}}</option>
@endforeach @endforeach
</select> </select>
@endif @endif
@@ -75,14 +67,14 @@
<th class="rounded-l-lg font-normal pl-[1rem] md:pl-[2rem]">Fecha</th> <th class="rounded-l-lg font-normal pl-[1rem] md:pl-[2rem]">Fecha</th>
<th class="font-normal sm:pl-[2rem] hidden sm:table-cell">Valor</th> <th class="font-normal sm:pl-[2rem] hidden sm:table-cell">Valor</th>
<th class="font-normal sm:pl-[2rem] hidden sm:table-cell">Estado</th> <th class="font-normal sm:pl-[2rem] hidden sm:table-cell">Estado</th>
<th class="rounded-r-lg font-normal pr-[1rem] pl-[1rem] sm:pr-[2rem] sm:pl-[2rem] ">Detalle</th> <th class="rounded-r-lg font-normal pr-[1rem] pl-[1rem] sm:pr-[2rem] sm:pl-[2rem] ">Detalle</th>
</tr> </tr>
</thead> </thead>
<tbody class="text-gray-500 select-none pr-4 sm:pr-2"> <tbody class="text-gray-500 select-none pr-4 sm:pr-2">
@foreach ($historiales as $historial) @foreach ($historiales as $historial)
<tr class="border-gray-200 text-left w-full sm:pl-4 " x-data="{openOption:false}"> <tr class="border-gray-200 text-left w-full sm:pl-4 " x-data="{openOption:false}">
<td class="sm:pl-[2rem] hidden sm:table-cell"> <td class="sm:pl-[2rem] hidden sm:table-cell">
{{$historial->fecha_inicio}} {{$historial->fecha_inicio}}
</td> </td>
+8 -16
View File
@@ -14,15 +14,7 @@ editar : @entangle('editar'),
<div class="grid grid-cols-1 sm:flex justify-between my-2 items-center"> <div class="grid grid-cols-1 sm:flex justify-between my-2 items-center">
<div class="grid grid-cols-1 sm:flex items-center gap-3 md:gap-8"> <div class="grid grid-cols-1 sm:flex items-center gap-3 md:gap-8">
<div class="flex text-sm"> <div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <x-icon-arrow-right/>
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"
fill="#b221fd" data-original="#000000" />
</g>
</svg>
Roles Roles
</div> </div>
<a x-on:click="add = !add" <a x-on:click="add = !add"
@@ -36,7 +28,7 @@ editar : @entangle('editar'),
fill="#ffffff" /> fill="#ffffff" />
</svg> </svg>
</a> </a>
</div> </div>
</div> </div>
@@ -67,7 +59,7 @@ editar : @entangle('editar'),
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" /> 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> </svg>
</button> </button>
<div x-cloak x-show="openOption" @click.away="openOption = false" <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"> class="sm:absolute bg-white text-center w-[8rem] rounded-[1rem] border-b border-gray-200 shadow-lg">
<button x-on:click="openOption=false" wire:click="editar({{$rol->id}})" <button x-on:click="openOption=false" wire:click="editar({{$rol->id}})"
@@ -80,14 +72,14 @@ editar : @entangle('editar'),
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
{{-- Añadir rol --}} {{-- Añadir rol --}}
<div x-cloak x-show="add" x-transition:enter="transition duration-350" <div x-cloak x-show="add" x-transition:enter="transition duration-350"
x-transition:enter-start="opacity-0 scale-100" x-transition:enter-end="opacity-100 scale-100" x-transition:enter-start="opacity-0 scale-100" x-transition:enter-end="opacity-100 scale-100"
x-transition:leave="transition duration-350" x-transition:leave-start="opacity-100 scale-100" x-transition:leave="transition duration-350" x-transition:leave-start="opacity-100 scale-100"
x-transition:leave-end="opacity-0 scale-100" x-transition:leave-end="opacity-0 scale-100"
@@ -148,7 +140,7 @@ editar : @entangle('editar'),
</div> </div>
</form> </form>
</div> </div>
</div> </div>
@@ -53,15 +53,7 @@
<div class="flex justify-between my-2 items-center"> <div class="flex justify-between my-2 items-center">
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<div class="flex text-sm"> <div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <x-icon-arrow-right/>
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"
fill="#b221fd" data-original="#000000" />
</g>
</svg>
Planes Planes
</div> </div>
<a x-on:click="serviciosModal = true" <a x-on:click="serviciosModal = true"
@@ -29,15 +29,7 @@
<div x-cloak x-show="vista" class="bg-[#f5f5f5] md:w-[100%] m-auto p-2 md:p-5 rounded-[1.2rem] relative mb-4"> <div x-cloak x-show="vista" class="bg-[#f5f5f5] md:w-[100%] m-auto p-2 md:p-5 rounded-[1.2rem] relative mb-4">
<div class="flex justify-start my-2 items-center"> <div class="flex justify-start my-2 items-center">
<div class="flex text-sm"> <div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <x-icon-arrow-right/>
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"
fill="#b221fd" data-original="#000000" />
</g>
</svg>
Servicios Servicios
</div> </div>
</div> </div>
+1 -7
View File
@@ -3,13 +3,7 @@
<div class="flex justify-start my-2 items-center mb-4"> <div class="flex justify-start my-2 items-center mb-4">
<div class="flex text-sm"> <div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <x-icon-arrow-right/>
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>
Distribuidores Distribuidores
</div> </div>
</div> </div>
+107 -46
View File
@@ -20,57 +20,118 @@
</div> </div>
<div class="bg-[#f5f5f5] md:w-full m-auto p-2 md:p-5 rounded-lg relative mb-4"> <div class="bg-[#f5f5f5] md:w-full m-auto p-2 md:p-5 rounded-lg relative mb-4">
<div class="grid grid-cols-1 sm:flex justify-between my-2 items-center"> <div class="md:flex justify-center my-2 items-center text-center">
<div class="grid grid-cols-1 sm:flex items-center gap-3 md:gap-8"> <div class="flex text-sm">
<div class="flex text-sm"> <x-icon-arrow-right/>
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" Usuario
xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" x="0" y="0" viewBox="0 0 24 24" </div>
style="enable-background:new 0 0 512 512" xml:space="preserve"> <div class="flex gap-4">
<g> @if (auth()->user()->rol->nombre !== 'administrador' && auth()->user()->rol->nombre !== 'editor')
<path <a x-on:click="add = !add" class="justify-center flex px-4 py-2 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8] mb-3 md:mb-0">Añadir
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" usuario
fill="#b221fd" data-original="#000000" /> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve" class="w-[0.87rem] ml-2">
</g> <path d="M480,224H288V32c0-17.673-14.327-32-32-32s-32,14.327-32,32v192H32c-17.673,0-32,14.327-32,32s14.327,32,32,32h192v192 c0,17.673,14.327,32,32,32s32-14.327,32-32V288h192c17.673,0,32-14.327,32-32S497.673,224,480,224z" fill="#ffffff" />
</svg> </svg>
Usuario </a>
</div> <a x-on:click="modTarifas = true"
@if (auth()->user()->rol->nombre !== 'administrador' && auth()->user()->rol->nombre !== 'editor') class="justify-center flex px-4 py-2 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]">Mod.
<a x-on:click="add = !add" tarifas promos.
class="justify-center flex px-4 py-2 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8] mb-3 md:mb-0">Añadir <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
usuario xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" class="w-4 ml-2" x="0" y="0"
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve">
version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 512 512" <polygon points="14.604 5.687 0 20.29 0 24 3.71 24 18.313 9.396 14.604 5.687" fill="#ffffff"
style="enable-background:new 0 0 512 512;" xml:space="preserve" class="w-[0.87rem] ml-2"> data-original="#000000" />
<path <path
d="M480,224H288V32c0-17.673-14.327-32-32-32s-32,14.327-32,32v192H32c-17.673,0-32,14.327-32,32s14.327,32,32,32h192v192 c0,17.673,14.327,32,32,32s32-14.327,32-32V288h192c17.673,0,32-14.327,32-32S497.673,224,480,224z" d="M23.232.768a2.624,2.624,0,0,0-3.71,0l-3.5,3.505,3.709,3.709,3.5-3.5A2.624,2.624,0,0,0,23.232.768Z"
fill="#ffffff" /> fill="#ffffff" data-original="#000000" />
</svg> </svg>
</a> </a>
<a x-on:click="modTarifas = true" @endif
class="justify-center flex px-4 py-2 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]">Mod. </div>
tarifas promos.
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <div class="flex relative text-sm mx-auto w-64 md:w-auto my-2">
xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" class="w-4 ml-2" x="0" y="0" <input id="buscar" type="search" wire:model="buscar" placeholder="Buscar" class=" shadow-sm border-2 active:border-neutral-200 focus:ring-0 border-neutral-200 w-64 md:w-auto rounded-md pr-7 py-1 m-auto focus:border-neutral-300 focus:outline-none focus:shadow-outline">
viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve"> <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="">
<polygon points="14.604 5.687 0 20.29 0 24 3.71 24 18.313 9.396 14.604 5.687" fill="#ffffff" <g id="Layer_31" data-name="Layer 31">
data-original="#000000" /> <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>
<path </g>
d="M23.232.768a2.624,2.624,0,0,0-3.71,0l-3.5,3.505,3.709,3.709,3.5-3.5A2.624,2.624,0,0,0,23.232.768Z" </svg>
fill="#ffffff" data-original="#000000" />
</svg>
</a>
@endif
</div> </div>
</div> </div>
{{-- Buscar --}}
<div class="flex relative"> <x-ver-entrada />
<input id="buscar" type="search" wire:model="buscar" placeholder="Buscar"
class="w-full md:w-auto shadow-md border-2 active:border-neutral-200 focus:ring-0 border-neutral-200 rounded-[0.8rem] px-4 py-1 m-auto focus:border-neutral-300 focus:outline-none focus:shadow-outline">
</div>
{{-- -Tabla usuarios - --}} {{-- -Tabla usuarios - --}}
<div class="py-2"> <x-primary-table>
<x-slot name="thead">
<tr class="text-left">
<th class="rounded-l-lg font-normal">Nombre</th>
<th class="font-normal">Email</th>
<th class="font-normal">Rol</th>
<th class="font-normal">Ventas</th>
<th class="font-normal">Saldo</th>
<th class="font-normal"></th>
<th class="rounded-r-lg font-normal"></th>
</tr>
</x-slot>
<x-slot name="tbody">
@foreach ($usuarios as $usuario)
<tr class="border-gray-200 text-left" x-data="{ openOption: false }">
<td>{{$usuario->name ?? '' }}</td>
<td>{{$usuario->email ?? '' }}</td>
<td>{{$usuario->rol->nombre ?? '' }}</td>
<td>{{$usuario->historiales_venta_count ?? '' }}</td>
<td>{{$usuario->saldo->valor ?? '' }}</td>
<td>
<button wire:click="saldo({{ $usuario->id }})" class="justify-center text-sm flex px-2 py-1 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8] mb-0 md:mb-0">Recargar</button>
</td>
<td>
<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 right-10">
<button x-on:click="openOption=false" wire:click="editar({{ $usuario->id }})"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 hover:rounded-t-[1rem]">Editar</button>
<button x-on:click="openOption=!openOption"
wire:click="editarPassword({{ $usuario->id }})"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">Editar
password</button>
<button x-on:click="openOption=false" wire:click="saldo({{ $usuario->id }})"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">Agregar
saldo</button>
<button x-on:click="openOption=false"
wire:click="saldodesc({{ $usuario->id }})"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">Descontar
saldo</button>
<button x-on:click="openOption=false,gestion=true"
wire:click="gestionar({{ $usuario->id }},'{{ $usuario->rol_id }}','{{ $usuario->name }}')"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">Precio
servicio</button>
<button x-on:click="openOption=false,gestionPromo=true"
wire:click="gestionarPromociones({{ $usuario->id }},'{{ $usuario->name }}')"
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">Precio
promocion</button>
<button x-on:click="openOption=false"
wire:click="eliminar({{ $usuario->id }})"
class="text-white w-full py-1 bg-red-400 rounded-b-[1rem] hover:bg-red-600 hover:rounded-b-[1rem]">Eliminar</button>
</div>
</td>
</tr>
@endforeach
</x-slot>
<x-slot name="tlink">
{{ $usuarios->links() }}
</x-slot>
</x-primary-table>
{{-- <div class="py-2">
<table class="text-center rounded-lg shadow-lg m-auto mt-4 mb-4 bg-white md:w-10/12"> <table class="text-center rounded-lg shadow-lg m-auto mt-4 mb-4 bg-white md:w-10/12">
<thead class="font-normal bg-[#000029] text-white h-9"> <thead class="font-normal bg-[#000029] text-white h-9">
<tr class="text-left"> <tr class="text-left">
@@ -145,7 +206,7 @@
</tbody> </tbody>
</table> </table>
{{ $usuarios->links() }} {{ $usuarios->links() }}
</div> </div> --}}
{{-- Gestionar precios --}} {{-- Gestionar precios --}}
<div x-cloak x-show="gestion" x-transition:enter="transition duration-350" <div x-cloak x-show="gestion" x-transition:enter="transition duration-350"
@@ -2,13 +2,7 @@
<div class="bg-[#f5f5f5] md:w-[100%] m-auto p-2 md:p-5 rounded-[1.2rem] relative mb-2"> <div class="bg-[#f5f5f5] md:w-[100%] m-auto p-2 md:p-5 rounded-[1.2rem] relative mb-2">
<div class="flex justify-start my-2 items-center mb-4 gap-8"> <div class="flex justify-start my-2 items-center mb-4 gap-8">
<div class="flex text-sm"> <div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <x-icon-arrow-right/>
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>
Utilidades Utilidades
</div> </div>
+23 -29
View File
@@ -1,17 +1,11 @@
<div> <div>
<div class="bg-[#f5f5f5] mt-5 w-[90%] m-auto p-5 rounded-[1.2rem] border-b border-gray-200 shadow-md mb-4 relative"> <div class="bg-[#f5f5f5] mt-5 w-[90%] m-auto p-5 rounded-[1.2rem] border-b border-gray-200 shadow-md mb-4 relative">
<div class="flex justify-start my-2 items-center mb-4"> <div class="flex justify-start my-2 items-center mb-4">
<div class="flex text-sm"> <div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <x-icon-arrow-right/>
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>
Saldo Saldo
</div> </div>
</div> </div>
@@ -20,11 +14,11 @@
require base_path('vendor/autoload.php'); require base_path('vendor/autoload.php');
// Agrega credenciales // Agrega credenciales
MercadoPago\SDK::setAccessToken(config('services.mercadopago.token')); MercadoPago\SDK::setAccessToken(config('services.mercadopago.token'));
// Crea un objeto de preferencia // Crea un objeto de preferencia
$preference = new MercadoPago\Preference(); $preference = new MercadoPago\Preference();
//$payment_methods = MercadoPago::get("/v1/payment_methods"); //$payment_methods = MercadoPago::get("/v1/payment_methods");
// Crea un ítem en la preferencia // Crea un ítem en la preferencia
$item = new MercadoPago\Item(); $item = new MercadoPago\Item();
@@ -33,7 +27,7 @@
$item->quantity = 1; $item->quantity = 1;
$item->unit_price = $monto; $item->unit_price = $monto;
$preference->back_urls = array( $preference->back_urls = array(
"success" => url('/compras/'), "success" => url('/compras/'),
"failure" => url('/compras/error'), "failure" => url('/compras/error'),
"pending" => url('/compras/pendiente') "pending" => url('/compras/pendiente')
@@ -41,10 +35,10 @@
$preference->auto_return = "approved"; $preference->auto_return = "approved";
$preference->items = array($item); $preference->items = array($item);
$preference->save(); $preference->save();
@endphp @endphp
<div class="grid grid-cols-1 mb-8"> <div class="grid grid-cols-1 mb-8">
<div class="bg-white w-full sm:w-[26rem] m-auto justify-center rounded-xl shadow-md"> <div class="bg-white w-full sm:w-[26rem] m-auto justify-center rounded-xl shadow-md">
<div class="text-center bg-[#000029] text-white text-lg font-semibold rounded-lg py-2 mb-4"> <div class="text-center bg-[#000029] text-white text-lg font-semibold rounded-lg py-2 mb-4">
@@ -57,14 +51,14 @@
${{number_format($monto)}} ${{number_format($monto)}}
</p> </p>
</div> </div>
<div class="flex justify-center"> <div class="flex justify-center">
<a href="javascript:location.reload()"> <a href="javascript:location.reload()">
<img class="w-28 rounded-full shadow-lg" src="./img/mercadopago.jpg" alt=""> <img class="w-28 rounded-full shadow-lg" src="./img/mercadopago.jpg" alt="">
</a> </a>
</div> </div>
<div class="bg-white px-4 py-3 md:flex justify-center mt-2 mb-4"> <div class="bg-white px-4 py-3 md:flex justify-center mt-2 mb-4">
<a href="javascript:location.reload()"> <a href="javascript:location.reload()">
<button class="inline-flex justify-center w-full rounded-md border border-transparent px-12 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">Continuar</button> <button class="inline-flex justify-center w-full rounded-md border border-transparent px-12 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">Continuar</button>
@@ -72,27 +66,27 @@
</div> </div>
</div> </div>
</div> </div>
<div class="cho-container"> <div class="cho-container">
</div> </div>
<script src="https://sdk.mercadopago.com/js/v2"></script> <script src="https://sdk.mercadopago.com/js/v2"></script>
<script> <script>
const mp = new MercadoPago("{{config('services.mercadopago.key')}}", { const mp = new MercadoPago("{{config('services.mercadopago.key')}}", {
locale: 'es-CO' locale: 'es-CO'
}); });
mp.checkout({ mp.checkout({
preference: { preference: {
id: '{{$preference->id}}' id: '{{$preference->id}}'
}, },
autoOpen: true, // Habilita la apertura automática del Checkout Pro autoOpen: true, // Habilita la apertura automática del Checkout Pro
}); });
</script> </script>