fix: searchable client combobox in Nova instalação

Replaces the native list with a combobox (name/code/CNPJ search, accent- and
case-insensitive, keyboard + mouse, custom dropdown, hidden client_id = the
Gerenciador's real CLIENTE.ID). The backend resolves client_id against the
active GTI_GERENCIADOR mirror and rejects free text/unknown ids. Adds
Tenant.external_cnpj (migration 0025) mirrored via the internal endpoint.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
gti
2026-09-24 08:12:52 -03:00
co-authored by Claude Sonnet 5
parent 3ccef36c50
commit 9f9e06e9e9
9 changed files with 156 additions and 40 deletions
@@ -0,0 +1,20 @@
"""Tenant.external_cnpj (digits) mirrored from GTI Gerenciador for the client selector search.
Revision ID: 0025_tenant_external_cnpj
Revises: 0024_tenant_gerenciador_mirror
"""
from alembic import op
import sqlalchemy as sa
revision = "0025_tenant_external_cnpj"
down_revision = "0024_tenant_gerenciador_mirror"
branch_labels = None
depends_on = None
def upgrade():
op.add_column("tenants", sa.Column("external_cnpj", sa.String(20), nullable=True))
def downgrade():
op.drop_column("tenants", "external_cnpj")