feat: [equipment] 설비점검 조회 응답에 휴무일(non_working_days) 추가
- InspectionCycle::getHolidayDates()로 해당 주기/기간의 휴무일 조회 - 응답에 non_working_days 배열 포함하여 프론트 캘린더 표시 지원 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,9 @@ public function getInspections(string $cycle, string $period, ?string $productio
|
||||
$labels = InspectionCycle::columnLabels($cycle, $period);
|
||||
$userId = $this->apiUserId();
|
||||
|
||||
$tenantId = $this->tenantId();
|
||||
$holidayDates = InspectionCycle::getHolidayDates($cycle, $period, $tenantId);
|
||||
|
||||
$result = [];
|
||||
|
||||
foreach ($equipments as $equipment) {
|
||||
@@ -68,6 +71,7 @@ public function getInspections(string $cycle, string $period, ?string $productio
|
||||
'details' => $details,
|
||||
'labels' => $labels,
|
||||
'can_inspect' => $equipment->canInspect($userId),
|
||||
'non_working_days' => array_keys($holidayDates),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user