fix(webapp): use KeywordsService for patent keyword search after dev merge
LocationBasedServices/smartguide/pipeline/pr-dev This commit looks good

This commit is contained in:
2026-07-15 14:25:53 +02:00
parent 75c0638df5
commit 4e8e744fc5
@@ -4,8 +4,9 @@ import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatIconModule } from '@angular/material/icon';
import { PatentsService } from '../../../../api/api/patents.service';
import { KeywordsService } from '../../../../api/api/keywords.service';
import { KeywordPatentMatch } from '../../../../api/model/keywordPatentMatch';
import { PatentsByKeywordsResponse } from '../../../../api/model/patentsByKeywordsResponse';
import {
WeightMap,
WeightSliderOption,
@@ -39,7 +40,7 @@ import { SearchResultsStateService } from '../search-results-state.service';
})
export class KeywordsToPatentsResultsComponent implements OnInit {
protected readonly state = inject(SearchResultsStateService);
private readonly patentsService = inject(PatentsService);
private readonly keywordsService = inject(KeywordsService);
readonly defaultWeights: WeightMap = { ...DEFAULT_PATENT_SCORE_WEIGHTS };
@@ -125,12 +126,12 @@ export class KeywordsToPatentsResultsComponent implements OnInit {
this.loadingPatents.set(true);
this.patentsError.set(false);
this.patentsService.getPatentsByKeywords({ keywords }).subscribe({
next: (response) => {
this.keywordsService.getPatentsByKeywords({ keywords }).subscribe({
next: (response: PatentsByKeywordsResponse) => {
this.setPatentMatches(response.patents ?? []);
this.loadingPatents.set(false);
},
error: (error) => {
error: (error: unknown) => {
console.error('Patent search failed:', error);
this.setPatentMatches([]);
this.patentsError.set(true);