refactor: enhance vacation request component and improve error handling

- Updated the SolicitarFerias component to improve the user interface and experience.
- Added validation for overlapping vacation periods and ensured proper error messages are displayed.
- Refactored the logic for adding and removing vacation periods, enhancing code readability and maintainability.
- Improved the handling of form submission and error states for better user feedback.
This commit is contained in:
2025-11-12 14:38:08 -03:00
parent 553fc578a6
commit 3a783727dc
7 changed files with 4030 additions and 3481 deletions

View File

@@ -139,25 +139,6 @@ export const configurarAlerta = mutation({
*/
export const listarAlertas = query({
args: {},
returns: v.array(
v.object({
_id: v.id('alertConfigurations'),
metricName: v.string(),
threshold: v.number(),
operator: v.union(
v.literal('>'),
v.literal('<'),
v.literal('>='),
v.literal('<='),
v.literal('==')
),
enabled: v.boolean(),
notifyByEmail: v.boolean(),
notifyByChat: v.boolean(),
createdBy: v.id('usuarios'),
lastModified: v.number()
})
),
handler: async (ctx) => {
const alertas = await ctx.db.query('alertConfigurations').collect();
return alertas;