mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 11:31:57 +03:00
UBER-48: custom fields for organization in leads (#3203)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
8fa49326a0
commit
88d62bcff5
@ -99,7 +99,6 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<svelte:fragment slot="pool">
|
<svelte:fragment slot="pool">
|
||||||
<div class="flex-row-center flex-wrap">
|
|
||||||
<ChannelsDropdown
|
<ChannelsDropdown
|
||||||
bind:value={channels}
|
bind:value={channels}
|
||||||
focusIndex={10}
|
focusIndex={10}
|
||||||
@ -116,7 +115,6 @@
|
|||||||
on:update
|
on:update
|
||||||
extraProps={{ showNavigate: false }}
|
extraProps={{ showNavigate: false }}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
<svelte:fragment slot="footer">
|
<svelte:fragment slot="footer">
|
||||||
{#if matches.length > 0}
|
{#if matches.length > 0}
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
import contact from '@hcengineering/contact-resources/src/plugin'
|
import contact from '@hcengineering/contact-resources/src/plugin'
|
||||||
import { AttachedData, Class, Data, Doc, generateId, MixinData, Ref, WithLookup } from '@hcengineering/core'
|
import { AttachedData, Class, Data, Doc, generateId, MixinData, Ref, WithLookup } from '@hcengineering/core'
|
||||||
import type { Customer } from '@hcengineering/lead'
|
import type { Customer } from '@hcengineering/lead'
|
||||||
import { Card, getClient } from '@hcengineering/presentation'
|
import { Card, getClient, InlineAttributeBar } from '@hcengineering/presentation'
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
createFocusManager,
|
createFocusManager,
|
||||||
@ -71,7 +71,7 @@
|
|||||||
description: object.description
|
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(
|
await client.createMixin(
|
||||||
id as Ref<Contact>,
|
id as Ref<Contact>,
|
||||||
targetClass._id,
|
targetClass._id,
|
||||||
@ -234,6 +234,15 @@
|
|||||||
editable
|
editable
|
||||||
highlighted={matchedChannels.map((it) => it.provider)}
|
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>
|
||||||
<svelte:fragment slot="footer">
|
<svelte:fragment slot="footer">
|
||||||
{#if matches.length > 0}
|
{#if matches.length > 0}
|
||||||
|
Loading…
Reference in New Issue
Block a user