update global subvendedor

This commit is contained in:
Juan Felipe Duarte
2025-08-22 10:09:23 -07:00
parent 4042fab30b
commit a5aafd738d
10 changed files with 179 additions and 139 deletions
+3 -2
View File
@@ -2,6 +2,7 @@
namespace App\Http\Livewire; namespace App\Http\Livewire;
use App\Models\Configuracione;
use App\Models\Role; use App\Models\Role;
use App\Models\User; use App\Models\User;
use Livewire\Component; use Livewire\Component;
@@ -22,7 +23,6 @@ class ShowRoles extends Component
public function render() public function render()
{ {
if (auth()->user()->rol_id == 5) { if (auth()->user()->rol_id == 5) {
$query = Role::withCount('usuarios'); $query = Role::withCount('usuarios');
if ($this->filtro_id) { if ($this->filtro_id) {
$query->where('subvendedor_id', $this->filtro_id); $query->where('subvendedor_id', $this->filtro_id);
@@ -37,7 +37,8 @@ class ShowRoles extends Component
return view('livewire.show-roles', [ return view('livewire.show-roles', [
'roles' => $consulta_roles, 'roles' => $consulta_roles,
'usuarios' => $consulta_usuarios 'usuarios' => $consulta_usuarios,
'config' => Configuracione::with('usuario')->orderby('id', 'desc')->first(),
]); ]);
} }
+2
View File
@@ -2,6 +2,7 @@
namespace App\Http\Livewire; namespace App\Http\Livewire;
use App\Models\Configuracione;
use App\Models\Promociones; use App\Models\Promociones;
use App\Models\Role; use App\Models\Role;
use App\Models\Servicio; use App\Models\Servicio;
@@ -62,6 +63,7 @@ class ShowTarifas extends Component
'roles' => Role::where('subvendedor_id', auth()->user()->id)->get(), 'roles' => Role::where('subvendedor_id', auth()->user()->id)->get(),
'promo' => Promociones::where('visible', 'true')->get(), 'promo' => Promociones::where('visible', 'true')->get(),
'servicios' => Servicio::where('estado', 'activo')->get(), 'servicios' => Servicio::where('estado', 'activo')->get(),
'config' => Configuracione::with('usuario')->orderby('id', 'desc')->first(),
]); ]);
} }
+2
View File
@@ -2,6 +2,7 @@
namespace App\Http\Livewire; namespace App\Http\Livewire;
use App\Models\Configuracione;
use App\Models\Historiale; use App\Models\Historiale;
use App\Models\Log_general; use App\Models\Log_general;
use App\Models\Promociones; use App\Models\Promociones;
@@ -167,6 +168,7 @@ class ShowUsuarios extends Component
'usuarios' => $consulta_usuarios, 'usuarios' => $consulta_usuarios,
'tarifas' => $consulta_tarifas, 'tarifas' => $consulta_tarifas,
'promo' => Promociones::where('visible', 'true')->get(), 'promo' => Promociones::where('visible', 'true')->get(),
'config' => Configuracione::with('usuario')->orderby('id', 'desc')->first(),
]); ]);
} }
@@ -0,0 +1,22 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::table('configuraciones', function (Blueprint $table) {
$table->boolean('subvendedor')->default(false)->after('catalogo');
});
}
public function down()
{
Schema::table('configuraciones', function (Blueprint $table) {
$table->dropColumn('subvendedor');
});
}
};
+18 -13
View File
@@ -107,43 +107,48 @@
</div> </div>
@if (auth()->user()->subvendedor || auth()->user()->rol->nombre == 'super' || auth()->user()->rol->nombre == 'administrador' || auth()->user()->rol->nombre == 'editor')
@if ((auth()->user()->subvendedor && $config->subvendedor) || in_array(auth()->user()->rol->nombre, ['super', 'administrador', 'editor']))
<ul class="relative shadow-md block w-11/12 mx-auto select-none " x-data="{ selected: null }"> <ul class="relative shadow-md block w-11/12 mx-auto select-none " x-data="{ selected: null }">
<li class="flex align-center flex-col"> <li class="flex align-center flex-col">
<h4 @click="selected !== 0 ? selected = 0 : selected = null" class="cursor-pointer px-5 py-3 bg-[#b221fd] text-white text-center inline-block hover:bg-[#7a02b8] hover:shadow rounded-lg"> <h4 @click="selected !== 0 ? selected = 0 : selected = null" class="cursor-pointer px-5 py-3 bg-[#b221fd] text-white text-center inline-block hover:bg-[#7a02b8] hover:shadow rounded-lg">
@if (auth()->user()->rol->nombre == 'super' || auth()->user()->rol->nombre == 'administrador' || auth()->user()->rol->nombre == 'editor') @if (in_array(auth()->user()->rol->nombre, ['super', 'administrador', 'editor']))
Admin Admin
@else @else
Subvendedor Subvendedor
@endif @endif
</h4> </h4>
<p class="absolute bg-[#f2f4ff] rounded-md @if (auth()->user()->rol->nombre == 'editor') -top-[400%] @elseif (auth()->user()->rol->nombre == 'administrador') -top-[200%] @elseif (auth()->user()->rol->nombre == 'super') -top-[300%] @elseif (auth()->user()->subvendedor) -top-3 @else -top-[800%] @endif -right-[20%] sm:-right-[55%]" x-show="selected == 0"> <p class="absolute bg-[#f2f4ff] rounded-md @if (auth()->user()->rol->nombre == 'editor') -top-[400%] @elseif (auth()->user()->rol->nombre == 'administrador') -top-[200%] @elseif (auth()->user()->rol->nombre == 'super') -top-[300%] @elseif (auth()->user()->subvendedor) -top-3 @else -top-[800%] @endif -right-[20%] sm:-right-[55%]" x-show="selected == 0">
@if (auth()->user()->subvendedor) @if ($config->subvendedor && auth()->user()->subvendedor)
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('roles') }}">Gestión Roles</a> <a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('roles') }}">Gestión Roles</a>
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('usuarios') }}">Gestión Usuarios</a> <a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('usuarios') }}">Gestión Usuarios</a>
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('logs-comisiones') }}">Log Comisiones</a> <a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('logs-comisiones') }}">Log Comisiones</a>
@if (auth()->user()->rol->nombre != 'super') @if (auth()->user()->rol->nombre != 'super')
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('tarifas') }}">Gestión Tarifas</a> <a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('tarifas') }}">Gestión Tarifas</a>
@endif @endif
@if ( auth()->user()->rol->nombre == 'super' || auth()->user()->rol->nombre == 'administrador' || auth()->user()->rol->nombre == 'editor') @endif
<a class="block cursor-pointer hover:rounded-t-md rounded-t-md text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('planes') }}">Gestión Planes</a>
<a class="block cursor-pointer hover:rounded-b-md rounded-b-md text-center hover:bg-[#d1d3e1] w-full px-3 py-1" href="{{ route('import') }}">Importar cuentas</a> {{-- Links para super / administrador / editor --}}
@if (auth()->user()->rol->nombre == 'super' || auth()->user()->rol->nombre == 'administrador') @if (in_array(auth()->user()->rol->nombre, ['super', 'administrador', 'editor']))
<a class="block cursor-pointer hover:rounded-t-md rounded-t-md text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('pendientes') }}">Gestión Pendientes</a> <a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('planes') }}">Gestión Planes</a>
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('import') }}">Importar cuentas</a>
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('usuarios') }}">Gestión Usuarios</a>
@if (in_array(auth()->user()->rol->nombre, ['super', 'administrador']))
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('pendientes') }}">Gestión Pendientes</a>
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('logGeneral') }}">Log general</a> <a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('logGeneral') }}">Log general</a>
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('logs') }}">Log cuentas</a> <a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('logs') }}">Log cuentas</a>
@if (auth()->user()->rol->nombre == 'super') @if (auth()->user()->rol->nombre == 'super')
{{-- Solo super --}}
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('tarifas') }}">Gestión Tarifas</a>
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('logHistorial') }}">Log historial</a> <a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('logHistorial') }}">Log historial</a>
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('logsRecargas') }}">Log recargas</a> <a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('logsRecargas') }}">Log recargas</a>
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('promociones') }}">Gestión Promociones</a> <a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('promociones') }}">Gestión Promociones</a>
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('servicio') }}">Gestión Servicios</a> <a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('servicio') }}">Gestión Servicios</a>
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('categoria') }}">Gestión Categorias</a> <a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('categoria') }}">Gestión Categorias</a>
<a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('utilidades') }}">Utilidades</a> <a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('utilidades') }}">Utilidades</a>
<a class="block cursor-pointer hover:rounded-b-md rounded-b-md text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('configuracion') }}">Configuración</a> <a class="block cursor-pointer text-center hover:bg-[#d1d3e1] border-b w-full px-3 py-1" href="{{ route('configuracion') }}">Configuración</a>
@endif
@endif @endif
@endif @endif
@endif @endif
@@ -6,7 +6,6 @@
<input type="checkbox" id="aprobado" wire:model="aprobado" class="my-1 align-middle px-1"> <input type="checkbox" id="aprobado" wire:model="aprobado" class="my-1 align-middle px-1">
</div> </div>
<table class="text-center w-11/12 mx-auto"> <table class="text-center w-11/12 mx-auto">
<tr class="border text-left"> <tr class="border text-left">
<th>Compra</th> <th>Compra</th>
@@ -16,8 +15,8 @@
<th>Estado</th> <th>Estado</th>
<th>Saldo</th> <th>Saldo</th>
</tr> </tr>
@foreach($historial_recargas as $item)
@foreach ($historial_recargas as $item)
<tr class="border hover:bg-gray-200 hover:ring-gray-500 text-left text-sm"> <tr class="border hover:bg-gray-200 hover:ring-gray-500 text-left text-sm">
<td>{{ \Carbon\Carbon::parse($item->created_at)->format('y/m/d h:i a') }}</td> <td>{{ \Carbon\Carbon::parse($item->created_at)->format('y/m/d h:i a') }}</td>
<td>{{ $item->usuario?->name ?? 'N/A' }}</td> <td>{{ $item->usuario?->name ?? 'N/A' }}</td>
@@ -25,15 +24,11 @@
<td>{{ $item->monto ?? 'N/A' }}</td> <td>{{ $item->monto ?? 'N/A' }}</td>
<td>{{ $item->status ?? 'N/A' }}</td> <td>{{ $item->status ?? 'N/A' }}</td>
<td>{{ $item->valor_recarga ?? 'N/A' }}</td> <td>{{ $item->valor_recarga ?? 'N/A' }}</td>
</tr> </tr>
@endforeach @endforeach
</table> </table>
<div class="mx-10"> <div class="mx-10">
{{ $historial_recargas->links() }} {{ $historial_recargas->links() }}
</div> </div>
</div> </div>
</div> </div>
@@ -92,6 +92,23 @@
</div> </div>
{{-- Subvendedor --}}
<div class="bg-white text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 mb-8">
<div class="flex items-center justify-center gap-2">
<span class="text-gray-700">Subvendedores</span>
<label class="relative inline-flex items-center cursor-pointer">
<input wire:model="subvendedor" type="checkbox" value="" class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 rounded-full peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 peer-checked:bg-blue-600"></div>
</label>
</div>
{{-- Boton para guardar subvendedor --}}
<div class="mt-4">
<button wire:click="guardarSubvendedor"
class="inline-flex justify-center rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Guardar</button>
</div>
</div>
{{-- Slider --}} {{-- Slider --}}
<div class="bg-white grid grid-cols-1 text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 my-8"> <div class="bg-white grid grid-cols-1 text-center rounded-xl py-4 px-8 shadow-md xl:mx-10 my-8">
@@ -626,10 +643,6 @@
</span> </span>
</div> </div>
<div class="lg:col-span-1 mb-8 text-center"> <div class="lg:col-span-1 mb-8 text-center">
<button wire:click="eliminarCache" class=" mx-auto inline-flex justify-center rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-red-500 hover:bg-red-700 focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Eliminar <button wire:click="eliminarCache" class=" mx-auto inline-flex justify-center rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-red-500 hover:bg-red-700 focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Eliminar
@@ -21,7 +21,7 @@
Roles Roles
</div> </div>
@if (auth()->user()->subvendedor) @if (auth()->user()->subvendedor && $config->subvendedor)
<a x-on:click="add = !add" class="flex items-center px-4 py-2 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8] transition"> <a x-on:click="add = !add" class="flex items-center px-4 py-2 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8] transition">
Añadir rol Añadir rol
<svg class="w-[0.87rem] ml-2" fill="#ffffff" viewBox="0 0 512 512"> <svg class="w-[0.87rem] ml-2" fill="#ffffff" viewBox="0 0 512 512">
@@ -24,7 +24,7 @@ editarTarifaPromo: @entangle('editarTarifaPromo'),
</div> </div>
<div class="flex flex-col md:flex-row items-center justify-center gap-6 md:gap-4"> <div class="flex flex-col md:flex-row items-center justify-center gap-6 md:gap-4">
@if (auth()->user()->subvendedor) @if (auth()->user()->subvendedor && $config->subvendedor)
<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]">
Tarifas servicios Tarifas servicios
<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" 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">
@@ -34,7 +34,7 @@ editarTarifaPromo: @entangle('editarTarifaPromo'),
</a> </a>
@endif @endif
@if (auth()->user()->subvendedor) @if (auth()->user()->subvendedor && $config->subvendedor)
<a x-on:click="modTarifasPromo = true" class="justify-center flex px-4 py-2 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]"> <a x-on:click="modTarifasPromo = true" class="justify-center flex px-4 py-2 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]">
Tarifas promociones Tarifas promociones
<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" 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">
@@ -26,7 +26,7 @@
Usuario Usuario
</div> </div>
<div class="flex gap-4"> <div class="flex gap-4">
@if (auth()->user()->subvendedor || auth()->user()->rol->nombre === 'administrador' || auth()->user()->rol->nombre === 'editor' || auth()->user()->rol->nombre === 'super') @if ((auth()->user()->subvendedor && $config->subvendedor) || in_array(auth()->user()->rol->nombre, ['administrador', 'editor', 'super']))
<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 <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 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"> <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">
@@ -35,7 +35,7 @@
</a> </a>
@endif @endif
@if (auth()->user()->rol->nombre === 'super' || auth()->user()->rol->nombre === 'administrador') @if (in_array(auth()->user()->rol->nombre, ['super', '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]">Mod. <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 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"> <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">
@@ -107,7 +107,7 @@
@if (auth()->user()->rol->nombre == 'super') @if (auth()->user()->rol->nombre == 'super')
<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> <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>
@else @else
@if (Auth::user()->subvendedor) @if (auth()->user()->subvendedor && $config->subvendedor)
<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> <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>
@endif @endif
@endif @endif
@@ -131,7 +131,7 @@
<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> <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> </div>
</td> </td>
@elseif (Auth::user()->subvendedor) @elseif (Auth::user()->subvendedor && $config->subvendedor)
<td> <td>
<button x-on:click="openOption=!openOption"> <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"> <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">
@@ -660,7 +660,7 @@
@if (auth()->user()->rol->nombre === 'administrador' || auth()->user()->rol->nombre === 'super') @if (auth()->user()->rol->nombre === 'administrador' || auth()->user()->rol->nombre === 'super')
<button wire:click="addSaldo" 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="addSaldo" 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>
@else @else
@if (Auth::user()->subvendedor) @if (auth()->user()->subvendedor && $config->subvendedor)
<button wire:click="addSaldoSubvendedor" 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="addSaldoSubvendedor" 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>
@endif @endif
@endif @endif