This commit is contained in:
Lizandro Guarnizo
2026-05-15 09:10:26 -05:00
parent e02a4f2141
commit 715d656b2a
5 changed files with 11 additions and 17 deletions
+4 -6
View File
@@ -1,5 +1,3 @@
{{template "layouts/main" .}}
<div x-data="portalUsuariosApp()" x-init="init()" class="p-6">
<div class="flex items-center justify-between mb-6">
@@ -39,13 +37,13 @@
</td>
<td class="px-4 py-3 text-slate-500 text-xs">
<template x-if="u.rol==='cliente' && u.cliente">
<span x-text="u.cliente?.razon_social || u.cliente?.nombre"></span>
<span x-text="u.cliente?.empresa || u.cliente?.nombre"></span>
</template>
<template x-if="u.rol==='partner'">
<div class="flex flex-wrap gap-1">
<template x-for="acc in (u.portal_accesos||[])" :key="acc.ID">
<span class="bg-slate-100 px-2 py-0.5 rounded text-xs flex items-center gap-1">
<span x-text="acc.cliente?.razon_social || acc.cliente?.nombre || acc.cliente_id"></span>
<span x-text="acc.cliente?.empresa || acc.cliente?.nombre || acc.cliente_id"></span>
<button @click="removeAcceso(u, acc.cliente_id)" class="text-red-400 hover:text-red-600 ml-1">&times;</button>
</span>
</template>
@@ -94,7 +92,7 @@
<select x-model.number="form.cliente_id" class="input-field w-full">
<option value="">Sin asignar</option>
<template x-for="c in clientes" :key="c.ID">
<option :value="c.ID" x-text="c.razon_social || c.nombre"></option>
<option :value="c.ID" x-text="c.empresa || c.nombre"></option>
</template>
</select>
</div>
@@ -121,7 +119,7 @@
<select x-model.number="accesoClienteId" class="input-field w-full mb-4">
<option value="">Seleccionar...</option>
<template x-for="c in clientes" :key="c.ID">
<option :value="c.ID" x-text="c.razon_social || c.nombre"></option>
<option :value="c.ID" x-text="c.empresa || c.nombre"></option>
</template>
</select>
<div class="flex justify-end gap-3">