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
@@ -6,7 +6,9 @@ use Illuminate\Support\Facades\DB;
class ParentAttendanceReportCalendarService
{
public function __construct(private ParentConfigService $configService) {}
public function __construct(private ParentConfigService $configService)
{
}
/**
* @return array{0: array<int, array{value:string,label:string}>, 1: string}
@@ -31,7 +33,7 @@ class ParentAttendanceReportCalendarService
$dates = [];
for ($i = $weeksBefore; $i >= 1; $i--) {
$dates[] = $thisSunday->copy()->modify('-'.$i.' week');
$dates[] = $thisSunday->copy()->modify('-' . $i . ' week');
}
$cursor = $thisSunday->copy();
@@ -70,13 +72,13 @@ class ParentAttendanceReportCalendarService
$filtered = [];
foreach ($dates as $d) {
$ymd = $d->format('Y-m-d');
if (! isset($noSchool[$ymd]) && $d >= $today && $d <= $cap) {
if (!isset($noSchool[$ymd]) && $d >= $today && $d <= $cap) {
$filtered[] = $d;
}
}
$defaultYmd = $default->format('Y-m-d');
if (! empty($filtered)) {
if (!empty($filtered)) {
$defaultYmd = $filtered[0]->format('Y-m-d');
}
@@ -99,10 +101,8 @@ class ParentAttendanceReportCalendarService
}
if (preg_match('/^(\\d{1,2}):(\\d{2})$/', $raw, $m)) {
$hh = str_pad((string) ((int) $m[1]), 2, '0', STR_PAD_LEFT);
return $hh.':'.$m[2];
return $hh . ':' . $m[2];
}
return $default;
}