Now navigates to tool landing page with id
This commit is contained in:
parent
edbf448510
commit
d649189c9a
|
@ -5,6 +5,7 @@
|
|||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "scilake-catalogue-ui",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"@angular/animations": "^16.2.12",
|
||||
|
|
|
@ -65,7 +65,7 @@ const dataSpaceRoutes: Routes = [
|
|||
component: BrowseJobsComponent
|
||||
},
|
||||
{
|
||||
path: 'landingPage/:resourceType/:identifierValue',
|
||||
path: 'landingPage/:resourceType/:id',
|
||||
component: PayloadComponent
|
||||
},
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@ export class PayloadComponent implements OnInit{
|
|||
ngOnInit() {
|
||||
this.route.params.subscribe(params => {
|
||||
this.resourceType = params['resourceType'];
|
||||
this.resourcePayloadService.getItem(params['resourceType'], params['identifierValue']).subscribe(
|
||||
this.resourcePayloadService.getItem(params['resourceType'], params['id']).subscribe(
|
||||
next => {this.payload = next;},
|
||||
error => {console.log(error);},
|
||||
() => {
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
|
||||
<ng-container *ngFor="let result of payload.results; let i = index">
|
||||
|
||||
<a [routerLink]="['/landingPage', resourceType, result.identifier.value]" class="serviceDetails">
|
||||
<a [routerLink]="['/landingPage', resourceType, result.id]" class="serviceDetails">
|
||||
<div class="uk-card uk-card-default uk-card-hover uk-margin-bottom">
|
||||
|
||||
<!--LAPTOP & PAD LANDSCAPE-->
|
||||
|
|
|
@ -44,8 +44,8 @@ export class ResourcePayloadService {
|
|||
return this.http.get<Paging<any>>(this.base + `/items?resourceType=${resourceType}`, {params: params});
|
||||
}
|
||||
|
||||
getItem(resourceType: string, identifierValue: string) {
|
||||
return this.http.get(this.base + `/items/search?resourceType=${resourceType}&field=identifier&value=${identifierValue}`);
|
||||
getItem(resourceType: string, id: string) {
|
||||
return this.http.get(this.base + `/items/${id}?resourceType=${resourceType}`);
|
||||
}
|
||||
|
||||
getItemById(resourceType: string, id: string) {
|
||||
|
|
Loading…
Reference in New Issue