From 51e2efa07ef247203f99f1426efa30e3d87fda24 Mon Sep 17 00:00:00 2001 From: killer-cf Date: Thu, 20 Nov 2025 14:13:05 -0300 Subject: [PATCH] refactor: enhance email scheduling functionality and improve error handling - Added a new mutation to cancel scheduled emails, ensuring only pending emails can be canceled. - Updated the current user query to use type casting for better type safety. - Improved the handling of email status queries to skip execution when no email IDs are present. - Refactored error checking for template queries to streamline the code and remove unused variables. - Enhanced user feedback for authentication requirements when sending notifications. --- .../(dashboard)/ti/notificacoes/+page.svelte | 93 ++++++++++--------- packages/backend/convex/email.ts | 23 +++++ 2 files changed, 70 insertions(+), 46 deletions(-) diff --git a/apps/web/src/routes/(dashboard)/ti/notificacoes/+page.svelte b/apps/web/src/routes/(dashboard)/ti/notificacoes/+page.svelte index 89f0240..703ce53 100644 --- a/apps/web/src/routes/(dashboard)/ti/notificacoes/+page.svelte +++ b/apps/web/src/routes/(dashboard)/ti/notificacoes/+page.svelte @@ -1,12 +1,11 @@