fix: [inspection] 완료된 검사 수정 차단
- InspectionService.update()에 완료 상태 검증 추가 - 완료된 검사 수정 시 400 에러 반환 - error.php에 cannot_modify_completed 메시지 추가
This commit is contained in:
@@ -218,6 +218,10 @@ public function update(int $id, array $data)
|
||||
throw new NotFoundHttpException(__('error.not_found'));
|
||||
}
|
||||
|
||||
if ($inspection->status === Inspection::STATUS_COMPLETED) {
|
||||
throw new BadRequestHttpException(__('error.inspection.cannot_modify_completed'));
|
||||
}
|
||||
|
||||
$beforeData = $inspection->toArray();
|
||||
|
||||
return DB::transaction(function () use ($inspection, $data, $userId, $beforeData) {
|
||||
|
||||
Reference in New Issue
Block a user