fix: navegar al detalle del tenant tras crearlo, fila clickeable en la lista
El único link a /tenants/:id era el nombre del tenant en texto plano sin ningún indicio visual de que fuera clickeable — después de crear un tenant no había forma obvia de llegar a configurarlo (base de conocimiento, tools, canales). Ahora crear un tenant navega directo a su detalle, y toda la fila de la lista es clickeable con un "Configurar →" explícito. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
98c68b0385
commit
b2f6b518b6
@@ -1,7 +1,10 @@
|
||||
<script setup>
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { api } from '../lib/api.js'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const tenants = ref([])
|
||||
const aiConfigs = ref([])
|
||||
const loading = ref(true)
|
||||
@@ -69,11 +72,15 @@ async function guardar() {
|
||||
try {
|
||||
if (editing.value) {
|
||||
await api.put(`/app/umind/tenants/${editing.value.ID}`, payload)
|
||||
showForm.value = false
|
||||
await cargar()
|
||||
} else {
|
||||
await api.post('/app/umind/tenants', payload)
|
||||
const r = await api.post('/app/umind/tenants', payload)
|
||||
showForm.value = false
|
||||
// Ir directo a configurar el tenant recién creado en vez de dejarlo
|
||||
// perdido en la lista — es lo primero que hay que hacer con él.
|
||||
router.push(`/tenants/${r.id}`)
|
||||
}
|
||||
showForm.value = false
|
||||
await cargar()
|
||||
} catch (e) {
|
||||
error.value = e.message
|
||||
}
|
||||
@@ -114,15 +121,11 @@ onMounted(cargar)
|
||||
<div
|
||||
v-for="t in tenants"
|
||||
:key="t.ID"
|
||||
class="p-4 flex items-center justify-between hover:bg-gray-50"
|
||||
class="p-4 flex items-center justify-between hover:bg-gray-50 cursor-pointer"
|
||||
@click="router.push(`/tenants/${t.ID}`)"
|
||||
>
|
||||
<div>
|
||||
<router-link
|
||||
:to="`/tenants/${t.ID}`"
|
||||
class="font-medium text-gray-800 hover:text-brand"
|
||||
>
|
||||
{{ t.nombre }}
|
||||
</router-link>
|
||||
<span class="font-medium text-gray-800">{{ t.nombre }}</span>
|
||||
<div class="text-xs text-gray-500 mt-0.5">
|
||||
{{ t.dominios_permitidos || 'sin dominios configurados' }}
|
||||
<span
|
||||
@@ -133,9 +136,10 @@ onMounted(cargar)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex gap-3 text-sm">
|
||||
<button class="text-gray-500 hover:text-gray-800" @click="editarTenant(t)">Editar</button>
|
||||
<button class="text-red-500 hover:text-red-700" @click="eliminar(t)">Eliminar</button>
|
||||
<div class="flex items-center gap-3 text-sm">
|
||||
<span class="text-brand font-medium">Configurar →</span>
|
||||
<button class="text-gray-500 hover:text-gray-800" @click.stop="editarTenant(t)">Editar</button>
|
||||
<button class="text-red-500 hover:text-red-700" @click.stop="eliminar(t)">Eliminar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -4,8 +4,8 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>uMind — Orquestador</title>
|
||||
<script type="module" crossorigin src="/orchestrator/assets/index-1EuRm07B.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/orchestrator/assets/index-CamCOnxy.css">
|
||||
<script type="module" crossorigin src="/orchestrator/assets/index-DopCJrBT.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/orchestrator/assets/index-DniozBCm.css">
|
||||
</head>
|
||||
<body class="bg-gray-50">
|
||||
<div id="app"></div>
|
||||
|
||||
Reference in New Issue
Block a user