- 30 Jun, 2026 9 commits
-
-
Mahmoud Aglan authored
- Group-to-group segment overlap is blocked (hard error) - Trainer-to-group overlap is allowed (trainers supervise areas) - Checks pending unsaved assignments, not just DB reservations - Proper Arabic error message explaining the constraint Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
ScheduleConflictService checks ALL sources of trainer/group conflicts: - TrainingSchedule (recurring weekly assignments) - TrainingSession (specific date overrides) - TrainingGroup.head_trainer_id (implied trainer commitment) - Assignment model (formal polymorphic assignments) Schedule Builder improvements: - Flexible time picker (any minute interval, not just hourly) - Trainer availability indicators (green dot = free, orange = busy) - Group availability indicators (red warning if scheduled elsewhere) - Implied trainer warnings (group's head trainer conflict = soft warning) - New vs existing assignments visually distinct (green = unsaved) - Trainer name shown on existing reservations - Row/column/all selection helpers - Recurring booking checks group + trainer + space conflicts per date - Cancel series now deactivates the underlying TrainingSchedule - Final validation pass before commit (double-check for race conditions) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Full-featured schedule builder with: - Facility selection, date navigation, weekly view - Hourly time slot grid showing existing reservations - Grid/segment view with drag-drop group assignment - Trainer drag-drop with overlap support - Collision detection via SpaceCollisionService - Single-date save and recurring weekly booking (N weeks, multi-day) - Cancel single reservation or entire recurring series - RTL Arabic-first UI with Alpine.js interactivity Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Financial Overview: - New FinancialOverview Livewire component with P&L, break-even gauge, facility costs breakdown, revenue sources, collection rate - Migration adds monthly_rental_cost to facilities table - Monthly cost field added to facility form - Sidebar entry under المالية section Setup Wizard Enforcement: - Activities are now mandatory (min 1) - Programs are now mandatory with price > 0 - Facilities are now mandatory with monthly cost field - Auto-creates BasePrice records for programs during setup - Facility form includes operating hours and monthly cost Permission System Fix: - PermissionSeeder now called from DatabaseSeeder (has correct permission names matching route middleware: pos.sell, attendance.mark, etc.) - Branch manager gets all relevant module prefixes (inventory, pricing, wallets, activities, audit, notifications) - Receptionist gets pos.sell, pos.list, cash_sessions.manage - Accountant gets reports.view, wallets.view, pricing.list - PermissionService falls back to roles() pivot when primaryRole is null - SetCurrentAcademy middleware eager-loads roles.permissions as fallback Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Big prominent button copies full error report (exception, stack trace, request data, SQL queries, session) as formatted text to clipboard. Visual feedback with green check animation on success. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Features: - SpaceLayoutManager: full CRUD for facility layouts (grid/lanes/zones/custom) with visual segment preview and toggle availability - SpaceAssignmentWizard: 5-step wizard for assigning groups to facility segments Step 1: Search and select training group Step 2: Choose which schedule slot to assign Step 3: Pick the facility (if not already linked) Step 4: Visual grid/lane/zone selector with real-time collision detection Step 5: Success confirmation - Visual grid renders as clickable cells showing available/selected/occupied/disabled states - Real-time collision checking against existing confirmed reservations - Saves space_reservation_template on TrainingSchedule for auto-reservation on session creation - Fix: ReservationService.autoReserveForSession() now uses correct field names (space_reservation_template instead of segments, segment_ids instead of segments key) - Added "التخطيط" action link in facility list table - Added "تعيين المساحات" to sidebar navigation Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- BrandingSettings Livewire component with file uploads (logo, dark logo, favicon, signature, login background, invoice header) - Color picker for primary/secondary/accent/sidebar/status colors with live preview panel and preset palettes - Typography settings (Arabic/English font, base font size) - Invoice/receipt footer text and terms & conditions - Display toggles (logo in sidebar, logo in invoice, signature, compact mode) - CSS variables injected into app layout that drive sidebar, buttons, etc. - Sidebar now uses --brand-sidebar-bg/text/active variables - Logo displays in sidebar when uploaded - SystemSettingsSeeder populates all 6 groups with 50+ settings Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Fix PermissionSeeder: use correct column names (name not slug, permission_role not role_permissions) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Fix sidebar positioning (end-0 → start-0) so it appears on the RIGHT in RTL - Fix main content margin (me-64 → ms-64) to offset sidebar correctly - Fix TrainingProgram queries using non-existent is_active column → status - Fix User queries using is_active → status - Fix invoice type 'invoice' → 'standard' to match CHECK constraint - Fix CollectPaymentWizard using balance_due → due_amount + billable morphs - Fix notification template Blade parse error (unclosed parenthesis) - Align 10+ sidebar permission checks with actual route middleware permissions - Add missing permissions to seeder (pos.sell, inventory.list, reports.view, etc.) - Add comprehensive global error handler with full stack trace, SQL log, request data - Add Arabic error pages (500, 403, 404) with detailed debugging info Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 29 Jun, 2026 13 commits
-
-
Mahmoud Aglan authored
Audited all varchar-limited columns vs code that generates values for them: - BranchForm: validation was max:20 but column is varchar(10) — fixed - ActivityService: Str::slug output now capped at 90 chars (column is 100) - TrainingProgramService: same slug truncation fix - SetupWizard: slug generation for activities/programs also truncated - Logout: removed navigate:true (app→guest layout cross breaks) Affected columns and their limits: branches.code = varchar(10) ✓ fixed training_groups.code = varchar(10) ✓ already validated activities.slug = varchar(100) ✓ now truncated training_programs.slug = varchar(100) ✓ now truncated Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Str::slug on Arabic names can produce codes longer than 10 chars. Added Str::limit(..., 10, '') to truncate. Also removed navigate:true from redirects to avoid Livewire SPA issues between layouts. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Replaced x-data/x-show/x-transition with @if($currentStep === N)/@endif. Livewire re-renders the component on each step change, so only the active step's HTML is sent to the browser. No JS needed, no entangle, no Alpine timing issues. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
1. app.js was importing and starting Alpine manually, but Livewire 3/4 already bundles Alpine. Two instances meant $wire magic was unavailable. Now app.js just registers the focus plugin via Livewire's alpine:init hook. 2. Wizard x-data used @entangle which compiled to the old window.Livewire.find(id).entangle() syntax. Replaced with $wire getters which is the canonical Livewire 3+ approach. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Livewire components use $this->authorize() which goes through Laravel's Gate system. Without a Gate callback, super_admin gets 403 because no policies exist. Gate::before delegates all ability checks to our PermissionService (which returns true for is_super_admin). Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Sidebar: route names in navigation array didn't match actual registered routes (e.g. 'participants.index' vs 'participants.list'). Remapped all entries to match the real route names from route:list. Login: replaced `redirect(navigate: true)` with `redirectIntended()` — Livewire SPA navigation between different layouts (guest→app) fails silently, requiring a manual page refresh. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
The @php block starting at line 1 was never closed before another @php was opened at line 99, causing "unexpected variable $permissionService". Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
1. Remove double <aside> wrapper (app.blade.php was wrapping sidebar in its own aside, conflicting with sidebar's own fixed positioning) 2. Replace auth()->user()->can() with PermissionService->can() which properly handles is_super_admin bypass Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
Laravel 13's Symfony dependencies require PHP >= 8.4.1. The container was crash-looping because the entrypoint hit Composer's platform check against the 8.3 runtime. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Handles transient GitHub CDN 400 errors during Docker build. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- All 14 domain modules with models, services, events, listeners - Auto-enrollment with auto-group creation when capacity full - SuperAdmin setup wizard (8-step first-login onboarding) - Receptionist desk wizards (registration, enrollment, payment, POS) - Complete permission seeder (138 permissions, 10 roles) - Full sidebar navigation with permission gates - Docker + supervisor (PHP-FPM, nginx, queue worker, scheduler) - Pre-deploy checklist and FK verification scripts - All 35 events registered with ShouldDispatchAfterCommit - All listeners queued with ShouldQueue - RTL Arabic-first UI with logical Tailwind properties Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
-