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,6 @@ use Illuminate\Support\Facades\DB;
class AttendanceCommunicationSupportService
{
protected string $semester;
protected string $schoolYear;
public function __construct(
@@ -20,7 +19,7 @@ class AttendanceCommunicationSupportService
protected AttendanceParentLookupService $parentLookupService,
protected AttendanceEmailComposerService $emailComposerService
) {
$this->semester = (string) ($this->configModel->getConfig('semester') ?? '');
$this->semester = (string) ($this->configModel->getConfig('semester') ?? '');
$this->schoolYear = (string) ($this->configModel->getConfig('school_year') ?? '');
}
@@ -34,12 +33,12 @@ class AttendanceCommunicationSupportService
return [
'success' => false,
'message' => 'Missing student_id.',
'status' => 422,
'status' => 422,
];
}
$student = $this->studentModel->query()->find($studentId)?->toArray() ?? [];
$parent = $this->parentLookupService->getPrimaryParentForStudent($studentId);
$student = $this->studentModel->query()->find($studentId)?->toArray() ?? [];
$parent = $this->parentLookupService->getPrimaryParentForStudent($studentId);
$secondary = $this->parentLookupService->getSecondaryParentForStudent($studentId, $this->schoolYear);
$result = $this->emailComposerService->composePreview(
@@ -53,7 +52,7 @@ class AttendanceCommunicationSupportService
);
if (($result['success'] ?? false) && isset($result['data'])) {
$result['data']['semester'] = $this->semester;
$result['data']['semester'] = $this->semester;
$result['data']['school_year'] = $this->schoolYear;
}
@@ -101,4 +100,4 @@ class AttendanceCommunicationSupportService
->values()
->all();
}
}
}