Initial meeting minutes (#7111)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2024-11-07 17:08:15 +07:00
committed by GitHub
parent 1ce18226ab
commit e34f59ca37
111 changed files with 2543 additions and 589 deletions
@@ -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']
)