menu visible
This commit is contained in:
@@ -10,11 +10,8 @@ use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Livewire\Component;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Crypt;
|
||||
use App\Models\Configuracione;
|
||||
use Livewire\WithPagination;
|
||||
use Twilio\Rest\Client;
|
||||
use Jantinnerezo\LivewireAlert\LivewireAlert;
|
||||
|
||||
|
||||
@@ -205,7 +202,7 @@ class ShowClientes extends Component
|
||||
|
||||
// $client = new Client($account_sid, $auth_token);
|
||||
|
||||
// $client->messages->create($recipients,
|
||||
// $client->messages->create($recipients,
|
||||
// ['from' => $twilio_number, 'body' => $message] );
|
||||
|
||||
// $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 |
@@ -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 class="flex justify-start my-2 items-center">
|
||||
<div class="flex text-sm">
|
||||
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve"><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
|
||||
</div>
|
||||
</div>
|
||||
@@ -38,10 +38,10 @@
|
||||
<p class="text-xs text-left">
|
||||
{{$tarifa->dias}} Dias
|
||||
</p>
|
||||
|
||||
|
||||
<p class="text-left">
|
||||
${{number_format($tarifa->valor)}}
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<span>
|
||||
@@ -50,7 +50,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
@endif
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@@ -73,7 +73,7 @@
|
||||
</div>
|
||||
|
||||
{{-- Modal agregar servicios --}}
|
||||
<div x-cloak x-show="tarjetaPlan"
|
||||
<div x-cloak x-show="tarjetaPlan"
|
||||
x-transition:enter="transition duration-350"
|
||||
x-transition:enter-start="opacity-0 scale-100"
|
||||
x-transition:enter-end="opacity-100 scale-100"
|
||||
@@ -100,13 +100,13 @@
|
||||
<div class="px-4 py-4">
|
||||
<div class="mb-4">
|
||||
<p>
|
||||
Información del cliente:
|
||||
Información del cliente:
|
||||
</p>
|
||||
<p class="text-xs text-gray-400">
|
||||
Ingrese los datos del cliente final.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex justify-between text-left gap-2">
|
||||
<div class="mb-4">
|
||||
<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">
|
||||
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 class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly gap-5 mt-4">
|
||||
|
||||
|
||||
<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>
|
||||
</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>
|
||||
</span>
|
||||
|
||||
@@ -22,18 +22,10 @@
|
||||
<div class="flex justify-between my-2 items-center mb-8 scroll">
|
||||
<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">
|
||||
<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/>
|
||||
Promociones
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class=" gap-2 hidden sm:flex">
|
||||
<select name="categoria_id" id="categoria_id" wire:model.debounce.500ms="categoria_id"
|
||||
@@ -74,14 +66,14 @@
|
||||
<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">
|
||||
</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">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@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">
|
||||
{{-- 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>
|
||||
|
||||
<div class="text-left">
|
||||
@@ -118,7 +110,7 @@
|
||||
</div>
|
||||
<div class="text-sm text-gray-500">
|
||||
<p>{{$descripcionPromo}}</p>
|
||||
</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">
|
||||
@@ -160,7 +152,7 @@
|
||||
<div class="px-4 py-4">
|
||||
<div class="mb-4">
|
||||
<p>
|
||||
Información del cliente:
|
||||
Información del cliente:
|
||||
</p>
|
||||
<p class="text-xs text-gray-400">
|
||||
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">
|
||||
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 class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly gap-5 mt-4">
|
||||
<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>
|
||||
@@ -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>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Modal credenciales --}}
|
||||
<div x-cloak x-show="credenciales"
|
||||
<div x-cloak x-show="credenciales"
|
||||
x-transition:enter="transition duration-350"
|
||||
x-transition:enter-start="opacity-0 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">
|
||||
<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="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);
|
||||
background: linear-gradient(0deg, rgba(0,0,0,1) 0%, , rgba(20,20,20,1) 100%);">
|
||||
<p class="font-bold text-lg mb-2">
|
||||
@@ -278,12 +270,12 @@
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="hidden" id="{{$n}}">{{ $cuenta->servicio->nombre }} - email: {{ $cuenta->correo }} - Pass: {{ $cuenta->password }}</p>
|
||||
</div>
|
||||
|
||||
|
||||
@endforeach
|
||||
|
||||
|
||||
<h1 class="flex mt-4 gap-1">
|
||||
Este servicio vencerá el <p class="font-semibold text-gray-600">
|
||||
{{ $cuentas->fecha_final ?? '' }}.</p>
|
||||
@@ -291,17 +283,17 @@
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
</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">
|
||||
|
||||
|
||||
<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>
|
||||
</span>
|
||||
@@ -323,5 +315,5 @@ function copiarAlPortapapeles(id_elemento) {
|
||||
document.body.removeChild(aux);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<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"><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
|
||||
</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>
|
||||
@@ -24,7 +24,7 @@
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mt-2">
|
||||
@@ -50,7 +50,7 @@
|
||||
{{$categoria->nombre}}
|
||||
</td>
|
||||
<td class="sm:pl-[2rem] text-ellipsis">
|
||||
{{$categoria->descripcion}}
|
||||
{{$categoria->descripcion}}
|
||||
</td>
|
||||
<td class="md:pl-[2rem] md:pr-[2rem]">
|
||||
<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" />
|
||||
</svg>
|
||||
</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">
|
||||
<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>
|
||||
@@ -73,7 +73,7 @@
|
||||
</div>
|
||||
|
||||
{{-- Modal agregar categoria --}}
|
||||
<div x-cloak x-show="nuevaCategoria"
|
||||
<div x-cloak x-show="nuevaCategoria"
|
||||
x-transition:enter="transition duration-350"
|
||||
x-transition:enter-start="opacity-0 scale-100"
|
||||
x-transition:enter-end="opacity-100 scale-100"
|
||||
@@ -97,13 +97,13 @@
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mb-4">
|
||||
<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">
|
||||
@error('nombre') <span class="text-red-400 text-sm ">Requerido*</span> @enderror
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mb-4">
|
||||
<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>
|
||||
@@ -123,7 +123,7 @@
|
||||
</div>
|
||||
|
||||
{{-- Modal editar categoria --}}
|
||||
<div x-cloak x-show="editarCategoria"
|
||||
<div x-cloak x-show="editarCategoria"
|
||||
x-transition:enter="transition duration-350"
|
||||
x-transition:enter-start="opacity-0 scale-100"
|
||||
x-transition:enter-end="opacity-100 scale-100"
|
||||
@@ -147,13 +147,13 @@
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mb-4">
|
||||
<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">
|
||||
@error('nombre') <span class="text-red-400 text-sm ">Requerido*</span> @enderror
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mb-4">
|
||||
<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>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<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
|
||||
wire:target="verCliente,enviarNotificacion,renovar">
|
||||
<div class="grid h-full place-items-center">
|
||||
@@ -11,19 +10,10 @@
|
||||
</div>
|
||||
|
||||
{{-- Buscador --}}
|
||||
<div
|
||||
class="bg-[#f5f5f5] m-auto p-2 md:p-5 w-auto x-auto grid grid-cols-1 lg:grid-cols-1text-center rounded-xl py-4 px-2 ms:px-8 xl:mx-10 mb-8 ">
|
||||
<div class="bg-[#f5f5f5] m-auto p-2 md:p-5 w-auto x-auto grid grid-cols-1 lg:grid-cols-1text-center rounded-xl py-4 px-2 ms:px-8 xl:mx-10 mb-8 ">
|
||||
<div class="md:flex justify-center my-2 items-center text-center ">
|
||||
<div class="flex text-sm">
|
||||
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" x="0" y="0" viewBox="0 0 24 24"
|
||||
style="enable-background:new 0 0 512 512" xml:space="preserve">
|
||||
<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/>
|
||||
Clientes
|
||||
</div>
|
||||
<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 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">
|
||||
<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/>
|
||||
Configuracion
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
|
||||
<div class="md:flex justify-center my-2 items-center text-center ">
|
||||
<div class="flex text-sm">
|
||||
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve">
|
||||
<path d="M15.4,9.88,10.81,5.29a1,1,0,0,0-1.41,0,1,1,0,0,0,0,1.42L14,11.29a1,1,0,0,1,0,1.42L9.4,17.29a1,1,0,0,0,1.41,1.42l4.59-4.59A3,3,0,0,0,15.4,9.88Z" fill="#b221fd" data-original="#000000" />
|
||||
</svg>
|
||||
<x-icon-arrow-right/>
|
||||
Log general
|
||||
</div>
|
||||
<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 ">
|
||||
<div class="md:flex justify-center my-2 items-center text-center">
|
||||
<div class="flex text-sm">
|
||||
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" x="0" y="0" viewBox="0 0 24 24"
|
||||
style="enable-background:new 0 0 512 512" xml:space="preserve">
|
||||
<path
|
||||
d="M15.4,9.88,10.81,5.29a1,1,0,0,0-1.41,0,1,1,0,0,0,0,1.42L14,11.29a1,1,0,0,1,0,1.42L9.4,17.29a1,1,0,0,0,1.41,1.42l4.59-4.59A3,3,0,0,0,15.4,9.88Z"
|
||||
fill="#b221fd" data-original="#000000" />
|
||||
</svg>
|
||||
<x-icon-arrow-right/>
|
||||
Log historial
|
||||
</div>
|
||||
<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 sm: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">
|
||||
<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/>
|
||||
Planes
|
||||
</div>
|
||||
|
||||
|
||||
@@ -24,15 +24,7 @@
|
||||
<div class="flex justify-between my-2 items-center mb-8 scroll">
|
||||
<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">
|
||||
<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/>
|
||||
Promociones
|
||||
</div>
|
||||
@if (auth()->user()->rol->nombre == 'super' || auth()->user()->rol->nombre == 'administrador')
|
||||
|
||||
@@ -1,82 +1,78 @@
|
||||
<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 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="grid h-full place-items-center ">
|
||||
<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>
|
||||
</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="flex justify-start my-2 items-center mb-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">
|
||||
<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
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-start my-2 items-center mb-4">
|
||||
<div class="flex text-sm">
|
||||
<x-icon-arrow-right />
|
||||
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="text-center bg-[#000029] text-white text-lg font-semibold rounded-lg py-2 mb-4">
|
||||
Recargar saldo
|
||||
</div>
|
||||
<form action="/recargas" method="post" class="text-center">
|
||||
@csrf
|
||||
<div class="flex justify-center mb-4">
|
||||
<div class="text-center bg-[#000029] text-white text-lg font-semibold rounded-lg py-2 mb-4">
|
||||
Recargar saldo
|
||||
</div>
|
||||
<form action="/recargas" method="post" class="text-center">
|
||||
@csrf
|
||||
<div class="flex justify-center mb-4">
|
||||
Saldo actual: <p class="font-semibold"> ${{ number_format($user->saldo->valor) }}</p>
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
Monto a recargar
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
<div>
|
||||
<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)
|
||||
<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}}
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@if ($valor_recarga)
|
||||
<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 }}
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@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>
|
||||
</div>
|
||||
|
||||
<div class="bg-white px-4 py-3 md:flex justify-center mt-4 mb-4">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="bg-white px-4 py-3 md:flex justify-center mt-4 mb-4">
|
||||
<span>
|
||||
<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>
|
||||
<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>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<!--div class="w-full text-center my-4">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<!--div class="w-full text-center my-4">
|
||||
<p class="font-semibold">ó</p>
|
||||
<p class="mx-auto">Pagar con : </p>
|
||||
|
||||
<a href="{{url('wompi/'.((float)$valor_recarga+(float)$monto))}}" target="_blank" >
|
||||
<p class="mx-auto">Pagar con : </p>
|
||||
|
||||
<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">
|
||||
</a>
|
||||
|
||||
@if($cobrar)
|
||||
<p class="text-sm text-green-600 ">Se sumara $500 COP adicional al pago en Wompi por costos de sistema.</p>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($cobrar)
|
||||
<p class="text-sm text-green-600 ">Se sumara $500 COP adicional al pago en Wompi por costos de sistema.</p>
|
||||
@endif
|
||||
|
||||
|
||||
</div-->
|
||||
|
||||
<!--div class="w-full text-center my-4">
|
||||
<!--div class="w-full text-center my-4">
|
||||
<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">
|
||||
</div-->
|
||||
@@ -84,51 +80,50 @@
|
||||
</div>
|
||||
|
||||
<div class="overflow-y-auto">
|
||||
<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">
|
||||
<thead class="font-normal bg-[#000029] text-white h-9">
|
||||
<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">
|
||||
<thead class="font-normal bg-[#000029] text-white h-9">
|
||||
<tr class="text-left">
|
||||
<th class="rounded-l-lg font-normal pl-[2rem]">Fecha</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-l-lg font-normal pl-[2rem]">Fecha</th>
|
||||
<th class="font-normal pl-[2rem]">Valor</th>
|
||||
<th class="rounded-r-lg font-normal pl-[2rem] pr-[2rem]">Estado</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@php
|
||||
</thead>
|
||||
@php
|
||||
$i = 0;
|
||||
@endphp
|
||||
<tbody class="text-gray-500 select-none">
|
||||
@endphp
|
||||
<tbody class="text-gray-500 select-none">
|
||||
@foreach ($historial_recargas as $historial_recarga)
|
||||
<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]">${{ number_format($historial_recarga->monto) }}</td>
|
||||
<td class="pl-[2rem] pr-[2rem]">{{$historial_recarga->status}}</td>
|
||||
</tr>
|
||||
<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]">${{ number_format($historial_recarga->monto) }}</td>
|
||||
<td class="pl-[2rem] pr-[2rem]">{{ $historial_recarga->status }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{--Modal nequi ---}}
|
||||
<div x-cloak x-show="nequi"
|
||||
x-transition:enter="transition duration-350"
|
||||
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-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="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">
|
||||
|
||||
|
||||
|
||||
{{-- Modal nequi - --}}
|
||||
<div x-cloak x-show="nequi" x-transition:enter="transition duration-350"
|
||||
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-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="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>
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
<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="flex justify-start my-2 items-center mb-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">
|
||||
<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>
|
||||
<x-icon-arrow-right/>
|
||||
Saldo
|
||||
</div>
|
||||
</div>
|
||||
@@ -18,11 +12,11 @@
|
||||
require base_path('vendor/autoload.php');
|
||||
// Agrega credenciales
|
||||
MercadoPago\SDK::setAccessToken(config('services.mercadopago.token'));
|
||||
|
||||
|
||||
|
||||
|
||||
// Crea un objeto de preferencia
|
||||
$preference = new MercadoPago\Preference();
|
||||
|
||||
|
||||
//$payment_methods = MercadoPago::get("/v1/payment_methods");
|
||||
// Crea un ítem en la preferencia
|
||||
$item = new MercadoPago\Item();
|
||||
@@ -31,7 +25,7 @@
|
||||
$item->unit_price = $monto;
|
||||
$preference->external_reference = $referencia;
|
||||
$preference->back_urls = array(
|
||||
|
||||
|
||||
"success" => url('/orders/'),
|
||||
"failure" => url('/orders/'),
|
||||
"pending" => url('/orders/')
|
||||
@@ -39,10 +33,10 @@
|
||||
$preference->auto_return = "approved";
|
||||
$preference->items = array($item);
|
||||
$preference->save();
|
||||
|
||||
|
||||
|
||||
|
||||
@endphp
|
||||
|
||||
|
||||
<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="text-center bg-[#000029] text-white text-lg font-semibold rounded-lg py-2 mb-4">
|
||||
@@ -55,14 +49,14 @@
|
||||
${{number_format($monto)}}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex justify-center">
|
||||
<a href="javascript:location.reload()">
|
||||
<img class="w-28 rounded-full shadow-lg" src="./img/mercadopago.jpg" alt="">
|
||||
|
||||
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bg-white px-4 py-3 md:flex justify-center mt-2 mb-4">
|
||||
<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>
|
||||
@@ -70,27 +64,27 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="cho-container">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://sdk.mercadopago.com/js/v2"></script>
|
||||
|
||||
|
||||
<script>
|
||||
const mp = new MercadoPago("{{config('services.mercadopago.key')}}", {
|
||||
locale: 'es-CO'
|
||||
});
|
||||
|
||||
|
||||
mp.checkout({
|
||||
preference: {
|
||||
id: '{{$preference->id}}'
|
||||
},
|
||||
|
||||
|
||||
autoOpen: true, // Habilita la apertura automática del Checkout Pro
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -2,15 +2,7 @@
|
||||
<div class="flex justify-between my-2 items-center mb-4">
|
||||
<div class="flex items-center md: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">
|
||||
<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/>
|
||||
Reportes
|
||||
</div>
|
||||
</div>
|
||||
@@ -21,7 +13,7 @@
|
||||
@foreach($roles->usuarios as $usuario)
|
||||
<option value="{{$usuario->id}}">{{$usuario->name}}</option>
|
||||
@endforeach
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
@endif
|
||||
@@ -75,14 +67,14 @@
|
||||
<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">Estado</th>
|
||||
|
||||
|
||||
<th class="rounded-r-lg font-normal pr-[1rem] pl-[1rem] sm:pr-[2rem] sm:pl-[2rem] ">Detalle</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-gray-500 select-none pr-4 sm:pr-2">
|
||||
@foreach ($historiales as $historial)
|
||||
<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">
|
||||
{{$historial->fecha_inicio}}
|
||||
</td>
|
||||
|
||||
@@ -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 items-center gap-3 md:gap-8">
|
||||
<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/>
|
||||
Roles
|
||||
</div>
|
||||
<a x-on:click="add = !add"
|
||||
@@ -36,7 +28,7 @@ editar : @entangle('editar'),
|
||||
fill="#ffffff" />
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
|
||||
</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" />
|
||||
</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" wire:click="editar({{$rol->id}})"
|
||||
@@ -80,14 +72,14 @@ editar : @entangle('editar'),
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{{-- 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:leave="transition duration-350" x-transition:leave-start="opacity-100 scale-100"
|
||||
x-transition:leave-end="opacity-0 scale-100"
|
||||
@@ -148,7 +140,7 @@ editar : @entangle('editar'),
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -53,15 +53,7 @@
|
||||
<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">
|
||||
<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/>
|
||||
Planes
|
||||
</div>
|
||||
<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 class="flex justify-start my-2 items-center">
|
||||
<div class="flex text-sm">
|
||||
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" x="0" y="0"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve">
|
||||
<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
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,13 +3,7 @@
|
||||
|
||||
<div class="flex justify-start my-2 items-center mb-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">
|
||||
<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>
|
||||
<x-icon-arrow-right/>
|
||||
Distribuidores
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,57 +20,118 @@
|
||||
</div>
|
||||
|
||||
<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="grid grid-cols-1 sm:flex items-center gap-3 md:gap-8">
|
||||
<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>
|
||||
<div class="md:flex justify-center my-2 items-center text-center">
|
||||
<div class="flex text-sm">
|
||||
<x-icon-arrow-right/>
|
||||
Usuario
|
||||
</div>
|
||||
<div class="flex gap-4">
|
||||
@if (auth()->user()->rol->nombre !== 'administrador' && auth()->user()->rol->nombre !== 'editor')
|
||||
<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
|
||||
usuario
|
||||
<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">
|
||||
<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>
|
||||
Usuario
|
||||
</div>
|
||||
@if (auth()->user()->rol->nombre !== 'administrador' && auth()->user()->rol->nombre !== 'editor')
|
||||
<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
|
||||
usuario
|
||||
<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">
|
||||
<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>
|
||||
</a>
|
||||
<a x-on:click="modTarifas = true"
|
||||
class="justify-center flex px-4 py-2 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]">Mod.
|
||||
tarifas promos.
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" class="w-4 ml-2" x="0" y="0"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve">
|
||||
<polygon points="14.604 5.687 0 20.29 0 24 3.71 24 18.313 9.396 14.604 5.687" fill="#ffffff"
|
||||
data-original="#000000" />
|
||||
<path
|
||||
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" data-original="#000000" />
|
||||
</svg>
|
||||
</a>
|
||||
@endif
|
||||
</a>
|
||||
<a x-on:click="modTarifas = true"
|
||||
class="justify-center flex px-4 py-2 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]">Mod.
|
||||
tarifas promos.
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" class="w-4 ml-2" x="0" y="0"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve">
|
||||
<polygon points="14.604 5.687 0 20.29 0 24 3.71 24 18.313 9.396 14.604 5.687" fill="#ffffff"
|
||||
data-original="#000000" />
|
||||
<path
|
||||
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" data-original="#000000" />
|
||||
</svg>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="flex relative text-sm mx-auto w-64 md:w-auto my-2">
|
||||
<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">
|
||||
<svg class="w-5 absolute top-2 right-3" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" class="w-4 absolute" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512;rotate: 90deg;" xml:space="preserve" class="">
|
||||
<g id="Layer_31" data-name="Layer 31">
|
||||
<path d="m21.71 20.29-5.4-5.39a7.92 7.92 0 0 0 1.69-4.9 8 8 0 1 0 -8 8 7.92 7.92 0 0 0 4.9-1.69l5.39 5.4a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42zm-17.71-10.29a6 6 0 1 1 6 6 6 6 0 0 1 -6-6z" fill="#b221fd" data-original="#000000" class=""></path>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Buscar --}}
|
||||
<div class="flex relative">
|
||||
<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>
|
||||
|
||||
<x-ver-entrada />
|
||||
|
||||
{{-- -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">
|
||||
<thead class="font-normal bg-[#000029] text-white h-9">
|
||||
<tr class="text-left">
|
||||
@@ -145,7 +206,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
{{ $usuarios->links() }}
|
||||
</div>
|
||||
</div> --}}
|
||||
|
||||
{{-- Gestionar precios --}}
|
||||
<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="flex justify-start my-2 items-center mb-4 gap-8">
|
||||
<div class="flex text-sm">
|
||||
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" x="0" y="0"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve">
|
||||
<path
|
||||
d="M15.4,9.88,10.81,5.29a1,1,0,0,0-1.41,0,1,1,0,0,0,0,1.42L14,11.29a1,1,0,0,1,0,1.42L9.4,17.29a1,1,0,0,0,1.41,1.42l4.59-4.59A3,3,0,0,0,15.4,9.88Z"
|
||||
fill="#b221fd" data-original="#000000" />
|
||||
</svg>
|
||||
<x-icon-arrow-right/>
|
||||
Utilidades
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
<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="flex justify-start my-2 items-center mb-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">
|
||||
<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>
|
||||
<x-icon-arrow-right/>
|
||||
Saldo
|
||||
</div>
|
||||
</div>
|
||||
@@ -20,11 +14,11 @@
|
||||
require base_path('vendor/autoload.php');
|
||||
// Agrega credenciales
|
||||
MercadoPago\SDK::setAccessToken(config('services.mercadopago.token'));
|
||||
|
||||
|
||||
|
||||
|
||||
// Crea un objeto de preferencia
|
||||
$preference = new MercadoPago\Preference();
|
||||
|
||||
|
||||
//$payment_methods = MercadoPago::get("/v1/payment_methods");
|
||||
// Crea un ítem en la preferencia
|
||||
$item = new MercadoPago\Item();
|
||||
@@ -33,7 +27,7 @@
|
||||
$item->quantity = 1;
|
||||
$item->unit_price = $monto;
|
||||
$preference->back_urls = array(
|
||||
|
||||
|
||||
"success" => url('/compras/'),
|
||||
"failure" => url('/compras/error'),
|
||||
"pending" => url('/compras/pendiente')
|
||||
@@ -41,10 +35,10 @@
|
||||
$preference->auto_return = "approved";
|
||||
$preference->items = array($item);
|
||||
$preference->save();
|
||||
|
||||
|
||||
|
||||
|
||||
@endphp
|
||||
|
||||
|
||||
<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="text-center bg-[#000029] text-white text-lg font-semibold rounded-lg py-2 mb-4">
|
||||
@@ -57,14 +51,14 @@
|
||||
${{number_format($monto)}}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex justify-center">
|
||||
<a href="javascript:location.reload()">
|
||||
<img class="w-28 rounded-full shadow-lg" src="./img/mercadopago.jpg" alt="">
|
||||
|
||||
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bg-white px-4 py-3 md:flex justify-center mt-2 mb-4">
|
||||
<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>
|
||||
@@ -72,27 +66,27 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="cho-container">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://sdk.mercadopago.com/js/v2"></script>
|
||||
|
||||
|
||||
<script>
|
||||
const mp = new MercadoPago("{{config('services.mercadopago.key')}}", {
|
||||
locale: 'es-CO'
|
||||
});
|
||||
|
||||
|
||||
mp.checkout({
|
||||
preference: {
|
||||
id: '{{$preference->id}}'
|
||||
},
|
||||
|
||||
|
||||
autoOpen: true, // Habilita la apertura automática del Checkout Pro
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user