mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-27 01:13:27 +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
|
||||
})
|
||||
|
||||
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
|
||||
})
|
||||
|
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user