refactor(web): route canonical inventory to simple detail
This commit is contained in:
@@ -7,6 +7,7 @@ import { getAsset } from '../lib/api';
|
||||
import type { AssetDetail } from '../lib/api';
|
||||
import { AssetEditorPage } from './AssetEditorPage';
|
||||
import { CompanyInventoryPage } from './CompanyInventoryPage';
|
||||
import { SimpleInventoryDetailPage, isSimpleInventoryAsset } from './SimpleInventoryDetailPage';
|
||||
import { TerritorialInventoryPage, isTerritorialInventoryAsset } from './TerritorialInventoryPage';
|
||||
|
||||
export function InventoryDetailPage() {
|
||||
@@ -43,6 +44,10 @@ export function InventoryDetailPage() {
|
||||
return <CompanyInventoryPage initialAsset={asset} />;
|
||||
}
|
||||
|
||||
if (isSimpleInventoryAsset(asset) && !advanced) {
|
||||
return <SimpleInventoryDetailPage initialAsset={asset} />;
|
||||
}
|
||||
|
||||
if (isTerritorialInventoryAsset(asset) && !advanced) {
|
||||
return <TerritorialInventoryPage initialAsset={asset} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user