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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user