editar tarifas promociones
This commit is contained in:
@@ -61,7 +61,9 @@ class ShowUsuarios extends Component
|
|||||||
public $usuario_nombre;
|
public $usuario_nombre;
|
||||||
public $precioTarifa;
|
public $precioTarifa;
|
||||||
public $tarifasGestion;
|
public $tarifasGestion;
|
||||||
public $estadoTarifa;
|
|
||||||
|
public $estadoTarifa = true;
|
||||||
|
|
||||||
public $usuarioGestion_id;
|
public $usuarioGestion_id;
|
||||||
public $precioTarifasGestion;
|
public $precioTarifasGestion;
|
||||||
public $buscar_servicio;
|
public $buscar_servicio;
|
||||||
@@ -81,7 +83,8 @@ class ShowUsuarios extends Component
|
|||||||
public $modTarifas;
|
public $modTarifas;
|
||||||
public $modalSaldoDesc;
|
public $modalSaldoDesc;
|
||||||
|
|
||||||
|
public $editarTarifaRol = false;
|
||||||
|
public $informacionTarifaRol;
|
||||||
|
|
||||||
protected $rules = [
|
protected $rules = [
|
||||||
'nombre' => 'required',
|
'nombre' => 'required',
|
||||||
@@ -259,6 +262,54 @@ class ShowUsuarios extends Component
|
|||||||
|
|
||||||
$this->editar = true;
|
$this->editar = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function editarTarifa($tarifa)
|
||||||
|
{
|
||||||
|
$this->editarTarifaRol = true;
|
||||||
|
|
||||||
|
$this->informacionTarifaRol = $tarifa;
|
||||||
|
|
||||||
|
$this->roles_modTarifas = $tarifa['rol_id'];
|
||||||
|
$this->precio_modTarifas = $tarifa['precio'];
|
||||||
|
$this->utilidad = $tarifa['utilidad'];
|
||||||
|
$this->estadoTarifa = $tarifa['visible'] == 'activo' ? 1 : 0;
|
||||||
|
$this->servicio_modTarifas = $tarifa['promocion_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function actualizarTarifaRol($id)
|
||||||
|
{
|
||||||
|
if (empty($this->roles_modTarifas)) {
|
||||||
|
$this->alert('warning', '¡Seleccione un rol!', [
|
||||||
|
'position' => 'top'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
if (empty($this->precio_modTarifas)) {
|
||||||
|
$this->alert('warning', '¡Coloque un precio!', [
|
||||||
|
'position' => 'top'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
if (empty($this->utilidad)) {
|
||||||
|
$this->alert('warning', '¡Coloque una utilidad!', [
|
||||||
|
'position' => 'top'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
TarifaPromo::find($id)->update([
|
||||||
|
'precio' => $this->precio_modTarifas,
|
||||||
|
'utilidad' => $this->utilidad,
|
||||||
|
'visible' => $this->estadoTarifa == 1 ? 'activo' : 'inactivo',
|
||||||
|
'rol_id' => $this->roles_modTarifas,
|
||||||
|
'promocion_id' => $this->servicio_modTarifas
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->alert('success', 'Tarifa actualizada con exito!', [
|
||||||
|
'position' => 'top'
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->editarTarifaRol = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function actualizar()
|
public function actualizar()
|
||||||
{
|
{
|
||||||
$this->validate(
|
$this->validate(
|
||||||
@@ -324,7 +375,7 @@ class ShowUsuarios extends Component
|
|||||||
$usuarioTarifa->utilidad = $this->utilidad;
|
$usuarioTarifa->utilidad = $this->utilidad;
|
||||||
$usuarioTarifa->tarifa_id = $this->tarifasGestion;
|
$usuarioTarifa->tarifa_id = $this->tarifasGestion;
|
||||||
$usuarioTarifa->usuario_id = $this->usuarioGestion_id;
|
$usuarioTarifa->usuario_id = $this->usuarioGestion_id;
|
||||||
$usuarioTarifa->visible = $this->estadoTarifa ? 'false' : 'true';
|
$usuarioTarifa->visible = $this->estadoTarifa ? 'activo' : 'inactivo';
|
||||||
$usuarioTarifa->save();
|
$usuarioTarifa->save();
|
||||||
|
|
||||||
$this->alert('success', '¡Tarifas del usuario actualizadas correctamente!', [
|
$this->alert('success', '¡Tarifas del usuario actualizadas correctamente!', [
|
||||||
@@ -516,38 +567,42 @@ class ShowUsuarios extends Component
|
|||||||
/* ------------- ACTUALIZAR ------------- */
|
/* ------------- ACTUALIZAR ------------- */
|
||||||
public function updateTarifas()
|
public function updateTarifas()
|
||||||
{
|
{
|
||||||
|
$consulta_existe = TarifaPromo::where('promocion_id', $this->servicio_modTarifas)
|
||||||
|
->where('rol_id', $this->roles_modTarifas)
|
||||||
|
->exists();
|
||||||
|
|
||||||
$consulta_existe = TarifaPromo::where('promocion_id', $this->servicio_modTarifas)->where('rol_id', $this->roles_modTarifas)->get();
|
if ($consulta_existe) {
|
||||||
//dd($consulta_existe);
|
$this->alert('warning', '¡Esta tarifa ya existe!', [
|
||||||
|
'position' => 'top'
|
||||||
if (empty($this->servicio_modTarifas)) {
|
]);
|
||||||
$this->alert('warning', 'Seleccione una promocion!', [
|
} elseif (empty($this->servicio_modTarifas)) {
|
||||||
|
$this->alert('warning', '¡Seleccione una promocion!', [
|
||||||
|
'position' => 'top'
|
||||||
|
]);
|
||||||
|
} elseif (empty($this->precio_modTarifas)) {
|
||||||
|
$this->alert('warning', '¡Coloque un precio!', [
|
||||||
|
'position' => 'top'
|
||||||
|
]);
|
||||||
|
} elseif (empty($this->utilidad)) {
|
||||||
|
$this->alert('warning', '¡Coloque la utilidad!', [
|
||||||
'position' => 'top'
|
'position' => 'top'
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
|
$tarifa = new TarifaPromo;
|
||||||
|
$tarifa->utilidad = $this->utilidad;
|
||||||
|
$tarifa->promocion_id = $this->servicio_modTarifas;
|
||||||
|
$tarifa->rol_id = $this->roles_modTarifas;
|
||||||
|
$tarifa->precio = $this->precio_modTarifas;
|
||||||
|
$tarifa->visible = $this->estadoTarifa ? 'activo' : 'inactivo';
|
||||||
|
$tarifa->save();
|
||||||
|
|
||||||
if ($consulta_existe->count() > 0) {
|
$this->alert('success', '¡Tarifas actualizadas correctamente!', [
|
||||||
|
'position' => 'top'
|
||||||
$this->alert('warning', 'Esta tarifa ya existe!', [
|
]);
|
||||||
'position' => 'top'
|
|
||||||
]);
|
|
||||||
} else {
|
|
||||||
$tarifa = new TarifaPromo;
|
|
||||||
$tarifa->precio = $this->precio_modTarifas;
|
|
||||||
$tarifa->utilidad = $this->utilidad;
|
|
||||||
$tarifa->promocion_id = $this->servicio_modTarifas;
|
|
||||||
$tarifa->rol_id = $this->roles_modTarifas;
|
|
||||||
$tarifa->save();
|
|
||||||
|
|
||||||
$this->alert('success', 'Tarifas actualizadas correctamente!', [
|
|
||||||
'position' => 'top'
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------- ELIMINAR ------------- */
|
/* ------------- ELIMINAR ------------- */
|
||||||
|
|
||||||
public function eliminarModTarifa($id)
|
public function eliminarModTarifa($id)
|
||||||
{
|
{
|
||||||
TarifaPromo::where('id', $id)->delete();
|
TarifaPromo::where('id', $id)->delete();
|
||||||
|
|||||||
@@ -8,12 +8,13 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
class TarifaPromo extends Model
|
class TarifaPromo extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
|
'utilidad',
|
||||||
'promocion_id',
|
'promocion_id',
|
||||||
'rol_id',
|
'rol_id',
|
||||||
'precio',
|
'precio',
|
||||||
'visible',
|
'visible',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
public function rol(){
|
public function rol(){
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ class Usuario_tarifa extends Model
|
|||||||
'precio',
|
'precio',
|
||||||
'utilidad',
|
'utilidad',
|
||||||
'visible',
|
'visible',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
public function usuario(){
|
public function usuario(){
|
||||||
|
|||||||
@@ -6,43 +6,33 @@ use Illuminate\Support\Facades\Schema;
|
|||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('usuario_tarifas', function (Blueprint $table) {
|
Schema::create('usuario_tarifas', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table -> string('precio')->nullable();
|
$table->string('precio')->nullable();
|
||||||
$table -> string('visible')->nullable();
|
$table->string('visible')->nullable();
|
||||||
|
|
||||||
$table->unsignedBigInteger('tarifa_id')->nullable();
|
$table->unsignedBigInteger('tarifa_id')->nullable();
|
||||||
|
|
||||||
$table->foreign('tarifa_id')
|
$table->foreign('tarifa_id')
|
||||||
->references('id')
|
->references('id')
|
||||||
->on('tarifas')
|
->on('tarifas')
|
||||||
->onDelete('cascade')
|
->onDelete('cascade')
|
||||||
->onUpdate('cascade');
|
->onUpdate('cascade');
|
||||||
|
|
||||||
$table->unsignedBigInteger('usuario_id')->nullable();
|
$table->unsignedBigInteger('usuario_id')->nullable();
|
||||||
|
|
||||||
$table->foreign('usuario_id')
|
$table->foreign('usuario_id')
|
||||||
->references('id')
|
->references('id')
|
||||||
->on('users')
|
->on('users')
|
||||||
->onDelete('cascade')
|
->onDelete('cascade')
|
||||||
->onUpdate('cascade');
|
->onUpdate('cascade');
|
||||||
|
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('usuario_tarifas');
|
Schema::dropIfExists('usuario_tarifas');
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<div class=" bg-gray-100">
|
<div class=" bg-gray-100">
|
||||||
|
|
||||||
<div class="md:px-10 py-8 ">
|
<div class="md:px-10 py-8 ">
|
||||||
|
|
||||||
<h1 class="ml-2 text-xl sm:text-2xl font-black">
|
<h1 class="ml-2 text-xl sm:text-2xl font-black">
|
||||||
{{$servicio->nombre}}
|
{{$servicio->nombre}}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
<div class="md:grid md:grid-cols-4 md:items-center ">
|
<div class="md:grid md:grid-cols-4 md:items-center ">
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<img src="{{asset($servicio->img_inicio) }}" alt="" class="rounded-xl md:w-[100%]">
|
<img src="{{asset($servicio->img_inicio) }}" alt="" class="rounded-xl md:w-[100%]">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="px-8 mb-4 md:mb-0 md:border-r md:mr-6 max-w-xs">
|
<div class="px-8 mb-4 md:mb-0 md:border-r md:mr-6 max-w-xs">
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
@if($servicio->nombre == 'Youtube Premium' || $servicio->nombre== 'Spotify Premium')
|
@if($servicio->nombre == 'Youtube Premium' || $servicio->nombre== 'Spotify Premium')
|
||||||
@@ -33,35 +33,35 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
@if (!empty($disponibles))
|
@if (!empty($disponibles))
|
||||||
<p class="italic text-green-500">
|
<p class="italic text-green-500">
|
||||||
{{$disponibles ?? ''}} Cuentas disponibles.
|
{{$disponibles ?? ''}} Cuentas disponibles.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<label class="block text-gray-700 font-bold mb-1">Cantidad</label>
|
<label class="block text-gray-700 font-bold mb-1">Cantidad</label>
|
||||||
<input type="tel" wire:model="cantidad_tarjetaPlan" class="@error('cantidad_tarjetaPlan') border border-red-500 @enderror border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full md:w-[72%] py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
|
<input type="tel" wire:model="cantidad_tarjetaPlan" class="@error('cantidad_tarjetaPlan') border border-red-500 @enderror border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full md:w-[72%] py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
|
||||||
@error('cantidad_tarjetaPlan') <span class="text-red-400 text-sm ">Requerido*</span> @enderror
|
@error('cantidad_tarjetaPlan') <span class="text-red-400 text-sm ">Requerido*</span> @enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<label class="block text-gray-700 font-bold mb-1">Descripción</label>
|
<label class="block text-gray-700 font-bold mb-1">Descripción</label>
|
||||||
<p class="text-gray-500 ">
|
<p class="text-gray-500 ">
|
||||||
{{$servicio->descripcion}}
|
{{$servicio->descripcion}}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (!empty($valor))
|
@if (!empty($valor))
|
||||||
<label class="block text-gray-700 font-bold mb-1">Precio</label>
|
<label class="block text-gray-700 font-bold mb-1">Precio</label>
|
||||||
<p class="font-bold text-lg"> ${{number_format( $valor ?? '')}}</p>
|
<p class="font-bold text-lg"> ${{number_format( $valor ?? '')}}</p>
|
||||||
@else
|
@else
|
||||||
|
|
||||||
|
|
||||||
<label class="block text-gray-700 font-bold mb-1">Precio</label>
|
<label class="block text-gray-700 font-bold mb-1">Precio</label>
|
||||||
@if ($servicio->tarifas_min_valor != $servicio->tarifas_max_valor)
|
@if ($servicio->tarifas_min_valor != $servicio->tarifas_max_valor)
|
||||||
<p class="font-bold text-lg"> {{number_format($servicio->tarifas_min_valor)}} - {{number_format($servicio->tarifas_max_valor)}}</p>
|
<p class="font-bold text-lg"> {{number_format($servicio->tarifas_min_valor)}} - {{number_format($servicio->tarifas_max_valor)}}</p>
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
<p class="font-bold text-lg"> {{number_format($servicio->tarifas_min_valor)}}</p>
|
<p class="font-bold text-lg"> {{number_format($servicio->tarifas_min_valor)}}</p>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
<input type="text" wire:model="nombre_tarjetaPlan" class="@error('nombre_tarjetaPlan') border border-red-500 @enderror border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
|
<input type="text" wire:model="nombre_tarjetaPlan" class="@error('nombre_tarjetaPlan') border border-red-500 @enderror 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_tarjetaPlan') <span class="text-red-400 text-sm ">Requerido*</span> @enderror
|
@error('nombre_tarjetaPlan') <span class="text-red-400 text-sm ">Requerido*</span> @enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<label class="block text-gray-700 font-bold mb-1">Email</label>
|
<label class="block text-gray-700 font-bold mb-1">Email</label>
|
||||||
<input type="text" wire:model="email_tarjetaPlan" class="@error('email_tarjetaPlan') border border-red-500 @enderror border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
|
<input type="text" wire:model="email_tarjetaPlan" class="@error('email_tarjetaPlan') border border-red-500 @enderror 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">
|
||||||
@@ -94,19 +94,19 @@
|
|||||||
|
|
||||||
<div class="px-4 py-3 sm:px-6 sm:flex sm:justify-evenly">
|
<div class="px-4 py-3 sm:px-6 sm:flex sm:justify-evenly">
|
||||||
<span>
|
<span>
|
||||||
<button wire:click="comprar" @if ($cantidad_tarjetaPlan <= (int)$disponibles )
|
<button wire:click="comprar" @if ($cantidad_tarjetaPlan <= (int)$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"
|
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
|
@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>Pagar</button>
|
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>Pagar</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -136,11 +136,11 @@ class="cursor-no-drop inline-flex justify-center w-full rounded-md border border
|
|||||||
<p class="font-bold text-base"> {{number_format($plan->tarifas_min_valor)}}</p>
|
<p class="font-bold text-base"> {{number_format($plan->tarifas_min_valor)}}</p>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly mb-2">
|
<div class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly mb-2">
|
||||||
|
|
||||||
<button type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-1 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Comprar</button>
|
<button type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-1 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Comprar</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -596,9 +596,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{{-- Modal newCuenta --}}
|
{{-- Modal newCuenta --}}
|
||||||
|
|
||||||
<div x-cloak x-show="newCuenta" x-transition:enter="transition duration-350"
|
<div x-cloak x-show="newCuenta" x-transition:enter="transition duration-350"
|
||||||
x-transition:enter-start="opacity-0 scale-100" x-transition:enter-end="opacity-100 scale-100"
|
x-transition:enter-start="opacity-0 scale-100" x-transition:enter-end="opacity-100 scale-100"
|
||||||
x-transition:leave="transition duration-350" x-transition:leave-start="opacity-100 scale-100"
|
x-transition:leave="transition duration-350" x-transition:leave-start="opacity-100 scale-100"
|
||||||
@@ -698,10 +696,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{-- Modal tarifas --}}
|
{{-- Modal tarifas --}}
|
||||||
|
|
||||||
<div x-cloak x-show="modTarifas" x-transition:enter="transition duration-350"
|
<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:enter-start="opacity-0 scale-100" x-transition:enter-end="opacity-100 scale-100"
|
||||||
x-transition:leave="transition duration-350" x-transition:leave-start="opacity-100 scale-100"
|
x-transition:leave="transition duration-350" x-transition:leave-start="opacity-100 scale-100"
|
||||||
@@ -808,9 +803,9 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="pl-[1rem]">{{ $tarifa->rol->nombre ?? '' }}</td>
|
<td class="pl-[1rem]">{{ $tarifa->rol->nombre ?? '' }}</td>
|
||||||
<td class="pl-[1rem]">{{ $tarifa->pantallas ?? '' }}</td>
|
<td class="pl-[1rem]">{{ $tarifa->pantallas ?? '' }}</td>
|
||||||
<td class="pl-[1rem]">{{ $tarifa->valor ?? '' }}</td>
|
<td class="pl-[1rem]">{{ number_format($tarifa->valor ?? 0) }}</td>
|
||||||
<td class="pl-[1rem]">{{ $tarifa->dias ?? '' }}</td>
|
<td class="pl-[1rem]">{{ $tarifa->dias ?? '' }}</td>
|
||||||
<td class="pl-[1rem]">{{ $tarifa->utilidad ?? '' }}</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>
|
||||||
@@ -999,6 +994,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@include('layouts.footer')
|
@include('layouts.footer')
|
||||||
<script>
|
<script>
|
||||||
function copiarAlPortapapeles(id_elemento) {
|
function copiarAlPortapapeles(id_elemento) {
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
modalPassword: @entangle('modalPassword'),
|
modalPassword: @entangle('modalPassword'),
|
||||||
modTarifas: @entangle('modTarifas'),
|
modTarifas: @entangle('modTarifas'),
|
||||||
modalSaldoDesc: @entangle('modalSaldoDesc'),
|
modalSaldoDesc: @entangle('modalSaldoDesc'),
|
||||||
|
editarTarifaRol: @entangle('editarTarifaRol'),
|
||||||
}" class="h-full w-full md:my-2">
|
}" class="h-full w-full md:my-2">
|
||||||
<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="gestionarPromociones,addpromos,eliminarUsuarioPromo,gestionar,eliminarUsuarioTarifa,addtarifas,crear,actualizar,editar,eliminar,limpiarInputAdd,limpiarInputEdit,editarPassword,limpiarContra,confirmarNewPassword,saldo,addSaldo">
|
wire:target="gestionarPromociones,actualizarTarifaRol,addpromos,eliminarUsuarioPromo,gestionar,eliminarUsuarioTarifa,addtarifas,crear,actualizar,editar,eliminar,limpiarInputAdd,limpiarInputEdit,editarPassword,limpiarContra,confirmarNewPassword,saldo,addSaldo">
|
||||||
<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">
|
||||||
@@ -22,9 +23,13 @@
|
|||||||
<div class="grid grid-cols-1 sm:flex justify-between my-2 items-center">
|
<div class="grid grid-cols-1 sm:flex justify-between my-2 items-center">
|
||||||
<div class="grid grid-cols-1 sm:flex items-center gap-3 md:gap-8">
|
<div class="grid grid-cols-1 sm:flex items-center gap-3 md:gap-8">
|
||||||
<div class="flex text-sm">
|
<div class="flex text-sm">
|
||||||
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" 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">
|
<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>
|
<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" />
|
<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>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
Usuario
|
Usuario
|
||||||
@@ -33,27 +38,35 @@
|
|||||||
<a x-on:click="add = !add"
|
<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
|
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"
|
||||||
<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" />
|
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>
|
</svg>
|
||||||
</a>
|
</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.
|
<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"
|
||||||
<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
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{-- Buscar --}}
|
{{-- Buscar --}}
|
||||||
<div class="flex relative">
|
<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">
|
<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>
|
</div>
|
||||||
|
|
||||||
{{-- -Tabla usuarios - --}}
|
{{-- -Tabla usuarios - --}}
|
||||||
@@ -634,7 +647,9 @@
|
|||||||
Monto a descontar
|
Monto a descontar
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<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">
|
<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">
|
||||||
|
|
||||||
<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) }}
|
||||||
@@ -661,7 +676,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Modal tarifas --}}
|
{{-- Modal tarifas --}}
|
||||||
|
|
||||||
<div x-cloak x-show="modTarifas" x-transition:enter="transition duration-350"
|
<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:enter-start="opacity-0 scale-100" x-transition:enter-end="opacity-100 scale-100"
|
||||||
x-transition:leave="transition duration-350" x-transition:leave-start="opacity-100 scale-100"
|
x-transition:leave="transition duration-350" x-transition:leave-start="opacity-100 scale-100"
|
||||||
@@ -681,38 +695,36 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="grid grid-cols-3 gap-2 text-left">
|
||||||
|
<div class="w-full">
|
||||||
|
<label class="text-gray-500 text-sm">Rol</label>
|
||||||
|
<select name="roles" id="roles" wire:model.debounce.500ms="roles_modTarifas" class="w-full border-2 border-neutral-200 rounded-lg 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">
|
||||||
|
<option value="" selected>Roles</option>
|
||||||
|
@foreach ($roles as $rol)
|
||||||
|
<option value="{{ $rol->id }}">{{ $rol->nombre ?? '' }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-2 gap-2 text-left">
|
<div class="w-full">
|
||||||
<div class="w-[9rem]">
|
<label class="text-gray-500 text-sm">Precio</label>
|
||||||
<label class="text-gray-500 text-sm">Rol</label>
|
<input type="number" id="precio_modTarifas" wire:model="precio_modTarifas" min="0" class="w-full border-2 border-neutral-200 rounded-lg 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">
|
||||||
<select name="roles" id="roles" wire:model.debounce.500ms="roles_modTarifas"
|
</div>
|
||||||
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 class="w-[8rem]">
|
<div class="w-full">
|
||||||
<label class="text-gray-500 text-sm">Precio</label>
|
<label class="text-gray-500 text-sm">Utilidad</label>
|
||||||
<input type="number" id="precio_modTarifas" wire:model="precio_modTarifas"
|
<input type="text" type="number" id="utilidad" wire:model="utilidad" min="0" class="w-full border-2 border-neutral-200 rounded-lg 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">
|
||||||
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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3 mt-3 flex gap-4 justify-end items-center">
|
<div class="mb-3 mt-3 flex gap-4 justify-end items-center">
|
||||||
<p class="font-semibold text-gray-500">
|
<div class="flex m-auto items-center">
|
||||||
Utilidad
|
<label class="text-gray-500 text-sm mr-2">Activa</label>
|
||||||
</p>
|
<input type="checkbox" id="estadoTarifa" wire:model="estadoTarifa" checked
|
||||||
<input placeholder="$12000" type="number" id="utilidad" wire:model="utilidad"
|
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">
|
||||||
min="0"
|
</div>
|
||||||
class="w-1/2 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">
|
|
||||||
<span>
|
<span>
|
||||||
<button wire:click="updateTarifas" type="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>
|
||||||
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>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -720,8 +732,11 @@
|
|||||||
<table class="w-full sm-w-[20rem] text-center mt-4 border-separate border-spacing-y-2 mb-4">
|
<table class="w-full sm-w-[20rem] text-center mt-4 border-separate border-spacing-y-2 mb-4">
|
||||||
<thead class="font-normal bg-[#000029] text-white h-9">
|
<thead class="font-normal bg-[#000029] text-white h-9">
|
||||||
<tr class="text-left">
|
<tr class="text-left">
|
||||||
<th class="rounded-l-lg font-normal pl-[1rem]">Rol</th>
|
<th class="rounded-l-lg font-normal pl-[1rem]">Estado</th>
|
||||||
|
<th class="font-normal pl-[1rem]">Rol</th>
|
||||||
<th class="font-normal pl-[1rem]">Valor</th>
|
<th class="font-normal pl-[1rem]">Valor</th>
|
||||||
|
<th class="font-normal pl-[1rem]">Utilidad</th>
|
||||||
|
<th class="font-normal pl-[1rem]"></th>
|
||||||
<th class="rounded-r-lg font-normal w-[1rem]"></th>
|
<th class="rounded-r-lg font-normal w-[1rem]"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -729,28 +744,18 @@
|
|||||||
@if (!empty($tarifas))
|
@if (!empty($tarifas))
|
||||||
@foreach ($tarifas as $tarifa)
|
@foreach ($tarifas as $tarifa)
|
||||||
<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-[1rem]">{{ $tarifa->rol->nombre ?? '' }}</td>
|
|
||||||
<td class="pl-[1rem]">{{ $tarifa->precio ?? '' }}</td>
|
|
||||||
<td class="pl-[1rem]">
|
<td class="pl-[1rem]">
|
||||||
<svg wire:click="eliminarModTarifa({{ $tarifa->id ?? '' }})"
|
@if ($tarifa->visible == 'activo')
|
||||||
xmlns="http://www.w3.org/2000/svg" version="1.1"
|
<div class="bg-green-500 rounded-full w-3 h-3"></div>
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
@else
|
||||||
xmlns:svgjs="http://svgjs.com/svgjs" class="w-6 cursor-pointer"
|
<div class="bg-red-500 rounded-full w-3 h-3"></div>
|
||||||
x="0" y="0" viewBox="0 0 24 24"
|
@endif
|
||||||
style="enable-background:new 0 0 512 512" xml:space="preserve"
|
</td>
|
||||||
class="">
|
<td class="pl-[1rem]">{{ $tarifa->rol->nombre ?? '' }}</td>
|
||||||
<g>
|
<td class="pl-[1rem]">{{ number_format($tarifa->precio) ?? 0 }}</td>
|
||||||
<g id="Flat_Color" data-name="Flat Color">
|
<td class="pl-[1rem]">{{ number_format($tarifa->utilidad) ?? 0 }}</td>
|
||||||
<circle cx="12" cy="12" fill="#e63946"
|
<td class="pl-[1rem]">
|
||||||
r="10" data-original="#e63946" class="">
|
<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>
|
||||||
</circle>
|
|
||||||
<path
|
|
||||||
d="m13.41 12 2.3-2.29a1 1 0 0 0 -1.42-1.42l-2.29 2.3-2.29-2.3a1 1 0 0 0 -1.42 1.42l2.3 2.29-2.3 2.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l2.29-2.3 2.29 2.3a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42z"
|
|
||||||
fill="#edebea" data-original="#edebea"
|
|
||||||
class=""></path>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -759,13 +764,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-4 grid grid-cols-2">
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly gap-5 mt-4">
|
<div class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly gap-5 mt-4">
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
<button x-on:click="modTarifas=false" wire:click="" type="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>
|
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>
|
||||||
@@ -776,5 +775,69 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div x-cloak x-show="editarTarifaRol" 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-[1rem] shadow-md">
|
||||||
|
@if ($informacionTarifaRol)
|
||||||
|
<div>
|
||||||
|
<label class="block text-gray-700 text-sm font-bold mb-2">Pantallas:</label>
|
||||||
|
<div class="grid grid-cols-3 gap-2 text-left mb-4">
|
||||||
|
<div class="w-[6rem]">
|
||||||
|
<label class="text-gray-500 text-sm">Rol</label>
|
||||||
|
<select name="roles" id="roles" wire:model.debounce.500ms="roles_modTarifas"
|
||||||
|
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 class="w-[6rem]">
|
||||||
|
<label class="text-gray-500 text-sm">Precio</label>
|
||||||
|
<input type="number" id="precio_modTarifas" wire:model="precio_modTarifas"
|
||||||
|
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="w-[6rem]">
|
||||||
|
<label class="text-gray-500 text-sm">Utilidad</label>
|
||||||
|
<input type="number" id="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>
|
||||||
|
|
||||||
|
<div class="mb-4 grid grid-cols-2">
|
||||||
|
<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">
|
||||||
|
</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>
|
||||||
|
</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>
|
||||||
|
<button x-on:click="editarTarifaRol=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>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user