logpromociones y menu mas arriba
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Models\Configuracione;
|
||||
use App\Models\Cuentas;
|
||||
use App\Models\Historial_cuenta;
|
||||
use App\Models\Historiale;
|
||||
use App\Models\Log_general;
|
||||
use App\Models\Pendientes;
|
||||
use App\Models\Promocion_tarifa;
|
||||
use App\Models\Promociones;
|
||||
@@ -207,6 +208,8 @@ class ShowPromociones extends Component
|
||||
|
||||
public function pagar()
|
||||
{
|
||||
dd($this->consulta);
|
||||
|
||||
$this->validate();
|
||||
|
||||
if ($this->cantidad_comprarPromo == 0) {
|
||||
@@ -331,8 +334,6 @@ class ShowPromociones extends Component
|
||||
'confirmButtonText' => 'Sí, comprar.',
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
$descuento = Saldo::where('usuario_id', Auth::user()->id)->first();
|
||||
$saldo_anterior = $descuento->valor;
|
||||
@@ -341,6 +342,12 @@ class ShowPromociones extends Component
|
||||
|
||||
if ($cobro) {
|
||||
$historial->update(['estado' => 'activo']);
|
||||
|
||||
$logsGeneral = new Log_general();
|
||||
$logsGeneral->user_id = Auth::user()->id;
|
||||
$logsGeneral->detalle = 'El usuario ' . Auth::user()->name . ' - ' . Auth::user()->email . ' ha comprado la promocion ' . $this->consulta->nombre . ' - ' . $this->consulta->descripcion . ' cantidad de ' . $this->historial->cantidad ?? '' . ' por un valor de $' . $this->historial->valor ?? '';
|
||||
$logsGeneral->save();
|
||||
|
||||
$this->modalComprarPromo = false;
|
||||
$this->credenciales($historial);
|
||||
} else {
|
||||
@@ -376,6 +383,11 @@ class ShowPromociones extends Component
|
||||
}
|
||||
}
|
||||
|
||||
$logsGeneral = new Log_general();
|
||||
$logsGeneral->user_id = Auth::user()->id;
|
||||
$logsGeneral->detalle = 'El usuario ' . Auth::user()->name . ' - ' . Auth::user()->email . ' ha comprado la promocion ' . $this->consulta->nombre . ' - ' . $this->consulta->descripcion . ' cantidad de ' . $this->historial->cantidad ?? '' . ' por un valor de $' . $this->historial->valor ?? '' . ' y algunos han quedado pendientes';
|
||||
$logsGeneral->save();
|
||||
|
||||
$this->credenciales($this->historial);
|
||||
} else {
|
||||
Historial_cuenta::whereIn('id', $this->n)->delete();
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<ul class="relative shadow-md block w-11/12 mx-auto select-none " x-data="{ selected: null }">
|
||||
<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">Admin</h4>
|
||||
<p class="absolute bg-[#f2f4ff] rounded-md @if (auth()->user()->rol->nombre == 'editor') -top-[30%] @elseif (auth()->user()->rol->nombre == 'administrador') -top-[150%] @else -top-[250%] @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-[800%] @else -top-[800%] @endif -right-[20%] sm:-right-[55%]" x-show="selected == 0">
|
||||
@if (auth()->user()->rol->nombre == 'super' || auth()->user()->rol->nombre == 'administrador' || auth()->user()->rol->nombre == '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('planes') }}">Gestión Planes</a>
|
||||
|
||||
Reference in New Issue
Block a user