1. 02 Aug, 2026 4 commits
  2. 01 Aug, 2026 4 commits
    • Mahmoud Aglan's avatar
      Fix: guard null participant in enrollment list to prevent route error · 32f5e059
      Mahmoud Aglan authored
      Soft-deleted participants return null from the relationship, causing
      route('participants.show', null) to throw a missing parameter exception.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      32f5e059
    • Mahmoud Aglan's avatar
      Fix all non-existent database column references across codebase · d66d0f07
      Mahmoud Aglan authored
      - TrainerShow: period_start→date, total_amount→amount, status 'pending'→'active'
      - trainer-show.blade: period_start→date, sessions_count→quantity, total_amount→amount
      - AttendanceResource: actual_check_in→check_in_at, date→session.session_date
      - InvoiceResource: invoice_number→number, balance_due→due_amount, remove description_ar
      - ReportService: paid_amount→status check, cancellation_reason→withdrawal_reason,
        wallet status→is_active, remove frozen_amount
      - SendDailySummary: Organization→Academy, is_active→status='active'
      - SendParentWeeklyReport: fix morph type + join through session_date
      - DeactivateExpiredEnrollments: expiry_date→end_date
      - CertificateController + NotifyGuardianOfAbsence + RemoveAttendanceRecords:
        morph type 'participant'→Participant::class
      - SendInvoiceCancelledNotification: cancellation_reason→notes
      - DeleteParticipant: remove phantom refunded_amount reference
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      d66d0f07
    • Mahmoud Aglan's avatar
      Show orphan schedules on facility grid + cancel support · b2a36e89
      Mahmoud Aglan authored
      The grid now also displays training_schedules that have no matching
      space_reservation (orphan schedules). These appear on the grid so users
      can see and cancel them. The cancelReservation method now accepts both
      reservationId and scheduleId to handle both cases.
      
      Also added cancel button column to the FacilityShow reservations tab.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      b2a36e89
    • Mahmoud Aglan's avatar
      Add reservation cancel button to facility show page · 18ced3e7
      Mahmoud Aglan authored
      Users can now cancel reservations directly from the reservations tab
      inside the facility show page via a cancel button with confirmation.
      Previously reservations were display-only with no way to modify them.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      18ced3e7
  3. 29 Jul, 2026 7 commits
  4. 28 Jul, 2026 2 commits
  5. 27 Jul, 2026 20 commits
    • Mahmoud Aglan's avatar
      Employee wizard user step, person search in UserForm, delete fixes, cash dashboard · 1fa2ae79
      Mahmoud Aglan authored
      - Add Step 5 (User Account) to CreateEmployeeWizard: email, password, role
      - Replace person dropdown in UserForm with live search by name/phone
      - PersonList.deletePerson: cascades to linked user
      - UserList.deleteUser: deletes user only, preserves person
      - Expense form: visual radio-card payment source selector
      - Dashboard: cash-on-hand card (collections - expenses this month)
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      1fa2ae79
    • Mahmoud Aglan's avatar
      Fix double-prefixed media URLs in API responses · 02675f8e
      Mahmoud Aglan authored
      Media->url accessor already returns full URL via Storage::url().
      Remove redundant asset('storage/') wrapping.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      02675f8e
    • Mahmoud Aglan's avatar
      OTP: switch to 4-digit codes, add 0000 universal bypass in demo mode · 25cefe7c
      Mahmoud Aglan authored
      - Changed OTP from 6 digits to 4 digits
      - Code 0000 always works in demo mode (no external SMS needed)
      - Relaxed rate limit from 3 to 5 attempts, timeout 300s
      - Validation accepts 4-6 digit codes for flexibility
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      25cefe7c
    • Mahmoud Aglan's avatar
      Dashboard: show unique players vs enrollment count in activity breakdown · 391629ac
      Mahmoud Aglan authored
      Explains why total enrollments (211) > activity participants (199):
      one player can have multiple enrollments in the same sport.
      Now shows "199 لاعب · 211 تسجيل" per activity for clarity.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      391629ac
    • Mahmoud Aglan's avatar
      Prevent stale Livewire hash after deploys — add no-cache headers for HTML responses · c734f883
      Mahmoud Aglan authored
      After each deploy, Livewire's JS hash changes. Without no-cache on HTML,
      browsers serve the old page with the wrong /livewire-{hash}/update endpoint,
      causing 404s until the user hard-refreshes.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      c734f883
    • Mahmoud Aglan's avatar
      Fix AppConfigController: fallback to first academy for public endpoints · 805b7d54
      Mahmoud Aglan authored
      Single-academy deployments don't have current_academy bound for
      unauthenticated API requests. Fall back to Academy::first() so
      /api/v1/app/config works without auth.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      805b7d54
    • Mahmoud Aglan's avatar
      Website Builder V2: production polish + route fixes + dashboard enrollment breakdown · dc79c433
      Mahmoud Aglan authored
      - Add admin UIs for Video, Trainers, Schedule, and Pricing Plan sections
      - Redesign schedule section with interactive day-filter cards and Alpine.js
      - Fix video section click handler with Alpine.js reactive state
      - Add section reordering (up/down arrows) in SectionManager
      - Add SEO meta tags (OG, Twitter Card, canonical, robots) to website layout
      - Add site-btn--outline-accent CSS variant for pricing cards
      - Add scrollbar-hide utility to website.css
      - Fix broken routes: website.preview → website.manage.preview,
        parent.child-detail → parent.profile.child,
        parent.invoice-detail → parent.finances.invoice
      - Fix attendance "not_taken" filter to match dashboard logic (include scheduled sessions)
      - Add enrollment status breakdown (active/pending/cancelled) to subscription revenue widget
      - Add cancelled/suspended revenue explanation in activity breakdown
      - Add Phase C migration + events section key migration
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      dc79c433
    • Mahmoud Aglan's avatar
      Add video.php helper referenced in composer autoload · 9d9ae754
      Mahmoud Aglan authored
      Fixes deploy build failure: composer dump-autoload couldn't find
      app/Helpers/video.php which is required by composer.json autoload.files.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      9d9ae754
    • Mahmoud Aglan's avatar
      Add OpenAPI 3.1 documentation — full Mobile API spec (59 endpoints) · 3fe6c37b
      Mahmoud Aglan authored
      Complete OpenAPI 3.1.0 YAML specification covering all mobile API endpoints:
      - 15 tags (Auth, Dashboard, Participants, Notifications, Shop, Payments, etc.)
      - 10 reusable schemas (User, Participant, Invoice, Session, Attendance, etc.)
      - Request/response bodies for every endpoint
      - Error responses, validation errors, rate limit documentation
      - Bearer token auth scheme documented
      - 2401 lines of production-ready API docs
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      3fe6c37b
    • Mahmoud Aglan's avatar
      Mobile API Phase 9: Full push notification coverage + broadcast + analytics · 8e5171fa
      Mahmoud Aglan authored
      - 5 new push listeners: invoice overdue, installment overdue, attendance threshold, waitlist spot, service request resolved
      - Deep-link route field added to all push payloads for Flutter navigation
      - Announcement broadcast system: send push to all/group/branch/program parents
      - Push analytics tracking: delivered/opened/dismissed events from client
      - Badge count endpoint for silent background refresh
      - Device heartbeat for activity tracking
      - Scheduled announcement sender command (runs every minute)
      - ServiceRequestResolved event + push notification
      - 59 total API routes, 24 tests passing
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      8e5171fa
    • Mahmoud Aglan's avatar
      Mobile API Phase 8: Profile, photo upload, branches, health check, tests · 11ad998e
      Mahmoud Aglan authored
      - Profile view/edit (personal info + emergency contact)
      - Photo upload for profile and participant (multipart, 5MB max)
      - Branch locator endpoint (coordinates, operating hours, phone)
      - Health check endpoint (GET /health — no DB, instant response)
      - API response headers middleware (X-Request-Id, X-Api-Version)
      - Feature test suite: 17 tests covering auth, public access, rate
        limiting, and validation across all endpoint groups
      - 53 total API endpoints
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      11ad998e
    • Mahmoud Aglan's avatar
      Mobile API Phase 7: Evaluations, dashboard, service requests, receipts · 8504dd68
      Mahmoud Aglan authored
      - Evaluation list + detail with per-criterion scores and percentages
      - Dashboard endpoint: single-call home screen (all children, today's
        sessions, totals, announcement bar, unread counts)
      - Service requests: freeze/unfreeze/transfer/cancellation workflow
        with duplicate prevention and cancel-by-user
      - Invoice detail + payment receipt endpoints for mobile viewing
      - Fix: use correct column name `due_amount` (not `balance_due`) across
        all API controllers and PaymobService
      - 48 total API endpoints
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      8504dd68
    • Mahmoud Aglan's avatar
      Mobile API Phase 6: Wallet, installments, documents, events, orders + rate limiting · 30e19414
      Mahmoud Aglan authored
      - Wallet balance + transaction history per participant
      - Installment/payment plan tracking with progress percent
      - Document listing with expiry status summary
      - Event detail + registration from mobile (duplicate check)
      - Product order flow with Paymob fallback (graceful when unconfigured)
      - API rate limiting: 60/min general, 10/min auth, 3/min OTP, 5/min payments
      - Production-safe error responses (no stack traces when APP_DEBUG=false)
      - 40 total API endpoints
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      30e19414
    • Mahmoud Aglan's avatar
      Harden Paymob integration with 4-tier credential fallback · 0aea2391
      Mahmoud Aglan authored
      Credential resolution order: academy system_settings → current_academy
      setting → config/services.php → env variable. Callback endpoint now
      resolves academy from the payment record itself (no auth context needed).
      Failed payments are explicitly marked with failure reason. Added HTTP
      timeouts to all Paymob API calls.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      0aea2391
    • Mahmoud Aglan's avatar
      Mobile API Phase 4+5: Paymob payments, absence reporting, messaging · ef15aa1b
      Mahmoud Aglan authored
      - Paymob gateway integration (auth→order→payment key→HMAC callback)
      - Payment initiation endpoint with pending record + iframe URL
      - Webhook callback with double-processing prevention
      - Guardian absence reporting (excused status for future sessions)
      - Contact messages (send + list with reply support)
      - System settings migration seeding all mobile/payment config keys
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      ef15aa1b
    • Mahmoud Aglan's avatar
      Mobile API Phase 3: Academy explore + shop endpoints · 40734561
      Mahmoud Aglan authored
      - Create AcademyController (public, no auth required):
        - GET academy/news — paginated news articles with images
        - GET academy/news/{uuid} — full article body
        - GET academy/programs — active training programs with activity info
        - GET academy/events — upcoming published events with registration status
        - GET academy/gallery — paginated media gallery
      - Create ShopController (auth required):
        - GET products — essential products with purchase history check
          (includes already_purchased_at per participant per year)
      - Total: 26 API endpoints
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      40734561
    • Mahmoud Aglan's avatar
      Mobile API Phase 2: Push notifications via Firebase Cloud Messaging · 0b2c6122
      Mahmoud Aglan authored
      - Install kreait/firebase-php SDK
      - Create PushNotificationService with 3-tier credential resolution
        (system_settings → storage file → env var, graceful degradation)
      - Auto-deactivate invalid/unregistered FCM tokens on send failure
      - Add Push case to NotificationChannel enum
      - Create 6 event listeners for push notifications:
        - AttendanceMarked → notify guardians (present/absent)
        - PaymentReceived → confirm payment to guardians
        - InvoiceCreated → alert guardians of new invoice
        - SessionCancelled → notify all group participants
        - EnrollmentCreated → confirm enrollment to guardians
        - EvaluationShared → notify guardians of new evaluation
      - Register all listeners in EventServiceProvider (queued)
      - Create NotificationController API endpoints:
        - GET notifications (paginated + unread count)
        - PATCH notifications/{id}/read
        - POST notifications/read-all
        - GET/POST notifications/preferences
      - Create scheduled push commands:
        - push:session-reminder (every minute, 30min before session)
        - push:installment-due (daily, 1 and 3 days before due)
      - Add channel_push column to notification_preferences
      - Total: 20 API endpoints now live
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      0b2c6122
    • Mahmoud Aglan's avatar
      Mobile API Phase 1: Sanctum auth, OTP flow, participant endpoints · 7a8a5594
      Mahmoud Aglan authored
      - Install Laravel Sanctum, add HasApiTokens to User model
      - Register API routes under /api/v1/ prefix in bootstrap/app.php
      - Create AppConfigController (public): academy branding, feature flags, auth mode
      - Create AuthOtpController: OTP request/verify with demo mode, rate limiting
      - Create DeviceController: FCM token register/refresh/delete
      - Create ParticipantController: children, show, summary, schedule, attendance, invoices, enrollments
      - Create API Resources (User, Participant, Session, Attendance, Invoice, Enrollment)
      - Create device_tokens migration with platform CHECK constraint
      - Create DeviceToken model with BelongsToAcademy trait
      - Add mobile API implementation plan document
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      7a8a5594
    • Mahmoud Aglan's avatar
      Rewrite mobile app plan — per-instance architecture + Firebase + demo auth · 0da841fd
      Mahmoud Aglan authored
      - One app per client: single instance.dart config file change = new build
      - Firebase: one project per client, service account JSON uploaded to system settings
      - Auth: demo mode (OTP=123456) for testing, real SMS when provider configured
      - Runtime branding: logo/colors fetched from /api/v1/app/config, not hardcoded
      - Full Firebase setup checklist, notification flow diagram, deployment checklist
      - New client deployment: Firebase (5min) + Flutter build (5min) + config (2min)
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      0da841fd
    • Mahmoud Aglan's avatar
      Add essential product duplicate warning in POS + update mobile app plan · 733ed4d3
      Mahmoud Aglan authored
      POS Terminal now checks if an essential product was already purchased by
      the selected participant this year. Shows amber warning with the purchase
      date — allows the sale to proceed, just warns the admin.
      
      Also expanded mobile app plan with: explore academy (news, gallery),
      shop for essential products from app, event registration, and the
      corresponding API endpoints needed on the system side.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      733ed4d3
  6. 26 Jul, 2026 3 commits