update
This commit is contained in:
@@ -20,6 +20,8 @@ class ShowTarifas extends Component
|
||||
// Modales
|
||||
public $modTarifas = false;
|
||||
public $modTarifasPromo = false;
|
||||
public $editarTarifa = false;
|
||||
public $editarTarifaPromo = false;
|
||||
|
||||
public $tarifas;
|
||||
public $planes;
|
||||
@@ -31,6 +33,8 @@ class ShowTarifas extends Component
|
||||
public $estado = true;
|
||||
public $valorBase;
|
||||
|
||||
public $tarifa_id;
|
||||
|
||||
// Tarifa datos
|
||||
public $servicio_id;
|
||||
public $plan_id;
|
||||
@@ -45,6 +49,7 @@ class ShowTarifas extends Component
|
||||
public function render()
|
||||
{
|
||||
$this->planes = Tarifas::where('servicio_id', $this->servicio_id)->where('rol_id', Auth::user()->rol->id)->where('estado', 'activo')->get();
|
||||
$this->promociones = TarifaPromo::where('promocion_id', $this->promocion_id)->where('rol_id', Auth::user()->rol->id)->where('visible', 'activo')->get();
|
||||
|
||||
if ($this->modTarifas) {
|
||||
$this->tarifas = Tarifas::where('servicio_id', $this->servicio_id)->where('rol_id', $this->rol_id)->where('estado', 'activo')->get();
|
||||
@@ -52,7 +57,6 @@ class ShowTarifas extends Component
|
||||
if ($this->modTarifasPromo) {
|
||||
$this->tarifas = TarifaPromo::where('promocion_id', $this->promocion_id)->where('rol_id', $this->rol_id)->where('visible', 'activo')->get();
|
||||
}
|
||||
$this->promociones = TarifaPromo::where('promocion_id', $this->promocion_id)->where('rol_id', Auth::user()->rol->id)->where('visible', 'activo')->get();
|
||||
|
||||
return view('livewire.show-tarifas', [
|
||||
'roles' => Role::where('subvendedor_id', auth()->user()->id)->get(),
|
||||
@@ -151,7 +155,6 @@ class ShowTarifas extends Component
|
||||
$this->alert('success', '¡Tarifas creada correctamente!', [
|
||||
'position' => 'top'
|
||||
]);
|
||||
|
||||
} else {
|
||||
$this->alert('error', 'Error inesperado', [
|
||||
'position' => 'top'
|
||||
@@ -202,7 +205,6 @@ class ShowTarifas extends Component
|
||||
$this->alert('success', '¡Tarifas creada correctamente!', [
|
||||
'position' => 'top'
|
||||
]);
|
||||
|
||||
} else {
|
||||
$this->alert('error', 'Error inesperado', [
|
||||
'position' => 'top'
|
||||
@@ -212,16 +214,162 @@ class ShowTarifas extends Component
|
||||
}
|
||||
}
|
||||
|
||||
public function limpiarInputs(){
|
||||
public function editarTarifa($id)
|
||||
{
|
||||
$tarifa = Tarifas::find($id);
|
||||
if ($tarifa) {
|
||||
$this->editarTarifa = true;
|
||||
$this->servicio_id = $tarifa->servicio_id;
|
||||
$this->precio = $tarifa->valor;
|
||||
$this->utilidad = $tarifa->utilidad;
|
||||
$this->estado = $tarifa->estado == 'activo';
|
||||
$this->plan_id = $tarifa->plan_id;
|
||||
$this->rol_id = $tarifa->rol_id;
|
||||
$this->valorBase = $tarifa->valor - $tarifa->utilidad;
|
||||
$this->tarifa_id = $tarifa->id;
|
||||
} else {
|
||||
$this->tarifa_id = null;
|
||||
|
||||
$this->alert('error', 'Tarifa no encontrada', [
|
||||
'position' => 'top'
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function editarTarifaPromo($id)
|
||||
{
|
||||
$tarifa = TarifaPromo::find($id);
|
||||
if ($tarifa) {
|
||||
$this->editarTarifaPromo = true;
|
||||
$this->promocion_id = $tarifa->promocion_id;
|
||||
$this->precio = $tarifa->precio;
|
||||
$this->utilidad = $tarifa->utilidad;
|
||||
$this->estado = $tarifa->visible == 'activo';
|
||||
$this->plan_id = $tarifa->plan_id;
|
||||
$this->rol_id = $tarifa->rol_id;
|
||||
$this->valorBase = $tarifa->precio - $tarifa->utilidad;
|
||||
$this->tarifa_id = $tarifa->id;
|
||||
} else {
|
||||
$this->tarifa_id = null;
|
||||
|
||||
$this->alert('error', 'Tarifa no encontrada', [
|
||||
'position' => 'top'
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function actualizarTarifa()
|
||||
{
|
||||
$tarifa = Tarifas::find($this->tarifa_id);
|
||||
|
||||
if (!$tarifa) {
|
||||
$this->alert('error', 'Tarifa no encontrada', [
|
||||
'position' => 'top'
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
$this->validate([
|
||||
'precio' => 'required|numeric',
|
||||
'utilidad' => 'required',
|
||||
'estado' => 'required',
|
||||
'rol_id' => 'required',
|
||||
], [
|
||||
'precio.required' => 'El campo precio es obligatorio',
|
||||
'utilidad.required' => 'El campo utilidad es obligatorio',
|
||||
'estado.required' => 'El campo estado es obligatorio',
|
||||
'rol_id.required' => 'El campo rol es obligatorio',
|
||||
]);
|
||||
|
||||
if ($this->precio < $this->valorBase) {
|
||||
$this->alert('error', 'El precio no puede ser menor al valor base', [
|
||||
'position' => 'top'
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
$tarifa->update([
|
||||
'valor' => $this->precio,
|
||||
'utilidad' => $this->utilidad,
|
||||
'estado' => $this->estado ? 'activo' : 'inactivo',
|
||||
'rol_id' => $this->rol_id,
|
||||
]);
|
||||
|
||||
$this->limpiarEditarInputs();
|
||||
|
||||
$this->alert('success', '¡Tarifa actualizada correctamente!', [
|
||||
'position' => 'top'
|
||||
]);
|
||||
}
|
||||
public function actualizarTarifaPromo()
|
||||
{
|
||||
$tarifa = TarifaPromo::find($this->tarifa_id);
|
||||
|
||||
if (!$tarifa) {
|
||||
$this->alert('error', 'Tarifa no encontrada', [
|
||||
'position' => 'top'
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
$this->validate([
|
||||
'precio' => 'required|numeric',
|
||||
'utilidad' => 'required',
|
||||
'estado' => 'required',
|
||||
'rol_id' => 'required',
|
||||
], [
|
||||
'precio.required' => 'El campo precio es obligatorio',
|
||||
'utilidad.required' => 'El campo utilidad es obligatorio',
|
||||
'estado.required' => 'El campo estado es obligatorio',
|
||||
'rol_id.required' => 'El campo rol es obligatorio',
|
||||
]);
|
||||
|
||||
if ($this->precio < $this->valorBase) {
|
||||
$this->alert('error', 'El precio no puede ser menor al valor base', [
|
||||
'position' => 'top'
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
$tarifa->update([
|
||||
'precio' => $this->precio,
|
||||
'utilidad' => $this->utilidad,
|
||||
'visible' => $this->estado ? 'activo' : 'inactivo',
|
||||
'rol_id' => $this->rol_id,
|
||||
]);
|
||||
|
||||
$this->limpiarEditarInputs();
|
||||
|
||||
$this->alert('success', '¡Tarifa actualizada correctamente!', [
|
||||
'position' => 'top'
|
||||
]);
|
||||
}
|
||||
|
||||
public function limpiarEditarInputs()
|
||||
{
|
||||
$this->editarTarifa = false;
|
||||
$this->editarTarifaPromo = false;
|
||||
|
||||
$this->valorBase = null;
|
||||
$this->estado = true;
|
||||
$this->tarifa_id = null;
|
||||
}
|
||||
public function limpiarInputs()
|
||||
{
|
||||
$this->modTarifas = false;
|
||||
$this->modTarifasPromo = false;
|
||||
$this->editarTarifa = false;
|
||||
$this->editarTarifaPromo = false;
|
||||
|
||||
$this->servicio_id = null;
|
||||
$this->promocion_id = null;
|
||||
|
||||
$this->precio = null;
|
||||
$this->utilidad = null;
|
||||
$this->estado = true;
|
||||
$this->plan_id = null;
|
||||
$this->rol_id = null;
|
||||
$this->valorBase = null;
|
||||
$this->tarifa_id = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@ class TarifaPromo extends Model
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'precio',
|
||||
'utilidad',
|
||||
'promocion_id',
|
||||
'rol_id',
|
||||
'precio',
|
||||
'visible',
|
||||
'subvendedor_id',
|
||||
];
|
||||
|
||||
@@ -793,8 +793,7 @@
|
||||
</div>
|
||||
<div class="mb-3 mt-3 flex justify-end">
|
||||
<span>
|
||||
<button wire:click="updateTarifas" type="button"
|
||||
class="inline-flex justify-center w-full md:w-auto rounded-md border border-transparent px-4 py-1 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</button>
|
||||
<button wire:click="updateTarifas" type="button" class="inline-flex justify-center w-full md:w-auto rounded-md border border-transparent px-4 py-1 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</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -900,22 +899,17 @@
|
||||
|
||||
<div class="flex m-auto items-center">
|
||||
<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 class="mb-3 mt-3 flex justify-end">
|
||||
<span>
|
||||
<button wire:click="actualizarTarifaRol('{{ $informacionTarifaRol['id'] }}')"
|
||||
type="button"
|
||||
class="inline-flex justify-center w-full md:w-auto rounded-md border border-transparent px-4 py-1 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Actualizar</button>
|
||||
<button wire:click="actualizarTarifaRol('{{ $informacionTarifaRol['id'] }}')" type="button" class="inline-flex justify-center w-full md:w-auto rounded-md border border-transparent px-4 py-1 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Actualizar</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<div x-data="{
|
||||
modTarifas : @entangle('modTarifas'),
|
||||
modTarifasPromo: @entangle('modTarifasPromo'),
|
||||
modTarifas : @entangle('modTarifas'),
|
||||
modTarifasPromo : @entangle('modTarifasPromo'),
|
||||
editarTarifa : @entangle('editarTarifa'),
|
||||
editarTarifaPromo: @entangle('editarTarifaPromo'),
|
||||
}" 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="guardarTarifa,limpiarInputs">
|
||||
<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="guardarTarifa,guardarTarifaPromo,editarTarifa,editarTarifaPromo,actualizarTarifa,actualizarTarifaPromo,limpiarEditarInputs,limpiarInputs">
|
||||
<div class="grid h-full place-items-center">
|
||||
<div class="max-w-xs">
|
||||
<img src="./img/loading.gif" alt="" class="w-full text-center">
|
||||
@@ -46,7 +48,7 @@ modTarifasPromo: @entangle('modTarifasPromo'),
|
||||
|
||||
<div x-cloak x-show="modTarifas" 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="fixed backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full z-20">
|
||||
<div class="grid h-full place-items-center">
|
||||
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 rounded-2xl shadow-md max-w-7xl mx-4">
|
||||
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 rounded-2xl shadow-md max-w-7xl mx-8">
|
||||
<div class="mb-4">
|
||||
<select name="servicio_id" id="servicio_id" name="servicio_id" wire:model="servicio_id" class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-[72%] sm:w-60 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
|
||||
<option value="" selected>Servicios</option>
|
||||
@@ -128,7 +130,7 @@ modTarifasPromo: @entangle('modTarifasPromo'),
|
||||
<td class="pl-[1rem]">{{ $tarifa->dias ?? '' }}</td>
|
||||
<td class="pl-[1rem]">{{ number_format($tarifa->utilidad ?? 0) }}</td>
|
||||
<td class="pl-[1rem]">
|
||||
{{-- <button wire:click="editarTarifa({{ $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="editarTarifa('{{ $tarifa->id }}')" class="justify-center flex px-3 py-2 rounded-lg text-xs cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]">Editar</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@@ -139,7 +141,7 @@ modTarifasPromo: @entangle('modTarifasPromo'),
|
||||
|
||||
<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="modTarifas=false" wire:click="guardarTarifa" type="button" class="justify-center w-full md:w-auto rounded-md border border-transparent px-4 py-1 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 flex items-center">Cerrar</button>
|
||||
<button x-on:click="modTarifas=false" wire:click="limpiarInputs" type="button" class="justify-center w-full md:w-auto rounded-md border border-transparent px-4 py-1 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 flex items-center">Cerrar</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -226,7 +228,7 @@ modTarifasPromo: @entangle('modTarifasPromo'),
|
||||
<td class="pl-[1rem]">{{ number_format($tarifa->precio) ?? 0 }}</td>
|
||||
<td class="pl-[1rem]">{{ number_format($tarifa->utilidad) ?? 0 }}</td>
|
||||
<td class="pl-[1rem]">
|
||||
{{-- <button wire:click="editarTarifaPromo({{ $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="editarTarifaPromo('{{ $tarifa->id }}')" class="justify-center flex px-3 py-2 rounded-lg text-xs cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]">Editar</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@@ -237,7 +239,7 @@ modTarifasPromo: @entangle('modTarifasPromo'),
|
||||
|
||||
<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="modTarifasPromo=false" wire:click="" type="button"
|
||||
<button x-on:click="modTarifasPromo=false" wire:click="limpiarInputs" 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>
|
||||
</div>
|
||||
@@ -246,5 +248,89 @@ modTarifasPromo: @entangle('modTarifasPromo'),
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div x-cloak x-show="editarTarifa" 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="fixed backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full z-20">
|
||||
<div class="grid h-full place-items-center">
|
||||
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 rounded-2xl shadow-md max-w-5xl mx-4">
|
||||
<div>
|
||||
<label class="block text-gray-700 text-sm font-bold mb-2">Pantallas:</label>
|
||||
<div class="grid grid-cols-6 gap-2 text-left mb-4">
|
||||
<div>
|
||||
<label for="rol_id" class="text-gray-500 text-sm">Rol</label>
|
||||
<select id="rol_id" name="rol_id" wire:model="rol_id" 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">
|
||||
<option value="" selected>Roles</option>
|
||||
@foreach ($roles as $rol)
|
||||
<option value="{{ $rol->id }}">{{ $rol->nombre ?? '' }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label for="precio" class="text-gray-500 text-sm">Precio</label>
|
||||
<input type="number" id="precio" name="precio" wire:model.debounce.300ms="precio" min="0" class="w-full border-2 border-neutral-200 rounded-[0.8rem] focus:ring-0 shadow apperance-none focus:border-neutral-300 py-2 pl-2 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
|
||||
</div>
|
||||
<div>
|
||||
<label for="utilidad" class="text-gray-500 text-sm">Utilidad</label>
|
||||
<input disabled type="number" id="utilidad" name="utilidad" wire:model="utilidad" min="0" class="w-full border-2 border-neutral-200 rounded-[0.8rem] focus:ring-0 shadow apperance-none focus:border-neutral-300 py-2 pl-2 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
|
||||
</div>
|
||||
<div class="flex m-auto items-center">
|
||||
<label for="estado" class="text-gray-500 text-sm mr-2">Activa</label>
|
||||
<input type="checkbox" id="estado" name="estado" wire:model="estado" checked 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 class="mb-3 mt-3 flex justify-end">
|
||||
<button wire:click="actualizarTarifa" type="button" class="inline-flex justify-center w-full md:w-auto rounded-md border border-transparent px-4 py-1 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Actualizar</button>
|
||||
</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 wire:click="limpiarEditarInputs" x-on:click="editarTarifa=false" type="button" class="justify-center w-full md:w-auto rounded-md border border-transparent px-4 py-1 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 flex items-center">Cerrar</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div x-cloak x-show="editarTarifaPromo" 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="fixed backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full z-20">
|
||||
<div class="grid h-full place-items-center">
|
||||
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 rounded-2xl shadow-md max-w-5xl mx-4">
|
||||
<div>
|
||||
<label class="block text-gray-700 text-sm font-bold mb-2">Pantallas:</label>
|
||||
<div class="grid grid-cols-6 gap-2 text-left mb-4">
|
||||
<div>
|
||||
<label for="rol_id" class="text-gray-500 text-sm">Rol</label>
|
||||
<select id="rol_id" name="rol_id" wire:model="rol_id" 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">
|
||||
<option value="" selected>Roles</option>
|
||||
@foreach ($roles as $rol)
|
||||
<option value="{{ $rol->id }}">{{ $rol->nombre ?? '' }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label for="precio" class="text-gray-500 text-sm">Precio</label>
|
||||
<input type="number" id="precio" name="precio" wire:model.debounce.300ms="precio" min="0" class="w-full border-2 border-neutral-200 rounded-[0.8rem] focus:ring-0 shadow apperance-none focus:border-neutral-300 py-2 pl-2 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
|
||||
</div>
|
||||
<div>
|
||||
<label for="utilidad" class="text-gray-500 text-sm">Utilidad</label>
|
||||
<input disabled type="number" id="utilidad" name="utilidad" wire:model="utilidad" min="0" class="w-full border-2 border-neutral-200 rounded-[0.8rem] focus:ring-0 shadow apperance-none focus:border-neutral-300 py-2 pl-2 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
|
||||
</div>
|
||||
<div class="flex m-auto items-center">
|
||||
<label for="estado" class="text-gray-500 text-sm mr-2">Activa</label>
|
||||
<input type="checkbox" id="estado" name="estado" wire:model="estado" checked 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 class="mb-3 mt-3 flex justify-end">
|
||||
<button wire:click="actualizarTarifaPromo" type="button" class="inline-flex justify-center w-full md:w-auto rounded-md border border-transparent px-4 py-1 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Actualizar</button>
|
||||
</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 wire:click="limpiarEditarInputs" x-on:click="editarTarifaPromo=false" type="button" class="justify-center w-full md:w-auto rounded-md border border-transparent px-4 py-1 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 flex items-center">Cerrar</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user