fix: enable report navigation and display in collections

- Fix report route to use APP_REPORTS_ID instead of APP_REPORT_ID
- Add report icon to CollectionIconRecord
- Add report case to createAssetLink function for proper navigation
This commit is contained in:
dal 2025-08-22 10:39:22 -06:00
parent ff0828d75a
commit d308b20c3e
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
1 changed files with 9 additions and 1 deletions

View File

@ -158,7 +158,8 @@ CollectionList.displayName = 'CollectionList';
const CollectionIconRecord: Record<string, React.ReactNode> = {
dashboard: <ASSET_ICONS.dashboards />,
metric: <ASSET_ICONS.metrics />
metric: <ASSET_ICONS.metrics />,
report: <ASSET_ICONS.reports />
};
const createAssetLink = (asset: BusterCollectionItemAsset, collectionId: string) => {
@ -176,6 +177,13 @@ const createAssetLink = (asset: BusterCollectionItemAsset, collectionId: string)
});
}
if (asset.asset_type === 'report') {
return createBusterRoute({
route: BusterRoutes.APP_REPORTS_ID,
reportId: asset.id
});
}
if (asset.asset_type === 'collection') {
return createBusterRoute({
route: BusterRoutes.APP_COLLECTIONS