feat(mng): 아카이브 레코드 batch 그룹핑 UI 구현
- ArchivedRecordService: batch_id 기준 그룹핑 쿼리 추가 - Controller: batchId 파라미터로 상세 조회 변경 - 목록: 작업 설명, 레코드 타입, 레코드 수 표시 - 상세: batch 내 모든 레코드를 카드 형태로 표시 - 한번의 삭제 작업이 하나의 행으로 표시됨
This commit is contained in:
@@ -22,16 +22,25 @@ public function index(): View
|
||||
}
|
||||
|
||||
/**
|
||||
* 아카이브 레코드 상세 보기 (Blade 화면만)
|
||||
* 아카이브 레코드 상세 보기 (batch 기준)
|
||||
*/
|
||||
public function show(int $id): View
|
||||
public function show(string $batchId): View
|
||||
{
|
||||
$record = $this->archivedRecordService->getArchivedRecordById($id);
|
||||
$records = $this->archivedRecordService->getRecordsByBatchId($batchId);
|
||||
|
||||
if (! $record) {
|
||||
if ($records->isEmpty()) {
|
||||
abort(404, '아카이브 레코드를 찾을 수 없습니다.');
|
||||
}
|
||||
|
||||
return view('archived-records.show', compact('record'));
|
||||
// 첫 번째 레코드에서 batch 정보 추출
|
||||
$batchInfo = [
|
||||
'batch_id' => $batchId,
|
||||
'batch_description' => $records->first()->batch_description,
|
||||
'deleted_by' => $records->first()->deletedByUser?->name ?? '-',
|
||||
'deleted_at' => $records->first()->deleted_at,
|
||||
'record_count' => $records->count(),
|
||||
];
|
||||
|
||||
return view('archived-records.show', compact('records', 'batchInfo'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user