1. 01 Jun, 2026 3 commits
    • Mahmoud Aglan's avatar
      Overhaul coach create form: full validation, NID auto-parse, edge cases · e1f1837a
      Mahmoud Aglan authored
      Frontend:
      - Client-side NID parser (no API call) — extracts DOB, gender, age, governorate
      - Shows green badge with parsed info (governorate, gender, age)
      - Red highlight + Arabic message on every invalid field
      - Validates: code, name, employment_type, payment_model (non-academy),
        academy_id (academy), NID length, email format, phone format
      - Hides payment/rate fields for academy coaches (not needed)
      - Shows note explaining academy coaches follow salary system
      - Gender/DOB auto-locked when NID is valid, manual otherwise
      - Age displayed under DOB field
      
      Backend:
      - Strips non-digits from NID input
      - Uppercase code automatically
      - Checks NID uniqueness against existing coaches
      - Validates email with filter_var
      - Academy coach requires academy_id selected
      - payment_model defaults to 'salary' for academy, 'per_session' fallback
      - max_groups minimum 1
      - Success message includes coach name
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      e1f1837a
    • Mahmoud Aglan's avatar
      Migration: add updated_by/created_by to all 17 tables with autoTrackAuthor · 646d11e6
      Mahmoud Aglan authored
      Tables fixed (already applied to live DB directly):
      reservations, academy_settlements, achievement_definitions,
      activity_subscriptions, facility_grids, facility_monthly_plans,
      facility_zone_schedules, player_evaluations, player_injuries,
      pool_bookings, pool_configurations, pool_schedules,
      sa_player_documents, sa_pricing_rules, tournaments,
      training_groups, training_sessions
      
      Migration is idempotent — checks column existence before ALTER.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      646d11e6
    • Mahmoud Aglan's avatar
      Fix 2 boot failures: reservations.updated_by missing, sa_coaches.payment_model NULL · 299e67a6
      Mahmoud Aglan authored
      - reservations: added updated_by column (model has autoTrackAuthor=true but column didn't exist)
      - sa_coaches: academy coaches now default to payment_model='salary' instead of NULL (NOT NULL column)
      - Also applied column fix directly to live DB via SSH
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      299e67a6
  2. 31 May, 2026 5 commits
  3. 30 May, 2026 3 commits
    • Mahmoud Aglan's avatar
      Add seed: 32 bot players + test tournament for bracket testing · 56cb4395
      Mahmoud Aglan authored
      Run: php cli.php seed:run Phase_88_001_seed_tournament_bot_players
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      56cb4395
    • Mahmoud Aglan's avatar
      Fix retroactive wizard: parse NID for date_of_birth and gender · 0f4ca990
      Mahmoud Aglan authored
      The members table has date_of_birth as NOT NULL, but the wizard passed
      null when no explicit DOB was entered. Now NationalIdParser extracts
      DOB and gender from the 14-digit national ID for the main member,
      spouses, children, and temporary members.
      
      If no NID and no DOB provided, returns a clear validation error instead
      of letting the DB constraint violation propagate.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      0f4ca990
    • Mahmoud Aglan's avatar
      Fix 5 support ticket bugs: AJAX errors, capacity validation, audit export,... · 30062682
      Mahmoud Aglan authored
      Fix 5 support ticket bugs: AJAX errors, capacity validation, audit export, player lookup, fee display
      
      TKT-59: ExceptionHandler now returns JSON for AJAX/XHR requests instead of
      HTML error pages. Booking wizard JS improved to show actual error messages.
      
      TKT-57: Pricing rule creation now validates group_size_max against the
      facility unit's max_capacity, preventing over-capacity rules.
      
      TKT-46: Added audit log CSV export with all current filters applied.
      New route GET /audit/export and export button in the filter bar.
      
      TKT-55: Player registration member lookup now uses only the DB id
      (set by AJAX member lookup) instead of ambiguous membership_number/id
      fallback. National ID field locked when auto-filled from member record.
      
      TKT-50: Fee breakdown text now shows base amount and development fee
      separately (e.g. "اشتراك سنوي: 222.00 + تنمية: 35.00 = 257.00")
      instead of just the combined total.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      30062682
  4. 24 May, 2026 15 commits
  5. 23 May, 2026 14 commits