- 05 Jul, 2026 10 commits
-
-
Mahmoud Aglan authored
- Fix setup wizard CHECK violation: tax_percentage type 'number' → 'integer' - Programs now default to 'active' status (not 'draft') - Auto-create first group when program is created via TrainingProgramService - Enable auto_create_groups_enabled setting in wizard for overflow auto-creation Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Reads ADMIN_EMAIL, ADMIN_PASSWORD, ADMIN_NAME, ACADEMY_NAME_EN, ACADEMY_NAME_AR from env — set by the manager during provisioning. Falls back to defaults for dev environments. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- key:generate needs an APP_KEY= line in .env to write to (even empty) - Replace el-captain:setup (doesn't exist) with db:seed Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
CapRover passes env vars as container environment, but Laravel's config:cache reads from .env file. Must dump env to .env first, then generate APP_KEY if missing. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Registration wizard now opens /invoices/{uuid}/print in new tab instead of printing whole page - Print view redesigned: mobile-responsive layout, touch-friendly 48px buttons, proper viewport - Share button (Web Share API) shows on mobile devices that support it - Print-receipt-button component changed from window.open popup to target=_blank link - Added min-height 48px to all action buttons for touch accessibility Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Remove 23 hardcoded business decisions: all financial/operational behaviors now configurable per-academy Every penalty, compensation, auto-invoice, and automation is now guarded by a SettingsService toggle (default OFF for financial, ON for operational). Added 88 system settings across 8 groups with Arabic labels, conditional UI visibility for dependent fields, and a new "رواتب وتعويضات" admin tab. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Money flows: - Payslip paid → double-entry financial transaction (debit salary expense / credit cash) - POS sale → inventory movements for tracked products - Enrollment → auto-invoice via PricingService - Invoice overdue detection enhanced with balance guard Operational events (previously empty → now wired): - AssignmentCreated → generate trainer attendance expectations - AssignmentEnded → remove future trainer attendance - FacilityStatusChanged → cancel reservations on maintenance - PurchaseOrderReceived → create receiving inventory movements - StockCountCompleted → process count adjustments - KitAssembled → deduct component stock - InventoryMovementCreated → check low stock threshold Business rule enforcement: - Medical certificate enforcement at attendance time (configurable) - Group capacity check + auto-waitlist on enrollment - Participant status blocking (frozen/suspended can't enroll) - Attendance threshold from settings (not hardcoded) Dashboard rebuilt with actionable data: - Today's sessions, trainers present, payments, active participants - Needs-attention cards (overdue invoices, pending approvals, expired docs) - Today's schedule with take-attendance buttons - Recent payments feed + quick action buttons Scheduled jobs: - attendance:auto-absent (hourly) - documents:expire (daily 06:00) - payments:detect-defaults (daily 08:00) - attendance:send-alerts (daily 20:00) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Complete trainer compensation lifecycle: - 7 migrations (trainer_compensations, payroll_periods, payslips, payslip_items, trainer_advances, trainer_rate_history + make employee_id nullable for freelancers) - 7 enums, 6 models with proper relationships - CompensationCalculatorService: auto-calculates session/player/revenue/penalty earnings - PayrollService: period management, bulk payslip generation, approval workflow, payment recording - TrainerAdvanceService: salary advance/loan lifecycle with installment tracking - Event listeners: AttendanceMarked → auto-compensation, SessionCancelled → trainer pay - 4 Livewire pages: PayrollDashboard, TrainerCompensations, PayslipDetail, TrainerAdvances - Sidebar navigation + routes with permission middleware Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
The layout file lives at resources/views/layouts/app.blade.php, so the correct Livewire attribute is Layout('layouts.app'). 11 components had the wrong path 'components.layouts.app' causing MissingLayoutException. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Expanded from 10 shallow steps to 12 deep steps covering ALL organization data: - Academy profile: phone, email, address, type, website, WhatsApp - Branches: working days (inline toggles), email, city, manager name - Programs: age range (age_min/age_max columns), sessions_per_week, registration fee (separate BasePrice), payment frequency - Facilities: branch selection per facility, visual grid preview - Groups: structured schedule (day + start/end time repeater), segment selection - Participants: classification (on Person), skill_level (on Participant), national_id, medical_notes, collapsible extras - Staff: phone, specialization (creates linked Person for trainers) - NEW Step 9: Financial (tax, invoice/receipt prefix, payment methods, wallet, discounts, family discount, trial period) - NEW Step 10: Policies (attendance grace periods, auto-absent, suspension threshold, medical/guardian requirements, waitlist, freeze days, email/SMS toggles) - Step 11: General settings (currency, timezone, week start, date/time format, pagination) - Step 12: Summary dashboard with stats cards Schema alignment verified: Branch uses operating_hours (not metadata), Person owns classification/medical_notes, Participant owns skill_level, TrainingProgram uses age_min/age_max/sessions_per_week columns directly, all SettingsService keys match SystemSettings schema exactly. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 03 Jul, 2026 4 commits
-
-
Mahmoud Aglan authored
- Seed 78 notification templates (26 events × 3 channels: in_app, email, sms) in Arabic - Create 14 new listeners for previously unwired events (invoice sent/cancelled, wallet deposit/frozen, cash session closed, enrollment completed, session completed, participant registered/status changed/suspended/frozen, evaluation shared, POS receipt) - Wire all listeners in EventServiceProvider - Add PublicDocumentController with signed URL routes for invoices, receipts, and POS receipts - Add PublicLinkHelper for generating 30-day signed URLs - Add 3 standalone RTL Arabic public views (invoice, receipt, pos-receipt) - Update existing listeners (SendInvoiceNotification, SendOverdueReminder, SendPaymentConfirmation) to include public_link/receipt_link variables - Align all listener variable names with template placeholders Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Trainers/head trainers redirect to /trainer dashboard on login - Receptionists redirect to /receptionist dashboard - Guardians (parents) redirect to /guardian dashboard - Financial data (revenue, invoices, payments) only queried if user has 'invoices.list' permission — returns null/empty otherwise - Blade sections wrapped in @can('invoices.list') so even direct URL access shows no sensitive financial info to unauthorized roles Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Setup wizard now covers 10 steps (was 8): - Facilities step includes visual grid layout builder (rows×columns) - New Groups step: create groups with interactive segment multi-select - New Participants step: import existing players with guardian data - completeSetup() creates SpaceLayout + SpaceSegments for each facility grid - Hint encourages max division for scheduling flexibility Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Document system: polymorphic documents table, upload/approve/reject workflow, medical certificate tracking with expiry, system settings toggles, daily expire job. Feature wizards: Employee, Trainer, Program, Group, Facility, Invoice, Product, PricingRule, TransferParticipant, StockAdjustment — all with Arabic UI, step-by-step guided creation, and delegation to existing services. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 02 Jul, 2026 3 commits
-
-
Mahmoud Aglan authored
Arabic-first landing page with pricing, features, about, and contact pages. Includes business model docs and infrastructure capacity planning. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Used by ReceiptService for cashier name on payment receipts. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 01 Jul, 2026 23 commits
-
-
Mahmoud Aglan authored
- enrollInProgram() was called with an array but expects (Participant, TrainingProgram, User, options[]) — would crash at runtime - View referenced $program->fee_amount which doesn't exist on TrainingProgram (prices live in base_prices table) — fees never displayed - Added #[Computed] selectedProgramFee() to resolve price from base_prices - Updated view to use computed property and inline BasePrice query for program list Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
These files were modified locally but never committed, causing production errors (customerPays() method missing, LoginRedirectService not found). Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Blade's regex compiler treats literal {{ inside __() strings as directive openings, causing unclosed-paren parse errors. Replaced with single braces in placeholder text. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Livewire 4 dropped support for the legacy get*Property() magic accessor. Migrated all 6 affected components to use the #[Computed] attribute: - NewRegistrationWizard (hotbuyResults, hotbuyTotal, selectedProgram, etc.) - WeeklySchedule (weekDays, timeSlots) - InvoiceCreate (subtotal, total) - InvoiceShow (canCancel, canRecordPayment) - SystemSettings (activeSchema) - NotificationTemplateForm (availableVariables) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Branch::users() was hasMany (users.branch_id doesn't exist), now belongsToMany through role_user pivot - NotificationLog missing read_at in $fillable despite column existing - Trainer::assignments() used wrong FK join (employee PK vs user FK), replaced with hasManyThrough via Employee - POSService referenced phantom wallet.frozen_amount column Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Full vertical slice with migrations, enums, models, services, Livewire CRUD, views, permissions, routes, and sidebar navigation for the HR domain. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
The @script block renders @json($gridSegments) once at page load (empty array). When a time slot is selected and gridSegments populates, the JS still references the stale empty array. Switch to this.$wire.gridSegments for live data access. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Segments use 1-based row/col (R1C1 = row:1, col:1). The loop was starting at 0, creating an empty row and column with no matching segments. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Replace the broken flex+grid layout with a proper CSS Grid that includes header gutters for row/column selection buttons. Cells now fill naturally. Corner button selects all, row/col headers toggle-select entire rows/columns. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
The knob was offset because `after:start-[2px]` + `rtl:peer-checked:after:-translate-x-full` creates conflicting positioning in RTL. Fix: wrap the toggle in dir="ltr" and use `after:left-[2px]` so the switch itself is always LTR (knob moves left→right when on), while the label text around it remains RTL. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
The facility-surface grid wasn't stretching to fill available viewport height because intermediate wrappers broke the flex chain. Now all parent divs propagate flex-1 and the grid uses 1fr rows. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
The surface was too saturated and the boundary too dark/thick. Now barely tinted with very faded colors that don't scream at you. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
The hardcoded schema used different key names (tax_rate, default_locale, grace_period_participants, etc.) than what the seeder + DB actually stores. Aligned all keys, added missing groups (pricing), and seeded platform_fee_customer_pays into production. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Replace floating card buttons with a single sport-surface container that feels like one field/court/pool divided by painted lines. Type-based theming (green turf for fields, aqua for pools, tan for courts, neutral for gyms). CSS component system via @theme + @layer components. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
The component was querying a non-existent 'channels' JSON column. The table uses separate boolean columns: channel_email, channel_sms, channel_in_app. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Fixes ->invoice_number to ->number across all financial listeners, console commands, and POS services. Fixes ->full_name_ar to ->full_name (participant accessor) and ->name_ar (person column). Fixes POSService passing wrong keys ('invoice_number' → 'number', 'subtotal' → 'subtotal_amount') to InvoiceService. Fixes ReceiptService using non-existent participant relationship on Invoice. Fixes SendOverdueReminders using ->participant instead of ->billable. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Per project rule 01-migration-first.md, FK columns must follow {singular_table}_id convention. Updates migration, models, services, and all Livewire queries/views that reference this column. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Critical SQL fixes (pages were crashing): - GlobalSearch: remove non-existent branch_id/invoice_number, fix relationship - RevenueWidget: payment_method → method - FinancialReport: line_total → total_amount, balance_due → due_amount - PaymentPlanCreate: rewrite to match actual payment_plans/installments schema High-priority display fixes (features showing null): - invoice_number → number (8 locations) - balance_due → due_amount (6 locations) - full_name_ar → full_name (7 locations, accessor doesn't exist) - payment_method → method in print view - subtotal → subtotal_amount - description → notes on invoice - line_total → total_amount on invoice items - receipt_number → reference on payment Medium fixes: - Dashboard: fix format() call on string time column - Participant card: access person fields via relationship Low fixes: - daily-financial-print: createdBy → creator relationship - reports-page: payment_method key → method Infrastructure: - Add migration for cash_session_id on payments table - Add cash_session_id to Payment model fillable - Fix float → decimal:2 casts on Evaluation/EvaluationScore - Update enum registry docs to match actual DB CHECK constraints Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Fix "Record Payment" button on participant-show (was linking to list) - Add clickable links in enrollment-list (participant, group, program) - Add participant links on invoice contact names (list + show) - Add print button on invoice-show, print link on group-list - Add bulk-status link on participant-list - Link wizard success screens to participant/invoice views - Fix guardian dashboard: child names, invoices, groups now clickable - Add missing model relationships: Branch (participants, groups, facilities, cashSessions), Payment (branch, cashSession), CashSession (payments, posTransactions), TrainingSchedule (facility), Participant (branch, wallet, invoices, payments, attendance, POS, evaluations), Invoice (enrollments, posTransaction) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Problems fixed: - -webkit-tap-highlight-color:transparent killed OS default feedback but no custom active states existed → users got zero confirmation of their taps on mobile. Now ALL buttons/links get scale(0.97) on :active via CSS base layer, plus explicit active:bg-* on key buttons. - No modal/dropdown had a visible X close button → users couldn't discover how to dismiss on touch. Added X buttons to: sidebar (mobile), topbar user menu, global search dropdown, POS receipt modal, and all confirmation modals (enrollment cancel, waitlist, freeze, status change, reschedule, evaluation criteria form). - Sidebar nav links had no hover/press states → added hover:bg-white/10 and active:bg-white/20 + active:scale-[0.97]. - POS terminal: program cards, quantity +/-, checkout, split-add, mobile pay bar all now have active:scale and active:bg-* feedback. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Wizard inline invoice and the print/invoice view were using hardcoded colors and no logo/branch info. Now they pull from SettingsService: logo, primary_color, receipt_footer_text, and branch address/phone. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-