From f5090b48b07c48af8b93a1bf7f0f09a22df06919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Sat, 28 Feb 2026 14:42:00 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[equipment]=20=EC=A0=90=EA=B2=80?= =?UTF-8?q?=ED=91=9C=20=ED=8C=90=EC=A0=95=20=EB=A1=9C=EC=A7=81=20-=20?= =?UTF-8?q?=EC=98=A4=EB=8A=98=EA=B9=8C=EC=A7=80=20=EB=8F=84=EB=9E=98?= =?UTF-8?q?=ED=95=9C=20=EB=82=A0=EC=A7=9C=EB=A7=8C=20=EA=B2=80=EC=82=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 미래 날짜는 판정에서 제외 - 일일: 오늘까지의 평일만 검사 - 기타 주기: check_date가 오늘 이전인 열만 검사 --- .../views/equipment/partials/inspection-grid.blade.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/views/equipment/partials/inspection-grid.blade.php b/resources/views/equipment/partials/inspection-grid.blade.php index 0ec53a17..de790fc3 100644 --- a/resources/views/equipment/partials/inspection-grid.blade.php +++ b/resources/views/equipment/partials/inspection-grid.blade.php @@ -40,7 +40,8 @@ @endphp @php - // 자동 판정 계산: 주말(daily) 제외, 모든 셀이 good/repaired면 합격 + // 자동 판정: 주말(daily) 제외, 오늘까지 도래한 날짜만 검사 + $today = now()->format('Y-m-d'); $totalChecks = 0; $passedChecks = 0; foreach ($templates as $tmpl) { @@ -48,8 +49,11 @@ if ($isDaily && \App\Enums\InspectionCycle::isWeekend($period, $ci)) { continue; } - $totalChecks++; $cd = \App\Enums\InspectionCycle::resolveCheckDate($cycle, $period, $ci); + if ($cd > $today) { + continue; + } + $totalChecks++; $k = $tmpl->id . '_' . $cd; $d = isset($details[$k]) ? $details[$k]->first() : null; if ($d && in_array($d->result, ['good', 'repaired'])) {