chore: remove debug logging in toast controller

This commit is contained in:
Björn Fromme
2026-01-21 08:11:36 +01:00
parent 0c1f143b12
commit fb8aabe34c
-9
View File
@@ -24,24 +24,15 @@ export default class extends Controller {
} }
handleNotifications(event) { handleNotifications(event) {
console.log('[VOUCHER DEBUG] showNotifications event received:', event)
console.log('[VOUCHER DEBUG] event.detail:', event.detail)
// HTMX wraps the trigger value in an object with 'value' and 'elt' properties // HTMX wraps the trigger value in an object with 'value' and 'elt' properties
// event.detail.value contains the actual array from the HX-Trigger header // event.detail.value contains the actual array from the HX-Trigger header
const notifications = event.detail?.value || event.detail || [] const notifications = event.detail?.value || event.detail || []
console.log('[VOUCHER DEBUG] notifications array:', notifications)
console.log('[VOUCHER DEBUG] notifications count:', Array.isArray(notifications) ? notifications.length : 'not an array')
if (Array.isArray(notifications)) { if (Array.isArray(notifications)) {
notifications.forEach((notification, index) => { notifications.forEach((notification, index) => {
console.log(`[VOUCHER DEBUG] Processing notification ${index}:`, notification)
const className = this.getClassForType(notification.type) const className = this.getClassForType(notification.type)
this.showToast(notification.message, className) this.showToast(notification.message, className)
}) })
} else {
console.error('[VOUCHER DEBUG] Notifications is not an array:', notifications)
} }
} }