Commit Graph
24 Commits
Author SHA1 Message Date
1sonhador c8e92ead2e fix: Use apiOrAuth instead of requireAuth for user API routes
- Change all user API routes to use apiOrAuth middleware
- This allows API access with Bearer token authentication
- Fixes 302 redirects for API endpoints
2025-10-15 14:30:11 +01:00
1sonhador 4656a0877b fix: Add last_login column to users table
- Create migration AddLastLoginToUsers to add last_login column
- Revert UserModel to use last_login column in queries
- Proper solution: add missing column instead of removing from code
2025-10-15 14:27:23 +01:00
1sonhador 57f9a715c2 fix: Remove non-existent last_login column from UserModel queries
- Fix getAllForAdmin method to not select last_login column
- Fix findForAdmin method to not select last_login column
- Users table doesn't have last_login column
2025-10-15 14:26:26 +01:00
1sonhador f670e9301a fix: Add missing API routes and methods
- Add recent-activity route to Users module
- Add apiGetRecentActivity method to UserController
- Fix composer autoloader path in index.php
- Install composer dependencies on server
2025-10-15 14:23:57 +01:00
1sonhador 88a5659fe8 fix: Correct user permissions and UserModel query
- Fix storage permissions to use 'www' user instead of 'www-data'
- Fix UserModel getAllForAdmin query to avoid placeholders in LIMIT/OFFSET
- Import missing modules: Advertising, Dashboard, Analytics
- Update deploy script to copy files to public directory
2025-10-15 14:14:00 +01:00
1sonhador 968e7b3451 feat: Import ErrorMonitoring module from old CRM
- Add complete ErrorMonitoring module with controllers, models, services
- Include error dashboard, error detail views, and error import functionality
- Add error monitoring API endpoints and error collection services
- Fix missing error monitoring system for critical error tracking
2025-10-15 13:48:48 +01:00
1sonhador 2cab67b1ab fix: Add missing Auth class and UserModel methods
- Import Auth.php from old CRM to fix authentication
- Add getAllForAdmin, getTotalForAdmin, findForAdmin methods to UserModel
- Fix admin users API endpoints functionality
- Resolve 'Erro ao carregar utilizadores' error
2025-10-15 13:45:44 +01:00
1sonhador 0d76c40980 feat: Import Users module from old CRM
- Copy complete Users module from CRM_Project
- Fix syntax error in UserController.php (trailing whitespace)
- Add admin users management functionality
- Include user profiles, roles, and permissions
- Add API endpoints for user management
2025-10-15 13:42:07 +01:00
1sonhador 4c08a83707 feat: Add secure analytics slug system
- Add analytics_slug column to redirects table
- Generate unique analytics slugs using CUID2
- Update PublicCampaignsController to use analytics_slug
- Update views to use analytics_slug in analytics links
- Add migration and population scripts
- Improve security by separating public redirect and analytics URLs
2025-10-15 13:19:51 +01:00
1sonhador 0ec853d740 Disable Dashboard module routes to fix /dashboard authentication issue 2025-10-15 01:22:22 +01:00
1sonhador ab6d3af44c Fix: Replace fake daily hits data with real database data 2025-10-15 00:58:36 +01:00
1sonhador e6221bc7b1 Improve public analytics dashboard: fix duplicate branding, add daily hits chart, top referrals, better chart legibility 2025-10-15 00:57:04 +01:00
1sonhador 07ad7561be Use relative path instead of namespace for public campaign analytics view 2025-10-15 00:53:56 +01:00
1sonhador 0c057b4d61 Fix RedirectStatsModel method calls in PublicCampaignsController 2025-10-15 00:52:00 +01:00
1sonhador fb724db1e6 Create public campaign analytics view based on existing stats structure 2025-10-15 00:45:16 +01:00
1sonhador f0378409af Fix view path for public campaign analytics 2025-10-15 00:42:34 +01:00
1sonhador bf548ae691 Fix duplicate method declarations in PublicCampaignsController 2025-10-15 00:42:19 +01:00
1sonhador 6e2753e89a Restore campaign logic adapted for redirects using cuid as slug 2025-10-15 00:38:25 +01:00
1sonhador 32373f5107 Add debug logging to API 2025-10-15 00:35:48 +01:00
1sonhador e3975cc157 Simplify API to always return test data 2025-10-15 00:35:30 +01:00
1sonhador 205ee8ee72 Add fallback redirect data for testing 2025-10-15 00:35:14 +01:00
1sonhador c8c4b8a750 Adapt public analytics to work with redirects instead of campaigns 2025-10-15 00:34:55 +01:00
1sonhador a1cc2252ad Add debug logging to campaign lookup 2025-10-15 00:33:20 +01:00
1sonhador 8542395fbe Add public campaign analytics functionality
- Add PublicCampaignsController for public campaign analytics
- Add public routes for /public/analytics/{slug} and /api/campaigns/{slug}
- Add public campaign analytics view with charts and KPIs
- Support for campaign sharing via custom slugs
- Real-time analytics with ApexCharts integration
2025-10-15 00:30:00 +01:00