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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user