editor y administrador

This commit is contained in:
Felipe
2024-03-01 09:29:19 -05:00
parent 6c760652f6
commit dea9a97b72
6 changed files with 37 additions and 44 deletions
+3 -2
View File
@@ -2,10 +2,11 @@
namespace App\Http\Livewire;
use App\Models\Log_general;
use App\Models\Log_historial;
use Livewire\Component;
class ShowLogGeneral extends Component
class ShowLogHistorial extends Component
{
public $entradas;
@@ -14,7 +15,7 @@ class ShowLogGeneral extends Component
public function render()
{
$query = Log_historial::query();
$query = Log_general::query();
if ($this->buscar) {
$query->where('detalle', 'like', '%' . $this->buscar . '%');
@@ -1,6 +1,6 @@
<div class="h-full w-full md:my-2">
<div class="bg-[#f5f5f5] m-auto p-2 md:p-5 w-auto x-auto grid grid-cols-1 lg:grid-cols-1text-center rounded-xl py-4 px-2 ms:px-8 xl:mx-10 mb-8 ">
<div class="md:flex justify-center my-2 items-center text-center ">
<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">
@@ -22,7 +22,6 @@
</div>
<x-ver-entrada />
<x-primary-table>
+5 -11
View File
@@ -49,18 +49,12 @@
fill="#ffffff" />
</svg>
</a>
@if (auth()->user()->rol->nombre != 'editor')
<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]">
@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]">
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">
<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 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">
<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>
</a>
@endif
@@ -828,8 +828,10 @@
</div>
@if ($total > auth()->user()->saldo->valor)
<div class=" flex text-red-400 text-xs text-center justify-center gap-2 py-2 rounded-lg md:mx-2 2xl:mx-6">
<p class=""> No tiene fondo suficientes para esta compra, recargue su cuenta.</p>
<p>No tiene fondo suficientes para esta compra, recargue su cuenta.</p>
@if (auth()->user()->rol->nombre != 'editor' && auth()->user()->rol->nombre != 'super')
<a href="{{ route('recarga') }}"><button class="bg-green-600 text-white rounded px-2 py-1">Recargar</button></a>
@endif
</div>
@endif
</div>
@@ -307,11 +307,12 @@
</svg>
</div>
@if ($total > auth()->user()->saldo->valor)
<div
class=" flex text-red-400 text-xs text-center justify-center gap-2 py-2 rounded-lg md:mx-2 2xl:mx-6">
<p class=""> No tiene fondo suficientes para esta compra, recargue su cuenta.</p>
<a href="{{ route('recarga') }}"><button
class="bg-green-600 text-white rounded px-2 py-1">Recargar</button></a>
<div class=" flex text-red-400 text-xs text-center justify-center gap-2 py-2 rounded-lg md:mx-2 2xl:mx-6">
<p>No tiene fondo suficientes para esta compra, recargue su cuenta.</p>
@if (auth()->user()->rol->nombre != 'editor' && auth()->user()->rol->nombre != 'super')
<a href="{{ route('recarga') }}"><button class="bg-green-600 text-white rounded px-2 py-1">Recargar</button></a>
@endif
</div>
@endif
</div>
@@ -33,32 +33,28 @@
</svg>
Usuario
</div>
<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
<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">
<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" />
@if (auth()->user()->rol->nombre !== 'administrador' && auth()->user()->rol->nombre !== 'editor')
<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
<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">
<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>
</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.
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">
<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>
</a>
</div>
class="justify-center flex px-4 py-2 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]">Mod.
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">
<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>
</a>
@endif
</div>
</div>