Commit d35e8e40 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix: add missing created_by when creating trainer assignments

The assignments table has a NOT NULL constraint on created_by.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 794b0906
...@@ -66,6 +66,7 @@ public function assignTrainer(): void ...@@ -66,6 +66,7 @@ public function assignTrainer(): void
'status' => 'active', 'status' => 'active',
'is_primary' => false, 'is_primary' => false,
'start_date' => now()->toDateString(), 'start_date' => now()->toDateString(),
'created_by' => auth()->id(),
]); ]);
$this->assignTrainerId = null; $this->assignTrainerId = null;
......
...@@ -68,6 +68,7 @@ public function assignGroup(): void ...@@ -68,6 +68,7 @@ public function assignGroup(): void
'status' => 'active', 'status' => 'active',
'is_primary' => false, 'is_primary' => false,
'start_date' => now()->toDateString(), 'start_date' => now()->toDateString(),
'created_by' => auth()->id(),
]); ]);
$this->assignGroupId = null; $this->assignGroupId = null;
......
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