Clientes
Lista de todas las organizaciones/clientes registrados en el sistema.
Nuevo Cliente
Nombre
Slug
Dominio
Estado
Acciones
{#if isLoading}
Cargando...
{:else if tenants.length === 0}
No hay clientes registrados
{:else} {#each tenants as tenant}
{tenant.name}
{tenant.slug}
{tenant.domain || '-'}
{tenant.is_active ? 'Activo' : 'Inactivo'}
openEditModal(tenant)} class="text-indigo-600 hover:text-indigo-900">Editar
{/each} {/if}
showModal = false}>
Nombre
Slug (Identificador)
Usado en URLs y subdominios.
Dominio Personalizado
Activo
Guardar
showModal = false} class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:col-start-1 sm:text-sm"> Cancelar
{#if editingTenant}
{ await api.delete(`/tenants/${editingTenant.id}`); toast.success('Cliente eliminado'); showModal = false; loadTenants(); }} class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:col-start-1 sm:text-sm"> Eliminar
{/if}