feat: add dependents management to employee registration

- Introduced functionality to manage dependents during employee registration, allowing users to add details such as relationship, name, CPF, and birth date.
- Updated the backend schema and mutation to support optional dependents, enhancing the employee data model.
- Enhanced the frontend form to include fields for dependents, improving the user experience in the employee registration process.
This commit is contained in:
2025-11-04 05:05:13 -03:00
parent 90eee27ba7
commit d5c01aabab
3 changed files with 1592 additions and 1366 deletions

View File

@@ -134,6 +134,24 @@ export default defineSchema({
comprovanteResidencia: v.optional(v.id("_storage")),
comprovanteContaBradesco: v.optional(v.id("_storage")),
// Dependentes do funcionário (uploads opcionais)
dependentes: v.optional(
v.array(
v.object({
parentesco: v.union(
v.literal("filho"),
v.literal("filha"),
v.literal("conjuge"),
v.literal("outro")
),
nome: v.string(),
cpf: v.string(),
nascimento: v.string(),
documentoId: v.optional(v.id("_storage")),
})
)
),
// Declarações (Storage IDs)
declaracaoAcumulacaoCargo: v.optional(v.id("_storage")),
declaracaoDependentesIR: v.optional(v.id("_storage")),