feat: 문서 스냅샷 출력 + 절곡 전용 렌더링
- show.blade.php: rendered_html 우선 출력 로직 추가 (스냅샷 모드) - show.blade.php: 스냅샷 없으면 기존 동적 렌더링 fallback - DocumentController: inspectionData 추출하여 view 전달 - partials/bending-inspection-data: inspection_data 스냅샷 기반 렌더링 - partials/bending-worklog: 절곡 작업일지 전용 렌더링 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -271,6 +271,22 @@ public function show(int $id): View
|
||||
// 기본정보 bf_ 자동 backfill
|
||||
$this->resolveAndBackfillBasicFields($document);
|
||||
|
||||
// 절곡 작업일지용: bending_info 추출
|
||||
$bendingInfo = null;
|
||||
if ($workOrder) {
|
||||
$woOptions = json_decode($workOrder->options ?? '{}', true);
|
||||
$bendingInfo = $woOptions['bending_info'] ?? null;
|
||||
}
|
||||
|
||||
// 절곡 중간검사용: inspection_data 스냅샷 추출 (work_order_items.options.inspection_data)
|
||||
$inspectionData = null;
|
||||
foreach ($workOrderItems as $item) {
|
||||
if (! empty($item->options['inspection_data'])) {
|
||||
$inspectionData = $item->options['inspection_data'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return view('documents.show', [
|
||||
'document' => $document,
|
||||
'workOrderItems' => $workOrderItems,
|
||||
@@ -279,6 +295,8 @@ public function show(int $id): View
|
||||
'materialInputLots' => $materialInputLots,
|
||||
'itemLotMap' => $itemLotMap ?? collect(),
|
||||
'blockHtml' => $this->renderBlockHtml($document->template, $document, 'view'),
|
||||
'bendingInfo' => $bendingInfo,
|
||||
'inspectionData' => $inspectionData,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user