fix tests

This commit is contained in:
root
2026-06-11 11:46:12 -04:00
parent c91fa2ce4d
commit 5ead80fdc7
1489 changed files with 11349 additions and 10305 deletions
@@ -10,6 +10,7 @@ use Illuminate\Support\Facades\DB;
class AttendanceCommunicationSupportService
{
protected string $semester;
protected string $schoolYear;
public function __construct(
@@ -19,7 +20,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') ?? '');
}
@@ -33,12 +34,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(
@@ -52,7 +53,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;
}
@@ -100,4 +101,4 @@ class AttendanceCommunicationSupportService
->values()
->all();
}
}
}