mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-28 12:35:02 +02:00
Fillable templates (#2667)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -31,6 +31,7 @@ import {
|
||||
} from '@hcengineering/setting'
|
||||
import task from '@hcengineering/task'
|
||||
import setting from './plugin'
|
||||
import templates from '@hcengineering/templates'
|
||||
|
||||
import workbench from '@hcengineering/model-workbench'
|
||||
import { AnyComponent } from '@hcengineering/ui'
|
||||
@@ -411,6 +412,37 @@ export function createModel (builder: Builder): void {
|
||||
group: 'edit'
|
||||
}
|
||||
})
|
||||
|
||||
builder.createDoc(
|
||||
templates.class.TemplateFieldCategory,
|
||||
core.space.Model,
|
||||
{
|
||||
label: setting.string.Integrations
|
||||
},
|
||||
setting.templateFieldCategory.Integration
|
||||
)
|
||||
|
||||
builder.createDoc(
|
||||
templates.class.TemplateField,
|
||||
core.space.Model,
|
||||
{
|
||||
label: setting.string.IntegrationWith,
|
||||
category: setting.templateFieldCategory.Integration,
|
||||
func: setting.function.GetValue
|
||||
},
|
||||
setting.templateField.Value
|
||||
)
|
||||
|
||||
builder.createDoc(
|
||||
templates.class.TemplateField,
|
||||
core.space.Model,
|
||||
{
|
||||
label: setting.string.Owner,
|
||||
category: setting.templateFieldCategory.Integration,
|
||||
func: setting.function.GetOwnerName
|
||||
},
|
||||
setting.templateField.OwnerName
|
||||
)
|
||||
}
|
||||
|
||||
export { settingOperation } from './migration'
|
||||
|
||||
@@ -15,11 +15,12 @@
|
||||
|
||||
import type { TxViewlet } from '@hcengineering/activity'
|
||||
import { Doc, Ref } from '@hcengineering/core'
|
||||
import { mergeIds } from '@hcengineering/platform'
|
||||
import { IntlString, mergeIds, Resource } from '@hcengineering/platform'
|
||||
import { settingId } from '@hcengineering/setting'
|
||||
import setting from '@hcengineering/setting-resources/src/plugin'
|
||||
import { AnyComponent } from '@hcengineering/ui'
|
||||
import { Action, ActionCategory, ViewAction } from '@hcengineering/view'
|
||||
import { TemplateFieldFunc } from '@hcengineering/templates'
|
||||
|
||||
export default mergeIds(settingId, setting, {
|
||||
activity: {
|
||||
@@ -52,5 +53,12 @@ export default mergeIds(settingId, setting, {
|
||||
},
|
||||
actionImpl: {
|
||||
DeleteMixin: '' as ViewAction<Record<string, any>>
|
||||
},
|
||||
string: {
|
||||
Value: '' as IntlString
|
||||
},
|
||||
function: {
|
||||
GetValue: '' as Resource<TemplateFieldFunc>,
|
||||
GetOwnerName: '' as Resource<TemplateFieldFunc>
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user