refactor: improve type safety and error handling in vacation management components
- Updated the `AprovarFerias.svelte` component to use specific types for `solicitacao` and `gestorId`, enhancing type safety. - Improved error handling by refining catch blocks to handle errors more accurately. - Made minor adjustments to ensure consistent code formatting and readability across the component.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { v } from "convex/values";
|
||||
import { mutation, query } from "./_generated/server";
|
||||
import { registrarAtividade } from "./logsAtividades";
|
||||
import { Doc } from "./_generated/dataModel";
|
||||
|
||||
/**
|
||||
* Listar todos os templates
|
||||
@@ -111,7 +112,7 @@ export const editarTemplate = mutation({
|
||||
}
|
||||
|
||||
// Atualizar template
|
||||
const updates: any = {};
|
||||
const updates: Partial<Doc<"templatesMensagens">> = {};
|
||||
if (args.nome !== undefined) updates.nome = args.nome;
|
||||
if (args.titulo !== undefined) updates.titulo = args.titulo;
|
||||
if (args.corpo !== undefined) updates.corpo = args.corpo;
|
||||
|
||||
Reference in New Issue
Block a user