mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-27 11:06:50 +03:00
Fix EditCandidate (#560)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
01ae189119
commit
5b90949e8c
@ -164,6 +164,10 @@ export function createModel (builder: Builder): void {
|
|||||||
editor: contact.component.EditPerson
|
editor: contact.component.EditPerson
|
||||||
})
|
})
|
||||||
|
|
||||||
|
builder.mixin(contact.class.Employee, core.class.Class, view.mixin.ObjectEditor, {
|
||||||
|
editor: contact.component.EditPerson
|
||||||
|
})
|
||||||
|
|
||||||
builder.mixin(contact.class.Organization, core.class.Class, view.mixin.ObjectEditor, {
|
builder.mixin(contact.class.Organization, core.class.Class, view.mixin.ObjectEditor, {
|
||||||
editor: contact.component.EditOrganization
|
editor: contact.component.EditOrganization
|
||||||
})
|
})
|
||||||
|
@ -15,15 +15,20 @@
|
|||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { formatName, Person } from '@anticrm/contact'
|
import { formatName, Person } from '@anticrm/contact'
|
||||||
import { Avatar } from '@anticrm/presentation'
|
import { getResource } from '@anticrm/platform'
|
||||||
import { closeTooltip, showPopup } from '@anticrm/ui'
|
import { Avatar, getClient } from '@anticrm/presentation'
|
||||||
import EditPerson from './EditPerson.svelte'
|
import { showPopup } from '@anticrm/ui'
|
||||||
|
import view from '@anticrm/view'
|
||||||
|
|
||||||
export let value: Person
|
export let value: Person
|
||||||
|
|
||||||
async function onClick () {
|
async function onClick () {
|
||||||
closeTooltip()
|
const client = getClient()
|
||||||
showPopup(EditPerson, { _id: value._id }, 'full')
|
const hierarchy = client.getHierarchy()
|
||||||
|
const clazz = hierarchy.getClass(value._class)
|
||||||
|
const editorMixin = hierarchy.as(clazz, view.mixin.ObjectEditor)
|
||||||
|
const editor = await getResource(editorMixin.editor)
|
||||||
|
showPopup(editor, { _id: value._id }, 'full')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user