fix: ItemService newQuery()에 item_type 필터 추가
- 동적 테이블 라우팅에서 item_type 필터 누락 버그 수정 - 모든 item_type이 동일한 결과를 반환하던 문제 해결 - CRUD 테스트 완료 (index/show/store/update/destroy) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -74,7 +74,9 @@ private function newQuery(string $itemType)
|
||||
$info = $this->getModelInfoByItemType($itemType);
|
||||
$modelClass = $info['model'];
|
||||
|
||||
return $modelClass::query()->where('tenant_id', $this->tenantId());
|
||||
return $modelClass::query()
|
||||
->where('tenant_id', $this->tenantId())
|
||||
->where('item_type', strtoupper($itemType));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user