fix gitlab tests

This commit is contained in:
root
2026-06-09 02:32:58 -04:00
parent 20a0b6c4e5
commit 6def9993da
1489 changed files with 10449 additions and 11356 deletions
@@ -11,19 +11,18 @@ class AttendanceDailySummaryService
public function __construct(
private UserNotificationDispatchService $notifier,
private EmailService $emailService
) {}
) {
}
public function sendAbsenteesSummary(): int
{
$rows = $this->fetchTodaySummary('absent');
return $this->notifyParents($rows, 'absent');
}
public function sendLatesSummary(): int
{
$rows = $this->fetchTodaySummary('late');
return $this->notifyParents($rows, 'late');
}
@@ -50,12 +49,12 @@ class AttendanceDailySummaryService
if ($type === 'absent') {
$query->where(function ($w) {
$w->whereIn(DB::raw('UPPER(TRIM(ad.status))'), ['ABSENT', 'ABS', 'A'])
$w->whereIn(DB::raw("UPPER(TRIM(ad.status))"), ['ABSENT', 'ABS', 'A'])
->orWhereRaw("UPPER(TRIM(ad.status)) LIKE 'ABS%'");
});
} else {
$query->where(function ($w) {
$w->whereIn(DB::raw('UPPER(TRIM(ad.status))'), ['LATE', 'L'])
$w->whereIn(DB::raw("UPPER(TRIM(ad.status))"), ['LATE', 'L'])
->orWhereRaw("UPPER(TRIM(ad.status)) LIKE 'LATE%'");
});
}
@@ -72,7 +71,7 @@ class AttendanceDailySummaryService
continue;
}
$studentName = trim((string) ($row['student_firstname'] ?? '').' '.(string) ($row['student_lastname'] ?? ''));
$studentName = trim((string) ($row['student_firstname'] ?? '') . ' ' . (string) ($row['student_lastname'] ?? ''));
$date = substr((string) ($row['date'] ?? ''), 0, 10);
$message = sprintf(
@@ -86,7 +85,7 @@ class AttendanceDailySummaryService
$email = (string) ($row['parent_email'] ?? '');
if ($email !== '') {
$body = '<p>'.e($message).'</p>';
$body = '<p>' . e($message) . '</p>';
$this->emailService->send($email, 'Daily Attendance Update', $body, 'attendance');
}