feat: add empresa and contatos

- Introduced a new utility function `maskCNPJ` for formatting CNPJ values.
- Updated the dashboard pages to replace icons and improve layout, including the addition of a link to manage companies.
- Enhanced the display of upcoming features for both the Licitações and Programas Esportivos modules, indicating their development status.
This commit is contained in:
2025-11-17 15:45:48 -03:00
parent 33a9c9e81d
commit 2b94b56f6e
9 changed files with 936 additions and 97 deletions

View File

@@ -12,6 +12,27 @@ export default defineSchema({
text: v.string(),
completed: v.boolean(),
}),
empresas: defineTable({
nome: v.string(),
cnpj: v.string(),
telefone: v.string(),
email: v.string(),
descricao: v.optional(v.string()),
criadoPor: v.optional(v.id("usuarios")),
})
.index("by_nome", ["nome"])
.index("by_cnpj", ["cnpj"]),
contatosEmpresa: defineTable({
empresaId: v.id("empresas"),
nome: v.string(),
funcao: v.string(),
email: v.string(),
telefone: v.string(),
adicionadoPor: v.optional(v.id("usuarios")),
descricao: v.optional(v.string()),
})
.index("by_empresa", ["empresaId"])
.index("by_email", ["email"]),
funcionarios: defineTable({
// Campos obrigatórios existentes
nome: v.string(),