fix(sla): adiciona viewerId na query companies.list
All checks were successful
CI/CD Web + Desktop / Detect changes (push) Successful in 5s
Quality Checks / Lint, Test and Build (push) Successful in 3m45s
CI/CD Web + Desktop / Deploy Convex functions (push) Has been skipped
CI/CD Web + Desktop / Deploy (VPS Linux) (push) Successful in 3m41s

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rever-tecnologia 2025-12-17 19:35:51 -03:00
parent 4be622c838
commit a55f889689

View file

@ -55,7 +55,10 @@ export function CompanySlaManager() {
) as CompanyWithSla[] | undefined
// Todas as empresas (para o dialog de adicionar)
const allCompanies = useQuery(api.companies.list, { tenantId }) as Company[] | undefined
const allCompanies = useQuery(
api.companies.list,
viewerId ? { tenantId, viewerId } : "skip"
) as Company[] | undefined
const filteredCompaniesWithSla = useMemo(() => {
if (!companiesWithSla) return []