- 03 Feb, 2026 3 commits
-
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
- 02 Feb, 2026 26 commits
-
-
Stefy Lanza (nextime / spora ) authored
-
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
-
Stefy Lanza (nextime / spora ) authored
-
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
-
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
-
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
-
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
-
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
-
Stefy Lanza (nextime / spora ) authored
- Fixed TypeError: jinja2.runtime.Context.call() got multiple values for keyword argument 'client_id' - Removed explicit client_id=client.client_id from url_for call since it's already in **filters - This fixes the template rendering error on the reports page
-
Stefy Lanza (nextime / spora ) authored
- Log the complete JSON response being sent back to the client - This helps debug what the client is receiving - Shows requires_full_sync flag and all response fields in formatted JSON
-
Stefy Lanza (nextime / spora ) authored
- When client_id is not provided, derive a unique client_id from the API token (token_{api_token.id}) - This ensures each API token has its own unique client identifier for sync purposes - Fixes issue where client was receiving status for all clients instead of just itself - Allows the server to correctly signal requires_full_sync=True when the database is empty for that specific client -
Stefy Lanza (nextime / spora ) authored
- Add detailed logging for client_id, user, and API token information - Log counts of bets, extraction_stats, and match_reports for each client - Log requires_full_sync flag value for each client - Log response being sent to client - Add requires_full_sync: False to responses when sync records exist - This will help diagnose why client keeps sending incremental sync requests instead of full sync
-
Stefy Lanza (nextime / spora ) authored
- Add Bet, ExtractionStats, and MatchReport model imports to api_get_last_sync function - Fixes 'name Bet is not defined' error when querying last sync status
-
Stefy Lanza (nextime / spora ) authored
- Make client_id query parameter optional in /api/reports/last-sync - When client_id is not provided, return sync information for all clients associated with the authenticated user's API token - Add requires_full_sync flag to each client's response when no records exist across ALL report tables - Update REPORTS_SYNC_PROTOCOL_DOCUMENTATION.md with checking last sync status section - Add GET LAST SYNC INFORMATION section to REPORTS_SYNC_API_SPECIFICATION.txt This fix allows clients to query their sync status without needing to know their client_id, making the API more user-friendly and enabling automatic recovery detection.
-
Stefy Lanza (nextime / spora ) authored
- Add requires_full_sync flag to /api/reports/sync response when no records exist for client across ALL report tables (bets, extraction_stats, match_reports) - Add requires_full_sync flag to /api/reports/last-sync response when no records exist for client - Update REPORTS_SYNC_PROTOCOL_DOCUMENTATION.md with full sync required scenario - Update REPORTS_SYNC_API_SPECIFICATION.txt with requires_full_sync field documentation - Create REPORTS_SYNC_EMPTY_DATABASE_FIX.md with comprehensive fix documentation This fix addresses the critical gap where the server couldn't signal when it required a full sync after database reset, ensuring automatic recovery without manual intervention.
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
- Add Migration_014 to migrations.py for automatic application at launch - Migration adds accumulated_shortfall and cap_percentage columns to match_reports and extraction_stats tables - Migration will be automatically applied when the application starts - Includes both Python migration class and SQL script for manual execution if needed
-
Stefy Lanza (nextime / spora ) authored
- Add accumulated_shortfall field to ExtractionStats and MatchReport models - Add cap_percentage field to ExtractionStats and MatchReport models - Update API sync endpoint to accept and store accumulated_shortfall and cap_percentage for each match - Update reports page to show totals at the last match of selected period instead of sync timestamp - Update client report detail to display accumulated_shortfall and cap_percentage - Add comprehensive test script for accumulated_shortfall and cap_percentage implementation - Update templates to display cap_percentage in match lists This allows tracking the progression of the cap redistribution balance for every client over time, showing the actual values at the moment of each match extraction.
-
Stefy Lanza (nextime / spora ) authored
- Add Bootstrap 5.3.0 CSS from CDN - Add Font Awesome 6.4.0 for icons - Add Bootstrap 5.3.0 JS bundle for interactive components - This enables the responsive grid system (col-12, col-md-6, col-lg-3) to work properly - Cards and filter form will now display in horizontal layout as intended
-
Stefy Lanza (nextime / spora ) authored
- Change summary cards to display in single horizontal row using responsive grid (col-12 col-md-6 col-lg-3) - Add h-100 class to ensure equal card heights - Reorganize filter form into 3-column layout (Client, Date Range, Sort By) - Move time filters to always-visible section (works with all date range options) - Show custom date range inputs only when 'Custom' date range is selected - Add JavaScript to toggle custom date range visibility based on selection - Move action buttons to bottom-right of form with Reset and Apply buttons - Add resetFilters() function to clear all filters - Add me-2 and text-end CSS utility classes
-
Stefy Lanza (nextime / spora ) authored
- Add gradient backgrounds to summary cards (Total Payin, Total Payout, Total Balance, CAP Redistribution) - Include circular icon boxes with relevant icons for each metric - Implement dynamic color for Total Balance (green for positive, red for negative) - Reorganize filters into compact, collapsible layout with logical grouping - Add collapsible header with animated chevron icon - Enhance filter sections with icons and improved spacing - Add comprehensive CSS styles for gradients, flexbox utilities, and visual effects - Include JavaScript for smooth collapsible animation with icon rotation
-
Stefy Lanza (nextime / spora ) authored
- Fix deletion order: child tables before parent tables - Add bet_details deletion before bets deletion - All 4 options updated with correct deletion order - Prevents foreign key constraint errors Deletion order: 1. report_sync_logs (no dependencies) 2. match_reports (child of report_syncs) 3. extraction_stats (child of report_syncs) 4. bet_details (child of bets) 5. bets (parent of bet_details, child of report_syncs) 6. report_syncs (parent of bets, extraction_stats, match_reports)
-
Stefy Lanza (nextime / spora ) authored
- Add RESET_REPORTS_SYNC.sql with multiple reset options - Option 1: Reset for specific client - Option 2: Reset for ALL clients (full reset) - Option 3: Reset for multiple specific clients - Option 4: Reset syncs after specific date - Include verification queries to confirm deletion - Include auto-increment reset option This allows administrators to: - Force clients to perform full resync - Reset corrupted sync data - Clean up old sync records - Verify deletion was successful
-
Stefy Lanza (nextime / spora ) authored
- Add GET /api/reports/last-sync endpoint to query server for last sync information - Update reports page with sorting by client name and cap balance - Create comprehensive client-side implementation guide (CLIENT_SYNC_IMPLEMENTATION_GUIDE.md) - Create minimal client prompt (CLIENT_SYNC_MINIMAL_PROMPT.md) - Update final implementation documentation (REPORTS_FINAL_IMPLEMENTATION.md) This allows clients to: - Query server for last sync information before syncing - Verify local tracking against server state - Recover from tracking corruption - Prevent data loss from missed syncs
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
- 01 Feb, 2026 8 commits
-
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
- Implement /api/reports/sync endpoint for client report data synchronization - Add database models: ReportSync, Bet, BetDetail, ExtractionStats, ReportSyncLog - Create web interface at /reports with filtering, pagination, and export (PDF/XLSX/CSV) - Add sync logs interface at /sync-logs with comprehensive search and filtering - Implement comprehensive logging for all sync operations - Add migration 010 for existing systems to create all reports tables - Update navigation menu with Reports and Sync Logs links - Add weasyprint dependency for PDF generation - Include test suite for reports sync API - Add complete documentation in REPORTS_FEATURE_README.md
-
- 21 Jan, 2026 1 commit
-
-
Stefy Lanza (nextime / spora ) authored
- Clients list page now removes ClientActivity records associated with inactive or revoked API tokens - Only clients with active tokens are displayed in the web interface - Added logging for cleanup operations - Maintains existing filtering for active tokens in display
-
- 20 Jan, 2026 2 commits
-
-
Stefy Lanza (nextime / spora ) authored
- Log request method, User-Agent header, and all headers on request arrival - Helps debug what user agent the client is actually sending
-
Stefy Lanza (nextime / spora ) authored
- Log API token, rustdesk_id, IP, and user agent received - Log client creation and updates with user agent changes - Log database commit success - Add rollback on exception for better error handling
-