• Mahmoud Aglan's avatar
    Fix receptionist registration wizard — full rewrite of broken business logic · 45a76a04
    Mahmoud Aglan authored
    Problems fixed:
    - MissingRulesException crash on step 4 (empty rules passed to validate())
    - Guardian was never actually created as Person + Guardian record
    - Guardian was never linked to participant via guardian_participant pivot
    - Enrollment in program never happened (service didn't handle program_id)
    - medical_notes was passed at wrong level (it's on people table, not participants)
    - relation 'guardian' missing from validation (exists in DB CHECK constraint)
    
    Now the wizard properly:
    1. Creates guardian Person + Guardian record (or reuses existing)
    2. Creates participant Person record with all fields (phone, national_id, medical_notes)
    3. Creates Participant via ParticipantService with guardian linked
    4. Attaches guardian via guardian_participant pivot
    5. Enrolls in program via EnrollmentService (auto-finds/creates group)
    6. Added participant phone + national_id fields to step 2
    Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    45a76a04
Name
Last commit
Last update
..
components Loading commit data...
errors Loading commit data...
layouts Loading commit data...
livewire Loading commit data...
print Loading commit data...
receipts Loading commit data...
reports Loading commit data...
welcome.blade.php Loading commit data...