fix gitlab tests
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user