Fix usuarios page #6

Merged
killer-cf merged 28 commits from fix-usuarios-page into master 2025-11-04 17:42:21 +00:00
78 changed files with 15762 additions and 8826 deletions
Showing only changes of commit d5c01aabab - Show all commits

View File

@@ -174,6 +174,23 @@ export const create = mutation({
declaracaoIdoneidade: v.optional(v.id("_storage")),
termoNepotismo: v.optional(v.id("_storage")),
termoOpcaoRemuneracao: v.optional(v.id("_storage")),
// Dependentes (opcional)
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")),
})
)
),
},
returns: v.id("funcionarios"),
handler: async (ctx, args) => {
@@ -303,6 +320,23 @@ export const update = mutation({
declaracaoIdoneidade: v.optional(v.id("_storage")),
termoNepotismo: v.optional(v.id("_storage")),
termoOpcaoRemuneracao: v.optional(v.id("_storage")),
// Dependentes (opcional)
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")),
})
)
),
},
returns: v.null(),
handler: async (ctx, args) => {

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")),