add test batches

This commit is contained in:
root
2026-06-08 23:45:55 -04:00
parent c792b8be05
commit 8d4d610b82
1480 changed files with 22587 additions and 10762 deletions
@@ -10,7 +10,9 @@ use Illuminate\Support\Facades\DB;
class ParentEnrollmentService
{
public function __construct(private ParentConfigService $configService) {}
public function __construct(private ParentConfigService $configService)
{
}
public function overview(int $parentId, ?string $schoolYear = null): array
{
@@ -24,11 +26,11 @@ class ParentEnrollmentService
->get()
->map(function ($student) use ($selectedYear) {
$classSections = StudentClass::getClassSectionsByStudentId($student->id, $selectedYear, true);
$student->class_section = ! empty($classSections)
$student->class_section = !empty($classSections)
? implode(', ', $classSections)
: 'Class not Assigned';
$isArabicClass = ! empty($classSections) && array_reduce(
$isArabicClass = !empty($classSections) && array_reduce(
$classSections,
static fn ($carry, $name) => $carry || (is_string($name) && stripos($name, 'arabic') === 0),
false
@@ -179,7 +181,7 @@ class ParentEnrollmentService
->where('is_withdrawn', 0)
->first();
if (! $enrollment) {
if (!$enrollment) {
continue;
}
@@ -204,7 +206,7 @@ class ParentEnrollmentService
if ($refund) {
$refund->update([
'reason' => 'Withdrawal under review for student ID '.$studentId,
'reason' => 'Withdrawal under review for student ID ' . $studentId,
'note' => null,
'updated_by' => $parentId,
]);
@@ -215,7 +217,7 @@ class ParentEnrollmentService
'requested_at' => now(),
'school_year' => $schoolYear,
'status' => Refund::STATUS_PENDING,
'reason' => 'Withdrawal under review for student ID '.$studentId,
'reason' => 'Withdrawal under review for student ID ' . $studentId,
'request' => 'new',
'semester' => $semester,
'refund_paid_amount' => 0.0,