feat: 품목기준 필드 관리 기능 개선

- 소프트 삭제된 필드 목록에 표시 (withTrashed)
- 삭제된 필드 시각적 구분 (빨간 배경, '삭제됨' 배지)
- 필드 복원 기능 추가 (restore API)
- 필드 영구 삭제 기능 추가 (forceDelete API)
- 체크박스 선택 및 일괄 삭제 기능 추가
- 시스템 필드 삭제 제한 해제
- 커스텀 모달 적용 (showConfirm, showDeleteConfirm)
This commit is contained in:
2025-12-16 21:43:05 +09:00
parent 3404b5d568
commit ae364a1afe
12 changed files with 2201 additions and 687 deletions

View File

@@ -246,6 +246,44 @@ public function destroyCustomField(int $id): JsonResponse
return response()->json($result, $result['success'] ? 200 : 400);
}
/**
* 소프트 삭제된 커스텀 필드 복원
*/
public function restoreCustomField(int $id): JsonResponse
{
$tenantId = session('selected_tenant_id');
if (! $tenantId || $tenantId === 'all') {
return response()->json([
'success' => false,
'message' => '테넌트를 선택해주세요.',
], 400);
}
$result = $this->service->restoreCustomField($tenantId, $id);
return response()->json($result, $result['success'] ? 200 : 400);
}
/**
* 커스텀 필드 영구 삭제
*/
public function forceDestroyCustomField(int $id): JsonResponse
{
$tenantId = session('selected_tenant_id');
if (! $tenantId || $tenantId === 'all') {
return response()->json([
'success' => false,
'message' => '테넌트를 선택해주세요.',
], 400);
}
$result = $this->service->forceDeleteCustomField($tenantId, $id);
return response()->json($result, $result['success'] ? 200 : 400);
}
/**
* 커스텀 필드 일괄 삭제
*/