add class progress and fix endpoints

This commit is contained in:
root
2026-03-12 17:27:49 -04:00
parent 0f39dbee62
commit 33be0c9a0d
40 changed files with 2086 additions and 438 deletions
@@ -0,0 +1,34 @@
<?php
namespace Database\Factories;
use App\Models\ClassProgressReport;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;
class ClassProgressReportFactory extends Factory
{
protected $model = ClassProgressReport::class;
public function definition(): array
{
$weekStart = Carbon::now()->startOfWeek(Carbon::SUNDAY)->startOfDay();
return [
'class_section_id' => 101,
'teacher_id' => 1,
'week_start' => $weekStart,
'week_end' => (clone $weekStart)->addDays(6),
'subject' => 'Islamic Studies',
'unit_title' => 'Unit 1 / Chapter A',
'covered' => 'Lesson overview',
'homework' => 'Practice reading',
'status' => 'on_track',
'support_needed' => null,
'flags_json' => ['flag'],
'attachment_path' => null,
'created_at' => now(),
'updated_at' => now(),
];
}
}