mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-28 20:45:00 +02:00
Initial meeting minutes (#7111)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
import { Asset } from '@hcengineering/platform'
|
||||
import { getClient } from '@hcengineering/presentation'
|
||||
import { Action, Menu } from '@hcengineering/ui'
|
||||
import { ActionGroup, ViewContextType } from '@hcengineering/view'
|
||||
import { ActionGroup, Action as ViewAction, ViewContextType } from '@hcengineering/view'
|
||||
import { getActions, invokeAction } from '../actions'
|
||||
|
||||
export let object: Doc | Doc[]
|
||||
@@ -26,6 +26,8 @@
|
||||
export let excludedActions: string[] = []
|
||||
export let includedActions: string[] = []
|
||||
export let mode: ViewContextType | undefined = undefined
|
||||
export let overrides = new Map<Ref<ViewAction>, (object: Doc | Doc[], ev?: Event) => void>()
|
||||
|
||||
let resActions = actions
|
||||
|
||||
const client = getClient()
|
||||
@@ -61,11 +63,16 @@
|
||||
inline: a.inline,
|
||||
group: a.context.group ?? 'other',
|
||||
action: async (_: any, evt: Event) => {
|
||||
if (overrides.has(a._id)) {
|
||||
overrides.get(a._id)?.(object, evt)
|
||||
return
|
||||
}
|
||||
invokeAction(object, evt, a)
|
||||
},
|
||||
component: a.actionPopup,
|
||||
props: { ...a.actionProps, value: object }
|
||||
}))
|
||||
|
||||
resActions = [...newActions, ...actions].sort(
|
||||
(a, b) => (order as any)[a.group ?? 'other'] - (order as any)[b.group ?? 'other']
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user