feat: enhance vacation management system with new employee association functionality, improved email notification handling, and comprehensive documentation; update dependencies and UI components for better user experience

This commit is contained in:
2025-10-30 09:27:10 -03:00
parent 21b41121db
commit fd445e8246
43 changed files with 6097 additions and 515 deletions

View File

@@ -12,6 +12,7 @@ const aposentadoValidator = v.optional(v.union(v.literal("nao"), v.literal("funa
export const getAll = query({
args: {},
returns: v.array(v.any()),
handler: async (ctx) => {
const funcionarios = await ctx.db.query("funcionarios").collect();
// Retornar apenas os campos necessários para listagem
@@ -39,6 +40,7 @@ export const getAll = query({
export const getById = query({
args: { id: v.id("funcionarios") },
returns: v.union(v.any(), v.null()),
handler: async (ctx, args) => {
return await ctx.db.get(args.id);
},
@@ -301,6 +303,7 @@ export const remove = mutation({
// Query para obter ficha completa para impressão
export const getFichaCompleta = query({
args: { id: v.id("funcionarios") },
returns: v.union(v.any(), v.null()),
handler: async (ctx, args) => {
const funcionario = await ctx.db.get(args.id);
if (!funcionario) {