diff --git a/orchestrator/index.html b/orchestrator/index.html index 266cd59..25ed500 100644 --- a/orchestrator/index.html +++ b/orchestrator/index.html @@ -3,7 +3,7 @@ - uMind — Orquestador + uMind Studio
diff --git a/orchestrator/src/components/Sidebar.vue b/orchestrator/src/components/Sidebar.vue index 4a6c233..9a5b70b 100644 --- a/orchestrator/src/components/Sidebar.vue +++ b/orchestrator/src/components/Sidebar.vue @@ -2,6 +2,7 @@ import { computed, onMounted, ref } from 'vue' import { useRoute, useRouter } from 'vue-router' import { api } from '../lib/api.js' +import { apiUmind, contexto } from '../lib/contexto.js' const route = useRoute() const router = useRouter() @@ -27,7 +28,7 @@ async function cargar() { loading.value = true error.value = '' try { - const t = await api.get('/app/umind/tenants') + const t = await api.get(apiUmind('/umind/tenants')) tenants.value = t.items || [] } catch (e) { error.value = e.message @@ -39,6 +40,7 @@ async function cargar() { // Clientes y planes solo los necesita el staff para asignarlos; si el endpoint // no está disponible (portal del cliente) el formulario sigue funcionando. async function cargarAsignables() { + if (contexto.esPortal) return // endpoints de staff: el cliente no los alcanza try { const [c, p] = await Promise.all([ api.get('/app/api/clientes/select'), @@ -80,11 +82,11 @@ async function guardar() { } try { if (editing.value) { - await api.put(`/app/umind/tenants/${editing.value.ID}`, payload) + await api.put(apiUmind(`/umind/tenants/${editing.value.ID}`), payload) showForm.value = false await cargar() } else { - const r = await api.post('/app/umind/tenants', payload) + const r = await api.post(apiUmind('/umind/tenants'), payload) showForm.value = false await cargar() router.push(`/tenants/${r.id}`) @@ -96,7 +98,7 @@ async function guardar() { async function eliminar(t) { if (!confirm(`¿Eliminar el tenant "${t.nombre}"? Esto borra también sus agentes. No se puede deshacer.`)) return - await api.del(`/app/umind/tenants/${t.ID}`) + await api.del(apiUmind(`/umind/tenants/${t.ID}`)) if (tenantActivoId.value === String(t.ID)) router.push('/') await cargar() } @@ -112,11 +114,11 @@ onMounted(() => {