mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-23 05:53:09 +03:00
update table configuration
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
dd7c2d5c68
commit
1e21e8ebe3
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -113,7 +113,7 @@ export function createModel (builder: Builder): void {
|
||||
// resume: chunter.class.Attachment
|
||||
// }
|
||||
} as FindOptions<Doc>, // TODO: fix
|
||||
config: ['', 'title', 'city', 'applications', '#' + chunter.component.AttachmentPresenter + '/Files', 'channels']
|
||||
config: ['', 'title', 'city', 'applications', { presenter: chunter.component.AttachmentPresenter, label: 'Files' }, 'channels']
|
||||
})
|
||||
|
||||
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
||||
@ -127,7 +127,7 @@ export function createModel (builder: Builder): void {
|
||||
state: core.class.State
|
||||
}
|
||||
} as FindOptions<Doc>, // TODO: fix
|
||||
config: ['$lookup.candidate', '#' + recruit.component.ApplicationPresenter + '/Application', '$lookup.state', '$lookup.candidate.city', '$lookup.candidate.channels']
|
||||
config: ['$lookup.candidate', { presenter: recruit.component.ApplicationPresenter, label: 'Application' }, '$lookup.state', '$lookup.candidate.city', '$lookup.candidate.channels']
|
||||
})
|
||||
|
||||
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
||||
|
@ -62,17 +62,17 @@ async function getAttributePresenter(client: Client, _class: Ref<Class<Obj>>, ke
|
||||
}
|
||||
|
||||
async function getPresenter(client: Client, _class: Ref<Class<Obj>>, key: string, preserveKey: string, options?: FindOptions<Doc>): Promise<AttributeModel> {
|
||||
if (typeof key === 'object') {
|
||||
const {presenter, label} = key
|
||||
return {
|
||||
key: '',
|
||||
label: label as IntlString,
|
||||
presenter: await getResource(presenter as AnyComponent)
|
||||
}
|
||||
}
|
||||
if (key.length === 0) {
|
||||
return getObjectPresenter(client, _class, preserveKey)
|
||||
} else {
|
||||
if (key.startsWith('#')) {
|
||||
const [presenter, label] = key.substring(1).split('/')
|
||||
return {
|
||||
key: '',
|
||||
label: label as IntlString,
|
||||
presenter: await getResource(presenter as AnyComponent)
|
||||
}
|
||||
}
|
||||
const split = key.split('.')
|
||||
if (split[0] === '$lookup') {
|
||||
const lookupClass = (options?.lookup as any)[split[1]] as Ref<Class<Obj>>
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user