1. 25 Mar, 2026 1 commit
    • Your Name's avatar
      Add arbitrage verification and manual fixture activation/deactivation · aab8d769
      Your Name authored
      - Added arbitrage verification when all ZIP files are uploaded for a fixture
      - Automatic fixture activation only if arbitrage check passes
      - Added manual activate/deactivate buttons in fixture detail page
      - Fixtures are only activated if all matches have ZIP files and pass arbitrage protection
      - Logging added for arbitrage detection and fixture activation events
      aab8d769
  2. 09 Mar, 2026 3 commits
    • Your Name's avatar
      Add matrix-based arbitrage detection and repair for sure bet analyzer · 5bf2e5a0
      Your Name authored
      - Add check_matrix_arbitrage method using safety margin formula
      - Add matrix_arbitrage issue type detection in analyze_match
      - Add repair logic for matrix_arbitrage issue type
      - Update routes to add has_sure_bets property for template compatibility
      - Fix typo: match.number -> match.match_number
      5bf2e5a0
    • Your Name's avatar
      Add refresh fixture button for clients · 4daa1528
      Your Name authored
      - Added refresh_fixture route that resets fixture_active_time to null
      - Added 'Refresh' button (🔄) to fixture detail page
      - When clicked, clients will download the fixture as a new update
      4daa1528
    • Your Name's avatar
      Add Sure Bet Analysis tool for fixture odds · 2ec209bc
      Your Name authored
      - Created sure_bet_analyzer.py with SureBetAnalyzer and SureBetRepair classes
      - Detects sure bet conditions for under/over and second extraction outcomes
      - Added analyze, repair, and save-as-new routes
      - Modified fixture upload to automatically redirect to analysis
      - Added UI buttons and results display in fixture_detail.html
      2ec209bc
  3. 24 Feb, 2026 2 commits
  4. 23 Feb, 2026 1 commit
    • Stefy Lanza (nextime / spora )'s avatar
      Add timezone-aware date filtering for reports page · c4c43ca2
      Stefy Lanza (nextime / spora ) authored
      - Add parse_timezone_offset() helper to parse timezone strings (UTC+3, Africa/Johannesburg, etc.)
      - Add get_date_range_in_timezone() helper to calculate date ranges with proper timezone conversion
      - Update reports(), export_reports(), client_report_detail(), match_report_detail(), export_client_report(), and export_match_report() to use timezone-aware date filtering
      - Users can now select their timezone and date filters will correctly convert local time boundaries to UTC for database queries
      c4c43ca2
  5. 20 Feb, 2026 4 commits
    • Stefy Lanza (nextime / spora )'s avatar
      Fix double proxy prefix in API token fetch calls · ff2344d2
      Stefy Lanza (nextime / spora ) authored
      The proxyFetch() function adds the script root prefix, but Flask's url_for()
      already includes the script root when generating URLs. This caused the
      proxy path to be duplicated (e.g., /mbetterd/mbetterd/...).
      
      Changed all proxyFetch() calls to use fetch() directly since url_for()
      already handles the proxy prefix correctly.
      ff2344d2
    • Stefy Lanza (nextime / spora )'s avatar
      Rename modal classes to custom-modal to avoid Bootstrap conflicts · e4ad3d95
      Stefy Lanza (nextime / spora ) authored
      Bootstrap's JavaScript modal system was interfering with our custom modals
      because both used the .modal class. Renamed all modal-related classes to
      use custom- prefix:
      - .modal -> .custom-modal
      - .modal-dialog -> .custom-modal-dialog
      - .modal-header -> .custom-modal-header
      - .modal-body -> .custom-modal-body
      - .modal-footer -> .custom-modal-footer
      - .modal-title -> .custom-modal-title
      
      This prevents Bootstrap from trying to manage our custom modals.
      e4ad3d95
    • Stefy Lanza (nextime / spora )'s avatar
      Fix modal closing issue - check e.target directly · 091d1023
      Stefy Lanza (nextime / spora ) authored
      The previous fix using closest() was incorrect because closest('.modal')
      would always return the modal for any click inside it (including dialog).
      
      The correct approach is to check if e.target IS the modal element itself,
      which only happens when clicking directly on the backdrop overlay,
      not when clicking on elements inside the dialog.
      091d1023
    • Stefy Lanza (nextime / spora )'s avatar
      Fix modal closing issue when clicking inside dialog · 7bc3a49b
      Stefy Lanza (nextime / spora ) authored
      The modal was closing when clicking on input fields or trying to type
      because the click event handler was checking if e.target.classList.contains('modal')
      which could incorrectly trigger when clicking on certain elements.
      
      Fixed by using closest() to properly detect if the click happened inside
      a .modal-dialog element. The modal now only closes when clicking on the
      backdrop (outside the dialog), not when interacting with form elements.
      7bc3a49b
  6. 14 Feb, 2026 6 commits
  7. 10 Feb, 2026 2 commits
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
      Add nginx proxy support with X-Forwarded-Prefix header handling · 80af321d
      Stefy Lanza (nextime / spora ) authored
      - Updated ProxyFix configuration to handle all proxy headers (x_for, x_proto, x_host, x_port, x_prefix)
      - Added template context processor to inject script_root and url_root into all templates
      - Created JavaScript helper functions in base template for proxy-aware URL generation:
        - buildUrl() - Build URLs with correct proxy prefix
        - proxyFetch() - Make fetch requests with proxy-aware URLs
        - navigateTo() - Navigate to URLs with proxy prefix
        - getCurrentUrl() - Get current URL with proxy prefix
        - buildUrlWithParams() - Build URLs with query parameters
      - Updated all templates with hardcoded JavaScript URLs to use proxyFetch():
        - admin_settings.html
        - admin_users.html
        - admin_migrations.html
        - match_detail.html
        - fixture_detail.html
        - upload/zip.html
        - user_tokens.html
      - Updated templates with window.location.href to use navigateTo():
        - clients.html
        - reports.html
        - client_report_detail.html
      - Updated templates using window.location.href for URL manipulation to use getCurrentUrl():
        - match_report_detail.html
        - bet_detail.html
        - reports.html
        - client_report_detail.html
      - Created PROXY_SUPPORT.md documentation file
      
      This implementation ensures all URLs generated and managed in the web dashboard correctly handle the root path when behind an nginx proxy with X-Forwarded-Prefix header (e.g., /mbetterc).
      80af321d
  8. 03 Feb, 2026 13 commits
  9. 02 Feb, 2026 8 commits
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
      Fix incremental reports sync and template error · e69c15ea
      Stefy Lanza (nextime / spora ) authored
      - Fix MatchReport creation for incremental syncs with empty extraction_stats
      - When extraction_stats is empty but bets exist, create MatchReport from bets data
      - Fix duplicate client_id parameter error in reports template
      - Create separate detail_filters dict to avoid duplicate parameter
      e69c15ea
    • Stefy Lanza (nextime / spora )'s avatar
      Fix empty matches update · d3d966a5
      Stefy Lanza (nextime / spora ) authored
      d3d966a5
    • Stefy Lanza (nextime / spora )'s avatar
      Add comprehensive timezone options to all reports pages · 2117385c
      Stefy Lanza (nextime / spora ) authored
      - Create reusable timezone options partial with all IANA timezones
      - Include 400+ timezone options organized by region (Africa, America, Antarctica, Arctic, Asia, Atlantic, Australia, Europe, Indian, Pacific)
      - Each timezone displays only the city name for cleaner UI
      - Update all reports pages to use the timezone options partial
      - Timezone options include: Auto (Browser Local), UTC, and all major world timezones
      2117385c
    • Stefy Lanza (nextime / spora )'s avatar
      Add timezone support to all reports pages · 8a73a862
      Stefy Lanza (nextime / spora ) authored
      - Add timezone selector with auto-detection of browser local timezone
      - Add manual timezone selection options for major world timezones
      - Implement client-side timezone conversion using JavaScript Intl.DateTimeFormat
      - Update all datetime displays to use data-utc-datetime attribute for automatic conversion
      - All reports pages now support timezone filtering and display
      - Timezone options: Auto (Browser Local), UTC, and 14 major world timezones
      8a73a862
    • Stefy Lanza (nextime / spora )'s avatar
      Enhance reports page with improved layout, pagination, and detailed navigation · 6a24111a
      Stefy Lanza (nextime / spora ) authored
      - Repositioned summary cards to 2 rows (3 cards in first row, 2 in second row)
      - Changed table headers from 'Number of Matches' to 'Matches' and 'Number of Bets' to 'Bets'
      - Added professional styling with gradient headers, hover effects, and enhanced card design
      - Implemented full-width layout for reports page
      - Added per-page selector (10, 20, 50, 100 options, default 50) with pagination
      - Fixed 'View Details' button to properly navigate to client report detail page
      - Created match report detail page with match information and bets list
      - Created bet detail page with bet information and bet details breakdown
      - Added breadcrumb navigation throughout all detail pages
      - All pages maintain consistent professional styling and preserve filters
      6a24111a
    • Stefy Lanza (nextime / spora )'s avatar
      Fix: Auto-derive client_id from auth token when missing in reports sync · 66045355
      Stefy Lanza (nextime / spora ) authored
      - If client_id is missing or null in sync request, derive it from ClientActivity table
      - Look up most recent client activity for the API token to get rustdesk_id
      - Use derived client_id throughout the sync process (ReportSync, Bet, ExtractionStats, MatchReport)
      - Prevents database error: 'Column client_id cannot be null'
      - Ensures server uses same client identifier that client uses
      - Returns client_id_used in response for debugging
      - Fixes issue where client sends null client_id but server needs valid identifier
      66045355
    • Stefy Lanza (nextime / spora )'s avatar
      Fix: Auto-detect client_id from ClientActivity when not provided in /api/reports/last-sync · cd883251
      Stefy Lanza (nextime / spora ) authored
      - When client doesn't send client_id parameter, look up rustdesk_id from ClientActivity table
      - This ensures server uses same client_id that client uses when syncing
      - Fixes issue where server derived 'token_66' but client was syncing with '8d95b8a115c19857'
      - Server now correctly finds existing sync records and returns requires_full_sync=False
      cd883251