Commit 96cb843e authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix ambiguous status column in GroupShow enrollment query

Qualify status and training_group_id with table name to avoid
ambiguity when joining participants/people tables for name sorting.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent fc41ae25
...@@ -106,8 +106,8 @@ public function removeTrainer(int $assignmentId): void ...@@ -106,8 +106,8 @@ public function removeTrainer(int $assignmentId): void
public function render() public function render()
{ {
// Active enrollments with participant details // Active enrollments with participant details
$enrollQuery = Enrollment::where('training_group_id', $this->group->id) $enrollQuery = Enrollment::where('enrollments.training_group_id', $this->group->id)
->where('status', 'active') ->where('enrollments.status', 'active')
->with(['participant.person']); ->with(['participant.person']);
if ($this->enrollSortBy === 'name_ar') { if ($this->enrollSortBy === 'name_ar') {
......
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