|
|
@ -265,30 +265,30 @@ export class GfAssistantComponent implements OnChanges, OnInit { |
|
|
const assetProfiles$: Observable<Partial<SearchResults>> = this |
|
|
const assetProfiles$: Observable<Partial<SearchResults>> = this |
|
|
.hasPermissionToAccessAdminControl |
|
|
.hasPermissionToAccessAdminControl |
|
|
? this.searchAssetProfiles(searchTerm).pipe( |
|
|
? this.searchAssetProfiles(searchTerm).pipe( |
|
|
map((assetProfiles) => ({ |
|
|
map((assetProfiles) => ({ |
|
|
assetProfiles: assetProfiles.slice( |
|
|
assetProfiles: assetProfiles.slice( |
|
|
0, |
|
|
0, |
|
|
GfAssistantComponent.SEARCH_RESULTS_DEFAULT_LIMIT |
|
|
GfAssistantComponent.SEARCH_RESULTS_DEFAULT_LIMIT |
|
|
) |
|
|
) |
|
|
})), |
|
|
})), |
|
|
catchError((error) => { |
|
|
catchError((error) => { |
|
|
console.error( |
|
|
console.error( |
|
|
'Error fetching asset profiles for assistant:', |
|
|
'Error fetching asset profiles for assistant:', |
|
|
error |
|
|
error |
|
|
); |
|
|
); |
|
|
return of({ assetProfiles: [] as SearchResultItem[] }); |
|
|
return of({ assetProfiles: [] as SearchResultItem[] }); |
|
|
}), |
|
|
}), |
|
|
tap(() => { |
|
|
tap(() => { |
|
|
this.isLoading.assetProfiles = false; |
|
|
this.isLoading.assetProfiles = false; |
|
|
this.changeDetectorRef.markForCheck(); |
|
|
this.changeDetectorRef.markForCheck(); |
|
|
}) |
|
|
}) |
|
|
) |
|
|
) |
|
|
: of({ assetProfiles: [] as SearchResultItem[] }).pipe( |
|
|
: of({ assetProfiles: [] as SearchResultItem[] }).pipe( |
|
|
tap(() => { |
|
|
tap(() => { |
|
|
this.isLoading.assetProfiles = false; |
|
|
this.isLoading.assetProfiles = false; |
|
|
this.changeDetectorRef.markForCheck(); |
|
|
this.changeDetectorRef.markForCheck(); |
|
|
}) |
|
|
}) |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
const holdings$: Observable<Partial<SearchResults>> = |
|
|
const holdings$: Observable<Partial<SearchResults>> = |
|
|
this.searchHoldings(searchTerm).pipe( |
|
|
this.searchHoldings(searchTerm).pipe( |
|
|
|