fix: Implement comprehensive edit event button functionality and resolve authentication issues

Major fixes and improvements:
- Fixed edit event button functionality with proper event handlers and DOM ready state checking
- Added status column to tickets table via Supabase migration to resolve 500 API errors
- Updated stats API to correctly calculate revenue from decimal price values
- Resolved authentication redirect loops by fixing cookie configuration for Docker environment
- Fixed Permissions-Policy header syntax errors
- Added comprehensive debugging and error handling for event management
- Implemented modal-based event editing with form validation and API integration
- Enhanced event data loading with proper error handling and user feedback

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-14 18:49:49 -06:00
parent b07ee8cdff
commit dbf4b11e81
216 changed files with 15891 additions and 468 deletions

54
test-theme-simple.cjs Normal file
View File

@@ -0,0 +1,54 @@
const { test, expect } = require('@playwright/test');
test.describe('Simple Theme Test', () => {
test('Test theme toggle with onclick', async ({ page }) => {
// Navigate to the calendar page
await page.goto('http://localhost:3000/calendar');
await page.waitForLoadState('networkidle');
console.log('=== TESTING ONCLICK THEME TOGGLE ===');
// Check initial state
const initialTheme = await page.locator('html').getAttribute('data-theme');
console.log('Initial theme:', initialTheme);
// Check if toggleTheme function exists
const hasToggleTheme = await page.evaluate(() => {
return typeof window.toggleTheme === 'function';
});
console.log('toggleTheme function exists:', hasToggleTheme);
// Try clicking the theme toggle button
const themeToggle = page.locator('#theme-toggle');
const toggleExists = await themeToggle.isVisible();
console.log('Theme toggle visible:', toggleExists);
if (toggleExists) {
// Click the toggle
await themeToggle.click();
await page.waitForTimeout(500);
// Check new state
const newTheme = await page.locator('html').getAttribute('data-theme');
console.log('After click theme:', newTheme);
// Check if theme actually changed
const themeChanged = initialTheme !== newTheme;
console.log('Theme changed:', themeChanged);
// Check localStorage
const savedTheme = await page.evaluate(() => localStorage.getItem('theme'));
console.log('Saved theme in localStorage:', savedTheme);
// Take screenshot
await page.screenshot({ path: 'theme-toggle-test.png', fullPage: true });
// Try clicking again to toggle back
await themeToggle.click();
await page.waitForTimeout(500);
const finalTheme = await page.locator('html').getAttribute('data-theme');
console.log('After second click theme:', finalTheme);
}
});
});