Version History

Current Version: 1.1.5

v1.1.5

OpenWeb Reseller Management System - Changelog

Version 1.1.5 - July 16, 2025

Bug Fixes

  • JavaScript Error Resolution: Fixed "Cannot read properties of null (reading 'charAt')" error when loading active services
  • Added null checking for service.status before calling charAt() method
  • Updated statusClass and statusIcon variables to handle null/undefined service status
  • Services with null status now display as "Unknown" instead of causing JavaScript errors
  • Improved error handling in admin reseller management interface

Version 1.1.4 - July 14, 2025

Major Email System Resolution

  • Complete Email System Debugging and Resolution: Identified and resolved critical email queue processing issues
  • Fixed queue processing mismatch where count queries used different filters than processing queries
  • Updated background processor to use same filtering logic (status='pending' AND scheduled_at <= now)
  • Resolved "Found 1 emails, 0 processed" issue that prevented email delivery
  • CSRF Protection Enhancement: Added @csrf.exempt decorator to admin test email route to resolve 400 Bad Request errors on JSON endpoints
  • Enhanced Debugging Infrastructure: Created comprehensive debug_email_system.py with advanced logging and systematic troubleshooting capabilities

Email Service Compatibility Updates

  • Service Reference Fix: Replaced all EnhancedEmailService references with EmailService throughout routes.py to fix missing service errors
  • Import Order Fix: Corrected datetime import ordering in email_service.py that was causing test email failures
  • Invoice Attachment Handling: Temporarily disabled invoice email attachment features pending EmailService.send_email_with_attachment implementation
  • Enhanced Error Logging: Added comprehensive debug logging to admin test email route for better troubleshooting

Queue System Architecture Improvements

  • Scheduling Logic Alignment: Fixed mismatch between queue count queries and processing queries
  • Future Email Handling: Implemented automatic correction of emails scheduled for future dates that should be processed immediately
  • NULL Schedule Handling: Added logic to handle emails with NULL scheduled_at values by setting them to processable times
  • Background Processing: Enhanced background processor with consistent filtering logic across count and processing operations

Technical Implementation Details

  • Filter Consistency: Updated queue_processor.py to use identical filtering logic as queue_manager.py for accurate pending email counts
  • Route Enhancement: Added detailed logging to admin_send_test_email route with success/failure tracking and audit trail integration
  • Error Isolation: Improved error handling throughout email system with proper exception logging and user feedback

Production Verification

  • Successful Test Email: Confirmed test email sent successfully from admin user to ceo@openweb.email on July 14, 2025
  • SMTP Connection: Verified SMTP connection working correctly with notify@openweb.live credentials
  • System Integration: All email system components now working together properly in production environment
  • Admin Interface: Test email functionality confirmed working through admin SMTP settings page

Version 1.1.2 - June 27, 2025

Added

  • Comprehensive Google SEO Optimization System: Complete search engine optimization implementation for high Google rankings
  • Strategic keyword targeting for 'south african telecom reseller', 'MTN reseller management', 'telecommunications business platform'
  • Local SEO optimization for Johannesburg, Gauteng, and South Africa markets
  • Operator-specific SEO strategies for MTN, Telkom, and Vodacom service management
  • Google Business Schema (JSON-LD): Generated structured data for enhanced Google business understanding and rich snippets
  • Sitemap.xml Generation: Automated sitemap creation with proper priority and frequency settings for optimal crawling
  • Page-Specific SEO Optimization: Optimized meta tags, titles, and descriptions for all major pages
  • Homepage: '#1 South African Telecom Reseller Platform' targeting primary business keywords
  • Login, Registration, Products, and Dashboard pages with targeted optimization

Enhanced

  • Database-Driven SEO Management: Updated seo_settings and seo_pages tables with optimized field structures
  • Meta Tag Optimization: Strategic title tags (under 60 chars), descriptions (under 160 chars), and keyword targeting
  • Social Media Optimization: Complete Open Graph and Twitter Card implementation for enhanced social sharing
  • Mobile-First Optimization: All SEO elements optimized for mobile-first indexing

Technical Infrastructure

  • SEO Database Structure: Recreated seo_pages table with correct column structure for comprehensive SEO management
  • Business Information Schema: Complete organization details, contact information, and service offerings
  • Review Schema Integration: Structured review data for enhanced search result appearance
  • Canonical URL Management: Proper canonicalization to prevent duplicate content issues

Version 1.1.1 - June 25, 2025

Added

  • WhatsApp Registration Approval Notifications: Automatic WhatsApp notifications sent to resellers when their applications are approved
  • Beautiful emoji-rich welcome messages with all login details
  • Panel URL (https://reseller.openweb.co.za), username, and password instructions
  • Proper phone number formatting (0826987888 → 27826987888)
  • Integration with existing email notifications for dual-channel communication

Enhanced

  • WhatsApp API Integration: Fully migrated to modbot.cc provider with improved reliability
  • Updated endpoint structure and authentication methods
  • Enhanced error handling and response logging
  • Improved queue processing system compatibility

Fixed

  • Application Stability: Resolved Internal Server Error issues with mass communication status tracking
  • Removed problematic real-time status tracking that caused application crashes
  • Restored stable mass communication functionality using proven queue-based system
  • Cleaned up navigation menu references to non-existent routes

Technical Improvements

  • Enhanced phone number validation and formatting for South African numbers
  • Improved WhatsApp message delivery reliability through SimpleWhatsAppService
  • Better error logging and notification feedback for administrators
  • Streamlined registration approval process with comprehensive notification tracking

Version 1.1.0 - June 21, 2025

Major Feature Enhancement: Comprehensive Video Training System

  • Video Upload and Management: Complete admin interface for uploading and managing training videos
  • Secure file upload with size validation (max 100MB per video)
  • Support for MP4, AVI, MOV, and WMV video formats
  • Automatic unique filename generation to prevent conflicts
  • Category-based organization (General, Getting Started, Advanced Features, Troubleshooting)
  • Difficulty level classification (Beginner, Intermediate, Advanced)
  • Featured video highlighting system
  • Tag-based content organization for better searchability
  • Video Streaming Infrastructure: Built-in video streaming capability for direct server playback
  • Secure video streaming with user authentication
  • Videos stored in dedicated 'videos' folder for production deployment
  • Range request support for efficient video loading
  • Comprehensive access logging and monitoring
  • Reseller Training Portal: User-friendly video training interface for resellers
  • Responsive video player with fullscreen support
  • Category-based filtering system
  • Featured videos prominently displayed
  • Professional card-based layout with hover effects
  • Video metadata display (file size, upload date, tags)
  • Admin Video Management: Complete administrative control over video content
  • Upload new videos with detailed metadata
  • Edit video information, categories, and settings
  • Toggle video active/inactive status
  • Delete videos with confirmation prompts
  • Bulk video management capabilities
  • Navigation Integration: Seamless integration with existing admin interface
  • "Video Guides" menu item added to admin navigation under "Manage Resellers"
  • Quick access to video training from reseller dashboard
  • Breadcrumb navigation for easy orientation

User Interface Accessibility Improvements

  • Active Services Enhancement: Improved action button placement for better accessibility
  • Moved action buttons from separate Actions column to next to Type column
  • Enhanced visual hierarchy for easier service management
  • Maintained all existing functionality while improving usability

Security and Technical Improvements

  • CSRF Protection: Comprehensive CSRF token implementation across all video system forms
  • Upload forms protected against cross-site request forgery
  • Edit and delete operations secured with proper token validation
  • Form submission security enhanced throughout video management interface
  • Advanced Error Logging: Comprehensive logging system for video operations
  • Detailed file upload tracking and validation
  • Video access monitoring with user and IP logging
  • Error tracking for troubleshooting and system monitoring

Database Schema Enhancements

  • VideoGuide Model: New database model for comprehensive video management
  • Title, description, category, and difficulty level fields
  • File path, size, and duration tracking
  • Active status and featured video flags
  • Tag system for content organization
  • Creation and update timestamp tracking
  • User association for upload accountability

Version 1.0.8 - June 19, 2025

Service Cancellation System Enhancement

  • Calendar Month Billing: Implemented proper calendar month billing for service cancellations
  • Services cancelled in June 2025 are now scheduled for July 31, 2025 (end of next month)
  • Dynamic date calculation ensures cancellations are always scheduled for the last day of the following month
  • Replaced incorrect 30-day billing cycles with accurate calendar month calculations
  • Active Services Display: Fixed critical display issue where scheduled cancellations weren't visible
  • Active Services page now shows both 'active' and 'scheduled' services
  • Scheduled services display "Scheduled Cancellation" status badge
  • Edit and cancel buttons are properly disabled for scheduled services
  • Date Calculation Fix: Corrected major bug where cancellations were scheduled two months ahead instead of one
  • June 19, 2025 cancellation now correctly schedules for July 31, 2025
  • December cancellations properly schedule for January 31 of the following year
  • Handles leap years and varying month lengths accurately

User Experience Improvements

  • Pagination System: Enhanced Active Services with 5 entries per page default and "show all" option
  • Status Visibility: Improved visual indicators for service cancellation status
  • Reactivation Functionality: Maintained ability to reactivate scheduled cancellations before effective date

Version 1.0.6 - June 15, 2025

Automated Queue Processing System

  • Background Queue Processor: Implemented fully automated background processing system that eliminates manual admin intervention
  • Automatically processes email and WhatsApp queues every 30 seconds
  • Processes 10 messages per batch for optimal performance
  • Starts automatically when server starts
  • Comprehensive error handling and logging
  • Enhanced WhatsApp API Integration: Improved reliability and connection stability
  • Increased API timeout to 15 seconds for better message delivery
  • Only processes messages with 'pending' or 'retry' status to prevent spam
  • Uses mobile_number field for accurate recipient targeting
  • Admin Interface Updates: Updated queue monitoring interface to show automatic processing status
  • Visual indicator showing background processor is active
  • Manual processing option still available for immediate needs
  • Real-time queue statistics and processing logs

System Reliability Improvements

  • Database Session Management: Enhanced database session handling for queue processing
  • Error Resilience: Improved error handling for WhatsApp API connections
  • Processing Logs: Comprehensive logging for troubleshooting and monitoring
  • Thread Safety: Background processor runs in separate daemon thread for stability

Version 1.0.5 - June 9, 2025

User Interface Accessibility Improvements

ID/Passport Update Form Enhancement

  • Fixed Input Field Visibility: Resolved critical accessibility issue where ID/Passport input field was invisible due to conflicting CSS styles
  • Enhanced Text Contrast: Improved readability of security and privacy text by changing from light gray to dark text
  • Persistent Notification System: Fixed auto-dismissing notification banners by implementing permanent alert styling
  • Standardized Compliance Deadline: Set consistent June 14, 2025 deadline for all resellers regardless of registration date

Form Input Styling

  • High Contrast Design: Applied bright red border with white background for maximum input field visibility
  • Improved Font Weight: Enhanced text readability with bold font styling and increased font size
  • Box Shadow Effects: Added visual prominence with glowing border effects for better user focus
  • Cross-browser Compatibility: Used inline styling to ensure consistent appearance across all browsers

System Stability Enhancements

  • Alert Permanent Class: Implemented CSS class to prevent auto-dismissal of critical compliance notifications
  • Template Flash Messages: Enhanced flash message persistence with improved styling override system

Version 1.0.4 - June 5, 2025

System Version Management Enhancement

  • Dynamic Version System: Implemented automated version display system reading from VERSION file
  • Context Processor Integration: Added app_version to all templates through Flask context processor
  • Template Updates: Updated base template, changelog, and authentication screens to use dynamic versioning
  • PDF Manual Updates: Enhanced admin manual generation to automatically use current version

User Interface and User Experience Improvements

Service Management Interface Enhancements

  • Professional Service List Layout: Transformed active services display from card layout to professional list view with summary statistics
  • Enhanced Service Action Menus: Fixed z-index layering issues preventing service action dropdown menus from displaying properly
  • Improved Text Contrast: Resolved text visibility issues in dark-themed components for better accessibility
  • Service Summary Statistics: Added comprehensive service overview with total services count and revenue calculations

Form Validation and Processing

  • Fixed Enduser Creation Forms: Resolved form submission issues where enduser creation would return to form without creating users
  • Enhanced Field Mapping: Updated CreateUserForm to properly handle both legacy and new field structures (full_name/surname vs first_name/last_name)
  • Comprehensive Form Validation: Added all required fields including physical_address, company_name, and vat_number for complete user profiles
  • JavaScript Field Population: Automatic population of hidden legacy fields for backward compatibility

White Label Settings Improvements

  • Custom Logo URL Validation: Created flexible validator accepting both HTTP URLs and local file paths for uploaded logos
  • Fixed Logo Upload Issues: Resolved "Invalid URL" validation errors for uploaded logo files with local file paths
  • Enhanced Branding Support: Improved white-label customization workflow for reseller branding

Service Order Creation Enhancement

  • Fixed Create New Customer: Updated service ordering flow to properly create enduser accounts during order placement
  • Complete Database Integration: Added physical address field to CreateOrderForm with proper validation
  • Enhanced Customer Creation: Ensured new customers are created with correct 'enduser' role and proper reseller association
  • Improved Order Processing: Fixed form field requirements to match User model database expectations

Technical Infrastructure Updates

JavaScript Improvements

  • Null Reference Error Handling: Added comprehensive null checking and error handling for DOM element access
  • Enhanced Modal Functionality: Improved service editing modal with missing start/end date fields and automatic product selection
  • Form Field Synchronization: Automatic updating of hidden legacy fields when visible form fields change

Database and Model Updates

  • Form-Model Alignment: Updated routes to handle both new comprehensive forms and legacy field structures
  • Enhanced User Creation: Improved User model population with all required fields for complete profiles
  • Validation Enhancement: Added custom validators for flexible field validation supporting multiple input types

Broadband.is API Integration Updates

  • CRITICAL: Updated Broadband.is API endpoint from https://www.broaband.is/api/ to https://www-lab.broadband.is/
  • ENHANCED: Updated all API endpoint paths to use new base URL structure with /~lte/api/ prefix
  • VERIFIED: Both monthUsage.php and usernameInfo.php endpoints updated to new URL format
  • MAINTAINED: All existing API functionality and authentication mechanisms preserved

Bug Fixes

  • Form Submission Issues: Fixed enduser creation forms that were returning to input page without creating users
  • Logo URL Validation: Resolved white-label logo upload validation rejecting valid local file paths
  • Service Interface Problems: Fixed dropdown menu display issues and text contrast problems
  • Field Mapping Errors: Corrected form field mapping between frontend forms and backend User model
  • JavaScript Error Handling: Added safe element access to prevent null reference errors in service management

Version 1.0.3 - June 4, 2025

Email System Improvements

Database-Driven Email Templates

  • Admin-Configurable Email Notifications: Completely redesigned email notification system to use database-driven templates instead of hardcoded content
  • All email notifications now use EmailTemplate records from database
  • Admins can customize subject lines, text content, and HTML formatting through admin interface
  • Template variables automatically substituted for personalization
  • Registration confirmation, admin notifications, and approval emails all configurable

Technical Infrastructure

  • Enhanced Email Service: Updated enhanced_email_service.py to query EmailTemplate model
  • Circular Import Resolution: Fixed circular import issues affecting email delivery functionality
  • Template Rendering: Proper template variable mapping and rendering with error handling
  • Application Context: Improved Flask application context handling for email operations

Contact Information Updates

  • Support Email Migration: Updated support contact from support@openweb.co.za to notify@openweb.live across entire application
  • Updated base template footer
  • Updated email templates and notification services
  • Updated admin manual documentation
  • Consistent contact information throughout system

Bug Fixes

  • Email Template Integration: Resolved issues where system was falling back to hardcoded templates
  • Variable Substitution: Fixed template variable mapping for proper email personalization
  • Email Delivery: Ensured all notification workflows use admin-configurable templates

Version 1.0.2 - June 3, 2025

Admin Dashboard Improvements

System Updates

  • Updated footer copyright date to 2025 across all user interfaces
  • Enhanced system performance with optimized database queries

Technical Infrastructure

  • Resolved database relationship issues in Service model queries
  • Updated ProductType enum handling for consistent categorization
  • Fixed template field references to match database schema
  • Improved error handling for missing service relationships

Reseller Dashboard Improvements

Enhanced Active Services Management

  • Completely Rebuilt Active Services Dashboard: Major overhaul with improved data accuracy
  • Fixed service data retrieval to properly display all active services
  • Corrected service breakdown by product type categories
  • Updated revenue calculations for accurate monthly and annual projections
  • Improved service table with proper date fields (Start Date and End Date)
  • Enhanced product type categorization with correct enum values

Visual Improvements

  • Enhanced Service Display: Better visual organization with category-specific colors
  • Data SIM services: Blue theme for 4G/5G connectivity services
  • Voice services: Yellow theme for voice calling services
  • SMS services: Cyan theme for messaging services
  • Bundle services: Gray theme for combination packages
  • MTN Fixed services: Orange theme for fixed-line connectivity

Performance Enhancements

  • Optimized database queries for faster Active Services page loading
  • Improved service breakdown calculations for accurate revenue reporting

End User Dashboard Improvements

System Updates

  • Updated footer copyright date to 2025
  • Enhanced system stability with improved database performance

Version 1.0.1 - June 3, 2025

Admin Dashboard Improvements

New Features

  • Credit Balance Monitoring: Added credit balance column to resellers management table with color-coded status indicators
  • Green badge for balances R1000+ (healthy)
  • Yellow badge for balances R100-R999 (moderate)
  • Red badge for balances under R100 (low credit)
  • Gray badge for accounts without credit wallets
  • Enhanced Service Order Management: Complete service order workflow implementation
  • Direct service creation from product catalog
  • Automated credit deduction and validation
  • Pending orders queue for admin provisioning
  • Order rejection with automatic credit refunds
  • Sync Renewal Amounts: Fixed POST method implementation for renewal synchronization
  • Proper form submission with confirmation dialogs
  • Bulk renewal amount updates for all active resellers
  • Service-based monthly fee calculations

Bug Fixes

  • Method Not Allowed Error: Fixed sync renewal amounts route to accept POST requests properly
  • Order Provisioning: Resolved admin order provisioning workflow issues
  • Credit Transactions: Fixed TransactionType.DEBIT to TransactionType.PURCHASE enum issues

User Interface Enhancements

  • Color-coded credit balance indicators for quick financial status assessment
  • Improved reseller details modal with complete profile information
  • Enhanced pending orders management interface
  • Better visual feedback for administrative actions

Reseller Dashboard Improvements

New Features

  • Active Services Management: Complete active services overview page
  • Comprehensive service details table with product specifications
  • Service breakdown by type (LTE, Fibre, Voice, MTN Fixed)
  • Revenue summary with monthly and annual projections
  • Connection details including MSISDN and SIM serial numbers
  • Category-Based Product Organization: Restructured product catalog with clear visual differentiation
  • Color-coded category sections with gradient headers
  • LTE services: Blue theme
  • Fibre services: Green theme
  • Voice services: Yellow theme
  • MTN Fixed services: Orange theme
  • Enhanced Service Creation: Streamlined direct service ordering workflow
  • Pro-rata discount calculations based on order date
  • Real-time credit balance validation
  • Automated customer assignment options

User Interface Enhancements

  • Category-specific visual themes with icons and color schemes
  • Improved product card layouts with themed borders and buttons
  • Better service status indicators and provisioning feedback
  • Enhanced credit wallet display with balance monitoring

Workflow Improvements

  • Direct service creation without cart system
  • Automated billing period calculations
  • Improved customer management integration
  • Better order tracking and status updates

End User Dashboard Features

Account Management

  • Service usage tracking and monitoring
  • Account balance and billing information
  • Service activation status and connection details
  • Support ticket management system

Service Features

  • Real-time service status monitoring
  • Usage analytics and reporting
  • Service upgrade/downgrade requests
  • Connection troubleshooting tools

Technical Improvements

Backend Enhancements

  • Database Optimization: Improved query performance for service and order management
  • API Endpoints: Enhanced API responses for better frontend integration
  • Error Handling: Comprehensive error management with proper user feedback
  • Audit Logging: Complete action tracking for all administrative functions

Security Updates

  • Enhanced role-based access control validation
  • Improved session management and authentication
  • Secure payment processing with Payfast integration
  • Data protection and privacy compliance

Performance Optimizations

  • Optimized database queries for faster page loads
  • Improved caching strategies for product and service data
  • Better memory management for large datasets
  • Enhanced file upload and processing capabilities

Infrastructure Updates

Payment Integration

  • Payfast payment gateway fully integrated and tested
  • Automated ITN (Instant Transaction Notification) processing
  • Secure credit top-up functionality
  • Transaction history and reconciliation tools

White Label Support

  • Complete white label customization for resellers
  • Brand-specific theming and styling options
  • Custom domain support preparation
  • Reseller-specific customer portals

Known Issues Resolved

  • Service order creation credit deduction errors
  • Admin provisioning workflow inconsistencies
  • Category filtering and product organization issues
  • Credit balance display accuracy problems
  • Method routing errors for administrative functions

Upcoming Features (Version 1.0.2)

  • Advanced reporting and analytics dashboard
  • Automated service provisioning integration
  • Enhanced notification system
  • Mobile-responsive interface improvements
  • API documentation and third-party integrations

System Requirements

  • Python 3.11 or higher
  • PostgreSQL database
  • Flask framework with SQLAlchemy ORM
  • Bootstrap 5 for frontend components
  • Payfast payment gateway integration

Installation Notes

  • Database migrations handled automatically
  • Configuration files updated for new features
  • No breaking changes for existing installations
  • Backward compatibility maintained for all API endpoints