package components import ( "context" "fmt" ) // Dialog component for confirmation dialogs using Flowbite modal templ NotificationDialog(id string, title string, message string, confirmClass string, confirmText string, action string, serviceID uint, serviceName string) {
} script triggerServiceDelete(dialogId string, serviceID uint, serviceName string) { // Hide the dialog document.getElementById(dialogId).classList.add("hidden"); document.getElementById(dialogId).classList.remove("flex"); // Add debugging info console.log(`Notification service deletion triggered for: ${serviceName} (ID: ${serviceID})`); // Store data in a way that's accessible to event handlers window.lastDeletedService = { id: serviceID, name: serviceName }; // Add custom marker to track this deletion window.currentlyDeletingService = true; } templ Notifications(ctx context.Context, data SettingsNotificationsData) { @LayoutWithContext("Notification Services", ctx) {Add a notification service to receive alerts for job events.
Add First Notification Service{ service.Name }
{ service.Description }
Last sent: if service.SuccessCount > 0 { "Recently" } else { "Never" }
Notification services allow the system to send alerts for job events such as completion, errors, or when jobs start.