Fix EditCandidate (#560)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2021-12-08 00:44:37 +06:00 committed by GitHub
parent 01ae189119
commit 5b90949e8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 5 deletions

View File

@ -164,6 +164,10 @@ export function createModel (builder: Builder): void {
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, {
editor: contact.component.EditOrganization
})

View File

@ -15,15 +15,20 @@
-->
<script lang="ts">
import { formatName, Person } from '@anticrm/contact'
import { Avatar } from '@anticrm/presentation'
import { closeTooltip, showPopup } from '@anticrm/ui'
import EditPerson from './EditPerson.svelte'
import { getResource } from '@anticrm/platform'
import { Avatar, getClient } from '@anticrm/presentation'
import { showPopup } from '@anticrm/ui'
import view from '@anticrm/view'
export let value: Person
async function onClick () {
closeTooltip()
showPopup(EditPerson, { _id: value._id }, 'full')
const client = getClient()
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>