mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 00:37:47 +00:00
Viewlet config upgrade fix (#2026)
Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
parent
e9c7f7dea6
commit
49ab98fa41
@ -190,20 +190,25 @@ export function createModel (builder: Builder): void {
|
|||||||
editor: contact.component.EditMember
|
editor: contact.component.EditMember
|
||||||
})
|
})
|
||||||
|
|
||||||
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
builder.createDoc(
|
||||||
attachTo: contact.class.Contact,
|
view.class.Viewlet,
|
||||||
descriptor: view.viewlet.Table,
|
core.space.Model,
|
||||||
config: [
|
{
|
||||||
'',
|
attachTo: contact.class.Contact,
|
||||||
'$lookup._class',
|
descriptor: view.viewlet.Table,
|
||||||
'city',
|
config: [
|
||||||
'attachments',
|
'',
|
||||||
'modifiedOn',
|
'$lookup._class',
|
||||||
{ key: '', presenter: view.component.RolePresenter, label: view.string.Role },
|
'city',
|
||||||
'$lookup.channels'
|
'attachments',
|
||||||
],
|
'modifiedOn',
|
||||||
hiddenKeys: ['name']
|
{ key: '', presenter: view.component.RolePresenter, label: view.string.Role },
|
||||||
})
|
'$lookup.channels'
|
||||||
|
],
|
||||||
|
hiddenKeys: ['name']
|
||||||
|
},
|
||||||
|
contact.viewlet.TableContact
|
||||||
|
)
|
||||||
|
|
||||||
builder.mixin(contact.class.Person, core.class.Class, view.mixin.ObjectEditor, {
|
builder.mixin(contact.class.Person, core.class.Class, view.mixin.ObjectEditor, {
|
||||||
editor: contact.component.EditPerson
|
editor: contact.component.EditPerson
|
||||||
|
@ -96,11 +96,16 @@ export function createModel (builder: Builder): void {
|
|||||||
|
|
||||||
builder.mixin(inventory.class.Product, core.class.Class, setting.mixin.Editable, {})
|
builder.mixin(inventory.class.Product, core.class.Class, setting.mixin.Editable, {})
|
||||||
|
|
||||||
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
builder.createDoc(
|
||||||
attachTo: inventory.class.Product,
|
view.class.Viewlet,
|
||||||
descriptor: view.viewlet.Table,
|
core.space.Model,
|
||||||
config: ['', '$lookup.attachedTo', 'modifiedOn']
|
{
|
||||||
})
|
attachTo: inventory.class.Product,
|
||||||
|
descriptor: view.viewlet.Table,
|
||||||
|
config: ['', '$lookup.attachedTo', 'modifiedOn']
|
||||||
|
},
|
||||||
|
inventory.viewlet.TableProduct
|
||||||
|
)
|
||||||
|
|
||||||
builder.createDoc(
|
builder.createDoc(
|
||||||
workbench.class.Application,
|
workbench.class.Application,
|
||||||
|
@ -19,7 +19,7 @@ import { inventoryId } from '@anticrm/inventory'
|
|||||||
import inventory from '@anticrm/inventory-resources/src/plugin'
|
import inventory from '@anticrm/inventory-resources/src/plugin'
|
||||||
import { mergeIds } from '@anticrm/platform'
|
import { mergeIds } from '@anticrm/platform'
|
||||||
import type { AnyComponent } from '@anticrm/ui'
|
import type { AnyComponent } from '@anticrm/ui'
|
||||||
import { Action, ActionCategory, ViewAction } from '@anticrm/view'
|
import { Action, ActionCategory, ViewAction, Viewlet } from '@anticrm/view'
|
||||||
|
|
||||||
export default mergeIds(inventoryId, inventory, {
|
export default mergeIds(inventoryId, inventory, {
|
||||||
action: {
|
action: {
|
||||||
@ -39,5 +39,8 @@ export default mergeIds(inventoryId, inventory, {
|
|||||||
Variants: '' as AnyComponent,
|
Variants: '' as AnyComponent,
|
||||||
ProductPresenter: '' as AnyComponent,
|
ProductPresenter: '' as AnyComponent,
|
||||||
VariantPresenter: '' as AnyComponent
|
VariantPresenter: '' as AnyComponent
|
||||||
|
},
|
||||||
|
viewlet: {
|
||||||
|
TableProduct: '' as Ref<Viewlet>
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -129,27 +129,37 @@ export function createModel (builder: Builder): void {
|
|||||||
lead.app.Lead
|
lead.app.Lead
|
||||||
)
|
)
|
||||||
|
|
||||||
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
builder.createDoc(
|
||||||
attachTo: lead.mixin.Customer,
|
view.class.Viewlet,
|
||||||
descriptor: view.viewlet.Table,
|
core.space.Model,
|
||||||
config: ['', '$lookup._class', 'leads', 'modifiedOn', '$lookup.channels'],
|
{
|
||||||
hiddenKeys: ['name']
|
attachTo: lead.mixin.Customer,
|
||||||
})
|
descriptor: view.viewlet.Table,
|
||||||
|
config: ['', '$lookup._class', 'leads', 'modifiedOn', '$lookup.channels'],
|
||||||
|
hiddenKeys: ['name']
|
||||||
|
},
|
||||||
|
lead.viewlet.TableCustomer
|
||||||
|
)
|
||||||
|
|
||||||
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
builder.createDoc(
|
||||||
attachTo: lead.class.Lead,
|
view.class.Viewlet,
|
||||||
descriptor: task.viewlet.StatusTable,
|
core.space.Model,
|
||||||
config: [
|
{
|
||||||
'',
|
attachTo: lead.class.Lead,
|
||||||
'$lookup.attachedTo',
|
descriptor: task.viewlet.StatusTable,
|
||||||
'$lookup.state',
|
config: [
|
||||||
'$lookup.doneState',
|
'',
|
||||||
'attachments',
|
'$lookup.attachedTo',
|
||||||
'comments',
|
'$lookup.state',
|
||||||
'modifiedOn',
|
'$lookup.doneState',
|
||||||
'$lookup.attachedTo.$lookup.channels'
|
'attachments',
|
||||||
]
|
'comments',
|
||||||
})
|
'modifiedOn',
|
||||||
|
'$lookup.attachedTo.$lookup.channels'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
lead.viewlet.TableLead
|
||||||
|
)
|
||||||
|
|
||||||
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
||||||
attachTo: lead.class.Lead,
|
attachTo: lead.class.Lead,
|
||||||
|
@ -21,6 +21,7 @@ import type { IntlString } from '@anticrm/platform'
|
|||||||
import { mergeIds } from '@anticrm/platform'
|
import { mergeIds } from '@anticrm/platform'
|
||||||
import { KanbanTemplate } from '@anticrm/task'
|
import { KanbanTemplate } from '@anticrm/task'
|
||||||
import type { AnyComponent } from '@anticrm/ui'
|
import type { AnyComponent } from '@anticrm/ui'
|
||||||
|
import { Viewlet } from '@anticrm/view'
|
||||||
|
|
||||||
export default mergeIds(leadId, lead, {
|
export default mergeIds(leadId, lead, {
|
||||||
string: {
|
string: {
|
||||||
@ -49,5 +50,9 @@ export default mergeIds(leadId, lead, {
|
|||||||
},
|
},
|
||||||
template: {
|
template: {
|
||||||
DefaultFunnel: '' as Ref<KanbanTemplate>
|
DefaultFunnel: '' as Ref<KanbanTemplate>
|
||||||
|
},
|
||||||
|
viewlet: {
|
||||||
|
TableCustomer: '' as Ref<Viewlet>,
|
||||||
|
TableLead: '' as Ref<Viewlet>
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -254,68 +254,83 @@ export function createModel (builder: Builder): void {
|
|||||||
recruit.app.Recruit
|
recruit.app.Recruit
|
||||||
)
|
)
|
||||||
|
|
||||||
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
builder.createDoc(
|
||||||
attachTo: recruit.mixin.Candidate,
|
view.class.Viewlet,
|
||||||
descriptor: view.viewlet.Table,
|
core.space.Model,
|
||||||
config: [
|
{
|
||||||
'',
|
attachTo: recruit.mixin.Candidate,
|
||||||
'title',
|
descriptor: view.viewlet.Table,
|
||||||
'city',
|
config: [
|
||||||
'applications',
|
'',
|
||||||
'attachments',
|
'title',
|
||||||
'comments',
|
'city',
|
||||||
{
|
'applications',
|
||||||
// key: '$lookup.skills', // Required, since presenter require list of tag references or '' and TagsPopupPresenter
|
'attachments',
|
||||||
key: '',
|
'comments',
|
||||||
presenter: tags.component.TagsPresenter, // tags.component.TagsPresenter,
|
{
|
||||||
label: recruit.string.SkillsLabel,
|
// key: '$lookup.skills', // Required, since presenter require list of tag references or '' and TagsPopupPresenter
|
||||||
sortingKey: 'skills',
|
key: '',
|
||||||
props: {
|
presenter: tags.component.TagsPresenter, // tags.component.TagsPresenter,
|
||||||
_class: recruit.mixin.Candidate,
|
label: recruit.string.SkillsLabel,
|
||||||
key: 'skills'
|
sortingKey: 'skills',
|
||||||
|
props: {
|
||||||
|
_class: recruit.mixin.Candidate,
|
||||||
|
key: 'skills'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'modifiedOn',
|
||||||
|
'$lookup.channels'
|
||||||
|
],
|
||||||
|
hiddenKeys: ['name']
|
||||||
|
},
|
||||||
|
recruit.viewlet.TableCandidate
|
||||||
|
)
|
||||||
|
|
||||||
|
builder.createDoc(
|
||||||
|
view.class.Viewlet,
|
||||||
|
core.space.Model,
|
||||||
|
{
|
||||||
|
attachTo: recruit.class.Vacancy,
|
||||||
|
descriptor: view.viewlet.Table,
|
||||||
|
config: [
|
||||||
|
'',
|
||||||
|
{
|
||||||
|
key: '@applications',
|
||||||
|
label: recruit.string.Applications
|
||||||
|
},
|
||||||
|
'$lookup.company',
|
||||||
|
'location',
|
||||||
|
'description',
|
||||||
|
{
|
||||||
|
key: '@applications.modifiedOn',
|
||||||
|
label: core.string.Modified
|
||||||
}
|
}
|
||||||
},
|
],
|
||||||
'modifiedOn',
|
hiddenKeys: ['name', 'space', 'modifiedOn']
|
||||||
'$lookup.channels'
|
},
|
||||||
],
|
recruit.viewlet.TableVacancy
|
||||||
hiddenKeys: ['name']
|
)
|
||||||
})
|
|
||||||
|
|
||||||
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
builder.createDoc(
|
||||||
attachTo: recruit.class.Vacancy,
|
view.class.Viewlet,
|
||||||
descriptor: view.viewlet.Table,
|
core.space.Model,
|
||||||
config: [
|
{
|
||||||
'',
|
attachTo: recruit.class.Applicant,
|
||||||
{
|
descriptor: task.viewlet.StatusTable,
|
||||||
key: '@applications',
|
config: [
|
||||||
label: recruit.string.Applications
|
'',
|
||||||
},
|
'$lookup.attachedTo',
|
||||||
'$lookup.company',
|
'$lookup.assignee',
|
||||||
'location',
|
'$lookup.state',
|
||||||
'description',
|
'$lookup.doneState',
|
||||||
{
|
'attachments',
|
||||||
key: '@applications.modifiedOn',
|
'comments',
|
||||||
label: core.string.Modified
|
'modifiedOn',
|
||||||
}
|
'$lookup.attachedTo.$lookup.channels'
|
||||||
],
|
]
|
||||||
hiddenKeys: ['name', 'space', 'modifiedOn']
|
},
|
||||||
})
|
recruit.viewlet.TableApplicant
|
||||||
|
)
|
||||||
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
|
||||||
attachTo: recruit.class.Applicant,
|
|
||||||
descriptor: task.viewlet.StatusTable,
|
|
||||||
config: [
|
|
||||||
'',
|
|
||||||
'$lookup.attachedTo',
|
|
||||||
'$lookup.assignee',
|
|
||||||
'$lookup.state',
|
|
||||||
'$lookup.doneState',
|
|
||||||
'attachments',
|
|
||||||
'comments',
|
|
||||||
'modifiedOn',
|
|
||||||
'$lookup.attachedTo.$lookup.channels'
|
|
||||||
]
|
|
||||||
})
|
|
||||||
|
|
||||||
const applicantKanbanLookup: Lookup<Applicant> = {
|
const applicantKanbanLookup: Lookup<Applicant> = {
|
||||||
attachedTo: recruit.mixin.Candidate,
|
attachedTo: recruit.mixin.Candidate,
|
||||||
|
@ -21,7 +21,7 @@ import { recruitId } from '@anticrm/recruit'
|
|||||||
import recruit from '@anticrm/recruit-resources/src/plugin'
|
import recruit from '@anticrm/recruit-resources/src/plugin'
|
||||||
import { KanbanTemplate } from '@anticrm/task'
|
import { KanbanTemplate } from '@anticrm/task'
|
||||||
import type { AnyComponent } from '@anticrm/ui'
|
import type { AnyComponent } from '@anticrm/ui'
|
||||||
import type { Action, ActionCategory, ViewAction } from '@anticrm/view'
|
import type { Action, ActionCategory, ViewAction, Viewlet } from '@anticrm/view'
|
||||||
|
|
||||||
export default mergeIds(recruitId, recruit, {
|
export default mergeIds(recruitId, recruit, {
|
||||||
action: {
|
action: {
|
||||||
@ -86,5 +86,10 @@ export default mergeIds(recruitId, recruit, {
|
|||||||
completion: {
|
completion: {
|
||||||
ApplicationQuery: '' as Resource<ObjectSearchFactory>,
|
ApplicationQuery: '' as Resource<ObjectSearchFactory>,
|
||||||
ApplicationCategory: '' as Ref<ObjectSearchCategory>
|
ApplicationCategory: '' as Ref<ObjectSearchCategory>
|
||||||
|
},
|
||||||
|
viewlet: {
|
||||||
|
TableCandidate: '' as Ref<Viewlet>,
|
||||||
|
TableVacancy: '' as Ref<Viewlet>,
|
||||||
|
TableApplicant: '' as Ref<Viewlet>
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -340,20 +340,25 @@ export function createModel (builder: Builder): void {
|
|||||||
task.viewlet.StatusTable
|
task.viewlet.StatusTable
|
||||||
)
|
)
|
||||||
|
|
||||||
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
builder.createDoc(
|
||||||
attachTo: task.class.Issue,
|
view.class.Viewlet,
|
||||||
descriptor: task.viewlet.StatusTable,
|
core.space.Model,
|
||||||
config: [
|
{
|
||||||
'',
|
attachTo: task.class.Issue,
|
||||||
'name',
|
descriptor: task.viewlet.StatusTable,
|
||||||
'$lookup.assignee',
|
config: [
|
||||||
'$lookup.state',
|
'',
|
||||||
'$lookup.doneState',
|
'name',
|
||||||
'attachments',
|
'$lookup.assignee',
|
||||||
'comments',
|
'$lookup.state',
|
||||||
'modifiedOn'
|
'$lookup.doneState',
|
||||||
]
|
'attachments',
|
||||||
})
|
'comments',
|
||||||
|
'modifiedOn'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
task.viewlet.TableIssue
|
||||||
|
)
|
||||||
|
|
||||||
builder.mixin(task.class.Task, core.class.Class, view.mixin.AttributePresenter, {
|
builder.mixin(task.class.Task, core.class.Class, view.mixin.AttributePresenter, {
|
||||||
presenter: view.component.ObjectPresenter
|
presenter: view.component.ObjectPresenter
|
||||||
|
@ -22,7 +22,7 @@ import { TagCategory } from '@anticrm/tags'
|
|||||||
import { KanbanTemplate, taskId } from '@anticrm/task'
|
import { KanbanTemplate, taskId } from '@anticrm/task'
|
||||||
import task from '@anticrm/task-resources/src/plugin'
|
import task from '@anticrm/task-resources/src/plugin'
|
||||||
import type { AnyComponent } from '@anticrm/ui'
|
import type { AnyComponent } from '@anticrm/ui'
|
||||||
import type { Action, ActionCategory, ViewAction } from '@anticrm/view'
|
import type { Action, ActionCategory, ViewAction, Viewlet } from '@anticrm/view'
|
||||||
|
|
||||||
export default mergeIds(taskId, task, {
|
export default mergeIds(taskId, task, {
|
||||||
action: {
|
action: {
|
||||||
@ -69,5 +69,8 @@ export default mergeIds(taskId, task, {
|
|||||||
completion: {
|
completion: {
|
||||||
IssueQuery: '' as Resource<ObjectSearchFactory>,
|
IssueQuery: '' as Resource<ObjectSearchFactory>,
|
||||||
IssueCategory: '' as Ref<ObjectSearchCategory>
|
IssueCategory: '' as Ref<ObjectSearchCategory>
|
||||||
|
},
|
||||||
|
viewlet: {
|
||||||
|
TableIssue: '' as Ref<Viewlet>
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -215,7 +215,8 @@ const contactPlugin = plugin(contactId, {
|
|||||||
CreateOrganization: '' as IntlString
|
CreateOrganization: '' as IntlString
|
||||||
},
|
},
|
||||||
viewlet: {
|
viewlet: {
|
||||||
TableMember: '' as Ref<Viewlet>
|
TableMember: '' as Ref<Viewlet>,
|
||||||
|
TableContact: '' as Ref<Viewlet>
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user