feat: [item-management] 품목 삭제 및 이력 조회 기능 추가
- 삭제: soft delete, 사용 중 품목 삭제 차단 (BOM/수주/견적/입고/LOT/작업지시 참조 체크)
- 이력: audit_logs 기반 생성/수정/삭제 이력 조회 모달
- 상세 패널에 이력/삭제 액션 버튼 추가
- API: DELETE /{id}, GET /{id}/history 엔드포인트 추가
This commit is contained in:
@@ -54,6 +54,26 @@ public function detail(int $id): View
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 품목 삭제 (Soft Delete, 사용 중 체크)
|
||||
*/
|
||||
public function destroy(int $id): JsonResponse
|
||||
{
|
||||
$result = $this->service->deleteItem($id);
|
||||
|
||||
return response()->json($result, $result['success'] ? 200 : 422);
|
||||
}
|
||||
|
||||
/**
|
||||
* 품목 이력 조회 (audit_logs 기반)
|
||||
*/
|
||||
public function history(int $id): JsonResponse
|
||||
{
|
||||
$history = $this->service->getItemHistory($id);
|
||||
|
||||
return response()->json($history);
|
||||
}
|
||||
|
||||
/**
|
||||
* 수식 기반 BOM 산출 (API 서버의 FormulaEvaluatorService HTTP 호출)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user