(,), editor, administrador
This commit is contained in:
@@ -22,11 +22,21 @@ class ShowRecarga extends Component
|
|||||||
use LivewireAlert;
|
use LivewireAlert;
|
||||||
public $numero_nequi;
|
public $numero_nequi;
|
||||||
public $valor_recarga;
|
public $valor_recarga;
|
||||||
|
public $valor_recarga_format;
|
||||||
public $nequi =false;
|
public $nequi =false;
|
||||||
public $cobrar = false;
|
public $cobrar = false;
|
||||||
public $monto = 0;
|
public $monto = 0;
|
||||||
|
|
||||||
|
public function updatedValorRecargaFormat($value)
|
||||||
|
{
|
||||||
|
// Limpiar el valor formatado quitando los puntos
|
||||||
|
$cleanValue = str_replace(',', '', $value);
|
||||||
|
|
||||||
|
// Asignar el valor limpio a valor_recarga
|
||||||
|
$this->valor_recarga = $cleanValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
// $this->fechaActual = date('d/m/Y');
|
// $this->fechaActual = date('d/m/Y');
|
||||||
@@ -37,7 +47,7 @@ class ShowRecarga extends Component
|
|||||||
$consulta_historial = recarga::where('usuario_id',Auth::user()->id)->orderBy('id','DESC')->limit(20)->get();
|
$consulta_historial = recarga::where('usuario_id',Auth::user()->id)->orderBy('id','DESC')->limit(20)->get();
|
||||||
|
|
||||||
$consulta_saldo = User::where('id',Auth::user()->id)->with('saldo')->first();
|
$consulta_saldo = User::where('id',Auth::user()->id)->with('saldo')->first();
|
||||||
|
|
||||||
return view('livewire.show-recarga',[
|
return view('livewire.show-recarga',[
|
||||||
'user' => $consulta_saldo,
|
'user' => $consulta_saldo,
|
||||||
'historial_recargas' => $consulta_historial
|
'historial_recargas' => $consulta_historial
|
||||||
@@ -46,7 +56,7 @@ class ShowRecarga extends Component
|
|||||||
|
|
||||||
|
|
||||||
public function pagar(){
|
public function pagar(){
|
||||||
|
|
||||||
//auth2.0
|
//auth2.0
|
||||||
$client_id='5ml5b35ijjk13f4q99utnsm97e';
|
$client_id='5ml5b35ijjk13f4q99utnsm97e';
|
||||||
$client_secret='1b3703aq0o6t1rrfti13q7uf7f42glik3gsf81s0d783shblmt8l';
|
$client_secret='1b3703aq0o6t1rrfti13q7uf7f42glik3gsf81s0d783shblmt8l';
|
||||||
@@ -54,8 +64,8 @@ class ShowRecarga extends Component
|
|||||||
$endpoint="https://oauth.sandbox.nequi.com/oauth2/token?grant_type=client_credentials";
|
$endpoint="https://oauth.sandbox.nequi.com/oauth2/token?grant_type=client_credentials";
|
||||||
$date= Carbon::now()->format('Y-m-d\TH:i:s.z\Z');
|
$date= Carbon::now()->format('Y-m-d\TH:i:s.z\Z');
|
||||||
//dd($date);
|
//dd($date);
|
||||||
|
|
||||||
//dd($this->numero_nequi);
|
//dd($this->numero_nequi);
|
||||||
//push
|
//push
|
||||||
$RestEndpoint = '/payments/v2/-services-paymentservice-unregisteredpayment';
|
$RestEndpoint = '/payments/v2/-services-paymentservice-unregisteredpayment';
|
||||||
|
|
||||||
@@ -66,8 +76,8 @@ class ShowRecarga extends Component
|
|||||||
'Accept' => 'application/json',
|
'Accept' => 'application/json',
|
||||||
'Authorization' => $authorization
|
'Authorization' => $authorization
|
||||||
);
|
);
|
||||||
|
|
||||||
//Solicitud
|
//Solicitud
|
||||||
$request = Requests::post($endpoint, $headers);
|
$request = Requests::post($endpoint, $headers);
|
||||||
|
|
||||||
|
|
||||||
@@ -98,7 +108,7 @@ class ShowRecarga extends Component
|
|||||||
|
|
||||||
$options1 = array(
|
$options1 = array(
|
||||||
'timeout' => 30
|
'timeout' => 30
|
||||||
|
|
||||||
);
|
);
|
||||||
$endpoint1 = 'https://api.sandbox.nequi.com' . $RestEndpoint;
|
$endpoint1 = 'https://api.sandbox.nequi.com' . $RestEndpoint;
|
||||||
|
|
||||||
@@ -135,7 +145,7 @@ $request1 = Requests::post($endpoint1, $headers1, $body1, $options1);
|
|||||||
|
|
||||||
if (isset($request1->status_code) && $request1->status_code == 200 && isset($request1->body) && !empty($request1->body)
|
if (isset($request1->status_code) && $request1->status_code == 200 && isset($request1->body) && !empty($request1->body)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$response1 = json_decode($request1->body);
|
$response1 = json_decode($request1->body);
|
||||||
@@ -143,18 +153,18 @@ if (isset($request1->status_code) && $request1->status_code == 200 && isset($req
|
|||||||
$status = $response1->ResponseMessage->ResponseHeader->Status;
|
$status = $response1->ResponseMessage->ResponseHeader->Status;
|
||||||
$statusCode = isset($status) ? $status->StatusCode : '';
|
$statusCode = isset($status) ? $status->StatusCode : '';
|
||||||
$statusDesc = isset($status) ? $status->StatusDesc : '';
|
$statusDesc = isset($status) ? $status->StatusDesc : '';
|
||||||
|
|
||||||
if ($statusCode == 0) {
|
if ($statusCode == 0) {
|
||||||
|
|
||||||
$this->alert('success', 'Solicitud de pago enviada', [
|
$this->alert('success', 'Solicitud de pago enviada', [
|
||||||
'position' => 'top'
|
'position' => 'top'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$payment = $response1->ResponseMessage->ResponseBody->any->unregisteredPaymentRS;
|
$payment = $response1->ResponseMessage->ResponseBody->any->unregisteredPaymentRS;
|
||||||
$trnId = isset($payment) ? trim($payment->transactionId) : '';
|
$trnId = isset($payment) ? trim($payment->transactionId) : '';
|
||||||
|
|
||||||
if ( !empty($trnId)) {
|
if ( !empty($trnId)) {
|
||||||
|
|
||||||
$recarga = new recarga;
|
$recarga = new recarga;
|
||||||
$recarga-> payment_type_id= '';
|
$recarga-> payment_type_id= '';
|
||||||
$recarga-> payment_method_id= '';
|
$recarga-> payment_method_id= '';
|
||||||
@@ -172,7 +182,7 @@ if (isset($request1->status_code) && $request1->status_code == 200 && isset($req
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$this->nequi = false;
|
$this->nequi = false;
|
||||||
}
|
}
|
||||||
$this->alert('success', $trnId, [
|
$this->alert('success', $trnId, [
|
||||||
'position' => 'top'
|
'position' => 'top'
|
||||||
]);
|
]);
|
||||||
@@ -181,7 +191,7 @@ if (isset($request1->status_code) && $request1->status_code == 200 && isset($req
|
|||||||
$this->alert('warning', $statusCode . ' = ' . $statusDesc, [
|
$this->alert('warning', $statusCode . ' = ' . $statusDesc, [
|
||||||
'position' => 'top'
|
'position' => 'top'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
|
|||||||
@@ -26,7 +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">
|
||||||
<x-icon-arrow-right/>
|
<x-icon-arrow-right />
|
||||||
Planes
|
Planes
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -42,11 +42,17 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
@if (auth()->user()->rol->nombre != 'editor' && auth()->user()->rol->nombre != 'administrador')
|
@if (auth()->user()->rol->nombre != 'editor' && auth()->user()->rol->nombre != 'administrador')
|
||||||
<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]">
|
<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]">
|
||||||
Modificar tarifas
|
Modificar tarifas
|
||||||
<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">
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
<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" />
|
xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" class="w-4 ml-2" x="0" y="0"
|
||||||
<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" />
|
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>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
@@ -94,17 +100,11 @@
|
|||||||
<label for="Repetidas">Repetidas</label>
|
<label for="Repetidas">Repetidas</label>
|
||||||
<input type="checkbox" name="" id="Repetidas" wire:model="repetidas">
|
<input type="checkbox" name="" id="Repetidas" wire:model="repetidas">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@if (auth()->user()->rol->nombre != 'editor')
|
|
||||||
<div class="my-1 md:my-0">
|
|
||||||
<button wire:click="eliminarCuentas"
|
|
||||||
class="bg-red-400 text-white px-4 py-2 rounded">Eliminar</button>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="my-1 md:my-0">
|
||||||
|
<button wire:click="eliminarCuentas" class="bg-red-400 text-white px-4 py-2 rounded">Eliminar</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="grid mt-4 sm:mt-0 sm:flex w-[8rem]">
|
<div class="grid mt-4 sm:mt-0 sm:flex w-[8rem]">
|
||||||
<select name="servicios" id="servicios" wire:model.debounce.500ms="servicios_id"
|
<select name="servicios" id="servicios" wire:model.debounce.500ms="servicios_id"
|
||||||
@@ -153,13 +153,7 @@
|
|||||||
) {
|
) {
|
||||||
$historiales = $cuenta
|
$historiales = $cuenta
|
||||||
->historiales()
|
->historiales()
|
||||||
->where(
|
->where('fecha_final', '>', now()->addDay()->toDateString())
|
||||||
'fecha_final',
|
|
||||||
'>',
|
|
||||||
now()
|
|
||||||
->addDay()
|
|
||||||
->toDateString(),
|
|
||||||
)
|
|
||||||
->count();
|
->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,15 +329,19 @@
|
|||||||
@if ($consulta_verUsuarios)
|
@if ($consulta_verUsuarios)
|
||||||
@if ($consulta_verUsuarios->estado == 'pendiente')
|
@if ($consulta_verUsuarios->estado == 'pendiente')
|
||||||
@if (count($consulta_verUsuarios->historiales) != $consulta_verUsuarios->servicio->completa)
|
@if (count($consulta_verUsuarios->historiales) != $consulta_verUsuarios->servicio->completa)
|
||||||
<span class="mr-4">
|
@if (Auth::user()->rol->nombre != 'editor')
|
||||||
<button wire:click="openAdd" 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 ease-in-out sm-text-sm sm-leading-5 ">Añadir usuario</button>
|
<span class="mr-4">
|
||||||
</span>
|
<button wire:click="openAdd" 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 ease-in-out sm-text-sm sm-leading-5 ">Añadir usuario</button>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
@endif
|
@endif
|
||||||
@else
|
@else
|
||||||
@if (count($consulta_verUsuarios->historiales) != $consulta_verUsuarios->servicio->pantallas)
|
@if (count($consulta_verUsuarios->historiales) != $consulta_verUsuarios->servicio->pantallas)
|
||||||
<span class="mr-4">
|
@if (Auth::user()->rol->nombre != 'editor')
|
||||||
<button wire:click="openAdd" 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 ease-in-out sm-text-sm sm-leading-5 ">Añadir usuario</button>
|
<span class="mr-4">
|
||||||
</span>
|
<button wire:click="openAdd" 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 ease-in-out sm-text-sm sm-leading-5 ">Añadir usuario</button>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
@@ -376,12 +374,15 @@
|
|||||||
|
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<label for="usuario_renovar" class="block text-gray-700 text-sm font-bold mb-2">Usuario:</label>
|
<label for="usuario_renovar" class="block text-gray-700 text-sm font-bold mb-2">Usuario:</label>
|
||||||
<input type="email" id="usuario_nrenovar" wire:model="usuario_renovar" 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="email" id="usuario_nrenovar" wire:model="usuario_renovar"
|
||||||
|
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<label for="password_renovar" class="block text-gray-700 text-sm font-bold mb-2">Contraseña:</label>
|
<label for="password_renovar"
|
||||||
<input type="text" id="password_renovar" wire:model="password_renovar" class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
|
class="block text-gray-700 text-sm font-bold mb-2">Contraseña:</label>
|
||||||
|
<input type="text" id="password_renovar" wire:model="password_renovar"
|
||||||
|
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
@@ -397,23 +398,28 @@
|
|||||||
</div>
|
</div>
|
||||||
<div date-rangepicker class="flex items-center gap-2 mb-4">
|
<div date-rangepicker class="flex items-center gap-2 mb-4">
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<label for="fecha_inicial_renovar" class="block text-gray-700 text-sm font-bold mb-2">Fecha inicio:</label>
|
<label for="fecha_inicial_renovar" class="block text-gray-700 text-sm font-bold mb-2">Fecha
|
||||||
<input name="fecha_inicial_renovar" wire:model.defer="fecha_inicial_renovar" type="date" class="border-2 border-neutral-200 rounded-[0.8rem] px-4 py-2 text-gray-900 sm:text-sm focus:border-neutral-300 focus:outline-none focus:shadow-outline focus:ring-blue-500 block w-full dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 datepicker-input">
|
inicio:</label>
|
||||||
|
<input name="fecha_inicial_renovar" wire:model.defer="fecha_inicial_renovar" type="date"
|
||||||
|
class="border-2 border-neutral-200 rounded-[0.8rem] px-4 py-2 text-gray-900 sm:text-sm focus:border-neutral-300 focus:outline-none focus:shadow-outline focus:ring-blue-500 block w-full dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 datepicker-input">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<label for="fecha_final_renovar" class="block text-gray-700 text-sm font-bold mb-2">Fecha
|
<label for="fecha_final_renovar" class="block text-gray-700 text-sm font-bold mb-2">Fecha
|
||||||
Final:</label>
|
Final:</label>
|
||||||
<input name="fecha_final_renovar" wire:model.defer="fecha_final_renovar" type="date" class="border-2 border-neutral-200 rounded-[0.8rem] px-4 py-2 text-gray-900 sm:text-sm focus:border-neutral-300 focus:outline-none focus:shadow-outline focus:ring-blue-500 block w-full dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 datepicker-input">
|
<input name="fecha_final_renovar" wire:model.defer="fecha_final_renovar" type="date"
|
||||||
|
class="border-2 border-neutral-200 rounded-[0.8rem] px-4 py-2 text-gray-900 sm:text-sm focus:border-neutral-300 focus:outline-none focus:shadow-outline focus:ring-blue-500 block w-full dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 datepicker-input">
|
||||||
</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="saveRenovar()" 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 ease-in-out sm-text-sm sm-leading-5">Guardar</button>
|
<button wire:click="saveRenovar()" 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 ease-in-out sm-text-sm sm-leading-5">Guardar</button>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<button x-on:click="renovar=false" wire:click="" 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 ease-in-out sm-text-sm sm-leading-5">Cerrar</button>
|
<button x-on:click="renovar=false" wire:click="" 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 ease-in-out sm-text-sm sm-leading-5">Cerrar</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -466,24 +472,38 @@
|
|||||||
|
|
||||||
@if (!empty($consulta_verUsuarios->servicio->tarifas))
|
@if (!empty($consulta_verUsuarios->servicio->tarifas))
|
||||||
<label for="tarifa " class="block text-gray-700 text-sm font-bold mb-2">Tarifa:</label>
|
<label for="tarifa " class="block text-gray-700 text-sm font-bold mb-2">Tarifa:</label>
|
||||||
<select name="" id="" wire:model="tarifa" class="border-2 border-neutral-200 rounded-lg 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">
|
<select name="" id="" wire:model="tarifa"
|
||||||
|
class="border-2 border-neutral-200 rounded-lg 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">
|
||||||
<option value="" select>Seleccionar</option>
|
<option value="" select>Seleccionar</option>
|
||||||
@foreach ($consulta_verUsuarios->servicio->tarifas as $tarifaItem)
|
@foreach ($consulta_verUsuarios->servicio->tarifas as $tarifaItem)
|
||||||
@if ($consulta_verUsuarios->estado == 'pendiente' && $tarifaItem->rol_id == '5' )
|
@if ($consulta_verUsuarios->estado == 'pendiente' && $tarifaItem->rol_id == '5')
|
||||||
@if ($tarifaItem->pantallas == $tarifaItem->servicio->completa)
|
@if ($tarifaItem->pantallas == $tarifaItem->servicio->completa)
|
||||||
@if ($tarifaItem->servicio->por_tiempo)
|
@if ($tarifaItem->servicio->por_tiempo)
|
||||||
<option value="{{ $tarifaItem }}">{{ $tarifaItem->servicio->nombre }} - {{ $tarifaItem->dias }} {{ __($tarifaItem->dias == 1 ? 'día' : 'días') }}</option>
|
<option value="{{ $tarifaItem }}">{{ $tarifaItem->servicio->nombre }} -
|
||||||
|
{{ $tarifaItem->dias }} {{ __($tarifaItem->dias == 1 ? 'día' : 'días') }}
|
||||||
|
</option>
|
||||||
@else
|
@else
|
||||||
<option value="{{ $tarifaItem }}">{{ $tarifaItem->servicio->nombre }} - {{ $tarifaItem->pantallas }} {{ __($tarifaItem->pantallas == 1 ? 'pantalla' : 'pantallas') }} - {{ $tarifaItem->dias }} {{ __($tarifaItem->dias == 1 ? 'día' : 'días') }}</option>
|
<option value="{{ $tarifaItem }}">{{ $tarifaItem->servicio->nombre }} -
|
||||||
|
{{ $tarifaItem->pantallas }}
|
||||||
|
{{ __($tarifaItem->pantallas == 1 ? 'pantalla' : 'pantallas') }} -
|
||||||
|
{{ $tarifaItem->dias }} {{ __($tarifaItem->dias == 1 ? 'día' : 'días') }}
|
||||||
|
</option>
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
@else
|
@else
|
||||||
@if ($tarifaItem->rol_id == '5' && ($tarifaItem->pantallas < ($tarifaItem->servicio->pantallas - count($consulta_verUsuarios->historiales))))
|
@if (
|
||||||
|
$tarifaItem->rol_id == '5' &&
|
||||||
|
$tarifaItem->pantallas < $tarifaItem->servicio->pantallas - count($consulta_verUsuarios->historiales))
|
||||||
@if ($tarifaItem->servicio->por_tiempo)
|
@if ($tarifaItem->servicio->por_tiempo)
|
||||||
<option value="{{ $tarifaItem }}">{{ $tarifaItem->servicio->nombre }} - {{ $tarifaItem->dias }} {{ __($tarifaItem->dias == 1 ? 'día' : 'días') }}</option>
|
<option value="{{ $tarifaItem }}">{{ $tarifaItem->servicio->nombre }} -
|
||||||
|
{{ $tarifaItem->dias }} {{ __($tarifaItem->dias == 1 ? 'día' : 'días') }}
|
||||||
|
</option>
|
||||||
@else
|
@else
|
||||||
<option value="{{ $tarifaItem }}">{{ $tarifaItem->servicio->nombre }} - {{ $tarifaItem->pantallas }} {{ __($tarifaItem->pantallas == 1 ? 'pantalla' : 'pantallas') }} - {{ $tarifaItem->dias }} {{ __($tarifaItem->dias == 1 ? 'día' : 'días') }}</option>
|
<option value="{{ $tarifaItem }}">{{ $tarifaItem->servicio->nombre }} -
|
||||||
|
{{ $tarifaItem->pantallas }}
|
||||||
|
{{ __($tarifaItem->pantallas == 1 ? 'pantalla' : 'pantallas') }} -
|
||||||
|
{{ $tarifaItem->dias }} {{ __($tarifaItem->dias == 1 ? 'día' : 'días') }}
|
||||||
|
</option>
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
@@ -496,7 +516,8 @@
|
|||||||
|
|
||||||
<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="saveUser()" 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 ease-in-out sm-text-sm sm-leading-5">Guardar</button>
|
<button wire:click="saveUser()" 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 ease-in-out sm-text-sm sm-leading-5">Guardar</button>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<button x-on:click="addUser=false" wire:click="" type="button"
|
<button x-on:click="addUser=false" wire:click="" type="button"
|
||||||
@@ -786,7 +807,8 @@
|
|||||||
<td class="pl-[1rem]">{{ $tarifa->dias ?? '' }}</td>
|
<td class="pl-[1rem]">{{ $tarifa->dias ?? '' }}</td>
|
||||||
<td class="pl-[1rem]">{{ number_format($tarifa->utilidad ?? 0) }}</td>
|
<td class="pl-[1rem]">{{ number_format($tarifa->utilidad ?? 0) }}</td>
|
||||||
<td class="pl-[1rem]">
|
<td class="pl-[1rem]">
|
||||||
<button wire:click="editar({{ $tarifa }})" class="justify-center flex px-3 py-2 rounded-lg text-xs cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]">Editar</button>
|
<button wire:click="editar({{ $tarifa }})"
|
||||||
|
class="justify-center flex px-3 py-2 rounded-lg text-xs cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]">Editar</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -797,7 +819,8 @@
|
|||||||
|
|
||||||
<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="modTarifas=false" wire:click="" 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 ease-in-out sm-text-sm sm-leading-5">Cerrar</button>
|
<button x-on:click="modTarifas=false" wire:click="" 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 ease-in-out sm-text-sm sm-leading-5">Cerrar</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -853,7 +876,8 @@
|
|||||||
|
|
||||||
<div class="flex m-auto items-center">
|
<div class="flex m-auto items-center">
|
||||||
<label class="text-gray-500 text-sm mr-2">Activa</label>
|
<label class="text-gray-500 text-sm mr-2">Activa</label>
|
||||||
<input type="checkbox" id="estadoTarifa" wire:model="estadoTarifa" class="border-2 border-neutral-200 focus:ring-0 shadow apperance-none focus:border-neutral-300 text-[#B221FD] leading-tight focus:outline-none focus:shadow-outline">
|
<input type="checkbox" id="estadoTarifa" wire:model="estadoTarifa"
|
||||||
|
class="border-2 border-neutral-200 focus:ring-0 shadow apperance-none focus:border-neutral-300 text-[#B221FD] leading-tight focus:outline-none focus:shadow-outline">
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3 mt-3 flex justify-end">
|
<div class="mb-3 mt-3 flex justify-end">
|
||||||
<span>
|
<span>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div x-data="{ nequi: @entangle('nequi'), valor_recarga: @entangle('valor_recarga') }">
|
<div x-data="{ nequi: @entangle('nequi'), valor_recarga: @entangle('valor_recarga'),valor_recarga_format: @entangle('valor_recarga_format') }">
|
||||||
<div class=" absolute backdrop-blur-sm bg-white/70 left-0 bottom-0 top-0 right-0 h-full z-40" wire:loading
|
<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">
|
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>
|
||||||
@@ -30,21 +30,26 @@
|
|||||||
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" id="valor_recarga" wire:model="valor_recarga" class="hidden">
|
||||||
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">
|
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
id="valor_recarga_format"
|
||||||
|
name="recharge_format"
|
||||||
|
wire:model="valor_recarga_format"
|
||||||
|
placeholder="$20.000"
|
||||||
|
required
|
||||||
|
class="border-2 w-1/2 md:w-auto mb-2 border-neutral-200 rounded-[0.8rem] shadow appearance-none focus:border-neutral-300 focus:ring-0 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
|
||||||
|
oninput="formatInput(this)"
|
||||||
|
>
|
||||||
|
|
||||||
@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 class="font-semibold">
|
||||||
|
{{ number_format($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
|
<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>
|
||||||
Mercado Pago por costos de sistema.</p>
|
|
||||||
</div>
|
</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">
|
||||||
@@ -96,7 +101,6 @@
|
|||||||
<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]">${{ 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>
|
||||||
@@ -125,5 +129,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function formatInput(input) {
|
||||||
|
let unformattedValue = input.value.replace(/\D/g, '');
|
||||||
|
|
||||||
|
let formattedValue = unformattedValue.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
|
|
||||||
|
input.value = formattedValue;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -552,9 +552,10 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
*Usuario:* {{ trim($cuenta->correo) }}
|
*Usuario:* {{ trim($cuenta->correo) }}
|
||||||
*Contraseña:* {{ trim($cuenta->password) }}
|
*Contraseña:* {{ trim($cuenta->password) }}
|
||||||
|
|
||||||
|
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
</textarea>
|
</textarea>
|
||||||
@@ -570,9 +571,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<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"> {{ Carbon\Carbon::parse($cuentas->fecha_final)->format('Y/m/d') ?? '' }}.</p>
|
||||||
|
|
||||||
{{ Carbon\Carbon::parse($cuentas->fecha_final)->format('Y/m/d') ?? '' }}.</p>
|
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -580,9 +580,7 @@
|
|||||||
Monto a recargar
|
Monto a recargar
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<input type="number" min="0" name="monto" wire:model="valor_recargar"
|
<input type="number" min="0" name="monto" wire:model="valor_recargar" placeholder="$100.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">
|
||||||
placeholder="$100.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">
|
|
||||||
|
|
||||||
<div class="flex text-sm justify-center">Tu valor total seria: $<p>
|
<div class="flex text-sm justify-center">Tu valor total seria: $<p>
|
||||||
{{ number_format($saldo_actual + $valor_recargar) }}
|
{{ number_format($saldo_actual + $valor_recargar) }}
|
||||||
|
|||||||
+1
-1
@@ -46,6 +46,7 @@ Route::middleware(["auth"])->group(function () {
|
|||||||
// Editores
|
// Editores
|
||||||
Route::middleware(["auth", "solo_usuario_editor"])->group(function () {
|
Route::middleware(["auth", "solo_usuario_editor"])->group(function () {
|
||||||
Route::any('/planes', [MenuController::class, 'showplanes'])->name('planes');
|
Route::any('/planes', [MenuController::class, 'showplanes'])->name('planes');
|
||||||
|
Route::get('/import', [MenuController::class, 'showimport'])->name('import');
|
||||||
});
|
});
|
||||||
|
|
||||||
//Administradores
|
//Administradores
|
||||||
@@ -57,7 +58,6 @@ Route::middleware(["auth", "solo_usuario_administrador"])->group(function () {
|
|||||||
Route::get('/configuracion', [MenuController::class, 'showconfiguracion'])->name('configuracion');
|
Route::get('/configuracion', [MenuController::class, 'showconfiguracion'])->name('configuracion');
|
||||||
Route::get('/categoria', [MenuController::class, 'showcategoria'])->name('categoria');
|
Route::get('/categoria', [MenuController::class, 'showcategoria'])->name('categoria');
|
||||||
Route::any('/logs', [MenuController::class, 'showlogs'])->name('logs');
|
Route::any('/logs', [MenuController::class, 'showlogs'])->name('logs');
|
||||||
Route::get('/import', [MenuController::class, 'showimport'])->name('import');
|
|
||||||
Route::any('/logs-recargas', [MenuController::class, 'showLogRecargas'])->name('logsRecargas');
|
Route::any('/logs-recargas', [MenuController::class, 'showLogRecargas'])->name('logsRecargas');
|
||||||
Route::any('/log-general', [MenuController::class, 'showLogGeneral'])->name('logGeneral');
|
Route::any('/log-general', [MenuController::class, 'showLogGeneral'])->name('logGeneral');
|
||||||
Route::any('/log-historial', [MenuController::class, 'showLogHistorial'])->name('logHistorial');
|
Route::any('/log-historial', [MenuController::class, 'showLogHistorial'])->name('logHistorial');
|
||||||
|
|||||||
Reference in New Issue
Block a user