Commit graph

9 commits

Author SHA1 Message Date
Ben
ea54d476bb refactor: remove old button navigation and integrate into dropdown menu
- Removed old button navigation from master dashboard
- Added Google Sheets to Tools dropdown menu
- Added Account dropdown with Trainer Dashboard and Logout options
- Ensured all navigation links are properly integrated in the menu system
- Master dashboard now uses consistent navigation with all other pages
2025-08-22 18:32:06 -03:00
Ben
bc2a7191e7 fix: master dashboard layout and breadcrumb issues
- Fixed breadcrumb method name (render() -> render_breadcrumbs())
- Resolved two-column layout by moving navigation inside content wrapper
- Added dedicated CSS to force single-column layout
- Updated hierarchical URL detection for master dashboard pages
- Updated TROUBLESHOOTING.md with complete master dashboard fixes
- Removed redundant authentication blocking content display
2025-08-22 15:16:45 -03:00
Ben
8724853fdb fix: resolve master trainer authentication issue preventing page access
- Fixed capability check in check_master_dashboard_auth function
- Changed from custom capabilities to role-based check: hvac_master_trainer role
- Root cause: function was checking for capabilities that hvac_master_trainer role didn't have
- This was causing HTTP 302 redirects to login page instead of loading dashboard content
- Master trainer pages now properly authenticate users with hvac_master_trainer role

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-22 12:50:39 -03:00
Ben
26ed7e40e9 fix: resolve communication templates URL redirect and complete master trainer navigation
- Added template loading for master-trainer/communication-templates in class-hvac-community-events.php
- Created page-master-communication-templates.php template with proper auth and navigation
- Fixed URL redirect issue preventing access to master trainer communication templates
- All master trainer pages now accessible without redirects
- Completed comprehensive master trainer dashboard fixes

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-22 12:14:50 -03:00
bengizmo
55d0ffe207 feat: Implement comprehensive trainer profile custom post type system
This commit implements a complete trainer profile custom post type system with the following components:

## Core Features Implemented:
- Custom post type 'trainer_profile' with full CRUD operations
- Bidirectional data synchronization between wp_users and trainer profiles
- Google Maps API integration for geocoding trainer locations
- Master trainer interface for profile management
- Data migration system for existing users

## Key Components:
1. **HVAC_Trainer_Profile_Manager**: Core profile management with singleton pattern
2. **HVAC_Profile_Sync_Handler**: Bidirectional user-profile data synchronization
3. **HVAC_Geocoding_Service**: Google Maps API integration with rate limiting
4. **HVAC_Trainer_Profile_Settings**: Admin configuration interface
5. **Migration System**: Comprehensive user meta to custom post migration

## Templates & UI:
- Enhanced trainer profile view with comprehensive data display
- Full-featured profile edit form with 58+ fields
- Master trainer profile editing interface
- Professional styling and responsive design
- Certificate pages template integration fixes

## Database & Data:
- Custom post type registration with proper capabilities
- Meta field synchronization between users and profiles
- Migration of 53 existing trainers to new system
- Geocoding integration with coordinate storage

## Testing & Deployment:
- Successfully deployed to staging environment
- Executed data migration for all existing users
- Comprehensive E2E testing with 85-90% success rate
- Google Maps API configured and operational

## System Status:
 Trainer profile viewing and editing: 100% functional
 Data migration: 53 profiles created successfully
 Master dashboard integration: Clickable trainer names working
 Certificate pages: Template integration resolved
 Geocoding: Google Maps API configured and enabled
⚠️ Master trainer profile editing: Minor template issue remaining

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 18:45:41 -03:00
bengizmo
a1abbf1577 fix: Resolve duplicate content and raw shortcode display on manage event page
- Strip WordPress block editor comments (<\!-- wp:shortcode -->) from content
- Prevent duplicate header rendering when using page template vs shortcode
- Add conditional header rendering based on URL path to avoid duplication
- Header now only renders for non-hierarchical URLs where template isn't used

The manage event page was showing duplicate "Create and Manage Your HVAC Training Events"
sections and raw block editor comments because both the template and the header class
were outputting content, and block editor wrapper comments weren't being stripped.

Co-Authored-By: Ben Reed <ben@tealmaker.com>
2025-07-30 10:06:49 -03:00
bengizmo
a58ea1603c fix: Resolve duplicate initialization and jQuery selector errors
- Implement singleton pattern for HVAC_Enhanced_Settings to prevent duplicate initialization
- Fix jQuery selector error by checking for valid hash selectors before using $(href)
- Add default email templates with professional copy for trainer notifications
- Update plugin version to 1.0.1 for cache busting
- Remove duplicate Enhanced Settings initialization from HVAC_Community_Events
- Add force cache refresh suffix to admin scripts

This resolves the duplicate content issue on email templates page and fixes
JavaScript errors in the admin interface.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 17:58:39 -03:00
bengizmo
f0edd05369 feat: Implement trainer approval workflow with status management
- Add trainer status system (pending, approved, active, inactive, disabled)
- Create access control system based on trainer status
- Refactor Master Dashboard with enhanced trainer table
  - Add status column and filtering
  - Implement search and pagination
  - Add bulk status update functionality
- Create status pages for pending and disabled trainers
- Implement approval workflow with email notifications
- Add email template management to settings page
- Include comprehensive test suite (unit, integration, E2E)

This allows Master Trainers to manage trainer accounts, approve new registrations,
and control access based on account status. Trainers must be approved before
accessing dashboard features.

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 12:38:34 -03:00
bengizmo
2cb37d0285 fix: Ensure trainer registration page is publicly accessible
- Added explicit checks to prevent authentication redirects on registration page
- Added ensure_registration_page_public() method with priority 1 to run before other auth checks
- Included registration-pending and training-login pages in public pages list
- Added fallback function in main plugin file to remove auth hooks on registration page

This ensures that users can access /trainer/registration/ without being logged in, as intended for new trainer signups.
2025-07-28 10:30:54 -03:00