UBER-48: custom fields for organization in leads (#3203)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
Vyacheslav Tumanov 2023-05-19 10:02:43 +05:00 committed by GitHub
parent 8fa49326a0
commit 88d62bcff5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 19 deletions

View File

@ -99,7 +99,6 @@
/>
</div>
<svelte:fragment slot="pool">
<div class="flex-row-center flex-wrap">
<ChannelsDropdown
bind:value={channels}
focusIndex={10}
@ -116,7 +115,6 @@
on:update
extraProps={{ showNavigate: false }}
/>
</div>
</svelte:fragment>
<svelte:fragment slot="footer">
{#if matches.length > 0}

View File

@ -18,7 +18,7 @@
import contact from '@hcengineering/contact-resources/src/plugin'
import { AttachedData, Class, Data, Doc, generateId, MixinData, Ref, WithLookup } from '@hcengineering/core'
import type { Customer } from '@hcengineering/lead'
import { Card, getClient } from '@hcengineering/presentation'
import { Card, getClient, InlineAttributeBar } from '@hcengineering/presentation'
import {
Button,
createFocusManager,
@ -71,7 +71,7 @@
description: object.description
}
const id = await client.createDoc(targetClass._id, contact.space.Contacts, candidate, customerId)
const id = await client.createDoc(targetClass._id, contact.space.Contacts, { ...candidate, ...object }, customerId)
await client.createMixin(
id as Ref<Contact>,
targetClass._id,
@ -234,6 +234,15 @@
editable
highlighted={matchedChannels.map((it) => it.provider)}
/>
{#if targetClass._id === contact.class.Organization}
<InlineAttributeBar
_class={contact.class.Organization}
{object}
toClass={contact.class.Contact}
on:update
extraProps={{ showNavigate: false }}
/>
{/if}
</svelte:fragment>
<svelte:fragment slot="footer">
{#if matches.length > 0}