Commit 2c52dcd8 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix: collect payment wizard reads participant UUID from query string

Livewire mount() doesn't automatically receive query params unless the
route defines them. Added request()->query('participant') fallback so
the "جدّد" button from overdue renewals alert correctly pre-fills the
participant and skips to step 2.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 77bf19c8
...@@ -56,8 +56,10 @@ public function mount(?string $participant = null): void ...@@ -56,8 +56,10 @@ public function mount(?string $participant = null): void
$this->authorize('invoices.create'); $this->authorize('invoices.create');
$this->branchId = $this->getActiveBranchIdOrFail(); $this->branchId = $this->getActiveBranchIdOrFail();
if ($participant) { $participantUuid = $participant ?? request()->query('participant');
$p = Participant::with('person')->where('uuid', $participant)->first();
if ($participantUuid) {
$p = Participant::with('person')->where('uuid', $participantUuid)->first();
if ($p) { if ($p) {
$this->selected_participant_id = $p->id; $this->selected_participant_id = $p->id;
$this->selected_participant_name = $p->person?->name_ar ?? $p->person?->name ?? ''; $this->selected_participant_name = $p->person?->name_ar ?? $p->person?->name ?? '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment