1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

fixing faces person search link

This commit is contained in:
Patrik J. Braun 2021-03-21 08:45:23 +01:00
parent c5b657a96a
commit 042b744a48
2 changed files with 4 additions and 6 deletions

View File

@ -1,4 +1,4 @@
<a [routerLink]="['/search', searchQuery]" <a [routerLink]="['/search', searchQueryDTOstr]"
style="display: inline-block;"> style="display: inline-block;">

View File

@ -7,7 +7,6 @@ import {FacesService} from '../faces.service';
import {AuthenticationService} from '../../../model/network/authentication.service'; import {AuthenticationService} from '../../../model/network/authentication.service';
import {Config} from '../../../../../common/config/public/Config'; import {Config} from '../../../../../common/config/public/Config';
import {SearchQueryTypes, TextSearch, TextSearchQueryMatchTypes} from '../../../../../common/entities/SearchQueryDTO'; import {SearchQueryTypes, TextSearch, TextSearchQueryMatchTypes} from '../../../../../common/entities/SearchQueryDTO';
import {QueryParams} from '../../../../../common/QueryParams';
@Component({ @Component({
selector: 'app-face', selector: 'app-face',
@ -20,7 +19,7 @@ export class FaceComponent implements OnInit, OnDestroy {
@Input() size: number; @Input() size: number;
thumbnail: PersonThumbnail = null; thumbnail: PersonThumbnail = null;
public searchQuery: any; public searchQueryDTOstr: string;
constructor(private thumbnailService: ThumbnailManagerService, constructor(private thumbnailService: ThumbnailManagerService,
private _sanitizer: DomSanitizer, private _sanitizer: DomSanitizer,
@ -35,12 +34,11 @@ export class FaceComponent implements OnInit, OnDestroy {
ngOnInit() { ngOnInit() {
this.thumbnail = this.thumbnailService.getPersonThumbnail(this.person); this.thumbnail = this.thumbnailService.getPersonThumbnail(this.person);
this.searchQuery = {}; this.searchQueryDTOstr = JSON.stringify(<TextSearch>{
this.searchQuery[QueryParams.gallery.search.query] = <TextSearch>{
type: SearchQueryTypes.person, type: SearchQueryTypes.person,
text: this.person.name, text: this.person.name,
matchType: TextSearchQueryMatchTypes.exact_match matchType: TextSearchQueryMatchTypes.exact_match
}; });
} }