mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-30 05:25:00 +02:00
@@ -44,7 +44,9 @@
|
||||
href = undefined
|
||||
return
|
||||
}
|
||||
const loc = await getObjectLinkFragment(hierarchy, object, props, component)
|
||||
const panelComponent = hierarchy.classHierarchyMixin(object._class, view.mixin.ObjectPanel)
|
||||
const comp = panelComponent?.component ?? component
|
||||
const loc = await getObjectLinkFragment(hierarchy, object, props, comp)
|
||||
href = `${window.location.origin}${locationToUrl(loc)}`
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,8 @@ import {
|
||||
getCurrentResolvedLocation,
|
||||
getPanelURI,
|
||||
getPlatformColorForText,
|
||||
locationToUrl
|
||||
locationToUrl,
|
||||
navigate
|
||||
} from '@hcengineering/ui'
|
||||
import type { BuildModelOptions, Viewlet, ViewletDescriptor } from '@hcengineering/view'
|
||||
import view, { AttributeModel, BuildModelKey } from '@hcengineering/view'
|
||||
@@ -876,3 +877,10 @@ export function enabledConfig (config: Array<string | BuildModelKey>, key: strin
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
export async function openDoc (hierarchy: Hierarchy, object: Doc): Promise<void> {
|
||||
const panelComponent = hierarchy.classHierarchyMixin(object._class, view.mixin.ObjectPanel)
|
||||
const comp = panelComponent?.component ?? view.component.EditDoc
|
||||
const loc = await getObjectLinkFragment(hierarchy, object, {}, comp)
|
||||
navigate(loc)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user