1. 25 Jul, 2026 5 commits
  2. 24 Jul, 2026 5 commits
    • Mahmoud Aglan's avatar
      Fix guardian relationship_type CHECK violation — use 'father' instead of invalid 'guardian' · 1cae2631
      Mahmoud Aglan authored
      The guardians_relationship_type_check constraint allows: father, mother,
      grandfather, grandmother, uncle, aunt, sibling, legal_guardian, other.
      The ParticipantForm was inserting 'guardian' which isn't a valid value.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      1cae2631
    • Mahmoud Aglan's avatar
      Allow event deletion from any status + default website is_published to true · a4e6d437
      Mahmoud Aglan authored
      - Remove draft-only restriction on delete button in EventShow
      - EventService::delete() no longer blocks deletion based on status
      - Migration sets website_settings.is_published default to true and updates existing rows
      - Fixes 404 on public event pages caused by unpublished website settings
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      a4e6d437
    • Mahmoud Aglan's avatar
      Upgrade event form builder with 20+ new features — radio, uniqueness, maps, conditionals · ce5c6e89
      Mahmoud Aglan authored
      - Add radio, national_id, location, section_divider, terms field types to FormFieldType enum
      - Add field uniqueness constraint (blocks duplicate registrations per unique field)
      - Add Google Maps locations support (JSONB column + map embed on public page)
      - Add conditional field visibility (show field only when another field equals a value)
      - Add min/max length, min/max value, regex pattern validation per field
      - Add allow_other option for select/radio/multi_select fields
      - Add field description/help text, placeholder, default value
      - Add duplicate field action in form builder
      - Add section dividers for visual grouping
      - Add terms acceptance field type with URL link
      - Sanitize form fields before save (auto-fill values, strip invalid options)
      - Public registration form uses Alpine.js for conditional visibility
      - Character counters shown when max_length is set
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      ce5c6e89
    • Mahmoud Aglan's avatar
      Fix website builder audit issues — missing $sections + forbidden href=# · a26be026
      Mahmoud Aglan authored
      - PublicEventController: pass $sections to views (navbar/footer crash without it)
      - Navbar: replace href="#" with href="#section-hero" (forbidden pattern)
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      a26be026
    • Mahmoud Aglan's avatar
      Add Events/Tournaments system — full vertical slice · 44c8d8aa
      Mahmoud Aglan authored
      Complete events module with admin CRUD, public registration, and management:
      - Migrations: events, event_registrations, media collections, permissions
      - Domain: Event/Enums (5), Models (2), Services (EventService, EventRegistrationService)
      - Admin: EventList, CreateEventWizard (4-step with form builder), EventShow, EventRegistrationList
      - Public: event listing + detail pages under /site/{slug}/events with Livewire registration form
      - Form builder: button-based add/remove/reorder fields stored as JSONB
      - Registration: dynamic validation from form_fields, person matching, registration numbers
      - Admin registrations: dynamic columns, bulk confirm/cancel, CSV export
      - Livewire scripts added to website layout for public forms
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      44c8d8aa
  3. 22 Jul, 2026 11 commits
  4. 20 Jul, 2026 3 commits
    • Mahmoud Aglan's avatar
      Fix schedule builder grid — support grid/lanes/zones layout types · 1b16cf85
      Mahmoud Aglan authored
      The grid was blank because lanes and zones segments have null row_index/col_index.
      The old code assumed all layouts were grid-type and collapsed to 0×0.
      
      - Grid layouts: keep the spreadsheet-style row/col selector view
      - Lanes layouts: render as horizontal strips (label + cell side by side)
      - Zones/custom layouts: responsive card grid (no row/col concept)
      
      Layout type is now read from Facility::activeLayout (new HasOne relationship)
      with a null-safe fallback to row_index detection. Segment cell HTML extracted
      to _segment-cell.blade.php partial to avoid triplication.
      Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
      1b16cf85
    • Mahmoud Aglan's avatar
      Fix facilities route ordering — static segments must precede {facility} wildcard · abd15a9b
      Mahmoud Aglan authored
      /facilities/space-assignment and /facilities/schedule-builder were registered
      after /facilities/{facility}, so Laravel matched the wildcard first and tried
      to resolve the literal slugs as UUIDs, crashing with invalid uuid syntax.
      Static routes are now declared before the wildcard.
      Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
      abd15a9b
    • Mahmoud Aglan's avatar
      Add installment collection breakdown to product analytics · 8bf5451e
      Mahmoud Aglan authored
      Adds محصّل vs إجمالي الإيرادات with a progress bar and remaining balance.
      Collection is computed as a pro-rata share of invoice.paid_amount based on
      the product line's fraction of the invoice total — so mixed invoices
      (product + program) correctly attribute only the product's share of each
      payment. Price overrides are excluded from the product's line because they
      always land on the program item, leaving the product total_amount intact.
      Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
      8bf5451e
  5. 19 Jul, 2026 3 commits
  6. 17 Jul, 2026 4 commits
  7. 16 Jul, 2026 9 commits
    • Mahmoud Aglan's avatar
      Remove client-specific import seeder from repo · 97d3b159
      Mahmoud Aglan authored
      This file contained OC Sport-specific data and does not belong in the
      shared multi-tenant codebase.
      Co-Authored-By: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
      97d3b159
    • Mahmoud Aglan's avatar
      Add JulyPlayersImportSeeder for OC-Sport legacy player data · 069533c5
      Mahmoud Aglan authored
      Imports Team (99) and Academy (93) players from HTML sheet one at a time
      using existing services (InvoiceService, PaymentService). Creates Person →
      Participant → Enrollment → Invoice → Payment per player, with installment
      plan attachment for partial القيد payments. Cross-sheet duplicates are
      written to storage/app/july_import_duplicates.json. Idempotent by name.
      Co-Authored-By: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
      069533c5
    • Mahmoud Aglan's avatar
      Fix varchar(10) overflow on training_groups.code column · 41b7657c
      Mahmoud Aglan authored
      Generated codes like TEAM2001-10 exceed 10 chars when there are 10+ duplicate
      program names within an academy. Widen to varchar(20).
      Co-Authored-By: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
      41b7657c
    • Mahmoud Aglan's avatar
      Add per-slot explicit installment amounts to product plans · fe016b49
      Mahmoud Aglan authored
      - Migration: add installment_amounts JSONB (nullable) to product_installment_plans
      - ProductInstallmentPlan: new buildSchedule() method — uses explicit piaster amounts per slot where set, auto-calculates remainder evenly for blank slots; downPaymentAmount/regularInstallmentAmount respect slot[0] override
      - ProductForm: syncInstallmentSlots() keeps slot array in sync when count changes; plan rows load/save installment_amounts (stored as piasters, shown as pounds); slot inputs appear under collapsible "تحديد مبلغ كل قسط" toggle per plan row
      - Wizard confirm(): uses buildSchedule() so each Installment row gets its correct explicit or auto-calculated amount
      - Wizard blade breakdown preview: renders individual amounts when slots differ, uniform "N × amount" when all regular slots match
      Co-Authored-By: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
      fe016b49
    • Mahmoud Aglan's avatar
      Add annual products with dual pricing and installment plans · 7f4dbddd
      Mahmoud Aglan authored
      - New migration: billing_cycle (one_time/annual), member_price, non_member_price on products; product_installment_plans table (per-product, per-tier plan templates)
      - ProductInstallmentPlan model with scopeActive/forTier, downPaymentAmount/regularInstallmentAmount helpers
      - Product model: priceForTier(), isAnnual(), installmentPlans() relationship
      - ProductForm: annual billing section with member/non-member dual prices and installment plan builder (add/remove rows, upsert on save)
      - Registration wizard: essentialProducts() and hotbuyResults() now return billing_cycle and plans[]; addHotbuyItem() carries plans into cart; setHotbuyPlan() selects a plan per cart item; confirm() generates PaymentPlan + Installment rows for annual items with a selected plan
      - Wizard blade: annual cart items show purple "سنوي" badge, plan pills (full payment + per-plan buttons), and installment breakdown preview on selection
      Co-Authored-By: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
      7f4dbddd
    • Mahmoud Aglan's avatar
      Fix proration settings never saving or taking effect · b9239f68
      Mahmoud Aglan authored
      Two bugs:
      1. save() wrote bare key "allow_proration" but ProrationService reads
         dotted "enrollment.allow_proration" — now always writes "{group}.{key}"
      2. loadAllSettings() tried to read bare keys but DB had dotted keys from
         seeder — now strips group prefix on read so UI always sees bare keys
      
      Result: toggle saves correctly, ProrationService reads the live value,
      mid-month enrollment now shows prorated fee (e.g. day 16 = 15/30 × fee).
      Co-Authored-By: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
      b9239f68
    • Mahmoud Aglan's avatar
      Fix null metadata crash on invoice_items insert · 160e9785
      Mahmoud Aglan authored
      JSONB column has NOT NULL constraint — pass empty array instead of null
      when no price override metadata exists.
      Co-Authored-By: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
      160e9785
    • Mahmoud Aglan's avatar
      Add guardian profession and workplace to registration wizard and participant view · a979f30b
      Mahmoud Aglan authored
      Fields already existed on the guardians table (occupation, workplace) but
      had no UI. Now:
      - Registration wizard step 2 shows المهنة + جهة العمل fields (optional)
      - Saved to Guardian on create; updates existing guardian if already found
      - Pre-populated when selecting an existing guardian via search
      - Participant show → أولياء الأمور tab adds المهنة / جهة العمل column
      Co-Authored-By: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
      a979f30b
    • Mahmoud Aglan's avatar
      Expose proration settings in /settings/system → التسجيل tab · 85319db6
      Mahmoud Aglan authored
      Add allow_proration (boolean) and renewal_day (number, 1-28) to the
      enrollment settings schema with descriptive hints so admins can find and
      toggle partial monthly payment from the UI.
      Co-Authored-By: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
      85319db6