Skip to content

Commit

Permalink
closes #22
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed Apr 29, 2024
1 parent 2eb20b5 commit f46f73f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/app/sets/sets.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
<ion-col [offsetXs]="0" [sizeXs]="12" [offsetSm]="2" [sizeSm]="8" [offsetMd]="2" [sizeMd]="8">
<ion-card>
<ion-card-header>
<ion-card-title>{{ product.name }}</ion-card-title>
<ion-card-title>
<a [routerLink]="['/search']" [queryParams]="{ q: formatSetNameForSearch(product.id) }">
{{ product.name }}
</a></ion-card-title>
</ion-card-header>

<ion-card-content>
Expand Down
6 changes: 5 additions & 1 deletion src/app/sets/sets.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ export class SetsPage implements OnInit {
});
}

formatSetNameForSearch(productId: string, subproductId: string): string {
formatSetNameForSearch(productId: string, subproductId?: string): string {
if (!subproductId) {
return `product:"${productId}"`;
}

return `product:"${productId}" subproduct:"${subproductId}"`;
}
}

0 comments on commit f46f73f

Please sign in to comment.